# 1 "<built-in>"
# 1 "../../sdk/lib/ld/test/filter-view-tests.cc"
// Copyright 2023 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#if defined(__CLANG_REWRITTEN_INCLUDES) /* link-map-list.h expanded by -frewrite-includes */
#include <lib/elfldltl/link-map-list.h>
#else /* link-map-list.h expanded by -frewrite-includes */
# 5 "../../sdk/lib/ld/test/filter-view-tests.cc"
# 1 "../../src/lib/elfldltl/include/lib/elfldltl/link-map-list.h" 1
// Copyright 2023 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_LINK_MAP_LIST_H_
#define SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_LINK_MAP_LIST_H_

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* iterator expanded by -frewrite-includes */
#include <iterator>
#else /* iterator expanded by -frewrite-includes */
# 8 "../../src/lib/elfldltl/include/lib/elfldltl/link-map-list.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_ITERATOR
#define _LIBCPP_ITERATOR

/*
    iterator synopsis

#include <concepts>

namespace std
{
template<class> struct incrementable_traits;       // since C++20
template<class T>
  using iter_difference_t = see below;             // since C++20

template<class> struct indirectly_readable_traits; // since C++20
template<class T>
  using iter_value_t = see below;                  // since C++20

template<class Iterator>
struct iterator_traits;

template<class T>
  requires is_object_v<T>                    // since C++20
struct iterator_traits<T*>;

template<dereferenceable T>
  using iter_reference_t = decltype(*declval<T&>());

namespace ranges::inline unspecified {
    inline constexpr unspecified iter_move = unspecified; // since C++20, nodiscard as an extension
}}

template<dereferenceable T>
  requires ...
using iter_rvalue_reference_t = decltype(ranges::iter_move(declval<T&>())); // since C++20

// [iterator.concepts], iterator concepts
// [iterator.concept.readable], concept indirectly_readable
template<class In>
  concept indirectly_readable = see below;                      // since C++20

template<indirectly_readable T>
  using iter_common_reference_t =
    common_reference_t<iter_reference_t<T>, iter_value_t<T>&>;  // since C++20

// [iterator.concept.writable], concept indirectly_writable
template<class Out, class T>
  concept indirectly_writable = see below;                // since C++20

// [iterator.concept.winc], concept weakly_incrementable
template<class I>
  concept weakly_incrementable = see below;                // since C++20

// [iterator.concept.inc], concept incrementable
template<class I>
  concept incrementable = see below;                       // since C++20

// [iterator.concept.iterator], concept input_or_output_iterator
  template<class I>
    concept input_or_output_iterator = see below;          // since C++20

// [iterator.concept.sentinel], concept sentinel_for
template<class S, class I>
  concept sentinel_for = see below;                        // since C++20

// [iterator.concept.sizedsentinel], concept sized_sentinel_for
template<class S, class I>
  inline constexpr bool disable_sized_sentinel_for = false;

template<class S, class I>
  concept sized_sentinel_for = see below;

// [iterator.concept.input], concept input_iterator
template<class I>
  concept input_iterator = see below;                      // since C++20

// [iterator.concept.output], concept output_iterator
template<class I, class T>
  concept output_iterator = see below;                     // since C++20

// [iterator.concept.forward], concept forward_iterator
template<class I>
  concept forward_iterator = see below;                    // since C++20

// [iterator.concept.bidir], concept bidirectional_iterator
template<class I>
  concept bidirectional_iterator = see below;              // since C++20

// [iterator.concept.random.access], concept random_access_iterator
template<class I>
  concept random_access_iterator = see below;              // since C++20

// [indirectcallable]
// [indirectcallable.indirectinvocable]
template<class F, class I>
  concept indirectly_unary_invocable = see below;          // since C++20

template<class F, class I>
  concept indirectly_regular_unary_invocable = see below;  // since C++20

template<class F, class I>
  concept indirect_unary_predicate = see below;            // since C++20

template<class F, class I1, class I2>
  concept indirect_binary_predicate = see below;           // since C++20

template<class F, class I1, class I2 = I1>
  concept indirect_equivalence_relation = see below;       // since C++20

template<class F, class I1, class I2 = I1>
  concept indirect_strict_weak_order = see below;          // since C++20

template<class F, class... Is>
  using indirect_result_t = see below;                     // since C++20

// [projected], projected
template<indirectly_readable I, indirectly_regular_unary_invocable<I> Proj>
  struct projected;                                        // since C++20

template<weakly_incrementable I, indirectly_regular_unary_invocable<I> Proj>
  struct incrementable_traits<projected<I, Proj>>;         // since C++20

// [alg.req.ind.move], concept indirectly_movable
template<class In, class Out>
  concept indirectly_movable = see below;                  // since C++20

template<class In, class Out>
  concept indirectly_movable_storable = see below;         // since C++20

// [alg.req.ind.copy], concept indirectly_copyable
template<class In, class Out>
  concept indirectly_copyable = see below;                 // since C++20

template<class In, class Out>
  concept indirectly_copyable_storable = see below;        // since C++20

// [alg.req.ind.swap], concept indirectly_swappable
template<class I1, class I2 = I1>
  concept indirectly_swappable = see below;                // since C++20

template<class I1, class I2, class R, class P1 = identity,
         class P2 = identity>
  concept indirectly_comparable =
    indirect_binary_predicate<R, projected<I1, P1>, projected<I2, P2>>; // since C++20

// [alg.req.permutable], concept permutable
template<class I>
  concept permutable = see below;                          // since C++20

 // [alg.req.mergeable], concept mergeable
template<class I1, class I2, class Out,
    class R = ranges::less, class P1 = identity, class P2 = identity>
  concept mergeable = see below;                           // since C++20

// [alg.req.sortable], concept sortable
template<class I, class R = ranges::less, class P = identity>
  concept sortable = see below;                            // since C++20

template<input_or_output_iterator I, sentinel_for<I> S>
  requires (!same_as<I, S> && copyable<I>)
class common_iterator;                                     // since C++20

template<class Category, class T, class Distance = ptrdiff_t,
         class Pointer = T*, class Reference = T&>
struct iterator                                            // deprecated in C++17
{
    typedef T         value_type;
    typedef Distance  difference_type;
    typedef Pointer   pointer;
    typedef Reference reference;
    typedef Category  iterator_category;
};

struct input_iterator_tag  {};
struct output_iterator_tag {};
struct forward_iterator_tag       : public input_iterator_tag         {};
struct bidirectional_iterator_tag : public forward_iterator_tag       {};
struct random_access_iterator_tag : public bidirectional_iterator_tag {};
struct contiguous_iterator_tag    : public random_access_iterator_tag {};

// 27.4.3, iterator operations
template <class InputIterator, class Distance>  // constexpr in C++17
  constexpr void advance(InputIterator& i, Distance n);

template <class InputIterator>  // constexpr in C++17
  constexpr typename iterator_traits<InputIterator>::difference_type
    distance(InputIterator first, InputIterator last);

template <class InputIterator>  // constexpr in C++17
  constexpr InputIterator next(InputIterator x,
typename iterator_traits<InputIterator>::difference_type n = 1);

template <class BidirectionalIterator>  // constexpr in C++17
  constexpr BidirectionalIterator prev(BidirectionalIterator x,
    typename iterator_traits<BidirectionalIterator>::difference_type n = 1);

// [range.iter.ops], range iterator operations
namespace ranges {
  // [range.iter.op.advance], ranges::advance
  template<input_or_output_iterator I>
    constexpr void advance(I& i, iter_difference_t<I> n);                          // since C++20
  template<input_or_output_iterator I, sentinel_for<I> S>
    constexpr void advance(I& i, S bound);                                         // since C++20
  template<input_or_output_iterator I, sentinel_for<I> S>
    constexpr iter_difference_t<I> advance(I& i, iter_difference_t<I> n, S bound); // since C++20
}

template <class Iterator>
class reverse_iterator
    : public iterator<typename iterator_traits<Iterator>::iterator_category, // until C++17
                      typename iterator_traits<Iterator>::value_type,
                      typename iterator_traits<Iterator>::difference_type,
                      typename iterator_traits<Iterator>::pointer,
                      typename iterator_traits<Iterator>::reference>
{
protected:
    Iterator current;
public:
    using iterator_type     = Iterator;
    using iterator_concept  = see below; // since C++20
    using iterator_category = typename iterator_traits<Iterator>::iterator_category; // since C++17, until C++20
    using iterator_category = see below; // since C++20
    using value_type        = typename iterator_traits<Iterator>::value_type; // since C++17, until C++20
    using value_type        = iter_value_t<Iterator>; // since C++20
    using difference_type   = typename iterator_traits<Iterator>::difference_type; // until C++20
    using difference_type   = iter_difference_t<Iterator>; // since C++20
    using pointer           = typename iterator_traits<Iterator>::pointer;
    using reference         = typename iterator_traits<Iterator>::reference; // until C++20
    using reference         = iter_reference_t<Iterator>; // since C++20

    constexpr reverse_iterator();
    constexpr explicit reverse_iterator(Iterator x);
    template <class U> constexpr reverse_iterator(const reverse_iterator<U>& u);
    template <class U> constexpr reverse_iterator& operator=(const reverse_iterator<U>& u);
    constexpr Iterator base() const;
    constexpr reference operator*() const;
    constexpr pointer   operator->() const; // until C++20
    constexpr pointer   operator->() const requires see below; // since C++20
    constexpr reverse_iterator& operator++();
    constexpr reverse_iterator  operator++(int);
    constexpr reverse_iterator& operator--();
    constexpr reverse_iterator  operator--(int);
    constexpr reverse_iterator  operator+ (difference_type n) const;
    constexpr reverse_iterator& operator+=(difference_type n);
    constexpr reverse_iterator  operator- (difference_type n) const;
    constexpr reverse_iterator& operator-=(difference_type n);
    constexpr unspecified       operator[](difference_type n) const;

    friend constexpr iter_rvalue_reference_t<Iterator>
      iter_move(const reverse_iterator& i) noexcept(see below);
    template<indirectly_swappable<Iterator> Iterator2>
      friend constexpr void
        iter_swap(const reverse_iterator& x,
                  const reverse_iterator<Iterator2>& y) noexcept(see below);
};

template <class Iterator1, class Iterator2>
constexpr bool                          // constexpr in C++17
operator==(const reverse_iterator<Iterator1>& x, const reverse_iterator<Iterator2>& y);

template <class Iterator1, class Iterator2>
constexpr bool                          // constexpr in C++17
operator!=(const reverse_iterator<Iterator1>& x, const reverse_iterator<Iterator2>& y);

template <class Iterator1, class Iterator2>
constexpr bool                          // constexpr in C++17
operator<(const reverse_iterator<Iterator1>& x, const reverse_iterator<Iterator2>& y);

template <class Iterator1, class Iterator2>
constexpr bool                          // constexpr in C++17
operator>(const reverse_iterator<Iterator1>& x, const reverse_iterator<Iterator2>& y);

template <class Iterator1, class Iterator2>
constexpr bool                          // constexpr in C++17
operator<=(const reverse_iterator<Iterator1>& x, const reverse_iterator<Iterator2>& y);

template <class Iterator1, class Iterator2>
constexpr bool                          // constexpr in C++17
operator>=(const reverse_iterator<Iterator1>& x, const reverse_iterator<Iterator2>& y);

template<class Iterator1, three_way_comparable_with<Iterator1> Iterator2>
  constexpr compare_three_way_result_t<Iterator1, Iterator2>
    operator<=>(const reverse_iterator<Iterator1>& x,
                const reverse_iterator<Iterator2>& y);

template <class Iterator1, class Iterator2>
constexpr auto
operator-(const reverse_iterator<Iterator1>& x, const reverse_iterator<Iterator2>& y)
-> decltype(__y.base() - __x.base());   // constexpr in C++17

template <class Iterator>
constexpr reverse_iterator<Iterator>
operator+(typename reverse_iterator<Iterator>::difference_type n,
          const reverse_iterator<Iterator>& x);   // constexpr in C++17

template <class Iterator>
constexpr reverse_iterator<Iterator> make_reverse_iterator(Iterator i); // C++14, constexpr in C++17

template<class Iterator1, class Iterator2>
    requires (!sized_sentinel_for<Iterator1, Iterator2>)
  inline constexpr bool disable_sized_sentinel_for<reverse_iterator<Iterator1>,
                                                   reverse_iterator<Iterator2>> = true;

template <class Container>
class back_insert_iterator
    : public iterator<output_iterator_tag, void, void, void, void> // until C++17
{
protected:
    Container* container;
public:
    typedef Container                   container_type;
    typedef void                        value_type;
    typedef void                        difference_type; // until C++20
    typedef ptrdiff_t                   difference_type; // since C++20
    typedef void                        reference;
    typedef void                        pointer;

    explicit back_insert_iterator(Container& x);  // constexpr in C++20
    back_insert_iterator& operator=(const typename Container::value_type& value);  // constexpr in C++20
    back_insert_iterator& operator*();  // constexpr in C++20
    back_insert_iterator& operator++();  // constexpr in C++20
    back_insert_iterator  operator++(int);  // constexpr in C++20
};

template <class Container> back_insert_iterator<Container> back_inserter(Container& x);  // constexpr in C++20

template <class Container>
class front_insert_iterator
    : public iterator<output_iterator_tag, void, void, void, void> // until C++17
{
protected:
    Container* container;
public:
    typedef Container                    container_type;
    typedef void                         value_type;
    typedef void                         difference_type; // until C++20
    typedef ptrdiff_t                    difference_type; // since C++20
    typedef void                         reference;
    typedef void                         pointer;

    explicit front_insert_iterator(Container& x);  // constexpr in C++20
    front_insert_iterator& operator=(const typename Container::value_type& value);  // constexpr in C++20
    front_insert_iterator& operator*();  // constexpr in C++20
    front_insert_iterator& operator++();  // constexpr in C++20
    front_insert_iterator  operator++(int);  // constexpr in C++20
};

template <class Container> front_insert_iterator<Container> front_inserter(Container& x);  // constexpr in C++20

template <class Container>
class insert_iterator
    : public iterator<output_iterator_tag, void, void, void, void> // until C++17
{
protected:
    Container* container;
    typename Container::iterator iter;
public:
    typedef Container              container_type;
    typedef void                   value_type;
    typedef void                   difference_type; // until C++20
    typedef ptrdiff_t              difference_type; // since C++20
    typedef void                   reference;
    typedef void                   pointer;

    insert_iterator(Container& x, typename Container::iterator i);  // constexpr in C++20
    insert_iterator& operator=(const typename Container::value_type& value);  // constexpr in C++20
    insert_iterator& operator*();  // constexpr in C++20
    insert_iterator& operator++();  // constexpr in C++20
    insert_iterator& operator++(int);  // constexpr in C++20
};

template <class Container>
insert_iterator<Container> inserter(Container& x, typename Container::iterator i);  // until C++20
template <class Container>
constexpr insert_iterator<Container> inserter(Container& x, ranges::iterator_t<Container> i);  // since C++20

template <class Iterator>
class move_iterator {
public:
    using iterator_type     = Iterator;
    using iterator_concept  = see below; // From C++20
    using iterator_category = see below; // not always present starting from C++20
    using value_type        = iter_value_t<Iterator>; // Until C++20, iterator_traits<Iterator>::value_type
    using difference_type   = iter_difference_t<Iterator>; // Until C++20, iterator_traits<Iterator>::difference_type;
    using pointer           = Iterator;
    using reference         = iter_rvalue_reference_t<Iterator>; // Until C++20, value_type&&

    constexpr move_iterator();  // all the constexprs are in C++17
    constexpr explicit move_iterator(Iterator i);
    template <class U>
      constexpr move_iterator(const move_iterator<U>& u);
    template <class U>
      constexpr move_iterator& operator=(const move_iterator<U>& u);

    constexpr iterator_type base() const; // Until C++20
    constexpr const Iterator& base() const & noexcept; // From C++20
    constexpr Iterator base() &&; // From C++20

    constexpr reference operator*() const;
    constexpr pointer operator->() const; // Deprecated in C++20
    constexpr move_iterator& operator++();
    constexpr auto operator++(int); // Return type was move_iterator until C++20
    constexpr move_iterator& operator--();
    constexpr move_iterator operator--(int);
    constexpr move_iterator operator+(difference_type n) const;
    constexpr move_iterator& operator+=(difference_type n);
    constexpr move_iterator operator-(difference_type n) const;
    constexpr move_iterator& operator-=(difference_type n);
    constexpr reference operator[](difference_type n) const; // Return type unspecified until C++20

    template<sentinel_for<Iterator> S>
      friend constexpr bool
        operator==(const move_iterator& x, const move_sentinel<S>& y); // Since C++20
    template<sized_sentinel_for<Iterator> S>
      friend constexpr iter_difference_t<Iterator>
        operator-(const move_sentinel<S>& x, const move_iterator& y); // Since C++20
    template<sized_sentinel_for<Iterator> S>
      friend constexpr iter_difference_t<Iterator>
        operator-(const move_iterator& x, const move_sentinel<S>& y); // Since C++20
    friend constexpr iter_rvalue_reference_t<Iterator>
      iter_move(const move_iterator& i)
        noexcept(noexcept(ranges::iter_move(i.current))); // Since C++20
    template<indirectly_swappable<Iterator> Iterator2>
      friend constexpr void
        iter_swap(const move_iterator& x, const move_iterator<Iterator2>& y)
          noexcept(noexcept(ranges::iter_swap(x.current, y.current))); // Since C++20

private:
    Iterator current; // exposition only
};

template <class Iterator1, class Iterator2>
constexpr bool   // constexpr in C++17
operator==(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);

template <class Iterator1, class Iterator2>
constexpr bool   // constexpr in C++17
operator!=(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);

template <class Iterator1, class Iterator2>
constexpr bool   // constexpr in C++17
operator<(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);

template <class Iterator1, class Iterator2>
constexpr bool   // constexpr in C++17
operator<=(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);

template <class Iterator1, class Iterator2>
constexpr bool   // constexpr in C++17
operator>(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);

template <class Iterator1, class Iterator2>
constexpr bool   // constexpr in C++17
operator>=(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);

template <class Iterator1, class Iterator2>
constexpr auto   // constexpr in C++17
operator-(const move_iterator<Iterator1>& x,
          const move_iterator<Iterator2>& y) -> decltype(x.base() - y.base());

template <class Iterator>
constexpr move_iterator<Iterator> operator+(   // constexpr in C++17
            typename move_iterator<Iterator>::difference_type n,
            const move_iterator<Iterator>& x);

template <class Iterator>   // constexpr in C++17
constexpr  move_iterator<Iterator> make_move_iterator(const Iterator& i);

template<semiregular S>
class move_sentinel {
public:
  constexpr move_sentinel();
  constexpr explicit move_sentinel(S s);
  template<class S2>
    requires convertible_to<const S2&, S>
      constexpr move_sentinel(const move_sentinel<S2>& s);
  template<class S2>
    requires assignable_from<S&, const S2&>
      constexpr move_sentinel& operator=(const move_sentinel<S2>& s);

  constexpr S base() const;
private:
  S last;     // exposition only
};

// [default.sentinel], default sentinel
struct default_sentinel_t;
inline constexpr default_sentinel_t default_sentinel{};

// [iterators.counted], counted iterators
template<input_or_output_iterator I> class counted_iterator;

template<input_iterator I>
  requires see below
  struct iterator_traits<counted_iterator<I>>;

// [unreachable.sentinel], unreachable sentinel
struct unreachable_sentinel_t;
inline constexpr unreachable_sentinel_t unreachable_sentinel{};

template <class T, class charT = char, class traits = char_traits<charT>, class Distance = ptrdiff_t>
class istream_iterator
    : public iterator<input_iterator_tag, T, Distance, const T*, const T&> // until C++17
{
public:
    typedef input_iterator_tag           iterator_category;
    typedef T                            value_type;
    typedef Distance                     difference_type;
    typedef const T*                     pointer;
    typedef const T&                     reference;

    typedef charT                        char_type;
    typedef traits                       traits_type;
    typedef basic_istream<charT, traits> istream_type;

    istream_iterator(); // constexpr since C++11
    constexpr istream_iterator(default_sentinel_t); // since C++20
    istream_iterator(istream_type& s);
    istream_iterator(const istream_iterator& x);
    ~istream_iterator();

    const T& operator*() const;
    const T* operator->() const;
    istream_iterator& operator++();
    istream_iterator  operator++(int);
    friend bool operator==(const istream_iterator& i, default_sentinel_t); // since C++20
};

template <class T, class charT, class traits, class Distance>
bool operator==(const istream_iterator<T,charT,traits,Distance>& x,
                const istream_iterator<T,charT,traits,Distance>& y);
template <class T, class charT, class traits, class Distance>
bool operator!=(const istream_iterator<T,charT,traits,Distance>& x,
                const istream_iterator<T,charT,traits,Distance>& y); // until C++20

template <class T, class charT = char, class traits = char_traits<charT> >
class ostream_iterator
    : public iterator<output_iterator_tag, void, void, void, void> // until C++17
{
public:
    typedef output_iterator_tag         iterator_category;
    typedef void                        value_type;
    typedef void                        difference_type; // until C++20
    typedef ptrdiff_t                   difference_type; // since C++20
    typedef void                        pointer;
    typedef void                        reference;

    typedef charT char_type;
    typedef traits traits_type;
    typedef basic_ostream<charT,traits> ostream_type;

    ostream_iterator(ostream_type& s);
    ostream_iterator(ostream_type& s, const charT* delimiter);
    ostream_iterator(const ostream_iterator& x);
    ~ostream_iterator();
    ostream_iterator& operator=(const T& value);

    ostream_iterator& operator*();
    ostream_iterator& operator++();
    ostream_iterator& operator++(int);
};

template<class charT, class traits = char_traits<charT> >
class istreambuf_iterator
    : public iterator<input_iterator_tag, charT, traits::off_type, unspecified, charT> // until C++17
{
public:
    typedef input_iterator_tag              iterator_category;
    typedef charT                           value_type;
    typedef traits::off_type                difference_type;
    typedef unspecified                     pointer;
    typedef charT                           reference;

    typedef charT                           char_type;
    typedef traits                          traits_type;
    typedef traits::int_type                int_type;
    typedef basic_streambuf<charT, traits>  streambuf_type;
    typedef basic_istream<charT, traits>    istream_type;

    istreambuf_iterator() noexcept; // constexpr since C++11
    constexpr istreambuf_iterator(default_sentinel_t) noexcept; // since C++20
    istreambuf_iterator(istream_type& s) noexcept;
    istreambuf_iterator(streambuf_type* s) noexcept;
    istreambuf_iterator(a-private-type) noexcept;

    charT                operator*() const;
    pointer operator->() const;
    istreambuf_iterator& operator++();
    a-private-type       operator++(int);

    bool equal(const istreambuf_iterator& b) const;
    friend bool operator==(const istreambuf_iterator& i, default_sentinel_t s); // since C++20
};

template <class charT, class traits>
bool operator==(const istreambuf_iterator<charT,traits>& a,
                const istreambuf_iterator<charT,traits>& b);
template <class charT, class traits>
bool operator!=(const istreambuf_iterator<charT,traits>& a,
                const istreambuf_iterator<charT,traits>& b); // until C++20

template <class charT, class traits = char_traits<charT> >
class ostreambuf_iterator
    : public iterator<output_iterator_tag, void, void, void, void> // until C++17
{
public:
    typedef output_iterator_tag            iterator_category;
    typedef void                           value_type;
    typedef void                           difference_type; // until C++20
    typedef ptrdiff_t                      difference_type; // since C++20
    typedef void                           pointer;
    typedef void                           reference;

    typedef charT                          char_type;
    typedef traits                         traits_type;
    typedef basic_streambuf<charT, traits> streambuf_type;
    typedef basic_ostream<charT, traits>   ostream_type;

    ostreambuf_iterator(ostream_type& s) noexcept;
    ostreambuf_iterator(streambuf_type* s) noexcept;
    ostreambuf_iterator& operator=(charT c);
    ostreambuf_iterator& operator*();
    ostreambuf_iterator& operator++();
    ostreambuf_iterator& operator++(int);
    bool failed() const noexcept;
};

template <class C> constexpr auto begin(C& c) -> decltype(c.begin());                   // constexpr since C++17
template <class C> constexpr auto begin(const C& c) -> decltype(c.begin());             // constexpr since C++17
template <class C> constexpr auto end(C& c) -> decltype(c.end());                       // constexpr since C++17
template <class C> constexpr auto end(const C& c) -> decltype(c.end());                 // constexpr since C++17
template <class T, size_t N> constexpr T* begin(T (&array)[N]) noexcept;                // constexpr since C++14
template <class T, size_t N> constexpr T* end(T (&array)[N]) noexcept;                  // constexpr since C++14

template <class C> constexpr auto cbegin(const C& c) -> decltype(std::begin(c));        // C++14
template <class C> constexpr auto cend(const C& c) -> decltype(std::end(c));            // C++14
template <class C> constexpr auto rbegin(C& c) -> decltype(c.rbegin());                 // C++14, constexpr since C++17
template <class C> constexpr auto rbegin(const C& c) -> decltype(c.rbegin());           // C++14, constexpr since C++17
template <class C> constexpr auto rend(C& c) -> decltype(c.rend());                     // C++14, constexpr since C++17
template <class C> constexpr auto rend(const C& c) -> decltype(c.rend());               // C++14, constexpr since C++17
template <class E> constexpr reverse_iterator<const E*> rbegin(initializer_list<E> il); // C++14, constexpr since C++17
template <class E> constexpr reverse_iterator<const E*> rend(initializer_list<E> il);   // C++14, constexpr since C++17
template <class T, size_t N> constexpr reverse_iterator<T*> rbegin(T (&array)[N]);      // C++14, constexpr since C++17
template <class T, size_t N> constexpr reverse_iterator<T*> rend(T (&array)[N]);        // C++14, constexpr since C++17
template <class C> constexpr auto crbegin(const C& c) -> decltype(std::rbegin(c));      // C++14, constexpr since C++17
template <class C> constexpr auto crend(const C& c) -> decltype(std::rend(c));          // C++14, constexpr since C++17

// 24.8, container access:
template <class C> constexpr auto size(const C& c) -> decltype(c.size());         // C++17
template <class T, size_t N> constexpr size_t size(const T (&array)[N]) noexcept; // C++17

template <class C> constexpr auto ssize(const C& c)
    -> common_type_t<ptrdiff_t, make_signed_t<decltype(c.size())>>;                    // C++20
template <class T, ptrdiff_t> constexpr ptrdiff_t ssize(const T (&array)[N]) noexcept; // C++20

template <class C> constexpr auto empty(const C& c) -> decltype(c.empty());       // C++17
template <class T, size_t N> constexpr bool empty(const T (&array)[N]) noexcept;  // C++17
template <class E> constexpr bool empty(initializer_list<E> il) noexcept;         // C++17
template <class C> constexpr auto data(C& c) -> decltype(c.data());               // C++17
template <class C> constexpr auto data(const C& c) -> decltype(c.data());         // C++17
template <class T, size_t N> constexpr T* data(T (&array)[N]) noexcept;           // C++17
template <class E> constexpr const E* data(initializer_list<E> il) noexcept;      // C++17

}  // std

*/

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __assert expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#else /* __assert expanded by -frewrite-includes */
# 677 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__assert" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ASSERT
#define _LIBCPP___ASSERT

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __config expanded by -frewrite-includes */
#include <__config>
#else /* __config expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__assert" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONFIG
#define _LIBCPP___CONFIG

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __config_site expanded by -frewrite-includes */
#include <__config_site>
#else /* __config_site expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/x86_64-unknown-fuchsia/c++/v1/__config_site" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONFIG_SITE
#define _LIBCPP___CONFIG_SITE

#define _LIBCPP_ABI_VERSION 2
#define _LIBCPP_ABI_NAMESPACE __2
/* #undef _LIBCPP_ABI_FORCE_ITANIUM */
/* #undef _LIBCPP_ABI_FORCE_MICROSOFT */
/* #undef _LIBCPP_HAS_NO_THREADS */
/* #undef _LIBCPP_HAS_NO_MONOTONIC_CLOCK */
/* #undef _LIBCPP_HAS_MUSL_LIBC */
/* #undef _LIBCPP_HAS_THREAD_API_PTHREAD */
/* #undef _LIBCPP_HAS_THREAD_API_EXTERNAL */
/* #undef _LIBCPP_HAS_THREAD_API_WIN32 */
/* #undef _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS */
#define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
/* #undef _LIBCPP_NO_VCRUNTIME */
/* #undef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION */
/* #undef _LIBCPP_HAS_NO_FILESYSTEM */
/* #undef _LIBCPP_HAS_NO_RANDOM_DEVICE */
/* #undef _LIBCPP_HAS_NO_LOCALIZATION */
/* #undef _LIBCPP_HAS_NO_WIDE_CHARACTERS */
#define _LIBCPP_HAS_NO_STD_MODULES
#define _LIBCPP_HAS_NO_TIME_ZONE_DATABASE

// PSTL backends
/* #undef _LIBCPP_PSTL_CPU_BACKEND_SERIAL */
#define _LIBCPP_PSTL_CPU_BACKEND_THREAD
/* #undef _LIBCPP_PSTL_CPU_BACKEND_LIBDISPATCH */

// Hardening.
#define _LIBCPP_ENABLE_HARDENED_MODE_DEFAULT 0
#define _LIBCPP_ENABLE_SAFE_MODE_DEFAULT 0
#define _LIBCPP_ENABLE_DEBUG_MODE_DEFAULT 0

// __USE_MINGW_ANSI_STDIO gets redefined on MinGW
#ifdef __clang__
#  pragma clang diagnostic push
#  pragma clang diagnostic ignored "-Wmacro-redefined"
#endif
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/x86_64-unknown-fuchsia/c++/v1/__config_site" 3




#ifdef __clang__
#  pragma clang diagnostic pop
#endif
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/x86_64-unknown-fuchsia/c++/v1/__config_site" 3

#endif // _LIBCPP___CONFIG_SITE
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/x86_64-unknown-fuchsia/c++/v1/__config_site" 3
#endif /* __config_site expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 2 3

#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__apple_build_version__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// Given AppleClang XX.Y.Z, _LIBCPP_APPLE_CLANG_VER is XXYZ (e.g. AppleClang 14.0.3 => 1403)
#  define _LIBCPP_COMPILER_CLANG_BASED
#  define _LIBCPP_APPLE_CLANG_VER (__apple_build_version__ / 10000)
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  define _LIBCPP_COMPILER_CLANG_BASED
#  define _LIBCPP_CLANG_VER (__clang_major__ * 100 + __clang_minor__)
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__GNUC__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  define _LIBCPP_COMPILER_GCC
#  define _LIBCPP_GCC_VER (__GNUC__ * 100 + __GNUC_MINOR__)
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#ifdef __cplusplus

// Warn if a compiler version is used that is not supported anymore
// LLVM RELEASE Update the minimum compiler versions
#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_CLANG_VER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#    if _LIBCPP_CLANG_VER < 1500
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      warning "Libc++ only supports Clang 15 and later"
#    endif
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(_LIBCPP_APPLE_CLANG_VER)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#    if _LIBCPP_APPLE_CLANG_VER < 1500
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      warning "Libc++ only supports AppleClang 15 and later"
#    endif
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(_LIBCPP_GCC_VER)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#    if _LIBCPP_GCC_VER < 1300
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      warning "Libc++ only supports GCC 13 and later"
#    endif
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  endif
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// The attributes supported by clang are documented at https://clang.llvm.org/docs/AttributeReference.html

// _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM.
// Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 17.0.1 == 17.00.01), _LIBCPP_VERSION is
// defined to XXYYZZ.
#  define _LIBCPP_VERSION 180000

#  define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y
#  define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y)

// Valid C++ identifier that revs with every libc++ version. This can be used to
// generate identifiers that must be unique for every released libc++ version.
#  define _LIBCPP_VERSIONED_IDENTIFIER _LIBCPP_CONCAT(v, _LIBCPP_VERSION)

#if 0 /* disabled by -frewrite-includes */
#  if __STDC_HOSTED__ == 0
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_FREESTANDING
#  endif
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// NOLINTBEGIN(libcpp-cpp-version-check)
#  ifndef _LIBCPP_STD_VER
#if 0 /* disabled by -frewrite-includes */
#    if __cplusplus <= 201103L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_STD_VER 11
#if 0 /* disabled by -frewrite-includes */
#if 0
#    elif __cplusplus <= 201402L
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_STD_VER 14
#if 0 /* disabled by -frewrite-includes */
#if 0
#    elif __cplusplus <= 201703L
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_STD_VER 17
#if 0 /* disabled by -frewrite-includes */
#if 0
#    elif __cplusplus <= 202002L
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_STD_VER 20
#if 0 /* disabled by -frewrite-includes */
#if 0
#    elif __cplusplus <= 202302L
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_STD_VER 23
#    else
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// Expected release year of the next C++ standard
#      define _LIBCPP_STD_VER 26
#    endif
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  endif // _LIBCPP_STD_VER
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// NOLINTEND(libcpp-cpp-version-check)

#if 0 /* disabled by -frewrite-includes */
#  if defined(__ELF__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_OBJECT_FORMAT_ELF 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(__MACH__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_OBJECT_FORMAT_MACHO 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(_WIN32)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_OBJECT_FORMAT_COFF 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(__wasm__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 93 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_OBJECT_FORMAT_WASM 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(_AIX)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_OBJECT_FORMAT_XCOFF 1
#  else
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// ... add new file formats here ...
#  endif
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// ABI {

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_ABI_VERSION >= 2
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// Change short string representation so that string data starts at offset 0,
// improving its alignment in some cases.
#    define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
// Fix deque iterator type in order to support incomplete types.
#    define _LIBCPP_ABI_INCOMPLETE_TYPES_IN_DEQUE
// Fix undefined behavior in how std::list stores its linked nodes.
#    define _LIBCPP_ABI_LIST_REMOVE_NODE_POINTER_UB
// Fix undefined behavior in  how __tree stores its end and parent nodes.
#    define _LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB
// Fix undefined behavior in how __hash_table stores its pointer types.
#    define _LIBCPP_ABI_FIX_UNORDERED_NODE_POINTER_UB
#    define _LIBCPP_ABI_FORWARD_LIST_REMOVE_NODE_POINTER_UB
#    define _LIBCPP_ABI_FIX_UNORDERED_CONTAINER_SIZE_TYPE
// Define a key function for `bad_function_call` in the library, to centralize
// its vtable and typeinfo to libc++ rather than having all other libraries
// using that class define their own copies.
#    define _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
// Override the default return value of exception::what() for
// bad_function_call::what() with a string that is specific to
// bad_function_call (see http://wg21.link/LWG2233). This is an ABI break
// because it changes the vtable layout of bad_function_call.
#    define _LIBCPP_ABI_BAD_FUNCTION_CALL_GOOD_WHAT_MESSAGE
// Enable optimized version of __do_get_(un)signed which avoids redundant copies.
#    define _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
// Give reverse_iterator<T> one data member of type T, not two.
// Also, in C++17 and later, don't derive iterator types from std::iterator.
#    define _LIBCPP_ABI_NO_ITERATOR_BASES
// Use the smallest possible integer type to represent the index of the variant.
// Previously libc++ used "unsigned int" exclusively.
#    define _LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION
// Unstable attempt to provide a more optimized std::function
#    define _LIBCPP_ABI_OPTIMIZED_FUNCTION
// All the regex constants must be distinct and nonzero.
#    define _LIBCPP_ABI_REGEX_CONSTANTS_NONZERO
// Re-worked external template instantiations for std::string with a focus on
// performance and fast-path inlining.
#    define _LIBCPP_ABI_STRING_OPTIMIZED_EXTERNAL_INSTANTIATION
// Enable clang::trivial_abi on std::unique_ptr.
#    define _LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI
// Enable clang::trivial_abi on std::shared_ptr and std::weak_ptr
#    define _LIBCPP_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI
// std::random_device holds some state when it uses an implementation that gets
// entropy from a file (see _LIBCPP_USING_DEV_RANDOM). When switching from this
// implementation to another one on a platform that has already shipped
// std::random_device, one needs to retain the same object layout to remain ABI
// compatible. This switch removes these workarounds for platforms that don't care
// about ABI compatibility.
#    define _LIBCPP_ABI_NO_RANDOM_DEVICE_COMPATIBILITY_LAYOUT
// Don't export the legacy __basic_string_common class and its methods from the built library.
#    define _LIBCPP_ABI_DO_NOT_EXPORT_BASIC_STRING_COMMON
// Don't export the legacy __vector_base_common class and its methods from the built library.
#    define _LIBCPP_ABI_DO_NOT_EXPORT_VECTOR_BASE_COMMON
// According to the Standard, `bitset::operator[] const` returns bool
#    define _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
// Fix the implementation of CityHash used for std::hash<fundamental-type>.
// This is an ABI break because `std::hash` will return a different result,
// which means that hashing the same object in translation units built against
// different versions of libc++ can return inconsistent results. This is especially
// tricky since std::hash is used in the implementation of unordered containers.
//
// The incorrect implementation of CityHash has the problem that it drops some
// bits on the floor.
#    define _LIBCPP_ABI_FIX_CITYHASH_IMPLEMENTATION
// Remove the base 10 implementation of std::to_chars from the dylib.
// The implementation moved to the header, but we still export the symbols from
// the dylib for backwards compatibility.
#    define _LIBCPP_ABI_DO_NOT_EXPORT_TO_CHARS_BASE_10
// Save memory by providing the allocator more freedom to allocate the most
// efficient size class by dropping the alignment requirements for std::string's
// pointer from 16 to 8. This changes the output of std::string::max_size,
// which makes it ABI breaking
#    define _LIBCPP_ABI_STRING_8_BYTE_ALIGNMENT
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif _LIBCPP_ABI_VERSION == 1
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 176 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#    if !(defined(_LIBCPP_OBJECT_FORMAT_COFF) || defined(_LIBCPP_OBJECT_FORMAT_XCOFF))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 177 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// Enable compiling copies of now inline methods into the dylib to support
// applications compiled against older libraries. This is unnecessary with
// COFF dllexport semantics, since dllexport forces a non-inline definition
// of inline functions to be emitted anyway. Our own non-inline copy would
// conflict with the dllexport-emitted copy, so we disable it. For XCOFF,
// the linker will take issue with the symbols in the shared object if the
// weak inline methods get visibility (such as from -fvisibility-inlines-hidden),
// so disable it.
#      define _LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS
#    endif
# 187 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// Feature macros for disabling pre ABI v1 features. All of these options
// are deprecated.
#if 0 /* disabled by -frewrite-includes */
#    if defined(__FreeBSD__) && __FreeBSD__ < 14
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
#    endif
# 192 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// For XCOFF linkers, we have problems if we see a weak hidden version of a symbol
// in user code (like you get with -fvisibility-inlines-hidden) and then a strong def
// in the library, so we need to always rely on the library version.
#if 0 /* disabled by -frewrite-includes */
#    if defined(_AIX)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 196 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
#    endif
# 198 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  endif
# 199 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_BUILDING_LIBRARY) || _LIBCPP_ABI_VERSION >= 2
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 201 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// Define a key function for `bad_function_call` in the library, to centralize
// its vtable and typeinfo to libc++ rather than having all other libraries
// using that class define their own copies.
#    define _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
#  endif
# 206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Changes the iterator type of select containers (see below) to a bounded iterator that keeps track of whether it's
// within the bounds of the original container and asserts it on every dereference.
//
// ABI impact: changes the iterator type of the relevant containers.
//
// Supported containers:
// - `span`;
// - `string_view`;
// - `array`.
// #define _LIBCPP_ABI_BOUNDED_ITERATORS

// } ABI

// HARDENING {

// TODO(hardening): deprecate this in LLVM 19.
// This is for backward compatibility -- make enabling `_LIBCPP_ENABLE_ASSERTIONS` (which predates hardening modes)
// equivalent to setting the safe mode.
#  ifdef _LIBCPP_ENABLE_ASSERTIONS
#if 0 /* disabled by -frewrite-includes */
#    if _LIBCPP_ENABLE_ASSERTIONS != 0 && _LIBCPP_ENABLE_ASSERTIONS != 1
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      error "_LIBCPP_ENABLE_ASSERTIONS must be set to 0 or 1"
#    endif
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#    if _LIBCPP_ENABLE_ASSERTIONS
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_ENABLE_SAFE_MODE 1
#    endif
# 232 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  endif
# 233 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Enables the hardened mode which consists of all checks intended to be used in production. Hardened mode prioritizes
// security-critical checks that can be done with relatively little overhead in constant time. Mutually exclusive with
// `_LIBCPP_ENABLE_SAFE_MODE` and `_LIBCPP_ENABLE_DEBUG_MODE`.
//
// #define _LIBCPP_ENABLE_HARDENED_MODE 1

// Enables the safe mode which extends the hardened mode with checks that are relatively cheap and prevent common types
// of errors but are not security-critical. Mutually exclusive with `_LIBCPP_ENABLE_HARDENED_MODE` and
// `_LIBCPP_ENABLE_DEBUG_MODE`.
//
// #define _LIBCPP_ENABLE_SAFE_MODE 1

// Enables the debug mode which contains all the checks from the hardened mode and additionally more expensive checks
// that may affect the complexity of algorithms. The debug mode is intended to be used for testing, not in production.
// Mutually exclusive with `_LIBCPP_ENABLE_HARDENED_MODE` and `_LIBCPP_ENABLE_SAFE_MODE`.
//
// #define _LIBCPP_ENABLE_DEBUG_MODE 1

// Inside the library, assertions are categorized so they can be cherry-picked based on the chosen hardening mode. These
// macros are only for internal use -- users should only pick one of the high-level hardening modes described above.
//
// - `_LIBCPP_ASSERT_VALID_INPUT_RANGE` -- checks that ranges (whether expressed as an iterator pair, an iterator and
//   a sentinel, an iterator and a count, or a `std::range`) given as input to library functions are valid:
//   - the sentinel is reachable from the begin iterator;
//   - TODO(hardening): both iterators refer to the same container.
//
// - `_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS` -- checks that any attempts to access a container element, whether through
//   the container object or through an iterator, are valid and do not attempt to go out of bounds or otherwise access
//   a non-existent element. For iterator checks to work, bounded iterators must be enabled in the ABI. Types like
//   `optional` and `function` are considered one-element containers for the purposes of this check.
//
// - `_LIBCPP_ASSERT_NON_OVERLAPPING_RANGES` -- for functions that take several ranges as arguments, checks that the
//   given ranges do not overlap.
//
// - `_LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR` -- checks any operations that exchange nodes between containers to make sure
//   the containers have compatible allocators.
//
// - `_LIBCPP_ASSERT_INTERNAL` -- checks that internal invariants of the library hold. These assertions don't depend on
//   user input.
//
// - `_LIBCPP_ASSERT_UNCATEGORIZED` -- for assertions that haven't been properly classified yet.

#  ifndef _LIBCPP_ENABLE_HARDENED_MODE
#    define _LIBCPP_ENABLE_HARDENED_MODE _LIBCPP_ENABLE_HARDENED_MODE_DEFAULT
#  endif
# 279 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_ENABLE_HARDENED_MODE != 0 && _LIBCPP_ENABLE_HARDENED_MODE != 1
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 280 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    error "_LIBCPP_ENABLE_HARDENED_MODE must be set to 0 or 1."
#  endif
# 282 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifndef _LIBCPP_ENABLE_SAFE_MODE
#    define _LIBCPP_ENABLE_SAFE_MODE _LIBCPP_ENABLE_SAFE_MODE_DEFAULT
#  endif
# 286 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_ENABLE_SAFE_MODE != 0 && _LIBCPP_ENABLE_SAFE_MODE != 1
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    error "_LIBCPP_ENABLE_SAFE_MODE must be set to 0 or 1."
#  endif
# 289 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifndef _LIBCPP_ENABLE_DEBUG_MODE
#    define _LIBCPP_ENABLE_DEBUG_MODE _LIBCPP_ENABLE_DEBUG_MODE_DEFAULT
#  endif
# 293 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_ENABLE_DEBUG_MODE != 0 && _LIBCPP_ENABLE_DEBUG_MODE != 1
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 294 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    error "_LIBCPP_ENABLE_DEBUG_MODE must be set to 0 or 1."
#  endif
# 296 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if (_LIBCPP_ENABLE_HARDENED_MODE && _LIBCPP_ENABLE_SAFE_MODE) ||                                                    \
      (_LIBCPP_ENABLE_HARDENED_MODE && _LIBCPP_ENABLE_DEBUG_MODE) ||                                                   \
      (_LIBCPP_ENABLE_SAFE_MODE && _LIBCPP_ENABLE_DEBUG_MODE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 300 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    error                                                                                                             \
        "Only one of _LIBCPP_ENABLE_HARDENED_MODE, _LIBCPP_ENABLE_SAFE_MODE and _LIBCPP_ENABLE_DEBUG_MODE can be enabled."
#  endif
# 303 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// clang-format off
// Hardened mode checks.

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_ENABLE_HARDENED_MODE
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 308 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Enabled checks.
#    define _LIBCPP_ASSERT_VALID_INPUT_RANGE(expression, message)        _LIBCPP_ASSERT(expression, message)
#    define _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(expression, message)     _LIBCPP_ASSERT(expression, message)
// Disabled checks.
// Overlapping ranges will make algorithms produce incorrect results but don't directly lead to a security
// vulnerability.
#    define _LIBCPP_ASSERT_NON_OVERLAPPING_RANGES(expression, message)   _LIBCPP_ASSUME(expression)
#    define _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(expression, message)     _LIBCPP_ASSUME(expression)
#    define _LIBCPP_ASSERT_INTERNAL(expression, message)                 _LIBCPP_ASSUME(expression)
#    define _LIBCPP_ASSERT_UNCATEGORIZED(expression, message)            _LIBCPP_ASSUME(expression)

// Safe mode checks.

#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif _LIBCPP_ENABLE_SAFE_MODE
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 323 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Enabled checks.
#    define _LIBCPP_ASSERT_VALID_INPUT_RANGE(expression, message)        _LIBCPP_ASSERT(expression, message)
#    define _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(expression, message)     _LIBCPP_ASSERT(expression, message)
#    define _LIBCPP_ASSERT_NON_OVERLAPPING_RANGES(expression, message)   _LIBCPP_ASSERT(expression, message)
#    define _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(expression, message)     _LIBCPP_ASSERT(expression, message)
#    define _LIBCPP_ASSERT_UNCATEGORIZED(expression, message)            _LIBCPP_ASSERT(expression, message)
// Disabled checks.
#    define _LIBCPP_ASSERT_INTERNAL(expression, message)                 _LIBCPP_ASSUME(expression)

// Debug mode checks.

#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif _LIBCPP_ENABLE_DEBUG_MODE
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 336 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// All checks enabled.
#    define _LIBCPP_ASSERT_VALID_INPUT_RANGE(expression, message)         _LIBCPP_ASSERT(expression, message)
#    define _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(expression, message)      _LIBCPP_ASSERT(expression, message)
#    define _LIBCPP_ASSERT_NON_OVERLAPPING_RANGES(expression, message)    _LIBCPP_ASSERT(expression, message)
#    define _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(expression, message)      _LIBCPP_ASSERT(expression, message)
#    define _LIBCPP_ASSERT_INTERNAL(expression, message)                  _LIBCPP_ASSERT(expression, message)
#    define _LIBCPP_ASSERT_UNCATEGORIZED(expression, message)             _LIBCPP_ASSERT(expression, message)

// Disable all checks if hardening is not enabled.

#  else
# 348 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// All checks disabled.
#    define _LIBCPP_ASSERT_VALID_INPUT_RANGE(expression, message)         _LIBCPP_ASSUME(expression)
#    define _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(expression, message)      _LIBCPP_ASSUME(expression)
#    define _LIBCPP_ASSERT_NON_OVERLAPPING_RANGES(expression, message)    _LIBCPP_ASSUME(expression)
#    define _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(expression, message)      _LIBCPP_ASSUME(expression)
#    define _LIBCPP_ASSERT_INTERNAL(expression, message)                  _LIBCPP_ASSUME(expression)
#    define _LIBCPP_ASSERT_UNCATEGORIZED(expression, message)             _LIBCPP_ASSUME(expression)

#  endif // _LIBCPP_ENABLE_HARDENED_MODE
# 358 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// clang-format on

// } HARDENING

#  define _LIBCPP_TOSTRING2(x) #x
#  define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x)

// NOLINTNEXTLINE(libcpp-cpp-version-check)
#if 0 /* disabled by -frewrite-includes */
#  if __cplusplus < 201103L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 367 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_CXX03_LANG
#  endif
# 369 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifndef __has_attribute
#    define __has_attribute(__x) 0
#  endif
# 373 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifndef __has_builtin
#    define __has_builtin(__x) 0
#  endif
# 377 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifndef __has_extension
#    define __has_extension(__x) 0
#  endif
# 381 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifndef __has_feature
#    define __has_feature(__x) 0
#  endif
# 385 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifndef __has_cpp_attribute
#    define __has_cpp_attribute(__x) 0
#  endif
# 389 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifndef __has_constexpr_builtin
#    define __has_constexpr_builtin(x) 0
#  endif
# 393 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// '__is_identifier' returns '0' if '__x' is a reserved identifier provided by
// the compiler and '1' otherwise.
#  ifndef __is_identifier
#    define __is_identifier(__x) 1
#  endif
# 399 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifndef __has_declspec_attribute
#    define __has_declspec_attribute(__x) 0
#  endif
# 403 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  define __has_keyword(__x) !(__is_identifier(__x))

#  ifndef __has_include
#    define __has_include(...) 0
#  endif
# 409 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if !defined(_LIBCPP_COMPILER_CLANG_BASED) && __cplusplus < 201103L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 411 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    error "libc++ only supports C++03 with Clang-based compilers. Please enable C++11"
#  endif
# 413 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// FIXME: ABI detection should be done via compiler builtin macros. This
// is just a placeholder until Clang implements such macros. For now assume
// that Windows compilers pretending to be MSVC++ target the Microsoft ABI,
// and allow the user to explicitly specify the ABI to handle cases where this
// heuristic falls short.
#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_ABI_FORCE_ITANIUM) && defined(_LIBCPP_ABI_FORCE_MICROSOFT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 420 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    error "Only one of _LIBCPP_ABI_FORCE_ITANIUM and _LIBCPP_ABI_FORCE_MICROSOFT can be defined"
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(_LIBCPP_ABI_FORCE_ITANIUM)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 422 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_ABI_ITANIUM
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(_LIBCPP_ABI_FORCE_MICROSOFT)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 424 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_ABI_MICROSOFT
#  else
# 426 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#    if defined(_WIN32) && defined(_MSC_VER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 427 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_ABI_MICROSOFT
#    else
# 429 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_ABI_ITANIUM
#    endif
# 431 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  endif
# 432 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 434 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_ABI_VCRUNTIME
#  endif
# 436 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_feature(experimental_library)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    ifndef _LIBCPP_ENABLE_EXPERIMENTAL
#      define _LIBCPP_ENABLE_EXPERIMENTAL
#    endif
# 441 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  endif
# 442 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Incomplete features get their own specific disabling flags. This makes it
// easier to grep for target specific flags once the feature is complete.
#if 0 /* disabled by -frewrite-includes */
#  if !defined(_LIBCPP_ENABLE_EXPERIMENTAL) && !defined(_LIBCPP_BUILDING_LIBRARY)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 446 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HAS_NO_INCOMPLETE_PSTL
#    define _LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN
#    define _LIBCPP_HAS_NO_INCOMPLETE_TZDB
#  endif
# 450 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Need to detect which libc we're using if we're on Linux.
#if 0 /* disabled by -frewrite-includes */
#  if defined(__linux__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 453 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* expanded by -frewrite-includes */
#    include <features.h>
#endif /* expanded by -frewrite-includes */
# 453 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
# 454 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#    if defined(__GLIBC_PREREQ)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 455 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)
#    else
# 457 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_GLIBC_PREREQ(a, b) 0
#    endif // defined(__GLIBC_PREREQ)
# 459 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  endif   // defined(__linux__)
# 460 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(__MVS__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 462 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* expanded by -frewrite-includes */
#    include <features.h> // for __NATIVE_ASCII_F
#endif /* expanded by -frewrite-includes */
# 462 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
# 463 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  endif
# 464 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifndef __BYTE_ORDER__
#    error                                                                                                             \
        "Your compiler doesn't seem to define __BYTE_ORDER__, which is required by libc++ to know the endianness of your target platform"
#  endif
# 469 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 471 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_LITTLE_ENDIAN
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 473 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_BIG_ENDIAN
#  endif // __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
# 475 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_WIN32)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 477 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_WIN32API
#    define _LIBCPP_SHORT_WCHAR 1
// Both MinGW and native MSVC provide a "MSVC"-like environment
#    define _LIBCPP_MSVCRT_LIKE
// If mingw not explicitly detected, assume using MS C runtime only if
// a MS compatibility version is specified.
#if 0 /* disabled by -frewrite-includes */
#    if defined(_MSC_VER) && !defined(__MINGW32__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 484 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library
#    endif
# 486 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#    if (defined(_M_AMD64) || defined(__x86_64__)) || (defined(_M_ARM) || defined(__arm__))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 487 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_HAS_BITSCAN64
#    endif
# 489 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HAS_OPEN_WITH_WCHAR
#  endif // defined(_WIN32)
# 491 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_AIX) && !defined(__64BIT__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 493 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// The size of wchar is 2 byte on 32-bit mode on AIX.
#    define _LIBCPP_SHORT_WCHAR 1
#  endif
# 496 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Libc++ supports various implementations of std::random_device.
//
// _LIBCPP_USING_DEV_RANDOM
//      Read entropy from the given file, by default `/dev/urandom`.
//      If a token is provided, it is assumed to be the path to a file
//      to read entropy from. This is the default behavior if nothing
//      else is specified. This implementation requires storing state
//      inside `std::random_device`.
//
// _LIBCPP_USING_ARC4_RANDOM
//      Use arc4random(). This allows obtaining random data even when
//      using sandboxing mechanisms. On some platforms like Apple, this
//      is the recommended source of entropy for user-space programs.
//      When this option is used, the token passed to `std::random_device`'s
//      constructor *must* be "/dev/urandom" -- anything else is an error.
//
// _LIBCPP_USING_GETENTROPY
//      Use getentropy().
//      When this option is used, the token passed to `std::random_device`'s
//      constructor *must* be "/dev/urandom" -- anything else is an error.
//
// _LIBCPP_USING_FUCHSIA_CPRNG
//      Use Fuchsia's zx_cprng_draw() system call, which is specified to
//      deliver high-quality entropy and cannot fail.
//      When this option is used, the token passed to `std::random_device`'s
//      constructor *must* be "/dev/urandom" -- anything else is an error.
//
// _LIBCPP_USING_NACL_RANDOM
//      NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access,
//      including accesses to the special files under `/dev`. This implementation
//      uses the NaCL syscall `nacl_secure_random_init()` to get entropy.
//      When this option is used, the token passed to `std::random_device`'s
//      constructor *must* be "/dev/urandom" -- anything else is an error.
//
// _LIBCPP_USING_WIN32_RANDOM
//      Use rand_s(), for use on Windows.
//      When this option is used, the token passed to `std::random_device`'s
//      constructor *must* be "/dev/urandom" -- anything else is an error.
#if 0 /* disabled by -frewrite-includes */
#  if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ||                     \
      defined(__DragonFly__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_USING_ARC4_RANDOM
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(__wasi__) || defined(__EMSCRIPTEN__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 539 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_USING_GETENTROPY
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(__Fuchsia__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 541 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_USING_FUCHSIA_CPRNG
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(__native_client__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 543 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_USING_NACL_RANDOM
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(_LIBCPP_WIN32API)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 545 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_USING_WIN32_RANDOM
#  else
# 547 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_USING_DEV_RANDOM
#  endif
# 549 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_attribute(__no_sanitize__) && !defined(_LIBCPP_COMPILER_GCC)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 551 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NO_CFI __attribute__((__no_sanitize__("cfi")))
#  else
# 553 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NO_CFI
#  endif
# 555 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifndef _LIBCPP_CXX03_LANG

#    define _LIBCPP_ALIGNOF(_Tp) alignof(_Tp)
#    define _ALIGNAS_TYPE(x) alignas(x)
#    define _ALIGNAS(x) alignas(x)
#    define _LIBCPP_NORETURN [[noreturn]]
#    define _NOEXCEPT noexcept
#    define _NOEXCEPT_(x) noexcept(x)
#    define _LIBCPP_CONSTEXPR constexpr

#  else
# 567 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#    define _LIBCPP_ALIGNOF(_Tp) _Alignof(_Tp)
#    define _ALIGNAS_TYPE(x) __attribute__((__aligned__(_LIBCPP_ALIGNOF(x))))
#    define _ALIGNAS(x) __attribute__((__aligned__(x)))
#    define _LIBCPP_NORETURN __attribute__((__noreturn__))
#    define _LIBCPP_HAS_NO_NOEXCEPT
#    define nullptr __nullptr
#    define _NOEXCEPT throw()
#    define _NOEXCEPT_(x)
#    define static_assert(...) _Static_assert(__VA_ARGS__)
#    define decltype(...) __decltype(__VA_ARGS__)
#    define _LIBCPP_CONSTEXPR

typedef __char16_t char16_t;
typedef __char32_t char32_t;

#  endif
# 584 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if !defined(__cpp_exceptions) || __cpp_exceptions < 199711L
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 586 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HAS_NO_EXCEPTIONS
#  endif
# 588 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  define _LIBCPP_PREFERRED_ALIGNOF(_Tp) __alignof(_Tp)

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_COMPILER_CLANG_BASED)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 592 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#    if defined(__APPLE__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 594 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#      if defined(__i386__) || defined(__x86_64__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 595 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// use old string layout on x86_64 and i386
#if 0 /* disabled by -frewrite-includes */
#if 0
#      elif defined(__arm__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 597 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// use old string layout on arm (which does not include aarch64/arm64), except on watch ABIs
#if 0 /* disabled by -frewrite-includes */
#        if defined(__ARM_ARCH_7K__) && __ARM_ARCH_7K__ >= 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 599 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#          define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
#        endif
# 601 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      else
# 602 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#        define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
#      endif
# 604 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    endif
# 605 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Objective-C++ features (opt-in)
#if 0 /* disabled by -frewrite-includes */
#    if __has_feature(objc_arc)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 608 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_HAS_OBJC_ARC
#    endif
# 610 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#    if __has_feature(objc_arc_weak)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 612 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_HAS_OBJC_ARC_WEAK
#    endif
# 614 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#    if __has_extension(blocks)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 616 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_HAS_EXTENSION_BLOCKS
#    endif
# 618 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#    if defined(_LIBCPP_HAS_EXTENSION_BLOCKS) && defined(__APPLE__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 620 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_HAS_BLOCKS_RUNTIME
#    endif
# 622 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#    if !__has_feature(address_sanitizer)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 624 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_HAS_NO_ASAN
#    endif
# 626 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Allow for build-time disabling of unsigned integer sanitization
#if 0 /* disabled by -frewrite-includes */
#    if __has_attribute(no_sanitize)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 629 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__((__no_sanitize__("unsigned-integer-overflow")))
#    endif
# 631 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#    define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__))

#    define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__

#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(_LIBCPP_COMPILER_GCC)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 637 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#    if !defined(__SANITIZE_ADDRESS__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 639 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_HAS_NO_ASAN
#    endif
# 641 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#    define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__))

#    define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__

#  endif // _LIBCPP_COMPILER_[CLANG|GCC]
# 647 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_OBJECT_FORMAT_COFF)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 649 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#    ifdef _DLL
#      define _LIBCPP_CRT_FUNC __declspec(dllimport)
#    else
# 653 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_CRT_FUNC
#    endif
# 655 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#    if defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) || (defined(__MINGW32__) && !defined(_LIBCPP_BUILDING_LIBRARY))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 657 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_DLL_VIS
#      define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
#      define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
#      define _LIBCPP_OVERRIDABLE_FUNC_VIS
#      define _LIBCPP_EXPORTED_FROM_ABI
#if 0 /* disabled by -frewrite-includes */
#if 0
#    elif defined(_LIBCPP_BUILDING_LIBRARY)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 663 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_DLL_VIS __declspec(dllexport)
#if 0 /* disabled by -frewrite-includes */
#      if defined(__MINGW32__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 665 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#        define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_DLL_VIS
#        define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
#      else
# 668 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#        define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
#        define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS _LIBCPP_DLL_VIS
#      endif
# 671 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_DLL_VIS
#      define _LIBCPP_EXPORTED_FROM_ABI __declspec(dllexport)
#    else
# 674 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_DLL_VIS __declspec(dllimport)
#      define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_DLL_VIS
#      define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
#      define _LIBCPP_OVERRIDABLE_FUNC_VIS
#      define _LIBCPP_EXPORTED_FROM_ABI __declspec(dllimport)
#    endif
# 680 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#    define _LIBCPP_HIDDEN
#    define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
#    define _LIBCPP_TEMPLATE_VIS
#    define _LIBCPP_TEMPLATE_DATA_VIS
#    define _LIBCPP_TYPE_VISIBILITY_DEFAULT

#  else
# 688 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#    if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 690 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_VISIBILITY(vis) __attribute__((__visibility__(vis)))
#    else
# 692 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_VISIBILITY(vis)
#    endif
# 694 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#    define _LIBCPP_HIDDEN _LIBCPP_VISIBILITY("hidden")
#    define _LIBCPP_TEMPLATE_DATA_VIS _LIBCPP_VISIBILITY("default")
#    define _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_VISIBILITY("default")
#    define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_VISIBILITY("default")
#    define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS

// TODO: Make this a proper customization point or remove the option to override it.
#    ifndef _LIBCPP_OVERRIDABLE_FUNC_VIS
#      define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_VISIBILITY("default")
#    endif
# 705 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#    if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 707 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// The inline should be removed once PR32114 is resolved
#      define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS inline _LIBCPP_HIDDEN
#    else
# 710 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
#    endif
# 712 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// GCC doesn't support the type_visibility attribute, so we have to keep the visibility attribute on templates
#if 0 /* disabled by -frewrite-includes */
#    if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && !__has_attribute(__type_visibility__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 715 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_TEMPLATE_VIS __attribute__((__visibility__("default")))
#    else
# 717 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_TEMPLATE_VIS
#    endif
# 719 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#    if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 721 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_TYPE_VISIBILITY_DEFAULT __attribute__((__type_visibility__("default")))
#    else
# 723 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_TYPE_VISIBILITY_DEFAULT
#    endif
# 725 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  endif // defined(_LIBCPP_OBJECT_FORMAT_COFF)
# 727 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_attribute(exclude_from_explicit_instantiation)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 729 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION __attribute__((__exclude_from_explicit_instantiation__))
#  else
# 731 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// Try to approximate the effect of exclude_from_explicit_instantiation
// (which is that entities are not assumed to be provided by explicit
// template instantiations in the dylib) by always inlining those entities.
#    define _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION _LIBCPP_ALWAYS_INLINE
#  endif
# 736 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// This macro marks a symbol as being hidden from libc++'s ABI. This is achieved
// on two levels:
// 1. The symbol is given hidden visibility, which ensures that users won't start exporting
//    symbols from their dynamic library by means of using the libc++ headers. This ensures
//    that those symbols stay private to the dynamic library in which it is defined.
//
// 2. The symbol is given an ABI tag that changes with each version of libc++. This ensures
//    that no ODR violation can arise from mixing two TUs compiled with different versions
//    of libc++ where we would have changed the definition of a symbol. If the symbols shared
//    the same name, the ODR would require that their definitions be token-by-token equivalent,
//    which basically prevents us from being able to make any change to any function in our
//    headers. Using this ABI tag ensures that the symbol name is "bumped" artificially at
//    each release, which lets us change the definition of these symbols at our leisure.
//    Note that historically, this has been achieved in various ways, including force-inlining
//    all functions or giving internal linkage to all functions. Both these (previous) solutions
//    suffer from drawbacks that lead notably to code bloat.
//
// Note that we use _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION to ensure that we don't depend
// on _LIBCPP_HIDE_FROM_ABI methods of classes explicitly instantiated in the dynamic library.
//
// Also note that the _LIBCPP_HIDE_FROM_ABI_VIRTUAL macro should be used on virtual functions
// instead of _LIBCPP_HIDE_FROM_ABI. That macro does not use an ABI tag. Indeed, the mangled
// name of a virtual function is part of its ABI, since some architectures like arm64e can sign
// the virtual function pointer in the vtable based on the mangled name of the function. Since
// we use an ABI tag that changes with each released version, the mangled name of the virtual
// function would change, which is incorrect. Note that it doesn't make much sense to change
// the implementation of a virtual function in an ABI-incompatible way in the first place,
// since that would be an ABI break anyway. Hence, the lack of ABI tag should not be noticeable.
//
// TODO: We provide a escape hatch with _LIBCPP_NO_ABI_TAG for folks who want to avoid increasing
//       the length of symbols with an ABI tag. In practice, we should remove the escape hatch and
//       use compression mangling instead, see https://github.com/itanium-cxx-abi/cxx-abi/issues/70.
#  ifndef _LIBCPP_NO_ABI_TAG
#    define _LIBCPP_HIDE_FROM_ABI                                                                                      \
      _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION                                                       \
          __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_VERSIONED_IDENTIFIER))))
#  else
# 774 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION
#  endif
# 776 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  define _LIBCPP_HIDE_FROM_ABI_VIRTUAL _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION

// This macro provides a HIDE_FROM_ABI equivalent that can be applied to extern
// "C" function, as those lack mangling.
#  define _LIBCPP_HIDE_FROM_ABI_C _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION

#  ifdef _LIBCPP_BUILDING_LIBRARY
#if 0 /* disabled by -frewrite-includes */
#    if _LIBCPP_ABI_VERSION > 1
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 784 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_HIDE_FROM_ABI_AFTER_V1 _LIBCPP_HIDE_FROM_ABI
#    else
# 786 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_HIDE_FROM_ABI_AFTER_V1
#    endif
# 788 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  else
# 789 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HIDE_FROM_ABI_AFTER_V1 _LIBCPP_HIDE_FROM_ABI
#  endif
# 791 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Just so we can migrate to the new macros gradually.
#  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI

// Inline namespaces are available in Clang/GCC/MSVC regardless of C++ dialect.
// clang-format off
#  define _LIBCPP_BEGIN_NAMESPACE_STD namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                               inline namespace _LIBCPP_ABI_NAMESPACE {
#  define _LIBCPP_END_NAMESPACE_STD }}
#  define _VSTD std

_LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 805 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM                                                                         \
       _LIBCPP_BEGIN_NAMESPACE_STD inline namespace __fs { namespace filesystem {
#  else
# 808 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM                                                                         \
      _LIBCPP_BEGIN_NAMESPACE_STD namespace __fs { namespace filesystem {
#  endif
# 811 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  define _LIBCPP_END_NAMESPACE_FILESYSTEM _LIBCPP_END_NAMESPACE_STD }}
// clang-format on

#  define _VSTD_FS std::__fs::filesystem

#if 0 /* disabled by -frewrite-includes */
#  if __has_attribute(__enable_if__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 818 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_PREFERRED_OVERLOAD __attribute__((__enable_if__(true, "")))
#  endif
# 820 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if !defined(__SIZEOF_INT128__) || defined(_MSC_VER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 822 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HAS_NO_INT128
#  endif
# 824 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_attribute(__malloc__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 826 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NOALIAS __attribute__((__malloc__))
#  else
# 828 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NOALIAS
#  endif
# 830 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_attribute(__using_if_exists__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 832 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_USING_IF_EXISTS __attribute__((__using_if_exists__))
#  else
# 834 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_USING_IF_EXISTS
#  endif
# 836 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifdef _LIBCPP_CXX03_LANG
#    define _LIBCPP_DECLARE_STRONG_ENUM(x)                                                                             \
      struct _LIBCPP_EXPORTED_FROM_ABI x {                                                                             \
        enum __lx
// clang-format off
#    define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x)                                                                      \
      __lx __v_;                                                                                                       \
      _LIBCPP_INLINE_VISIBILITY x(__lx __v) : __v_(__v) {}                                                             \
      _LIBCPP_INLINE_VISIBILITY explicit x(int __v) : __v_(static_cast<__lx>(__v)) {}                                  \
      _LIBCPP_INLINE_VISIBILITY operator int() const { return __v_; }                                                  \
      };
// clang-format on

#  else // _LIBCPP_CXX03_LANG
# 851 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class x
#    define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x)
#  endif // _LIBCPP_CXX03_LANG
# 854 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(__APPLE__) || defined(__FreeBSD__) || defined(_LIBCPP_MSVCRT_LIKE) || defined(__NetBSD__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 856 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_LOCALE__L_EXTENSIONS 1
#  endif
# 858 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifdef __FreeBSD__
#    define _DECLARE_C99_LDBL_MATH 1
#  endif
# 862 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// If we are getting operator new from the MSVC CRT, then allocation overloads
// for align_val_t were added in 19.12, aka VS 2017 version 15.3.
#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_MSVCRT) && defined(_MSC_VER) && _MSC_VER < 1912
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 866 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(_LIBCPP_ABI_VCRUNTIME) && !defined(__cpp_aligned_new)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 868 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// We're deferring to Microsoft's STL to provide aligned new et al. We don't
// have it unless the language feature test macro is defined.
#    define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(__MVS__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 872 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
#  endif
# 874 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) || (!defined(__cpp_aligned_new) || __cpp_aligned_new < 201606)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 876 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
#  endif
# 878 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// It is not yet possible to use aligned_alloc() on all Apple platforms since
// 10.15 was the first version to ship an implementation of aligned_alloc().
#if 0 /* disabled by -frewrite-includes */
#  if defined(__APPLE__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 882 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#    if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) &&                                                     \
         __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 884 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC
#    endif
# 886 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(__ANDROID__) && __ANDROID_API__ < 28
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 887 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// Android only provides aligned_alloc when targeting API 28 or higher.
#    define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC
#  endif
# 890 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(__APPLE__) || defined(__FreeBSD__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 892 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HAS_DEFAULTRUNELOCALE
#  endif
# 894 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(__APPLE__) || defined(__FreeBSD__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 896 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_WCTYPE_IS_MASK
#  endif
# 898 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER <= 17 || !defined(__cpp_char8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 900 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HAS_NO_CHAR8_T
#  endif
# 902 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Deprecation macros.
//
// Deprecations warnings are always enabled, except when users explicitly opt-out
// by defining _LIBCPP_DISABLE_DEPRECATION_WARNINGS.
#if 0 /* disabled by -frewrite-includes */
#  if !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 908 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#    if __has_attribute(__deprecated__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 909 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
#      define _LIBCPP_DEPRECATED_(m) __attribute__((__deprecated__(m)))
#if 0 /* disabled by -frewrite-includes */
#if 0
#    elif _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 912 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_DEPRECATED [[deprecated]]
#      define _LIBCPP_DEPRECATED_(m) [[deprecated(m)]]
#    else
# 915 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_DEPRECATED
#      define _LIBCPP_DEPRECATED_(m)
#    endif
# 918 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  else
# 919 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DEPRECATED
#    define _LIBCPP_DEPRECATED_(m)
#  endif
# 922 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if !defined(_LIBCPP_CXX03_LANG)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 924 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
#  else
# 926 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DEPRECATED_IN_CXX11
#  endif
# 928 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 930 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DEPRECATED_IN_CXX14 _LIBCPP_DEPRECATED
#  else
# 932 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DEPRECATED_IN_CXX14
#  endif
# 934 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 936 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
#  else
# 938 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DEPRECATED_IN_CXX17
#  endif
# 940 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 942 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_DEPRECATED
#  else
# 944 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DEPRECATED_IN_CXX20
#  endif
# 946 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 948 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_DEPRECATED
#  else
# 950 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DEPRECATED_IN_CXX23
#  endif
# 952 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if !defined(_LIBCPP_HAS_NO_CHAR8_T)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 954 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DEPRECATED_WITH_CHAR8_T _LIBCPP_DEPRECATED
#  else
# 956 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DEPRECATED_WITH_CHAR8_T
#  endif
# 958 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Macros to enter and leave a state where deprecation warnings are suppressed.
#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_COMPILER_CLANG_BASED) || defined(_LIBCPP_COMPILER_GCC)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 961 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_SUPPRESS_DEPRECATED_PUSH                                                                           \
      _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wdeprecated\"")                                \
          _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
#    define _LIBCPP_SUPPRESS_DEPRECATED_POP _Pragma("GCC diagnostic pop")
#  else
# 966 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_SUPPRESS_DEPRECATED_PUSH
#    define _LIBCPP_SUPPRESS_DEPRECATED_POP
#  endif
# 969 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER <= 11
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 971 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_EXPLICIT_SINCE_CXX14
#  else
# 973 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_EXPLICIT_SINCE_CXX14 explicit
#  endif
# 975 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 977 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_EXPLICIT_SINCE_CXX23 explicit
#  else
# 979 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_EXPLICIT_SINCE_CXX23
#  endif
# 981 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 983 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_CONSTEXPR_SINCE_CXX14 constexpr
#  else
# 985 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_CONSTEXPR_SINCE_CXX14
#  endif
# 987 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 989 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_CONSTEXPR_SINCE_CXX17 constexpr
#  else
# 991 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_CONSTEXPR_SINCE_CXX17
#  endif
# 993 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 995 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_CONSTEXPR_SINCE_CXX20 constexpr
#  else
# 997 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_CONSTEXPR_SINCE_CXX20
#  endif
# 999 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1001 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_CONSTEXPR_SINCE_CXX23 constexpr
#  else
# 1003 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_CONSTEXPR_SINCE_CXX23
#  endif
# 1005 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_cpp_attribute(nodiscard)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1007 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NODISCARD [[__nodiscard__]]
#  else
# 1009 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// We can't use GCC's [[gnu::warn_unused_result]] and
// __attribute__((warn_unused_result)), because GCC does not silence them via
// (void) cast.
#    define _LIBCPP_NODISCARD
#  endif
# 1014 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// _LIBCPP_NODISCARD_EXT may be used to apply [[nodiscard]] to entities not
// specified as such as an extension.
#if 0 /* disabled by -frewrite-includes */
#  if !defined(_LIBCPP_DISABLE_NODISCARD_EXT)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1018 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NODISCARD_EXT _LIBCPP_NODISCARD
#  else
# 1020 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NODISCARD_EXT
#  endif
# 1022 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 20 || !defined(_LIBCPP_DISABLE_NODISCARD_EXT)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1024 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_NODISCARD
#  else
# 1026 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NODISCARD_AFTER_CXX17
#  endif
# 1028 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_attribute(__no_destroy__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1030 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NO_DESTROY __attribute__((__no_destroy__))
#  else
# 1032 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NO_DESTROY
#  endif
# 1034 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifndef _LIBCPP_HAS_NO_ASAN
    extern "C" _LIBCPP_EXPORTED_FROM_ABI void
    __sanitizer_annotate_contiguous_container(const void*, const void*, const void*, const void*);
#if 0 /* disabled by -frewrite-includes */
#    if _LIBCPP_CLANG_VER >= 1600
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1039 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
extern "C" _LIBCPP_EXPORTED_FROM_ABI void __sanitizer_annotate_double_ended_contiguous_container(
    const void*, const void*, const void*, const void*, const void*, const void*);
extern "C" _LIBCPP_EXPORTED_FROM_ABI int
__sanitizer_verify_double_ended_contiguous_container(const void*, const void*, const void*, const void*);
#    endif
# 1044 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  endif
# 1045 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Try to find out if RTTI is disabled.
#if 0 /* disabled by -frewrite-includes */
#  if !defined(__cpp_rtti) || __cpp_rtti < 199711L
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1048 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HAS_NO_RTTI
#  endif
# 1050 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifndef _LIBCPP_WEAK
#    define _LIBCPP_WEAK __attribute__((__weak__))
#  endif
# 1054 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Thread API
// clang-format off
#if 0 /* disabled by -frewrite-includes */
#  if !defined(_LIBCPP_HAS_NO_THREADS) &&                                                                              \
      !defined(_LIBCPP_HAS_THREAD_API_PTHREAD) &&                                                                      \
      !defined(_LIBCPP_HAS_THREAD_API_WIN32) &&                                                                        \
      !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1061 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#    if defined(__FreeBSD__) ||                                                                                        \
        defined(__wasi__) ||                                                                                           \
        defined(__NetBSD__) ||                                                                                         \
        defined(__OpenBSD__) ||                                                                                        \
        defined(__NuttX__) ||                                                                                          \
        defined(__linux__) ||                                                                                          \
        defined(__GNU__) ||                                                                                            \
        defined(__APPLE__) ||                                                                                          \
        defined(__MVS__) ||                                                                                            \
        defined(_AIX) ||                                                                                               \
        defined(__EMSCRIPTEN__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1073 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// clang-format on
#      define _LIBCPP_HAS_THREAD_API_PTHREAD
#if 0 /* disabled by -frewrite-includes */
#if 0
#    elif defined(__Fuchsia__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 1076 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// TODO(44575): Switch to C11 thread API when possible.
#      define _LIBCPP_HAS_THREAD_API_PTHREAD
#if 0 /* disabled by -frewrite-includes */
#if 0
#    elif defined(_LIBCPP_WIN32API)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 1079 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_HAS_THREAD_API_WIN32
#    else
# 1081 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      error "No thread API"
#    endif // _LIBCPP_HAS_THREAD_API
# 1083 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  endif   // _LIBCPP_HAS_NO_THREADS
# 1084 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1086 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#    if defined(__ANDROID__) && __ANDROID_API__ >= 30
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1087 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_HAS_COND_CLOCKWAIT
#if 0 /* disabled by -frewrite-includes */
#if 0
#    elif defined(_LIBCPP_GLIBC_PREREQ)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 1089 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#      if _LIBCPP_GLIBC_PREREQ(2, 30)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1090 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#        define _LIBCPP_HAS_COND_CLOCKWAIT
#      endif
# 1092 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    endif
# 1093 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  endif
# 1094 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_HAS_NO_THREADS) && defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1096 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    error _LIBCPP_HAS_THREAD_API_PTHREAD may only be defined when \
       _LIBCPP_HAS_NO_THREADS is not defined.
#  endif
# 1099 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_HAS_NO_THREADS) && defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    error _LIBCPP_HAS_THREAD_API_EXTERNAL may not be defined when \
       _LIBCPP_HAS_NO_THREADS is defined.
#  endif
# 1104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK) && !defined(_LIBCPP_HAS_NO_THREADS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    error _LIBCPP_HAS_NO_MONOTONIC_CLOCK may only be defined when \
       _LIBCPP_HAS_NO_THREADS is defined.
#  endif
# 1109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(__STDCPP_THREADS__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define __STDCPP_THREADS__ 1
#  endif
# 1113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// The glibc and Bionic implementation of pthreads implements
// pthread_mutex_destroy as nop for regular mutexes. Additionally, Win32
// mutexes have no destroy mechanism.
//
// This optimization can't be performed on Apple platforms, where
// pthread_mutex_destroy can allow the kernel to release resources.
// See https://llvm.org/D64298 for details.
//
// TODO(EricWF): Enable this optimization on Bionic after speaking to their
//               respective stakeholders.
// clang-format off
#if 0 /* disabled by -frewrite-includes */
#  if (defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && defined(__GLIBC__)) ||                                               \
      (defined(_LIBCPP_HAS_THREAD_API_C11) && defined(__Fuchsia__)) ||                                                 \
       defined(_LIBCPP_HAS_THREAD_API_WIN32)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// clang-format on
#    define _LIBCPP_HAS_TRIVIAL_MUTEX_DESTRUCTION
#  endif
# 1131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Destroying a condvar is a nop on Windows.
//
// This optimization can't be performed on Apple platforms, where
// pthread_cond_destroy can allow the kernel to release resources.
// See https://llvm.org/D64298 for details.
//
// TODO(EricWF): This is potentially true for some pthread implementations
// as well.
#if 0 /* disabled by -frewrite-includes */
#  if (defined(_LIBCPP_HAS_THREAD_API_C11) && defined(__Fuchsia__)) || defined(_LIBCPP_HAS_THREAD_API_WIN32)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1141 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HAS_TRIVIAL_CONDVAR_DESTRUCTION
#  endif
# 1143 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Some systems do not provide gets() in their C library, for security reasons.
#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_MSVCRT) || (defined(__FreeBSD_version) && __FreeBSD_version >= 1300043) || defined(__OpenBSD__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_C_HAS_NO_GETS
#  endif
# 1148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(__BIONIC__) || defined(__NuttX__) || defined(__Fuchsia__) || defined(__wasi__) ||                        \
      defined(_LIBCPP_HAS_MUSL_LIBC) || defined(__OpenBSD__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1151 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
#  endif
# 1153 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_feature(cxx_atomic) || __has_extension(c_atomic) || __has_keyword(_Atomic)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1155 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HAS_C_ATOMIC_IMP
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(_LIBCPP_COMPILER_GCC)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 1157 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HAS_GCC_ATOMIC_IMP
#  endif
# 1159 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if !defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_GCC_ATOMIC_IMP) &&                                    \
      !defined(_LIBCPP_HAS_EXTERNAL_ATOMIC_IMP)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HAS_NO_ATOMIC_HEADER
#  else
# 1164 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    ifndef _LIBCPP_ATOMIC_FLAG_TYPE
#      define _LIBCPP_ATOMIC_FLAG_TYPE bool
#    endif
# 1167 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    ifdef _LIBCPP_FREESTANDING
#      define _LIBCPP_ATOMIC_ONLY_USE_BUILTINS
#    endif
# 1170 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  endif
# 1171 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifndef _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
#    define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
#  endif
# 1175 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(__FreeBSD__) && defined(__clang__) && __has_attribute(__no_thread_safety_analysis__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1177 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS __attribute__((__no_thread_safety_analysis__))
#  else
# 1179 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
#  endif
# 1181 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1183 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#    if defined(__clang__) && __has_attribute(acquire_capability)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1184 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// Work around the attribute handling in clang.  When both __declspec and
// __attribute__ are present, the processing goes awry preventing the definition
// of the types. In MinGW mode, __declspec evaluates to __attribute__, and thus
// combining the two does work.
#if 0 /* disabled by -frewrite-includes */
#      if !defined(_MSC_VER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1189 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#        define _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
#      endif
# 1191 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    endif
# 1192 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  endif
# 1193 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifdef _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
#    define _LIBCPP_THREAD_SAFETY_ANNOTATION(x) __attribute__((x))
#  else
# 1197 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_THREAD_SAFETY_ANNOTATION(x)
#  endif
# 1199 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1201 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_CONSTINIT constinit
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif __has_attribute(__require_constant_initialization__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 1203 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_CONSTINIT __attribute__((__require_constant_initialization__))
#  else
# 1205 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_CONSTINIT
#  endif
# 1207 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_attribute(__diagnose_if__) && !defined(_LIBCPP_DISABLE_ADDITIONAL_DIAGNOSTICS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DIAGNOSE_WARNING(...) __attribute__((__diagnose_if__(__VA_ARGS__, "warning")))
#  else
# 1211 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DIAGNOSE_WARNING(...)
#  endif
# 1213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Use a function like macro to imply that it must be followed by a semicolon
#if 0 /* disabled by -frewrite-includes */
#  if __has_cpp_attribute(fallthrough)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_FALLTHROUGH() [[fallthrough]]
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif __has_attribute(__fallthrough__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 1218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_FALLTHROUGH() __attribute__((__fallthrough__))
#  else
# 1220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_FALLTHROUGH() ((void)0)
#  endif
# 1222 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_cpp_attribute(_Clang::__lifetimebound__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_LIFETIMEBOUND [[_Clang::__lifetimebound__]]
#  else
# 1226 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_LIFETIMEBOUND
#  endif
# 1228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_attribute(__nodebug__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NODEBUG __attribute__((__nodebug__))
#  else
# 1232 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NODEBUG
#  endif
# 1234 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_attribute(__standalone_debug__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1236 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_STANDALONE_DEBUG __attribute__((__standalone_debug__))
#  else
# 1238 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_STANDALONE_DEBUG
#  endif
# 1240 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_attribute(__preferred_name__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1242 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_PREFERRED_NAME(x) __attribute__((__preferred_name__(x)))
#  else
# 1244 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_PREFERRED_NAME(x)
#  endif
# 1246 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_attribute(__no_sanitize__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1248 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NO_SANITIZE(...) __attribute__((__no_sanitize__(__VA_ARGS__)))
#  else
# 1250 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NO_SANITIZE(...)
#  endif
# 1252 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// We often repeat things just for handling wide characters in the library.
// When wide characters are disabled, it can be useful to have a quick way of
// disabling it without having to resort to #if-#endif, which has a larger
// impact on readability.
#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1258 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_IF_WIDE_CHARACTERS(...)
#  else
# 1260 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_IF_WIDE_CHARACTERS(...) __VA_ARGS__
#  endif
# 1262 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_ABI_MICROSOFT) && __has_declspec_attribute(empty_bases)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1264 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec(empty_bases)
#  else
# 1266 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DECLSPEC_EMPTY_BASES
#  endif
# 1268 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1270 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
#    define _LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
#    define _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
#    define _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
#    define _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION
#  endif // _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
# 1276 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1278 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
#    define _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION
#    define _LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS
#    define _LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS
#    define _LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR
#    define _LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS
#  endif // _LIBCPP_ENABLE_CXX20_REMOVED_FEATURES
# 1285 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// clang-format off
#  define _LIBCPP_PUSH_MACROS _Pragma("push_macro(\"min\")") _Pragma("push_macro(\"max\")") _Pragma("push_macro(\"refresh()\")") _Pragma("push_macro(\"move(int, int)\")") _Pragma("push_macro(\"erase()\")")
#  define _LIBCPP_POP_MACROS _Pragma("pop_macro(\"min\")") _Pragma("pop_macro(\"max\")") _Pragma("pop_macro(\"refresh()\")") _Pragma("pop_macro(\"move(int, int)\")") _Pragma("pop_macro(\"erase()\")")
// clang-format on

#  ifndef _LIBCPP_NO_AUTO_LINK
#if 0 /* disabled by -frewrite-includes */
#    if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_BUILDING_LIBRARY)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1293 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#      if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1294 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#        pragma comment(lib, "c++.lib")
#      else
# 1296 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#        pragma comment(lib, "libc++.lib")
#      endif
# 1298 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    endif // defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_BUILDING_LIBRARY)
# 1299 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  endif   // _LIBCPP_NO_AUTO_LINK
# 1300 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Configures the fopen close-on-exec mode character, if any. This string will
// be appended to any mode string used by fstream for fopen/fdopen.
//
// Not all platforms support this, but it helps avoid fd-leaks on platforms that
// do.
#if 0 /* disabled by -frewrite-includes */
#  if defined(__BIONIC__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1307 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_FOPEN_CLOEXEC_MODE "e"
#  else
# 1309 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_FOPEN_CLOEXEC_MODE
#  endif
# 1311 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// Support for _FILE_OFFSET_BITS=64 landed gradually in Android, so the full set
// of functions used in cstdio may not be available for low API levels when
// using 64-bit file offsets on LP32.
#if 0 /* disabled by -frewrite-includes */
#  if defined(__BIONIC__) && defined(__USE_FILE_OFFSET64) && __ANDROID_API__ < 24
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1316 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_HAS_NO_FGETPOS_FSETPOS
#  endif
# 1318 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_attribute(__init_priority__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1320 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_INIT_PRIORITY_MAX __attribute__((__init_priority__(100)))
#  else
# 1322 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_INIT_PRIORITY_MAX
#  endif
# 1324 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_attribute(__format__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1326 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// The attribute uses 1-based indices for ordinary and static member functions.
// The attribute uses 2-based indices for non-static member functions.
#    define _LIBCPP_ATTRIBUTE_FORMAT(archetype, format_string_index, first_format_arg_index)                           \
      __attribute__((__format__(archetype, format_string_index, first_format_arg_index)))
#  else
# 1331 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_ATTRIBUTE_FORMAT(archetype, format_string_index, first_format_arg_index) /* nothing */
#  endif
# 1333 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_cpp_attribute(msvc::no_unique_address)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1335 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
// MSVC implements [[no_unique_address]] as a silent no-op currently.
// (If/when MSVC breaks its C++ ABI, it will be changed to work as intended.)
// However, MSVC implements [[msvc::no_unique_address]] which does what
// [[no_unique_address]] is supposed to do, in general.

// Clang-cl does not yet (14.0) implement either [[no_unique_address]] or
// [[msvc::no_unique_address]] though. If/when it does implement
// [[msvc::no_unique_address]], this should be preferred though.
#    define _LIBCPP_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif __has_cpp_attribute(no_unique_address)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 1345 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NO_UNIQUE_ADDRESS [[__no_unique_address__]]
#  else
# 1347 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_NO_UNIQUE_ADDRESS /* nothing */
// Note that this can be replaced by #error as soon as clang-cl
// implements msvc::no_unique_address, since there should be no C++20
// compiler that doesn't support one of the two attributes at that point.
// We generally don't want to use this macro outside of C++20-only code,
// because using it conditionally in one language version only would make
// the ABI inconsistent.
#  endif
# 1355 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  ifdef _LIBCPP_COMPILER_CLANG_BASED
#    define _LIBCPP_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push")
#    define _LIBCPP_DIAGNOSTIC_POP _Pragma("clang diagnostic pop")
#    define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED(str) _Pragma(_LIBCPP_TOSTRING(clang diagnostic ignored str))
#    define _LIBCPP_GCC_DIAGNOSTIC_IGNORED(str)
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(_LIBCPP_COMPILER_GCC)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 1362 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push")
#    define _LIBCPP_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop")
#    define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED(str)
#    define _LIBCPP_GCC_DIAGNOSTIC_IGNORED(str) _Pragma(_LIBCPP_TOSTRING(GCC diagnostic ignored str))
#  else
# 1367 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_DIAGNOSTIC_PUSH
#    define _LIBCPP_DIAGNOSTIC_POP
#    define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED(str)
#    define _LIBCPP_GCC_DIAGNOSTIC_IGNORED(str)
#  endif
# 1372 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_AIX) && !defined(_LIBCPP_COMPILER_GCC)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1374 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_PACKED_BYTE_FOR_AIX _Pragma("pack(1)")
#    define _LIBCPP_PACKED_BYTE_FOR_AIX_END _Pragma("pack(pop)")
#  else
# 1377 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_PACKED_BYTE_FOR_AIX     /* empty */
#    define _LIBCPP_PACKED_BYTE_FOR_AIX_END /* empty */
#  endif
# 1380 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_attribute(__packed__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1382 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_PACKED __attribute__((__packed__))
#  else
# 1384 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_PACKED
#  endif
# 1386 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// c8rtomb() and mbrtoc8() were added in C++20 and C23. Support for these
// functions is gradually being added to existing C libraries. The conditions
// below check for known C library versions and conditions under which these
// functions are declared by the C library.
#  define _LIBCPP_HAS_NO_C8RTOMB_MBRTOC8
// GNU libc 2.36 and newer declare c8rtomb() and mbrtoc8() in C++ modes if
// __cpp_char8_t is defined or if C2X extensions are enabled. Determining
// the latter depends on internal GNU libc details that are not appropriate
// to depend on here, so any declarations present when __cpp_char8_t is not
// defined are ignored.
#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_GLIBC_PREREQ)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1398 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#if 0 /* disabled by -frewrite-includes */
#    if _LIBCPP_GLIBC_PREREQ(2, 36) && defined(__cpp_char8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1399 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      undef _LIBCPP_HAS_NO_C8RTOMB_MBRTOC8
#    endif
# 1401 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  endif
# 1402 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// There are a handful of public standard library types that are intended to
// support CTAD but don't need any explicit deduction guides to do so. This
// macro is used to mark them as such, which suppresses the
// '-Wctad-maybe-unsupported' compiler warning when CTAD is used in user code
// with these classes.
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1409 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    ifdef _LIBCPP_COMPILER_CLANG_BASED
#      define _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(_ClassName)                                                              \
        template <class... _Tag>                                                                                       \
        [[maybe_unused]] _ClassName(typename _Tag::__allow_ctad...)->_ClassName<_Tag...>
#    else
# 1414 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#      define _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(ClassName)                                                               \
        template <class... _Tag>                                                                                       \
        ClassName(typename _Tag::__allow_ctad...)->ClassName<_Tag...>
#    endif
# 1418 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#  else
# 1419 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#    define _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(_ClassName) static_assert(true, "")
#  endif
# 1421 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

// TODO(varconst): currently, there are bugs in Clang's intrinsics when handling Objective-C++ `id`, so don't use
// compiler intrinsics in the Objective-C++ mode.
#  ifdef __OBJC__
#    define _LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS
#  endif
# 1427 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  define _PSTL_PRAGMA(x) _Pragma(#x)

// Enable SIMD for compilers that support OpenMP 4.0
#if 0 /* disabled by -frewrite-includes */
#  if (defined(_OPENMP) && _OPENMP >= 201307)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1432 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#    define _PSTL_UDR_PRESENT
#    define _PSTL_PRAGMA_SIMD _PSTL_PRAGMA(omp simd)
#    define _PSTL_PRAGMA_DECLARE_SIMD _PSTL_PRAGMA(omp declare simd)
#    define _PSTL_PRAGMA_SIMD_REDUCTION(PRM) _PSTL_PRAGMA(omp simd reduction(PRM))
#    define _PSTL_PRAGMA_SIMD_SCAN(PRM) _PSTL_PRAGMA(omp simd reduction(inscan, PRM))
#    define _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN(PRM) _PSTL_PRAGMA(omp scan inclusive(PRM))
#    define _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN(PRM) _PSTL_PRAGMA(omp scan exclusive(PRM))

// Declaration of reduction functor, where
// NAME - the name of the functor
// OP - type of the callable object with the reduction operation
// omp_in - refers to the local partial result
// omp_out - refers to the final value of the combiner operator
// omp_priv - refers to the private copy of the initial value
// omp_orig - refers to the original variable to be reduced
#    define _PSTL_PRAGMA_DECLARE_REDUCTION(NAME, OP)                                                                   \
      _PSTL_PRAGMA(omp declare reduction(NAME:OP : omp_out(omp_in)) initializer(omp_priv = omp_orig))

#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(_LIBCPP_COMPILER_CLANG_BASED)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 1452 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#    define _PSTL_PRAGMA_SIMD _Pragma("clang loop vectorize(enable) interleave(enable)")
#    define _PSTL_PRAGMA_DECLARE_SIMD
#    define _PSTL_PRAGMA_SIMD_REDUCTION(PRM) _Pragma("clang loop vectorize(enable) interleave(enable)")
#    define _PSTL_PRAGMA_SIMD_SCAN(PRM) _Pragma("clang loop vectorize(enable) interleave(enable)")
#    define _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN(PRM)
#    define _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN(PRM)
#    define _PSTL_PRAGMA_DECLARE_REDUCTION(NAME, OP)

#  else // (defined(_OPENMP) && _OPENMP >= 201307)
# 1462 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#    define _PSTL_PRAGMA_SIMD
#    define _PSTL_PRAGMA_DECLARE_SIMD
#    define _PSTL_PRAGMA_SIMD_REDUCTION(PRM)
#    define _PSTL_PRAGMA_SIMD_SCAN(PRM)
#    define _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN(PRM)
#    define _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN(PRM)
#    define _PSTL_PRAGMA_DECLARE_REDUCTION(NAME, OP)

#  endif // (defined(_OPENMP) && _OPENMP >= 201307)
# 1472 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#  define _PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED

#endif // __cplusplus
# 1476 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3

#endif // _LIBCPP___CONFIG
# 1478 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__config" 3
#endif /* __config expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__assert" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __verbose_abort expanded by -frewrite-includes */
#include <__verbose_abort>
#else /* __verbose_abort expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__assert" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___VERBOSE_ABORT
#define _LIBCPP___VERBOSE_ABORT

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __availability expanded by -frewrite-includes */
#include <__availability>
#else /* __availability expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___AVAILABILITY
#define _LIBCPP___AVAILABILITY

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3

// Libc++ is shipped by various vendors. In particular, it is used as a system
// library on macOS, iOS and other Apple platforms. In order for users to be
// able to compile a binary that is intended to be deployed to an older version
// of a platform, Clang provides availability attributes [1]. These attributes
// can be placed on declarations and are used to describe the life cycle of a
// symbol in the library.
//
// The main goal is to ensure a compile-time error if a symbol that hasn't been
// introduced in a previously released library is used in a program that targets
// that previously released library. Normally, this would be a load-time error
// when one tries to launch the program against the older library.
//
// For example, the filesystem library was introduced in the dylib in macOS 10.15.
// If a user compiles on a macOS 10.15 host but targets macOS 10.13 with their
// program, the compiler would normally not complain (because the required
// declarations are in the headers), but the dynamic loader would fail to find
// the symbols when actually trying to launch the program on macOS 10.13. To
// turn this into a compile-time issue instead, declarations are annotated with
// when they were introduced, and the compiler can produce a diagnostic if the
// program references something that isn't available on the deployment target.
//
// This mechanism is general in nature, and any vendor can add their markup to
// the library (see below). Whenever a new feature is added that requires support
// in the shared library, two macros are added below to allow marking the feature
// as unavailable:
// 1. A macro named `_LIBCPP_AVAILABILITY_HAS_NO_<feature>` which must be defined
//    exactly when compiling for a target that doesn't support the feature.
// 2. A macro named `_LIBCPP_AVAILABILITY_<feature>`, which must always be defined
//    and must expand to the proper availability attribute for the platform.
//
// When vendors decide to ship the feature as part of their shared library, they
// can update these macros appropriately for their platform, and the library will
// use those to provide an optimal user experience.
//
// Furthermore, many features in the standard library have corresponding
// feature-test macros. The `_LIBCPP_AVAILABILITY_HAS_NO_<feature>` macros
// are checked by the corresponding feature-test macros generated by
// generate_feature_test_macro_components.py to ensure that the library
// doesn't announce a feature as being implemented if it is unavailable on
// the deployment target.
//
// Note that this mechanism is disabled by default in the "upstream" libc++.
// Availability annotations are only meaningful when shipping libc++ inside
// a platform (i.e. as a system library), and so vendors that want them should
// turn those annotations on at CMake configuration time.
//
// [1]: https://clang.llvm.org/docs/AttributeReference.html#availability


// For backwards compatibility, allow users to define _LIBCPP_DISABLE_AVAILABILITY
// for a while.
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_DISABLE_AVAILABILITY)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#if 0 /* disabled by -frewrite-includes */
#   if !defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#       define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
#   endif
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#endif
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3

// Availability markup is disabled when building the library, or when the compiler
// doesn't support the proper attributes.
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_BUILDING_LIBRARY) ||                                        \
    defined(_LIBCXXABI_BUILDING_LIBRARY) ||                                     \
    !__has_feature(attribute_availability_with_strict) ||                       \
    !__has_feature(attribute_availability_in_templates) ||                      \
    !__has_extension(pragma_clang_attribute_external_declaration)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#if 0 /* disabled by -frewrite-includes */
#   if !defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#       define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
#   endif
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#endif
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3

    // This controls the availability of std::shared_mutex and std::shared_timed_mutex,
    // which were added to the dylib later.
// #   define _LIBCPP_AVAILABILITY_HAS_NO_SHARED_MUTEX
#   define _LIBCPP_AVAILABILITY_SHARED_MUTEX

    // These macros control the availability of std::bad_optional_access and
    // other exception types. These were put in the shared library to prevent
    // code bloat from every user program defining the vtable for these exception
    // types.
    //
    // Note that when exceptions are disabled, the methods that normally throw
    // these exceptions can be used even on older deployment targets, but those
    // methods will abort instead of throwing.
// #   define _LIBCPP_AVAILABILITY_HAS_NO_BAD_OPTIONAL_ACCESS
#   define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS

// #   define _LIBCPP_AVAILABILITY_HAS_NO_BAD_VARIANT_ACCESS
#   define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS

// #   define _LIBCPP_AVAILABILITY_HAS_NO_BAD_ANY_CAST
#   define _LIBCPP_AVAILABILITY_BAD_ANY_CAST

    // This controls the availability of std::uncaught_exceptions().
// #   define _LIBCPP_AVAILABILITY_HAS_NO_UNCAUGHT_EXCEPTIONS
#   define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS

    // This controls the availability of the sized version of ::operator delete,
    // ::operator delete[], and their align_val_t variants, which were all added
    // in C++17, and hence not present in early dylibs.
// #   define _LIBCPP_AVAILABILITY_HAS_NO_SIZED_NEW_DELETE
#   define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE

    // This controls the availability of the std::future_error exception.
    //
    // Note that when exceptions are disabled, the methods that normally throw
    // std::future_error can be used even on older deployment targets, but those
    // methods will abort instead of throwing.
// #   define _LIBCPP_AVAILABILITY_HAS_NO_FUTURE_ERROR
#   define _LIBCPP_AVAILABILITY_FUTURE_ERROR

    // This controls the availability of std::type_info's vtable.
    // I can't imagine how using std::type_info can work at all if
    // this isn't supported.
// #   define _LIBCPP_AVAILABILITY_HAS_NO_TYPEINFO_VTABLE
#   define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE

    // This controls the availability of std::locale::category members
    // (e.g. std::locale::collate), which are defined in the dylib.
// #   define _LIBCPP_AVAILABILITY_HAS_NO_LOCALE_CATEGORY
#   define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY

    // This controls the availability of atomic operations on std::shared_ptr
    // (e.g. `std::atomic_store(std::shared_ptr)`), which require a shared
    // lock table located in the dylib.
// #   define _LIBCPP_AVAILABILITY_HAS_NO_ATOMIC_SHARED_PTR
#   define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR

    // These macros control the availability of all parts of <filesystem> that
    // depend on something in the dylib.
// #   define _LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY
#   define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
#   define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
#   define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP

    // This controls the availability of floating-point std::to_chars functions.
    // These overloads were added later than the integer overloads.
// #   define _LIBCPP_AVAILABILITY_HAS_NO_TO_CHARS_FLOATING_POINT
#   define _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT

    // This controls the availability of the C++20 synchronization library,
    // which requires shared library support for various operations
    // (see libcxx/src/atomic.cpp). This includes <barier>, <latch>,
    // <semaphore>, and notification functions on std::atomic.
// #   define _LIBCPP_AVAILABILITY_HAS_NO_SYNC
#   define _LIBCPP_AVAILABILITY_SYNC

    // This controls whether the library claims to provide a default verbose
    // termination function, and consequently whether the headers will try
    // to use it when the mechanism isn't overriden at compile-time.
// #   define _LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT
#   define _LIBCPP_AVAILABILITY_VERBOSE_ABORT

    // This controls the availability of the C++17 std::pmr library,
    // which is implemented in large part in the built library.
// #   define _LIBCPP_AVAILABILITY_HAS_NO_PMR
#   define _LIBCPP_AVAILABILITY_PMR

    // This controls the availability of the C++20 time zone database.
    // The parser code is built in the library.
// #   define _LIBCPP_AVAILABILITY_HAS_NO_TZDB
#   define _LIBCPP_AVAILABILITY_TZDB

// Enable additional explicit instantiations of iostreams components. This
// reduces the number of weak definitions generated in programs that use
// iostreams by providing a single strong definition in the shared library.
//
// TODO: Enable additional explicit instantiations on GCC once it supports exclude_from_explicit_instantiation,
//       or once libc++ doesn't use the attribute anymore.
// TODO: Enable them on Windows once https://llvm.org/PR41018 has been fixed.
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_COMPILER_GCC) || defined(_WIN32)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#  define _LIBCPP_AVAILABILITY_HAS_NO_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1
#endif
# 192 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__APPLE__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 194 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3

    // shared_mutex and shared_timed_mutex
#if 0 /* disabled by -frewrite-includes */
#   if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) ||    \
        (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 100000) || \
        (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 100000) ||         \
        (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 30000)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 200 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#       define _LIBCPP_AVAILABILITY_HAS_NO_SHARED_MUTEX
#   endif
# 202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#   define _LIBCPP_AVAILABILITY_SHARED_MUTEX                                    \
        __attribute__((availability(macos,strict,introduced=10.12)))            \
        __attribute__((availability(ios,strict,introduced=10.0)))               \
        __attribute__((availability(tvos,strict,introduced=10.0)))              \
        __attribute__((availability(watchos,strict,introduced=3.0)))

        // bad_optional_access, bad_variant_access and bad_any_cast
        // Note: bad_optional_access & friends were not introduced in the matching
        // macOS and iOS versions, so the version mismatch between macOS and others
        // is intended.
#if 0 /* disabled by -frewrite-includes */
#   if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101300) ||    \
        (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 120000) || \
        (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 120000) ||         \
        (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 50000)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#       define _LIBCPP_AVAILABILITY_HAS_NO_BAD_OPTIONAL_ACCESS
#       define _LIBCPP_AVAILABILITY_HAS_NO_BAD_VARIANT_ACCESS
#       define _LIBCPP_AVAILABILITY_HAS_NO_BAD_ANY_CAST
#   endif
# 220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#   define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS                             \
        __attribute__((availability(macos,strict,introduced=10.13)))            \
        __attribute__((availability(ios,strict,introduced=12.0)))               \
        __attribute__((availability(tvos,strict,introduced=12.0)))              \
        __attribute__((availability(watchos,strict,introduced=5.0)))
#   define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS                              \
        _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
#   define _LIBCPP_AVAILABILITY_BAD_ANY_CAST                                    \
        _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS

    // uncaught_exceptions
#if 0 /* disabled by -frewrite-includes */
#   if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) ||    \
        (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 100000) || \
        (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 100000) ||         \
        (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 30000)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 235 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#       define _LIBCPP_AVAILABILITY_HAS_NO_UNCAUGHT_EXCEPTIONS
#   endif
# 237 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#   define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS                             \
        __attribute__((availability(macos,strict,introduced=10.12)))            \
        __attribute__((availability(ios,strict,introduced=10.0)))               \
        __attribute__((availability(tvos,strict,introduced=10.0)))              \
        __attribute__((availability(watchos,strict,introduced=3.0)))

    // sized operator new and sized operator delete
#if 0 /* disabled by -frewrite-includes */
#   if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) ||    \
        (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 100000) || \
        (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 100000) ||         \
        (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 30000)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 248 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#       define _LIBCPP_AVAILABILITY_HAS_NO_SIZED_NEW_DELETE
#   endif
# 250 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#   define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE                                \
        __attribute__((availability(macos,strict,introduced=10.12)))            \
        __attribute__((availability(ios,strict,introduced=10.0)))               \
        __attribute__((availability(tvos,strict,introduced=10.0)))              \
        __attribute__((availability(watchos,strict,introduced=3.0)))

    // future_error
#if 0 /* disabled by -frewrite-includes */
#   if (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 60000)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 258 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#       define _LIBCPP_AVAILABILITY_HAS_NO_FUTURE_ERROR
#   endif
# 260 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#   define _LIBCPP_AVAILABILITY_FUTURE_ERROR                                    \
        __attribute__((availability(ios,strict,introduced=6.0)))

    // type_info's vtable
#if 0 /* disabled by -frewrite-includes */
#   if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 100900) ||    \
        (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 70000)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 266 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#       define _LIBCPP_AVAILABILITY_HAS_NO_TYPEINFO_VTABLE
#   endif
# 268 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#   define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE                                 \
        __attribute__((availability(macos,strict,introduced=10.9)))             \
        __attribute__((availability(ios,strict,introduced=7.0)))

    // locale::category
#if 0 /* disabled by -frewrite-includes */
#   if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 100900) ||    \
        (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 70000)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 275 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#       define _LIBCPP_AVAILABILITY_HAS_NO_LOCALE_CATEGORY
#   endif
# 277 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#   define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY                                 \
        __attribute__((availability(macos,strict,introduced=10.9)))             \
        __attribute__((availability(ios,strict,introduced=7.0)))

    // atomic operations on shared_ptr
#if 0 /* disabled by -frewrite-includes */
#   if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 100900) ||    \
        (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 70000)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 284 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#       define _LIBCPP_AVAILABILITY_HAS_NO_ATOMIC_SHARED_PTR
#   endif
# 286 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#   define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR                               \
        __attribute__((availability(macos,strict,introduced=10.9)))             \
        __attribute__((availability(ios,strict,introduced=7.0)))

    // <filesystem>
#if 0 /* disabled by -frewrite-includes */
#   if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500) ||    \
        (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 130000) || \
        (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 130000) ||         \
        (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 60000)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 295 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#       define _LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY
#   endif
# 297 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#   define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY                              \
        __attribute__((availability(macos,strict,introduced=10.15)))            \
        __attribute__((availability(ios,strict,introduced=13.0)))               \
        __attribute__((availability(tvos,strict,introduced=13.0)))              \
        __attribute__((availability(watchos,strict,introduced=6.0)))
#   define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH                                 \
        _Pragma("clang attribute push(__attribute__((availability(macos,strict,introduced=10.15))), apply_to=any(function,record))") \
        _Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))")    \
        _Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))")   \
        _Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))")
#   define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP                                  \
        _Pragma("clang attribute pop")                                          \
        _Pragma("clang attribute pop")                                          \
        _Pragma("clang attribute pop")                                          \
        _Pragma("clang attribute pop")

    // std::to_chars(floating-point)
#if 0 /* disabled by -frewrite-includes */
#   if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 130300) ||    \
        (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 160300) || \
        (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 160300) ||         \
        (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90300)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 318 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#       define _LIBCPP_AVAILABILITY_HAS_NO_TO_CHARS_FLOATING_POINT
#   endif
# 320 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#   define _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT                         \
        __attribute__((availability(macos,strict,introduced=13.3)))             \
        __attribute__((availability(ios,strict,introduced=16.3)))               \
        __attribute__((availability(tvos,strict,introduced=16.3)))              \
        __attribute__((availability(watchos,strict,introduced=9.3)))

    // c++20 synchronization library
#if 0 /* disabled by -frewrite-includes */
#   if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 110000) ||    \
        (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 140000) || \
        (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 140000) ||         \
        (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 70000)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 331 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#       define _LIBCPP_AVAILABILITY_HAS_NO_SYNC
#   endif
# 333 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#   define _LIBCPP_AVAILABILITY_SYNC                                            \
        __attribute__((availability(macos,strict,introduced=11.0)))             \
        __attribute__((availability(ios,strict,introduced=14.0)))               \
        __attribute__((availability(tvos,strict,introduced=14.0)))              \
        __attribute__((availability(watchos,strict,introduced=7.0)))

    // __libcpp_verbose_abort
#if 0 /* disabled by -frewrite-includes */
#   if 1 // TODO: Update once this is released
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#       define _LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT
#   endif
# 343 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#   define _LIBCPP_AVAILABILITY_VERBOSE_ABORT                                   \
        __attribute__((unavailable))

    // std::pmr
#if 0 /* disabled by -frewrite-includes */
#   if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 140000) ||    \
        (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 170000) || \
        (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 170000) ||         \
        (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 100000)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#       define _LIBCPP_AVAILABILITY_HAS_NO_PMR
#   endif
# 353 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
// TODO: Enable std::pmr markup once https://github.com/llvm/llvm-project/issues/40340 has been fixed
//       Until then, it is possible for folks to try to use `std::pmr` when back-deploying to targets that don't support
//       it and it'll be a load-time error, but we don't have a good alternative because the library won't compile if we
//       use availability annotations until that bug has been fixed.
#if 0 /* disabled by -frewrite-includes */
#  if 0
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 358 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#    define _LIBCPP_AVAILABILITY_PMR                                                                                   \
      __attribute__((availability(macos, strict, introduced = 14.0)))                                                  \
      __attribute__((availability(ios, strict, introduced = 17.0)))                                                    \
      __attribute__((availability(tvos, strict, introduced = 17.0)))                                                   \
      __attribute__((availability(watchos, strict, introduced = 10.0)))
#  else
# 364 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#    define _LIBCPP_AVAILABILITY_PMR
#  endif
# 366 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3

#  define _LIBCPP_AVAILABILITY_HAS_NO_TZDB
#  define _LIBCPP_AVAILABILITY_TZDB __attribute__((unavailable))

#if 0 /* disabled by -frewrite-includes */
#  if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 120000)   || \
      (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 150000) || \
      (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 150000)         || \
      (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 80000)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 374 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#    define _LIBCPP_AVAILABILITY_HAS_NO_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1
#  endif
# 376 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#else
# 377 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3

// ...New vendors can add availability markup here...

#   error "It looks like you're trying to enable vendor availability markup, but you haven't defined the corresponding macros yet!"

#endif
# 383 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3

// Define availability attributes that depend on _LIBCPP_HAS_NO_EXCEPTIONS.
// Those are defined in terms of the availability attributes above, and
// should not be vendor-specific.
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_NO_EXCEPTIONS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 388 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#   define _LIBCPP_AVAILABILITY_FUTURE
#   define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
#   define _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
#   define _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
#else
# 393 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#   define _LIBCPP_AVAILABILITY_FUTURE                    _LIBCPP_AVAILABILITY_FUTURE_ERROR
#   define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST        _LIBCPP_AVAILABILITY_BAD_ANY_CAST
#   define _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
#   define _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS  _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS
#endif
# 398 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3

#endif // _LIBCPP___AVAILABILITY
# 400 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__availability" 3
#endif /* __availability expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// This function should never be called directly from the code -- it should only be called through
// the _LIBCPP_VERBOSE_ABORT macro.
_LIBCPP_NORETURN _LIBCPP_AVAILABILITY_VERBOSE_ABORT _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 1, 2)
void __libcpp_verbose_abort(const char *__format, ...);

// _LIBCPP_VERBOSE_ABORT(format, args...)
//
// This macro is used to abort the program abnormally while providing additional diagnostic information.
//
// The first argument is a printf-style format string, and the remaining arguments are values to format
// into the format-string. This macro can be customized by users to provide fine-grained control over
// how verbose termination is triggered.
//
// If the user does not supply their own version of the _LIBCPP_VERBOSE_ABORT macro, we pick the default
// behavior based on whether we know the built library we're running against provides support for the
// verbose termination handler or not. If it does, we call it. If it doesn't, we call __builtin_abort to
// make sure that the program terminates but without taking any complex dependencies in this header.
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_VERBOSE_ABORT)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 3

// Support _LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED until LLVM 18, but tell people
// to move to customizing _LIBCPP_VERBOSE_ABORT instead.
#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT) && defined(_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 3
#    undef _LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT
#    warning _LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED is deprecated, please customize _LIBCPP_VERBOSE_ABORT instead
#  endif
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 3
// The decltype is there to suppress -Wunused warnings in this configuration.
void __use(const char*, ...);
#    define _LIBCPP_VERBOSE_ABORT(...) (decltype(::std::__use(__VA_ARGS__))(), __builtin_abort())
#  else
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 3
#    define _LIBCPP_VERBOSE_ABORT(...) ::std::__libcpp_verbose_abort(__VA_ARGS__)
#  endif
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 3

#endif // !defined(_LIBCPP_VERBOSE_ABORT)
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___VERBOSE_ABORT
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__verbose_abort" 3
#endif /* __verbose_abort expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__assert" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__assert" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__assert" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__assert" 3

#define _LIBCPP_ASSERT(expression, message)                                                                            \
  (__builtin_expect(static_cast<bool>(expression), 1)                                                                  \
       ? (void)0                                                                                                       \
       : _LIBCPP_VERBOSE_ABORT(                                                                                        \
             "%s:%d: assertion %s failed: %s\n", __builtin_FILE(), __builtin_LINE(), #expression, message))

// TODO: __builtin_assume can currently inhibit optimizations. Until this has been fixed and we can add
//       assumptions without a clear optimization intent, disable that to avoid worsening the code generation.
//       See https://discourse.llvm.org/t/llvm-assume-blocks-optimization/71609 for a discussion.
#if 0 /* disabled by -frewrite-includes */
#if 0 && __has_builtin(__builtin_assume)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__assert" 3
#  define _LIBCPP_ASSUME(expression)                                                                                   \
    (_LIBCPP_DIAGNOSTIC_PUSH _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wassume")                                              \
         __builtin_assume(static_cast<bool>(expression)) _LIBCPP_DIAGNOSTIC_POP)
#else
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__assert" 3
#  define _LIBCPP_ASSUME(expression) ((void)0)
#endif
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__assert" 3

#endif // _LIBCPP___ASSERT
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__assert" 3
#endif /* __assert expanded by -frewrite-includes */
# 678 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 678 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 679 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* access.h expanded by -frewrite-includes */
#include <__iterator/access.h>
#else /* access.h expanded by -frewrite-includes */
# 679 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/access.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_ACCESS_H
#define _LIBCPP___ITERATOR_ACCESS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/access.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/access.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cstddef expanded by -frewrite-includes */
#include <cstddef>
#else /* cstddef expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/access.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CSTDDEF
#define _LIBCPP_CSTDDEF

/*
    cstddef synopsis

Macros:

    offsetof(type,member-designator)
    NULL

namespace std
{

Types:

    ptrdiff_t
    size_t
    max_align_t // C++11
    nullptr_t
    byte // C++17

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* enable_if.h expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#else /* enable_if.h expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/enable_if.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_ENABLE_IF_H
#define _LIBCPP___TYPE_TRAITS_ENABLE_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/enable_if.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/enable_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/enable_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/enable_if.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/enable_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <bool, class _Tp = void>
struct _LIBCPP_TEMPLATE_VIS enable_if {};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS enable_if<true, _Tp> {
  typedef _Tp type;
};

template <bool _Bp, class _Tp = void>
using __enable_if_t _LIBCPP_NODEBUG = typename enable_if<_Bp, _Tp>::type;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/enable_if.h" 3
template <bool _Bp, class _Tp = void>
using enable_if_t = typename enable_if<_Bp, _Tp>::type;
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/enable_if.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_ENABLE_IF_H
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/enable_if.h" 3
#endif /* enable_if.h expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* integral_constant.h expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#else /* integral_constant.h expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/integral_constant.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_INTEGRAL_CONSTANT_H
#define _LIBCPP___TYPE_TRAITS_INTEGRAL_CONSTANT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/integral_constant.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/integral_constant.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/integral_constant.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/integral_constant.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/integral_constant.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, _Tp __v>
struct _LIBCPP_TEMPLATE_VIS integral_constant {
  static _LIBCPP_CONSTEXPR const _Tp value = __v;
  typedef _Tp value_type;
  typedef integral_constant type;
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR operator value_type() const _NOEXCEPT { return value; }
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/integral_constant.h" 3
  _LIBCPP_INLINE_VISIBILITY constexpr value_type operator()() const _NOEXCEPT { return value; }
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/integral_constant.h" 3
};

template <class _Tp, _Tp __v>
_LIBCPP_CONSTEXPR const _Tp integral_constant<_Tp, __v>::value;

typedef integral_constant<bool, true> true_type;
typedef integral_constant<bool, false> false_type;

template <bool _Val>
using _BoolConstant _LIBCPP_NODEBUG = integral_constant<bool, _Val>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/integral_constant.h" 3
template <bool __b>
using bool_constant = integral_constant<bool, __b>;
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/integral_constant.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_INTEGRAL_CONSTANT_H
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/integral_constant.h" 3
#endif /* integral_constant.h expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_integral.h expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#else /* is_integral.h expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_INTEGRAL_H
#define _LIBCPP___TYPE_TRAITS_IS_INTEGRAL_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* remove_cv.h expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#else /* remove_cv.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_CV_H
#define _LIBCPP___TYPE_TRAITS_REMOVE_CV_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* remove_const.h expanded by -frewrite-includes */
#include <__type_traits/remove_const.h>
#else /* remove_const.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_CONST_H
#define _LIBCPP___TYPE_TRAITS_REMOVE_CONST_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__remove_const)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const.h" 3
template <class _Tp>
struct remove_const {
  using type _LIBCPP_NODEBUG = __remove_const(_Tp);
};

template <class _Tp>
using __remove_const_t = __remove_const(_Tp);
#else
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const.h" 3
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS remove_const {
  typedef _Tp type;
};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS remove_const<const _Tp> {
  typedef _Tp type;
};

template <class _Tp>
using __remove_const_t = typename remove_const<_Tp>::type;
#endif // __has_builtin(__remove_const)
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const.h" 3
template <class _Tp>
using remove_const_t = __remove_const_t<_Tp>;
#endif
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_REMOVE_CONST_H
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const.h" 3
#endif /* remove_const.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* remove_volatile.h expanded by -frewrite-includes */
#include <__type_traits/remove_volatile.h>
#else /* remove_volatile.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_volatile.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_VOLATILE_H
#define _LIBCPP___TYPE_TRAITS_REMOVE_VOLATILE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_volatile.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_volatile.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_volatile.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_volatile.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_volatile.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__remove_volatile)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_volatile.h" 3
template <class _Tp>
struct remove_volatile {
  using type _LIBCPP_NODEBUG = __remove_volatile(_Tp);
};

template <class _Tp>
using __remove_volatile_t = __remove_volatile(_Tp);
#else
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_volatile.h" 3
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS remove_volatile {
  typedef _Tp type;
};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS remove_volatile<volatile _Tp> {
  typedef _Tp type;
};

template <class _Tp>
using __remove_volatile_t = typename remove_volatile<_Tp>::type;
#endif // __has_builtin(__remove_volatile)
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_volatile.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_volatile.h" 3
template <class _Tp>
using remove_volatile_t = __remove_volatile_t<_Tp>;
#endif
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_volatile.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_REMOVE_VOLATILE_H
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_volatile.h" 3
#endif /* remove_volatile.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__remove_cv) && !defined(_LIBCPP_COMPILER_GCC)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 3
template <class _Tp>
struct remove_cv {
  using type _LIBCPP_NODEBUG = __remove_cv(_Tp);
};

template <class _Tp>
using __remove_cv_t = __remove_cv(_Tp);
#else
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 3
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS remove_cv {
  typedef __remove_volatile_t<__remove_const_t<_Tp> > type;
};

template <class _Tp>
using __remove_cv_t = __remove_volatile_t<__remove_const_t<_Tp> >;
#endif // __has_builtin(__remove_cv)
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 3
template <class _Tp>
using remove_cv_t = __remove_cv_t<_Tp>;
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_REMOVE_CV_H
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cv.h" 3
#endif /* remove_cv.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// clang-format off
template <class _Tp> struct __libcpp_is_integral                     { enum { value = 0 }; };
template <>          struct __libcpp_is_integral<bool>               { enum { value = 1 }; };
template <>          struct __libcpp_is_integral<char>               { enum { value = 1 }; };
template <>          struct __libcpp_is_integral<signed char>        { enum { value = 1 }; };
template <>          struct __libcpp_is_integral<unsigned char>      { enum { value = 1 }; };
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>          struct __libcpp_is_integral<wchar_t>            { enum { value = 1 }; };
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3
#ifndef _LIBCPP_HAS_NO_CHAR8_T
template <>          struct __libcpp_is_integral<char8_t>            { enum { value = 1 }; };
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3
template <>          struct __libcpp_is_integral<char16_t>           { enum { value = 1 }; };
template <>          struct __libcpp_is_integral<char32_t>           { enum { value = 1 }; };
template <>          struct __libcpp_is_integral<short>              { enum { value = 1 }; };
template <>          struct __libcpp_is_integral<unsigned short>     { enum { value = 1 }; };
template <>          struct __libcpp_is_integral<int>                { enum { value = 1 }; };
template <>          struct __libcpp_is_integral<unsigned int>       { enum { value = 1 }; };
template <>          struct __libcpp_is_integral<long>               { enum { value = 1 }; };
template <>          struct __libcpp_is_integral<unsigned long>      { enum { value = 1 }; };
template <>          struct __libcpp_is_integral<long long>          { enum { value = 1 }; };
template <>          struct __libcpp_is_integral<unsigned long long> { enum { value = 1 }; };
#ifndef _LIBCPP_HAS_NO_INT128
template <>          struct __libcpp_is_integral<__int128_t>         { enum { value = 1 }; };
template <>          struct __libcpp_is_integral<__uint128_t>        { enum { value = 1 }; };
#endif
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3
// clang-format on

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_integral)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_integral : _BoolConstant<__is_integral(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3
template <class _Tp>
inline constexpr bool is_integral_v = __is_integral(_Tp);
#  endif
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3

#else
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_integral : public _BoolConstant<__libcpp_is_integral<__remove_cv_t<_Tp> >::value> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3
template <class _Tp>
inline constexpr bool is_integral_v = is_integral<_Tp>::value;
#  endif
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3

#endif // __has_builtin(__is_integral)
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_INTEGRAL_H
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_integral.h" 3
#endif /* is_integral.h expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* version expanded by -frewrite-includes */
#include <version>
#else /* version expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_VERSIONH
#define _LIBCPP_VERSIONH

/*
  version synopsis

Macro name                                              Value   Headers
__cpp_lib_adaptor_iterator_pair_constructor             202106L <queue> <stack>
__cpp_lib_addressof_constexpr                           201603L <memory>
__cpp_lib_allocate_at_least                             202106L <memory>
__cpp_lib_allocator_traits_is_always_equal              201411L <deque> <forward_list> <list>
                                                                <map> <memory> <scoped_allocator>
                                                                <set> <string> <unordered_map>
                                                                <unordered_set> <vector>
__cpp_lib_any                                           201606L <any>
__cpp_lib_apply                                         201603L <tuple>
__cpp_lib_array_constexpr                               201811L <array> <iterator>
                                                        201603L // C++17
__cpp_lib_as_const                                      201510L <utility>
__cpp_lib_associative_heterogeneous_erasure             202110L <map> <set> <unordered_map>
                                                                <unordered_set>
__cpp_lib_associative_heterogeneous_insertion           202306L <map> <set> <unordered_map>
                                                                <unordered_set>
__cpp_lib_assume_aligned                                201811L <memory>
__cpp_lib_atomic_flag_test                              201907L <atomic>
__cpp_lib_atomic_float                                  201711L <atomic>
__cpp_lib_atomic_is_always_lock_free                    201603L <atomic>
__cpp_lib_atomic_lock_free_type_aliases                 201907L <atomic>
__cpp_lib_atomic_ref                                    201806L <atomic>
__cpp_lib_atomic_shared_ptr                             201711L <atomic>
__cpp_lib_atomic_value_initialization                   201911L <atomic> <memory>
__cpp_lib_atomic_wait                                   201907L <atomic>
__cpp_lib_barrier                                       201907L <barrier>
__cpp_lib_bind_back                                     202306L <functional>
                                                        202202L // C++23
__cpp_lib_bind_front                                    202306L <functional>
                                                        201907L // C++20
__cpp_lib_bit_cast                                      201806L <bit>
__cpp_lib_bitops                                        201907L <bit>
__cpp_lib_bitset                                        202306L <bitset>
__cpp_lib_bool_constant                                 201505L <type_traits>
__cpp_lib_bounded_array_traits                          201902L <type_traits>
__cpp_lib_boyer_moore_searcher                          201603L <functional>
__cpp_lib_byte                                          201603L <cstddef>
__cpp_lib_byteswap                                      202110L <bit>
__cpp_lib_char8_t                                       201907L <atomic> <filesystem> <istream>
                                                                <limits> <locale> <ostream>
                                                                <string> <string_view>
__cpp_lib_chrono                                        201611L <chrono>
__cpp_lib_chrono_udls                                   201304L <chrono>
__cpp_lib_clamp                                         201603L <algorithm>
__cpp_lib_complex_udls                                  201309L <complex>
__cpp_lib_concepts                                      202002L <concepts>
__cpp_lib_constexpr_algorithms                          201806L <algorithm> <utility>
__cpp_lib_constexpr_bitset                              202207L <bitset>
__cpp_lib_constexpr_charconv                            202207L <charconv>
__cpp_lib_constexpr_cmath                               202202L <cmath> <cstdlib>
__cpp_lib_constexpr_complex                             201711L <complex>
__cpp_lib_constexpr_dynamic_alloc                       201907L <memory>
__cpp_lib_constexpr_functional                          201907L <functional>
__cpp_lib_constexpr_iterator                            201811L <iterator>
__cpp_lib_constexpr_memory                              202202L <memory>
                                                        201811L // C++20
__cpp_lib_constexpr_numeric                             201911L <numeric>
__cpp_lib_constexpr_string                              201907L <string>
__cpp_lib_constexpr_string_view                         201811L <string_view>
__cpp_lib_constexpr_tuple                               201811L <tuple>
__cpp_lib_constexpr_typeinfo                            202106L <typeinfo>
__cpp_lib_constexpr_utility                             201811L <utility>
__cpp_lib_constexpr_vector                              201907L <vector>
__cpp_lib_copyable_function                             202306L <functional>
__cpp_lib_coroutine                                     201902L <coroutine>
__cpp_lib_destroying_delete                             201806L <new>
__cpp_lib_enable_shared_from_this                       201603L <memory>
__cpp_lib_endian                                        201907L <bit>
__cpp_lib_erase_if                                      202002L <deque> <forward_list> <list>
                                                                <map> <set> <string>
                                                                <unordered_map> <unordered_set> <vector>
__cpp_lib_exchange_function                             201304L <utility>
__cpp_lib_execution                                     201902L <execution>
                                                        201603L // C++17
__cpp_lib_expected                                      202211L <expected>
__cpp_lib_filesystem                                    201703L <filesystem>
__cpp_lib_format                                        202106L <format>
__cpp_lib_format_ranges                                 202207L <format>
__cpp_lib_formatters                                    202302L <stacktrace> <thread>
__cpp_lib_forward_like                                  202207L <utility>
__cpp_lib_fstream_native_handle                         202306L <fstream>
__cpp_lib_function_ref                                  202306L <functional>
__cpp_lib_gcd_lcm                                       201606L <numeric>
__cpp_lib_generic_associative_lookup                    201304L <map> <set>
__cpp_lib_generic_unordered_lookup                      201811L <unordered_map> <unordered_set>
__cpp_lib_hardware_interference_size                    201703L <new>
__cpp_lib_has_unique_object_representations             201606L <type_traits>
__cpp_lib_hazard_pointer                                202306L <hazard_pointer>
__cpp_lib_hypot                                         201603L <cmath>
__cpp_lib_incomplete_container_elements                 201505L <forward_list> <list> <vector>
__cpp_lib_int_pow2                                      202002L <bit>
__cpp_lib_integer_comparison_functions                  202002L <utility>
__cpp_lib_integer_sequence                              201304L <utility>
__cpp_lib_integral_constant_callable                    201304L <type_traits>
__cpp_lib_interpolate                                   201902L <cmath> <numeric>
__cpp_lib_invoke                                        201411L <functional>
__cpp_lib_invoke_r                                      202106L <functional>
__cpp_lib_is_aggregate                                  201703L <type_traits>
__cpp_lib_is_constant_evaluated                         201811L <type_traits>
__cpp_lib_is_final                                      201402L <type_traits>
__cpp_lib_is_invocable                                  201703L <type_traits>
__cpp_lib_is_layout_compatible                          201907L <type_traits>
__cpp_lib_is_nothrow_convertible                        201806L <type_traits>
__cpp_lib_is_null_pointer                               201309L <type_traits>
__cpp_lib_is_pointer_interconvertible                   201907L <type_traits>
__cpp_lib_is_scoped_enum                                202011L <type_traits>
__cpp_lib_is_swappable                                  201603L <type_traits>
__cpp_lib_jthread                                       201911L <stop_token> <thread>
__cpp_lib_latch                                         201907L <latch>
__cpp_lib_launder                                       201606L <new>
__cpp_lib_list_remove_return_type                       201806L <forward_list> <list>
__cpp_lib_logical_traits                                201510L <type_traits>
__cpp_lib_make_from_tuple                               201606L <tuple>
__cpp_lib_make_reverse_iterator                         201402L <iterator>
__cpp_lib_make_unique                                   201304L <memory>
__cpp_lib_map_try_emplace                               201411L <map>
__cpp_lib_math_constants                                201907L <numbers>
__cpp_lib_math_special_functions                        201603L <cmath>
__cpp_lib_mdspan                                        202207L <mdspan>
__cpp_lib_memory_resource                               201603L <memory_resource>
__cpp_lib_move_iterator_concept                         202207L <iterator>
__cpp_lib_move_only_function                            202110L <functional>
__cpp_lib_node_extract                                  201606L <map> <set> <unordered_map>
                                                                <unordered_set>
__cpp_lib_nonmember_container_access                    201411L <array> <deque> <forward_list>
                                                                <iterator> <list> <map>
                                                                <regex> <set> <string>
                                                                <unordered_map> <unordered_set> <vector>
__cpp_lib_not_fn                                        201603L <functional>
__cpp_lib_null_iterators                                201304L <iterator>
__cpp_lib_optional                                      202110L <optional>
                                                        201606L // C++17
__cpp_lib_out_ptr                                       202106L <memory>
__cpp_lib_parallel_algorithm                            201603L <algorithm> <numeric>
__cpp_lib_polymorphic_allocator                         201902L <memory_resource>
__cpp_lib_print                                         202207L <ostream> <print>
__cpp_lib_quoted_string_io                              201304L <iomanip>
__cpp_lib_ranges                                        202207L <algorithm> <functional> <iterator>
                                                                <memory> <ranges>
__cpp_lib_ranges_as_rvalue                              202207L <ranges>
__cpp_lib_ranges_chunk                                  202202L <ranges>
__cpp_lib_ranges_chunk_by                               202202L <ranges>
__cpp_lib_ranges_iota                                   202202L <numeric>
__cpp_lib_ranges_join_with                              202202L <ranges>
__cpp_lib_ranges_repeat                                 202207L <ranges>
__cpp_lib_ranges_slide                                  202202L <ranges>
__cpp_lib_ranges_starts_ends_with                       202106L <algorithm>
__cpp_lib_ranges_to_container                           202202L <deque> <forward_list> <list>
                                                                <map> <queue> <ranges>
                                                                <set> <stack> <string>
                                                                <unordered_map> <unordered_set> <vector>
__cpp_lib_ranges_zip                                    202110L <ranges> <tuple> <utility>
__cpp_lib_ratio                                         202306L <ratio>
__cpp_lib_raw_memory_algorithms                         201606L <memory>
__cpp_lib_rcu                                           202306L <rcu>
__cpp_lib_reference_from_temporary                      202202L <type_traits>
__cpp_lib_remove_cvref                                  201711L <type_traits>
__cpp_lib_result_of_sfinae                              201210L <functional> <type_traits>
__cpp_lib_robust_nonmodifying_seq_ops                   201304L <algorithm>
__cpp_lib_sample                                        201603L <algorithm>
__cpp_lib_scoped_lock                                   201703L <mutex>
__cpp_lib_semaphore                                     201907L <semaphore>
__cpp_lib_shared_mutex                                  201505L <shared_mutex>
__cpp_lib_shared_ptr_arrays                             201707L <memory>
                                                        201611L // C++17
__cpp_lib_shared_ptr_weak_type                          201606L <memory>
__cpp_lib_shared_timed_mutex                            201402L <shared_mutex>
__cpp_lib_shift                                         201806L <algorithm>
__cpp_lib_smart_ptr_for_overwrite                       202002L <memory>
__cpp_lib_smart_ptr_owner_equality                      202306L <memory>
__cpp_lib_source_location                               201907L <source_location>
__cpp_lib_span                                          202002L <span>
__cpp_lib_spanstream                                    202106L <spanstream>
__cpp_lib_ssize                                         201902L <iterator>
__cpp_lib_sstream_from_string_view                      202306L <sstream>
__cpp_lib_stacktrace                                    202011L <stacktrace>
__cpp_lib_starts_ends_with                              201711L <string> <string_view>
__cpp_lib_stdatomic_h                                   202011L <stdatomic.h>
__cpp_lib_string_contains                               202011L <string> <string_view>
__cpp_lib_string_resize_and_overwrite                   202110L <string>
__cpp_lib_string_udls                                   201304L <string>
__cpp_lib_string_view                                   201803L <string> <string_view>
                                                        201606L // C++17
__cpp_lib_submdspan                                     202306L <mdspan>
__cpp_lib_syncbuf                                       201803L <syncstream>
__cpp_lib_text_encoding                                 202306L <text_encoding>
__cpp_lib_three_way_comparison                          201907L <compare>
__cpp_lib_to_address                                    201711L <memory>
__cpp_lib_to_array                                      201907L <array>
__cpp_lib_to_chars                                      202306L <charconv>
                                                        201611L // C++17
__cpp_lib_to_string                                     202306L <string>
__cpp_lib_to_underlying                                 202102L <utility>
__cpp_lib_transformation_trait_aliases                  201304L <type_traits>
__cpp_lib_transparent_operators                         201510L <functional> <memory>
                                                        201210L // C++14
__cpp_lib_tuple_element_t                               201402L <tuple>
__cpp_lib_tuples_by_type                                201304L <tuple> <utility>
__cpp_lib_type_identity                                 201806L <type_traits>
__cpp_lib_type_trait_variable_templates                 201510L <type_traits>
__cpp_lib_uncaught_exceptions                           201411L <exception>
__cpp_lib_unordered_map_try_emplace                     201411L <unordered_map>
__cpp_lib_unreachable                                   202202L <utility>
__cpp_lib_unwrap_ref                                    201811L <functional>
__cpp_lib_variant                                       202102L <variant>
__cpp_lib_void_t                                        201411L <type_traits>
__cpp_lib_within_lifetime                               202306L <type_traits>

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 231 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 232 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#endif
# 233 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3

// clang-format off

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 237 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# define __cpp_lib_chrono_udls                          201304L
# define __cpp_lib_complex_udls                         201309L
# define __cpp_lib_exchange_function                    201304L
# define __cpp_lib_generic_associative_lookup           201304L
# define __cpp_lib_integer_sequence                     201304L
# define __cpp_lib_integral_constant_callable           201304L
# define __cpp_lib_is_final                             201402L
# define __cpp_lib_is_null_pointer                      201309L
# define __cpp_lib_make_reverse_iterator                201402L
# define __cpp_lib_make_unique                          201304L
# define __cpp_lib_null_iterators                       201304L
# define __cpp_lib_quoted_string_io                     201304L
# define __cpp_lib_result_of_sfinae                     201210L
# define __cpp_lib_robust_nonmodifying_seq_ops          201304L
#if 0 /* disabled by -frewrite-includes */
# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_HAS_NO_SHARED_MUTEX)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 252 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#   define __cpp_lib_shared_timed_mutex                 201402L
# endif
# 254 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# define __cpp_lib_string_udls                          201304L
# define __cpp_lib_transformation_trait_aliases         201304L
# define __cpp_lib_transparent_operators                201210L
# define __cpp_lib_tuple_element_t                      201402L
# define __cpp_lib_tuples_by_type                       201304L
#endif
# 260 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 262 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# define __cpp_lib_addressof_constexpr                  201603L
# define __cpp_lib_allocator_traits_is_always_equal     201411L
# define __cpp_lib_any                                  201606L
# define __cpp_lib_apply                                201603L
# define __cpp_lib_array_constexpr                      201603L
# define __cpp_lib_as_const                             201510L
# define __cpp_lib_atomic_is_always_lock_free           201603L
# define __cpp_lib_bool_constant                        201505L
# define __cpp_lib_boyer_moore_searcher                 201603L
# define __cpp_lib_byte                                 201603L
# define __cpp_lib_chrono                               201611L
# define __cpp_lib_clamp                                201603L
# define __cpp_lib_enable_shared_from_this              201603L
// # define __cpp_lib_execution                            201603L
#if 0 /* disabled by -frewrite-includes */
# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 277 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#   define __cpp_lib_filesystem                         201703L
# endif
# 279 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# define __cpp_lib_gcd_lcm                              201606L
#if 0 /* disabled by -frewrite-includes */
# if defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 281 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#   define __cpp_lib_hardware_interference_size         201703L
# endif
# 283 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# define __cpp_lib_has_unique_object_representations    201606L
# define __cpp_lib_hypot                                201603L
# define __cpp_lib_incomplete_container_elements        201505L
# define __cpp_lib_invoke                               201411L
# define __cpp_lib_is_aggregate                         201703L
# define __cpp_lib_is_invocable                         201703L
# define __cpp_lib_is_swappable                         201603L
# define __cpp_lib_launder                              201606L
# define __cpp_lib_logical_traits                       201510L
# define __cpp_lib_make_from_tuple                      201606L
# define __cpp_lib_map_try_emplace                      201411L
// # define __cpp_lib_math_special_functions               201603L
#if 0 /* disabled by -frewrite-includes */
# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_PMR)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 296 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#   define __cpp_lib_memory_resource                    201603L
# endif
# 298 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# define __cpp_lib_node_extract                         201606L
# define __cpp_lib_nonmember_container_access           201411L
# define __cpp_lib_not_fn                               201603L
# define __cpp_lib_optional                             201606L
// # define __cpp_lib_parallel_algorithm                   201603L
# define __cpp_lib_raw_memory_algorithms                201606L
# define __cpp_lib_sample                               201603L
# define __cpp_lib_scoped_lock                          201703L
#if 0 /* disabled by -frewrite-includes */
# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_HAS_NO_SHARED_MUTEX)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 307 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#   define __cpp_lib_shared_mutex                       201505L
# endif
# 309 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# define __cpp_lib_shared_ptr_arrays                    201611L
# define __cpp_lib_shared_ptr_weak_type                 201606L
# define __cpp_lib_string_view                          201606L
// # define __cpp_lib_to_chars                             201611L
# undef  __cpp_lib_transparent_operators
# define __cpp_lib_transparent_operators                201510L
# define __cpp_lib_type_trait_variable_templates        201510L
# define __cpp_lib_uncaught_exceptions                  201411L
# define __cpp_lib_unordered_map_try_emplace            201411L
# define __cpp_lib_variant                              202102L
# define __cpp_lib_void_t                               201411L
#endif
# 321 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 323 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# undef  __cpp_lib_array_constexpr
# define __cpp_lib_array_constexpr                      201811L
# define __cpp_lib_assume_aligned                       201811L
# define __cpp_lib_atomic_flag_test                     201907L
// # define __cpp_lib_atomic_float                         201711L
# define __cpp_lib_atomic_lock_free_type_aliases        201907L
// # define __cpp_lib_atomic_ref                           201806L
// # define __cpp_lib_atomic_shared_ptr                    201711L
# define __cpp_lib_atomic_value_initialization          201911L
#if 0 /* disabled by -frewrite-includes */
# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_SYNC)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 333 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#   define __cpp_lib_atomic_wait                        201907L
# endif
# 335 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#if 0 /* disabled by -frewrite-includes */
# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_HAS_NO_SYNC)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#   define __cpp_lib_barrier                            201907L
# endif
# 338 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# define __cpp_lib_bind_front                           201907L
# define __cpp_lib_bit_cast                             201806L
# define __cpp_lib_bitops                               201907L
# define __cpp_lib_bounded_array_traits                 201902L
#if 0 /* disabled by -frewrite-includes */
# if !defined(_LIBCPP_HAS_NO_CHAR8_T)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 343 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#   define __cpp_lib_char8_t                            201907L
# endif
# 345 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# define __cpp_lib_concepts                             202002L
# define __cpp_lib_constexpr_algorithms                 201806L
# define __cpp_lib_constexpr_complex                    201711L
# define __cpp_lib_constexpr_dynamic_alloc              201907L
# define __cpp_lib_constexpr_functional                 201907L
# define __cpp_lib_constexpr_iterator                   201811L
# define __cpp_lib_constexpr_memory                     201811L
# define __cpp_lib_constexpr_numeric                    201911L
# define __cpp_lib_constexpr_string                     201907L
# define __cpp_lib_constexpr_string_view                201811L
# define __cpp_lib_constexpr_tuple                      201811L
# define __cpp_lib_constexpr_utility                    201811L
# define __cpp_lib_constexpr_vector                     201907L
# define __cpp_lib_coroutine                            201902L
#if 0 /* disabled by -frewrite-includes */
# if _LIBCPP_STD_VER >= 20 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 360 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#   define __cpp_lib_destroying_delete                  201806L
# endif
# 362 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# define __cpp_lib_endian                               201907L
# define __cpp_lib_erase_if                             202002L
# undef  __cpp_lib_execution
// # define __cpp_lib_execution                            201902L
// # define __cpp_lib_format                               202106L
# define __cpp_lib_generic_unordered_lookup             201811L
# define __cpp_lib_int_pow2                             202002L
# define __cpp_lib_integer_comparison_functions         202002L
# define __cpp_lib_interpolate                          201902L
# define __cpp_lib_is_constant_evaluated                201811L
// # define __cpp_lib_is_layout_compatible                 201907L
# define __cpp_lib_is_nothrow_convertible               201806L
// # define __cpp_lib_is_pointer_interconvertible          201907L
#if 0 /* disabled by -frewrite-includes */
# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN) && !defined(_LIBCPP_AVAILABILITY_HAS_NO_SYNC)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#   define __cpp_lib_jthread                            201911L
# endif
# 378 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#if 0 /* disabled by -frewrite-includes */
# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_HAS_NO_SYNC)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 379 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#   define __cpp_lib_latch                              201907L
# endif
# 381 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# define __cpp_lib_list_remove_return_type              201806L
# define __cpp_lib_math_constants                       201907L
# define __cpp_lib_move_iterator_concept                202207L
#if 0 /* disabled by -frewrite-includes */
# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_PMR)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 385 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#   define __cpp_lib_polymorphic_allocator              201902L
# endif
# 387 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# define __cpp_lib_ranges                               202207L
# define __cpp_lib_remove_cvref                         201711L
#if 0 /* disabled by -frewrite-includes */
# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_HAS_NO_SYNC)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 390 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#   define __cpp_lib_semaphore                          201907L
# endif
# 392 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# undef  __cpp_lib_shared_ptr_arrays
# define __cpp_lib_shared_ptr_arrays                    201707L
# define __cpp_lib_shift                                201806L
// # define __cpp_lib_smart_ptr_for_overwrite              202002L
#if 0 /* disabled by -frewrite-includes */
# if __has_builtin(__builtin_source_location) && !(defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER <= 1403)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 397 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#   define __cpp_lib_source_location                    201907L
# endif
# 399 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# define __cpp_lib_span                                 202002L
# define __cpp_lib_ssize                                201902L
# define __cpp_lib_starts_ends_with                     201711L
# undef  __cpp_lib_string_view
# define __cpp_lib_string_view                          201803L
// # define __cpp_lib_syncbuf                              201803L
// # define __cpp_lib_three_way_comparison                 201907L
# define __cpp_lib_to_address                           201711L
# define __cpp_lib_to_array                             201907L
# define __cpp_lib_type_identity                        201806L
# define __cpp_lib_unwrap_ref                           201811L
#endif
# 411 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 413 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
# define __cpp_lib_adaptor_iterator_pair_constructor    202106L
# define __cpp_lib_allocate_at_least                    202106L
// # define __cpp_lib_associative_heterogeneous_erasure    202110L
// # define __cpp_lib_bind_back                            202202L
# define __cpp_lib_byteswap                             202110L
# define __cpp_lib_constexpr_bitset                     202207L
# define __cpp_lib_constexpr_charconv                   202207L
// # define __cpp_lib_constexpr_cmath                      202202L
# undef  __cpp_lib_constexpr_memory
# define __cpp_lib_constexpr_memory                     202202L
# define __cpp_lib_constexpr_typeinfo                   202106L
# define __cpp_lib_expected                             202211L
# define __cpp_lib_format_ranges                        202207L
// # define __cpp_lib_formatters                           202302L
# define __cpp_lib_forward_like                         202207L
# define __cpp_lib_invoke_r                             202106L
# define __cpp_lib_is_scoped_enum                       202011L
// # define __cpp_lib_mdspan                               202207L
// # define __cpp_lib_move_only_function                   202110L
# undef  __cpp_lib_optional
# define __cpp_lib_optional                             202110L
// # define __cpp_lib_out_ptr                              202106L
// # define __cpp_lib_print                                202207L
# define __cpp_lib_ranges_as_rvalue                     202207L
// # define __cpp_lib_ranges_chunk                         202202L
# define __cpp_lib_ranges_chunk_by                      202202L
// # define __cpp_lib_ranges_iota                          202202L
// # define __cpp_lib_ranges_join_with                     202202L
# define __cpp_lib_ranges_repeat                        202207L
// # define __cpp_lib_ranges_slide                         202202L
// # define __cpp_lib_ranges_starts_ends_with              202106L
# define __cpp_lib_ranges_to_container                  202202L
// # define __cpp_lib_ranges_zip                           202110L
// # define __cpp_lib_reference_from_temporary             202202L
// # define __cpp_lib_spanstream                           202106L
// # define __cpp_lib_stacktrace                           202011L
# define __cpp_lib_stdatomic_h                          202011L
# define __cpp_lib_string_contains                      202011L
# define __cpp_lib_string_resize_and_overwrite          202110L
// # define __cpp_lib_to_string                            202306L
# define __cpp_lib_to_underlying                        202102L
# define __cpp_lib_unreachable                          202202L
#endif
# 456 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 26
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 458 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
// # define __cpp_lib_associative_heterogeneous_insertion  202306L
# undef  __cpp_lib_bind_back
// # define __cpp_lib_bind_back                            202306L
# undef  __cpp_lib_bind_front
# define __cpp_lib_bind_front                           202306L
# define __cpp_lib_bitset                               202306L
// # define __cpp_lib_copyable_function                    202306L
// # define __cpp_lib_fstream_native_handle                202306L
// # define __cpp_lib_function_ref                         202306L
// # define __cpp_lib_hazard_pointer                       202306L
# define __cpp_lib_ratio                                202306L
// # define __cpp_lib_rcu                                  202306L
// # define __cpp_lib_smart_ptr_owner_equality             202306L
// # define __cpp_lib_sstream_from_string_view             202306L
// # define __cpp_lib_submdspan                            202306L
// # define __cpp_lib_text_encoding                        202306L
# undef  __cpp_lib_to_chars
// # define __cpp_lib_to_chars                             202306L
// # define __cpp_lib_within_lifetime                      202306L
#endif
# 478 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3

// clang-format on

#endif // _LIBCPP_VERSIONH
# 482 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/version" 3
#endif /* version expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 2 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stddef.h expanded by -frewrite-includes */
#include <stddef.h>
#else /* stddef.h expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_ptrdiff_t) || defined(__need_size_t) || \
    defined(__need_wchar_t) || defined(__need_NULL) || defined(__need_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#endif
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* expanded by -frewrite-includes */
#include_next <stddef.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_STDDEF_H)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#define _LIBCPP_STDDEF_H

/*
    stddef.h synopsis

Macros:

    offsetof(type,member-designator)
    NULL

Types:

    ptrdiff_t
    size_t
    max_align_t // C++11
    nullptr_t

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<stddef.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stddef.h expanded by -frewrite-includes */
#    include_next <stddef.h>
#else /* stddef.h expanded by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 1 3
/*===---- stddef.h - Basic type definitions --------------------------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

/*
 * This header is designed to be included multiple times. If any of the __need_
 * macros are defined, then only that subset of interfaces are provided. This
 * can be useful for POSIX headers that need to not expose all of stddef.h, but
 * need to use some of its interfaces. Otherwise this header provides all of
 * the expected interfaces.
 *
 * When clang modules are enabled, this header is a textual header. It ignores
 * its header guard so that multiple submodules can export its interfaces.
 * Take module SM with submodules A and B, whose headers both include stddef.h
 * When SM.A builds, __STDDEF_H will be defined. When SM.B builds, the
 * definition from SM.A will leak when building without local submodule
 * visibility. stddef.h wouldn't include any of its implementation headers, and
 * SM.B wouldn't import any of the stddef modules, and SM.B's `export *`
 * wouldn't export any stddef interfaces as expected. However, since stddef.h
 * ignores its header guard when building with modules, it all works as
 * expected.
 *
 * When clang modules are not enabled, the header guards can function in the
 * normal simple fashion.
 */
#if 0 /* disabled by -frewrite-includes */
#if !defined(__STDDEF_H) || __has_feature(modules) ||                          \
    (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1) ||        \
    defined(__need_ptrdiff_t) || defined(__need_size_t) ||                     \
    defined(__need_rsize_t) || defined(__need_wchar_t) ||                      \
    defined(__need_NULL) || defined(__need_nullptr_t) ||                       \
    defined(__need_unreachable) || defined(__need_max_align_t) ||              \
    defined(__need_offsetof) || defined(__need_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(__need_ptrdiff_t) && !defined(__need_size_t) &&                   \
    !defined(__need_rsize_t) && !defined(__need_wchar_t) &&                    \
    !defined(__need_NULL) && !defined(__need_nullptr_t) &&                     \
    !defined(__need_unreachable) && !defined(__need_max_align_t) &&            \
    !defined(__need_offsetof) && !defined(__need_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#define __STDDEF_H
#define __need_ptrdiff_t
#define __need_size_t
/* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
 * enabled. */
#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 50 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#define __need_rsize_t
#endif
# 52 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#define __need_wchar_t
#define __need_NULL
#if 0 /* disabled by -frewrite-includes */
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) ||              \
    defined(__cplusplus)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 56 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#define __need_nullptr_t
#endif
# 58 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 59 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#define __need_unreachable
#endif
# 61 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* disabled by -frewrite-includes */
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) ||              \
    (defined(__cplusplus) && __cplusplus >= 201103L)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 63 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#define __need_max_align_t
#endif
# 65 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#define __need_offsetof
/* wint_t is provided by <wchar.h> and not <stddef.h>. It's here
 * for compatibility, but must be explicitly requested. Therefore
 * __need_wint_t is intentionally not defined here. */
#endif
# 70 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 72 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_ptrdiff_t.h expanded by -frewrite-includes */
#include <__stddef_ptrdiff_t.h>
#else /* __stddef_ptrdiff_t.h expanded by -frewrite-includes */
# 72 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_ptrdiff_t.h" 1 3
/*===---- __stddef_ptrdiff_t.h - Definition of ptrdiff_t -------------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

#ifndef _PTRDIFF_T
#define _PTRDIFF_T

typedef __PTRDIFF_TYPE__ ptrdiff_t;

#endif
# 16 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_ptrdiff_t.h" 3
#endif /* __stddef_ptrdiff_t.h expanded by -frewrite-includes */
# 73 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 2 3
#undef __need_ptrdiff_t
#endif /* defined(__need_ptrdiff_t) */
# 75 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 77 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_size_t.h expanded by -frewrite-includes */
#include <__stddef_size_t.h>
#else /* __stddef_size_t.h expanded by -frewrite-includes */
# 77 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_size_t.h" 1 3
/*===---- __stddef_size_t.h - Definition of size_t -------------------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

#ifndef _SIZE_T
#define _SIZE_T

typedef __SIZE_TYPE__ size_t;

#endif
# 16 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_size_t.h" 3
#endif /* __stddef_size_t.h expanded by -frewrite-includes */
# 78 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 2 3
#undef __need_size_t
#endif /*defined(__need_size_t) */
# 80 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_rsize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 82 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__stddef_rsize_t.h>
#endif /* expanded by -frewrite-includes */
# 82 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 83 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#undef __need_rsize_t
#endif /* defined(__need_rsize_t) */
# 85 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_wchar_t.h expanded by -frewrite-includes */
#include <__stddef_wchar_t.h>
#else /* __stddef_wchar_t.h expanded by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_wchar_t.h" 1 3
/*===---- __stddef_wchar.h - Definition of wchar_t -------------------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

#if 0 /* disabled by -frewrite-includes */
#if !defined(__cplusplus) || (defined(_MSC_VER) && !_NATIVE_WCHAR_T_DEFINED)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 11 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_wchar_t.h" 3

#ifndef _WCHAR_T
#define _WCHAR_T

#ifdef _MSC_EXTENSIONS
#define _WCHAR_T_DEFINED
#endif
# 18 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_wchar_t.h" 3

typedef __WCHAR_TYPE__ wchar_t;

#endif
# 22 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_wchar_t.h" 3

#endif
# 24 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_wchar_t.h" 3
#endif /* __stddef_wchar_t.h expanded by -frewrite-includes */
# 88 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 2 3
#undef __need_wchar_t
#endif /* defined(__need_wchar_t) */
# 90 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_NULL)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 92 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_null.h expanded by -frewrite-includes */
#include <__stddef_null.h>
#else /* __stddef_null.h expanded by -frewrite-includes */
# 92 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 1 3
/*===---- __stddef_null.h - Definition of NULL -----------------------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

#if 0 /* disabled by -frewrite-includes */
#if !defined(NULL) || !__has_feature(modules)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 11 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 3

/* linux/stddef.h will define NULL to 0. glibc (and other) headers then define
 * __need_NULL and rely on stddef.h to redefine NULL to the correct value again.
 * Modules don't support redefining macros like that, but support that pattern
 * in the non-modules case.
 */
#undef NULL

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if !defined(__MINGW32__) && !defined(_MSC_VER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 3
#define NULL __null
#else
# 23 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 3
#define NULL 0
#endif
# 25 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 3
#else
# 26 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 3
#define NULL ((void*)0)
#endif
# 28 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 3

#endif
# 30 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 3
#endif /* __stddef_null.h expanded by -frewrite-includes */
# 93 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 2 3
#undef __need_NULL
#endif /* defined(__need_NULL) */
# 95 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_nullptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 97 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_nullptr_t.h expanded by -frewrite-includes */
#include <__stddef_nullptr_t.h>
#else /* __stddef_nullptr_t.h expanded by -frewrite-includes */
# 97 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_nullptr_t.h" 1 3
/*===---- __stddef_nullptr_t.h - Definition of nullptr_t -------------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

#ifndef _NULLPTR_T
#define _NULLPTR_T

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_nullptr_t.h" 3
namespace std {
typedef decltype(nullptr) nullptr_t;
}
using ::std::nullptr_t;
#endif
# 20 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_nullptr_t.h" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_nullptr_t.h" 3
typedef typeof(nullptr) nullptr_t;
#endif
# 23 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_nullptr_t.h" 3

#endif
# 25 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_nullptr_t.h" 3
#endif /* __stddef_nullptr_t.h expanded by -frewrite-includes */
# 98 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 2 3
#undef __need_nullptr_t
#endif /* defined(__need_nullptr_t) */
# 100 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_unreachable)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 102 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__stddef_unreachable.h>
#endif /* expanded by -frewrite-includes */
# 102 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 103 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#undef __need_unreachable
#endif /* defined(__need_unreachable) */
# 105 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 107 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_max_align_t.h expanded by -frewrite-includes */
#include <__stddef_max_align_t.h>
#else /* __stddef_max_align_t.h expanded by -frewrite-includes */
# 107 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_max_align_t.h" 1 3
/*===---- __stddef_max_align_t.h - Definition of max_align_t ---------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

#ifndef __CLANG_MAX_ALIGN_T_DEFINED
#define __CLANG_MAX_ALIGN_T_DEFINED

#if 0 /* disabled by -frewrite-includes */
#if defined(_MSC_VER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_max_align_t.h" 3
typedef double max_align_t;
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__APPLE__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_max_align_t.h" 3
typedef long double max_align_t;
#else
# 18 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_max_align_t.h" 3
// Define 'max_align_t' to match the GCC definition.
typedef struct {
  long long __clang_max_align_nonce1
      __attribute__((__aligned__(__alignof__(long long))));
  long double __clang_max_align_nonce2
      __attribute__((__aligned__(__alignof__(long double))));
} max_align_t;
#endif
# 26 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_max_align_t.h" 3

#endif
# 28 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_max_align_t.h" 3
#endif /* __stddef_max_align_t.h expanded by -frewrite-includes */
# 108 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 2 3
#undef __need_max_align_t
#endif /* defined(__need_max_align_t) */
# 110 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_offsetof)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 112 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_offsetof.h expanded by -frewrite-includes */
#include <__stddef_offsetof.h>
#else /* __stddef_offsetof.h expanded by -frewrite-includes */
# 112 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_offsetof.h" 1 3
/*===---- __stddef_offsetof.h - Definition of offsetof ---------------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

#ifndef offsetof
#define offsetof(t, d) __builtin_offsetof(t, d)
#endif
# 13 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_offsetof.h" 3
#endif /* __stddef_offsetof.h expanded by -frewrite-includes */
# 113 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 2 3
#undef __need_offsetof
#endif /* defined(__need_offsetof) */
# 115 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

/* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
__WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
#if 0 /* disabled by -frewrite-includes */
#if defined(__need_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 119 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__stddef_wint_t.h>
#endif /* expanded by -frewrite-includes */
# 119 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 120 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#undef __need_wint_t
#endif /* __need_wint_t */
# 122 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#endif
# 124 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#endif /* stddef.h expanded by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 2 3
#  endif
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#ifdef __cplusplus
    typedef decltype(nullptr) nullptr_t;
#endif
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#endif // _LIBCPP_STDDEF_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#endif /* stddef.h expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 2 3

#ifndef _LIBCPP_STDDEF_H
#   error <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header. \
          This usually means that your header search paths are not configured properly. \
          The header search paths should contain the C++ Standard Library headers before \
          any C Standard Library, and you are probably using compiler flags that make that \
          not be the case.
#endif
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3
#endif
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3

_LIBCPP_BEGIN_NAMESPACE_STD

using ::nullptr_t;
using ::ptrdiff_t _LIBCPP_USING_IF_EXISTS;
using ::size_t _LIBCPP_USING_IF_EXISTS;

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_CXX03_LANG)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3
using ::max_align_t _LIBCPP_USING_IF_EXISTS;
#endif
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3

_LIBCPP_END_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3
namespace std  // purposefully not versioned
{
enum class byte : unsigned char {};

_LIBCPP_HIDE_FROM_ABI constexpr byte  operator| (byte  __lhs, byte __rhs) noexcept
{
    return static_cast<byte>(
      static_cast<unsigned char>(
         static_cast<unsigned int>(__lhs) | static_cast<unsigned int>(__rhs)
    ));
}

_LIBCPP_HIDE_FROM_ABI constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept
{ return __lhs = __lhs | __rhs; }

_LIBCPP_HIDE_FROM_ABI constexpr byte  operator& (byte  __lhs, byte __rhs) noexcept
{
    return static_cast<byte>(
      static_cast<unsigned char>(
         static_cast<unsigned int>(__lhs) & static_cast<unsigned int>(__rhs)
    ));
}

_LIBCPP_HIDE_FROM_ABI constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept
{ return __lhs = __lhs & __rhs; }

_LIBCPP_HIDE_FROM_ABI constexpr byte  operator^ (byte  __lhs, byte __rhs) noexcept
{
    return static_cast<byte>(
      static_cast<unsigned char>(
         static_cast<unsigned int>(__lhs) ^ static_cast<unsigned int>(__rhs)
    ));
}

_LIBCPP_HIDE_FROM_ABI constexpr byte& operator^=(byte& __lhs, byte __rhs) noexcept
{ return __lhs = __lhs ^ __rhs; }

_LIBCPP_HIDE_FROM_ABI constexpr byte  operator~ (byte __b) noexcept
{
    return static_cast<byte>(
      static_cast<unsigned char>(
        ~static_cast<unsigned int>(__b)
    ));
}

template <class _Tp>
using _EnableByteOverload = __enable_if_t<is_integral<_Tp>::value, byte>;

template <class _Integer>
_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer> &
  operator<<=(byte& __lhs, _Integer __shift) noexcept
  { return __lhs = __lhs << __shift; }

template <class _Integer>
_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer>
  operator<< (byte  __lhs, _Integer __shift) noexcept
  { return static_cast<byte>(static_cast<unsigned char>(static_cast<unsigned int>(__lhs) << __shift)); }

template <class _Integer>
_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer> &
  operator>>=(byte& __lhs, _Integer __shift) noexcept
  { return __lhs = __lhs >> __shift; }

template <class _Integer>
_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer>
  operator>> (byte  __lhs, _Integer __shift) noexcept
  { return static_cast<byte>(static_cast<unsigned char>(static_cast<unsigned int>(__lhs) >> __shift)); }

template <class _Integer, class = _EnableByteOverload<_Integer> >
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Integer
  to_integer(byte __b) noexcept { return static_cast<_Integer>(__b); }

} // namespace std

#endif
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3

#endif // _LIBCPP_CSTDDEF
# 147 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstddef" 3
#endif /* cstddef expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/access.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/access.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/access.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/access.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, size_t _Np>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp*
begin(_Tp (&__array)[_Np])
{
    return __array;
}

template <class _Tp, size_t _Np>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp*
end(_Tp (&__array)[_Np])
{
    return __array + _Np;
}

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_CXX03_LANG)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/access.h" 3

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto
begin(_Cp& __c) -> decltype(__c.begin())
{
    return __c.begin();
}

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto
begin(const _Cp& __c) -> decltype(__c.begin())
{
    return __c.begin();
}

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto
end(_Cp& __c) -> decltype(__c.end())
{
    return __c.end();
}

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto
end(const _Cp& __c) -> decltype(__c.end())
{
    return __c.end();
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/access.h" 3

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
auto cbegin(const _Cp& __c) -> decltype(_VSTD::begin(__c))
{
    return _VSTD::begin(__c);
}

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
auto cend(const _Cp& __c) -> decltype(_VSTD::end(__c))
{
    return _VSTD::end(__c);
}

#endif
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/access.h" 3


#else  // defined(_LIBCPP_CXX03_LANG)
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/access.h" 3

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY
typename _Cp::iterator
begin(_Cp& __c)
{
    return __c.begin();
}

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY
typename _Cp::const_iterator
begin(const _Cp& __c)
{
    return __c.begin();
}

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY
typename _Cp::iterator
end(_Cp& __c)
{
    return __c.end();
}

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY
typename _Cp::const_iterator
end(const _Cp& __c)
{
    return __c.end();
}

#endif // !defined(_LIBCPP_CXX03_LANG)
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/access.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_ACCESS_H
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/access.h" 3
#endif /* access.h expanded by -frewrite-includes */
# 680 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* advance.h expanded by -frewrite-includes */
#include <__iterator/advance.h>
#else /* advance.h expanded by -frewrite-includes */
# 680 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_ADVANCE_H
#define _LIBCPP___ITERATOR_ADVANCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* assignable.h expanded by -frewrite-includes */
#include <__concepts/assignable.h>
#else /* assignable.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_ASSIGNABLE_H
#define _LIBCPP___CONCEPTS_ASSIGNABLE_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* common_reference_with.h expanded by -frewrite-includes */
#include <__concepts/common_reference_with.h>
#else /* common_reference_with.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_reference_with.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_COMMON_REFERENCE_WITH_H
#define _LIBCPP___CONCEPTS_COMMON_REFERENCE_WITH_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* convertible_to.h expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#else /* convertible_to.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_reference_with.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/convertible_to.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_CONVERTIBLE_TO_H
#define _LIBCPP___CONCEPTS_CONVERTIBLE_TO_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/convertible_to.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/convertible_to.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_convertible.h expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#else /* is_convertible.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/convertible_to.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_CONVERTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_CONVERTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_array.h expanded by -frewrite-includes */
#include <__type_traits/is_array.h>
#else /* is_array.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_ARRAY_H
#define _LIBCPP___TYPE_TRAITS_IS_ARRAY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// TODO: Clang incorrectly reports that __is_array is true for T[0].
//       Re-enable the branch once https://llvm.org/PR54705 is fixed.
#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_array) && 0
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_array : _BoolConstant<__is_array(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3
template <class _Tp>
inline constexpr bool is_array_v = __is_array(_Tp);
#  endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3

#else
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_array : public false_type {};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[]> : public true_type {};
template <class _Tp, size_t _Np>
struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[_Np]> : public true_type {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3
template <class _Tp>
inline constexpr bool is_array_v = is_array<_Tp>::value;
#  endif
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3

#endif // __has_builtin(__is_array)
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_ARRAY_H
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_array.h" 3
#endif /* is_array.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_function.h expanded by -frewrite-includes */
#include <__type_traits/is_function.h>
#else /* is_function.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_FUNCTIONAL_H
#define _LIBCPP___TYPE_TRAITS_IS_FUNCTIONAL_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_const.h expanded by -frewrite-includes */
#include <__type_traits/is_const.h>
#else /* is_const.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_CONST_H
#define _LIBCPP___TYPE_TRAITS_IS_CONST_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_const)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_const : _BoolConstant<__is_const(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 3
template <class _Tp>
inline constexpr bool is_const_v = __is_const(_Tp);
#  endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 3

#else
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_const : public false_type {};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_const<_Tp const> : public true_type {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 3
template <class _Tp>
inline constexpr bool is_const_v = is_const<_Tp>::value;
#  endif
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 3

#endif // __has_builtin(__is_const)
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_CONST_H
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_const.h" 3
#endif /* is_const.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_reference.h expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#else /* is_reference.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_REFERENCE_H
#define _LIBCPP___TYPE_TRAITS_IS_REFERENCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_lvalue_reference) && __has_builtin(__is_rvalue_reference) && __has_builtin(__is_reference)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : _BoolConstant<__is_rvalue_reference(_Tp)> {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_reference : _BoolConstant<__is_reference(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 3
template <class _Tp>
inline constexpr bool is_reference_v = __is_reference(_Tp);
template <class _Tp>
inline constexpr bool is_lvalue_reference_v = __is_lvalue_reference(_Tp);
template <class _Tp>
inline constexpr bool is_rvalue_reference_v = __is_rvalue_reference(_Tp);
#  endif
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 3

#else // __has_builtin(__is_lvalue_reference) && etc...
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : public false_type {};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference<_Tp&> : public true_type {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : public false_type {};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference<_Tp&&> : public true_type {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_reference : public false_type {};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&> : public true_type {};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&&> : public true_type {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 3
template <class _Tp>
inline constexpr bool is_reference_v = is_reference<_Tp>::value;

template <class _Tp>
inline constexpr bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value;

template <class _Tp>
inline constexpr bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value;
#  endif
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 3

#endif // __has_builtin(__is_lvalue_reference) && etc...
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_REFERENCE_H
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference.h" 3
#endif /* is_reference.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_function)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_function : integral_constant<bool, __is_function(_Tp)> {};

#else
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_function
    : public integral_constant<bool, !(is_reference<_Tp>::value || is_const<const _Tp>::value)> {};

#endif // __has_builtin(__is_function)
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 3
template <class _Tp>
inline constexpr bool is_function_v = is_function<_Tp>::value;
#endif
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_FUNCTIONAL_H
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_function.h" 3
#endif /* is_function.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_void.h expanded by -frewrite-includes */
#include <__type_traits/is_void.h>
#else /* is_void.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_VOID_H
#define _LIBCPP___TYPE_TRAITS_IS_VOID_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_same.h expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#else /* is_same.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_same.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_SAME_H
#define _LIBCPP___TYPE_TRAITS_IS_SAME_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_same.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_same.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_same.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_same.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_same.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_same.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_same.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, class _Up>
struct _LIBCPP_TEMPLATE_VIS is_same : _BoolConstant<__is_same(_Tp, _Up)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_same.h" 3
template <class _Tp, class _Up>
inline constexpr bool is_same_v = __is_same(_Tp, _Up);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_same.h" 3

// _IsSame<T,U> has the same effect as is_same<T,U> but instantiates fewer types:
// is_same<A,B> and is_same<C,D> are guaranteed to be different types, but
// _IsSame<A,B> and _IsSame<C,D> are the same type (namely, false_type).
// Neither GCC nor Clang can mangle the __is_same builtin, so _IsSame
// mustn't be directly used anywhere that contributes to name-mangling
// (such as in a dependent return type).

template <class _Tp, class _Up>
using _IsSame = _BoolConstant<__is_same(_Tp, _Up)>;

template <class _Tp, class _Up>
using _IsNotSame = _BoolConstant<!__is_same(_Tp, _Up)>;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_SAME_H
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_same.h" 3
#endif /* is_same.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_void)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_void : _BoolConstant<__is_void(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3
template <class _Tp>
inline constexpr bool is_void_v = __is_void(_Tp);
#  endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3

#else
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_void : public is_same<__remove_cv_t<_Tp>, void> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3
template <class _Tp>
inline constexpr bool is_void_v = is_void<_Tp>::value;
#  endif
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3

#endif // __has_builtin(__is_void)
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_VOID_H
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_void.h" 3
#endif /* is_void.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* remove_reference.h expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#else /* remove_reference.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_reference.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_REFERENCE_H
#define _LIBCPP___TYPE_TRAITS_REMOVE_REFERENCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_reference.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_reference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_reference.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_reference.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_reference.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_reference.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_reference.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__remove_reference_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_reference.h" 3
template <class _Tp>
struct remove_reference {
  using type _LIBCPP_NODEBUG = __remove_reference_t(_Tp);
};

template <class _Tp>
using __libcpp_remove_reference_t = __remove_reference_t(_Tp);
#else
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_reference.h" 3
// clang-format off
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference        {typedef _LIBCPP_NODEBUG _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&>  {typedef _LIBCPP_NODEBUG _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG _Tp type;};
// clang-format on

template <class _Tp>
using __libcpp_remove_reference_t = typename remove_reference<_Tp>::type;
#endif // __has_builtin(__remove_reference_t)
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_reference.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_reference.h" 3
template <class _Tp>
using remove_reference_t = __libcpp_remove_reference_t<_Tp>;
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_reference.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_REMOVE_REFERENCE_H
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_reference.h" 3
#endif /* remove_reference.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* declval.h expanded by -frewrite-includes */
#include <__utility/declval.h>
#else /* declval.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/declval.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_DECLVAL_H
#define _LIBCPP___UTILITY_DECLVAL_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/declval.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/declval.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/declval.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/declval.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/declval.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Suppress deprecation notice for volatile-qualified return type resulting
// from volatile-qualified types _Tp.
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Tp>
_Tp&& __declval(int);
template <class _Tp>
_Tp __declval(long);
_LIBCPP_SUPPRESS_DEPRECATED_POP

template <class _Tp>
decltype(std::__declval<_Tp>(0)) declval() _NOEXCEPT;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___UTILITY_DECLVAL_H
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/declval.h" 3
#endif /* declval.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _T1, class _T2>
struct _LIBCPP_TEMPLATE_VIS is_convertible : public integral_constant<bool, __is_convertible(_T1, _T2)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3
template <class _From, class _To>
inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_CONVERTIBLE_H
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_convertible.h" 3
#endif /* is_convertible.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/convertible_to.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/convertible_to.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/convertible_to.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/convertible_to.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/convertible_to.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/convertible_to.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/convertible_to.h" 3

// [concept.convertible]

template <class _From, class _To>
concept convertible_to = is_convertible_v<_From, _To> && requires { static_cast<_To>(std::declval<_From>()); };

#endif // _LIBCPP_STD_VER >= 20
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/convertible_to.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_CONVERTIBLE_TO_H
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/convertible_to.h" 3
#endif /* convertible_to.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_reference_with.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* same_as.h expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#else /* same_as.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_reference_with.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/same_as.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_SAME_AS_H
#define _LIBCPP___CONCEPTS_SAME_AS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/same_as.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/same_as.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/same_as.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/same_as.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/same_as.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/same_as.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/same_as.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/same_as.h" 3

// [concept.same]

template <class _Tp, class _Up>
concept __same_as_impl = _IsSame<_Tp, _Up>::value;

template <class _Tp, class _Up>
concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>;

#endif // _LIBCPP_STD_VER >= 20
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/same_as.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_SAME_AS_H
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/same_as.h" 3
#endif /* same_as.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_reference_with.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_reference_with.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_reference_with.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* common_reference.h expanded by -frewrite-includes */
#include <__type_traits/common_reference.h>
#else /* common_reference.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_reference_with.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_COMMON_REFERENCE_H
#define _LIBCPP___TYPE_TRAITS_COMMON_REFERENCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* common_type.h expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#else /* common_type.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_COMMON_TYPE_H
#define _LIBCPP___TYPE_TRAITS_COMMON_TYPE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* conditional.h expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#else /* conditional.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conditional.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_CONDITIONAL_H
#define _LIBCPP___TYPE_TRAITS_CONDITIONAL_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conditional.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conditional.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conditional.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conditional.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conditional.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <bool>
struct _IfImpl;

template <>
struct _IfImpl<true> {
  template <class _IfRes, class _ElseRes>
  using _Select _LIBCPP_NODEBUG = _IfRes;
};

template <>
struct _IfImpl<false> {
  template <class _IfRes, class _ElseRes>
  using _Select _LIBCPP_NODEBUG = _ElseRes;
};

template <bool _Cond, class _IfRes, class _ElseRes>
using _If _LIBCPP_NODEBUG = typename _IfImpl<_Cond>::template _Select<_IfRes, _ElseRes>;

template <bool _Bp, class _If, class _Then>
struct _LIBCPP_TEMPLATE_VIS conditional {
  using type _LIBCPP_NODEBUG = _If;
};
template <class _If, class _Then>
struct _LIBCPP_TEMPLATE_VIS conditional<false, _If, _Then> {
  using type _LIBCPP_NODEBUG = _Then;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conditional.h" 3
template <bool _Bp, class _IfRes, class _ElseRes>
using conditional_t _LIBCPP_NODEBUG = typename conditional<_Bp, _IfRes, _ElseRes>::type;
#endif
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conditional.h" 3

// Helper so we can use "conditional_t" in all language versions.
template <bool _Bp, class _If, class _Then>
using __conditional_t _LIBCPP_NODEBUG = typename conditional<_Bp, _If, _Then>::type;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_CONDITIONAL_H
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conditional.h" 3
#endif /* conditional.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* decay.h expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#else /* decay.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_DECAY_H
#define _LIBCPP___TYPE_TRAITS_DECAY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* add_pointer.h expanded by -frewrite-includes */
#include <__type_traits/add_pointer.h>
#else /* add_pointer.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_ADD_POINTER_H
#define _LIBCPP___TYPE_TRAITS_ADD_POINTER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_referenceable.h expanded by -frewrite-includes */
#include <__type_traits/is_referenceable.h>
#else /* is_referenceable.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_referenceable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_REFERENCEABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_REFERENCEABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_referenceable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_referenceable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_referenceable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_referenceable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_referenceable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_referenceable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_referenceable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_referenceable.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_referenceable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_referenceable)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_referenceable.h" 3
template <class _Tp>
struct __libcpp_is_referenceable : integral_constant<bool, __is_referenceable(_Tp)> {};
#else
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_referenceable.h" 3
struct __libcpp_is_referenceable_impl {
  template <class _Tp>
  static _Tp& __test(int);
  template <class _Tp>
  static false_type __test(...);
};

template <class _Tp>
struct __libcpp_is_referenceable
    : integral_constant<bool, _IsNotSame<decltype(__libcpp_is_referenceable_impl::__test<_Tp>(0)), false_type>::value> {
};
#endif // __has_builtin(__is_referenceable)
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_referenceable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_REFERENCEABLE_H
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_referenceable.h" 3
#endif /* is_referenceable.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_void.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__add_pointer)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3

template <class _Tp>
using __add_pointer_t = __add_pointer(_Tp);

#else
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3
template <class _Tp, bool = __libcpp_is_referenceable<_Tp>::value || is_void<_Tp>::value>
struct __add_pointer_impl {
  typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tp>* type;
};
template <class _Tp>
struct __add_pointer_impl<_Tp, false> {
  typedef _LIBCPP_NODEBUG _Tp type;
};

template <class _Tp>
using __add_pointer_t = typename __add_pointer_impl<_Tp>::type;

#endif // !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__add_pointer)
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3

template <class _Tp>
struct add_pointer {
  using type _LIBCPP_NODEBUG = __add_pointer_t<_Tp>;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3
template <class _Tp>
using add_pointer_t = __add_pointer_t<_Tp>;
#endif
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_ADD_POINTER_H
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_pointer.h" 3
#endif /* add_pointer.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_array.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_function.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_referenceable.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* remove_extent.h expanded by -frewrite-includes */
#include <__type_traits/remove_extent.h>
#else /* remove_extent.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_extent.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_EXTENT_H
#define _LIBCPP___TYPE_TRAITS_REMOVE_EXTENT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_extent.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_extent.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_extent.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_extent.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_extent.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_extent.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_extent.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__remove_extent)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_extent.h" 3
template <class _Tp>
struct remove_extent {
  using type _LIBCPP_NODEBUG = __remove_extent(_Tp);
};

template <class _Tp>
using __remove_extent_t = __remove_extent(_Tp);
#else
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_extent.h" 3
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS remove_extent {
  typedef _Tp type;
};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[]> {
  typedef _Tp type;
};
template <class _Tp, size_t _Np>
struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[_Np]> {
  typedef _Tp type;
};

template <class _Tp>
using __remove_extent_t = typename remove_extent<_Tp>::type;
#endif // __has_builtin(__remove_extent)
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_extent.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_extent.h" 3
template <class _Tp>
using remove_extent_t = __remove_extent_t<_Tp>;
#endif
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_extent.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_REMOVE_EXTENT_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_extent.h" 3
#endif /* remove_extent.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__decay)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
template <class _Tp>
using __decay_t _LIBCPP_NODEBUG = __decay(_Tp);

template <class _Tp>
struct decay {
  using type _LIBCPP_NODEBUG = __decay_t<_Tp>;
};

#else
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
template <class _Up, bool>
struct __decay {
  typedef _LIBCPP_NODEBUG __remove_cv_t<_Up> type;
};

template <class _Up>
struct __decay<_Up, true> {
public:
  typedef _LIBCPP_NODEBUG typename conditional<
      is_array<_Up>::value,
      __add_pointer_t<__remove_extent_t<_Up> >,
      typename conditional<is_function<_Up>::value, typename add_pointer<_Up>::type, __remove_cv_t<_Up> >::type >::type
      type;
};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS decay {
private:
  typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tp> _Up;

public:
  typedef _LIBCPP_NODEBUG typename __decay<_Up, __libcpp_is_referenceable<_Up>::value>::type type;
};

template <class _Tp>
using __decay_t = typename decay<_Tp>::type;
#endif // __has_builtin(__decay)
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
template <class _Tp>
using decay_t = __decay_t<_Tp>;
#endif
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_DECAY_H
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/decay.h" 3
#endif /* decay.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* remove_cvref.h expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#else /* remove_cvref.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_CVREF_H
#define _LIBCPP___TYPE_TRAITS_REMOVE_CVREF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__remove_cvref) && !defined(_LIBCPP_COMPILER_GCC)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3
template <class _Tp>
using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp);
#else
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3
template <class _Tp>
using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cv_t<__libcpp_remove_reference_t<_Tp> >;
#endif // __has_builtin(__remove_cvref)
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3

template <class _Tp, class _Up>
struct __is_same_uncvref : _IsSame<__remove_cvref_t<_Tp>, __remove_cvref_t<_Up> > {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3
template <class _Tp>
struct remove_cvref {
  using type _LIBCPP_NODEBUG = __remove_cvref_t<_Tp>;
};

template <class _Tp>
using remove_cvref_t = __remove_cvref_t<_Tp>;
#endif
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_REMOVE_CVREF_H
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_cvref.h" 3
#endif /* remove_cvref.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* void_t.h expanded by -frewrite-includes */
#include <__type_traits/void_t.h>
#else /* void_t.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/void_t.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_VOID_T_H
#define _LIBCPP___TYPE_TRAITS_VOID_T_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/void_t.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/void_t.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/void_t.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/void_t.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/void_t.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/void_t.h" 3
template <class...>
using void_t = void;
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/void_t.h" 3

template <class...>
using __void_t = void;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_VOID_T_H
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/void_t.h" 3
#endif /* void_t.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3
// Let COND_RES(X, Y) be:
template <class _Tp, class _Up>
using __cond_type = decltype(false ? std::declval<_Tp>() : std::declval<_Up>());

template <class _Tp, class _Up, class = void>
struct __common_type3 {};

// sub-bullet 4 - "if COND_RES(CREF(D1), CREF(D2)) denotes a type..."
template <class _Tp, class _Up>
struct __common_type3<_Tp, _Up, void_t<__cond_type<const _Tp&, const _Up&>>> {
  using type = remove_cvref_t<__cond_type<const _Tp&, const _Up&>>;
};

template <class _Tp, class _Up, class = void>
struct __common_type2_imp : __common_type3<_Tp, _Up> {};
#else
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3
template <class _Tp, class _Up, class = void>
struct __common_type2_imp {};
#endif
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3

// sub-bullet 3 - "if decay_t<decltype(false ? declval<D1>() : declval<D2>())> ..."
template <class _Tp, class _Up>
struct __common_type2_imp<_Tp, _Up, __void_t<decltype(true ? std::declval<_Tp>() : std::declval<_Up>())> > {
  typedef _LIBCPP_NODEBUG __decay_t<decltype(true ? std::declval<_Tp>() : std::declval<_Up>())> type;
};

template <class, class = void>
struct __common_type_impl {};

template <class... _Tp>
struct __common_types;
template <class... _Tp>
struct _LIBCPP_TEMPLATE_VIS common_type;

template <class _Tp, class _Up>
struct __common_type_impl< __common_types<_Tp, _Up>, __void_t<typename common_type<_Tp, _Up>::type> > {
  typedef typename common_type<_Tp, _Up>::type type;
};

template <class _Tp, class _Up, class _Vp, class... _Rest>
struct __common_type_impl<__common_types<_Tp, _Up, _Vp, _Rest...>, __void_t<typename common_type<_Tp, _Up>::type> >
    : __common_type_impl<__common_types<typename common_type<_Tp, _Up>::type, _Vp, _Rest...> > {};

// bullet 1 - sizeof...(Tp) == 0

template <>
struct _LIBCPP_TEMPLATE_VIS common_type<> {};

// bullet 2 - sizeof...(Tp) == 1

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS common_type<_Tp> : public common_type<_Tp, _Tp> {};

// bullet 3 - sizeof...(Tp) == 2

// sub-bullet 1 - "If is_same_v<T1, D1> is false or ..."
template <class _Tp, class _Up>
struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up>
    : conditional<_IsSame<_Tp, __decay_t<_Tp> >::value && _IsSame<_Up, __decay_t<_Up> >::value,
                  __common_type2_imp<_Tp, _Up>,
                  common_type<__decay_t<_Tp>, __decay_t<_Up> > >::type {};

// bullet 4 - sizeof...(Tp) > 2

template <class _Tp, class _Up, class _Vp, class... _Rest>
struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up, _Vp, _Rest...>
    : __common_type_impl<__common_types<_Tp, _Up, _Vp, _Rest...> > {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3
template <class... _Tp>
using common_type_t = typename common_type<_Tp...>::type;
#endif
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_COMMON_TYPE_H
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_type.h" 3
#endif /* common_type.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* copy_cv.h expanded by -frewrite-includes */
#include <__type_traits/copy_cv.h>
#else /* copy_cv.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cv.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_COPY_CV_H
#define _LIBCPP___TYPE_TRAITS_COPY_CV_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cv.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cv.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* add_const.h expanded by -frewrite-includes */
#include <__type_traits/add_const.h>
#else /* add_const.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cv.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_const.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_ADD_CONST_H
#define _LIBCPP___TYPE_TRAITS_ADD_CONST_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_const.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_const.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_const.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_const.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_const.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS add_const {
  typedef _LIBCPP_NODEBUG const _Tp type;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_const.h" 3
template <class _Tp>
using add_const_t = typename add_const<_Tp>::type;
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_const.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_ADD_CONST_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_const.h" 3
#endif /* add_const.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cv.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* add_cv.h expanded by -frewrite-includes */
#include <__type_traits/add_cv.h>
#else /* add_cv.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cv.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_cv.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_ADD_CV_H
#define _LIBCPP___TYPE_TRAITS_ADD_CV_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_cv.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_cv.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_cv.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_cv.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_cv.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS add_cv {
  typedef _LIBCPP_NODEBUG const volatile _Tp type;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_cv.h" 3
template <class _Tp>
using add_cv_t = typename add_cv<_Tp>::type;
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_cv.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_ADD_CV_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_cv.h" 3
#endif /* add_cv.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cv.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* add_volatile.h expanded by -frewrite-includes */
#include <__type_traits/add_volatile.h>
#else /* add_volatile.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cv.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_volatile.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_ADD_VOLATILE_H
#define _LIBCPP___TYPE_TRAITS_ADD_VOLATILE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_volatile.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_volatile.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_volatile.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_volatile.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_volatile.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS add_volatile {
  typedef _LIBCPP_NODEBUG volatile _Tp type;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_volatile.h" 3
template <class _Tp>
using add_volatile_t = typename add_volatile<_Tp>::type;
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_volatile.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_ADD_VOLATILE_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_volatile.h" 3
#endif /* add_volatile.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cv.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cv.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cv.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cv.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Let COPYCV(FROM, TO) be an alias for type TO with the addition of FROM's
// top-level cv-qualifiers.
template <class _From, class _To>
struct __copy_cv {
  using type = _To;
};

template <class _From, class _To>
struct __copy_cv<const _From, _To> {
  using type = typename add_const<_To>::type;
};

template <class _From, class _To>
struct __copy_cv<volatile _From, _To> {
  using type = typename add_volatile<_To>::type;
};

template <class _From, class _To>
struct __copy_cv<const volatile _From, _To> {
  using type = typename add_cv<_To>::type;
};

template <class _From, class _To>
using __copy_cv_t = typename __copy_cv<_From, _To>::type;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_COPY_CV_H
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cv.h" 3
#endif /* copy_cv.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* copy_cvref.h expanded by -frewrite-includes */
#include <__type_traits/copy_cvref.h>
#else /* copy_cvref.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cvref.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_COPY_CVREF_H
#define _LIBCPP___TYPE_TRAITS_COPY_CVREF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cvref.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cvref.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* add_lvalue_reference.h expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#else /* add_lvalue_reference.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cvref.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_lvalue_reference.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_ADD_LVALUE_REFERENCE_H
#define _LIBCPP___TYPE_TRAITS_ADD_LVALUE_REFERENCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_lvalue_reference.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_lvalue_reference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_referenceable.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_lvalue_reference.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_lvalue_reference.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_lvalue_reference.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_lvalue_reference.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_lvalue_reference.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__add_lvalue_reference)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_lvalue_reference.h" 3

template <class _Tp>
using __add_lvalue_reference_t = __add_lvalue_reference(_Tp);

#else
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_lvalue_reference.h" 3

template <class _Tp, bool = __libcpp_is_referenceable<_Tp>::value>
struct __add_lvalue_reference_impl {
  typedef _LIBCPP_NODEBUG _Tp type;
};
template <class _Tp >
struct __add_lvalue_reference_impl<_Tp, true> {
  typedef _LIBCPP_NODEBUG _Tp& type;
};

template <class _Tp>
using __add_lvalue_reference_t = typename __add_lvalue_reference_impl<_Tp>::type;

#endif // __has_builtin(__add_lvalue_reference)
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_lvalue_reference.h" 3

template <class _Tp>
struct add_lvalue_reference {
  using type _LIBCPP_NODEBUG = __add_lvalue_reference_t<_Tp>;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_lvalue_reference.h" 3
template <class _Tp>
using add_lvalue_reference_t = __add_lvalue_reference_t<_Tp>;
#endif
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_lvalue_reference.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_ADD_LVALUE_REFERENCE_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_lvalue_reference.h" 3
#endif /* add_lvalue_reference.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cvref.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* add_rvalue_reference.h expanded by -frewrite-includes */
#include <__type_traits/add_rvalue_reference.h>
#else /* add_rvalue_reference.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cvref.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_rvalue_reference.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_ADD_RVALUE_REFERENCE_H
#define _LIBCPP___TYPE_TRAITS_ADD_RVALUE_REFERENCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_rvalue_reference.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_rvalue_reference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_referenceable.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_rvalue_reference.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_rvalue_reference.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_rvalue_reference.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_rvalue_reference.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_rvalue_reference.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__add_rvalue_reference)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_rvalue_reference.h" 3

template <class _Tp>
using __add_rvalue_reference_t = __add_rvalue_reference(_Tp);

#else
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_rvalue_reference.h" 3

template <class _Tp, bool = __libcpp_is_referenceable<_Tp>::value>
struct __add_rvalue_reference_impl {
  typedef _LIBCPP_NODEBUG _Tp type;
};
template <class _Tp >
struct __add_rvalue_reference_impl<_Tp, true> {
  typedef _LIBCPP_NODEBUG _Tp&& type;
};

template <class _Tp>
using __add_rvalue_reference_t = typename __add_rvalue_reference_impl<_Tp>::type;

#endif // __has_builtin(__add_rvalue_reference)
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_rvalue_reference.h" 3

template <class _Tp>
struct add_rvalue_reference {
  using type = __add_rvalue_reference_t<_Tp>;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_rvalue_reference.h" 3
template <class _Tp>
using add_rvalue_reference_t = __add_rvalue_reference_t<_Tp>;
#endif
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_rvalue_reference.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_ADD_RVALUE_REFERENCE_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/add_rvalue_reference.h" 3
#endif /* add_rvalue_reference.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cvref.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/copy_cv.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cvref.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cvref.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cvref.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cvref.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cvref.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _From, class _To>
struct __copy_cvref {
  using type = __copy_cv_t<_From, _To>;
};

template <class _From, class _To>
struct __copy_cvref<_From&, _To> {
  using type = __add_lvalue_reference_t<__copy_cv_t<_From, _To> >;
};

template <class _From, class _To>
struct __copy_cvref<_From&&, _To> {
  using type = __add_rvalue_reference_t<__copy_cv_t<_From, _To> >;
};

template <class _From, class _To>
using __copy_cvref_t = typename __copy_cvref<_From, _To>::type;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_COPY_CVREF_H
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/copy_cvref.h" 3
#endif /* copy_cvref.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// common_reference
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
// Let COND_RES(X, Y) be:
template <class _Xp, class _Yp>
using __cond_res = decltype(false ? std::declval<_Xp (&)()>()() : std::declval<_Yp (&)()>()());

// Let `XREF(A)` denote a unary alias template `T` such that `T<U>` denotes the same type as `U`
// with the addition of `A`'s cv and reference qualifiers, for a non-reference cv-unqualified type
// `U`.
// [Note: `XREF(A)` is `__xref<A>::template __apply`]
template <class _Tp>
struct __xref {
  template <class _Up>
  using __apply = __copy_cvref_t<_Tp, _Up>;
};

// Given types A and B, let X be remove_reference_t<A>, let Y be remove_reference_t<B>,
// and let COMMON-REF(A, B) be:
template <class _Ap, class _Bp, class _Xp = remove_reference_t<_Ap>, class _Yp = remove_reference_t<_Bp>>
struct __common_ref;

template <class _Xp, class _Yp>
using __common_ref_t = typename __common_ref<_Xp, _Yp>::__type;

template <class _Xp, class _Yp>
using __cv_cond_res = __cond_res<__copy_cv_t<_Xp, _Yp>&, __copy_cv_t<_Yp, _Xp>&>;

//    If A and B are both lvalue reference types, COMMON-REF(A, B) is
//    COND-RES(COPYCV(X, Y)&, COPYCV(Y, X)&) if that type exists and is a reference type.
// clang-format off
template <class _Ap, class _Bp, class _Xp, class _Yp>
  requires
    requires { typename __cv_cond_res<_Xp, _Yp>; } &&
    is_reference_v<__cv_cond_res<_Xp, _Yp>>
struct __common_ref<_Ap&, _Bp&, _Xp, _Yp> {
  using __type = __cv_cond_res<_Xp, _Yp>;
};
// clang-format on

//    Otherwise, let C be remove_reference_t<COMMON-REF(X&, Y&)>&&. ...
template <class _Xp, class _Yp>
using __common_ref_C = remove_reference_t<__common_ref_t<_Xp&, _Yp&>>&&;

//    .... If A and B are both rvalue reference types, C is well-formed, and
//    is_convertible_v<A, C> && is_convertible_v<B, C> is true, then COMMON-REF(A, B) is C.
// clang-format off
template <class _Ap, class _Bp, class _Xp, class _Yp>
  requires
    requires { typename __common_ref_C<_Xp, _Yp>; } &&
    is_convertible_v<_Ap&&, __common_ref_C<_Xp, _Yp>> &&
    is_convertible_v<_Bp&&, __common_ref_C<_Xp, _Yp>>
struct __common_ref<_Ap&&, _Bp&&, _Xp, _Yp> {
  using __type = __common_ref_C<_Xp, _Yp>;
};
// clang-format on

//    Otherwise, let D be COMMON-REF(const X&, Y&). ...
template <class _Tp, class _Up>
using __common_ref_D = __common_ref_t<const _Tp&, _Up&>;

//    ... If A is an rvalue reference and B is an lvalue reference and D is well-formed and
//    is_convertible_v<A, D> is true, then COMMON-REF(A, B) is D.
// clang-format off
template <class _Ap, class _Bp, class _Xp, class _Yp>
  requires
    requires { typename __common_ref_D<_Xp, _Yp>; } &&
    is_convertible_v<_Ap&&, __common_ref_D<_Xp, _Yp>>
struct __common_ref<_Ap&&, _Bp&, _Xp, _Yp> {
  using __type = __common_ref_D<_Xp, _Yp>;
};
// clang-format on

//    Otherwise, if A is an lvalue reference and B is an rvalue reference, then
//    COMMON-REF(A, B) is COMMON-REF(B, A).
template <class _Ap, class _Bp, class _Xp, class _Yp>
struct __common_ref<_Ap&, _Bp&&, _Xp, _Yp> : __common_ref<_Bp&&, _Ap&> {};

//    Otherwise, COMMON-REF(A, B) is ill-formed.
template <class _Ap, class _Bp, class _Xp, class _Yp>
struct __common_ref {};

// Note C: For the common_reference trait applied to a parameter pack [...]

template <class...>
struct common_reference;

template <class... _Types>
using common_reference_t = typename common_reference<_Types...>::type;

// bullet 1 - sizeof...(T) == 0
template <>
struct common_reference<> {};

// bullet 2 - sizeof...(T) == 1
template <class _Tp>
struct common_reference<_Tp> {
  using type = _Tp;
};

// bullet 3 - sizeof...(T) == 2
template <class _Tp, class _Up>
struct __common_reference_sub_bullet3;
template <class _Tp, class _Up>
struct __common_reference_sub_bullet2 : __common_reference_sub_bullet3<_Tp, _Up> {};
template <class _Tp, class _Up>
struct __common_reference_sub_bullet1 : __common_reference_sub_bullet2<_Tp, _Up> {};

// sub-bullet 1 - If T1 and T2 are reference types and COMMON-REF(T1, T2) is well-formed, then
// the member typedef `type` denotes that type.
template <class _Tp, class _Up>
struct common_reference<_Tp, _Up> : __common_reference_sub_bullet1<_Tp, _Up> {};

template <class _Tp, class _Up>
  requires is_reference_v<_Tp> && is_reference_v<_Up> && requires { typename __common_ref_t<_Tp, _Up>; }
struct __common_reference_sub_bullet1<_Tp, _Up> {
  using type = __common_ref_t<_Tp, _Up>;
};

// sub-bullet 2 - Otherwise, if basic_common_reference<remove_cvref_t<T1>, remove_cvref_t<T2>, XREF(T1), XREF(T2)>::type
// is well-formed, then the member typedef `type` denotes that type.
template <class, class, template <class> class, template <class> class>
struct basic_common_reference {};

template <class _Tp, class _Up>
using __basic_common_reference_t =
    typename basic_common_reference<remove_cvref_t<_Tp>,
                                    remove_cvref_t<_Up>,
                                    __xref<_Tp>::template __apply,
                                    __xref<_Up>::template __apply>::type;

template <class _Tp, class _Up>
  requires requires { typename __basic_common_reference_t<_Tp, _Up>; }
struct __common_reference_sub_bullet2<_Tp, _Up> {
  using type = __basic_common_reference_t<_Tp, _Up>;
};

// sub-bullet 3 - Otherwise, if COND-RES(T1, T2) is well-formed,
// then the member typedef `type` denotes that type.
template <class _Tp, class _Up>
  requires requires { typename __cond_res<_Tp, _Up>; }
struct __common_reference_sub_bullet3<_Tp, _Up> {
  using type = __cond_res<_Tp, _Up>;
};

// sub-bullet 4 & 5 - Otherwise, if common_type_t<T1, T2> is well-formed,
//                    then the member typedef `type` denotes that type.
//                  - Otherwise, there shall be no member `type`.
template <class _Tp, class _Up>
struct __common_reference_sub_bullet3 : common_type<_Tp, _Up> {};

// bullet 4 - If there is such a type `C`, the member typedef type shall denote the same type, if
//            any, as `common_reference_t<C, Rest...>`.
template <class _Tp, class _Up, class _Vp, class... _Rest>
  requires requires { typename common_reference_t<_Tp, _Up>; }
struct common_reference<_Tp, _Up, _Vp, _Rest...> : common_reference<common_reference_t<_Tp, _Up>, _Vp, _Rest...> {};

// bullet 5 - Otherwise, there shall be no member `type`.
template <class...>
struct common_reference {};

#endif // _LIBCPP_STD_VER >= 20
# 190 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_COMMON_REFERENCE_H
# 194 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/common_reference.h" 3
#endif /* common_reference.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_reference_with.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_reference_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_reference_with.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_reference_with.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_reference_with.h" 3

// [concept.commonref]

template <class _Tp, class _Up>
concept common_reference_with =
    same_as<common_reference_t<_Tp, _Up>, common_reference_t<_Up, _Tp>> &&
    convertible_to<_Tp, common_reference_t<_Tp, _Up>> && convertible_to<_Up, common_reference_t<_Tp, _Up>>;

#endif // _LIBCPP_STD_VER >= 20
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_reference_with.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_COMMON_REFERENCE_WITH_H
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_reference_with.h" 3
#endif /* common_reference_with.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* make_const_lvalue_ref.h expanded by -frewrite-includes */
#include <__type_traits/make_const_lvalue_ref.h>
#else /* make_const_lvalue_ref.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_const_lvalue_ref.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_MAKE_CONST_LVALUE_REF_H
#define _LIBCPP___TYPE_TRAITS_MAKE_CONST_LVALUE_REF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_const_lvalue_ref.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_const_lvalue_ref.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_const_lvalue_ref.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_const_lvalue_ref.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_const_lvalue_ref.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_const_lvalue_ref.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_const_lvalue_ref.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
using __make_const_lvalue_ref = const __libcpp_remove_reference_t<_Tp>&;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_MAKE_CONST_LVALUE_REF_H
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_const_lvalue_ref.h" 3
#endif /* make_const_lvalue_ref.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* forward.h expanded by -frewrite-includes */
#include <__utility/forward.h>
#else /* forward.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_FORWARD_H
#define _LIBCPP___UTILITY_FORWARD_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp&&
forward(_LIBCPP_LIFETIMEBOUND __libcpp_remove_reference_t<_Tp>& __t) _NOEXCEPT {
  return static_cast<_Tp&&>(__t);
}

template <class _Tp>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp&&
forward(_LIBCPP_LIFETIMEBOUND __libcpp_remove_reference_t<_Tp>&& __t) _NOEXCEPT {
  static_assert(!is_lvalue_reference<_Tp>::value, "cannot forward an rvalue as an lvalue");
  return static_cast<_Tp&&>(__t);
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___UTILITY_FORWARD_H
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward.h" 3
#endif /* forward.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 3

// [concept.assignable]

template <class _Lhs, class _Rhs>
concept assignable_from =
    is_lvalue_reference_v<_Lhs> &&
    common_reference_with<__make_const_lvalue_ref<_Lhs>, __make_const_lvalue_ref<_Rhs>> &&
    requires(_Lhs __lhs, _Rhs&& __rhs) {
      { __lhs = _VSTD::forward<_Rhs>(__rhs) } -> same_as<_Lhs>;
    };

#endif // _LIBCPP_STD_VER >= 20
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_ASSIGNABLE_H
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/assignable.h" 3
#endif /* assignable.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* concepts.h expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#else /* concepts.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_CONCEPTS_H
#define _LIBCPP___ITERATOR_CONCEPTS_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* arithmetic.h expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#else /* arithmetic.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_ARITHMETIC_H
#define _LIBCPP___CONCEPTS_ARITHMETIC_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_floating_point.h expanded by -frewrite-includes */
#include <__type_traits/is_floating_point.h>
#else /* is_floating_point.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_floating_point.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_FLOATING_POINT_H
#define _LIBCPP___TYPE_TRAITS_IS_FLOATING_POINT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_floating_point.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_floating_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_floating_point.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_floating_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_floating_point.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_floating_point.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_floating_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_floating_point.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_floating_point.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// clang-format off
template <class _Tp> struct __libcpp_is_floating_point              : public false_type {};
template <>          struct __libcpp_is_floating_point<float>       : public true_type {};
template <>          struct __libcpp_is_floating_point<double>      : public true_type {};
template <>          struct __libcpp_is_floating_point<long double> : public true_type {};
// clang-format on

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_floating_point : public __libcpp_is_floating_point<__remove_cv_t<_Tp> > {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_floating_point.h" 3
template <class _Tp>
inline constexpr bool is_floating_point_v = is_floating_point<_Tp>::value;
#endif
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_floating_point.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_FLOATING_POINT_H
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_floating_point.h" 3
#endif /* is_floating_point.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_signed.h expanded by -frewrite-includes */
#include <__type_traits/is_signed.h>
#else /* is_signed.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_SIGNED_H
#define _LIBCPP___TYPE_TRAITS_IS_SIGNED_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_arithmetic.h expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#else /* is_arithmetic.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_arithmetic.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_ARITHMETIC_H
#define _LIBCPP___TYPE_TRAITS_IS_ARITHMETIC_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_arithmetic.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_arithmetic.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_arithmetic.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_arithmetic.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_floating_point.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_arithmetic.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_arithmetic.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_arithmetic.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_arithmetic.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_arithmetic.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_arithmetic.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_arithmetic.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_arithmetic
    : public integral_constant<bool, is_integral<_Tp>::value || is_floating_point<_Tp>::value> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_arithmetic.h" 3
template <class _Tp>
inline constexpr bool is_arithmetic_v = is_arithmetic<_Tp>::value;
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_arithmetic.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_ARITHMETIC_H
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_arithmetic.h" 3
#endif /* is_arithmetic.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_signed)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_signed : _BoolConstant<__is_signed(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3
template <class _Tp>
inline constexpr bool is_signed_v = __is_signed(_Tp);
#  endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3

#else // __has_builtin(__is_signed)
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3

template <class _Tp, bool = is_integral<_Tp>::value>
struct __libcpp_is_signed_impl : public _BoolConstant<(_Tp(-1) < _Tp(0))> {};

template <class _Tp>
struct __libcpp_is_signed_impl<_Tp, false> : public true_type {}; // floating point

template <class _Tp, bool = is_arithmetic<_Tp>::value>
struct __libcpp_is_signed : public __libcpp_is_signed_impl<_Tp> {};

template <class _Tp>
struct __libcpp_is_signed<_Tp, false> : public false_type {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_signed : public __libcpp_is_signed<_Tp> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3
template <class _Tp>
inline constexpr bool is_signed_v = is_signed<_Tp>::value;
#  endif
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3

#endif // __has_builtin(__is_signed)
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_SIGNED_H
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed.h" 3
#endif /* is_signed.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_signed_integer.h expanded by -frewrite-includes */
#include <__type_traits/is_signed_integer.h>
#else /* is_signed_integer.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed_integer.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_SIGNED_INTEGER_H
#define _LIBCPP___TYPE_TRAITS_IS_SIGNED_INTEGER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed_integer.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed_integer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed_integer.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed_integer.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed_integer.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed_integer.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed_integer.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// clang-format off
template <class _Tp> struct __libcpp_is_signed_integer                   : public false_type {};
template <>          struct __libcpp_is_signed_integer<signed char>      : public true_type {};
template <>          struct __libcpp_is_signed_integer<signed short>     : public true_type {};
template <>          struct __libcpp_is_signed_integer<signed int>       : public true_type {};
template <>          struct __libcpp_is_signed_integer<signed long>      : public true_type {};
template <>          struct __libcpp_is_signed_integer<signed long long> : public true_type {};
#ifndef _LIBCPP_HAS_NO_INT128
template <>          struct __libcpp_is_signed_integer<__int128_t>       : public true_type {};
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed_integer.h" 3
// clang-format on

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_SIGNED_INTEGER_H
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_signed_integer.h" 3
#endif /* is_signed_integer.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_unsigned_integer.h expanded by -frewrite-includes */
#include <__type_traits/is_unsigned_integer.h>
#else /* is_unsigned_integer.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned_integer.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_UNSIGNED_INTEGER_H
#define _LIBCPP___TYPE_TRAITS_IS_UNSIGNED_INTEGER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned_integer.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned_integer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned_integer.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned_integer.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned_integer.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned_integer.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned_integer.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// clang-format off
template <class _Tp> struct __libcpp_is_unsigned_integer                     : public false_type {};
template <>          struct __libcpp_is_unsigned_integer<unsigned char>      : public true_type {};
template <>          struct __libcpp_is_unsigned_integer<unsigned short>     : public true_type {};
template <>          struct __libcpp_is_unsigned_integer<unsigned int>       : public true_type {};
template <>          struct __libcpp_is_unsigned_integer<unsigned long>      : public true_type {};
template <>          struct __libcpp_is_unsigned_integer<unsigned long long> : public true_type {};
#ifndef _LIBCPP_HAS_NO_INT128
template <>          struct __libcpp_is_unsigned_integer<__uint128_t>        : public true_type {};
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned_integer.h" 3
// clang-format on

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_UNSIGNED_INTEGER_H
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned_integer.h" 3
#endif /* is_unsigned_integer.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 3

// [concepts.arithmetic], arithmetic concepts

template <class _Tp>
concept integral = is_integral_v<_Tp>;

template <class _Tp>
concept signed_integral = integral<_Tp> && is_signed_v<_Tp>;

template <class _Tp>
concept unsigned_integral = integral<_Tp> && !signed_integral<_Tp>;

template <class _Tp>
concept floating_point = is_floating_point_v<_Tp>;

// Concept helpers for the internal type traits for the fundamental types.

template <class _Tp>
concept __libcpp_unsigned_integer = __libcpp_is_unsigned_integer<_Tp>::value;
template <class _Tp>
concept __libcpp_signed_integer = __libcpp_is_signed_integer<_Tp>::value;

#endif // _LIBCPP_STD_VER >= 20
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_ARITHMETIC_H
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/arithmetic.h" 3
#endif /* arithmetic.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/assignable.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/common_reference_with.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* constructible.h expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#else /* constructible.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/constructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_CONSTRUCTIBLE_H
#define _LIBCPP___CONCEPTS_CONSTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/constructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/constructible.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* destructible.h expanded by -frewrite-includes */
#include <__concepts/destructible.h>
#else /* destructible.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/constructible.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/destructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_DESTRUCTIBLE_H
#define _LIBCPP___CONCEPTS_DESTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/destructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/destructible.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_nothrow_destructible.h expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_destructible.h>
#else /* is_nothrow_destructible.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/destructible.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_destructible.h expanded by -frewrite-includes */
#include <__type_traits/is_destructible.h>
#else /* is_destructible.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_DESTRUCTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_DESTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_function.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* remove_all_extents.h expanded by -frewrite-includes */
#include <__type_traits/remove_all_extents.h>
#else /* remove_all_extents.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_all_extents.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_ALL_EXTENTS_H
#define _LIBCPP___TYPE_TRAITS_REMOVE_ALL_EXTENTS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_all_extents.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_all_extents.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_all_extents.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_all_extents.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_all_extents.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_all_extents.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_all_extents.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__remove_all_extents)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_all_extents.h" 3
template <class _Tp>
struct remove_all_extents {
  using type _LIBCPP_NODEBUG = __remove_all_extents(_Tp);
};

template <class _Tp>
using __remove_all_extents_t = __remove_all_extents(_Tp);
#else
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_all_extents.h" 3
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS remove_all_extents {
  typedef _Tp type;
};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[]> {
  typedef typename remove_all_extents<_Tp>::type type;
};
template <class _Tp, size_t _Np>
struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[_Np]> {
  typedef typename remove_all_extents<_Tp>::type type;
};

template <class _Tp>
using __remove_all_extents_t = typename remove_all_extents<_Tp>::type;
#endif // __has_builtin(__remove_all_extents)
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_all_extents.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_all_extents.h" 3
template <class _Tp>
using remove_all_extents_t = __remove_all_extents_t<_Tp>;
#endif
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_all_extents.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_REMOVE_ALL_EXTENTS_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_all_extents.h" 3
#endif /* remove_all_extents.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_destructible)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_destructible : _BoolConstant<__is_destructible(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3
template <class _Tp>
inline constexpr bool is_destructible_v = __is_destructible(_Tp);
#  endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3

#else // __has_builtin(__is_destructible)
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3

//  if it's a reference, return true
//  if it's a function, return false
//  if it's   void,     return false
//  if it's an array of unknown bound, return false
//  Otherwise, return "declval<_Up&>().~_Up()" is well-formed
//    where _Up is remove_all_extents<_Tp>::type

template <class>
struct __is_destructible_apply {
  typedef int type;
};

template <typename _Tp>
struct __is_destructor_wellformed {
  template <typename _Tp1>
  static true_type __test(typename __is_destructible_apply<decltype(std::declval<_Tp1&>().~_Tp1())>::type);

  template <typename _Tp1>
  static false_type __test(...);

  static const bool value = decltype(__test<_Tp>(12))::value;
};

template <class _Tp, bool>
struct __destructible_imp;

template <class _Tp>
struct __destructible_imp<_Tp, false>
    : public integral_constant<bool, __is_destructor_wellformed<__remove_all_extents_t<_Tp> >::value> {};

template <class _Tp>
struct __destructible_imp<_Tp, true> : public true_type {};

template <class _Tp, bool>
struct __destructible_false;

template <class _Tp>
struct __destructible_false<_Tp, false> : public __destructible_imp<_Tp, is_reference<_Tp>::value> {};

template <class _Tp>
struct __destructible_false<_Tp, true> : public false_type {};

template <class _Tp>
struct is_destructible : public __destructible_false<_Tp, is_function<_Tp>::value> {};

template <class _Tp>
struct is_destructible<_Tp[]> : public false_type {};

template <>
struct is_destructible<void> : public false_type {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3
template <class _Tp>
inline constexpr bool is_destructible_v = is_destructible<_Tp>::value;
#  endif
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3

#endif // __has_builtin(__is_destructible)
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_DESTRUCTIBLE_H
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_destructible.h" 3
#endif /* is_destructible.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_scalar.h expanded by -frewrite-includes */
#include <__type_traits/is_scalar.h>
#else /* is_scalar.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_SCALAR_H
#define _LIBCPP___TYPE_TRAITS_IS_SCALAR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_enum.h expanded by -frewrite-includes */
#include <__type_traits/is_enum.h>
#else /* is_enum.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_enum.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_ENUM_H
#define _LIBCPP___TYPE_TRAITS_IS_ENUM_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_enum.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_enum.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_enum.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_enum.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_enum.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_enum.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_enum.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_enum : public integral_constant<bool, __is_enum(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_enum.h" 3
template <class _Tp>
inline constexpr bool is_enum_v = __is_enum(_Tp);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_enum.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_ENUM_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_enum.h" 3
#endif /* is_enum.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_member_pointer.h expanded by -frewrite-includes */
#include <__type_traits/is_member_pointer.h>
#else /* is_member_pointer.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_MEMBER_POINTER_H
#define _LIBCPP___TYPE_TRAITS_IS_MEMBER_POINTER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_member_function_pointer.h expanded by -frewrite-includes */
#include <__type_traits/is_member_function_pointer.h>
#else /* is_member_function_pointer.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H
#define _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_function.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct __libcpp_is_member_pointer {
  enum { __is_member = false, __is_func = false, __is_obj = false };
};
template <class _Tp, class _Up>
struct __libcpp_is_member_pointer<_Tp _Up::*> {
  enum {
    __is_member = true,
    __is_func   = is_function<_Tp>::value,
    __is_obj    = !__is_func,
  };
};

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_member_function_pointer)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer : _BoolConstant<__is_member_function_pointer(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3
template <class _Tp>
inline constexpr bool is_member_function_pointer_v = __is_member_function_pointer(_Tp);
#  endif
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3

#else // __has_builtin(__is_member_function_pointer)
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer
    : public _BoolConstant<__libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_func> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3
template <class _Tp>
inline constexpr bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value;
#  endif
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3

#endif // __has_builtin(__is_member_function_pointer)
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_function_pointer.h" 3
#endif /* is_member_function_pointer.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_member_pointer)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_member_pointer : _BoolConstant<__is_member_pointer(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3
template <class _Tp>
inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp);
#  endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3

#else // __has_builtin(__is_member_pointer)
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_member_pointer
    : public _BoolConstant<__libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_member> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3
template <class _Tp>
inline constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value;
#  endif
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3

#endif // __has_builtin(__is_member_pointer)
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_POINTER_H
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_pointer.h" 3
#endif /* is_member_pointer.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_null_pointer.h expanded by -frewrite-includes */
#include <__type_traits/is_null_pointer.h>
#else /* is_null_pointer.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_NULL_POINTER_H
#define _LIBCPP___TYPE_TRAITS_IS_NULL_POINTER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct __is_nullptr_t_impl : public false_type {};
template <>
struct __is_nullptr_t_impl<nullptr_t> : public true_type {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS __is_nullptr_t : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_null_pointer : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3
template <class _Tp>
inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value;
#  endif
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3
#endif // _LIBCPP_STD_VER >= 14
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_NULL_POINTER_H
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_null_pointer.h" 3
#endif /* is_null_pointer.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_pointer.h expanded by -frewrite-includes */
#include <__type_traits/is_pointer.h>
#else /* is_pointer.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_POINTER_H
#define _LIBCPP___TYPE_TRAITS_IS_POINTER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_pointer)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_pointer : _BoolConstant<__is_pointer(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3
template <class _Tp>
inline constexpr bool is_pointer_v = __is_pointer(_Tp);
#  endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3

#else // __has_builtin(__is_pointer)
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3

template <class _Tp>
struct __libcpp_is_pointer : public false_type {};
template <class _Tp>
struct __libcpp_is_pointer<_Tp*> : public true_type {};

template <class _Tp>
struct __libcpp_remove_objc_qualifiers {
  typedef _Tp type;
};
#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_HAS_OBJC_ARC)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3
// clang-format off
template <class _Tp> struct __libcpp_remove_objc_qualifiers<_Tp __strong> { typedef _Tp type; };
template <class _Tp> struct __libcpp_remove_objc_qualifiers<_Tp __weak> { typedef _Tp type; };
template <class _Tp> struct __libcpp_remove_objc_qualifiers<_Tp __autoreleasing> { typedef _Tp type; };
template <class _Tp> struct __libcpp_remove_objc_qualifiers<_Tp __unsafe_unretained> { typedef _Tp type; };
// clang-format on
#  endif
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_pointer
    : public __libcpp_is_pointer<typename __libcpp_remove_objc_qualifiers<__remove_cv_t<_Tp> >::type> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3
template <class _Tp>
inline constexpr bool is_pointer_v = is_pointer<_Tp>::value;
#  endif
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3

#endif // __has_builtin(__is_pointer)
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_POINTER_H
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pointer.h" 3
#endif /* is_pointer.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_scalar)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_scalar : _BoolConstant<__is_scalar(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
template <class _Tp>
inline constexpr bool is_scalar_v = __is_scalar(_Tp);
#  endif
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3

#else // __has_builtin(__is_scalar)
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3

template <class _Tp>
struct __is_block : false_type {};
#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_HAS_EXTENSION_BLOCKS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
template <class _Rp, class... _Args>
struct __is_block<_Rp (^)(_Args...)> : true_type {};
#  endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3

// clang-format off
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_scalar
    : public integral_constant<
          bool, is_arithmetic<_Tp>::value ||
                is_member_pointer<_Tp>::value ||
                is_pointer<_Tp>::value ||
                __is_nullptr_t<_Tp>::value ||
                __is_block<_Tp>::value ||
                is_enum<_Tp>::value> {};
// clang-format on

template <>
struct _LIBCPP_TEMPLATE_VIS is_scalar<nullptr_t> : public true_type {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
template <class _Tp>
inline constexpr bool is_scalar_v = is_scalar<_Tp>::value;
#  endif
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3

#endif // __has_builtin(__is_scalar)
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_SCALAR_H
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scalar.h" 3
#endif /* is_scalar.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_all_extents.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_CXX03_LANG)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3

template <bool, class _Tp>
struct __libcpp_is_nothrow_destructible;

template <class _Tp>
struct __libcpp_is_nothrow_destructible<false, _Tp> : public false_type {};

template <class _Tp>
struct __libcpp_is_nothrow_destructible<true, _Tp>
    : public integral_constant<bool, noexcept(std::declval<_Tp>().~_Tp()) > {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
    : public __libcpp_is_nothrow_destructible<is_destructible<_Tp>::value, _Tp> {};

template <class _Tp, size_t _Ns>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[_Ns]> : public is_nothrow_destructible<_Tp> {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp&> : public true_type {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp&&> : public true_type {};

#else
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3

template <class _Tp>
struct __libcpp_nothrow_destructor : public integral_constant<bool, is_scalar<_Tp>::value || is_reference<_Tp>::value> {
};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible : public __libcpp_nothrow_destructor<__remove_all_extents_t<_Tp> > {
};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[]> : public false_type {};

#endif
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
template <class _Tp>
inline constexpr bool is_nothrow_destructible_v = is_nothrow_destructible<_Tp>::value;
#endif
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_H
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h" 3
#endif /* is_nothrow_destructible.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/destructible.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/destructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/destructible.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/destructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/destructible.h" 3

// [concept.destructible]

template <class _Tp>
concept destructible = is_nothrow_destructible_v<_Tp>;

#endif // _LIBCPP_STD_VER >= 20
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/destructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_DESTRUCTIBLE_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/destructible.h" 3
#endif /* destructible.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/constructible.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/constructible.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/constructible.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_constructible.h expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#else /* is_constructible.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/constructible.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_IS_CONSTRUCTIBLE_H
#define _LIBCPP___TYPE_IS_CONSTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constructible.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, class... _Args>
struct _LIBCPP_TEMPLATE_VIS is_constructible : public integral_constant<bool, __is_constructible(_Tp, _Args...)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constructible.h" 3
template <class _Tp, class... _Args>
inline constexpr bool is_constructible_v = __is_constructible(_Tp, _Args...);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_IS_CONSTRUCTIBLE_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constructible.h" 3
#endif /* is_constructible.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/constructible.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/constructible.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/constructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/constructible.h" 3

// [concept.constructible]
template <class _Tp, class... _Args>
concept constructible_from = destructible<_Tp> && is_constructible_v<_Tp, _Args...>;

// [concept.default.init]

template <class _Tp>
concept __default_initializable = requires { ::new _Tp; };

template <class _Tp>
concept default_initializable = constructible_from<_Tp> && requires { _Tp{}; } && __default_initializable<_Tp>;

// [concept.moveconstructible]
template <class _Tp>
concept move_constructible = constructible_from<_Tp, _Tp> && convertible_to<_Tp, _Tp>;

// [concept.copyconstructible]
// clang-format off
template <class _Tp>
concept copy_constructible =
    move_constructible<_Tp> &&
    constructible_from<_Tp, _Tp&> && convertible_to<_Tp&, _Tp> &&
    constructible_from<_Tp, const _Tp&> && convertible_to<const _Tp&, _Tp> &&
    constructible_from<_Tp, const _Tp> && convertible_to<const _Tp, _Tp>;
// clang-format on

#endif // _LIBCPP_STD_VER >= 20
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/constructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_CONSTRUCTIBLE_H
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/constructible.h" 3
#endif /* constructible.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* copyable.h expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#else /* copyable.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/copyable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_COPYABLE_H
#define _LIBCPP___CONCEPTS_COPYABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/assignable.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/copyable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/copyable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/copyable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/copyable.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* movable.h expanded by -frewrite-includes */
#include <__concepts/movable.h>
#else /* movable.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/copyable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_MOVABLE_H
#define _LIBCPP___CONCEPTS_MOVABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/assignable.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* swappable.h expanded by -frewrite-includes */
#include <__concepts/swappable.h>
#else /* swappable.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_SWAPPABLE_H
#define _LIBCPP___CONCEPTS_SWAPPABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/assignable.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* class_or_enum.h expanded by -frewrite-includes */
#include <__concepts/class_or_enum.h>
#else /* class_or_enum.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_CLASS_OR_ENUM_H
#define _LIBCPP___CONCEPTS_CLASS_OR_ENUM_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_class.h expanded by -frewrite-includes */
#include <__type_traits/is_class.h>
#else /* is_class.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_class.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_CLASS_H
#define _LIBCPP___TYPE_TRAITS_IS_CLASS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_class.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_class.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_class.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_class.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_class.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_class.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_class.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_class : public integral_constant<bool, __is_class(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_class.h" 3
template <class _Tp>
inline constexpr bool is_class_v = __is_class(_Tp);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_class.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_CLASS_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_class.h" 3
#endif /* is_class.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_enum.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_union.h expanded by -frewrite-includes */
#include <__type_traits/is_union.h>
#else /* is_union.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_union.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_UNION_H
#define _LIBCPP___TYPE_TRAITS_IS_UNION_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_union.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_union.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_union.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_union.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_union.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_union : public integral_constant<bool, __is_union(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_union.h" 3
template <class _Tp>
inline constexpr bool is_union_v = __is_union(_Tp);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_union.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_UNION_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_union.h" 3
#endif /* is_union.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 3

// Whether a type is a class type or enumeration type according to the Core wording.

template <class _Tp>
concept __class_or_enum = is_class_v<_Tp> || is_union_v<_Tp> || is_enum_v<_Tp>;

// Work around Clang bug https://llvm.org/PR52970
// TODO: remove this workaround once libc++ no longer has to support Clang 13 (it was fixed in Clang 14).
template <class _Tp>
concept __workaround_52970 = is_class_v<__remove_cvref_t<_Tp>> || is_union_v<__remove_cvref_t<_Tp>>;

#endif // _LIBCPP_STD_VER >= 20
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_CLASS_OR_ENUM_H
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/class_or_enum.h" 3
#endif /* class_or_enum.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/common_reference_with.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* extent.h expanded by -frewrite-includes */
#include <__type_traits/extent.h>
#else /* extent.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_EXTENT_H
#define _LIBCPP___TYPE_TRAITS_EXTENT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__array_extent)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3

template <class _Tp, size_t _Dim = 0>
struct _LIBCPP_TEMPLATE_VIS extent : integral_constant<size_t, __array_extent(_Tp, _Dim)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3
template <class _Tp, unsigned _Ip = 0>
inline constexpr size_t extent_v = __array_extent(_Tp, _Ip);
#  endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3

#else // __has_builtin(__array_extent)
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3

template <class _Tp, unsigned _Ip = 0>
struct _LIBCPP_TEMPLATE_VIS extent : public integral_constant<size_t, 0> {};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS extent<_Tp[], 0> : public integral_constant<size_t, 0> {};
template <class _Tp, unsigned _Ip>
struct _LIBCPP_TEMPLATE_VIS extent<_Tp[], _Ip> : public integral_constant<size_t, extent<_Tp, _Ip - 1>::value> {};
template <class _Tp, size_t _Np>
struct _LIBCPP_TEMPLATE_VIS extent<_Tp[_Np], 0> : public integral_constant<size_t, _Np> {};
template <class _Tp, size_t _Np, unsigned _Ip>
struct _LIBCPP_TEMPLATE_VIS extent<_Tp[_Np], _Ip> : public integral_constant<size_t, extent<_Tp, _Ip - 1>::value> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3
template <class _Tp, unsigned _Ip = 0>
inline constexpr size_t extent_v = extent<_Tp, _Ip>::value;
#  endif
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3

#endif // __has_builtin(__array_extent)
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_EXTENT_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/extent.h" 3
#endif /* extent.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_nothrow_move_assignable.h expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_assignable.h>
#else /* is_nothrow_move_assignable.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_assignable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_MOVE_ASSIGNABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_MOVE_ASSIGNABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_assignable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_assignable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_rvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_assignable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_assignable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_assignable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_assignable.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_assignable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable
    : public integral_constant<bool,
                               __is_nothrow_assignable(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_assignable.h" 3
template <class _Tp>
inline constexpr bool is_nothrow_move_assignable_v = is_nothrow_move_assignable<_Tp>::value;
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_assignable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_MOVE_ASSIGNABLE_H
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_assignable.h" 3
#endif /* is_nothrow_move_assignable.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_nothrow_move_constructible.h expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_constructible.h>
#else /* is_nothrow_move_constructible.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_MOVE_CONSTRUCTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_MOVE_CONSTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_rvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_nothrow_constructible.h expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#else /* is_nothrow_constructible.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// GCC is disabled due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611
#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_nothrow_constructible) && !defined(_LIBCPP_COMPILER_GCC)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3

template < class _Tp, class... _Args>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible
    : public integral_constant<bool, __is_nothrow_constructible(_Tp, _Args...)> {};
#else
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3

template <bool, bool, class _Tp, class... _Args>
struct __libcpp_is_nothrow_constructible;

template <class _Tp, class... _Args>
struct __libcpp_is_nothrow_constructible</*is constructible*/ true, /*is reference*/ false, _Tp, _Args...>
    : public integral_constant<bool, noexcept(_Tp(std::declval<_Args>()...))> {};

template <class _Tp>
void __implicit_conversion_to(_Tp) noexcept {}

template <class _Tp, class _Arg>
struct __libcpp_is_nothrow_constructible</*is constructible*/ true, /*is reference*/ true, _Tp, _Arg>
    : public integral_constant<bool, noexcept(_VSTD::__implicit_conversion_to<_Tp>(std::declval<_Arg>()))> {};

template <class _Tp, bool _IsReference, class... _Args>
struct __libcpp_is_nothrow_constructible</*is constructible*/ false, _IsReference, _Tp, _Args...> : public false_type {
};

template <class _Tp, class... _Args>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible
    : __libcpp_is_nothrow_constructible<is_constructible<_Tp, _Args...>::value,
                                        is_reference<_Tp>::value,
                                        _Tp,
                                        _Args...> {};

template <class _Tp, size_t _Ns>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp[_Ns]>
    : __libcpp_is_nothrow_constructible<is_constructible<_Tp>::value, is_reference<_Tp>::value, _Tp> {};

#endif // __has_builtin(__is_nothrow_constructible)
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3
template <class _Tp, class... _Args>
inline constexpr bool is_nothrow_constructible_v = is_nothrow_constructible<_Tp, _Args...>::value;
#endif
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_H
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_constructible.h" 3
#endif /* is_nothrow_constructible.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// TODO: remove this implementation once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 is fixed
#ifndef _LIBCPP_COMPILER_GCC

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible
    : public integral_constant<bool, __is_nothrow_constructible(_Tp, __add_rvalue_reference_t<_Tp>)> {};

#else // _LIBCPP_COMPILER_GCC
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible
    : public is_nothrow_constructible<_Tp, __add_rvalue_reference_t<_Tp> > {};

#endif // _LIBCPP_COMPILER_GCC
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 3
template <class _Tp>
inline constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible<_Tp>::value;
#endif
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_MOVE_CONSTRUCTIBLE_H
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_move_constructible.h" 3
#endif /* is_nothrow_move_constructible.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* exchange.h expanded by -frewrite-includes */
#include <__utility/exchange.h>
#else /* exchange.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_EXCHANGE_H
#define _LIBCPP___UTILITY_EXCHANGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_nothrow_assignable.h expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_assignable.h>
#else /* is_nothrow_assignable.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_assignable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_ASSIGNABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_ASSIGNABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_assignable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_assignable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_assignable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_assignable.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_assignable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, class _Arg>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable : public integral_constant<bool, __is_nothrow_assignable(_Tp, _Arg)> {
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_assignable.h" 3
template <class _Tp, class _Arg>
inline constexpr bool is_nothrow_assignable_v = __is_nothrow_assignable(_Tp, _Arg);
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_assignable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_ASSIGNABLE_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_assignable.h" 3
#endif /* is_nothrow_assignable.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* move.h expanded by -frewrite-includes */
#include <__utility/move.h>
#else /* move.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_MOVE_H
#define _LIBCPP___UTILITY_MOVE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_copy_constructible.h expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#else /* is_copy_constructible.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_constructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_COPY_CONSTRUCTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_COPY_CONSTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_constructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_const.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_constructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_constructible.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_constructible.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_constructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_constructible.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_constructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_copy_constructible
    : public integral_constant<bool, __is_constructible(_Tp, __add_lvalue_reference_t<typename add_const<_Tp>::type>)> {
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_constructible.h" 3
template <class _Tp>
inline constexpr bool is_copy_constructible_v = is_copy_constructible<_Tp>::value;
#endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_constructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_COPY_CONSTRUCTIBLE_H
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_constructible.h" 3
#endif /* is_copy_constructible.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __libcpp_remove_reference_t<_Tp>&&
move(_LIBCPP_LIFETIMEBOUND _Tp&& __t) _NOEXCEPT {
  typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tp> _Up;
  return static_cast<_Up&&>(__t);
}

template <class _Tp>
using __move_if_noexcept_result_t =
    __conditional_t<!is_nothrow_move_constructible<_Tp>::value && is_copy_constructible<_Tp>::value, const _Tp&, _Tp&&>;

template <class _Tp>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __move_if_noexcept_result_t<_Tp>
move_if_noexcept(_LIBCPP_LIFETIMEBOUND _Tp& __x) _NOEXCEPT {
  return std::move(__x);
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___UTILITY_MOVE_H
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/move.h" 3
#endif /* move.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 3
template<class _T1, class _T2 = _T1>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_T1 exchange(_T1& __obj, _T2&& __new_value)
    noexcept(is_nothrow_move_constructible<_T1>::value && is_nothrow_assignable<_T1&, _T2>::value)
{
    _T1 __old_value = _VSTD::move(__obj);
    __obj = _VSTD::forward<_T2>(__new_value);
    return __old_value;
}
#endif // _LIBCPP_STD_VER >= 14
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___UTILITY_EXCHANGE_H
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exchange.h" 3
#endif /* exchange.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* swap.h expanded by -frewrite-includes */
#include <__utility/swap.h>
#else /* swap.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_SWAP_H
#define _LIBCPP___UTILITY_SWAP_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_move_assignable.h expanded by -frewrite-includes */
#include <__type_traits/is_move_assignable.h>
#else /* is_move_assignable.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_assignable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_MOVE_ASSIGNABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_MOVE_ASSIGNABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_assignable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_assignable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_rvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_assignable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_assignable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_assignable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_assignable.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_assignable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_move_assignable
    : public integral_constant<bool, __is_assignable(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_assignable.h" 3
template <class _Tp>
inline constexpr bool is_move_assignable_v = is_move_assignable<_Tp>::value;
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_assignable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_MOVE_ASSIGNABLE_H
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_assignable.h" 3
#endif /* is_move_assignable.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_move_constructible.h expanded by -frewrite-includes */
#include <__type_traits/is_move_constructible.h>
#else /* is_move_constructible.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_constructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_MOVE_CONSTRUCTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_MOVE_CONSTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_constructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_rvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_constructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_constructible.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_constructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_constructible.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_constructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_move_constructible
    : public integral_constant<bool, __is_constructible(_Tp, __add_rvalue_reference_t<_Tp>)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_constructible.h" 3
template <class _Tp>
inline constexpr bool is_move_constructible_v = is_move_constructible<_Tp>::value;
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_constructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_MOVE_CONSTRUCTIBLE_H
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_move_constructible.h" 3
#endif /* is_move_constructible.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_swappable.h expanded by -frewrite-includes */
#include <__type_traits/is_swappable.h>
#else /* is_swappable.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_SWAPPABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_SWAPPABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_referenceable.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_void.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* nat.h expanded by -frewrite-includes */
#include <__type_traits/nat.h>
#else /* nat.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/nat.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_NAT_H
#define _LIBCPP___TYPE_TRAITS_NAT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/nat.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/nat.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/nat.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/nat.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/nat.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

struct __nat {
#ifndef _LIBCPP_CXX03_LANG
  __nat()                        = delete;
  __nat(const __nat&)            = delete;
  __nat& operator=(const __nat&) = delete;
  ~__nat()                       = delete;
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/nat.h" 3
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_NAT_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/nat.h" 3
#endif /* nat.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct __is_swappable;
template <class _Tp>
struct __is_nothrow_swappable;

#ifndef _LIBCPP_CXX03_LANG
template <class _Tp>
using __swap_result_t = __enable_if_t<is_move_constructible<_Tp>::value && is_move_assignable<_Tp>::value>;
#else
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
template <class>
using __swap_result_t = void;
#endif
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 __swap_result_t<_Tp> swap(_Tp& __x, _Tp& __y)
    _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value&& is_nothrow_move_assignable<_Tp>::value);

template <class _Tp, size_t _Np, __enable_if_t<__is_swappable<_Tp>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np])
    _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value);

namespace __detail {
// ALL generic swap overloads MUST already have a declaration available at this point.

template <class _Tp, class _Up = _Tp, bool _NotVoid = !is_void<_Tp>::value && !is_void<_Up>::value>
struct __swappable_with {
  template <class _LHS, class _RHS>
  static decltype(swap(std::declval<_LHS>(), std::declval<_RHS>())) __test_swap(int);
  template <class, class>
  static __nat __test_swap(long);

  // Extra parens are needed for the C++03 definition of decltype.
  typedef decltype((__test_swap<_Tp, _Up>(0))) __swap1;
  typedef decltype((__test_swap<_Up, _Tp>(0))) __swap2;

  static const bool value = _IsNotSame<__swap1, __nat>::value && _IsNotSame<__swap2, __nat>::value;
};

template <class _Tp, class _Up>
struct __swappable_with<_Tp, _Up, false> : false_type {};

template <class _Tp, class _Up = _Tp, bool _Swappable = __swappable_with<_Tp, _Up>::value>
struct __nothrow_swappable_with {
  static const bool value =
#ifndef _LIBCPP_HAS_NO_NOEXCEPT
      noexcept(swap(std::declval<_Tp>(), std::declval<_Up>()))&& noexcept(
          swap(std::declval<_Up>(), std::declval<_Tp>()));
#else
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
      false;
#endif
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
};

template <class _Tp, class _Up>
struct __nothrow_swappable_with<_Tp, _Up, false> : false_type {};

} // namespace __detail

template <class _Tp>
struct __is_swappable : public integral_constant<bool, __detail::__swappable_with<_Tp&>::value> {};

template <class _Tp>
struct __is_nothrow_swappable : public integral_constant<bool, __detail::__nothrow_swappable_with<_Tp&>::value> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3

template <class _Tp, class _Up>
struct _LIBCPP_TEMPLATE_VIS is_swappable_with
    : public integral_constant<bool, __detail::__swappable_with<_Tp, _Up>::value> {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_swappable
    : public __conditional_t<__libcpp_is_referenceable<_Tp>::value,
                             is_swappable_with<__add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t<_Tp> >,
                             false_type> {};

template <class _Tp, class _Up>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable_with
    : public integral_constant<bool, __detail::__nothrow_swappable_with<_Tp, _Up>::value> {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable
    : public __conditional_t<__libcpp_is_referenceable<_Tp>::value,
                             is_nothrow_swappable_with<__add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t<_Tp> >,
                             false_type> {};

template <class _Tp, class _Up>
inline constexpr bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value;

template <class _Tp>
inline constexpr bool is_swappable_v = is_swappable<_Tp>::value;

template <class _Tp, class _Up>
inline constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<_Tp, _Up>::value;

template <class _Tp>
inline constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value;

#endif // _LIBCPP_STD_VER >= 17
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_SWAPPABLE_H
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_swappable.h" 3
#endif /* is_swappable.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#ifndef _LIBCPP_CXX03_LANG
template <class _Tp>
using __swap_result_t = __enable_if_t<is_move_constructible<_Tp>::value && is_move_assignable<_Tp>::value>;
#else
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
template <class>
using __swap_result_t = void;
#endif
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY __swap_result_t<_Tp> _LIBCPP_CONSTEXPR_SINCE_CXX20 swap(_Tp& __x, _Tp& __y)
    _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value&& is_nothrow_move_assignable<_Tp>::value) {
  _Tp __t(_VSTD::move(__x));
  __x = _VSTD::move(__y);
  __y = _VSTD::move(__t);
}

template <class _Tp, size_t _Np, __enable_if_t<__is_swappable<_Tp>::value, int> >
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np])
    _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) {
  for (size_t __i = 0; __i != _Np; ++__i) {
    swap(__a[__i], __b[__i]);
  }
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___UTILITY_SWAP_H
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/swap.h" 3
#endif /* swap.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3

// [concept.swappable]

namespace ranges {
namespace __swap {

template <class _Tp>
void swap(_Tp&, _Tp&) = delete;

// clang-format off
template <class _Tp, class _Up>
concept __unqualified_swappable_with =
    (__class_or_enum<remove_cvref_t<_Tp>> || __class_or_enum<remove_cvref_t<_Up>>) &&
    requires(_Tp&& __t, _Up&& __u) {
        swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u));
    };
// clang-format on

struct __fn;

// clang-format off
template <class _Tp, class _Up, size_t _Size>
concept __swappable_arrays =
    !__unqualified_swappable_with<_Tp (&)[_Size], _Up (&)[_Size]> &&
    extent_v<_Tp> == extent_v<_Up> &&
    requires(_Tp (&__t)[_Size], _Up (&__u)[_Size], const __fn& __swap) {
        __swap(__t[0], __u[0]);
    };
// clang-format on

template <class _Tp>
concept __exchangeable =
    !__unqualified_swappable_with<_Tp&, _Tp&> && move_constructible<_Tp> && assignable_from<_Tp&, _Tp>;

struct __fn {
  // 2.1   `S` is `(void)swap(E1, E2)`* if `E1` or `E2` has class or enumeration type and...
  // *The name `swap` is used here unqualified.
  template <class _Tp, class _Up>
    requires __unqualified_swappable_with<_Tp, _Up>
  _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_Tp&& __t, _Up&& __u) const
      noexcept(noexcept(swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))) {
    swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u));
  }

  // 2.2   Otherwise, if `E1` and `E2` are lvalues of array types with equal extent and...
  template <class _Tp, class _Up, size_t _Size>
    requires __swappable_arrays<_Tp, _Up, _Size>
  _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_Tp (&__t)[_Size], _Up (&__u)[_Size]) const
      noexcept(noexcept((*this)(*__t, *__u))) {
    // TODO(cjdb): replace with `ranges::swap_ranges`.
    for (size_t __i = 0; __i < _Size; ++__i) {
      (*this)(__t[__i], __u[__i]);
    }
  }

  // 2.3   Otherwise, if `E1` and `E2` are lvalues of the same type `T` that models...
  template <__exchangeable _Tp>
  _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_Tp& __x, _Tp& __y) const
      noexcept(is_nothrow_move_constructible_v<_Tp> && is_nothrow_move_assignable_v<_Tp>) {
    __y = _VSTD::exchange(__x, _VSTD::move(__y));
  }
};
} // namespace __swap

inline namespace __cpo {
inline constexpr auto swap = __swap::__fn{};
} // namespace __cpo
} // namespace ranges

template <class _Tp>
concept swappable = requires(_Tp& __a, _Tp& __b) { ranges::swap(__a, __b); };

template <class _Tp, class _Up>
concept swappable_with = common_reference_with<_Tp, _Up> && requires(_Tp&& __t, _Up&& __u) {
  ranges::swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Tp>(__t));
  ranges::swap(_VSTD::forward<_Up>(__u), _VSTD::forward<_Up>(__u));
  ranges::swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u));
  ranges::swap(_VSTD::forward<_Up>(__u), _VSTD::forward<_Tp>(__t));
};

#endif // _LIBCPP_STD_VER >= 20
# 118 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___CONCEPTS_SWAPPABLE_H
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/swappable.h" 3
#endif /* swappable.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_object.h expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#else /* is_object.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_OBJECT_H
#define _LIBCPP___TYPE_TRAITS_IS_OBJECT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_array.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_class.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_scalar.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_union.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_object)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_object : _BoolConstant<__is_object(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
template <class _Tp>
inline constexpr bool is_object_v = __is_object(_Tp);
#  endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3

#else // __has_builtin(__is_object)
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_object
    : public integral_constant<bool,
                               is_scalar<_Tp>::value || is_array<_Tp>::value || is_union<_Tp>::value ||
                                   is_class<_Tp>::value > {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
template <class _Tp>
inline constexpr bool is_object_v = is_object<_Tp>::value;
#  endif
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3

#endif // __has_builtin(__is_object)
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_OBJECT_H
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_object.h" 3
#endif /* is_object.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 3

// [concepts.object]

template <class _Tp>
concept movable = is_object_v<_Tp> && move_constructible<_Tp> && assignable_from<_Tp&, _Tp> && swappable<_Tp>;

#endif // _LIBCPP_STD_VER >= 20
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_MOVABLE_H
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/movable.h" 3
#endif /* movable.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/copyable.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/copyable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/copyable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/copyable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/copyable.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/copyable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/copyable.h" 3

// [concepts.object]

// clang-format off
template <class _Tp>
concept copyable =
    copy_constructible<_Tp> &&
    movable<_Tp> &&
    assignable_from<_Tp&, _Tp&> &&
    assignable_from<_Tp&, const _Tp&> &&
    assignable_from<_Tp&, const _Tp>;
// clang-format on

#endif // _LIBCPP_STD_VER >= 20
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/copyable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_COPYABLE_H
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/copyable.h" 3
#endif /* copyable.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* derived_from.h expanded by -frewrite-includes */
#include <__concepts/derived_from.h>
#else /* derived_from.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/derived_from.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_DERIVED_FROM_H
#define _LIBCPP___CONCEPTS_DERIVED_FROM_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/derived_from.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/derived_from.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_base_of.h expanded by -frewrite-includes */
#include <__type_traits/is_base_of.h>
#else /* is_base_of.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/derived_from.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_base_of.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_BASE_OF_H
#define _LIBCPP___TYPE_TRAITS_IS_BASE_OF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_base_of.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_base_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_base_of.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_base_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_base_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_base_of.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_base_of.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Bp, class _Dp>
struct _LIBCPP_TEMPLATE_VIS is_base_of : public integral_constant<bool, __is_base_of(_Bp, _Dp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_base_of.h" 3
template <class _Bp, class _Dp>
inline constexpr bool is_base_of_v = __is_base_of(_Bp, _Dp);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_base_of.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_BASE_OF_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_base_of.h" 3
#endif /* is_base_of.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/derived_from.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/derived_from.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/derived_from.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/derived_from.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/derived_from.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/derived_from.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/derived_from.h" 3

// [concept.derived]

template <class _Dp, class _Bp>
concept derived_from = is_base_of_v<_Bp, _Dp> && is_convertible_v<const volatile _Dp*, const volatile _Bp*>;

#endif // _LIBCPP_STD_VER >= 20
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/derived_from.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_DERIVED_FROM_H
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/derived_from.h" 3
#endif /* derived_from.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* equality_comparable.h expanded by -frewrite-includes */
#include <__concepts/equality_comparable.h>
#else /* equality_comparable.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_EQUALITY_COMPARABLE_H
#define _LIBCPP___CONCEPTS_EQUALITY_COMPARABLE_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* boolean_testable.h expanded by -frewrite-includes */
#include <__concepts/boolean_testable.h>
#else /* boolean_testable.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/boolean_testable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_BOOLEAN_TESTABLE_H
#define _LIBCPP___CONCEPTS_BOOLEAN_TESTABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/boolean_testable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/boolean_testable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/boolean_testable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/boolean_testable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/boolean_testable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/boolean_testable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/boolean_testable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/boolean_testable.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/boolean_testable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/boolean_testable.h" 3

// [concepts.booleantestable]

template <class _Tp>
concept __boolean_testable_impl = convertible_to<_Tp, bool>;

template <class _Tp>
concept __boolean_testable = __boolean_testable_impl<_Tp> && requires(_Tp&& __t) {
  { !_VSTD::forward<_Tp>(__t) } -> __boolean_testable_impl;
};

#endif // _LIBCPP_STD_VER >= 20
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/boolean_testable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_BOOLEAN_TESTABLE_H
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/boolean_testable.h" 3
#endif /* boolean_testable.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/common_reference_with.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_reference.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_const_lvalue_ref.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 3

// [concept.equalitycomparable]

template <class _Tp, class _Up>
concept __weakly_equality_comparable_with =
    requires(__make_const_lvalue_ref<_Tp> __t, __make_const_lvalue_ref<_Up> __u) {
      { __t == __u } -> __boolean_testable;
      { __t != __u } -> __boolean_testable;
      { __u == __t } -> __boolean_testable;
      { __u != __t } -> __boolean_testable;
    };

template <class _Tp>
concept equality_comparable = __weakly_equality_comparable_with<_Tp, _Tp>;

// clang-format off
template <class _Tp, class _Up>
concept equality_comparable_with =
    equality_comparable<_Tp> && equality_comparable<_Up> &&
    common_reference_with<__make_const_lvalue_ref<_Tp>, __make_const_lvalue_ref<_Up>> &&
    equality_comparable<
        common_reference_t<
            __make_const_lvalue_ref<_Tp>,
            __make_const_lvalue_ref<_Up>>> &&
    __weakly_equality_comparable_with<_Tp, _Up>;
// clang-format on

#endif // _LIBCPP_STD_VER >= 20
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_EQUALITY_COMPARABLE_H
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/equality_comparable.h" 3
#endif /* equality_comparable.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* invocable.h expanded by -frewrite-includes */
#include <__concepts/invocable.h>
#else /* invocable.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/invocable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_INVOCABLE_H
#define _LIBCPP___CONCEPTS_INVOCABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/invocable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/invocable.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* invoke.h expanded by -frewrite-includes */
#include <__functional/invoke.h>
#else /* invoke.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/invocable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/invoke.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_INVOKE_H
#define _LIBCPP___FUNCTIONAL_INVOKE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/invoke.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/invoke.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* invoke.h expanded by -frewrite-includes */
#include <__type_traits/invoke.h>
#else /* invoke.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/invoke.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_INVOKE_H
#define _LIBCPP___TYPE_TRAITS_INVOKE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* apply_cv.h expanded by -frewrite-includes */
#include <__type_traits/apply_cv.h>
#else /* apply_cv.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/apply_cv.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_APPLY_CV_H
#define _LIBCPP___TYPE_TRAITS_APPLY_CV_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/apply_cv.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/apply_cv.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_const.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/apply_cv.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/apply_cv.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_volatile.h expanded by -frewrite-includes */
#include <__type_traits/is_volatile.h>
#else /* is_volatile.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/apply_cv.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_VOLATILE_H
#define _LIBCPP___TYPE_TRAITS_IS_VOLATILE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_volatile)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_volatile : _BoolConstant<__is_volatile(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 3
template <class _Tp>
inline constexpr bool is_volatile_v = __is_volatile(_Tp);
#  endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 3

#else
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_volatile : public false_type {};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_volatile<_Tp volatile> : public true_type {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 3
template <class _Tp>
inline constexpr bool is_volatile_v = is_volatile<_Tp>::value;
#  endif
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 3

#endif // __has_builtin(__is_volatile)
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_VOLATILE_H
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_volatile.h" 3
#endif /* is_volatile.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/apply_cv.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/apply_cv.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/apply_cv.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/apply_cv.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/apply_cv.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/apply_cv.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp,
          bool = is_const<__libcpp_remove_reference_t<_Tp> >::value,
          bool = is_volatile<__libcpp_remove_reference_t<_Tp> >::value>
struct __apply_cv_impl {
  template <class _Up>
  using __apply _LIBCPP_NODEBUG = _Up;
};

template <class _Tp>
struct __apply_cv_impl<_Tp, true, false> {
  template <class _Up>
  using __apply _LIBCPP_NODEBUG = const _Up;
};

template <class _Tp>
struct __apply_cv_impl<_Tp, false, true> {
  template <class _Up>
  using __apply _LIBCPP_NODEBUG = volatile _Up;
};

template <class _Tp>
struct __apply_cv_impl<_Tp, true, true> {
  template <class _Up>
  using __apply _LIBCPP_NODEBUG = const volatile _Up;
};

template <class _Tp>
struct __apply_cv_impl<_Tp&, false, false> {
  template <class _Up>
  using __apply _LIBCPP_NODEBUG = _Up&;
};

template <class _Tp>
struct __apply_cv_impl<_Tp&, true, false> {
  template <class _Up>
  using __apply _LIBCPP_NODEBUG = const _Up&;
};

template <class _Tp>
struct __apply_cv_impl<_Tp&, false, true> {
  template <class _Up>
  using __apply _LIBCPP_NODEBUG = volatile _Up&;
};

template <class _Tp>
struct __apply_cv_impl<_Tp&, true, true> {
  template <class _Up>
  using __apply _LIBCPP_NODEBUG = const volatile _Up&;
};

template <class _Tp, class _Up>
using __apply_cv_t _LIBCPP_NODEBUG = typename __apply_cv_impl<_Tp>::template __apply<_Up>;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_APPLY_CV_H
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/apply_cv.h" 3
#endif /* apply_cv.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_base_of.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_core_convertible.h expanded by -frewrite-includes */
#include <__type_traits/is_core_convertible.h>
#else /* is_core_convertible.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_core_convertible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_CORE_CONVERTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_CORE_CONVERTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_core_convertible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_core_convertible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_core_convertible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_core_convertible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_core_convertible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_core_convertible.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_core_convertible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// [conv.general]/3 says "E is convertible to T" whenever "T t=E;" is well-formed.
// We can't test for that, but we can test implicit convertibility by passing it
// to a function. Notice that __is_core_convertible<void,void> is false,
// and __is_core_convertible<immovable-type,immovable-type> is true in C++17 and later.

template <class _Tp, class _Up, class = void>
struct __is_core_convertible : public false_type {};

template <class _Tp, class _Up>
struct __is_core_convertible<_Tp, _Up, decltype(static_cast<void (*)(_Up)>(0)(static_cast<_Tp (*)()>(0)()))>
    : public true_type {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_CORE_CONVERTIBLE_H
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_core_convertible.h" 3
#endif /* is_core_convertible.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_member_function_pointer.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_member_object_pointer.h expanded by -frewrite-includes */
#include <__type_traits/is_member_object_pointer.h>
#else /* is_member_object_pointer.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_MEMBER_OBJECT_POINTER_H
#define _LIBCPP___TYPE_TRAITS_IS_MEMBER_OBJECT_POINTER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_member_object_pointer)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer : _BoolConstant<__is_member_object_pointer(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 3
template <class _Tp>
inline constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_Tp);
#  endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 3

#else // __has_builtin(__is_member_object_pointer)
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer
    : public _BoolConstant<__libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_obj> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 3
template <class _Tp>
inline constexpr bool is_member_object_pointer_v = is_member_object_pointer<_Tp>::value;
#  endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 3

#endif // __has_builtin(__is_member_object_pointer)
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_member_object_pointer.h" 3
#endif /* is_member_object_pointer.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_reference_wrapper.h expanded by -frewrite-includes */
#include <__type_traits/is_reference_wrapper.h>
#else /* is_reference_wrapper.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference_wrapper.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_REFERENCE_WRAPPER_H
#define _LIBCPP___TYPE_TRAITS_IS_REFERENCE_WRAPPER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference_wrapper.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference_wrapper.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference_wrapper.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference_wrapper.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference_wrapper.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference_wrapper.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference_wrapper.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference_wrapper.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference_wrapper.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
class _LIBCPP_TEMPLATE_VIS reference_wrapper;

template <class _Tp>
struct __is_reference_wrapper_impl : public false_type {};
template <class _Tp>
struct __is_reference_wrapper_impl<reference_wrapper<_Tp> > : public true_type {};
template <class _Tp>
struct __is_reference_wrapper : public __is_reference_wrapper_impl<__remove_cv_t<_Tp> > {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_ENABLE_IF_H
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_reference_wrapper.h" 3
#endif /* is_reference_wrapper.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_void.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/nat.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#endif
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

struct __any {
  __any(...);
};

template <class _MP, bool _IsMemberFunctionPtr, bool _IsMemberObjectPtr>
struct __member_pointer_traits_imp {};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...), true, false> {
  typedef _Class _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...), true, false> {
  typedef _Class _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param..., ...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const, true, false> {
  typedef _Class const _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const, true, false> {
  typedef _Class const _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param..., ...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) volatile, true, false> {
  typedef _Class volatile _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) volatile, true, false> {
  typedef _Class volatile _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param..., ...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const volatile, true, false> {
  typedef _Class const volatile _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const volatile, true, false> {
  typedef _Class const volatile _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param..., ...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...)&, true, false> {
  typedef _Class& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...)&, true, false> {
  typedef _Class& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param..., ...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const&, true, false> {
  typedef _Class const& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const&, true, false> {
  typedef _Class const& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param..., ...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) volatile&, true, false> {
  typedef _Class volatile& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) volatile&, true, false> {
  typedef _Class volatile& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param..., ...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const volatile&, true, false> {
  typedef _Class const volatile& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const volatile&, true, false> {
  typedef _Class const volatile& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param..., ...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...)&&, true, false> {
  typedef _Class&& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...)&&, true, false> {
  typedef _Class&& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param..., ...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const&&, true, false> {
  typedef _Class const&& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const&&, true, false> {
  typedef _Class const&& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param..., ...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) volatile&&, true, false> {
  typedef _Class volatile&& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) volatile&&, true, false> {
  typedef _Class volatile&& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param..., ...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param...) const volatile&&, true, false> {
  typedef _Class const volatile&& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param...);
};

template <class _Rp, class _Class, class... _Param>
struct __member_pointer_traits_imp<_Rp (_Class::*)(_Param..., ...) const volatile&&, true, false> {
  typedef _Class const volatile&& _ClassType;
  typedef _Rp _ReturnType;
  typedef _Rp(_FnType)(_Param..., ...);
};

template <class _Rp, class _Class>
struct __member_pointer_traits_imp<_Rp _Class::*, false, true> {
  typedef _Class _ClassType;
  typedef _Rp _ReturnType;
};

template <class _MP>
struct __member_pointer_traits
    : public __member_pointer_traits_imp<__remove_cv_t<_MP>,
                                         is_member_function_pointer<_MP>::value,
                                         is_member_object_pointer<_MP>::value> {
  //     typedef ... _ClassType;
  //     typedef ... _ReturnType;
  //     typedef ... _FnType;
};

template <class _DecayedFp>
struct __member_pointer_class_type {};

template <class _Ret, class _ClassType>
struct __member_pointer_class_type<_Ret _ClassType::*> {
  typedef _ClassType type;
};

template <class _Fp,
          class _A0,
          class _DecayFp = __decay_t<_Fp>,
          class _DecayA0 = __decay_t<_A0>,
          class _ClassT  = typename __member_pointer_class_type<_DecayFp>::type>
using __enable_if_bullet1 =
    __enable_if_t<is_member_function_pointer<_DecayFp>::value &&
                  (is_same<_ClassT, _DecayA0>::value || is_base_of<_ClassT, _DecayA0>::value)>;

template <class _Fp, class _A0, class _DecayFp = __decay_t<_Fp>, class _DecayA0 = __decay_t<_A0> >
using __enable_if_bullet2 =
    __enable_if_t<is_member_function_pointer<_DecayFp>::value && __is_reference_wrapper<_DecayA0>::value>;

template <class _Fp,
          class _A0,
          class _DecayFp = __decay_t<_Fp>,
          class _DecayA0 = __decay_t<_A0>,
          class _ClassT  = typename __member_pointer_class_type<_DecayFp>::type>
using __enable_if_bullet3 =
    __enable_if_t<is_member_function_pointer<_DecayFp>::value &&
                  !(is_same<_ClassT, _DecayA0>::value || is_base_of<_ClassT, _DecayA0>::value) &&
                  !__is_reference_wrapper<_DecayA0>::value>;

template <class _Fp,
          class _A0,
          class _DecayFp = __decay_t<_Fp>,
          class _DecayA0 = __decay_t<_A0>,
          class _ClassT  = typename __member_pointer_class_type<_DecayFp>::type>
using __enable_if_bullet4 =
    __enable_if_t<is_member_object_pointer<_DecayFp>::value &&
                  (is_same<_ClassT, _DecayA0>::value || is_base_of<_ClassT, _DecayA0>::value)>;

template <class _Fp, class _A0, class _DecayFp = __decay_t<_Fp>, class _DecayA0 = __decay_t<_A0> >
using __enable_if_bullet5 =
    __enable_if_t<is_member_object_pointer<_DecayFp>::value && __is_reference_wrapper<_DecayA0>::value>;

template <class _Fp,
          class _A0,
          class _DecayFp = __decay_t<_Fp>,
          class _DecayA0 = __decay_t<_A0>,
          class _ClassT  = typename __member_pointer_class_type<_DecayFp>::type>
using __enable_if_bullet6 =
    __enable_if_t<is_member_object_pointer<_DecayFp>::value &&
                  !(is_same<_ClassT, _DecayA0>::value || is_base_of<_ClassT, _DecayA0>::value) &&
                  !__is_reference_wrapper<_DecayA0>::value>;

// __invoke forward declarations

// fall back - none of the bullets

template <class... _Args>
__nat __invoke(__any, _Args&&... __args);

// bullets 1, 2 and 3

// clang-format off
template <class _Fp, class _A0, class... _Args, class = __enable_if_bullet1<_Fp, _A0> >
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
decltype((std::declval<_A0>().*std::declval<_Fp>())(std::declval<_Args>()...))
__invoke(_Fp&& __f, _A0&& __a0, _Args&&... __args)
    _NOEXCEPT_(noexcept((static_cast<_A0&&>(__a0).*__f)(static_cast<_Args&&>(__args)...)))
               { return (static_cast<_A0&&>(__a0).*__f)(static_cast<_Args&&>(__args)...); }

template <class _Fp, class _A0, class... _Args, class = __enable_if_bullet2<_Fp, _A0> >
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
decltype((std::declval<_A0>().get().*std::declval<_Fp>())(std::declval<_Args>()...))
__invoke(_Fp&& __f, _A0&& __a0, _Args&&... __args)
    _NOEXCEPT_(noexcept((__a0.get().*__f)(static_cast<_Args&&>(__args)...)))
               { return (__a0.get().*__f)(static_cast<_Args&&>(__args)...); }

template <class _Fp, class _A0, class... _Args, class = __enable_if_bullet3<_Fp, _A0> >
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
decltype(((*std::declval<_A0>()).*std::declval<_Fp>())(std::declval<_Args>()...))
__invoke(_Fp&& __f, _A0&& __a0, _Args&&... __args)
    _NOEXCEPT_(noexcept(((*static_cast<_A0&&>(__a0)).*__f)(static_cast<_Args&&>(__args)...)))
               { return ((*static_cast<_A0&&>(__a0)).*__f)(static_cast<_Args&&>(__args)...); }

// bullets 4, 5 and 6

template <class _Fp, class _A0, class = __enable_if_bullet4<_Fp, _A0> >
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
decltype(std::declval<_A0>().*std::declval<_Fp>())
__invoke(_Fp&& __f, _A0&& __a0)
    _NOEXCEPT_(noexcept(static_cast<_A0&&>(__a0).*__f))
               { return static_cast<_A0&&>(__a0).*__f; }

template <class _Fp, class _A0, class = __enable_if_bullet5<_Fp, _A0> >
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
decltype(std::declval<_A0>().get().*std::declval<_Fp>())
__invoke(_Fp&& __f, _A0&& __a0)
    _NOEXCEPT_(noexcept(__a0.get().*__f))
               { return __a0.get().*__f; }

template <class _Fp, class _A0, class = __enable_if_bullet6<_Fp, _A0> >
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
decltype((*std::declval<_A0>()).*std::declval<_Fp>())
__invoke(_Fp&& __f, _A0&& __a0)
    _NOEXCEPT_(noexcept((*static_cast<_A0&&>(__a0)).*__f))
               { return (*static_cast<_A0&&>(__a0)).*__f; }

// bullet 7

template <class _Fp, class... _Args>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
decltype(std::declval<_Fp>()(std::declval<_Args>()...))
__invoke(_Fp&& __f, _Args&&... __args)
    _NOEXCEPT_(noexcept(static_cast<_Fp&&>(__f)(static_cast<_Args&&>(__args)...)))
               { return static_cast<_Fp&&>(__f)(static_cast<_Args&&>(__args)...); }
// clang-format on

// __invokable
template <class _Ret, class _Fp, class... _Args>
struct __invokable_r {
  template <class _XFp, class... _XArgs>
  static decltype(std::__invoke(std::declval<_XFp>(), std::declval<_XArgs>()...)) __try_call(int);
  template <class _XFp, class... _XArgs>
  static __nat __try_call(...);

  // FIXME: Check that _Ret, _Fp, and _Args... are all complete types, cv void,
  // or incomplete array types as required by the standard.
  using _Result = decltype(__try_call<_Fp, _Args...>(0));

  using type              = __conditional_t<_IsNotSame<_Result, __nat>::value,
                               __conditional_t<is_void<_Ret>::value, true_type, __is_core_convertible<_Result, _Ret> >,
                               false_type>;
  static const bool value = type::value;
};
template <class _Fp, class... _Args>
using __invokable = __invokable_r<void, _Fp, _Args...>;

template <bool _IsInvokable, bool _IsCVVoid, class _Ret, class _Fp, class... _Args>
struct __nothrow_invokable_r_imp {
  static const bool value = false;
};

template <class _Ret, class _Fp, class... _Args>
struct __nothrow_invokable_r_imp<true, false, _Ret, _Fp, _Args...> {
  typedef __nothrow_invokable_r_imp _ThisT;

  template <class _Tp>
  static void __test_noexcept(_Tp) _NOEXCEPT;

#ifdef _LIBCPP_CXX03_LANG
  static const bool value = false;
#else
# 382 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
  static const bool value =
      noexcept(_ThisT::__test_noexcept<_Ret>(_VSTD::__invoke(std::declval<_Fp>(), std::declval<_Args>()...)));
#endif
# 385 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
};

template <class _Ret, class _Fp, class... _Args>
struct __nothrow_invokable_r_imp<true, true, _Ret, _Fp, _Args...> {
#ifdef _LIBCPP_CXX03_LANG
  static const bool value = false;
#else
# 392 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
  static const bool value = noexcept(_VSTD::__invoke(std::declval<_Fp>(), std::declval<_Args>()...));
#endif
# 394 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
};

template <class _Ret, class _Fp, class... _Args>
using __nothrow_invokable_r =
    __nothrow_invokable_r_imp<__invokable_r<_Ret, _Fp, _Args...>::value, is_void<_Ret>::value, _Ret, _Fp, _Args...>;

template <class _Fp, class... _Args>
using __nothrow_invokable = __nothrow_invokable_r_imp<__invokable<_Fp, _Args...>::value, true, void, _Fp, _Args...>;

template <class _Fp, class... _Args>
struct __invoke_of
    : public enable_if<__invokable<_Fp, _Args...>::value, typename __invokable_r<void, _Fp, _Args...>::_Result> {};

template <class _Ret, bool = is_void<_Ret>::value>
struct __invoke_void_return_wrapper {
  template <class... _Args>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static _Ret __call(_Args&&... __args) {
    return std::__invoke(std::forward<_Args>(__args)...);
  }
};

template <class _Ret>
struct __invoke_void_return_wrapper<_Ret, true> {
  template <class... _Args>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static void __call(_Args&&... __args) {
    std::__invoke(std::forward<_Args>(__args)...);
  }
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 424 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3

// is_invocable

template <class _Fn, class... _Args>
struct _LIBCPP_TEMPLATE_VIS is_invocable : integral_constant<bool, __invokable<_Fn, _Args...>::value> {};

template <class _Ret, class _Fn, class... _Args>
struct _LIBCPP_TEMPLATE_VIS is_invocable_r : integral_constant<bool, __invokable_r<_Ret, _Fn, _Args...>::value> {};

template <class _Fn, class... _Args>
inline constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value;

template <class _Ret, class _Fn, class... _Args>
inline constexpr bool is_invocable_r_v = is_invocable_r<_Ret, _Fn, _Args...>::value;

// is_nothrow_invocable

template <class _Fn, class... _Args>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_invocable : integral_constant<bool, __nothrow_invokable<_Fn, _Args...>::value> {
};

template <class _Ret, class _Fn, class... _Args>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_invocable_r
    : integral_constant<bool, __nothrow_invokable_r<_Ret, _Fn, _Args...>::value> {};

template <class _Fn, class... _Args>
inline constexpr bool is_nothrow_invocable_v = is_nothrow_invocable<_Fn, _Args...>::value;

template <class _Ret, class _Fn, class... _Args>
inline constexpr bool is_nothrow_invocable_r_v = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value;

template <class _Fn, class... _Args>
struct _LIBCPP_TEMPLATE_VIS invoke_result : __invoke_of<_Fn, _Args...> {};

template <class _Fn, class... _Args>
using invoke_result_t = typename invoke_result<_Fn, _Args...>::type;

#endif // _LIBCPP_STD_VER >= 17
# 462 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_INVOKE_H
# 466 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/invoke.h" 3
#endif /* invoke.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/invoke.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/invoke.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/invoke.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/invoke.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/invoke.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/invoke.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/invoke.h" 3

template <class _Fn, class ..._Args>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 invoke_result_t<_Fn, _Args...>
invoke(_Fn&& __f, _Args&&... __args)
    noexcept(is_nothrow_invocable_v<_Fn, _Args...>)
{
    return _VSTD::__invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)...);
}

#endif // _LIBCPP_STD_VER >= 17
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/invoke.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/invoke.h" 3
template <class _Result, class _Fn, class... _Args>
  requires is_invocable_r_v<_Result, _Fn, _Args...>
_LIBCPP_HIDE_FROM_ABI constexpr _Result
invoke_r(_Fn&& __f, _Args&&... __args) noexcept(is_nothrow_invocable_r_v<_Result, _Fn, _Args...>) {
    if constexpr (is_void_v<_Result>) {
        static_cast<void>(std::invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)...));
    } else {
        // TODO: Use reference_converts_from_temporary_v once implemented
        // using _ImplicitInvokeResult = invoke_result_t<_Fn, _Args...>;
        // static_assert(!reference_converts_from_temporary_v<_Result, _ImplicitInvokeResult>,
        static_assert(true,
            "Returning from invoke_r would bind a temporary object to the reference return type, "
            "which would result in a dangling reference.");
        return std::invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)...);
    }
}
#endif
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/invoke.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_INVOKE_H
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/invoke.h" 3
#endif /* invoke.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/invocable.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/invocable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/invocable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/invocable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/invocable.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/invocable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/invocable.h" 3

// [concept.invocable]

template <class _Fn, class... _Args>
concept invocable = requires(_Fn&& __fn, _Args&&... __args) {
  _VSTD::invoke(_VSTD::forward<_Fn>(__fn), _VSTD::forward<_Args>(__args)...); // not required to be equality preserving
};

// [concept.regular.invocable]

template <class _Fn, class... _Args>
concept regular_invocable = invocable<_Fn, _Args...>;

#endif // _LIBCPP_STD_VER >= 20
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/invocable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_INVOCABLE_H
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/invocable.h" 3
#endif /* invocable.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/movable.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* predicate.h expanded by -frewrite-includes */
#include <__concepts/predicate.h>
#else /* predicate.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/predicate.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_PREDICATE_H
#define _LIBCPP___CONCEPTS_PREDICATE_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/boolean_testable.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/predicate.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/predicate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/invocable.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/predicate.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/predicate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/predicate.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/predicate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/predicate.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/predicate.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/predicate.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/predicate.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/predicate.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/predicate.h" 3

// [concept.predicate]

template <class _Fn, class... _Args>
concept predicate = regular_invocable<_Fn, _Args...> && __boolean_testable<invoke_result_t<_Fn, _Args...>>;

#endif // _LIBCPP_STD_VER >= 20
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/predicate.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_PREDICATE_H
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/predicate.h" 3
#endif /* predicate.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* regular.h expanded by -frewrite-includes */
#include <__concepts/regular.h>
#else /* regular.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/regular.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_REGULAR_H
#define _LIBCPP___CONCEPTS_REGULAR_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/equality_comparable.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/regular.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/regular.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* semiregular.h expanded by -frewrite-includes */
#include <__concepts/semiregular.h>
#else /* semiregular.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/regular.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/semiregular.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_SEMIREGULAR_H
#define _LIBCPP___CONCEPTS_SEMIREGULAR_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/semiregular.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/semiregular.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/semiregular.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/semiregular.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/semiregular.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/semiregular.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/semiregular.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/semiregular.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/semiregular.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/semiregular.h" 3

// [concept.object]

template <class _Tp>
concept semiregular = copyable<_Tp> && default_initializable<_Tp>;

#endif // _LIBCPP_STD_VER >= 20
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/semiregular.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_SEMIREGULAR_H
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/semiregular.h" 3
#endif /* semiregular.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/regular.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/regular.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/regular.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/regular.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/regular.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/regular.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/regular.h" 3

// [concept.object]

template <class _Tp>
concept regular = semiregular<_Tp> && equality_comparable<_Tp>;

#endif // _LIBCPP_STD_VER >= 20
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/regular.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_REGULAR_H
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/regular.h" 3
#endif /* regular.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* relation.h expanded by -frewrite-includes */
#include <__concepts/relation.h>
#else /* relation.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/relation.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_RELATION_H
#define _LIBCPP___CONCEPTS_RELATION_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/predicate.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/relation.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/relation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/relation.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/relation.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/relation.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/relation.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/relation.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/relation.h" 3

// [concept.relation]

template <class _Rp, class _Tp, class _Up>
concept relation =
    predicate<_Rp, _Tp, _Tp> && predicate<_Rp, _Up, _Up> && predicate<_Rp, _Tp, _Up> && predicate<_Rp, _Up, _Tp>;

// [concept.equiv]

template <class _Rp, class _Tp, class _Up>
concept equivalence_relation = relation<_Rp, _Tp, _Up>;

// [concept.strictweakorder]

template <class _Rp, class _Tp, class _Up>
concept strict_weak_order = relation<_Rp, _Tp, _Up>;

#endif // _LIBCPP_STD_VER >= 20
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/relation.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_RELATION_H
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/relation.h" 3
#endif /* relation.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/semiregular.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* totally_ordered.h expanded by -frewrite-includes */
#include <__concepts/totally_ordered.h>
#else /* totally_ordered.h expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_TOTALLY_ORDERED_H
#define _LIBCPP___CONCEPTS_TOTALLY_ORDERED_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/boolean_testable.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/equality_comparable.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_reference.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_const_lvalue_ref.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3

// [concept.totallyordered]

template <class _Tp, class _Up>
concept __partially_ordered_with = requires(__make_const_lvalue_ref<_Tp> __t, __make_const_lvalue_ref<_Up> __u) {
  { __t < __u } -> __boolean_testable;
  { __t > __u } -> __boolean_testable;
  { __t <= __u } -> __boolean_testable;
  { __t >= __u } -> __boolean_testable;
  { __u < __t } -> __boolean_testable;
  { __u > __t } -> __boolean_testable;
  { __u <= __t } -> __boolean_testable;
  { __u >= __t } -> __boolean_testable;
};

template <class _Tp>
concept totally_ordered = equality_comparable<_Tp> && __partially_ordered_with<_Tp, _Tp>;

// clang-format off
template <class _Tp, class _Up>
concept totally_ordered_with =
    totally_ordered<_Tp> && totally_ordered<_Up> &&
    equality_comparable_with<_Tp, _Up> &&
    totally_ordered<
        common_reference_t<
            __make_const_lvalue_ref<_Tp>,
            __make_const_lvalue_ref<_Up>>> &&
    __partially_ordered_with<_Tp, _Up>;
// clang-format on

#endif // _LIBCPP_STD_VER >= 20
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_TOTALLY_ORDERED_H
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/totally_ordered.h" 3
#endif /* totally_ordered.h expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* incrementable_traits.h expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#else /* incrementable_traits.h expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_INCREMENTABLE_TRAITS_H
#define _LIBCPP___ITERATOR_INCREMENTABLE_TRAITS_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_primary_template.h expanded by -frewrite-includes */
#include <__type_traits/is_primary_template.h>
#else /* is_primary_template.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_primary_template.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H
#define _LIBCPP___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_primary_template.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_primary_template.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_primary_template.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_primary_template.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_primary_template.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_primary_template.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_valid_expansion.h expanded by -frewrite-includes */
#include <__type_traits/is_valid_expansion.h>
#else /* is_valid_expansion.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_primary_template.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_valid_expansion.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_VALID_EXPANSION_H
#define _LIBCPP___TYPE_TRAITS_IS_VALID_EXPANSION_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_valid_expansion.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_valid_expansion.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_valid_expansion.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_valid_expansion.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_valid_expansion.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_valid_expansion.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_valid_expansion.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <template <class...> class _Templ, class... _Args, class = _Templ<_Args...> >
true_type __sfinae_test_impl(int);
template <template <class...> class, class...>
false_type __sfinae_test_impl(...);

template <template <class...> class _Templ, class... _Args>
using _IsValidExpansion _LIBCPP_NODEBUG = decltype(std::__sfinae_test_impl<_Templ, _Args...>(0));

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_VALID_EXPANSION_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_valid_expansion.h" 3
#endif /* is_valid_expansion.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_primary_template.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_primary_template.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_primary_template.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_primary_template.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
using __test_for_primary_template = __enable_if_t<_IsSame<_Tp, typename _Tp::__primary_template>::value>;

template <class _Tp>
using __is_primary_template = _IsValidExpansion<__test_for_primary_template, _Tp>;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_primary_template.h" 3
#endif /* is_primary_template.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* make_signed.h expanded by -frewrite-includes */
#include <__type_traits/make_signed.h>
#else /* make_signed.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_MAKE_SIGNED_H
#define _LIBCPP___TYPE_TRAITS_MAKE_SIGNED_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/apply_cv.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_enum.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/nat.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* type_list.h expanded by -frewrite-includes */
#include <__type_traits/type_list.h>
#else /* type_list.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_list.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_TYPE_LIST_H
#define _LIBCPP___TYPE_TRAITS_TYPE_LIST_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_list.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_list.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_list.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_list.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_list.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_list.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_list.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Hp, class _Tp>
struct __type_list {
  typedef _Hp _Head;
  typedef _Tp _Tail;
};

template <class _TypeList, size_t _Size, bool = _Size <= sizeof(typename _TypeList::_Head)>
struct __find_first;

template <class _Hp, class _Tp, size_t _Size>
struct __find_first<__type_list<_Hp, _Tp>, _Size, true> {
  typedef _LIBCPP_NODEBUG _Hp type;
};

template <class _Hp, class _Tp, size_t _Size>
struct __find_first<__type_list<_Hp, _Tp>, _Size, false> {
  typedef _LIBCPP_NODEBUG typename __find_first<_Tp, _Size>::type type;
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_TYPE_LIST_H
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_list.h" 3
#endif /* type_list.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__make_signed)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3

template <class _Tp>
using __make_signed_t = __make_signed(_Tp);

#else
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
// clang-format off
typedef __type_list<signed char,
        __type_list<signed short,
        __type_list<signed int,
        __type_list<signed long,
        __type_list<signed long long,
#  ifndef _LIBCPP_HAS_NO_INT128
        __type_list<__int128_t,
#  endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
        __nat
#  ifndef _LIBCPP_HAS_NO_INT128
        >
#  endif
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
        > > > > > __signed_types;
// clang-format on

template <class _Tp, bool = is_integral<_Tp>::value || is_enum<_Tp>::value>
struct __make_signed{};

template <class _Tp>
struct __make_signed<_Tp, true> {
  typedef typename __find_first<__signed_types, sizeof(_Tp)>::type type;
};

// clang-format off
template <> struct __make_signed<bool,               true> {};
template <> struct __make_signed<  signed short,     true> {typedef short     type;};
template <> struct __make_signed<unsigned short,     true> {typedef short     type;};
template <> struct __make_signed<  signed int,       true> {typedef int       type;};
template <> struct __make_signed<unsigned int,       true> {typedef int       type;};
template <> struct __make_signed<  signed long,      true> {typedef long      type;};
template <> struct __make_signed<unsigned long,      true> {typedef long      type;};
template <> struct __make_signed<  signed long long, true> {typedef long long type;};
template <> struct __make_signed<unsigned long long, true> {typedef long long type;};
#  ifndef _LIBCPP_HAS_NO_INT128
template <> struct __make_signed<__int128_t,         true> {typedef __int128_t type;};
template <> struct __make_signed<__uint128_t,        true> {typedef __int128_t type;};
#  endif
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
// clang-format on

template <class _Tp>
using __make_signed_t = __apply_cv_t<_Tp, typename __make_signed<__remove_cv_t<_Tp> >::type>;

#endif // __has_builtin(__make_signed)
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3

template <class _Tp>
struct make_signed {
  using type _LIBCPP_NODEBUG = __make_signed_t<_Tp>;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
template <class _Tp>
using make_signed_t = __make_signed_t<_Tp>;
#endif
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_MAKE_SIGNED_H
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_signed.h" 3
#endif /* make_signed.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3

// [incrementable.traits]
template<class> struct incrementable_traits {};

template<class _Tp>
requires is_object_v<_Tp>
struct incrementable_traits<_Tp*> {
  using difference_type = ptrdiff_t;
};

template<class _Ip>
struct incrementable_traits<const _Ip> : incrementable_traits<_Ip> {};

template<class _Tp>
concept __has_member_difference_type = requires { typename _Tp::difference_type; };

template<__has_member_difference_type _Tp>
struct incrementable_traits<_Tp> {
  using difference_type = typename _Tp::difference_type;
};

template<class _Tp>
concept __has_integral_minus =
  requires(const _Tp& __x, const _Tp& __y) {
    { __x - __y } -> integral;
  };

template<__has_integral_minus _Tp>
requires (!__has_member_difference_type<_Tp>)
struct incrementable_traits<_Tp> {
  using difference_type = make_signed_t<decltype(std::declval<_Tp>() - std::declval<_Tp>())>;
};

template <class>
struct iterator_traits;

// Let `RI` be `remove_cvref_t<I>`. The type `iter_difference_t<I>` denotes
// `incrementable_traits<RI>::difference_type` if `iterator_traits<RI>` names a specialization
// generated from the primary template, and `iterator_traits<RI>::difference_type` otherwise.
template <class _Ip>
using iter_difference_t = typename conditional_t<__is_primary_template<iterator_traits<remove_cvref_t<_Ip> > >::value,
                                                 incrementable_traits<remove_cvref_t<_Ip> >,
                                                 iterator_traits<remove_cvref_t<_Ip> > >::difference_type;

#endif // _LIBCPP_STD_VER >= 20
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_INCREMENTABLE_TRAITS_H
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/incrementable_traits.h" 3
#endif /* incrementable_traits.h expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* iter_move.h expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#else /* iter_move.h expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_ITER_MOVE_H
#define _LIBCPP___ITERATOR_ITER_MOVE_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/class_or_enum.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* iterator_traits.h expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#else /* iterator_traits.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_ITERATOR_TRAITS_H
#define _LIBCPP___ITERATOR_ITERATOR_TRAITS_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/equality_comparable.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/totally_ordered.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pair.h expanded by -frewrite-includes */
#include <__fwd/pair.h>
#else /* pair.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/pair.h" 1 3
//===---------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_PAIR_H
#define _LIBCPP___FWD_PAIR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/pair.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/pair.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/pair.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/pair.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class, class>
struct _LIBCPP_TEMPLATE_VIS pair;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FWD_PAIR_H
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/pair.h" 3
#endif /* pair.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* readable_traits.h expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#else /* readable_traits.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_READABLE_TRAITS_H
#define _LIBCPP___ITERATOR_READABLE_TRAITS_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_array.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_primary_template.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_extent.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3

// [readable.traits]
template<class> struct __cond_value_type {};

template<class _Tp>
requires is_object_v<_Tp>
struct __cond_value_type<_Tp> { using value_type = remove_cv_t<_Tp>; };

template<class _Tp>
concept __has_member_value_type = requires { typename _Tp::value_type; };

template<class _Tp>
concept __has_member_element_type = requires { typename _Tp::element_type; };

template<class> struct indirectly_readable_traits {};

template<class _Ip>
requires is_array_v<_Ip>
struct indirectly_readable_traits<_Ip> {
  using value_type = remove_cv_t<remove_extent_t<_Ip>>;
};

template<class _Ip>
struct indirectly_readable_traits<const _Ip> : indirectly_readable_traits<_Ip> {};

template<class _Tp>
struct indirectly_readable_traits<_Tp*> : __cond_value_type<_Tp> {};

template<__has_member_value_type _Tp>
struct indirectly_readable_traits<_Tp>
  : __cond_value_type<typename _Tp::value_type> {};

template<__has_member_element_type _Tp>
struct indirectly_readable_traits<_Tp>
  : __cond_value_type<typename _Tp::element_type> {};

template<__has_member_value_type _Tp>
  requires __has_member_element_type<_Tp>
struct indirectly_readable_traits<_Tp> {};

template<__has_member_value_type _Tp>
  requires __has_member_element_type<_Tp> &&
           same_as<remove_cv_t<typename _Tp::element_type>,
                   remove_cv_t<typename _Tp::value_type>>
struct indirectly_readable_traits<_Tp>
  : __cond_value_type<typename _Tp::value_type> {};

#endif // _LIBCPP_STD_VER >= 20
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_READABLE_TRAITS_H
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/readable_traits.h" 3
#endif /* readable_traits.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_const.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_reference.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* disjunction.h expanded by -frewrite-includes */
#include <__type_traits/disjunction.h>
#else /* disjunction.h expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/disjunction.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_DISJUNCTION_H
#define _LIBCPP___TYPE_TRAITS_DISJUNCTION_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/disjunction.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/disjunction.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/disjunction.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/disjunction.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/disjunction.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/disjunction.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/disjunction.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <bool>
struct _OrImpl;

template <>
struct _OrImpl<true> {
  template <class _Res, class _First, class... _Rest>
  using _Result _LIBCPP_NODEBUG =
      typename _OrImpl<!bool(_First::value) && sizeof...(_Rest) != 0>::template _Result<_First, _Rest...>;
};

template <>
struct _OrImpl<false> {
  template <class _Res, class...>
  using _Result = _Res;
};

// _Or always performs lazy evaluation of its arguments.
//
// However, `_Or<_Pred...>` itself will evaluate its result immediately (without having to
// be instantiated) since it is an alias, unlike `disjunction<_Pred...>`, which is a struct.
// If you want to defer the evaluation of `_Or<_Pred...>` itself, use `_Lazy<_Or, _Pred...>`
// or `disjunction<_Pred...>` directly.
template <class... _Args>
using _Or _LIBCPP_NODEBUG = typename _OrImpl<sizeof...(_Args) != 0>::template _Result<false_type, _Args...>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/disjunction.h" 3

template <class... _Args>
struct disjunction : _Or<_Args...> {};

template <class... _Args>
inline constexpr bool disjunction_v = _Or<_Args...>::value;

#endif // _LIBCPP_STD_VER >= 17
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/disjunction.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_DISJUNCTION_H
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/disjunction.h" 3
#endif /* disjunction.h expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_primary_template.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_valid_expansion.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_const.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/void_t.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#endif
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3

template <class _Tp>
using __with_reference = _Tp&;

template <class _Tp>
concept __can_reference = requires {
  typename __with_reference<_Tp>;
};

template <class _Tp>
concept __dereferenceable = requires(_Tp& __t) {
  { *__t } -> __can_reference; // not required to be equality-preserving
};

// [iterator.traits]
template<__dereferenceable _Tp>
using iter_reference_t = decltype(*std::declval<_Tp&>());

#endif // _LIBCPP_STD_VER >= 20
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3

template <class _Iter>
struct _LIBCPP_TEMPLATE_VIS iterator_traits;

struct _LIBCPP_TEMPLATE_VIS input_iterator_tag {};
struct _LIBCPP_TEMPLATE_VIS output_iterator_tag {};
struct _LIBCPP_TEMPLATE_VIS forward_iterator_tag       : public input_iterator_tag {};
struct _LIBCPP_TEMPLATE_VIS bidirectional_iterator_tag : public forward_iterator_tag {};
struct _LIBCPP_TEMPLATE_VIS random_access_iterator_tag : public bidirectional_iterator_tag {};
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
struct _LIBCPP_TEMPLATE_VIS contiguous_iterator_tag    : public random_access_iterator_tag {};
#endif
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3

template <class _Iter>
struct __iter_traits_cache {
  using type = _If<
    __is_primary_template<iterator_traits<_Iter> >::value,
    _Iter,
    iterator_traits<_Iter>
  >;
};
template <class _Iter>
using _ITER_TRAITS = typename __iter_traits_cache<_Iter>::type;

struct __iter_concept_concept_test {
  template <class _Iter>
  using _Apply = typename _ITER_TRAITS<_Iter>::iterator_concept;
};
struct __iter_concept_category_test {
  template <class _Iter>
  using _Apply = typename _ITER_TRAITS<_Iter>::iterator_category;
};
struct __iter_concept_random_fallback {
  template <class _Iter>
  using _Apply = __enable_if_t<
                          __is_primary_template<iterator_traits<_Iter> >::value,
                          random_access_iterator_tag
                        >;
};

template <class _Iter, class _Tester> struct __test_iter_concept
    : _IsValidExpansion<_Tester::template _Apply, _Iter>,
      _Tester
{
};

template <class _Iter>
struct __iter_concept_cache {
  using type = _Or<
    __test_iter_concept<_Iter, __iter_concept_concept_test>,
    __test_iter_concept<_Iter, __iter_concept_category_test>,
    __test_iter_concept<_Iter, __iter_concept_random_fallback>
  >;
};

template <class _Iter>
using _ITER_CONCEPT = typename __iter_concept_cache<_Iter>::type::template _Apply<_Iter>;


template <class _Tp>
struct __has_iterator_typedefs
{
private:
    template <class _Up> static false_type __test(...);
    template <class _Up> static true_type __test(__void_t<typename _Up::iterator_category>* = nullptr,
                                                 __void_t<typename _Up::difference_type>* = nullptr,
                                                 __void_t<typename _Up::value_type>* = nullptr,
                                                 __void_t<typename _Up::reference>* = nullptr,
                                                 __void_t<typename _Up::pointer>* = nullptr);
public:
    static const bool value = decltype(__test<_Tp>(0,0,0,0,0))::value;
};


template <class _Tp>
struct __has_iterator_category
{
private:
    template <class _Up> static false_type __test(...);
    template <class _Up> static true_type __test(typename _Up::iterator_category* = nullptr);
public:
    static const bool value = decltype(__test<_Tp>(nullptr))::value;
};

template <class _Tp>
struct __has_iterator_concept
{
private:
    template <class _Up> static false_type __test(...);
    template <class _Up> static true_type __test(typename _Up::iterator_concept* = nullptr);
public:
    static const bool value = decltype(__test<_Tp>(nullptr))::value;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 161 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3

// The `cpp17-*-iterator` exposition-only concepts have very similar names to the `Cpp17*Iterator` named requirements
// from `[iterator.cpp17]`. To avoid confusion between the two, the exposition-only concepts have been banished to
// a "detail" namespace indicating they have a niche use-case.
namespace __iterator_traits_detail {
template<class _Ip>
concept __cpp17_iterator =
  requires(_Ip __i) {
    {   *__i } -> __can_reference;
    {  ++__i } -> same_as<_Ip&>;
    { *__i++ } -> __can_reference;
  } &&
  copyable<_Ip>;

template<class _Ip>
concept __cpp17_input_iterator =
  __cpp17_iterator<_Ip> &&
  equality_comparable<_Ip> &&
  requires(_Ip __i) {
    typename incrementable_traits<_Ip>::difference_type;
    typename indirectly_readable_traits<_Ip>::value_type;
    typename common_reference_t<iter_reference_t<_Ip>&&,
                                typename indirectly_readable_traits<_Ip>::value_type&>;
    typename common_reference_t<decltype(*__i++)&&,
                                typename indirectly_readable_traits<_Ip>::value_type&>;
    requires signed_integral<typename incrementable_traits<_Ip>::difference_type>;
  };

template<class _Ip>
concept __cpp17_forward_iterator =
  __cpp17_input_iterator<_Ip> &&
  constructible_from<_Ip> &&
  is_reference_v<iter_reference_t<_Ip>> &&
  same_as<remove_cvref_t<iter_reference_t<_Ip>>,
          typename indirectly_readable_traits<_Ip>::value_type> &&
  requires(_Ip __i) {
    {  __i++ } -> convertible_to<_Ip const&>;
    { *__i++ } -> same_as<iter_reference_t<_Ip>>;
  };

template<class _Ip>
concept __cpp17_bidirectional_iterator =
  __cpp17_forward_iterator<_Ip> &&
  requires(_Ip __i) {
    {  --__i } -> same_as<_Ip&>;
    {  __i-- } -> convertible_to<_Ip const&>;
    { *__i-- } -> same_as<iter_reference_t<_Ip>>;
  };

template<class _Ip>
concept __cpp17_random_access_iterator =
  __cpp17_bidirectional_iterator<_Ip> &&
  totally_ordered<_Ip> &&
  requires(_Ip __i, typename incrementable_traits<_Ip>::difference_type __n) {
    { __i += __n } -> same_as<_Ip&>;
    { __i -= __n } -> same_as<_Ip&>;
    { __i +  __n } -> same_as<_Ip>;
    { __n +  __i } -> same_as<_Ip>;
    { __i -  __n } -> same_as<_Ip>;
    { __i -  __i } -> same_as<decltype(__n)>; // NOLINT(misc-redundant-expression) ; This is llvm.org/PR54114
    {  __i[__n]  } -> convertible_to<iter_reference_t<_Ip>>;
  };
} // namespace __iterator_traits_detail

template<class _Ip>
concept __has_member_reference = requires { typename _Ip::reference; };

template<class _Ip>
concept __has_member_pointer = requires { typename _Ip::pointer; };

template<class _Ip>
concept __has_member_iterator_category = requires { typename _Ip::iterator_category; };

template<class _Ip>
concept __specifies_members = requires {
    typename _Ip::value_type;
    typename _Ip::difference_type;
    requires __has_member_reference<_Ip>;
    requires __has_member_iterator_category<_Ip>;
  };

template<class>
struct __iterator_traits_member_pointer_or_void {
  using type = void;
};

template<__has_member_pointer _Tp>
struct __iterator_traits_member_pointer_or_void<_Tp> {
  using type = typename _Tp::pointer;
};

template<class _Tp>
concept __cpp17_iterator_missing_members =
  !__specifies_members<_Tp> &&
  __iterator_traits_detail::__cpp17_iterator<_Tp>;

template<class _Tp>
concept __cpp17_input_iterator_missing_members =
  __cpp17_iterator_missing_members<_Tp> &&
  __iterator_traits_detail::__cpp17_input_iterator<_Tp>;

// Otherwise, `pointer` names `void`.
template<class>
struct __iterator_traits_member_pointer_or_arrow_or_void { using type = void; };

// [iterator.traits]/3.2.1
// If the qualified-id `I::pointer` is valid and denotes a type, `pointer` names that type.
template<__has_member_pointer _Ip>
struct __iterator_traits_member_pointer_or_arrow_or_void<_Ip> { using type = typename _Ip::pointer; };

// Otherwise, if `decltype(declval<I&>().operator->())` is well-formed, then `pointer` names that
// type.
template<class _Ip>
  requires requires(_Ip& __i) { __i.operator->(); } && (!__has_member_pointer<_Ip>)
struct __iterator_traits_member_pointer_or_arrow_or_void<_Ip> {
  using type = decltype(std::declval<_Ip&>().operator->());
};

// Otherwise, `reference` names `iter-reference-t<I>`.
template<class _Ip>
struct __iterator_traits_member_reference { using type = iter_reference_t<_Ip>; };

// [iterator.traits]/3.2.2
// If the qualified-id `I::reference` is valid and denotes a type, `reference` names that type.
template<__has_member_reference _Ip>
struct __iterator_traits_member_reference<_Ip> { using type = typename _Ip::reference; };

// [iterator.traits]/3.2.3.4
// input_iterator_tag
template<class _Ip>
struct __deduce_iterator_category {
  using type = input_iterator_tag;
};

// [iterator.traits]/3.2.3.1
// `random_access_iterator_tag` if `I` satisfies `cpp17-random-access-iterator`, or otherwise
template<__iterator_traits_detail::__cpp17_random_access_iterator _Ip>
struct __deduce_iterator_category<_Ip> {
  using type = random_access_iterator_tag;
};

// [iterator.traits]/3.2.3.2
// `bidirectional_iterator_tag` if `I` satisfies `cpp17-bidirectional-iterator`, or otherwise
template<__iterator_traits_detail::__cpp17_bidirectional_iterator _Ip>
struct __deduce_iterator_category<_Ip> {
  using type = bidirectional_iterator_tag;
};

// [iterator.traits]/3.2.3.3
// `forward_iterator_tag` if `I` satisfies `cpp17-forward-iterator`, or otherwise
template<__iterator_traits_detail::__cpp17_forward_iterator _Ip>
struct __deduce_iterator_category<_Ip> {
  using type = forward_iterator_tag;
};

template<class _Ip>
struct __iterator_traits_iterator_category : __deduce_iterator_category<_Ip> {};

// [iterator.traits]/3.2.3
// If the qualified-id `I::iterator-category` is valid and denotes a type, `iterator-category` names
// that type.
template<__has_member_iterator_category _Ip>
struct __iterator_traits_iterator_category<_Ip> {
  using type = typename _Ip::iterator_category;
};

// otherwise, it names void.
template<class>
struct __iterator_traits_difference_type { using type = void; };

// If the qualified-id `incrementable_traits<I>::difference_type` is valid and denotes a type, then
// `difference_type` names that type;
template<class _Ip>
requires requires { typename incrementable_traits<_Ip>::difference_type; }
struct __iterator_traits_difference_type<_Ip> {
  using type = typename incrementable_traits<_Ip>::difference_type;
};

// [iterator.traits]/3.4
// Otherwise, `iterator_traits<I>` has no members by any of the above names.
template<class>
struct __iterator_traits {};

// [iterator.traits]/3.1
// If `I` has valid ([temp.deduct]) member types `difference-type`, `value-type`, `reference`, and
// `iterator-category`, then `iterator-traits<I>` has the following publicly accessible members:
template<__specifies_members _Ip>
struct __iterator_traits<_Ip> {
  using iterator_category  = typename _Ip::iterator_category;
  using value_type         = typename _Ip::value_type;
  using difference_type    = typename _Ip::difference_type;
  using pointer            = typename __iterator_traits_member_pointer_or_void<_Ip>::type;
  using reference          = typename _Ip::reference;
};

// [iterator.traits]/3.2
// Otherwise, if `I` satisfies the exposition-only concept `cpp17-input-iterator`,
// `iterator-traits<I>` has the following publicly accessible members:
template<__cpp17_input_iterator_missing_members _Ip>
struct __iterator_traits<_Ip> {
  using iterator_category = typename __iterator_traits_iterator_category<_Ip>::type;
  using value_type        = typename indirectly_readable_traits<_Ip>::value_type;
  using difference_type   = typename incrementable_traits<_Ip>::difference_type;
  using pointer           = typename __iterator_traits_member_pointer_or_arrow_or_void<_Ip>::type;
  using reference         = typename __iterator_traits_member_reference<_Ip>::type;
};

// Otherwise, if `I` satisfies the exposition-only concept `cpp17-iterator`, then
// `iterator_traits<I>` has the following publicly accessible members:
template<__cpp17_iterator_missing_members _Ip>
struct __iterator_traits<_Ip> {
  using iterator_category = output_iterator_tag;
  using value_type        = void;
  using difference_type   = typename __iterator_traits_difference_type<_Ip>::type;
  using pointer           = void;
  using reference         = void;
};

template<class _Ip>
struct iterator_traits : __iterator_traits<_Ip> {
  using __primary_template = iterator_traits;
};

#else // _LIBCPP_STD_VER >= 20
# 385 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3

template <class _Iter, bool> struct __iterator_traits {};

template <class _Iter, bool> struct __iterator_traits_impl {};

template <class _Iter>
struct __iterator_traits_impl<_Iter, true>
{
    typedef typename _Iter::difference_type   difference_type;
    typedef typename _Iter::value_type        value_type;
    typedef typename _Iter::pointer           pointer;
    typedef typename _Iter::reference         reference;
    typedef typename _Iter::iterator_category iterator_category;
};

template <class _Iter>
struct __iterator_traits<_Iter, true>
    :  __iterator_traits_impl
      <
        _Iter,
        is_convertible<typename _Iter::iterator_category, input_iterator_tag>::value ||
        is_convertible<typename _Iter::iterator_category, output_iterator_tag>::value
      >
{};

// iterator_traits<Iterator> will only have the nested types if Iterator::iterator_category
//    exists.  Else iterator_traits<Iterator> will be an empty class.  This is a
//    conforming extension which allows some programs to compile and behave as
//    the client expects instead of failing at compile time.

template <class _Iter>
struct _LIBCPP_TEMPLATE_VIS iterator_traits
    : __iterator_traits<_Iter, __has_iterator_typedefs<_Iter>::value> {

  using __primary_template = iterator_traits;
};
#endif // _LIBCPP_STD_VER >= 20
# 422 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3

template<class _Tp>
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 425 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
requires is_object_v<_Tp>
#endif
# 427 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
struct _LIBCPP_TEMPLATE_VIS iterator_traits<_Tp*>
{
    typedef ptrdiff_t difference_type;
    typedef __remove_cv_t<_Tp> value_type;
    typedef _Tp* pointer;
    typedef _Tp& reference;
    typedef random_access_iterator_tag iterator_category;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 435 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
    typedef contiguous_iterator_tag    iterator_concept;
#endif
# 437 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
};

template <class _Tp, class _Up, bool = __has_iterator_category<iterator_traits<_Tp> >::value>
struct __has_iterator_category_convertible_to
    : is_convertible<typename iterator_traits<_Tp>::iterator_category, _Up>
{};

template <class _Tp, class _Up>
struct __has_iterator_category_convertible_to<_Tp, _Up, false> : false_type {};

template <class _Tp, class _Up, bool = __has_iterator_concept<_Tp>::value>
struct __has_iterator_concept_convertible_to
    : is_convertible<typename _Tp::iterator_concept, _Up>
{};

template <class _Tp, class _Up>
struct __has_iterator_concept_convertible_to<_Tp, _Up, false> : false_type {};

template <class _Tp>
using __has_input_iterator_category = __has_iterator_category_convertible_to<_Tp, input_iterator_tag>;

template <class _Tp>
using __has_forward_iterator_category = __has_iterator_category_convertible_to<_Tp, forward_iterator_tag>;

template <class _Tp>
using __has_bidirectional_iterator_category = __has_iterator_category_convertible_to<_Tp, bidirectional_iterator_tag>;

template <class _Tp>
using __has_random_access_iterator_category = __has_iterator_category_convertible_to<_Tp, random_access_iterator_tag>;

// __libcpp_is_contiguous_iterator determines if an iterator is known by
// libc++ to be contiguous, either because it advertises itself as such
// (in C++20) or because it is a pointer type or a known trivial wrapper
// around a (possibly fancy) pointer type, such as __wrap_iter<T*>.
// Such iterators receive special "contiguous" optimizations in
// std::copy and std::sort.
//
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 475 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
template <class _Tp>
struct __libcpp_is_contiguous_iterator : _Or<
    __has_iterator_category_convertible_to<_Tp, contiguous_iterator_tag>,
    __has_iterator_concept_convertible_to<_Tp, contiguous_iterator_tag>
> {};
#else
# 481 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
template <class _Tp>
struct __libcpp_is_contiguous_iterator : false_type {};
#endif
# 484 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3

// Any native pointer which is an iterator is also a contiguous iterator.
template <class _Up>
struct __libcpp_is_contiguous_iterator<_Up*> : true_type {};


template <class _Iter>
class __wrap_iter;

template <class _Tp>
using __has_exactly_input_iterator_category
    = integral_constant<bool,
         __has_iterator_category_convertible_to<_Tp, input_iterator_tag>::value &&
        !__has_iterator_category_convertible_to<_Tp, forward_iterator_tag>::value>;

template <class _Tp>
using __has_exactly_forward_iterator_category
    = integral_constant<bool,
         __has_iterator_category_convertible_to<_Tp, forward_iterator_tag>::value &&
        !__has_iterator_category_convertible_to<_Tp, bidirectional_iterator_tag>::value>;

template <class _Tp>
using __has_exactly_bidirectional_iterator_category
    = integral_constant<bool,
         __has_iterator_category_convertible_to<_Tp, bidirectional_iterator_tag>::value &&
        !__has_iterator_category_convertible_to<_Tp, random_access_iterator_tag>::value>;

template<class _InputIterator>
using __iter_value_type = typename iterator_traits<_InputIterator>::value_type;

template<class _InputIterator>
using __iter_key_type = __remove_const_t<typename iterator_traits<_InputIterator>::value_type::first_type>;

template<class _InputIterator>
using __iter_mapped_type = typename iterator_traits<_InputIterator>::value_type::second_type;

template<class _InputIterator>
using __iter_to_alloc_type = pair<
    typename add_const<typename iterator_traits<_InputIterator>::value_type::first_type>::type,
    typename iterator_traits<_InputIterator>::value_type::second_type>;

template <class _Iter>
using __iterator_category_type = typename iterator_traits<_Iter>::iterator_category;

template <class _Iter>
using __iterator_pointer_type = typename iterator_traits<_Iter>::pointer;

template <class _Iter>
using __iter_diff_t = typename iterator_traits<_Iter>::difference_type;

template <class _Iter>
using __iter_reference = typename iterator_traits<_Iter>::reference;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 538 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3

// [readable.traits]

// Let `RI` be `remove_cvref_t<I>`. The type `iter_value_t<I>` denotes
// `indirectly_readable_traits<RI>::value_type` if `iterator_traits<RI>` names a specialization
// generated from the primary template, and `iterator_traits<RI>::value_type` otherwise.
// This has to be in this file and not readable_traits.h to break the include cycle between the two.
template <class _Ip>
using iter_value_t = typename conditional_t<__is_primary_template<iterator_traits<remove_cvref_t<_Ip> > >::value,
                                            indirectly_readable_traits<remove_cvref_t<_Ip> >,
                                            iterator_traits<remove_cvref_t<_Ip> > >::value_type;

#endif // _LIBCPP_STD_VER >= 20
# 551 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_ITERATOR_TRAITS_H
# 555 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_traits.h" 3
#endif /* iterator_traits.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3

// [iterator.cust.move]

namespace ranges {
namespace __iter_move {

void iter_move();

template <class _Tp>
concept __unqualified_iter_move =
  __class_or_enum<remove_cvref_t<_Tp>> &&
  requires (_Tp&& __t) {
    // NOLINTNEXTLINE(libcpp-robust-against-adl) iter_swap ADL calls should only be made through ranges::iter_swap
    iter_move(std::forward<_Tp>(__t));
  };

template<class _Tp>
concept __move_deref =
  !__unqualified_iter_move<_Tp> &&
  requires (_Tp&& __t) {
    *__t;
    requires is_lvalue_reference_v<decltype(*__t)>;
  };

template<class _Tp>
concept __just_deref =
  !__unqualified_iter_move<_Tp> &&
  !__move_deref<_Tp> &&
  requires (_Tp&& __t) {
    *__t;
    requires (!is_lvalue_reference_v<decltype(*__t)>);
  };

// [iterator.cust.move]

struct __fn {
  // NOLINTBEGIN(libcpp-robust-against-adl) iter_move ADL calls should only be made through ranges::iter_move
  template<class _Ip>
    requires __unqualified_iter_move<_Ip>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator()(_Ip&& __i) const
    noexcept(noexcept(iter_move(std::forward<_Ip>(__i))))
  {
    return iter_move(std::forward<_Ip>(__i));
  }
  // NOLINTEND(libcpp-robust-against-adl)

  template<class _Ip>
    requires __move_deref<_Ip>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Ip&& __i) const
    noexcept(noexcept(std::move(*std::forward<_Ip>(__i))))
    -> decltype(      std::move(*std::forward<_Ip>(__i)))
    { return          std::move(*std::forward<_Ip>(__i)); }

  template<class _Ip>
    requires __just_deref<_Ip>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Ip&& __i) const
    noexcept(noexcept(*std::forward<_Ip>(__i)))
    -> decltype(      *std::forward<_Ip>(__i))
    { return          *std::forward<_Ip>(__i); }
};
} // namespace __iter_move

inline namespace __cpo {
  inline constexpr auto iter_move = __iter_move::__fn{};
} // namespace __cpo
} // namespace ranges

template<__dereferenceable _Tp>
  requires requires(_Tp& __t) { { ranges::iter_move(__t) } -> __can_reference; }
using iter_rvalue_reference_t = decltype(ranges::iter_move(std::declval<_Tp&>()));

#endif // _LIBCPP_STD_VER >= 20
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ITERATOR_ITER_MOVE_H
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_move.h" 3
#endif /* iter_move.h expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pointer_traits.h expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#else /* pointer_traits.h expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_POINTER_TRAITS_H
#define _LIBCPP___MEMORY_POINTER_TRAITS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* addressof.h expanded by -frewrite-includes */
#include <__memory/addressof.h>
#else /* addressof.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/addressof.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_ADDRESSOF_H
#define _LIBCPP___MEMORY_ADDRESSOF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/addressof.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/addressof.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/addressof.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/addressof.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/addressof.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
inline _LIBCPP_CONSTEXPR_SINCE_CXX17
_LIBCPP_NO_CFI _LIBCPP_INLINE_VISIBILITY
_Tp*
addressof(_Tp& __x) _NOEXCEPT
{
    return __builtin_addressof(__x);
}

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_OBJC_ARC) && !defined(_LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/addressof.h" 3
// Objective-C++ Automatic Reference Counting uses qualified pointers
// that require special addressof() signatures. When
// _LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF is defined, the compiler
// itself is providing these definitions. Otherwise, we provide them.
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
__strong _Tp*
addressof(__strong _Tp& __x) _NOEXCEPT
{
  return &__x;
}

#ifdef _LIBCPP_HAS_OBJC_ARC_WEAK
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
__weak _Tp*
addressof(__weak _Tp& __x) _NOEXCEPT
{
  return &__x;
}
#endif
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/addressof.h" 3

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
__autoreleasing _Tp*
addressof(__autoreleasing _Tp& __x) _NOEXCEPT
{
  return &__x;
}

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
__unsafe_unretained _Tp*
addressof(__unsafe_unretained _Tp& __x) _NOEXCEPT
{
  return &__x;
}
#endif
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/addressof.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_CXX03_LANG)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/addressof.h" 3
template <class _Tp> _Tp* addressof(const _Tp&&) noexcept = delete;
#endif
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/addressof.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_ADDRESSOF_H
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/addressof.h" 3
#endif /* addressof.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* conjunction.h expanded by -frewrite-includes */
#include <__type_traits/conjunction.h>
#else /* conjunction.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conjunction.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_CONJUNCTION_H
#define _LIBCPP___TYPE_TRAITS_CONJUNCTION_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conjunction.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conjunction.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conjunction.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conjunction.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conjunction.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conjunction.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conjunction.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conjunction.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conjunction.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conjunction.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conjunction.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class...>
using __expand_to_true = true_type;

template <class... _Pred>
__expand_to_true<__enable_if_t<_Pred::value>...> __and_helper(int);

template <class...>
false_type __and_helper(...);

// _And always performs lazy evaluation of its arguments.
//
// However, `_And<_Pred...>` itself will evaluate its result immediately (without having to
// be instantiated) since it is an alias, unlike `conjunction<_Pred...>`, which is a struct.
// If you want to defer the evaluation of `_And<_Pred...>` itself, use `_Lazy<_And, _Pred...>`.
template <class... _Pred>
using _And _LIBCPP_NODEBUG = decltype(std::__and_helper<_Pred...>(0));

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conjunction.h" 3

template <class...>
struct conjunction : true_type {};

template <class _Arg>
struct conjunction<_Arg> : _Arg {};

template <class _Arg, class... _Args>
struct conjunction<_Arg, _Args...> : conditional_t<!bool(_Arg::value), _Arg, conjunction<_Args...>> {};

template <class... _Args>
inline constexpr bool conjunction_v = conjunction<_Args...>::value;

#endif // _LIBCPP_STD_VER >= 17
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conjunction.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_CONJUNCTION_H
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/conjunction.h" 3
#endif /* conjunction.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_class.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_function.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_void.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/void_t.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, class = void>
struct __has_element_type : false_type {};

template <class _Tp>
struct __has_element_type<_Tp, __void_t<typename _Tp::element_type> > : true_type {};

template <class _Ptr, bool = __has_element_type<_Ptr>::value>
struct __pointer_traits_element_type {};

template <class _Ptr>
struct __pointer_traits_element_type<_Ptr, true>
{
    typedef _LIBCPP_NODEBUG typename _Ptr::element_type type;
};

template <template <class, class...> class _Sp, class _Tp, class ..._Args>
struct __pointer_traits_element_type<_Sp<_Tp, _Args...>, true>
{
    typedef _LIBCPP_NODEBUG typename _Sp<_Tp, _Args...>::element_type type;
};

template <template <class, class...> class _Sp, class _Tp, class ..._Args>
struct __pointer_traits_element_type<_Sp<_Tp, _Args...>, false>
{
    typedef _LIBCPP_NODEBUG _Tp type;
};

template <class _Tp, class = void>
struct __has_difference_type : false_type {};

template <class _Tp>
struct __has_difference_type<_Tp, __void_t<typename _Tp::difference_type> > : true_type {};

template <class _Ptr, bool = __has_difference_type<_Ptr>::value>
struct __pointer_traits_difference_type
{
    typedef _LIBCPP_NODEBUG ptrdiff_t type;
};

template <class _Ptr>
struct __pointer_traits_difference_type<_Ptr, true>
{
    typedef _LIBCPP_NODEBUG typename _Ptr::difference_type type;
};

template <class _Tp, class _Up>
struct __has_rebind
{
private:
    template <class _Xp> static false_type __test(...);
    _LIBCPP_SUPPRESS_DEPRECATED_PUSH
    template <class _Xp> static true_type __test(typename _Xp::template rebind<_Up>* = 0);
    _LIBCPP_SUPPRESS_DEPRECATED_POP
public:
    static const bool value = decltype(__test<_Tp>(0))::value;
};

template <class _Tp, class _Up, bool = __has_rebind<_Tp, _Up>::value>
struct __pointer_traits_rebind
{
#ifndef _LIBCPP_CXX03_LANG
    typedef _LIBCPP_NODEBUG typename _Tp::template rebind<_Up> type;
#else
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
    typedef _LIBCPP_NODEBUG typename _Tp::template rebind<_Up>::other type;
#endif
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
};

template <template <class, class...> class _Sp, class _Tp, class ..._Args, class _Up>
struct __pointer_traits_rebind<_Sp<_Tp, _Args...>, _Up, true>
{
#ifndef _LIBCPP_CXX03_LANG
    typedef _LIBCPP_NODEBUG typename _Sp<_Tp, _Args...>::template rebind<_Up> type;
#else
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
    typedef _LIBCPP_NODEBUG typename _Sp<_Tp, _Args...>::template rebind<_Up>::other type;
#endif
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
};

template <template <class, class...> class _Sp, class _Tp, class ..._Args, class _Up>
struct __pointer_traits_rebind<_Sp<_Tp, _Args...>, _Up, false>
{
    typedef _Sp<_Up, _Args...> type;
};

template <class _Ptr, class = void>
struct __pointer_traits_impl {};

template <class _Ptr>
struct __pointer_traits_impl<_Ptr, __void_t<typename __pointer_traits_element_type<_Ptr>::type> > {
  typedef _Ptr pointer;
  typedef typename __pointer_traits_element_type<pointer>::type element_type;
  typedef typename __pointer_traits_difference_type<pointer>::type difference_type;

#ifndef _LIBCPP_CXX03_LANG
    template <class _Up> using rebind = typename __pointer_traits_rebind<pointer, _Up>::type;
#else
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
    template <class _Up> struct rebind
        {typedef typename __pointer_traits_rebind<pointer, _Up>::type other;};
#endif // _LIBCPP_CXX03_LANG
# 129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3

private:
    struct __nat {};
public:
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static pointer pointer_to(__conditional_t<is_void<element_type>::value, __nat, element_type>& __r)
        {return pointer::pointer_to(__r);}
};

template <class _Ptr>
struct _LIBCPP_TEMPLATE_VIS pointer_traits : __pointer_traits_impl<_Ptr> {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS pointer_traits<_Tp*>
{
    typedef _Tp*      pointer;
    typedef _Tp       element_type;
    typedef ptrdiff_t difference_type;

#ifndef _LIBCPP_CXX03_LANG
    template <class _Up> using rebind = _Up*;
#else
# 151 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
    template <class _Up> struct rebind {typedef _Up* other;};
#endif
# 153 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3

private:
    struct __nat {};
public:
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static pointer pointer_to(__conditional_t<is_void<element_type>::value, __nat, element_type>& __r) _NOEXCEPT
        {return _VSTD::addressof(__r);}
};

#ifndef _LIBCPP_CXX03_LANG
template <class _From, class _To>
using __rebind_pointer_t = typename pointer_traits<_From>::template rebind<_To>;
#else
# 166 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
template <class _From, class _To>
using __rebind_pointer_t = typename pointer_traits<_From>::template rebind<_To>::other;
#endif
# 169 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3

// to_address

template <class _Pointer, class = void>
struct __to_address_helper;

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
_Tp* __to_address(_Tp* __p) _NOEXCEPT {
    static_assert(!is_function<_Tp>::value, "_Tp is a function type");
    return __p;
}

template <class _Pointer, class = void>
struct _HasToAddress : false_type {};

template <class _Pointer>
struct _HasToAddress<_Pointer,
    decltype((void)pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>()))
> : true_type {};

template <class _Pointer, class = void>
struct _HasArrow : false_type {};

template <class _Pointer>
struct _HasArrow<_Pointer,
    decltype((void)std::declval<const _Pointer&>().operator->())
> : true_type {};

template <class _Pointer>
struct _IsFancyPointer {
  static const bool value = _HasArrow<_Pointer>::value || _HasToAddress<_Pointer>::value;
};

// enable_if is needed here to avoid instantiating checks for fancy pointers on raw pointers
template <class _Pointer, class = __enable_if_t<
    _And<is_class<_Pointer>, _IsFancyPointer<_Pointer> >::value
> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
__decay_t<decltype(__to_address_helper<_Pointer>::__call(std::declval<const _Pointer&>()))>
__to_address(const _Pointer& __p) _NOEXCEPT {
    return __to_address_helper<_Pointer>::__call(__p);
}

template <class _Pointer, class>
struct __to_address_helper {
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    static decltype(_VSTD::__to_address(std::declval<const _Pointer&>().operator->()))
    __call(const _Pointer& __p) _NOEXCEPT {
        return _VSTD::__to_address(__p.operator->());
    }
};

template <class _Pointer>
struct __to_address_helper<_Pointer, decltype((void)pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>()))> {
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    static decltype(pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>()))
    __call(const _Pointer& __p) _NOEXCEPT {
        return pointer_traits<_Pointer>::to_address(__p);
    }
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY constexpr
auto to_address(_Tp *__p) noexcept {
    return _VSTD::__to_address(__p);
}

template <class _Pointer>
inline _LIBCPP_INLINE_VISIBILITY constexpr
auto to_address(const _Pointer& __p) noexcept -> decltype(std::__to_address(__p)) {
    return _VSTD::__to_address(__p);
}
#endif
# 244 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_POINTER_TRAITS_H
# 248 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/pointer_traits.h" 3
#endif /* pointer_traits.h expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_pointer.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_reference.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_pointer.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#endif
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3

// [iterator.concept.readable]
template<class _In>
concept __indirectly_readable_impl =
  requires(const _In __i) {
    typename iter_value_t<_In>;
    typename iter_reference_t<_In>;
    typename iter_rvalue_reference_t<_In>;
    { *__i } -> same_as<iter_reference_t<_In>>;
    { ranges::iter_move(__i) } -> same_as<iter_rvalue_reference_t<_In>>;
  } &&
  common_reference_with<iter_reference_t<_In>&&, iter_value_t<_In>&> &&
  common_reference_with<iter_reference_t<_In>&&, iter_rvalue_reference_t<_In>&&> &&
  common_reference_with<iter_rvalue_reference_t<_In>&&, const iter_value_t<_In>&>;

template<class _In>
concept indirectly_readable = __indirectly_readable_impl<remove_cvref_t<_In>>;

template<indirectly_readable _Tp>
using iter_common_reference_t = common_reference_t<iter_reference_t<_Tp>, iter_value_t<_Tp>&>;

// [iterator.concept.writable]
template<class _Out, class _Tp>
concept indirectly_writable =
  requires(_Out&& __o, _Tp&& __t) {
    *__o = _VSTD::forward<_Tp>(__t);                        // not required to be equality-preserving
    *_VSTD::forward<_Out>(__o) = _VSTD::forward<_Tp>(__t);  // not required to be equality-preserving
    const_cast<const iter_reference_t<_Out>&&>(*__o) = _VSTD::forward<_Tp>(__t);                       // not required to be equality-preserving
    const_cast<const iter_reference_t<_Out>&&>(*_VSTD::forward<_Out>(__o)) = _VSTD::forward<_Tp>(__t); // not required to be equality-preserving
  };

// [iterator.concept.winc]
template<class _Tp>
concept __integer_like = integral<_Tp> && !same_as<_Tp, bool>;

template<class _Tp>
concept __signed_integer_like = signed_integral<_Tp>;

template<class _Ip>
concept weakly_incrementable =
  // TODO: remove this once the clang bug is fixed (bugs.llvm.org/PR48173).
  !same_as<_Ip, bool> && // Currently, clang does not handle bool correctly.
  movable<_Ip> &&
  requires(_Ip __i) {
    typename iter_difference_t<_Ip>;
    requires __signed_integer_like<iter_difference_t<_Ip>>;
    { ++__i } -> same_as<_Ip&>;   // not required to be equality-preserving
    __i++;                        // not required to be equality-preserving
  };

// [iterator.concept.inc]
template<class _Ip>
concept incrementable =
  regular<_Ip> &&
  weakly_incrementable<_Ip> &&
  requires(_Ip __i) {
    { __i++ } -> same_as<_Ip>;
  };

// [iterator.concept.iterator]
template<class _Ip>
concept input_or_output_iterator =
  requires(_Ip __i) {
    { *__i } -> __can_reference;
  } &&
  weakly_incrementable<_Ip>;

// [iterator.concept.sentinel]
template<class _Sp, class _Ip>
concept sentinel_for =
  semiregular<_Sp> &&
  input_or_output_iterator<_Ip> &&
  __weakly_equality_comparable_with<_Sp, _Ip>;

template<class, class>
inline constexpr bool disable_sized_sentinel_for = false;

template<class _Sp, class _Ip>
concept sized_sentinel_for =
  sentinel_for<_Sp, _Ip> &&
  !disable_sized_sentinel_for<remove_cv_t<_Sp>, remove_cv_t<_Ip>> &&
  requires(const _Ip& __i, const _Sp& __s) {
    { __s - __i } -> same_as<iter_difference_t<_Ip>>;
    { __i - __s } -> same_as<iter_difference_t<_Ip>>;
  };

// [iterator.concept.input]
template<class _Ip>
concept input_iterator =
  input_or_output_iterator<_Ip> &&
  indirectly_readable<_Ip> &&
  requires { typename _ITER_CONCEPT<_Ip>; } &&
  derived_from<_ITER_CONCEPT<_Ip>, input_iterator_tag>;

// [iterator.concept.output]
template<class _Ip, class _Tp>
concept output_iterator =
  input_or_output_iterator<_Ip> &&
  indirectly_writable<_Ip, _Tp> &&
  requires (_Ip __it, _Tp&& __t) {
    *__it++ = _VSTD::forward<_Tp>(__t); // not required to be equality-preserving
  };

// [iterator.concept.forward]
template<class _Ip>
concept forward_iterator =
  input_iterator<_Ip> &&
  derived_from<_ITER_CONCEPT<_Ip>, forward_iterator_tag> &&
  incrementable<_Ip> &&
  sentinel_for<_Ip, _Ip>;

// [iterator.concept.bidir]
template<class _Ip>
concept bidirectional_iterator =
  forward_iterator<_Ip> &&
  derived_from<_ITER_CONCEPT<_Ip>, bidirectional_iterator_tag> &&
  requires(_Ip __i) {
    { --__i } -> same_as<_Ip&>;
    { __i-- } -> same_as<_Ip>;
  };

template<class _Ip>
concept random_access_iterator =
  bidirectional_iterator<_Ip> &&
  derived_from<_ITER_CONCEPT<_Ip>, random_access_iterator_tag> &&
  totally_ordered<_Ip> &&
  sized_sentinel_for<_Ip, _Ip> &&
  requires(_Ip __i, const _Ip __j, const iter_difference_t<_Ip> __n) {
    { __i += __n } -> same_as<_Ip&>;
    { __j +  __n } -> same_as<_Ip>;
    { __n +  __j } -> same_as<_Ip>;
    { __i -= __n } -> same_as<_Ip&>;
    { __j -  __n } -> same_as<_Ip>;
    {  __j[__n]  } -> same_as<iter_reference_t<_Ip>>;
  };

template<class _Ip>
concept contiguous_iterator =
  random_access_iterator<_Ip> &&
  derived_from<_ITER_CONCEPT<_Ip>, contiguous_iterator_tag> &&
  is_lvalue_reference_v<iter_reference_t<_Ip>> &&
  same_as<iter_value_t<_Ip>, remove_cvref_t<iter_reference_t<_Ip>>> &&
  requires(const _Ip& __i) {
    { _VSTD::to_address(__i) } -> same_as<add_pointer_t<iter_reference_t<_Ip>>>;
  };

template<class _Ip>
concept __has_arrow = input_iterator<_Ip> && (is_pointer_v<_Ip> || requires(_Ip __i) { __i.operator->(); });

// [indirectcallable.indirectinvocable]
template<class _Fp, class _It>
concept indirectly_unary_invocable =
  indirectly_readable<_It> &&
  copy_constructible<_Fp> &&
  invocable<_Fp&, iter_value_t<_It>&> &&
  invocable<_Fp&, iter_reference_t<_It>> &&
  invocable<_Fp&, iter_common_reference_t<_It>> &&
  common_reference_with<
    invoke_result_t<_Fp&, iter_value_t<_It>&>,
    invoke_result_t<_Fp&, iter_reference_t<_It>>>;

template<class _Fp, class _It>
concept indirectly_regular_unary_invocable =
  indirectly_readable<_It> &&
  copy_constructible<_Fp> &&
  regular_invocable<_Fp&, iter_value_t<_It>&> &&
  regular_invocable<_Fp&, iter_reference_t<_It>> &&
  regular_invocable<_Fp&, iter_common_reference_t<_It>> &&
  common_reference_with<
    invoke_result_t<_Fp&, iter_value_t<_It>&>,
    invoke_result_t<_Fp&, iter_reference_t<_It>>>;

template<class _Fp, class _It>
concept indirect_unary_predicate =
  indirectly_readable<_It> &&
  copy_constructible<_Fp> &&
  predicate<_Fp&, iter_value_t<_It>&> &&
  predicate<_Fp&, iter_reference_t<_It>> &&
  predicate<_Fp&, iter_common_reference_t<_It>>;

template<class _Fp, class _It1, class _It2>
concept indirect_binary_predicate =
  indirectly_readable<_It1> && indirectly_readable<_It2> &&
  copy_constructible<_Fp> &&
  predicate<_Fp&, iter_value_t<_It1>&, iter_value_t<_It2>&> &&
  predicate<_Fp&, iter_value_t<_It1>&, iter_reference_t<_It2>> &&
  predicate<_Fp&, iter_reference_t<_It1>, iter_value_t<_It2>&> &&
  predicate<_Fp&, iter_reference_t<_It1>, iter_reference_t<_It2>> &&
  predicate<_Fp&, iter_common_reference_t<_It1>, iter_common_reference_t<_It2>>;

template<class _Fp, class _It1, class _It2 = _It1>
concept indirect_equivalence_relation =
  indirectly_readable<_It1> && indirectly_readable<_It2> &&
  copy_constructible<_Fp> &&
  equivalence_relation<_Fp&, iter_value_t<_It1>&, iter_value_t<_It2>&> &&
  equivalence_relation<_Fp&, iter_value_t<_It1>&, iter_reference_t<_It2>> &&
  equivalence_relation<_Fp&, iter_reference_t<_It1>, iter_value_t<_It2>&> &&
  equivalence_relation<_Fp&, iter_reference_t<_It1>, iter_reference_t<_It2>> &&
  equivalence_relation<_Fp&, iter_common_reference_t<_It1>, iter_common_reference_t<_It2>>;

template<class _Fp, class _It1, class _It2 = _It1>
concept indirect_strict_weak_order =
  indirectly_readable<_It1> && indirectly_readable<_It2> &&
  copy_constructible<_Fp> &&
  strict_weak_order<_Fp&, iter_value_t<_It1>&, iter_value_t<_It2>&> &&
  strict_weak_order<_Fp&, iter_value_t<_It1>&, iter_reference_t<_It2>> &&
  strict_weak_order<_Fp&, iter_reference_t<_It1>, iter_value_t<_It2>&> &&
  strict_weak_order<_Fp&, iter_reference_t<_It1>, iter_reference_t<_It2>> &&
  strict_weak_order<_Fp&, iter_common_reference_t<_It1>, iter_common_reference_t<_It2>>;

template<class _Fp, class... _Its>
  requires (indirectly_readable<_Its> && ...) && invocable<_Fp, iter_reference_t<_Its>...>
using indirect_result_t = invoke_result_t<_Fp, iter_reference_t<_Its>...>;

template<class _In, class _Out>
concept indirectly_movable =
  indirectly_readable<_In> &&
  indirectly_writable<_Out, iter_rvalue_reference_t<_In>>;

template<class _In, class _Out>
concept indirectly_movable_storable =
  indirectly_movable<_In, _Out> &&
  indirectly_writable<_Out, iter_value_t<_In>> &&
  movable<iter_value_t<_In>> &&
  constructible_from<iter_value_t<_In>, iter_rvalue_reference_t<_In>> &&
  assignable_from<iter_value_t<_In>&, iter_rvalue_reference_t<_In>>;

template<class _In, class _Out>
concept indirectly_copyable =
  indirectly_readable<_In> &&
  indirectly_writable<_Out, iter_reference_t<_In>>;

template<class _In, class _Out>
concept indirectly_copyable_storable =
  indirectly_copyable<_In, _Out> &&
  indirectly_writable<_Out, iter_value_t<_In>&> &&
  indirectly_writable<_Out, const iter_value_t<_In>&> &&
  indirectly_writable<_Out, iter_value_t<_In>&&> &&
  indirectly_writable<_Out, const iter_value_t<_In>&&> &&
  copyable<iter_value_t<_In>> &&
  constructible_from<iter_value_t<_In>, iter_reference_t<_In>> &&
  assignable_from<iter_value_t<_In>&, iter_reference_t<_In>>;

// Note: indirectly_swappable is located in iter_swap.h to prevent a dependency cycle
// (both iter_swap and indirectly_swappable require indirectly_readable).

#endif // _LIBCPP_STD_VER >= 20
# 297 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3

template <class _Tp>
using __has_random_access_iterator_category_or_concept
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 301 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
  = integral_constant<bool, random_access_iterator<_Tp>>;
#else   // _LIBCPP_STD_VER < 20
# 303 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
  = __has_random_access_iterator_category<_Tp>;
#endif  // _LIBCPP_STD_VER
# 305 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_CONCEPTS_H
# 309 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/concepts.h" 3
#endif /* concepts.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* convert_to_integral.h expanded by -frewrite-includes */
#include <__utility/convert_to_integral.h>
#else /* convert_to_integral.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_CONVERT_TO_INTEGRAL_H
#define _LIBCPP___UTILITY_CONVERT_TO_INTEGRAL_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_enum.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_floating_point.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* underlying_type.h expanded by -frewrite-includes */
#include <__type_traits/underlying_type.h>
#else /* underlying_type.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/underlying_type.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_UNDERLYING_TYPE_H
#define _LIBCPP___TYPE_TRAITS_UNDERLYING_TYPE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/underlying_type.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/underlying_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_enum.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/underlying_type.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/underlying_type.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/underlying_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/underlying_type.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/underlying_type.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, bool = is_enum<_Tp>::value>
struct __underlying_type_impl;

template <class _Tp>
struct __underlying_type_impl<_Tp, false> {};

template <class _Tp>
struct __underlying_type_impl<_Tp, true> {
  typedef __underlying_type(_Tp) type;
};

template <class _Tp>
struct underlying_type : __underlying_type_impl<_Tp, is_enum<_Tp>::value> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/underlying_type.h" 3
template <class _Tp>
using underlying_type_t = typename underlying_type<_Tp>::type;
#endif
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/underlying_type.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_UNDERLYING_TYPE_H
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/underlying_type.h" 3
#endif /* underlying_type.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
int __convert_to_integral(int __val) { return __val; }

inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
unsigned __convert_to_integral(unsigned __val) { return __val; }

inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
long __convert_to_integral(long __val) { return __val; }

inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
unsigned long __convert_to_integral(unsigned long __val) { return __val; }

inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
long long __convert_to_integral(long long __val) { return __val; }

inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
unsigned long long __convert_to_integral(unsigned long long __val) {return __val; }

template<typename _Fp, __enable_if_t<is_floating_point<_Fp>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
long long
 __convert_to_integral(_Fp __val) { return __val; }

#ifndef _LIBCPP_HAS_NO_INT128
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
__int128_t __convert_to_integral(__int128_t __val) { return __val; }

inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
__uint128_t __convert_to_integral(__uint128_t __val) { return __val; }
#endif
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 3

template <class _Tp, bool = is_enum<_Tp>::value>
struct __sfinae_underlying_type
{
    typedef typename underlying_type<_Tp>::type type;
    typedef decltype(((type)1) + 0) __promoted_type;
};

template <class _Tp>
struct __sfinae_underlying_type<_Tp, false> {};

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
typename __sfinae_underlying_type<_Tp>::__promoted_type
__convert_to_integral(_Tp __val) { return __val; }

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___UTILITY_CONVERT_TO_INTEGRAL_H
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/convert_to_integral.h" 3
#endif /* convert_to_integral.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* unreachable.h expanded by -frewrite-includes */
#include <__utility/unreachable.h>
#else /* unreachable.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/unreachable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_UNREACHABLE_H
#define _LIBCPP___UTILITY_UNREACHABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/unreachable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/unreachable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/unreachable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/unreachable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/unreachable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/unreachable.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/unreachable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

_LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI inline void __libcpp_unreachable() {
    _LIBCPP_ASSERT_UNCATEGORIZED(false, "std::unreachable() was reached");
    __builtin_unreachable();
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/unreachable.h" 3

[[noreturn]] _LIBCPP_HIDE_FROM_ABI inline void unreachable() { __libcpp_unreachable(); }

#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/unreachable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___UTILITY_UNREACHABLE_H
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/unreachable.h" 3
#endif /* unreachable.h expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* limits expanded by -frewrite-includes */
#include <limits>
#else /* limits expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_LIMITS
#define _LIBCPP_LIMITS

/*
    limits synopsis

namespace std
{

template<class T>
class numeric_limits
{
public:
    static constexpr bool is_specialized = false;
    static constexpr T min() noexcept;
    static constexpr T max() noexcept;
    static constexpr T lowest() noexcept;

    static constexpr int  digits = 0;
    static constexpr int  digits10 = 0;
    static constexpr int  max_digits10 = 0;
    static constexpr bool is_signed = false;
    static constexpr bool is_integer = false;
    static constexpr bool is_exact = false;
    static constexpr int  radix = 0;
    static constexpr T epsilon() noexcept;
    static constexpr T round_error() noexcept;

    static constexpr int  min_exponent = 0;
    static constexpr int  min_exponent10 = 0;
    static constexpr int  max_exponent = 0;
    static constexpr int  max_exponent10 = 0;

    static constexpr bool has_infinity = false;
    static constexpr bool has_quiet_NaN = false;
    static constexpr bool has_signaling_NaN = false;
    static constexpr float_denorm_style has_denorm = denorm_absent; // deprecated in C++23
    static constexpr bool has_denorm_loss = false;                  // deprecated in C++23
    static constexpr T infinity() noexcept;
    static constexpr T quiet_NaN() noexcept;
    static constexpr T signaling_NaN() noexcept;
    static constexpr T denorm_min() noexcept;

    static constexpr bool is_iec559 = false;
    static constexpr bool is_bounded = false;
    static constexpr bool is_modulo = false;

    static constexpr bool traps = false;
    static constexpr bool tinyness_before = false;
    static constexpr float_round_style round_style = round_toward_zero;
};

enum float_round_style
{
    round_indeterminate       = -1,
    round_toward_zero         =  0,
    round_to_nearest          =  1,
    round_toward_infinity     =  2,
    round_toward_neg_infinity =  3
};

enum float_denorm_style // deprecated in C++23
{
    denorm_indeterminate = -1,
    denorm_absent = 0,
    denorm_present = 1
};

template<> class numeric_limits<cv bool>;

template<> class numeric_limits<cv char>;
template<> class numeric_limits<cv signed char>;
template<> class numeric_limits<cv unsigned char>;
template<> class numeric_limits<cv wchar_t>;
template<> class numeric_limits<cv char8_t>; // C++20
template<> class numeric_limits<cv char16_t>;
template<> class numeric_limits<cv char32_t>;

template<> class numeric_limits<cv short>;
template<> class numeric_limits<cv int>;
template<> class numeric_limits<cv long>;
template<> class numeric_limits<cv long long>;
template<> class numeric_limits<cv unsigned short>;
template<> class numeric_limits<cv unsigned int>;
template<> class numeric_limits<cv unsigned long>;
template<> class numeric_limits<cv unsigned long long>;

template<> class numeric_limits<cv float>;
template<> class numeric_limits<cv double>;
template<> class numeric_limits<cv long double>;

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_signed.h>
#endif /* expanded by -frewrite-includes */
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
#endif
# 114 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
# 118 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3


_LIBCPP_BEGIN_NAMESPACE_STD

enum float_round_style
{
    round_indeterminate       = -1,
    round_toward_zero         =  0,
    round_to_nearest          =  1,
    round_toward_infinity     =  2,
    round_toward_neg_infinity =  3
};

enum _LIBCPP_DEPRECATED_IN_CXX23 float_denorm_style
{
    denorm_indeterminate = -1,
    denorm_absent = 0,
    denorm_present = 1
};

template <class _Tp, bool = is_arithmetic<_Tp>::value>
class __libcpp_numeric_limits
{
protected:
    typedef _Tp type;

    static _LIBCPP_CONSTEXPR const  bool is_specialized = false;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return type();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return type();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return type();}

    static _LIBCPP_CONSTEXPR const int  digits = 0;
    static _LIBCPP_CONSTEXPR const int  digits10 = 0;
    static _LIBCPP_CONSTEXPR const int  max_digits10 = 0;
    static _LIBCPP_CONSTEXPR const bool is_signed = false;
    static _LIBCPP_CONSTEXPR const bool is_integer = false;
    static _LIBCPP_CONSTEXPR const bool is_exact = false;
    static _LIBCPP_CONSTEXPR const int  radix = 0;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type();}

    static _LIBCPP_CONSTEXPR const int  min_exponent = 0;
    static _LIBCPP_CONSTEXPR const int  min_exponent10 = 0;
    static _LIBCPP_CONSTEXPR const int  max_exponent = 0;
    static _LIBCPP_CONSTEXPR const int  max_exponent10 = 0;

    static _LIBCPP_CONSTEXPR const bool has_infinity = false;
    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type();}

    static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
    static _LIBCPP_CONSTEXPR const bool is_bounded = false;
    static _LIBCPP_CONSTEXPR const bool is_modulo = false;

    static _LIBCPP_CONSTEXPR const bool traps = false;
    static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
    static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
};

template <class _Tp, int __digits, bool _IsSigned>
struct __libcpp_compute_min
{
    static _LIBCPP_CONSTEXPR const _Tp value = _Tp(_Tp(1) << __digits);
};

template <class _Tp, int __digits>
struct __libcpp_compute_min<_Tp, __digits, false>
{
    static _LIBCPP_CONSTEXPR const _Tp value = _Tp(0);
};

template <class _Tp>
class __libcpp_numeric_limits<_Tp, true>
{
protected:
    typedef _Tp type;

    static _LIBCPP_CONSTEXPR const bool is_specialized = true;

    static _LIBCPP_CONSTEXPR const bool is_signed = type(-1) < type(0);
    static _LIBCPP_CONSTEXPR const int  digits = static_cast<int>(sizeof(type) * __CHAR_BIT__ - is_signed);
    static _LIBCPP_CONSTEXPR const int  digits10 = digits * 3 / 10;
    static _LIBCPP_CONSTEXPR const int  max_digits10 = 0;
    static _LIBCPP_CONSTEXPR const type __min = __libcpp_compute_min<type, digits, is_signed>::value;
    static _LIBCPP_CONSTEXPR const type __max = is_signed ? type(type(~0) ^ __min) : type(~0);
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __min;}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __max;}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return min();}

    static _LIBCPP_CONSTEXPR const bool is_integer = true;
    static _LIBCPP_CONSTEXPR const bool is_exact = true;
    static _LIBCPP_CONSTEXPR const int  radix = 2;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type(0);}

    static _LIBCPP_CONSTEXPR const int  min_exponent = 0;
    static _LIBCPP_CONSTEXPR const int  min_exponent10 = 0;
    static _LIBCPP_CONSTEXPR const int  max_exponent = 0;
    static _LIBCPP_CONSTEXPR const int  max_exponent10 = 0;

    static _LIBCPP_CONSTEXPR const bool has_infinity = false;
    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);}

    static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
    static _LIBCPP_CONSTEXPR const bool is_bounded = true;
    static _LIBCPP_CONSTEXPR const bool is_modulo = !_VSTD::is_signed<_Tp>::value;

#if 0 /* disabled by -frewrite-includes */
#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || \
    defined(__wasm__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 240 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
    static _LIBCPP_CONSTEXPR const bool traps = true;
#else
# 242 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
    static _LIBCPP_CONSTEXPR const bool traps = false;
#endif
# 244 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
    static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
    static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
};

template <>
class __libcpp_numeric_limits<bool, true>
{
protected:
    typedef bool type;

    static _LIBCPP_CONSTEXPR const bool is_specialized = true;

    static _LIBCPP_CONSTEXPR const bool is_signed = false;
    static _LIBCPP_CONSTEXPR const int  digits = 1;
    static _LIBCPP_CONSTEXPR const int  digits10 = 0;
    static _LIBCPP_CONSTEXPR const int  max_digits10 = 0;
    static _LIBCPP_CONSTEXPR const type __min = false;
    static _LIBCPP_CONSTEXPR const type __max = true;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __min;}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __max;}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return min();}

    static _LIBCPP_CONSTEXPR const bool is_integer = true;
    static _LIBCPP_CONSTEXPR const bool is_exact = true;
    static _LIBCPP_CONSTEXPR const int  radix = 2;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type(0);}

    static _LIBCPP_CONSTEXPR const int  min_exponent = 0;
    static _LIBCPP_CONSTEXPR const int  min_exponent10 = 0;
    static _LIBCPP_CONSTEXPR const int  max_exponent = 0;
    static _LIBCPP_CONSTEXPR const int  max_exponent10 = 0;

    static _LIBCPP_CONSTEXPR const bool has_infinity = false;
    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);}

    static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
    static _LIBCPP_CONSTEXPR const bool is_bounded = true;
    static _LIBCPP_CONSTEXPR const bool is_modulo = false;

    static _LIBCPP_CONSTEXPR const bool traps = false;
    static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
    static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
};

template <>
class __libcpp_numeric_limits<float, true>
{
protected:
    typedef float type;

    static _LIBCPP_CONSTEXPR const bool is_specialized = true;

    static _LIBCPP_CONSTEXPR const bool is_signed = true;
    static _LIBCPP_CONSTEXPR const int  digits = __FLT_MANT_DIG__;
    static _LIBCPP_CONSTEXPR const int  digits10 = __FLT_DIG__;
    static _LIBCPP_CONSTEXPR const int  max_digits10 = 2+(digits * 30103l)/100000l;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __FLT_MIN__;}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __FLT_MAX__;}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();}

    static _LIBCPP_CONSTEXPR const bool is_integer = false;
    static _LIBCPP_CONSTEXPR const bool is_exact = false;
    static _LIBCPP_CONSTEXPR const int  radix = __FLT_RADIX__;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __FLT_EPSILON__;}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5F;}

    static _LIBCPP_CONSTEXPR const int  min_exponent = __FLT_MIN_EXP__;
    static _LIBCPP_CONSTEXPR const int  min_exponent10 = __FLT_MIN_10_EXP__;
    static _LIBCPP_CONSTEXPR const int  max_exponent = __FLT_MAX_EXP__;
    static _LIBCPP_CONSTEXPR const int  max_exponent10 = __FLT_MAX_10_EXP__;

    static _LIBCPP_CONSTEXPR const bool has_infinity = true;
    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_valf();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanf("");}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansf("");}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __FLT_DENORM_MIN__;}

    static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
    static _LIBCPP_CONSTEXPR const bool is_bounded = true;
    static _LIBCPP_CONSTEXPR const bool is_modulo = false;

    static _LIBCPP_CONSTEXPR const bool traps = false;
#if 0 /* disabled by -frewrite-includes */
#if (defined(__arm__) || defined(__aarch64__))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 339 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
    static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
#else
# 341 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
    static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
#endif
# 343 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
    static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
};

template <>
class __libcpp_numeric_limits<double, true>
{
protected:
    typedef double type;

    static _LIBCPP_CONSTEXPR const bool is_specialized = true;

    static _LIBCPP_CONSTEXPR const bool is_signed = true;
    static _LIBCPP_CONSTEXPR const int  digits = __DBL_MANT_DIG__;
    static _LIBCPP_CONSTEXPR const int  digits10 = __DBL_DIG__;
    static _LIBCPP_CONSTEXPR const int  max_digits10 = 2+(digits * 30103l)/100000l;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __DBL_MIN__;}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __DBL_MAX__;}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();}

    static _LIBCPP_CONSTEXPR const bool is_integer = false;
    static _LIBCPP_CONSTEXPR const bool is_exact = false;
    static _LIBCPP_CONSTEXPR const int  radix = __FLT_RADIX__;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __DBL_EPSILON__;}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5;}

    static _LIBCPP_CONSTEXPR const int  min_exponent = __DBL_MIN_EXP__;
    static _LIBCPP_CONSTEXPR const int  min_exponent10 = __DBL_MIN_10_EXP__;
    static _LIBCPP_CONSTEXPR const int  max_exponent = __DBL_MAX_EXP__;
    static _LIBCPP_CONSTEXPR const int  max_exponent10 = __DBL_MAX_10_EXP__;

    static _LIBCPP_CONSTEXPR const bool has_infinity = true;
    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_val();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nan("");}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nans("");}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __DBL_DENORM_MIN__;}

    static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
    static _LIBCPP_CONSTEXPR const bool is_bounded = true;
    static _LIBCPP_CONSTEXPR const bool is_modulo = false;

    static _LIBCPP_CONSTEXPR const bool traps = false;
#if 0 /* disabled by -frewrite-includes */
#if (defined(__arm__) || defined(__aarch64__))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 389 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
    static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
#else
# 391 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
    static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
#endif
# 393 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
    static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
};

template <>
class __libcpp_numeric_limits<long double, true>
{
protected:
    typedef long double type;

    static _LIBCPP_CONSTEXPR const bool is_specialized = true;

    static _LIBCPP_CONSTEXPR const bool is_signed = true;
    static _LIBCPP_CONSTEXPR const int  digits = __LDBL_MANT_DIG__;
    static _LIBCPP_CONSTEXPR const int  digits10 = __LDBL_DIG__;
    static _LIBCPP_CONSTEXPR const int  max_digits10 = 2+(digits * 30103l)/100000l;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __LDBL_MIN__;}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __LDBL_MAX__;}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();}

    static _LIBCPP_CONSTEXPR const bool is_integer = false;
    static _LIBCPP_CONSTEXPR const bool is_exact = false;
    static _LIBCPP_CONSTEXPR const int  radix = __FLT_RADIX__;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __LDBL_EPSILON__;}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5L;}

    static _LIBCPP_CONSTEXPR const int  min_exponent = __LDBL_MIN_EXP__;
    static _LIBCPP_CONSTEXPR const int  min_exponent10 = __LDBL_MIN_10_EXP__;
    static _LIBCPP_CONSTEXPR const int  max_exponent = __LDBL_MAX_EXP__;
    static _LIBCPP_CONSTEXPR const int  max_exponent10 = __LDBL_MAX_10_EXP__;

    static _LIBCPP_CONSTEXPR const bool has_infinity = true;
    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_vall();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanl("");}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;}

#if 0 /* disabled by -frewrite-includes */
#if defined(__powerpc__) && defined(__LONG_DOUBLE_IBM128__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 434 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
    static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
#else
# 436 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
    static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
#endif
# 438 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
    static _LIBCPP_CONSTEXPR const bool is_bounded = true;
    static _LIBCPP_CONSTEXPR const bool is_modulo = false;

    static _LIBCPP_CONSTEXPR const bool traps = false;
#if 0 /* disabled by -frewrite-includes */
#if (defined(__arm__) || defined(__aarch64__))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 443 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
    static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
#else
# 445 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
    static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
#endif
# 447 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
    static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
};

template <class _Tp>
class _LIBCPP_TEMPLATE_VIS numeric_limits
    : private __libcpp_numeric_limits<__remove_cv_t<_Tp> >
{
    typedef __libcpp_numeric_limits<__remove_cv_t<_Tp> > __base;
    typedef typename __base::type type;
public:
    static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}

    static _LIBCPP_CONSTEXPR const int  digits = __base::digits;
    static _LIBCPP_CONSTEXPR const int  digits10 = __base::digits10;
    static _LIBCPP_CONSTEXPR const int  max_digits10 = __base::max_digits10;
    static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
    static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
    static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
    static _LIBCPP_CONSTEXPR const int  radix = __base::radix;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}

    static _LIBCPP_CONSTEXPR const int  min_exponent = __base::min_exponent;
    static _LIBCPP_CONSTEXPR const int  min_exponent10 = __base::min_exponent10;
    static _LIBCPP_CONSTEXPR const int  max_exponent = __base::max_exponent;
    static _LIBCPP_CONSTEXPR const int  max_exponent10 = __base::max_exponent10;

    static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
_LIBCPP_SUPPRESS_DEPRECATED_POP
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}

    static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
    static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
    static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;

    static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
    static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
    static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
};

template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_specialized;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_digits10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_signed;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_integer;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_exact;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::radix;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_infinity;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_quiet_NaN;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_signaling_NaN;
template <class _Tp>
    _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<_Tp>::has_denorm;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_denorm_loss;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_iec559;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_bounded;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_modulo;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::traps;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::tinyness_before;
template <class _Tp>
    _LIBCPP_CONSTEXPR const float_round_style numeric_limits<_Tp>::round_style;

template <class _Tp>
class _LIBCPP_TEMPLATE_VIS numeric_limits<const _Tp>
    : private numeric_limits<_Tp>
{
    typedef numeric_limits<_Tp> __base;
    typedef _Tp type;
public:
    static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}

    static _LIBCPP_CONSTEXPR const int  digits = __base::digits;
    static _LIBCPP_CONSTEXPR const int  digits10 = __base::digits10;
    static _LIBCPP_CONSTEXPR const int  max_digits10 = __base::max_digits10;
    static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
    static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
    static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
    static _LIBCPP_CONSTEXPR const int  radix = __base::radix;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}

    static _LIBCPP_CONSTEXPR const int  min_exponent = __base::min_exponent;
    static _LIBCPP_CONSTEXPR const int  min_exponent10 = __base::min_exponent10;
    static _LIBCPP_CONSTEXPR const int  max_exponent = __base::max_exponent;
    static _LIBCPP_CONSTEXPR const int  max_exponent10 = __base::max_exponent10;

    static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
_LIBCPP_SUPPRESS_DEPRECATED_POP
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}

    static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
    static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
    static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;

    static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
    static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
    static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
};

template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_specialized;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_digits10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_signed;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_integer;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_exact;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::radix;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_infinity;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_quiet_NaN;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_signaling_NaN;
template <class _Tp>
    _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const _Tp>::has_denorm;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_denorm_loss;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_iec559;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_bounded;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_modulo;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::traps;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::tinyness_before;
template <class _Tp>
    _LIBCPP_CONSTEXPR const float_round_style numeric_limits<const _Tp>::round_style;

template <class _Tp>
class _LIBCPP_TEMPLATE_VIS numeric_limits<volatile _Tp>
    : private numeric_limits<_Tp>
{
    typedef numeric_limits<_Tp> __base;
    typedef _Tp type;
public:
    static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}

    static _LIBCPP_CONSTEXPR const int  digits = __base::digits;
    static _LIBCPP_CONSTEXPR const int  digits10 = __base::digits10;
    static _LIBCPP_CONSTEXPR const int  max_digits10 = __base::max_digits10;
    static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
    static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
    static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
    static _LIBCPP_CONSTEXPR const int  radix = __base::radix;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}

    static _LIBCPP_CONSTEXPR const int  min_exponent = __base::min_exponent;
    static _LIBCPP_CONSTEXPR const int  min_exponent10 = __base::min_exponent10;
    static _LIBCPP_CONSTEXPR const int  max_exponent = __base::max_exponent;
    static _LIBCPP_CONSTEXPR const int  max_exponent10 = __base::max_exponent10;

    static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
_LIBCPP_SUPPRESS_DEPRECATED_POP
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}

    static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
    static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
    static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;

    static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
    static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
    static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
};

template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_specialized;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_digits10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_signed;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_integer;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_exact;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::radix;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_infinity;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_quiet_NaN;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_signaling_NaN;
template <class _Tp>
    _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<volatile _Tp>::has_denorm;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_denorm_loss;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_iec559;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_bounded;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_modulo;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::traps;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::tinyness_before;
template <class _Tp>
    _LIBCPP_CONSTEXPR const float_round_style numeric_limits<volatile _Tp>::round_style;

template <class _Tp>
class _LIBCPP_TEMPLATE_VIS numeric_limits<const volatile _Tp>
    : private numeric_limits<_Tp>
{
    typedef numeric_limits<_Tp> __base;
    typedef _Tp type;
public:
    static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}

    static _LIBCPP_CONSTEXPR const int  digits = __base::digits;
    static _LIBCPP_CONSTEXPR const int  digits10 = __base::digits10;
    static _LIBCPP_CONSTEXPR const int  max_digits10 = __base::max_digits10;
    static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
    static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
    static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
    static _LIBCPP_CONSTEXPR const int  radix = __base::radix;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}

    static _LIBCPP_CONSTEXPR const int  min_exponent = __base::min_exponent;
    static _LIBCPP_CONSTEXPR const int  min_exponent10 = __base::min_exponent10;
    static _LIBCPP_CONSTEXPR const int  max_exponent = __base::max_exponent;
    static _LIBCPP_CONSTEXPR const int  max_exponent10 = __base::max_exponent10;

    static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
_LIBCPP_SUPPRESS_DEPRECATED_POP
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}

    static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
    static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
    static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;

    static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
    static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
    static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
};

template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_specialized;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_digits10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_signed;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_integer;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_exact;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::radix;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent;
template <class _Tp>
    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent10;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_infinity;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_quiet_NaN;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_signaling_NaN;
template <class _Tp>
    _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const volatile _Tp>::has_denorm;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_denorm_loss;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_iec559;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_bounded;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_modulo;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::traps;
template <class _Tp>
    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::tinyness_before;
template <class _Tp>
    _LIBCPP_CONSTEXPR const float_round_style numeric_limits<const volatile _Tp>::round_style;

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 835 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 835 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
# 836 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
#endif
# 837 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3

#endif // _LIBCPP_LIMITS
# 839 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/limits" 3
#endif /* limits expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIter>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
void __advance(_InputIter& __i, typename iterator_traits<_InputIter>::difference_type __n, input_iterator_tag) {
  for (; __n > 0; --__n)
    ++__i;
}

template <class _BiDirIter>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
void __advance(_BiDirIter& __i, typename iterator_traits<_BiDirIter>::difference_type __n, bidirectional_iterator_tag) {
  if (__n >= 0)
    for (; __n > 0; --__n)
      ++__i;
  else
    for (; __n < 0; ++__n)
      --__i;
}

template <class _RandIter>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
void __advance(_RandIter& __i, typename iterator_traits<_RandIter>::difference_type __n, random_access_iterator_tag) {
  __i += __n;
}

template <
    class _InputIter, class _Distance,
    class _IntegralDistance = decltype(_VSTD::__convert_to_integral(std::declval<_Distance>())),
    class = __enable_if_t<is_integral<_IntegralDistance>::value> >
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
void advance(_InputIter& __i, _Distance __orig_n) {
  typedef typename iterator_traits<_InputIter>::difference_type _Difference;
  _Difference __n = static_cast<_Difference>(_VSTD::__convert_to_integral(__orig_n));
  _LIBCPP_ASSERT_UNCATEGORIZED(__n >= 0 || __has_bidirectional_iterator_category<_InputIter>::value,
                               "Attempt to advance(it, n) with negative n on a non-bidirectional iterator");
  _VSTD::__advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category());
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3

// [range.iter.op.advance]

namespace ranges {
namespace __advance {

struct __fn {
private:
  template <class _Ip>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr void __advance_forward(_Ip& __i, iter_difference_t<_Ip> __n) {
    while (__n > 0) {
      --__n;
      ++__i;
    }
  }

  template <class _Ip>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr void __advance_backward(_Ip& __i, iter_difference_t<_Ip> __n) {
    while (__n < 0) {
      ++__n;
      --__i;
    }
  }

public:
  // Preconditions: If `I` does not model `bidirectional_iterator`, `n` is not negative.
  template <input_or_output_iterator _Ip>
  _LIBCPP_HIDE_FROM_ABI
  constexpr void operator()(_Ip& __i, iter_difference_t<_Ip> __n) const {
    _LIBCPP_ASSERT_UNCATEGORIZED(__n >= 0 || bidirectional_iterator<_Ip>,
                                 "If `n < 0`, then `bidirectional_iterator<I>` must be true.");

    // If `I` models `random_access_iterator`, equivalent to `i += n`.
    if constexpr (random_access_iterator<_Ip>) {
      __i += __n;
      return;
    } else if constexpr (bidirectional_iterator<_Ip>) {
      // Otherwise, if `n` is non-negative, increments `i` by `n`.
      __advance_forward(__i, __n);
      // Otherwise, decrements `i` by `-n`.
      __advance_backward(__i, __n);
      return;
    } else {
      // Otherwise, if `n` is non-negative, increments `i` by `n`.
      __advance_forward(__i, __n);
      return;
    }
  }

  // Preconditions: Either `assignable_from<I&, S> || sized_sentinel_for<S, I>` is modeled, or [i, bound_sentinel) denotes a range.
  template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
  _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_Ip& __i, _Sp __bound_sentinel) const {
    // If `I` and `S` model `assignable_from<I&, S>`, equivalent to `i = std::move(bound_sentinel)`.
    if constexpr (assignable_from<_Ip&, _Sp>) {
      __i = _VSTD::move(__bound_sentinel);
    }
    // Otherwise, if `S` and `I` model `sized_sentinel_for<S, I>`, equivalent to `ranges::advance(i, bound_sentinel - i)`.
    else if constexpr (sized_sentinel_for<_Sp, _Ip>) {
      (*this)(__i, __bound_sentinel - __i);
    }
    // Otherwise, while `bool(i != bound_sentinel)` is true, increments `i`.
    else {
      while (__i != __bound_sentinel) {
        ++__i;
      }
    }
  }

  // Preconditions:
  //   * If `n > 0`, [i, bound_sentinel) denotes a range.
  //   * If `n == 0`, [i, bound_sentinel) or [bound_sentinel, i) denotes a range.
  //   * If `n < 0`, [bound_sentinel, i) denotes a range, `I` models `bidirectional_iterator`, and `I` and `S` model `same_as<I, S>`.
  // Returns: `n - M`, where `M` is the difference between the ending and starting position.
  template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
  _LIBCPP_HIDE_FROM_ABI constexpr iter_difference_t<_Ip> operator()(_Ip& __i, iter_difference_t<_Ip> __n,
                                                                    _Sp __bound_sentinel) const {
    _LIBCPP_ASSERT_UNCATEGORIZED((__n >= 0) || (bidirectional_iterator<_Ip> && same_as<_Ip, _Sp>),
                                 "If `n < 0`, then `bidirectional_iterator<I> && same_as<I, S>` must be true.");
    // If `S` and `I` model `sized_sentinel_for<S, I>`:
    if constexpr (sized_sentinel_for<_Sp, _Ip>) {
      // If |n| >= |bound_sentinel - i|, equivalent to `ranges::advance(i, bound_sentinel)`.
      // __magnitude_geq(a, b) returns |a| >= |b|, assuming they have the same sign.
      auto __magnitude_geq = [](auto __a, auto __b) {
        return __a == 0 ? __b == 0 :
               __a > 0  ? __a >= __b :
                          __a <= __b;
      };
      if (const auto __m = __bound_sentinel - __i; __magnitude_geq(__n, __m)) {
        (*this)(__i, __bound_sentinel);
        return __n - __m;
      }

      // Otherwise, equivalent to `ranges::advance(i, n)`.
      (*this)(__i, __n);
      return 0;
    } else {
      // Otherwise, if `n` is non-negative, while `bool(i != bound_sentinel)` is true, increments `i` but at
      // most `n` times.
      while (__i != __bound_sentinel && __n > 0) {
        ++__i;
        --__n;
      }

      // Otherwise, while `bool(i != bound_sentinel)` is true, decrements `i` but at most `-n` times.
      if constexpr (bidirectional_iterator<_Ip> && same_as<_Ip, _Sp>) {
        while (__i != __bound_sentinel && __n < 0) {
          --__i;
          ++__n;
        }
      }
      return __n;
    }

    __libcpp_unreachable();
  }
};

} // namespace __advance

inline namespace __cpo {
  inline constexpr auto advance = __advance::__fn{};
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ITERATOR_ADVANCE_H
# 208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/advance.h" 3
#endif /* advance.h expanded by -frewrite-includes */
# 681 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* back_insert_iterator.h expanded by -frewrite-includes */
#include <__iterator/back_insert_iterator.h>
#else /* back_insert_iterator.h expanded by -frewrite-includes */
# 681 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_BACK_INSERT_ITERATOR_H
#define _LIBCPP___ITERATOR_BACK_INSERT_ITERATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* iterator.h expanded by -frewrite-includes */
#include <__iterator/iterator.h>
#else /* iterator.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_ITERATOR_H
#define _LIBCPP___ITERATOR_ITERATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template<class _Category, class _Tp, class _Distance = ptrdiff_t,
         class _Pointer = _Tp*, class _Reference = _Tp&>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator
{
    typedef _Tp        value_type;
    typedef _Distance  difference_type;
    typedef _Pointer   pointer;
    typedef _Reference reference;
    typedef _Category  iterator_category;
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_ITERATOR_H
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator.h" 3
#endif /* iterator.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Container>
class _LIBCPP_TEMPLATE_VIS back_insert_iterator
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
    : public iterator<output_iterator_tag, void, void, void, void>
#endif
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
{
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
    _Container* container;
public:
    typedef output_iterator_tag iterator_category;
    typedef void value_type;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
    typedef ptrdiff_t difference_type;
#else
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
    typedef void difference_type;
#endif
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
    typedef void pointer;
    typedef void reference;
    typedef _Container container_type;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit back_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator=(const typename _Container::value_type& __value)
        {container->push_back(__value); return *this;}
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator=(typename _Container::value_type&& __value)
        {container->push_back(_VSTD::move(__value)); return *this;}
#endif // _LIBCPP_CXX03_LANG
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator*()     {return *this;}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator++()    {return *this;}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator  operator++(int) {return *this;}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Container* __get_container() const { return container; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(back_insert_iterator);

template <class _Container>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
back_insert_iterator<_Container>
back_inserter(_Container& __x)
{
    return back_insert_iterator<_Container>(__x);
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ITERATOR_BACK_INSERT_ITERATOR_H
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/back_insert_iterator.h" 3
#endif /* back_insert_iterator.h expanded by -frewrite-includes */
# 682 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* bounded_iter.h expanded by -frewrite-includes */
#include <__iterator/bounded_iter.h>
#else /* bounded_iter.h expanded by -frewrite-includes */
# 682 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_BOUNDED_ITER_H
#define _LIBCPP___ITERATOR_BOUNDED_ITER_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Iterator wrapper that carries the valid range it is allowed to access.
//
// This is a simple iterator wrapper for contiguous iterators that points
// within a [begin, end) range and carries these bounds with it. The iterator
// ensures that it is pointing within that [begin, end) range when it is
// dereferenced.
//
// Arithmetic operations are allowed and the bounds of the resulting iterator
// are not checked. Hence, it is possible to create an iterator pointing outside
// its range, but it is not possible to dereference it.
template <class _Iterator, class = __enable_if_t< __libcpp_is_contiguous_iterator<_Iterator>::value > >
struct __bounded_iter {
  using value_type        = typename iterator_traits<_Iterator>::value_type;
  using difference_type   = typename iterator_traits<_Iterator>::difference_type;
  using pointer           = typename iterator_traits<_Iterator>::pointer;
  using reference         = typename iterator_traits<_Iterator>::reference;
  using iterator_category = typename iterator_traits<_Iterator>::iterator_category;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
  using iterator_concept = contiguous_iterator_tag;
#endif
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3

  // Create a singular iterator.
  //
  // Such an iterator does not point to any object and is conceptually out of bounds, so it is
  // not dereferenceable. Observing operations like comparison and assignment are valid.
  _LIBCPP_HIDE_FROM_ABI __bounded_iter() = default;

  _LIBCPP_HIDE_FROM_ABI __bounded_iter(__bounded_iter const&) = default;
  _LIBCPP_HIDE_FROM_ABI __bounded_iter(__bounded_iter&&)      = default;

  template <class _OtherIterator, class = __enable_if_t< is_convertible<_OtherIterator, _Iterator>::value > >
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __bounded_iter(__bounded_iter<_OtherIterator> const& __other) _NOEXCEPT
      : __current_(__other.__current_),
        __begin_(__other.__begin_),
        __end_(__other.__end_) {}

  // Assign a bounded iterator to another one, rebinding the bounds of the iterator as well.
  _LIBCPP_HIDE_FROM_ABI __bounded_iter& operator=(__bounded_iter const&) = default;
  _LIBCPP_HIDE_FROM_ABI __bounded_iter& operator=(__bounded_iter&&)      = default;

private:
  // Create an iterator wrapping the given iterator, and whose bounds are described
  // by the provided [begin, end) range.
  //
  // This constructor does not check whether the resulting iterator is within its bounds.
  // However, it does check that the provided [begin, end) range is a valid range (that
  // is, begin <= end).
  //
  // Since it is non-standard for iterators to have this constructor, __bounded_iter must
  // be created via `std::__make_bounded_iter`.
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __bounded_iter(
      _Iterator __current, _Iterator __begin, _Iterator __end)
      : __current_(__current), __begin_(__begin), __end_(__end) {
    _LIBCPP_ASSERT_INTERNAL(__begin <= __end, "__bounded_iter(current, begin, end): [begin, end) is not a valid range");
  }

  template <class _It>
  friend _LIBCPP_CONSTEXPR __bounded_iter<_It> __make_bounded_iter(_It, _It, _It);

public:
  // Dereference and indexing operations.
  //
  // These operations check that the iterator is dereferenceable, that is within [begin, end).
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator*() const _NOEXCEPT {
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
        __in_bounds(__current_), "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
    return *__current_;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pointer operator->() const _NOEXCEPT {
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
        __in_bounds(__current_), "__bounded_iter::operator->: Attempt to dereference an out-of-range iterator");
    return std::__to_address(__current_);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator[](difference_type __n) const _NOEXCEPT {
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
        __in_bounds(__current_ + __n), "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
    return __current_[__n];
  }

  // Arithmetic operations.
  //
  // These operations do not check that the resulting iterator is within the bounds, since that
  // would make it impossible to create a past-the-end iterator.
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator++() _NOEXCEPT {
    ++__current_;
    return *this;
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter operator++(int) _NOEXCEPT {
    __bounded_iter __tmp(*this);
    ++*this;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator--() _NOEXCEPT {
    --__current_;
    return *this;
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter operator--(int) _NOEXCEPT {
    __bounded_iter __tmp(*this);
    --*this;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator+=(difference_type __n) _NOEXCEPT {
    __current_ += __n;
    return *this;
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __bounded_iter
  operator+(__bounded_iter const& __self, difference_type __n) _NOEXCEPT {
    __bounded_iter __tmp(__self);
    __tmp += __n;
    return __tmp;
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __bounded_iter
  operator+(difference_type __n, __bounded_iter const& __self) _NOEXCEPT {
    __bounded_iter __tmp(__self);
    __tmp += __n;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator-=(difference_type __n) _NOEXCEPT {
    __current_ -= __n;
    return *this;
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __bounded_iter
  operator-(__bounded_iter const& __self, difference_type __n) _NOEXCEPT {
    __bounded_iter __tmp(__self);
    __tmp -= __n;
    return __tmp;
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend difference_type
  operator-(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
    return __x.__current_ - __y.__current_;
  }

  // Comparison operations.
  //
  // These operations do not check whether the iterators are within their bounds.
  // The valid range for each iterator is also not considered as part of the comparison,
  // i.e. two iterators pointing to the same location will be considered equal even
  // if they have different validity ranges.
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
  operator==(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
    return __x.__current_ == __y.__current_;
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
  operator!=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
    return __x.__current_ != __y.__current_;
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
  operator<(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
    return __x.__current_ < __y.__current_;
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
  operator>(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
    return __x.__current_ > __y.__current_;
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
  operator<=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
    return __x.__current_ <= __y.__current_;
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
  operator>=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
    return __x.__current_ >= __y.__current_;
  }

private:
  // Return whether the given iterator is in the bounds of this __bounded_iter.
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __in_bounds(_Iterator const& __iter) const {
    return __iter >= __begin_ && __iter < __end_;
  }

  template <class>
  friend struct pointer_traits;
  _Iterator __current_;       // current iterator
  _Iterator __begin_, __end_; // valid range represented as [begin, end)
};

template <class _It>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __bounded_iter<_It> __make_bounded_iter(_It __it, _It __begin, _It __end) {
  return __bounded_iter<_It>(std::move(__it), std::move(__begin), std::move(__end));
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 217 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
template <class _Iterator>
struct __libcpp_is_contiguous_iterator<__bounded_iter<_Iterator> > : true_type {};
#endif
# 220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3

template <class _Iterator>
struct pointer_traits<__bounded_iter<_Iterator> > {
  using pointer         = __bounded_iter<_Iterator>;
  using element_type    = typename pointer_traits<_Iterator>::element_type;
  using difference_type = typename pointer_traits<_Iterator>::difference_type;

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static element_type* to_address(pointer __it) _NOEXCEPT {
    return std::__to_address(__it.__current_);
  }
};

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ITERATOR_BOUNDED_ITER_H
# 237 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/bounded_iter.h" 3
#endif /* bounded_iter.h expanded by -frewrite-includes */
# 683 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* common_iterator.h expanded by -frewrite-includes */
#include <__iterator/common_iterator.h>
#else /* common_iterator.h expanded by -frewrite-includes */
# 683 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_COMMON_ITERATOR_H
#define _LIBCPP___ITERATOR_COMMON_ITERATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/assignable.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/derived_from.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/equality_comparable.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* iter_swap.h expanded by -frewrite-includes */
#include <__iterator/iter_swap.h>
#else /* iter_swap.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_ITER_SWAP_H
#define _LIBCPP___ITERATOR_ITER_SWAP_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/class_or_enum.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/swappable.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3

// [iter.cust.swap]

namespace ranges {
namespace __iter_swap {
  template<class _I1, class _I2>
  void iter_swap(_I1, _I2) = delete;

  template<class _T1, class _T2>
  concept __unqualified_iter_swap =
    (__class_or_enum<remove_cvref_t<_T1>> || __class_or_enum<remove_cvref_t<_T2>>) &&
    requires (_T1&& __x, _T2&& __y) {
      // NOLINTNEXTLINE(libcpp-robust-against-adl) iter_swap ADL calls should only be made through ranges::iter_swap
      iter_swap(_VSTD::forward<_T1>(__x), _VSTD::forward<_T2>(__y));
    };

  template<class _T1, class _T2>
  concept __readable_swappable =
    indirectly_readable<_T1> && indirectly_readable<_T2> &&
    swappable_with<iter_reference_t<_T1>, iter_reference_t<_T2>>;


  struct __fn {
    // NOLINTBEGIN(libcpp-robust-against-adl) iter_swap ADL calls should only be made through ranges::iter_swap
    template <class _T1, class _T2>
      requires __unqualified_iter_swap<_T1, _T2>
    _LIBCPP_HIDE_FROM_ABI
    constexpr void operator()(_T1&& __x, _T2&& __y) const
      noexcept(noexcept(iter_swap(_VSTD::forward<_T1>(__x), _VSTD::forward<_T2>(__y))))
    {
      (void)iter_swap(_VSTD::forward<_T1>(__x), _VSTD::forward<_T2>(__y));
    }
    // NOLINTEND(libcpp-robust-against-adl)

    template <class _T1, class _T2>
      requires (!__unqualified_iter_swap<_T1, _T2>) &&
               __readable_swappable<_T1, _T2>
    _LIBCPP_HIDE_FROM_ABI
    constexpr void operator()(_T1&& __x, _T2&& __y) const
      noexcept(noexcept(ranges::swap(*_VSTD::forward<_T1>(__x), *_VSTD::forward<_T2>(__y))))
    {
      ranges::swap(*_VSTD::forward<_T1>(__x), *_VSTD::forward<_T2>(__y));
    }

    template <class _T1, class _T2>
      requires (!__unqualified_iter_swap<_T1, _T2> &&
                !__readable_swappable<_T1, _T2>) &&
               indirectly_movable_storable<_T1, _T2> &&
               indirectly_movable_storable<_T2, _T1>
    _LIBCPP_HIDE_FROM_ABI
    constexpr void operator()(_T1&& __x, _T2&& __y) const
      noexcept(noexcept(iter_value_t<_T2>(ranges::iter_move(__y))) &&
               noexcept(*__y = ranges::iter_move(__x)) &&
               noexcept(*_VSTD::forward<_T1>(__x) = std::declval<iter_value_t<_T2>>()))
    {
      iter_value_t<_T2> __old(ranges::iter_move(__y));
      *__y = ranges::iter_move(__x);
      *_VSTD::forward<_T1>(__x) = _VSTD::move(__old);
    }
  };
} // namespace __iter_swap

inline namespace __cpo {
  inline constexpr auto iter_swap = __iter_swap::__fn{};
} // namespace __cpo
} // namespace ranges

template<class _I1, class _I2 = _I1>
concept indirectly_swappable =
  indirectly_readable<_I1> && indirectly_readable<_I2> &&
  requires(const _I1 __i1, const _I2 __i2) {
    ranges::iter_swap(__i1, __i1);
    ranges::iter_swap(__i2, __i2);
    ranges::iter_swap(__i1, __i2);
    ranges::iter_swap(__i2, __i1);
  };

#endif // _LIBCPP_STD_VER >= 20
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ITERATOR_ITER_SWAP_H
# 119 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iter_swap.h" 3
#endif /* iter_swap.h expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_pointer.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* variant expanded by -frewrite-includes */
#include <variant>
#else /* variant expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_VARIANT
#define _LIBCPP_VARIANT

/*
   variant synopsis

namespace std {

  // 20.7.2, class template variant
  template <class... Types>
  class variant {
  public:

    // 20.7.2.1, constructors
    constexpr variant() noexcept(see below);
    constexpr variant(const variant&);
    constexpr variant(variant&&) noexcept(see below);

    template <class T> constexpr variant(T&&) noexcept(see below);

    template <class T, class... Args>
    constexpr explicit variant(in_place_type_t<T>, Args&&...);

    template <class T, class U, class... Args>
    constexpr explicit variant(
        in_place_type_t<T>, initializer_list<U>, Args&&...);

    template <size_t I, class... Args>
    constexpr explicit variant(in_place_index_t<I>, Args&&...);

    template <size_t I, class U, class... Args>
    constexpr explicit variant(
        in_place_index_t<I>, initializer_list<U>, Args&&...);

    // 20.7.2.2, destructor
    ~variant();

    // 20.7.2.3, assignment
    constexpr variant& operator=(const variant&);
    constexpr variant& operator=(variant&&) noexcept(see below);

    template <class T> variant& operator=(T&&) noexcept(see below);

    // 20.7.2.4, modifiers
    template <class T, class... Args>
    T& emplace(Args&&...);

    template <class T, class U, class... Args>
    T& emplace(initializer_list<U>, Args&&...);

    template <size_t I, class... Args>
    variant_alternative_t<I, variant>& emplace(Args&&...);

    template <size_t I, class U, class...  Args>
    variant_alternative_t<I, variant>& emplace(initializer_list<U>, Args&&...);

    // 20.7.2.5, value status
    constexpr bool valueless_by_exception() const noexcept;
    constexpr size_t index() const noexcept;

    // 20.7.2.6, swap
    void swap(variant&) noexcept(see below);
  };

  // 20.7.3, variant helper classes
  template <class T> struct variant_size; // undefined

  template <class T>
  inline constexpr size_t variant_size_v = variant_size<T>::value;

  template <class T> struct variant_size<const T>;
  template <class T> struct variant_size<volatile T>;
  template <class T> struct variant_size<const volatile T>;

  template <class... Types>
  struct variant_size<variant<Types...>>;

  template <size_t I, class T> struct variant_alternative; // undefined

  template <size_t I, class T>
  using variant_alternative_t = typename variant_alternative<I, T>::type;

  template <size_t I, class T> struct variant_alternative<I, const T>;
  template <size_t I, class T> struct variant_alternative<I, volatile T>;
  template <size_t I, class T> struct variant_alternative<I, const volatile T>;

  template <size_t I, class... Types>
  struct variant_alternative<I, variant<Types...>>;

  inline constexpr size_t variant_npos = -1;

  // 20.7.4, value access
  template <class T, class... Types>
  constexpr bool holds_alternative(const variant<Types...>&) noexcept;

  template <size_t I, class... Types>
  constexpr variant_alternative_t<I, variant<Types...>>&
  get(variant<Types...>&);

  template <size_t I, class... Types>
  constexpr variant_alternative_t<I, variant<Types...>>&&
  get(variant<Types...>&&);

  template <size_t I, class... Types>
  constexpr variant_alternative_t<I, variant<Types...>> const&
  get(const variant<Types...>&);

  template <size_t I, class... Types>
  constexpr variant_alternative_t<I, variant<Types...>> const&&
  get(const variant<Types...>&&);

  template <class T, class...  Types>
  constexpr T& get(variant<Types...>&);

  template <class T, class... Types>
  constexpr T&& get(variant<Types...>&&);

  template <class T, class... Types>
  constexpr const T& get(const variant<Types...>&);

  template <class T, class... Types>
  constexpr const T&& get(const variant<Types...>&&);

  template <size_t I, class... Types>
  constexpr add_pointer_t<variant_alternative_t<I, variant<Types...>>>
  get_if(variant<Types...>*) noexcept;

  template <size_t I, class... Types>
  constexpr add_pointer_t<const variant_alternative_t<I, variant<Types...>>>
  get_if(const variant<Types...>*) noexcept;

  template <class T, class... Types>
  constexpr add_pointer_t<T>
  get_if(variant<Types...>*) noexcept;

  template <class T, class... Types>
  constexpr add_pointer_t<const T>
  get_if(const variant<Types...>*) noexcept;

  // 20.7.5, relational operators
  template <class... Types>
  constexpr bool operator==(const variant<Types...>&, const variant<Types...>&);

  template <class... Types>
  constexpr bool operator!=(const variant<Types...>&, const variant<Types...>&);

  template <class... Types>
  constexpr bool operator<(const variant<Types...>&, const variant<Types...>&);

  template <class... Types>
  constexpr bool operator>(const variant<Types...>&, const variant<Types...>&);

  template <class... Types>
  constexpr bool operator<=(const variant<Types...>&, const variant<Types...>&);

  template <class... Types>
  constexpr bool operator>=(const variant<Types...>&, const variant<Types...>&);

  template <class... Types> requires (three_way_comparable<Types> && ...)
  constexpr common_comparison_category_t<compare_three_way_result_t<Types>...>
    operator<=>(const variant<Types...>&, const variant<Types...>&);           // since C++20

  // 20.7.6, visitation
  template <class Visitor, class... Variants>
  constexpr see below visit(Visitor&&, Variants&&...);

  template <class R, class Visitor, class... Variants>
  constexpr R visit(Visitor&&, Variants&&...); // since C++20

  // 20.7.7, class monostate
  struct monostate;

  // 20.7.8, monostate relational operators
  constexpr bool operator==(monostate, monostate) noexcept;
  constexpr bool operator!=(monostate, monostate) noexcept;             // until C++20
  constexpr bool operator<(monostate, monostate) noexcept;              // until C++20
  constexpr bool operator>(monostate, monostate) noexcept;              // until C++20
  constexpr bool operator<=(monostate, monostate) noexcept;             // until C++20
  constexpr bool operator>=(monostate, monostate) noexcept;             // until C++20
  constexpr strong_ordering operator<=>(monostate, monostate) noexcept; // since C++20

  // 20.7.9, specialized algorithms
  template <class... Types>
  void swap(variant<Types...>&, variant<Types...>&) noexcept(see below);

  // 20.7.10, class bad_variant_access
  class bad_variant_access;

  // 20.7.11, hash support
  template <class T> struct hash;
  template <class... Types> struct hash<variant<Types...>>;
  template <> struct hash<monostate>;

} // namespace std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 207 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* common_comparison_category.h expanded by -frewrite-includes */
#include <__compare/common_comparison_category.h>
#else /* common_comparison_category.h expanded by -frewrite-includes */
# 209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/common_comparison_category.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___COMPARE_COMMON_COMPARISON_CATEGORY_H
#define _LIBCPP___COMPARE_COMMON_COMPARISON_CATEGORY_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ordering.h expanded by -frewrite-includes */
#include <__compare/ordering.h>
#else /* ordering.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/common_comparison_category.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/ordering.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___COMPARE_ORDERING_H
#define _LIBCPP___COMPARE_ORDERING_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/ordering.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/ordering.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/ordering.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/ordering.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/ordering.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/ordering.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/ordering.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/ordering.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/ordering.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/ordering.h" 3

// exposition only
enum class _OrdResult : signed char {
  __less = -1,
  __equiv = 0,
  __greater = 1
};

enum class _NCmpResult : signed char {
  __unordered = -127
};

class partial_ordering;
class weak_ordering;
class strong_ordering;

template<class _Tp, class... _Args>
inline constexpr bool __one_of_v = (is_same_v<_Tp, _Args> || ...);

struct _CmpUnspecifiedParam {
  _LIBCPP_HIDE_FROM_ABI constexpr
  _CmpUnspecifiedParam(int _CmpUnspecifiedParam::*) noexcept {}

  template<class _Tp, class = enable_if_t<!__one_of_v<_Tp, int, partial_ordering, weak_ordering, strong_ordering>>>
  _CmpUnspecifiedParam(_Tp) = delete;
};

class partial_ordering {
  using _ValueT = signed char;

  _LIBCPP_HIDE_FROM_ABI
  explicit constexpr partial_ordering(_OrdResult __v) noexcept
      : __value_(_ValueT(__v)) {}

  _LIBCPP_HIDE_FROM_ABI
  explicit constexpr partial_ordering(_NCmpResult __v) noexcept
      : __value_(_ValueT(__v)) {}

  _LIBCPP_HIDE_FROM_ABI
  constexpr bool __is_ordered() const noexcept {
    return __value_ != _ValueT(_NCmpResult::__unordered);
  }
public:
  // valid values
  static const partial_ordering less;
  static const partial_ordering equivalent;
  static const partial_ordering greater;
  static const partial_ordering unordered;

  // comparisons
  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(partial_ordering, partial_ordering) noexcept = default;

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(partial_ordering __v, _CmpUnspecifiedParam) noexcept {
    return __v.__is_ordered() && __v.__value_ == 0;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator< (partial_ordering __v, _CmpUnspecifiedParam) noexcept {
    return __v.__is_ordered() && __v.__value_ < 0;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator<=(partial_ordering __v, _CmpUnspecifiedParam) noexcept  {
    return __v.__is_ordered() && __v.__value_ <= 0;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator> (partial_ordering __v, _CmpUnspecifiedParam) noexcept  {
    return __v.__is_ordered() && __v.__value_ > 0;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator>=(partial_ordering __v, _CmpUnspecifiedParam) noexcept  {
    return __v.__is_ordered() && __v.__value_ >= 0;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator< (_CmpUnspecifiedParam, partial_ordering __v) noexcept  {
    return __v.__is_ordered() && 0 < __v.__value_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator<=(_CmpUnspecifiedParam, partial_ordering __v) noexcept  {
    return __v.__is_ordered() && 0 <= __v.__value_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator> (_CmpUnspecifiedParam, partial_ordering __v) noexcept  {
    return __v.__is_ordered() && 0 > __v.__value_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator>=(_CmpUnspecifiedParam, partial_ordering __v) noexcept  {
    return __v.__is_ordered() && 0 >= __v.__value_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr partial_ordering operator<=>(partial_ordering __v, _CmpUnspecifiedParam) noexcept  {
    return __v;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr partial_ordering operator<=>(_CmpUnspecifiedParam, partial_ordering __v) noexcept  {
    return __v < 0 ? partial_ordering::greater : (__v > 0 ? partial_ordering::less : __v);
  }
private:
  _ValueT __value_;
};

inline constexpr partial_ordering partial_ordering::less(_OrdResult::__less);
inline constexpr partial_ordering partial_ordering::equivalent(_OrdResult::__equiv);
inline constexpr partial_ordering partial_ordering::greater(_OrdResult::__greater);
inline constexpr partial_ordering partial_ordering::unordered(_NCmpResult ::__unordered);

class weak_ordering {
  using _ValueT = signed char;

  _LIBCPP_HIDE_FROM_ABI
  explicit constexpr weak_ordering(_OrdResult __v) noexcept : __value_(_ValueT(__v)) {}

public:
  static const weak_ordering less;
  static const weak_ordering equivalent;
  static const weak_ordering greater;

  _LIBCPP_HIDE_FROM_ABI
  constexpr operator partial_ordering() const noexcept {
    return __value_ == 0 ? partial_ordering::equivalent
        : (__value_ < 0 ? partial_ordering::less : partial_ordering::greater);
  }

  // comparisons
  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(weak_ordering, weak_ordering) noexcept = default;

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(weak_ordering __v, _CmpUnspecifiedParam) noexcept {
    return __v.__value_ == 0;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator< (weak_ordering __v, _CmpUnspecifiedParam) noexcept {
    return __v.__value_ < 0;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator<=(weak_ordering __v, _CmpUnspecifiedParam) noexcept {
    return __v.__value_ <= 0;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator> (weak_ordering __v, _CmpUnspecifiedParam) noexcept {
    return __v.__value_ > 0;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator>=(weak_ordering __v, _CmpUnspecifiedParam) noexcept {
    return __v.__value_ >= 0;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator< (_CmpUnspecifiedParam, weak_ordering __v) noexcept {
    return 0 < __v.__value_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator<=(_CmpUnspecifiedParam, weak_ordering __v) noexcept {
    return 0 <= __v.__value_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator> (_CmpUnspecifiedParam, weak_ordering __v) noexcept {
    return 0 > __v.__value_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator>=(_CmpUnspecifiedParam, weak_ordering __v) noexcept {
    return 0 >= __v.__value_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr weak_ordering operator<=>(weak_ordering __v, _CmpUnspecifiedParam) noexcept {
    return __v;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr weak_ordering operator<=>(_CmpUnspecifiedParam, weak_ordering __v) noexcept {
    return __v < 0 ? weak_ordering::greater : (__v > 0 ? weak_ordering::less : __v);
  }

private:
  _ValueT __value_;
};

inline constexpr weak_ordering weak_ordering::less(_OrdResult::__less);
inline constexpr weak_ordering weak_ordering::equivalent(_OrdResult::__equiv);
inline constexpr weak_ordering weak_ordering::greater(_OrdResult::__greater);

class strong_ordering {
  using _ValueT = signed char;

  _LIBCPP_HIDE_FROM_ABI
  explicit constexpr strong_ordering(_OrdResult __v) noexcept : __value_(_ValueT(__v)) {}

public:
  static const strong_ordering less;
  static const strong_ordering equal;
  static const strong_ordering equivalent;
  static const strong_ordering greater;

  // conversions
  _LIBCPP_HIDE_FROM_ABI
  constexpr operator partial_ordering() const noexcept {
    return __value_ == 0 ? partial_ordering::equivalent
        : (__value_ < 0 ? partial_ordering::less : partial_ordering::greater);
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr operator weak_ordering() const noexcept {
    return __value_ == 0 ? weak_ordering::equivalent
        : (__value_ < 0 ? weak_ordering::less : weak_ordering::greater);
  }

  // comparisons
  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(strong_ordering, strong_ordering) noexcept = default;

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(strong_ordering __v, _CmpUnspecifiedParam) noexcept {
    return __v.__value_ == 0;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator< (strong_ordering __v, _CmpUnspecifiedParam) noexcept {
    return __v.__value_ < 0;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator<=(strong_ordering __v, _CmpUnspecifiedParam) noexcept {
    return __v.__value_ <= 0;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator> (strong_ordering __v, _CmpUnspecifiedParam) noexcept {
    return __v.__value_ > 0;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator>=(strong_ordering __v, _CmpUnspecifiedParam) noexcept {
    return __v.__value_ >= 0;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator< (_CmpUnspecifiedParam, strong_ordering __v) noexcept {
    return 0 < __v.__value_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator<=(_CmpUnspecifiedParam, strong_ordering __v) noexcept {
    return 0 <= __v.__value_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator> (_CmpUnspecifiedParam, strong_ordering __v) noexcept {
    return 0 > __v.__value_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator>=(_CmpUnspecifiedParam, strong_ordering __v) noexcept {
    return 0 >= __v.__value_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr strong_ordering operator<=>(strong_ordering __v, _CmpUnspecifiedParam) noexcept {
    return __v;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr strong_ordering operator<=>(_CmpUnspecifiedParam, strong_ordering __v) noexcept {
    return __v < 0 ? strong_ordering::greater : (__v > 0 ? strong_ordering::less : __v);
  }

private:
  _ValueT __value_;
};

inline constexpr strong_ordering strong_ordering::less(_OrdResult::__less);
inline constexpr strong_ordering strong_ordering::equal(_OrdResult::__equiv);
inline constexpr strong_ordering strong_ordering::equivalent(_OrdResult::__equiv);
inline constexpr strong_ordering strong_ordering::greater(_OrdResult::__greater);

/// [cmp.categories.pre]/1
/// The types partial_ordering, weak_ordering, and strong_ordering are
/// collectively termed the comparison category types.
template <class _Tp>
concept __comparison_category = __one_of_v<_Tp, partial_ordering, weak_ordering, strong_ordering>;

#endif // _LIBCPP_STD_VER >= 20
# 323 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/ordering.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___COMPARE_ORDERING_H
# 327 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/ordering.h" 3
#endif /* ordering.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/common_comparison_category.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/common_comparison_category.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/common_comparison_category.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/common_comparison_category.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/common_comparison_category.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/common_comparison_category.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/common_comparison_category.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/common_comparison_category.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/common_comparison_category.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/common_comparison_category.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/common_comparison_category.h" 3

namespace __comp_detail {

enum _ClassifyCompCategory : unsigned {
  _None,
  _PartialOrd,
  _WeakOrd,
  _StrongOrd,
  _CCC_Size
};

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
constexpr _ClassifyCompCategory __type_to_enum() noexcept {
  if (is_same_v<_Tp, partial_ordering>)
    return _PartialOrd;
  if (is_same_v<_Tp, weak_ordering>)
    return _WeakOrd;
  if (is_same_v<_Tp, strong_ordering>)
    return _StrongOrd;
  return _None;
}

template <size_t _Size>
_LIBCPP_HIDE_FROM_ABI
constexpr _ClassifyCompCategory
__compute_comp_type(const _ClassifyCompCategory (&__types)[_Size]) {
  int __seen[_CCC_Size] = {};
  for (auto __type : __types)
    ++__seen[__type];
  if (__seen[_None])
    return _None;
  if (__seen[_PartialOrd])
    return _PartialOrd;
  if (__seen[_WeakOrd])
    return _WeakOrd;
  return _StrongOrd;
}

template <class ..._Ts, bool _False = false>
_LIBCPP_HIDE_FROM_ABI
constexpr auto __get_comp_type() {
  using _CCC = _ClassifyCompCategory;
  constexpr _CCC __type_kinds[] = {_StrongOrd, __type_to_enum<_Ts>()...};
  constexpr _CCC __cat = __comp_detail::__compute_comp_type(__type_kinds);
  if constexpr (__cat == _None)
    return void();
  else if constexpr (__cat == _PartialOrd)
    return partial_ordering::equivalent;
  else if constexpr (__cat == _WeakOrd)
    return weak_ordering::equivalent;
  else if constexpr (__cat == _StrongOrd)
    return strong_ordering::equivalent;
  else
    static_assert(_False, "unhandled case");
}
} // namespace __comp_detail

// [cmp.common], common comparison category type
template<class... _Ts>
struct _LIBCPP_TEMPLATE_VIS common_comparison_category {
  using type = decltype(__comp_detail::__get_comp_type<_Ts...>());
};

template<class... _Ts>
using common_comparison_category_t = typename common_comparison_category<_Ts...>::type;

#endif // _LIBCPP_STD_VER >= 20
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/common_comparison_category.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___COMPARE_COMMON_COMPARISON_CATEGORY_H
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/common_comparison_category.h" 3
#endif /* common_comparison_category.h expanded by -frewrite-includes */
# 210 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* compare_three_way_result.h expanded by -frewrite-includes */
#include <__compare/compare_three_way_result.h>
#else /* compare_three_way_result.h expanded by -frewrite-includes */
# 210 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way_result.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___COMPARE_COMPARE_THREE_WAY_RESULT_H
#define _LIBCPP___COMPARE_COMPARE_THREE_WAY_RESULT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way_result.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_const_lvalue_ref.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way_result.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way_result.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way_result.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way_result.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way_result.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way_result.h" 3

template<class, class, class>
struct _LIBCPP_HIDE_FROM_ABI __compare_three_way_result { };

template<class _Tp, class _Up>
struct _LIBCPP_HIDE_FROM_ABI __compare_three_way_result<_Tp, _Up, decltype(
  std::declval<__make_const_lvalue_ref<_Tp>>() <=> std::declval<__make_const_lvalue_ref<_Up>>(), void()
)> {
    using type = decltype(std::declval<__make_const_lvalue_ref<_Tp>>() <=> std::declval<__make_const_lvalue_ref<_Up>>());
};

template<class _Tp, class _Up = _Tp>
struct _LIBCPP_TEMPLATE_VIS compare_three_way_result : __compare_three_way_result<_Tp, _Up, void> { };

template<class _Tp, class _Up = _Tp>
using compare_three_way_result_t = typename compare_three_way_result<_Tp, _Up>::type;

#endif // _LIBCPP_STD_VER >= 20
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way_result.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___COMPARE_COMPARE_THREE_WAY_RESULT_H
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way_result.h" 3
#endif /* compare_three_way_result.h expanded by -frewrite-includes */
# 211 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* three_way_comparable.h expanded by -frewrite-includes */
#include <__compare/three_way_comparable.h>
#else /* three_way_comparable.h expanded by -frewrite-includes */
# 211 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___COMPARE_THREE_WAY_COMPARABLE_H
#define _LIBCPP___COMPARE_THREE_WAY_COMPARABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/common_comparison_category.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/common_reference_with.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/equality_comparable.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/totally_ordered.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_reference.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_const_lvalue_ref.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3

template<class _Tp, class _Cat>
concept __compares_as =
  same_as<common_comparison_category_t<_Tp, _Cat>, _Cat>;

template<class _Tp, class _Cat = partial_ordering>
concept three_way_comparable =
  __weakly_equality_comparable_with<_Tp, _Tp> &&
  __partially_ordered_with<_Tp, _Tp> &&
  requires(__make_const_lvalue_ref<_Tp> __a, __make_const_lvalue_ref<_Tp> __b) {
    { __a <=> __b } -> __compares_as<_Cat>;
  };

template<class _Tp, class _Up, class _Cat = partial_ordering>
concept three_way_comparable_with =
  three_way_comparable<_Tp, _Cat> &&
  three_way_comparable<_Up, _Cat> &&
  common_reference_with<__make_const_lvalue_ref<_Tp>, __make_const_lvalue_ref<_Up>> &&
  three_way_comparable<common_reference_t<__make_const_lvalue_ref<_Tp>, __make_const_lvalue_ref<_Up>>, _Cat> &&
  __weakly_equality_comparable_with<_Tp, _Up> &&
  __partially_ordered_with<_Tp, _Up> &&
  requires(__make_const_lvalue_ref<_Tp> __t, __make_const_lvalue_ref<_Up> __u) {
    { __t <=> __u } -> __compares_as<_Cat>;
    { __u <=> __t } -> __compares_as<_Cat>;
  };

#endif // _LIBCPP_STD_VER >= 20
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___COMPARE_THREE_WAY_COMPARABLE_H
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/three_way_comparable.h" 3
#endif /* three_way_comparable.h expanded by -frewrite-includes */
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* exception.h expanded by -frewrite-includes */
#include <__exception/exception.h>
#else /* exception.h expanded by -frewrite-includes */
# 213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/exception.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___EXCEPTION_EXCEPTION_H
#define _LIBCPP___EXCEPTION_EXCEPTION_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/exception.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/exception.h" 3

// <vcruntime_exception.h> defines its own std::exception and std::bad_exception types,
// which we use in order to be ABI-compatible with other STLs on Windows.
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_ABI_VCRUNTIME)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/exception.h" 3
#if 0 /* expanded by -frewrite-includes */
#  include <vcruntime_exception.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/exception.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/exception.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/exception.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/exception.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/exception.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/exception.h" 3

namespace std { // purposefully not using versioning namespace

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_ABI_VCRUNTIME) && (!defined(_HAS_EXCEPTIONS) || _HAS_EXCEPTIONS != 0)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/exception.h" 3
// The std::exception class was already included above, but we're explicit about this condition here for clarity.

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_LIBCPP_ABI_VCRUNTIME) && _HAS_EXCEPTIONS == 0
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/exception.h" 3
// However, <vcruntime_exception.h> does not define std::exception and std::bad_exception
// when _HAS_EXCEPTIONS == 0.
//
// Since libc++ still wants to provide the std::exception hierarchy even when _HAS_EXCEPTIONS == 0
// (after all those are simply types like any other), we define an ABI-compatible version
// of the VCRuntime std::exception and std::bad_exception types in that mode.

struct __std_exception_data {
  char const* _What;
  bool _DoFree;
};

class exception { // base of all library exceptions
public:
  exception() _NOEXCEPT : __data_() {}

  explicit exception(char const* __message) _NOEXCEPT : __data_() {
    __data_._What   = __message;
    __data_._DoFree = true;
  }

  exception(exception const&) _NOEXCEPT {}

  exception& operator=(exception const&) _NOEXCEPT { return *this; }

  virtual ~exception() _NOEXCEPT {}

  virtual char const* what() const _NOEXCEPT { return __data_._What ? __data_._What : "Unknown exception"; }

private:
  __std_exception_data __data_;
};

class bad_exception : public exception {
public:
  bad_exception() _NOEXCEPT : exception("bad exception") {}
};

#else  // !defined(_LIBCPP_ABI_VCRUNTIME)
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/exception.h" 3
// On all other platforms, we define our own std::exception and std::bad_exception types
// regardless of whether exceptions are turned on as a language feature.

class _LIBCPP_EXPORTED_FROM_ABI exception {
public:
  _LIBCPP_HIDE_FROM_ABI exception() _NOEXCEPT {}
  _LIBCPP_HIDE_FROM_ABI exception(const exception&) _NOEXCEPT            = default;
  _LIBCPP_HIDE_FROM_ABI exception& operator=(const exception&) _NOEXCEPT = default;

  virtual ~exception() _NOEXCEPT;
  virtual const char* what() const _NOEXCEPT;
};

class _LIBCPP_EXPORTED_FROM_ABI bad_exception : public exception {
public:
  _LIBCPP_HIDE_FROM_ABI bad_exception() _NOEXCEPT {}
  _LIBCPP_HIDE_FROM_ABI bad_exception(const bad_exception&) _NOEXCEPT            = default;
  _LIBCPP_HIDE_FROM_ABI bad_exception& operator=(const bad_exception&) _NOEXCEPT = default;
  ~bad_exception() _NOEXCEPT override;
  const char* what() const _NOEXCEPT override;
};
#endif // !_LIBCPP_ABI_VCRUNTIME
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/exception.h" 3

} // namespace std

#endif // _LIBCPP___EXCEPTION_EXCEPTION_H
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/exception.h" 3
#endif /* exception.h expanded by -frewrite-includes */
# 214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* hash.h expanded by -frewrite-includes */
#include <__functional/hash.h>
#else /* hash.h expanded by -frewrite-includes */
# 214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_HASH_H
#define _LIBCPP___FUNCTIONAL_HASH_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* unary_function.h expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#else /* unary_function.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_function.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_UNARY_FUNCTION_H
#define _LIBCPP___FUNCTIONAL_UNARY_FUNCTION_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_function.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_function.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_function.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_function.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_function.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_function.h" 3

template <class _Arg, class _Result>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 unary_function
{
    typedef _Arg    argument_type;
    typedef _Result result_type;
};

#endif // _LIBCPP_STD_VER <= 14
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_function.h" 3

template <class _Arg, class _Result> struct __unary_function_keep_layout_base {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_function.h" 3
  using argument_type _LIBCPP_DEPRECATED_IN_CXX17 = _Arg;
  using result_type _LIBCPP_DEPRECATED_IN_CXX17 = _Result;
#endif
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_function.h" 3
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_function.h" 3
_LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")
template <class _Arg, class _Result>
using __unary_function = unary_function<_Arg, _Result>;
_LIBCPP_DIAGNOSTIC_POP
#else
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_function.h" 3
template <class _Arg, class _Result>
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
#endif
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_function.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_UNARY_FUNCTION_H
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_function.h" 3
#endif /* unary_function.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* hash.h expanded by -frewrite-includes */
#include <__fwd/hash.h>
#else /* hash.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/hash.h" 1 3
//===---------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_HASH_H
#define _LIBCPP___FWD_HASH_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/hash.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/hash.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/hash.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/hash.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/hash.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class>
struct _LIBCPP_TEMPLATE_VIS hash;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FWD_HASH_H
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/hash.h" 3
#endif /* hash.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* sfinae_helpers.h expanded by -frewrite-includes */
#include <__tuple/sfinae_helpers.h>
#else /* sfinae_helpers.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TUPLE_SFINAE_HELPERS_H
#define _LIBCPP___TUPLE_SFINAE_HELPERS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* tuple.h expanded by -frewrite-includes */
#include <__fwd/tuple.h>
#else /* tuple.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/tuple.h" 1 3
//===---------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_TUPLE_H
#define _LIBCPP___FWD_TUPLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/tuple.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/tuple.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/tuple.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/tuple.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/tuple.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#ifndef _LIBCPP_CXX03_LANG

template <class...>
class _LIBCPP_TEMPLATE_VIS tuple;

#endif // _LIBCPP_CXX03_LANG
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/tuple.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FWD_TUPLE_H
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/tuple.h" 3
#endif /* tuple.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* make_tuple_types.h expanded by -frewrite-includes */
#include <__tuple/make_tuple_types.h>
#else /* make_tuple_types.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TUPLE_MAKE_TUPLE_TYPES_H
#define _LIBCPP___TUPLE_MAKE_TUPLE_TYPES_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* array.h expanded by -frewrite-includes */
#include <__fwd/array.h>
#else /* array.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/array.h" 1 3
//===---------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_ARRAY_H
#define _LIBCPP___FWD_ARRAY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/array.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/array.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/array.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/array.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/array.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/array.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/array.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, size_t _Size>
struct _LIBCPP_TEMPLATE_VIS array;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FWD_ARRAY_H
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/array.h" 3
#endif /* array.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/tuple.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* tuple_element.h expanded by -frewrite-includes */
#include <__tuple/tuple_element.h>
#else /* tuple_element.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TUPLE_TUPLE_ELEMENT_H
#define _LIBCPP___TUPLE_TUPLE_ELEMENT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* tuple_indices.h expanded by -frewrite-includes */
#include <__tuple/tuple_indices.h>
#else /* tuple_indices.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_indices.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TUPLE_MAKE_TUPLE_INDICES_H
#define _LIBCPP___TUPLE_MAKE_TUPLE_INDICES_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_indices.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_indices.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* integer_sequence.h expanded by -frewrite-includes */
#include <__utility/integer_sequence.h>
#else /* integer_sequence.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_indices.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_INTEGER_SEQUENCE_H
#define _LIBCPP___UTILITY_INTEGER_SEQUENCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <size_t...> struct __tuple_indices;

template <class _IdxType, _IdxType... _Values>
struct __integer_sequence {
  template <template <class _OIdxType, _OIdxType...> class _ToIndexSeq, class _ToIndexType>
  using __convert = _ToIndexSeq<_ToIndexType, _Values...>;

  template <size_t _Sp>
  using __to_tuple_indices = __tuple_indices<(_Values + _Sp)...>;
};

#if 0 /* disabled by -frewrite-includes */
#if !__has_builtin(__make_integer_seq) || defined(_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3

namespace __detail {

template<typename _Tp, size_t ..._Extra> struct __repeat;
template<typename _Tp, _Tp ..._Np, size_t ..._Extra> struct __repeat<__integer_sequence<_Tp, _Np...>, _Extra...> {
  typedef _LIBCPP_NODEBUG __integer_sequence<_Tp,
                           _Np...,
                           sizeof...(_Np) + _Np...,
                           2 * sizeof...(_Np) + _Np...,
                           3 * sizeof...(_Np) + _Np...,
                           4 * sizeof...(_Np) + _Np...,
                           5 * sizeof...(_Np) + _Np...,
                           6 * sizeof...(_Np) + _Np...,
                           7 * sizeof...(_Np) + _Np...,
                           _Extra...> type;
};

template<size_t _Np> struct __parity;
template<size_t _Np> struct __make : __parity<_Np % 8>::template __pmake<_Np> {};

template<> struct __make<0> { typedef __integer_sequence<size_t> type; };
template<> struct __make<1> { typedef __integer_sequence<size_t, 0> type; };
template<> struct __make<2> { typedef __integer_sequence<size_t, 0, 1> type; };
template<> struct __make<3> { typedef __integer_sequence<size_t, 0, 1, 2> type; };
template<> struct __make<4> { typedef __integer_sequence<size_t, 0, 1, 2, 3> type; };
template<> struct __make<5> { typedef __integer_sequence<size_t, 0, 1, 2, 3, 4> type; };
template<> struct __make<6> { typedef __integer_sequence<size_t, 0, 1, 2, 3, 4, 5> type; };
template<> struct __make<7> { typedef __integer_sequence<size_t, 0, 1, 2, 3, 4, 5, 6> type; };

template<> struct __parity<0> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type> {}; };
template<> struct __parity<1> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 1> {}; };
template<> struct __parity<2> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 2, _Np - 1> {}; };
template<> struct __parity<3> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 3, _Np - 2, _Np - 1> {}; };
template<> struct __parity<4> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };
template<> struct __parity<5> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 5, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };
template<> struct __parity<6> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 6, _Np - 5, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };
template<> struct __parity<7> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 7, _Np - 6, _Np - 5, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };

} // namespace detail

#endif
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__make_integer_seq)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3
template <size_t _Ep, size_t _Sp>
using __make_indices_imp =
    typename __make_integer_seq<__integer_sequence, size_t, _Ep - _Sp>::template
    __to_tuple_indices<_Sp>;
#else
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3
template <size_t _Ep, size_t _Sp>
using __make_indices_imp =
    typename __detail::__make<_Ep - _Sp>::type::template __to_tuple_indices<_Sp>;

#endif
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3

template<class _Tp, _Tp... _Ip>
struct _LIBCPP_TEMPLATE_VIS integer_sequence
{
    typedef _Tp value_type;
    static_assert( is_integral<_Tp>::value,
                  "std::integer_sequence can only be instantiated with an integral type" );
    static
    _LIBCPP_INLINE_VISIBILITY
    constexpr
    size_t
    size() noexcept { return sizeof...(_Ip); }
};

template<size_t... _Ip>
    using index_sequence = integer_sequence<size_t, _Ip...>;

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__make_integer_seq) && !defined(_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3

template <class _Tp, _Tp _Ep>
using __make_integer_sequence _LIBCPP_NODEBUG = __make_integer_seq<integer_sequence, _Tp, _Ep>;

#else
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3

template<typename _Tp, _Tp _Np> using __make_integer_sequence_unchecked _LIBCPP_NODEBUG =
  typename __detail::__make<_Np>::type::template __convert<integer_sequence, _Tp>;

template <class _Tp, _Tp _Ep>
struct __make_integer_sequence_checked
{
    static_assert(is_integral<_Tp>::value,
                  "std::make_integer_sequence can only be instantiated with an integral type" );
    static_assert(0 <= _Ep, "std::make_integer_sequence must have a non-negative sequence length");
    // Workaround GCC bug by preventing bad installations when 0 <= _Ep
    // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68929
    typedef _LIBCPP_NODEBUG __make_integer_sequence_unchecked<_Tp, 0 <= _Ep ? _Ep : 0> type;
};

template <class _Tp, _Tp _Ep>
using __make_integer_sequence _LIBCPP_NODEBUG = typename __make_integer_sequence_checked<_Tp, _Ep>::type;

#endif
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3

template<class _Tp, _Tp _Np>
    using make_integer_sequence = __make_integer_sequence<_Tp, _Np>;

template<size_t _Np>
    using make_index_sequence = make_integer_sequence<size_t, _Np>;

template<class... _Tp>
    using index_sequence_for = make_index_sequence<sizeof...(_Tp)>;

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3
// Executes __func for every element in an index_sequence.
template <size_t... _Index, class _Function>
_LIBCPP_HIDE_FROM_ABI constexpr void __for_each_index_sequence(index_sequence<_Index...>, _Function __func) {
    (__func.template operator()<_Index>(), ...);
}
#  endif // _LIBCPP_STD_VER >= 20
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3

#endif // _LIBCPP_STD_VER >= 14
# 150 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___UTILITY_INTEGER_SEQUENCE_H
# 154 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/integer_sequence.h" 3
#endif /* integer_sequence.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_indices.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_indices.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_indices.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_indices.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_indices.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_indices.h" 3

#ifndef _LIBCPP_CXX03_LANG

_LIBCPP_BEGIN_NAMESPACE_STD

template <size_t...> struct __tuple_indices {};

template <size_t _Ep, size_t _Sp = 0>
struct __make_tuple_indices
{
    static_assert(_Sp <= _Ep, "__make_tuple_indices input error");
    typedef __make_indices_imp<_Ep, _Sp> type;
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_CXX03_LANG
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_indices.h" 3

#endif // _LIBCPP___TUPLE_MAKE_TUPLE_INDICES_H
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_indices.h" 3
#endif /* tuple_indices.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* tuple_types.h expanded by -frewrite-includes */
#include <__tuple/tuple_types.h>
#else /* tuple_types.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_types.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TUPLE_TUPLE_TYPES_H
#define _LIBCPP___TUPLE_TUPLE_TYPES_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_types.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_types.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_types.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_types.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_types.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class ..._Tp> struct __tuple_types {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TUPLE_TUPLE_TYPES_H
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_types.h" 3
#endif /* tuple_types.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_const.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_cv.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_volatile.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <size_t _Ip, class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_element;

template <size_t _Ip, class _Tp>
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const _Tp>
{
    typedef _LIBCPP_NODEBUG typename add_const<typename tuple_element<_Ip, _Tp>::type>::type type;
};

template <size_t _Ip, class _Tp>
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, volatile _Tp>
{
    typedef _LIBCPP_NODEBUG typename add_volatile<typename tuple_element<_Ip, _Tp>::type>::type type;
};

template <size_t _Ip, class _Tp>
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const volatile _Tp>
{
    typedef _LIBCPP_NODEBUG typename add_cv<typename tuple_element<_Ip, _Tp>::type>::type type;
};

#ifndef _LIBCPP_CXX03_LANG

#if 0 /* disabled by -frewrite-includes */
#if !__has_builtin(__type_pack_element)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3

namespace __indexer_detail {

template <size_t _Idx, class _Tp>
struct __indexed { using type _LIBCPP_NODEBUG = _Tp; };

template <class _Types, class _Indexes> struct __indexer;

template <class ..._Types, size_t ..._Idx>
struct __indexer<__tuple_types<_Types...>, __tuple_indices<_Idx...>>
    : __indexed<_Idx, _Types>...
{};

template <size_t _Idx, class _Tp>
__indexed<_Idx, _Tp> __at_index(__indexed<_Idx, _Tp> const&);

} // namespace __indexer_detail

template <size_t _Idx, class ..._Types>
using __type_pack_element _LIBCPP_NODEBUG = typename decltype(
    __indexer_detail::__at_index<_Idx>(
        __indexer_detail::__indexer<
            __tuple_types<_Types...>,
            typename __make_tuple_indices<sizeof...(_Types)>::type
        >{})
  )::type;
#endif
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3

template <size_t _Ip, class ..._Types>
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, __tuple_types<_Types...> >
{
    static_assert(_Ip < sizeof...(_Types), "tuple_element index out of range");
    typedef _LIBCPP_NODEBUG __type_pack_element<_Ip, _Types...> type;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3
template <size_t _Ip, class ..._Tp>
using tuple_element_t _LIBCPP_NODEBUG = typename tuple_element <_Ip, _Tp...>::type;
#endif
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3

#endif // _LIBCPP_CXX03_LANG
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TUPLE_TUPLE_ELEMENT_H
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_element.h" 3
#endif /* tuple_element.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_indices.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* tuple_size.h expanded by -frewrite-includes */
#include <__tuple/tuple_size.h>
#else /* tuple_size.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TUPLE_TUPLE_SIZE_H
#define _LIBCPP___TUPLE_TUPLE_SIZE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/tuple.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_types.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_const.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_volatile.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size;

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_CXX03_LANG)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
template <class _Tp, class...>
using __enable_if_tuple_size_imp = _Tp;

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
    const _Tp,
    __enable_if_t<!is_volatile<_Tp>::value>,
    integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
    : public integral_constant<size_t, tuple_size<_Tp>::value> {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
    volatile _Tp,
    __enable_if_t<!is_const<_Tp>::value>,
    integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
    : public integral_constant<size_t, tuple_size<_Tp>::value> {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
    const volatile _Tp,
    integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
    : public integral_constant<size_t, tuple_size<_Tp>::value> {};

#else
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<const _Tp> : public tuple_size<_Tp> {};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<volatile _Tp> : public tuple_size<_Tp> {};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<const volatile _Tp> : public tuple_size<_Tp> {};
#endif
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3

#ifndef _LIBCPP_CXX03_LANG

template <class ..._Tp>
struct _LIBCPP_TEMPLATE_VIS tuple_size<tuple<_Tp...> >
    : public integral_constant<size_t, sizeof...(_Tp)>
{
};

template <class ..._Tp>
struct _LIBCPP_TEMPLATE_VIS tuple_size<__tuple_types<_Tp...> >
    : public integral_constant<size_t, sizeof...(_Tp)>
{
};

#endif // _LIBCPP_CXX03_LANG
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TUPLE_TUPLE_SIZE_H
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_size.h" 3
#endif /* tuple_size.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_types.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/apply_cv.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3

#ifndef _LIBCPP_CXX03_LANG

_LIBCPP_BEGIN_NAMESPACE_STD

// __make_tuple_types<_Tuple<_Types...>, _Ep, _Sp>::type is a
// __tuple_types<_Types...> using only those _Types in the range [_Sp, _Ep).
// _Sp defaults to 0 and _Ep defaults to tuple_size<_Tuple>.  If _Tuple is a
// lvalue_reference type, then __tuple_types<_Types&...> is the result.

template <class _TupleTypes, class _TupleIndices>
struct __make_tuple_types_flat;

template <template <class...> class _Tuple, class ..._Types, size_t ..._Idx>
struct __make_tuple_types_flat<_Tuple<_Types...>, __tuple_indices<_Idx...>> {
  // Specialization for pair, tuple, and __tuple_types
  template <class _Tp>
  using __apply_quals _LIBCPP_NODEBUG = __tuple_types<__apply_cv_t<_Tp, __type_pack_element<_Idx, _Types...>>...>;
};

template <class _Vt, size_t _Np, size_t ..._Idx>
struct __make_tuple_types_flat<array<_Vt, _Np>, __tuple_indices<_Idx...>> {
  template <size_t>
  using __value_type = _Vt;
  template <class _Tp>
  using __apply_quals = __tuple_types<__apply_cv_t<_Tp, __value_type<_Idx>>...>;
};

template <class _Tp, size_t _Ep = tuple_size<__libcpp_remove_reference_t<_Tp> >::value,
          size_t _Sp = 0,
          bool _SameSize = (_Ep == tuple_size<__libcpp_remove_reference_t<_Tp> >::value)>
struct __make_tuple_types
{
    static_assert(_Sp <= _Ep, "__make_tuple_types input error");
    using _RawTp = __remove_cv_t<__libcpp_remove_reference_t<_Tp> >;
    using _Maker = __make_tuple_types_flat<_RawTp, typename __make_tuple_indices<_Ep, _Sp>::type>;
    using type = typename _Maker::template __apply_quals<_Tp>;
};

template <class ..._Types, size_t _Ep>
struct __make_tuple_types<tuple<_Types...>, _Ep, 0, true> {
  typedef _LIBCPP_NODEBUG __tuple_types<_Types...> type;
};

template <class ..._Types, size_t _Ep>
struct __make_tuple_types<__tuple_types<_Types...>, _Ep, 0, true> {
  typedef _LIBCPP_NODEBUG __tuple_types<_Types...> type;
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_CXX03_LANG
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3

#endif // _LIBCPP___TUPLE_MAKE_TUPLE_TYPES_H
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/make_tuple_types.h" 3
#endif /* make_tuple_types.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_element.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* tuple_like_ext.h expanded by -frewrite-includes */
#include <__tuple/tuple_like_ext.h>
#else /* tuple_like_ext.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TUPLE_TUPLE_LIKE_EXT_H
#define _LIBCPP___TUPLE_TUPLE_LIKE_EXT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/array.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/pair.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/tuple.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_types.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp> struct __tuple_like_ext : false_type {};

template <class _Tp> struct __tuple_like_ext<const _Tp> : public __tuple_like_ext<_Tp> {};
template <class _Tp> struct __tuple_like_ext<volatile _Tp> : public __tuple_like_ext<_Tp> {};
template <class _Tp> struct __tuple_like_ext<const volatile _Tp> : public __tuple_like_ext<_Tp> {};

#ifndef _LIBCPP_CXX03_LANG
template <class... _Tp> struct __tuple_like_ext<tuple<_Tp...> > : true_type {};
#endif
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3

template <class _T1, class _T2> struct __tuple_like_ext<pair<_T1, _T2> > : true_type {};

template <class _Tp, size_t _Size> struct __tuple_like_ext<array<_Tp, _Size> > : true_type {};

template <class... _Tp> struct __tuple_like_ext<__tuple_types<_Tp...> > : true_type {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TUPLE_TUPLE_LIKE_EXT_H
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like_ext.h" 3
#endif /* tuple_like_ext.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_size.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_types.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_assignable.h expanded by -frewrite-includes */
#include <__type_traits/is_assignable.h>
#else /* is_assignable.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_assignable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_ASSIGNABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_ASSIGNABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_assignable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_assignable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_assignable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_assignable.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_assignable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, class _Up>
struct _LIBCPP_TEMPLATE_VIS is_assignable : _BoolConstant<__is_assignable(_Tp, _Up)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_assignable.h" 3
template <class _Tp, class _Arg>
inline constexpr bool is_assignable_v = __is_assignable(_Tp, _Arg);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_assignable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_ASSIGNABLE_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_assignable.h" 3
#endif /* is_assignable.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
#endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#ifndef _LIBCPP_CXX03_LANG

template <bool ..._Preds>
struct __all_dummy;

template <bool ..._Pred>
struct __all : _IsSame<__all_dummy<_Pred...>, __all_dummy<((void)_Pred, true)...>> {};

struct __tuple_sfinae_base {
  template <template <class, class...> class _Trait,
            class ..._LArgs, class ..._RArgs>
  static auto __do_test(__tuple_types<_LArgs...>, __tuple_types<_RArgs...>)
    -> __all<__enable_if_t<_Trait<_LArgs, _RArgs>::value, bool>{true}...>;
  template <template <class...> class>
  static auto __do_test(...) -> false_type;

  template <class _FromArgs, class _ToArgs>
  using __constructible = decltype(__do_test<is_constructible>(_ToArgs{}, _FromArgs{}));
  template <class _FromArgs, class _ToArgs>
  using __convertible = decltype(__do_test<is_convertible>(_FromArgs{}, _ToArgs{}));
  template <class _FromArgs, class _ToArgs>
  using __assignable = decltype(__do_test<is_assignable>(_ToArgs{}, _FromArgs{}));
};

// __tuple_convertible

template <class _Tp, class _Up, bool = __tuple_like_ext<__libcpp_remove_reference_t<_Tp> >::value,
                                bool = __tuple_like_ext<_Up>::value>
struct __tuple_convertible
    : public false_type {};

template <class _Tp, class _Up>
struct __tuple_convertible<_Tp, _Up, true, true>
    : public __tuple_sfinae_base::__convertible<
      typename __make_tuple_types<_Tp>::type
    , typename __make_tuple_types<_Up>::type
    >
{};

// __tuple_constructible

template <class _Tp, class _Up, bool = __tuple_like_ext<__libcpp_remove_reference_t<_Tp> >::value,
                                bool = __tuple_like_ext<_Up>::value>
struct __tuple_constructible
    : public false_type {};

template <class _Tp, class _Up>
struct __tuple_constructible<_Tp, _Up, true, true>
    : public __tuple_sfinae_base::__constructible<
      typename __make_tuple_types<_Tp>::type
    , typename __make_tuple_types<_Up>::type
    >
{};

// __tuple_assignable

template <class _Tp, class _Up, bool = __tuple_like_ext<__libcpp_remove_reference_t<_Tp> >::value,
                                bool = __tuple_like_ext<_Up>::value>
struct __tuple_assignable
    : public false_type {};

template <class _Tp, class _Up>
struct __tuple_assignable<_Tp, _Up, true, true>
    : public __tuple_sfinae_base::__assignable<
      typename __make_tuple_types<_Tp>::type
    , typename __make_tuple_types<_Up&>::type
    >
{};


template <size_t _Ip, class ..._Tp>
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, tuple<_Tp...> >
{
    typedef _LIBCPP_NODEBUG typename tuple_element<_Ip, __tuple_types<_Tp...> >::type type;
};

struct _LIBCPP_EXPORTED_FROM_ABI __check_tuple_constructor_fail {

    static _LIBCPP_HIDE_FROM_ABI constexpr bool __enable_explicit_default() { return false; }
    static _LIBCPP_HIDE_FROM_ABI constexpr bool __enable_implicit_default() { return false; }
    template <class ...>
    static _LIBCPP_HIDE_FROM_ABI constexpr bool __enable_explicit() { return false; }
    template <class ...>
    static _LIBCPP_HIDE_FROM_ABI constexpr bool __enable_implicit() { return false; }
    template <class ...>
    static _LIBCPP_HIDE_FROM_ABI constexpr bool __enable_assign() { return false; }
};
#endif // !defined(_LIBCPP_CXX03_LANG)
# 123 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3

template <bool _CanCopy, bool _CanMove>
struct __sfinae_ctor_base {};
template <>
struct __sfinae_ctor_base<false, false> {
  __sfinae_ctor_base() = default;
  __sfinae_ctor_base(__sfinae_ctor_base const&) = delete;
  __sfinae_ctor_base(__sfinae_ctor_base &&) = delete;
  __sfinae_ctor_base& operator=(__sfinae_ctor_base const&) = default;
  __sfinae_ctor_base& operator=(__sfinae_ctor_base&&) = default;
};
template <>
struct __sfinae_ctor_base<true, false> {
  __sfinae_ctor_base() = default;
  __sfinae_ctor_base(__sfinae_ctor_base const&) = default;
  __sfinae_ctor_base(__sfinae_ctor_base &&) = delete;
  __sfinae_ctor_base& operator=(__sfinae_ctor_base const&) = default;
  __sfinae_ctor_base& operator=(__sfinae_ctor_base&&) = default;
};
template <>
struct __sfinae_ctor_base<false, true> {
  __sfinae_ctor_base() = default;
  __sfinae_ctor_base(__sfinae_ctor_base const&) = delete;
  __sfinae_ctor_base(__sfinae_ctor_base &&) = default;
  __sfinae_ctor_base& operator=(__sfinae_ctor_base const&) = default;
  __sfinae_ctor_base& operator=(__sfinae_ctor_base&&) = default;
};

template <bool _CanCopy, bool _CanMove>
struct __sfinae_assign_base {};
template <>
struct __sfinae_assign_base<false, false> {
  __sfinae_assign_base() = default;
  __sfinae_assign_base(__sfinae_assign_base const&) = default;
  __sfinae_assign_base(__sfinae_assign_base &&) = default;
  __sfinae_assign_base& operator=(__sfinae_assign_base const&) = delete;
  __sfinae_assign_base& operator=(__sfinae_assign_base&&) = delete;
};
template <>
struct __sfinae_assign_base<true, false> {
  __sfinae_assign_base() = default;
  __sfinae_assign_base(__sfinae_assign_base const&) = default;
  __sfinae_assign_base(__sfinae_assign_base &&) = default;
  __sfinae_assign_base& operator=(__sfinae_assign_base const&) = default;
  __sfinae_assign_base& operator=(__sfinae_assign_base&&) = delete;
};
template <>
struct __sfinae_assign_base<false, true> {
  __sfinae_assign_base() = default;
  __sfinae_assign_base(__sfinae_assign_base const&) = default;
  __sfinae_assign_base(__sfinae_assign_base &&) = default;
  __sfinae_assign_base& operator=(__sfinae_assign_base const&) = delete;
  __sfinae_assign_base& operator=(__sfinae_assign_base&&) = default;
};
#endif // _LIBCPP_STD_VER >= 17
# 180 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TUPLE_SFINAE_HELPERS_H
# 184 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/sfinae_helpers.h" 3
#endif /* sfinae_helpers.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_default_constructible.h expanded by -frewrite-includes */
#include <__type_traits/is_default_constructible.h>
#else /* is_default_constructible.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_default_constructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_default_constructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_default_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_default_constructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_default_constructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_default_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_default_constructible.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_default_constructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_default_constructible : public integral_constant<bool, __is_constructible(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_default_constructible.h" 3
template <class _Tp>
inline constexpr bool is_default_constructible_v = __is_constructible(_Tp);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_default_constructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_default_constructible.h" 3
#endif /* is_default_constructible.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_enum.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/underlying_type.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pair.h expanded by -frewrite-includes */
#include <__utility/pair.h>
#else /* pair.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_PAIR_H
#define _LIBCPP___UTILITY_PAIR_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/common_comparison_category.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* synth_three_way.h expanded by -frewrite-includes */
#include <__compare/synth_three_way.h>
#else /* synth_three_way.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___COMPARE_SYNTH_THREE_WAY_H
#define _LIBCPP___COMPARE_SYNTH_THREE_WAY_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/three_way_comparable.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/boolean_testable.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3

// [expos.only.func]

// TODO MODULES restore the lamba to match the Standard.
// See https://github.com/llvm/llvm-project/issues/57222
//_LIBCPP_HIDE_FROM_ABI inline constexpr auto __synth_three_way =
//  []<class _Tp, class _Up>(const _Tp& __t, const _Up& __u)
template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI constexpr auto __synth_three_way(const _Tp& __t, const _Up& __u)
  requires requires {
    { __t < __u } -> __boolean_testable;
    { __u < __t } -> __boolean_testable;
  }
{
  if constexpr (three_way_comparable_with<_Tp, _Up>) {
    return __t <=> __u;
  } else {
    if (__t < __u)
      return weak_ordering::less;
    if (__u < __t)
      return weak_ordering::greater;
    return weak_ordering::equivalent;
  }
}

template <class _Tp, class _Up = _Tp>
using __synth_three_way_result = decltype(std::__synth_three_way(std::declval<_Tp&>(), std::declval<_Up&>()));

#endif // _LIBCPP_STD_VER >= 20
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___COMPARE_SYNTH_THREE_WAY_H
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/synth_three_way.h" 3
#endif /* synth_three_way.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* different_from.h expanded by -frewrite-includes */
#include <__concepts/different_from.h>
#else /* different_from.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/different_from.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_DIFFERENT_FROM_H
#define _LIBCPP___CONCEPTS_DIFFERENT_FROM_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/different_from.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/different_from.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/different_from.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/different_from.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/different_from.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/different_from.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/different_from.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/different_from.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/different_from.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/different_from.h" 3

template <class _Tp, class _Up>
concept __different_from = !same_as<remove_cvref_t<_Tp>, remove_cvref_t<_Up>>;

#endif // _LIBCPP_STD_VER >= 20
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/different_from.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_DIFFERENT_FROM_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/different_from.h" 3
#endif /* different_from.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/array.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* get.h expanded by -frewrite-includes */
#include <__fwd/get.h>
#else /* get.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_GET_H
#define _LIBCPP___FWD_GET_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/array.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/pair.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* subrange.h expanded by -frewrite-includes */
#include <__fwd/subrange.h>
#else /* subrange.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/subrange.h" 1 3
//===---------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_SUBRANGE_H
#define _LIBCPP___FWD_SUBRANGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/subrange.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/subrange.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/subrange.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/subrange.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/subrange.h" 3

#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/subrange.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/subrange.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

enum class subrange_kind : bool { unsized, sized };

template <input_or_output_iterator _Iter, sentinel_for<_Iter> _Sent, subrange_kind _Kind>
  requires(_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _Iter>)
class _LIBCPP_TEMPLATE_VIS subrange;

} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/subrange.h" 3

#endif // _LIBCPP___FWD_SUBRANGE_H
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/subrange.h" 3
#endif /* subrange.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/tuple.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_element.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#ifndef _LIBCPP_CXX03_LANG

template <size_t _Ip, class ..._Tp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Ip, tuple<_Tp...> >::type&
get(tuple<_Tp...>&) _NOEXCEPT;

template <size_t _Ip, class ..._Tp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element<_Ip, tuple<_Tp...> >::type&
get(const tuple<_Tp...>&) _NOEXCEPT;

template <size_t _Ip, class ..._Tp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Ip, tuple<_Tp...> >::type&&
get(tuple<_Tp...>&&) _NOEXCEPT;

template <size_t _Ip, class ..._Tp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
get(const tuple<_Tp...>&&) _NOEXCEPT;

#endif //_LIBCPP_CXX03_LANG
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3

template <size_t _Ip, class _T1, class _T2>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Ip, pair<_T1, _T2> >::type&
get(pair<_T1, _T2>&) _NOEXCEPT;

template <size_t _Ip, class _T1, class _T2>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element<_Ip, pair<_T1, _T2> >::type&
get(const pair<_T1, _T2>&) _NOEXCEPT;

#ifndef _LIBCPP_CXX03_LANG
template <size_t _Ip, class _T1, class _T2>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
get(pair<_T1, _T2>&&) _NOEXCEPT;

template <size_t _Ip, class _T1, class _T2>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
get(const pair<_T1, _T2>&&) _NOEXCEPT;
#endif
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3

template <size_t _Ip, class _Tp, size_t _Size>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp&
get(array<_Tp, _Size>&) _NOEXCEPT;

template <size_t _Ip, class _Tp, size_t _Size>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&
get(const array<_Tp, _Size>&) _NOEXCEPT;

#ifndef _LIBCPP_CXX03_LANG
template <size_t _Ip, class _Tp, size_t _Size>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp&&
get(array<_Tp, _Size>&&) _NOEXCEPT;

template <size_t _Ip, class _Tp, size_t _Size>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&&
get(const array<_Tp, _Size>&&) _NOEXCEPT;
#endif
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3

namespace ranges {

template <size_t _Index, class _Iter, class _Sent, subrange_kind _Kind>
  requires((_Index == 0 && copyable<_Iter>) || _Index == 1)
_LIBCPP_HIDE_FROM_ABI constexpr auto get(const subrange<_Iter, _Sent, _Kind>& __subrange);

template <size_t _Index, class _Iter, class _Sent, subrange_kind _Kind>
  requires(_Index < 2)
_LIBCPP_HIDE_FROM_ABI constexpr auto get(subrange<_Iter, _Sent, _Kind>&& __subrange);

} // namespace ranges

using ranges::get;

#endif // _LIBCPP_STD_VER >= 20
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FWD_GET_H
# 116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/get.h" 3
#endif /* get.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/pair.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/subrange.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/tuple.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pair_like.h expanded by -frewrite-includes */
#include <__tuple/pair_like.h>
#else /* pair_like.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/pair_like.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TUPLE_PAIR_LIKE_H
#define _LIBCPP___TUPLE_PAIR_LIKE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/pair_like.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/pair_like.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* tuple_like.h expanded by -frewrite-includes */
#include <__tuple/tuple_like.h>
#else /* tuple_like.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/pair_like.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TUPLE_TUPLE_LIKE_H
#define _LIBCPP___TUPLE_TUPLE_LIKE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/array.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/pair.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/subrange.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/tuple.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3

template <class _Tp>
struct __tuple_like_impl : false_type {};

template <class... _Tp>
struct __tuple_like_impl<tuple<_Tp...> > : true_type {};

template <class _T1, class _T2>
struct __tuple_like_impl<pair<_T1, _T2> > : true_type {};

template <class _Tp, size_t _Size>
struct __tuple_like_impl<array<_Tp, _Size> > : true_type {};

template <class _Ip, class _Sp, ranges::subrange_kind _Kp>
struct __tuple_like_impl<ranges::subrange<_Ip, _Sp, _Kp> > : true_type {};

template <class _Tp>
concept __tuple_like = __tuple_like_impl<remove_cvref_t<_Tp>>::value;

#endif // _LIBCPP_STD_VER >= 20
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TUPLE_TUPLE_LIKE_H
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/tuple_like.h" 3
#endif /* tuple_like.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/pair_like.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_size.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/pair_like.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/pair_like.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/pair_like.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/pair_like.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/pair_like.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/pair_like.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/pair_like.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/pair_like.h" 3

template <class _Tp>
concept __pair_like = __tuple_like<_Tp> && tuple_size<remove_cvref_t<_Tp>>::value == 2;

#endif // _LIBCPP_STD_VER >= 20
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/pair_like.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TUPLE_PAIR_LIKE_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tuple/pair_like.h" 3
#endif /* pair_like.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/sfinae_helpers.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_element.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_indices.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_size.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_reference.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_assignable.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_copy_assignable.h expanded by -frewrite-includes */
#include <__type_traits/is_copy_assignable.h>
#else /* is_copy_assignable.h expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_assignable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_COPY_ASSIGNABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_COPY_ASSIGNABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_assignable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_const.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_assignable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_assignable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_assignable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_assignable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_assignable.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_assignable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_copy_assignable
    : public integral_constant<
          bool,
          __is_assignable(__add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t<typename add_const<_Tp>::type>)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_assignable.h" 3
template <class _Tp>
inline constexpr bool is_copy_assignable_v = is_copy_assignable<_Tp>::value;
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_assignable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_COPY_ASSIGNABLE_H
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_copy_assignable.h" 3
#endif /* is_copy_assignable.h expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_implicitly_default_constructible.h expanded by -frewrite-includes */
#include <__type_traits/is_implicitly_default_constructible.h>
#else /* is_implicitly_default_constructible.h expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_implicitly_default_constructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_IMPLICITLY_DEFAULT_CONSTRUCTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_IMPLICITLY_DEFAULT_CONSTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_implicitly_default_constructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_implicitly_default_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_implicitly_default_constructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_implicitly_default_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_implicitly_default_constructible.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_implicitly_default_constructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_implicitly_default_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_implicitly_default_constructible.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_implicitly_default_constructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#ifndef _LIBCPP_CXX03_LANG
// First of all, we can't implement this check in C++03 mode because the {}
// default initialization syntax isn't valid.
// Second, we implement the trait in a funny manner with two defaulted template
// arguments to workaround Clang's PR43454.
template <class _Tp>
void __test_implicit_default_constructible(_Tp);

template <class _Tp, class = void, class = typename is_default_constructible<_Tp>::type>
struct __is_implicitly_default_constructible : false_type {};

template <class _Tp>
struct __is_implicitly_default_constructible<_Tp,
                                             decltype(std::__test_implicit_default_constructible<_Tp const&>({})),
                                             true_type> : true_type {};

template <class _Tp>
struct __is_implicitly_default_constructible<_Tp,
                                             decltype(std::__test_implicit_default_constructible<_Tp const&>({})),
                                             false_type> : false_type {};
#endif // !C++03
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_implicitly_default_constructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_IMPLICITLY_DEFAULT_CONSTRUCTIBLE_H
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_implicitly_default_constructible.h" 3
#endif /* is_implicitly_default_constructible.h expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_assignable.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_nothrow_copy_assignable.h expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_copy_assignable.h>
#else /* is_nothrow_copy_assignable.h expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_assignable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_COPY_ASSIGNABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_COPY_ASSIGNABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_assignable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_const.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_assignable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_assignable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_assignable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_assignable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_assignable.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_assignable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_assignable
    : public integral_constant<bool,
                               __is_nothrow_assignable(__add_lvalue_reference_t<_Tp>,
                                                       __add_lvalue_reference_t<typename add_const<_Tp>::type>)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_assignable.h" 3
template <class _Tp>
inline constexpr bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable<_Tp>::value;
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_assignable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_COPY_ASSIGNABLE_H
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_assignable.h" 3
#endif /* is_nothrow_copy_assignable.h expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_nothrow_copy_constructible.h expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_copy_constructible.h>
#else /* is_nothrow_copy_constructible.h expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_const.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// TODO: remove this implementation once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 is fixed
#ifdef _LIBCPP_COMPILER_GCC

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible
    : public is_nothrow_constructible<_Tp, __add_lvalue_reference_t<typename add_const<_Tp>::type> > {};

#else // _LIBCPP_COMPILER_GCC
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible
    : public integral_constant<
          bool,
          __is_nothrow_constructible(_Tp, typename add_lvalue_reference<typename add_const<_Tp>::type>::type)> {};

#endif // _LIBCPP_COMPILER_GCC
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3
template <class _Tp>
inline constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible<_Tp>::value;
#endif
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_H
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_copy_constructible.h" 3
#endif /* is_nothrow_copy_constructible.h expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_nothrow_default_constructible.h expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_default_constructible.h>
#else /* is_nothrow_default_constructible.h expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_default_constructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_default_constructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_default_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_default_constructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_default_constructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_default_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_default_constructible.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_default_constructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_nothrow_default_constructible
    : public integral_constant<bool, __is_nothrow_constructible(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_default_constructible.h" 3
template <class _Tp>
inline constexpr bool is_nothrow_default_constructible_v = __is_nothrow_constructible(_Tp);
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_default_constructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_default_constructible.h" 3
#endif /* is_nothrow_default_constructible.h expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_swappable.h>
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/nat.h>
#endif /* expanded by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* unwrap_ref.h expanded by -frewrite-includes */
#include <__type_traits/unwrap_ref.h>
#else /* unwrap_ref.h expanded by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/unwrap_ref.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_UNWRAP_REF_H
#define _LIBCPP___TYPE_TRAITS_UNWRAP_REF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/unwrap_ref.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/unwrap_ref.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/unwrap_ref.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/unwrap_ref.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/unwrap_ref.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/unwrap_ref.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/unwrap_ref.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct __unwrap_reference {
  typedef _LIBCPP_NODEBUG _Tp type;
};

template <class _Tp>
class reference_wrapper;

template <class _Tp>
struct __unwrap_reference<reference_wrapper<_Tp> > {
  typedef _LIBCPP_NODEBUG _Tp& type;
};

template <class _Tp>
struct decay;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/unwrap_ref.h" 3
template <class _Tp>
struct unwrap_reference : __unwrap_reference<_Tp> {};

template <class _Tp>
using unwrap_reference_t = typename unwrap_reference<_Tp>::type;

template <class _Tp>
struct unwrap_ref_decay : unwrap_reference<__decay_t<_Tp> > {};

template <class _Tp>
using unwrap_ref_decay_t = typename unwrap_ref_decay<_Tp>::type;
#endif // _LIBCPP_STD_VER >= 20
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/unwrap_ref.h" 3

template <class _Tp>
struct __unwrap_ref_decay
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/unwrap_ref.h" 3
    : unwrap_ref_decay<_Tp>
#else
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/unwrap_ref.h" 3
    : __unwrap_reference<__decay_t<_Tp> >
#endif
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/unwrap_ref.h" 3
{
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_UNWRAP_REF_H
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/unwrap_ref.h" 3
#endif /* unwrap_ref.h expanded by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* piecewise_construct.h expanded by -frewrite-includes */
#include <__utility/piecewise_construct.h>
#else /* piecewise_construct.h expanded by -frewrite-includes */
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/piecewise_construct.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_PIECEWISE_CONSTRUCT_H
#define _LIBCPP___UTILITY_PIECEWISE_CONSTRUCT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/piecewise_construct.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/piecewise_construct.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/piecewise_construct.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/piecewise_construct.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/piecewise_construct.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

struct _LIBCPP_TEMPLATE_VIS piecewise_construct_t { explicit piecewise_construct_t() = default; };

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/piecewise_construct.h" 3
inline constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_CXX03_LANG)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/piecewise_construct.h" 3
constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/piecewise_construct.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___UTILITY_PIECEWISE_CONSTRUCT_H
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/piecewise_construct.h" 3
#endif /* piecewise_construct.h expanded by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#endif
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class, class>
struct __non_trivially_copyable_base {
  _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI
  __non_trivially_copyable_base() _NOEXCEPT {}
  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
  __non_trivially_copyable_base(__non_trivially_copyable_base const&) _NOEXCEPT {}
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
template <class _Tp>
struct __is_specialization_of_subrange : false_type {};

template <class _Iter, class _Sent, ranges::subrange_kind _Kind>
struct __is_specialization_of_subrange<ranges::subrange<_Iter, _Sent, _Kind>> : true_type {};
#endif
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3

template <class _T1, class _T2>
struct _LIBCPP_TEMPLATE_VIS pair
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
: private __non_trivially_copyable_base<_T1, _T2>
#endif
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
{
    using first_type = _T1;
    using second_type = _T2;

    _T1 first;
    _T2 second;

    _LIBCPP_HIDE_FROM_ABI pair(pair const&) = default;
    _LIBCPP_HIDE_FROM_ABI pair(pair&&) = default;

#ifdef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI
    pair() : first(), second() {}

    _LIBCPP_HIDE_FROM_ABI
    pair(_T1 const& __t1, _T2 const& __t2) : first(__t1), second(__t2) {}

    template <class _U1, class _U2>
    _LIBCPP_HIDE_FROM_ABI
    pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {}

    _LIBCPP_HIDE_FROM_ABI
    pair& operator=(pair const& __p) {
        first = __p.first;
        second = __p.second;
        return *this;
    }

    // Extension: This is provided in C++03 because it allows properly handling the
    //            assignment to a pair containing references, which would be a hard
    //            error otherwise.
    template <class _U1, class _U2, class = __enable_if_t<
        is_assignable<first_type&, _U1 const&>::value &&
        is_assignable<second_type&, _U2 const&>::value
    > >
    _LIBCPP_HIDE_FROM_ABI
    pair& operator=(pair<_U1, _U2> const& __p) {
        first = __p.first;
        second = __p.second;
        return *this;
    }
#else
# 127 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
    struct _CheckArgs {
      template <int&...>
      static _LIBCPP_HIDE_FROM_ABI constexpr bool __enable_explicit_default() {
          return is_default_constructible<_T1>::value
              && is_default_constructible<_T2>::value
              && !__enable_implicit_default<>();
      }

      template <int&...>
      static _LIBCPP_HIDE_FROM_ABI constexpr bool __enable_implicit_default() {
          return __is_implicitly_default_constructible<_T1>::value
              && __is_implicitly_default_constructible<_T2>::value;
      }

      template <class _U1, class _U2>
      static _LIBCPP_HIDE_FROM_ABI constexpr bool __is_pair_constructible() {
          return is_constructible<first_type, _U1>::value
              && is_constructible<second_type, _U2>::value;
      }

      template <class _U1, class _U2>
      static _LIBCPP_HIDE_FROM_ABI constexpr bool __is_implicit() {
          return is_convertible<_U1, first_type>::value
              && is_convertible<_U2, second_type>::value;
      }

      template <class _U1, class _U2>
      static _LIBCPP_HIDE_FROM_ABI constexpr bool __enable_explicit() {
          return __is_pair_constructible<_U1, _U2>() && !__is_implicit<_U1, _U2>();
      }

      template <class _U1, class _U2>
      static _LIBCPP_HIDE_FROM_ABI constexpr bool __enable_implicit() {
          return __is_pair_constructible<_U1, _U2>() && __is_implicit<_U1, _U2>();
      }
    };

    template <bool _MaybeEnable>
    using _CheckArgsDep _LIBCPP_NODEBUG = typename conditional<
      _MaybeEnable, _CheckArgs, __check_tuple_constructor_fail>::type;

    template<bool _Dummy = true, __enable_if_t<_CheckArgsDep<_Dummy>::__enable_explicit_default(), int> = 0>
    explicit _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
    pair() _NOEXCEPT_(is_nothrow_default_constructible<first_type>::value &&
                      is_nothrow_default_constructible<second_type>::value)
        : first(), second() {}

    template<bool _Dummy = true, __enable_if_t<_CheckArgsDep<_Dummy>::__enable_implicit_default(), int> = 0>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
    pair() _NOEXCEPT_(is_nothrow_default_constructible<first_type>::value &&
                      is_nothrow_default_constructible<second_type>::value)
        : first(), second() {}

    template <bool _Dummy = true,
              __enable_if_t<_CheckArgsDep<_Dummy>::template __enable_explicit<_T1 const&, _T2 const&>(), int> = 0>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    explicit pair(_T1 const& __t1, _T2 const& __t2)
        _NOEXCEPT_(is_nothrow_copy_constructible<first_type>::value &&
                   is_nothrow_copy_constructible<second_type>::value)
        : first(__t1), second(__t2) {}

    template<bool _Dummy = true,
             __enable_if_t<_CheckArgsDep<_Dummy>::template __enable_implicit<_T1 const&, _T2 const&>(), int> = 0>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    pair(_T1 const& __t1, _T2 const& __t2)
        _NOEXCEPT_(is_nothrow_copy_constructible<first_type>::value &&
                   is_nothrow_copy_constructible<second_type>::value)
        : first(__t1), second(__t2) {}

    template <
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23 // http://wg21.link/P1951
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 198 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
        class _U1 = _T1, class _U2 = _T2,
#else
# 200 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
        class _U1, class _U2,
#endif
# 202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
        __enable_if_t<_CheckArgs::template __enable_explicit<_U1, _U2>(), int> = 0
    >
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    explicit pair(_U1&& __u1, _U2&& __u2)
        _NOEXCEPT_((is_nothrow_constructible<first_type, _U1>::value &&
                    is_nothrow_constructible<second_type, _U2>::value))
        : first(std::forward<_U1>(__u1)), second(std::forward<_U2>(__u2)) {}

    template <
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23 // http://wg21.link/P1951
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
        class _U1 = _T1, class _U2 = _T2,
#else
# 214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
        class _U1, class _U2,
#endif
# 216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
        __enable_if_t<_CheckArgs::template __enable_implicit<_U1, _U2>(), int> = 0
    >
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    pair(_U1&& __u1, _U2&& __u2)
        _NOEXCEPT_((is_nothrow_constructible<first_type, _U1>::value &&
                    is_nothrow_constructible<second_type, _U2>::value))
        : first(std::forward<_U1>(__u1)), second(std::forward<_U2>(__u2)) {}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 225 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
    template<class _U1, class _U2, __enable_if_t<
            _CheckArgs::template __is_pair_constructible<_U1&, _U2&>()
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI constexpr
    explicit(!_CheckArgs::template __is_implicit<_U1&, _U2&>()) pair(pair<_U1, _U2>& __p)
        noexcept((is_nothrow_constructible<first_type, _U1&>::value &&
                  is_nothrow_constructible<second_type, _U2&>::value))
        : first(__p.first), second(__p.second) {}
#endif
# 234 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3

    template<class _U1, class _U2, __enable_if_t<_CheckArgs::template __enable_explicit<_U1 const&, _U2 const&>(), int> = 0>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    explicit pair(pair<_U1, _U2> const& __p)
        _NOEXCEPT_((is_nothrow_constructible<first_type, _U1 const&>::value &&
                    is_nothrow_constructible<second_type, _U2 const&>::value))
        : first(__p.first), second(__p.second) {}

    template<class _U1, class _U2, __enable_if_t<_CheckArgs::template __enable_implicit<_U1 const&, _U2 const&>(), int> = 0>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    pair(pair<_U1, _U2> const& __p)
        _NOEXCEPT_((is_nothrow_constructible<first_type, _U1 const&>::value &&
                    is_nothrow_constructible<second_type, _U2 const&>::value))
        : first(__p.first), second(__p.second) {}

    template<class _U1, class _U2, __enable_if_t<_CheckArgs::template __enable_explicit<_U1, _U2>(), int> = 0>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    explicit pair(pair<_U1, _U2>&&__p)
        _NOEXCEPT_((is_nothrow_constructible<first_type, _U1&&>::value &&
                    is_nothrow_constructible<second_type, _U2&&>::value))
        : first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) {}

    template<class _U1, class _U2, __enable_if_t<_CheckArgs::template __enable_implicit<_U1, _U2>(), int> = 0>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    pair(pair<_U1, _U2>&& __p)
        _NOEXCEPT_((is_nothrow_constructible<first_type, _U1&&>::value &&
                    is_nothrow_constructible<second_type, _U2&&>::value))
        : first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) {}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 264 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
    template<class _U1, class _U2, __enable_if_t<
            _CheckArgs::template __is_pair_constructible<const _U1&&, const _U2&&>()
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI constexpr
    explicit(!_CheckArgs::template __is_implicit<const _U1&&, const _U2&&>())
    pair(const pair<_U1, _U2>&& __p)
        noexcept(is_nothrow_constructible<first_type, const _U1&&>::value &&
                 is_nothrow_constructible<second_type, const _U2&&>::value)
        : first(std::move(__p.first)), second(std::move(__p.second)) {}
#endif
# 274 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 276 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
    // This is a workaround for http://llvm.org/PR60710. We should be able to remove it once Clang is fixed.
    template <class _PairLike>
    _LIBCPP_HIDE_FROM_ABI static constexpr bool __pair_like_explicit_wknd() {
        if constexpr (__pair_like<_PairLike>) {
            return !is_convertible_v<decltype(std::get<0>(std::declval<_PairLike&&>())), first_type> ||
                   !is_convertible_v<decltype(std::get<1>(std::declval<_PairLike&&>())), second_type>;
        }
        return false;
    }

    template <__pair_like _PairLike>
      requires(!__is_specialization_of_subrange<remove_cvref_t<_PairLike>>::value &&
               is_constructible_v<first_type, decltype(std::get<0>(std::declval<_PairLike&&>()))> &&
               is_constructible_v<second_type, decltype(std::get<1>(std::declval<_PairLike&&>()))>)
    _LIBCPP_HIDE_FROM_ABI constexpr explicit(__pair_like_explicit_wknd<_PairLike>())
        pair(_PairLike&& __p)
        : first(std::get<0>(std::forward<_PairLike>(__p))), second(std::get<1>(std::forward<_PairLike>(__p))) {}
#  endif
# 294 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3

    template <class... _Args1, class... _Args2>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    pair(piecewise_construct_t __pc,
         tuple<_Args1...> __first_args, tuple<_Args2...> __second_args)
        _NOEXCEPT_((is_nothrow_constructible<first_type, _Args1...>::value &&
                    is_nothrow_constructible<second_type, _Args2...>::value))
        : pair(__pc, __first_args, __second_args,
                typename __make_tuple_indices<sizeof...(_Args1)>::type(),
                typename __make_tuple_indices<sizeof...(_Args2) >::type()) {}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    pair& operator=(__conditional_t<
                        is_copy_assignable<first_type>::value &&
                        is_copy_assignable<second_type>::value,
                    pair, __nat> const& __p)
        _NOEXCEPT_(is_nothrow_copy_assignable<first_type>::value &&
                   is_nothrow_copy_assignable<second_type>::value)
    {
        first = __p.first;
        second = __p.second;
        return *this;
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    pair& operator=(__conditional_t<
                        is_move_assignable<first_type>::value &&
                        is_move_assignable<second_type>::value,
                    pair, __nat>&& __p)
        _NOEXCEPT_(is_nothrow_move_assignable<first_type>::value &&
                   is_nothrow_move_assignable<second_type>::value)
    {
        first = std::forward<first_type>(__p.first);
        second = std::forward<second_type>(__p.second);
        return *this;
    }

    template <class _U1, class _U2, __enable_if_t<
        is_assignable<first_type&, _U1 const&>::value &&
        is_assignable<second_type&, _U2 const&>::value
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    pair& operator=(pair<_U1, _U2> const& __p) {
        first = __p.first;
        second = __p.second;
        return *this;
    }

    template <class _U1, class _U2, __enable_if_t<
        is_assignable<first_type&, _U1>::value &&
        is_assignable<second_type&, _U2>::value
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    pair& operator=(pair<_U1, _U2>&& __p) {
        first = std::forward<_U1>(__p.first);
        second = std::forward<_U2>(__p.second);
        return *this;
    }

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 354 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
    _LIBCPP_HIDE_FROM_ABI constexpr
    const pair& operator=(pair const& __p) const
      noexcept(is_nothrow_copy_assignable_v<const first_type> &&
               is_nothrow_copy_assignable_v<const second_type>)
      requires(is_copy_assignable_v<const first_type> &&
               is_copy_assignable_v<const second_type>) {
        first = __p.first;
        second = __p.second;
        return *this;
    }

    _LIBCPP_HIDE_FROM_ABI constexpr
    const pair& operator=(pair&& __p) const
      noexcept(is_nothrow_assignable_v<const first_type&, first_type> &&
               is_nothrow_assignable_v<const second_type&, second_type>)
      requires(is_assignable_v<const first_type&, first_type> &&
               is_assignable_v<const second_type&, second_type>) {
        first = std::forward<first_type>(__p.first);
        second = std::forward<second_type>(__p.second);
        return *this;
    }

    template<class _U1, class _U2>
    _LIBCPP_HIDE_FROM_ABI constexpr
    const pair& operator=(const pair<_U1, _U2>& __p) const
      requires(is_assignable_v<const first_type&, const _U1&> &&
               is_assignable_v<const second_type&, const _U2&>) {
        first = __p.first;
        second = __p.second;
        return *this;
    }

    template<class _U1, class _U2>
    _LIBCPP_HIDE_FROM_ABI constexpr
    const pair& operator=(pair<_U1, _U2>&& __p) const
      requires(is_assignable_v<const first_type&, _U1> &&
               is_assignable_v<const second_type&, _U2>) {
        first = std::forward<_U1>(__p.first);
        second = std::forward<_U2>(__p.second);
        return *this;
    }

    template <__pair_like _PairLike>
      requires(__different_from<_PairLike, pair> &&
               !__is_specialization_of_subrange<remove_cvref_t<_PairLike>>::value &&
               is_assignable_v<first_type&, decltype(std::get<0>(std::declval<_PairLike>()))> &&
               is_assignable_v<second_type&, decltype(std::get<1>(std::declval<_PairLike>()))>)
    _LIBCPP_HIDE_FROM_ABI constexpr pair& operator=(_PairLike&& __p) {
        first  = std::get<0>(std::forward<_PairLike>(__p));
        second = std::get<1>(std::forward<_PairLike>(__p));
        return *this;
    }

    template <__pair_like _PairLike>
      requires(__different_from<_PairLike, pair> &&
               !__is_specialization_of_subrange<remove_cvref_t<_PairLike>>::value &&
               is_assignable_v<first_type const&, decltype(std::get<0>(std::declval<_PairLike>()))> &&
               is_assignable_v<second_type const&, decltype(std::get<1>(std::declval<_PairLike>()))>)
    _LIBCPP_HIDE_FROM_ABI constexpr pair const& operator=(_PairLike&& __p) const {
        first  = std::get<0>(std::forward<_PairLike>(__p));
        second = std::get<1>(std::forward<_PairLike>(__p));
        return *this;
    }
#  endif // _LIBCPP_STD_VER >= 23
# 418 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3

    // Prior to C++23, we provide an approximation of constructors and assignment operators from
    // pair-like types. This was historically provided as an extension.
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER < 23
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 422 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
    // from std::tuple
    template<class _U1, class _U2, __enable_if_t<
        is_convertible<_U1 const&, _T1>::value &&
        is_convertible<_U2 const&, _T2>::value
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    pair(tuple<_U1, _U2> const& __p)
        : first(std::get<0>(__p)),
          second(std::get<1>(__p)) {}

    template<class _U1, class _U2, __enable_if_t<
        is_constructible<_T1, _U1 const&>::value &&
        is_constructible<_T2, _U2 const&>::value &&
        !(is_convertible<_U1 const&, _T1>::value &&
          is_convertible<_U2 const&, _T2>::value)
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    explicit
    pair(tuple<_U1, _U2> const& __p)
        : first(std::get<0>(__p)),
          second(std::get<1>(__p)) {}

    template<class _U1, class _U2, __enable_if_t<
        is_convertible<_U1, _T1>::value &&
        is_convertible<_U2, _T2>::value
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    pair(tuple<_U1, _U2>&& __p)
        : first(std::get<0>(std::move(__p))),
          second(std::get<1>(std::move(__p))) {}

    template<class _U1, class _U2, __enable_if_t<
        is_constructible<_T1, _U1>::value &&
        is_constructible<_T2, _U2>::value &&
        !(is_convertible<_U1, _T1>::value &&
          is_convertible<_U2, _T2>::value)
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    explicit
    pair(tuple<_U1, _U2>&& __p)
        : first(std::get<0>(std::move(__p))),
          second(std::get<1>(std::move(__p))) {}


    template<class _U1, class _U2, __enable_if_t<
        is_assignable<_T1&, _U1 const&>::value &&
        is_assignable<_T2&, _U2 const&>::value
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    pair& operator=(tuple<_U1, _U2> const& __p) {
        first = std::get<0>(__p);
        second = std::get<1>(__p);
        return *this;
    }

    template<class _U1, class _U2, __enable_if_t<
        is_assignable<_T1&, _U1&&>::value &&
        is_assignable<_T2&, _U2&&>::value
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    pair& operator=(tuple<_U1, _U2>&& __p) {
        first = std::get<0>(std::move(__p));
        second = std::get<1>(std::move(__p));
        return *this;
    }

    // from std::array
    template<class _Up, __enable_if_t<
        is_convertible<_Up const&, _T1>::value &&
        is_convertible<_Up const&, _T2>::value
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    pair(array<_Up, 2> const& __p)
        : first(__p[0]),
          second(__p[1]) {}

    template<class _Up, __enable_if_t<
        is_constructible<_T1, _Up const&>::value &&
        is_constructible<_T2, _Up const&>::value &&
        !(is_convertible<_Up const&, _T1>::value &&
          is_convertible<_Up const&, _T2>::value)
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    explicit
    pair(array<_Up, 2> const& __p)
        : first(__p[0]),
          second(__p[1]) {}

    template<class _Up, __enable_if_t<
        is_convertible<_Up, _T1>::value &&
        is_convertible<_Up, _T2>::value
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    pair(array<_Up, 2>&& __p)
        : first(std::move(__p)[0]),
          second(std::move(__p)[1]) {}

    template<class _Up, __enable_if_t<
        is_constructible<_T1, _Up>::value &&
        is_constructible<_T2, _Up>::value &&
        !(is_convertible<_Up, _T1>::value &&
          is_convertible<_Up, _T2>::value)
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    explicit
    pair(array<_Up, 2>&& __p)
        : first(std::move(__p)[0]),
          second(std::move(__p)[1]) {}


    template<class _Up, __enable_if_t<
        is_assignable<_T1&, _Up const&>::value &&
        is_assignable<_T2&, _Up const&>::value
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    pair& operator=(array<_Up, 2> const& __p) {
        first = std::get<0>(__p);
        second = std::get<1>(__p);
        return *this;
    }

    template<class _Up, __enable_if_t<
        is_assignable<_T1&, _Up>::value &&
        is_assignable<_T2&, _Up>::value
    >* = nullptr>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    pair& operator=(array<_Up, 2>&& __p) {
        first = std::get<0>(std::move(__p));
        second = std::get<1>(std::move(__p));
        return *this;
    }
#endif // _LIBCPP_STD_VER < 23
# 554 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#endif // _LIBCPP_CXX03_LANG
# 555 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void
    swap(pair& __p) _NOEXCEPT_(__is_nothrow_swappable<first_type>::value &&
                               __is_nothrow_swappable<second_type>::value)
    {
        using std::swap;
        swap(first,  __p.first);
        swap(second, __p.second);
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 567 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
    _LIBCPP_HIDE_FROM_ABI constexpr
    void swap(const pair& __p) const
        noexcept(__is_nothrow_swappable<const first_type>::value &&
                 __is_nothrow_swappable<const second_type>::value)
    {
        using std::swap;
        swap(first,  __p.first);
        swap(second, __p.second);
    }
#endif
# 577 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
private:

#ifndef _LIBCPP_CXX03_LANG
    template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    pair(piecewise_construct_t,
         tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args,
         __tuple_indices<_I1...>, __tuple_indices<_I2...>);
#endif
# 586 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 589 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
template<class _T1, class _T2>
pair(_T1, _T2) -> pair<_T1, _T2>;
#endif
# 592 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3

// [pairs.spec], specialized algorithms

template <class _T1, class _T2, class _U1, class _U2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator==(const pair<_T1,_T2>& __x, const pair<_U1,_U2>& __y)
{
    return __x.first == __y.first && __x.second == __y.second;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 604 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3

template <class _T1, class _T2, class _U1, class _U2>
_LIBCPP_HIDE_FROM_ABI constexpr
common_comparison_category_t<
        __synth_three_way_result<_T1, _U1>,
        __synth_three_way_result<_T2, _U2> >
operator<=>(const pair<_T1,_T2>& __x, const pair<_U1,_U2>& __y)
{
    if (auto __c = std::__synth_three_way(__x.first, __y.first); __c != 0) {
      return __c;
    }
    return std::__synth_three_way(__x.second, __y.second);
}

#else // _LIBCPP_STD_VER >= 20
# 619 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3

template <class _T1, class _T2, class _U1, class _U2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator!=(const pair<_T1,_T2>& __x, const pair<_U1,_U2>& __y)
{
    return !(__x == __y);
}

template <class _T1, class _T2, class _U1, class _U2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator< (const pair<_T1,_T2>& __x, const pair<_U1,_U2>& __y)
{
    return __x.first < __y.first || (!(__y.first < __x.first) && __x.second < __y.second);
}

template <class _T1, class _T2, class _U1, class _U2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator> (const pair<_T1,_T2>& __x, const pair<_U1,_U2>& __y)
{
    return __y < __x;
}

template <class _T1, class _T2, class _U1, class _U2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator>=(const pair<_T1,_T2>& __x, const pair<_U1,_U2>& __y)
{
    return !(__x < __y);
}

template <class _T1, class _T2, class _U1, class _U2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator<=(const pair<_T1,_T2>& __x, const pair<_U1,_U2>& __y)
{
    return !(__y < __x);
}

#endif // _LIBCPP_STD_VER >= 20
# 661 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 663 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
template <class _T1, class _T2, class _U1, class _U2, template<class> class _TQual, template<class> class _UQual>
    requires requires { typename pair<common_reference_t<_TQual<_T1>, _UQual<_U1>>,
                                      common_reference_t<_TQual<_T2>, _UQual<_U2>>>; }
struct basic_common_reference<pair<_T1, _T2>, pair<_U1, _U2>, _TQual, _UQual> {
    using type = pair<common_reference_t<_TQual<_T1>, _UQual<_U1>>,
                      common_reference_t<_TQual<_T2>, _UQual<_U2>>>;
};

template <class _T1, class _T2, class _U1, class _U2>
    requires requires { typename pair<common_type_t<_T1, _U1>, common_type_t<_T2, _U2>>; }
struct common_type<pair<_T1, _T2>, pair<_U1, _U2>> {
    using type = pair<common_type_t<_T1, _U1>, common_type_t<_T2, _U2>>;
};
#endif // _LIBCPP_STD_VER >= 23
# 677 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3

template <class _T1, class _T2, __enable_if_t<__is_swappable<_T1>::value && __is_swappable<_T2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void
swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
                     _NOEXCEPT_((__is_nothrow_swappable<_T1>::value &&
                                 __is_nothrow_swappable<_T2>::value))
{
    __x.swap(__y);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 689 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
template <class _T1, class _T2>
  requires (__is_swappable<const _T1>::value &&
            __is_swappable<const _T2>::value)
_LIBCPP_HIDE_FROM_ABI constexpr
void swap(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
    noexcept(noexcept(__x.swap(__y)))
{
    __x.swap(__y);
}
#endif
# 699 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3

template <class _T1, class _T2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>
make_pair(_T1&& __t1, _T2&& __t2)
{
    return pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>
               (std::forward<_T1>(__t1), std::forward<_T2>(__t2));
}

template <class _T1, class _T2>
  struct _LIBCPP_TEMPLATE_VIS tuple_size<pair<_T1, _T2> >
    : public integral_constant<size_t, 2> {};

template <size_t _Ip, class _T1, class _T2>
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, pair<_T1, _T2> >
{
    static_assert(_Ip < 2, "Index out of bounds in std::tuple_element<std::pair<T1, T2>>");
};

template <class _T1, class _T2>
struct _LIBCPP_TEMPLATE_VIS tuple_element<0, pair<_T1, _T2> >
{
    using type _LIBCPP_NODEBUG = _T1;
};

template <class _T1, class _T2>
struct _LIBCPP_TEMPLATE_VIS tuple_element<1, pair<_T1, _T2> >
{
    using type _LIBCPP_NODEBUG = _T2;
};

template <size_t _Ip> struct __get_pair;

template <>
struct __get_pair<0>
{
    template <class _T1, class _T2>
    static
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    _T1&
    get(pair<_T1, _T2>& __p) _NOEXCEPT {return __p.first;}

    template <class _T1, class _T2>
    static
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    const _T1&
    get(const pair<_T1, _T2>& __p) _NOEXCEPT {return __p.first;}

    template <class _T1, class _T2>
    static
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    _T1&&
    get(pair<_T1, _T2>&& __p) _NOEXCEPT {return std::forward<_T1>(__p.first);}

    template <class _T1, class _T2>
    static
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    const _T1&&
    get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return std::forward<const _T1>(__p.first);}
};

template <>
struct __get_pair<1>
{
    template <class _T1, class _T2>
    static
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    _T2&
    get(pair<_T1, _T2>& __p) _NOEXCEPT {return __p.second;}

    template <class _T1, class _T2>
    static
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    const _T2&
    get(const pair<_T1, _T2>& __p) _NOEXCEPT {return __p.second;}

    template <class _T1, class _T2>
    static
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    _T2&&
    get(pair<_T1, _T2>&& __p) _NOEXCEPT {return std::forward<_T2>(__p.second);}

    template <class _T1, class _T2>
    static
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    const _T2&&
    get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return std::forward<const _T2>(__p.second);}
};

template <size_t _Ip, class _T1, class _T2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Ip, pair<_T1, _T2> >::type&
get(pair<_T1, _T2>& __p) _NOEXCEPT
{
    return __get_pair<_Ip>::get(__p);
}

template <size_t _Ip, class _T1, class _T2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element<_Ip, pair<_T1, _T2> >::type&
get(const pair<_T1, _T2>& __p) _NOEXCEPT
{
    return __get_pair<_Ip>::get(__p);
}

template <size_t _Ip, class _T1, class _T2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
get(pair<_T1, _T2>&& __p) _NOEXCEPT
{
    return __get_pair<_Ip>::get(std::move(__p));
}

template <size_t _Ip, class _T1, class _T2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
get(const pair<_T1, _T2>&& __p) _NOEXCEPT
{
    return __get_pair<_Ip>::get(std::move(__p));
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 822 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
template <class _T1, class _T2>
inline _LIBCPP_HIDE_FROM_ABI
constexpr _T1 & get(pair<_T1, _T2>& __p) _NOEXCEPT
{
    return __get_pair<0>::get(__p);
}

template <class _T1, class _T2>
inline _LIBCPP_HIDE_FROM_ABI
constexpr _T1 const & get(pair<_T1, _T2> const& __p) _NOEXCEPT
{
    return __get_pair<0>::get(__p);
}

template <class _T1, class _T2>
inline _LIBCPP_HIDE_FROM_ABI
constexpr _T1 && get(pair<_T1, _T2>&& __p) _NOEXCEPT
{
    return __get_pair<0>::get(std::move(__p));
}

template <class _T1, class _T2>
inline _LIBCPP_HIDE_FROM_ABI
constexpr _T1 const && get(pair<_T1, _T2> const&& __p) _NOEXCEPT
{
    return __get_pair<0>::get(std::move(__p));
}

template <class _T1, class _T2>
inline _LIBCPP_HIDE_FROM_ABI
constexpr _T1 & get(pair<_T2, _T1>& __p) _NOEXCEPT
{
    return __get_pair<1>::get(__p);
}

template <class _T1, class _T2>
inline _LIBCPP_HIDE_FROM_ABI
constexpr _T1 const & get(pair<_T2, _T1> const& __p) _NOEXCEPT
{
    return __get_pair<1>::get(__p);
}

template <class _T1, class _T2>
inline _LIBCPP_HIDE_FROM_ABI
constexpr _T1 && get(pair<_T2, _T1>&& __p) _NOEXCEPT
{
    return __get_pair<1>::get(std::move(__p));
}

template <class _T1, class _T2>
inline _LIBCPP_HIDE_FROM_ABI
constexpr _T1 const && get(pair<_T2, _T1> const&& __p) _NOEXCEPT
{
    return __get_pair<1>::get(std::move(__p));
}

#endif // _LIBCPP_STD_VER >= 14
# 879 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___UTILITY_PAIR_H
# 885 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/pair.h" 3
#endif /* pair.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cstdint expanded by -frewrite-includes */
#include <cstdint>
#else /* cstdint expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdint" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CSTDINT
#define _LIBCPP_CSTDINT

/*
    cstdint synopsis

Macros:

    INT8_MIN
    INT16_MIN
    INT32_MIN
    INT64_MIN

    INT8_MAX
    INT16_MAX
    INT32_MAX
    INT64_MAX

    UINT8_MAX
    UINT16_MAX
    UINT32_MAX
    UINT64_MAX

    INT_LEAST8_MIN
    INT_LEAST16_MIN
    INT_LEAST32_MIN
    INT_LEAST64_MIN

    INT_LEAST8_MAX
    INT_LEAST16_MAX
    INT_LEAST32_MAX
    INT_LEAST64_MAX

    UINT_LEAST8_MAX
    UINT_LEAST16_MAX
    UINT_LEAST32_MAX
    UINT_LEAST64_MAX

    INT_FAST8_MIN
    INT_FAST16_MIN
    INT_FAST32_MIN
    INT_FAST64_MIN

    INT_FAST8_MAX
    INT_FAST16_MAX
    INT_FAST32_MAX
    INT_FAST64_MAX

    UINT_FAST8_MAX
    UINT_FAST16_MAX
    UINT_FAST32_MAX
    UINT_FAST64_MAX

    INTPTR_MIN
    INTPTR_MAX
    UINTPTR_MAX

    INTMAX_MIN
    INTMAX_MAX

    UINTMAX_MAX

    PTRDIFF_MIN
    PTRDIFF_MAX

    SIG_ATOMIC_MIN
    SIG_ATOMIC_MAX

    SIZE_MAX

    WCHAR_MIN
    WCHAR_MAX

    WINT_MIN
    WINT_MAX

    INT8_C(value)
    INT16_C(value)
    INT32_C(value)
    INT64_C(value)

    UINT8_C(value)
    UINT16_C(value)
    UINT32_C(value)
    UINT64_C(value)

    INTMAX_C(value)
    UINTMAX_C(value)

namespace std
{

Types:

    int8_t
    int16_t
    int32_t
    int64_t

    uint8_t
    uint16_t
    uint32_t
    uint64_t

    int_least8_t
    int_least16_t
    int_least32_t
    int_least64_t

    uint_least8_t
    uint_least16_t
    uint_least32_t
    uint_least64_t

    int_fast8_t
    int_fast16_t
    int_fast32_t
    int_fast64_t

    uint_fast8_t
    uint_fast16_t
    uint_fast32_t
    uint_fast64_t

    intptr_t
    uintptr_t

    intmax_t
    uintmax_t

}  // std
*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 143 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdint" 3
# 144 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdint" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 144 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdint" 3
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdint" 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdint.h expanded by -frewrite-includes */
#include <stdint.h>
#else /* stdint.h expanded by -frewrite-includes */
# 146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdint" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_STDINT_H
// AIX system headers need stdint.h to be re-enterable while _STD_TYPES_T
// is defined until an inclusion of it without _STD_TYPES_T occurs, in which
// case the header guard macro is defined.
#if 0 /* disabled by -frewrite-includes */
#if !defined(_AIX) || !defined(_STD_TYPES_T)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 3
#define _LIBCPP_STDINT_H
#endif // _STD_TYPES_T
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 3

/*
    stdint.h synopsis

Macros:

    INT8_MIN
    INT16_MIN
    INT32_MIN
    INT64_MIN

    INT8_MAX
    INT16_MAX
    INT32_MAX
    INT64_MAX

    UINT8_MAX
    UINT16_MAX
    UINT32_MAX
    UINT64_MAX

    INT_LEAST8_MIN
    INT_LEAST16_MIN
    INT_LEAST32_MIN
    INT_LEAST64_MIN

    INT_LEAST8_MAX
    INT_LEAST16_MAX
    INT_LEAST32_MAX
    INT_LEAST64_MAX

    UINT_LEAST8_MAX
    UINT_LEAST16_MAX
    UINT_LEAST32_MAX
    UINT_LEAST64_MAX

    INT_FAST8_MIN
    INT_FAST16_MIN
    INT_FAST32_MIN
    INT_FAST64_MIN

    INT_FAST8_MAX
    INT_FAST16_MAX
    INT_FAST32_MAX
    INT_FAST64_MAX

    UINT_FAST8_MAX
    UINT_FAST16_MAX
    UINT_FAST32_MAX
    UINT_FAST64_MAX

    INTPTR_MIN
    INTPTR_MAX
    UINTPTR_MAX

    INTMAX_MIN
    INTMAX_MAX

    UINTMAX_MAX

    PTRDIFF_MIN
    PTRDIFF_MAX

    SIG_ATOMIC_MIN
    SIG_ATOMIC_MAX

    SIZE_MAX

    WCHAR_MIN
    WCHAR_MAX

    WINT_MIN
    WINT_MAX

    INT8_C(value)
    INT16_C(value)
    INT32_C(value)
    INT64_C(value)

    UINT8_C(value)
    UINT16_C(value)
    UINT32_C(value)
    UINT64_C(value)

    INTMAX_C(value)
    UINTMAX_C(value)

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 3
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 3
#endif
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 3

/* C99 stdlib (e.g. glibc < 2.18) does not provide macros needed
   for C++11 unless __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS
   are defined
*/
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__STDC_LIMIT_MACROS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 3
#   define __STDC_LIMIT_MACROS
#endif
# 119 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 3
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 3
#   define __STDC_CONSTANT_MACROS
#endif
# 122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 3

#if 0 /* disabled by -frewrite-includes */
#if __has_include_next(<stdint.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdint.h expanded by -frewrite-includes */
#  include_next <stdint.h>
#else /* stdint.h expanded by -frewrite-includes */
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 1 3
/*===---- stdint.h - Standard header for sized integer types --------------===*\
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
\*===----------------------------------------------------------------------===*/

#ifndef __CLANG_STDINT_H
// AIX system headers need stdint.h to be re-enterable while _STD_TYPES_T
// is defined until an inclusion of it without _STD_TYPES_T occurs, in which
// case the header guard macro is defined.
#if 0 /* disabled by -frewrite-includes */
#if !defined(_AIX) || !defined(_STD_TYPES_T) || !defined(__STDC_HOSTED__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#define __CLANG_STDINT_H
#endif
# 16 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

/* If we're hosted, fall back to the system's stdint.h, which might have
 * additional definitions.
 */
#if 0 /* disabled by -frewrite-includes */
#if __STDC_HOSTED__ && __has_include_next(<stdint.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

// C99 7.18.3 Limits of other integer types
//
//  Footnote 219, 220: C++ implementations should define these macros only when
//  __STDC_LIMIT_MACROS is defined before <stdint.h> is included.
//
//  Footnote 222: C++ implementations should define these macros only when
//  __STDC_CONSTANT_MACROS is defined before <stdint.h> is included.
//
// C++11 [cstdint.syn]p2:
//
//  The macros defined by <cstdint> are provided unconditionally. In particular,
//  the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in
//  footnotes 219, 220, and 222 in the C standard) play no role in C++.
//
// C11 removed the problematic footnotes.
//
// Work around this inconsistency by always defining those macros in C++ mode,
// so that a C library implementation which follows the C99 standard can be
// used in C++.
# ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#  if !defined(__STDC_LIMIT_MACROS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#   define __STDC_LIMIT_MACROS
#   define __STDC_LIMIT_MACROS_DEFINED_BY_CLANG
#  endif
# 46 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#if 0 /* disabled by -frewrite-includes */
#  if !defined(__STDC_CONSTANT_MACROS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#   define __STDC_CONSTANT_MACROS
#   define __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG
#  endif
# 50 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
# endif
# 51 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#if 0 /* expanded by -frewrite-includes */
# include_next <stdint.h>
#endif /* expanded by -frewrite-includes */
# 52 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
# 53 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

# ifdef __STDC_LIMIT_MACROS_DEFINED_BY_CLANG
#  undef __STDC_LIMIT_MACROS
#  undef __STDC_LIMIT_MACROS_DEFINED_BY_CLANG
# endif
# 58 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
# ifdef __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG
#  undef __STDC_CONSTANT_MACROS
#  undef __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG
# endif
# 62 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#else
# 64 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

/* C99 7.18.1.1 Exact-width integer types.
 * C99 7.18.1.2 Minimum-width integer types.
 * C99 7.18.1.3 Fastest minimum-width integer types.
 *
 * The standard requires that exact-width type be defined for 8-, 16-, 32-, and
 * 64-bit types if they are implemented. Other exact width types are optional.
 * This implementation defines an exact-width types for every integer width
 * that is represented in the standard integer types.
 *
 * The standard also requires minimum-width types be defined for 8-, 16-, 32-,
 * and 64-bit widths regardless of whether there are corresponding exact-width
 * types.
 *
 * To accommodate targets that are missing types that are exactly 8, 16, 32, or
 * 64 bits wide, this implementation takes an approach of cascading
 * redefinitions, redefining __int_leastN_t to successively smaller exact-width
 * types. It is therefore important that the types are defined in order of
 * descending widths.
 *
 * We currently assume that the minimum-width types and the fastest
 * minimum-width types are the same. This is allowed by the standard, but is
 * suboptimal.
 *
 * In violation of the standard, some targets do not implement a type that is
 * wide enough to represent all of the required widths (8-, 16-, 32-, 64-bit).
 * To accommodate these targets, a required minimum-width type is only
 * defined if there exists an exact-width type of equal or greater width.
 */

#ifdef __INT64_TYPE__
# ifndef __int8_t_defined /* glibc sys/types.h also defines int64_t*/
typedef __INT64_TYPE__ int64_t;
# endif /* __int8_t_defined */
# 98 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
typedef __UINT64_TYPE__ uint64_t;
# undef __int_least64_t
# define __int_least64_t int64_t
# undef __uint_least64_t
# define __uint_least64_t uint64_t
# undef __int_least32_t
# define __int_least32_t int64_t
# undef __uint_least32_t
# define __uint_least32_t uint64_t
# undef __int_least16_t
# define __int_least16_t int64_t
# undef __uint_least16_t
# define __uint_least16_t uint64_t
# undef __int_least8_t
# define __int_least8_t int64_t
# undef __uint_least8_t
# define __uint_least8_t uint64_t
#endif /* __INT64_TYPE__ */
# 116 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifdef __int_least64_t
typedef __int_least64_t int_least64_t;
typedef __uint_least64_t uint_least64_t;
typedef __int_least64_t int_fast64_t;
typedef __uint_least64_t uint_fast64_t;
#endif /* __int_least64_t */
# 123 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifdef __INT56_TYPE__
typedef __INT56_TYPE__ int56_t;
typedef __UINT56_TYPE__ uint56_t;
typedef int56_t int_least56_t;
typedef uint56_t uint_least56_t;
typedef int56_t int_fast56_t;
typedef uint56_t uint_fast56_t;
# undef __int_least32_t
# define __int_least32_t int56_t
# undef __uint_least32_t
# define __uint_least32_t uint56_t
# undef __int_least16_t
# define __int_least16_t int56_t
# undef __uint_least16_t
# define __uint_least16_t uint56_t
# undef __int_least8_t
# define __int_least8_t int56_t
# undef __uint_least8_t
# define __uint_least8_t uint56_t
#endif /* __INT56_TYPE__ */
# 144 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT48_TYPE__
typedef __INT48_TYPE__ int48_t;
typedef __UINT48_TYPE__ uint48_t;
typedef int48_t int_least48_t;
typedef uint48_t uint_least48_t;
typedef int48_t int_fast48_t;
typedef uint48_t uint_fast48_t;
# undef __int_least32_t
# define __int_least32_t int48_t
# undef __uint_least32_t
# define __uint_least32_t uint48_t
# undef __int_least16_t
# define __int_least16_t int48_t
# undef __uint_least16_t
# define __uint_least16_t uint48_t
# undef __int_least8_t
# define __int_least8_t int48_t
# undef __uint_least8_t
# define __uint_least8_t uint48_t
#endif /* __INT48_TYPE__ */
# 166 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT40_TYPE__
typedef __INT40_TYPE__ int40_t;
typedef __UINT40_TYPE__ uint40_t;
typedef int40_t int_least40_t;
typedef uint40_t uint_least40_t;
typedef int40_t int_fast40_t;
typedef uint40_t uint_fast40_t;
# undef __int_least32_t
# define __int_least32_t int40_t
# undef __uint_least32_t
# define __uint_least32_t uint40_t
# undef __int_least16_t
# define __int_least16_t int40_t
# undef __uint_least16_t
# define __uint_least16_t uint40_t
# undef __int_least8_t
# define __int_least8_t int40_t
# undef __uint_least8_t
# define __uint_least8_t uint40_t
#endif /* __INT40_TYPE__ */
# 188 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT32_TYPE__

# ifndef __int8_t_defined /* glibc sys/types.h also defines int32_t*/
typedef __INT32_TYPE__ int32_t;
# endif /* __int8_t_defined */
# 195 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

# ifndef __uint32_t_defined  /* more glibc compatibility */
# define __uint32_t_defined
typedef __UINT32_TYPE__ uint32_t;
# endif /* __uint32_t_defined */
# 200 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

# undef __int_least32_t
# define __int_least32_t int32_t
# undef __uint_least32_t
# define __uint_least32_t uint32_t
# undef __int_least16_t
# define __int_least16_t int32_t
# undef __uint_least16_t
# define __uint_least16_t uint32_t
# undef __int_least8_t
# define __int_least8_t int32_t
# undef __uint_least8_t
# define __uint_least8_t uint32_t
#endif /* __INT32_TYPE__ */
# 214 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifdef __int_least32_t
typedef __int_least32_t int_least32_t;
typedef __uint_least32_t uint_least32_t;
typedef __int_least32_t int_fast32_t;
typedef __uint_least32_t uint_fast32_t;
#endif /* __int_least32_t */
# 221 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifdef __INT24_TYPE__
typedef __INT24_TYPE__ int24_t;
typedef __UINT24_TYPE__ uint24_t;
typedef int24_t int_least24_t;
typedef uint24_t uint_least24_t;
typedef int24_t int_fast24_t;
typedef uint24_t uint_fast24_t;
# undef __int_least16_t
# define __int_least16_t int24_t
# undef __uint_least16_t
# define __uint_least16_t uint24_t
# undef __int_least8_t
# define __int_least8_t int24_t
# undef __uint_least8_t
# define __uint_least8_t uint24_t
#endif /* __INT24_TYPE__ */
# 238 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifdef __INT16_TYPE__
#ifndef __int8_t_defined /* glibc sys/types.h also defines int16_t*/
typedef __INT16_TYPE__ int16_t;
#endif /* __int8_t_defined */
# 243 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
typedef __UINT16_TYPE__ uint16_t;
# undef __int_least16_t
# define __int_least16_t int16_t
# undef __uint_least16_t
# define __uint_least16_t uint16_t
# undef __int_least8_t
# define __int_least8_t int16_t
# undef __uint_least8_t
# define __uint_least8_t uint16_t
#endif /* __INT16_TYPE__ */
# 253 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifdef __int_least16_t
typedef __int_least16_t int_least16_t;
typedef __uint_least16_t uint_least16_t;
typedef __int_least16_t int_fast16_t;
typedef __uint_least16_t uint_fast16_t;
#endif /* __int_least16_t */
# 260 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT8_TYPE__
#ifndef __int8_t_defined  /* glibc sys/types.h also defines int8_t*/
typedef __INT8_TYPE__ int8_t;
#endif /* __int8_t_defined */
# 266 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
typedef __UINT8_TYPE__ uint8_t;
# undef __int_least8_t
# define __int_least8_t int8_t
# undef __uint_least8_t
# define __uint_least8_t uint8_t
#endif /* __INT8_TYPE__ */
# 272 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifdef __int_least8_t
typedef __int_least8_t int_least8_t;
typedef __uint_least8_t uint_least8_t;
typedef __int_least8_t int_fast8_t;
typedef __uint_least8_t uint_fast8_t;
#endif /* __int_least8_t */
# 279 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

/* prevent glibc sys/types.h from defining conflicting types */
#ifndef __int8_t_defined
# define __int8_t_defined
#endif /* __int8_t_defined */
# 284 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

/* C99 7.18.1.4 Integer types capable of holding object pointers.
 */
#define __stdint_join3(a,b,c) a ## b ## c

#ifndef _INTPTR_T
#ifndef __intptr_t_defined
typedef __INTPTR_TYPE__ intptr_t;
#define __intptr_t_defined
#define _INTPTR_T
#endif
# 295 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif
# 296 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifndef _UINTPTR_T
typedef __UINTPTR_TYPE__ uintptr_t;
#define _UINTPTR_T
#endif
# 301 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

/* C99 7.18.1.5 Greatest-width integer types.
 */
typedef __INTMAX_TYPE__  intmax_t;
typedef __UINTMAX_TYPE__ uintmax_t;

/* C99 7.18.4 Macros for minimum-width integer constants.
 *
 * The standard requires that integer constant macros be defined for all the
 * minimum-width types defined above. As 8-, 16-, 32-, and 64-bit minimum-width
 * types are required, the corresponding integer constant macros are defined
 * here. This implementation also defines minimum-width types for every other
 * integer width that the target implements, so corresponding macros are
 * defined below, too.
 *
 * These macros are defined using the same successive-shrinking approach as
 * the type definitions above. It is likewise important that macros are defined
 * in order of decending width.
 *
 * Note that C++ should not check __STDC_CONSTANT_MACROS here, contrary to the
 * claims of the C standard (see C++ 18.3.1p2, [cstdint.syn]).
 */

#define __int_c_join(a, b) a ## b
#define __int_c(v, suffix) __int_c_join(v, suffix)
#define __uint_c(v, suffix) __int_c_join(v##U, suffix)


#ifdef __INT64_TYPE__
# undef __int64_c_suffix
# undef __int32_c_suffix
# undef __int16_c_suffix
# undef  __int8_c_suffix
# ifdef __INT64_C_SUFFIX__
#  define __int64_c_suffix __INT64_C_SUFFIX__
#  define __int32_c_suffix __INT64_C_SUFFIX__
#  define __int16_c_suffix __INT64_C_SUFFIX__
#  define  __int8_c_suffix __INT64_C_SUFFIX__
# endif /* __INT64_C_SUFFIX__ */
# 340 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT64_TYPE__ */
# 341 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifdef __int_least64_t
# ifdef __int64_c_suffix
#  define INT64_C(v) __int_c(v, __int64_c_suffix)
#  define UINT64_C(v) __uint_c(v, __int64_c_suffix)
# else
# 347 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#  define INT64_C(v) v
#  define UINT64_C(v) v ## U
# endif /* __int64_c_suffix */
# 350 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __int_least64_t */
# 351 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT56_TYPE__
# undef __int32_c_suffix
# undef __int16_c_suffix
# undef  __int8_c_suffix
# ifdef __INT56_C_SUFFIX__
#  define INT56_C(v) __int_c(v, __INT56_C_SUFFIX__)
#  define UINT56_C(v) __uint_c(v, __INT56_C_SUFFIX__)
#  define __int32_c_suffix __INT56_C_SUFFIX__
#  define __int16_c_suffix __INT56_C_SUFFIX__
#  define __int8_c_suffix  __INT56_C_SUFFIX__
# else
# 364 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#  define INT56_C(v) v
#  define UINT56_C(v) v ## U
# endif /* __INT56_C_SUFFIX__ */
# 367 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT56_TYPE__ */
# 368 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT48_TYPE__
# undef __int32_c_suffix
# undef __int16_c_suffix
# undef  __int8_c_suffix
# ifdef __INT48_C_SUFFIX__
#  define INT48_C(v) __int_c(v, __INT48_C_SUFFIX__)
#  define UINT48_C(v) __uint_c(v, __INT48_C_SUFFIX__)
#  define __int32_c_suffix __INT48_C_SUFFIX__
#  define __int16_c_suffix __INT48_C_SUFFIX__
#  define __int8_c_suffix  __INT48_C_SUFFIX__
# else
# 381 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#  define INT48_C(v) v
#  define UINT48_C(v) v ## U
# endif /* __INT48_C_SUFFIX__ */
# 384 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT48_TYPE__ */
# 385 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT40_TYPE__
# undef __int32_c_suffix
# undef __int16_c_suffix
# undef  __int8_c_suffix
# ifdef __INT40_C_SUFFIX__
#  define INT40_C(v) __int_c(v, __INT40_C_SUFFIX__)
#  define UINT40_C(v) __uint_c(v, __INT40_C_SUFFIX__)
#  define __int32_c_suffix __INT40_C_SUFFIX__
#  define __int16_c_suffix __INT40_C_SUFFIX__
#  define __int8_c_suffix  __INT40_C_SUFFIX__
# else
# 398 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#  define INT40_C(v) v
#  define UINT40_C(v) v ## U
# endif /* __INT40_C_SUFFIX__ */
# 401 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT40_TYPE__ */
# 402 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT32_TYPE__
# undef __int32_c_suffix
# undef __int16_c_suffix
# undef  __int8_c_suffix
# ifdef __INT32_C_SUFFIX__
#  define __int32_c_suffix __INT32_C_SUFFIX__
#  define __int16_c_suffix __INT32_C_SUFFIX__
#  define __int8_c_suffix  __INT32_C_SUFFIX__
# endif /* __INT32_C_SUFFIX__ */
# 413 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT32_TYPE__ */
# 414 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifdef __int_least32_t
# ifdef __int32_c_suffix
#  define INT32_C(v) __int_c(v, __int32_c_suffix)
#  define UINT32_C(v) __uint_c(v, __int32_c_suffix)
# else
# 420 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#  define INT32_C(v) v
#  define UINT32_C(v) v ## U
# endif /* __int32_c_suffix */
# 423 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __int_least32_t */
# 424 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT24_TYPE__
# undef __int16_c_suffix
# undef  __int8_c_suffix
# ifdef __INT24_C_SUFFIX__
#  define INT24_C(v) __int_c(v, __INT24_C_SUFFIX__)
#  define UINT24_C(v) __uint_c(v, __INT24_C_SUFFIX__)
#  define __int16_c_suffix __INT24_C_SUFFIX__
#  define __int8_c_suffix  __INT24_C_SUFFIX__
# else
# 435 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#  define INT24_C(v) v
#  define UINT24_C(v) v ## U
# endif /* __INT24_C_SUFFIX__ */
# 438 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT24_TYPE__ */
# 439 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT16_TYPE__
# undef __int16_c_suffix
# undef  __int8_c_suffix
# ifdef __INT16_C_SUFFIX__
#  define __int16_c_suffix __INT16_C_SUFFIX__
#  define __int8_c_suffix  __INT16_C_SUFFIX__
# endif /* __INT16_C_SUFFIX__ */
# 448 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT16_TYPE__ */
# 449 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifdef __int_least16_t
# ifdef __int16_c_suffix
#  define INT16_C(v) __int_c(v, __int16_c_suffix)
#  define UINT16_C(v) __uint_c(v, __int16_c_suffix)
# else
# 455 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#  define INT16_C(v) v
#  define UINT16_C(v) v ## U
# endif /* __int16_c_suffix */
# 458 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __int_least16_t */
# 459 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT8_TYPE__
# undef  __int8_c_suffix
# ifdef __INT8_C_SUFFIX__
#  define __int8_c_suffix __INT8_C_SUFFIX__
# endif /* __INT8_C_SUFFIX__ */
# 466 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT8_TYPE__ */
# 467 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifdef __int_least8_t
# ifdef __int8_c_suffix
#  define INT8_C(v) __int_c(v, __int8_c_suffix)
#  define UINT8_C(v) __uint_c(v, __int8_c_suffix)
# else
# 473 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#  define INT8_C(v) v
#  define UINT8_C(v) v ## U
# endif /* __int8_c_suffix */
# 476 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __int_least8_t */
# 477 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


/* C99 7.18.2.1 Limits of exact-width integer types.
 * C99 7.18.2.2 Limits of minimum-width integer types.
 * C99 7.18.2.3 Limits of fastest minimum-width integer types.
 *
 * The presence of limit macros are completely optional in C99.  This
 * implementation defines limits for all of the types (exact- and
 * minimum-width) that it defines above, using the limits of the minimum-width
 * type for any types that do not have exact-width representations.
 *
 * As in the type definitions, this section takes an approach of
 * successive-shrinking to determine which limits to use for the standard (8,
 * 16, 32, 64) bit widths when they don't have exact representations. It is
 * therefore important that the definitions be kept in order of decending
 * widths.
 *
 * Note that C++ should not check __STDC_LIMIT_MACROS here, contrary to the
 * claims of the C standard (see C++ 18.3.1p2, [cstdint.syn]).
 */

#ifdef __INT64_TYPE__
# define INT64_MAX           INT64_C( 9223372036854775807)
# define INT64_MIN         (-INT64_C( 9223372036854775807)-1)
# define UINT64_MAX         UINT64_C(18446744073709551615)

#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 504 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
# define UINT64_WIDTH         64
# define INT64_WIDTH          UINT64_WIDTH

# define __UINT_LEAST64_WIDTH UINT64_WIDTH
# undef __UINT_LEAST32_WIDTH
# define __UINT_LEAST32_WIDTH UINT64_WIDTH
# undef __UINT_LEAST16_WIDTH
# define __UINT_LEAST16_WIDTH UINT64_WIDTH
# undef __UINT_LEAST8_MAX
# define __UINT_LEAST8_MAX UINT64_MAX
#endif /* __STDC_VERSION__ */
# 515 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

# define __INT_LEAST64_MIN   INT64_MIN
# define __INT_LEAST64_MAX   INT64_MAX
# define __UINT_LEAST64_MAX UINT64_MAX
# undef __INT_LEAST32_MIN
# define __INT_LEAST32_MIN   INT64_MIN
# undef __INT_LEAST32_MAX
# define __INT_LEAST32_MAX   INT64_MAX
# undef __UINT_LEAST32_MAX
# define __UINT_LEAST32_MAX UINT64_MAX
# undef __INT_LEAST16_MIN
# define __INT_LEAST16_MIN   INT64_MIN
# undef __INT_LEAST16_MAX
# define __INT_LEAST16_MAX   INT64_MAX
# undef __UINT_LEAST16_MAX
# define __UINT_LEAST16_MAX UINT64_MAX
# undef __INT_LEAST8_MIN
# define __INT_LEAST8_MIN    INT64_MIN
# undef __INT_LEAST8_MAX
# define __INT_LEAST8_MAX    INT64_MAX
# undef __UINT_LEAST8_MAX
# define __UINT_LEAST8_MAX  UINT64_MAX
#endif /* __INT64_TYPE__ */
# 538 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifdef __INT_LEAST64_MIN
# define INT_LEAST64_MIN   __INT_LEAST64_MIN
# define INT_LEAST64_MAX   __INT_LEAST64_MAX
# define UINT_LEAST64_MAX __UINT_LEAST64_MAX
# define INT_FAST64_MIN    __INT_LEAST64_MIN
# define INT_FAST64_MAX    __INT_LEAST64_MAX
# define UINT_FAST64_MAX  __UINT_LEAST64_MAX

#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) &&  __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 548 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
# define UINT_LEAST64_WIDTH __UINT_LEAST64_WIDTH
# define INT_LEAST64_WIDTH  UINT_LEAST64_WIDTH
# define UINT_FAST64_WIDTH  __UINT_LEAST64_WIDTH
# define INT_FAST64_WIDTH   UINT_FAST64_WIDTH
#endif /* __STDC_VERSION__ */
# 553 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT_LEAST64_MIN */
# 554 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT56_TYPE__
# define INT56_MAX           INT56_C(36028797018963967)
# define INT56_MIN         (-INT56_C(36028797018963967)-1)
# define UINT56_MAX         UINT56_C(72057594037927935)
# define INT_LEAST56_MIN     INT56_MIN
# define INT_LEAST56_MAX     INT56_MAX
# define UINT_LEAST56_MAX   UINT56_MAX
# define INT_FAST56_MIN      INT56_MIN
# define INT_FAST56_MAX      INT56_MAX
# define UINT_FAST56_MAX    UINT56_MAX

# undef __INT_LEAST32_MIN
# define __INT_LEAST32_MIN   INT56_MIN
# undef __INT_LEAST32_MAX
# define __INT_LEAST32_MAX   INT56_MAX
# undef __UINT_LEAST32_MAX
# define __UINT_LEAST32_MAX UINT56_MAX
# undef __INT_LEAST16_MIN
# define __INT_LEAST16_MIN   INT56_MIN
# undef __INT_LEAST16_MAX
# define __INT_LEAST16_MAX   INT56_MAX
# undef __UINT_LEAST16_MAX
# define __UINT_LEAST16_MAX UINT56_MAX
# undef __INT_LEAST8_MIN
# define __INT_LEAST8_MIN    INT56_MIN
# undef __INT_LEAST8_MAX
# define __INT_LEAST8_MAX    INT56_MAX
# undef __UINT_LEAST8_MAX
# define __UINT_LEAST8_MAX  UINT56_MAX

#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 587 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
# define UINT56_WIDTH         56
# define INT56_WIDTH          UINT56_WIDTH
# define UINT_LEAST56_WIDTH   UINT56_WIDTH
# define INT_LEAST56_WIDTH    UINT_LEAST56_WIDTH
# define UINT_FAST56_WIDTH    UINT56_WIDTH
# define INT_FAST56_WIDTH     UINT_FAST56_WIDTH
# undef __UINT_LEAST32_WIDTH
# define __UINT_LEAST32_WIDTH UINT56_WIDTH
# undef __UINT_LEAST16_WIDTH
# define __UINT_LEAST16_WIDTH UINT56_WIDTH
# undef __UINT_LEAST8_WIDTH
# define __UINT_LEAST8_WIDTH  UINT56_WIDTH
#endif /* __STDC_VERSION__ */
# 600 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT56_TYPE__ */
# 601 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT48_TYPE__
# define INT48_MAX           INT48_C(140737488355327)
# define INT48_MIN         (-INT48_C(140737488355327)-1)
# define UINT48_MAX         UINT48_C(281474976710655)
# define INT_LEAST48_MIN     INT48_MIN
# define INT_LEAST48_MAX     INT48_MAX
# define UINT_LEAST48_MAX   UINT48_MAX
# define INT_FAST48_MIN      INT48_MIN
# define INT_FAST48_MAX      INT48_MAX
# define UINT_FAST48_MAX    UINT48_MAX

# undef __INT_LEAST32_MIN
# define __INT_LEAST32_MIN   INT48_MIN
# undef __INT_LEAST32_MAX
# define __INT_LEAST32_MAX   INT48_MAX
# undef __UINT_LEAST32_MAX
# define __UINT_LEAST32_MAX UINT48_MAX
# undef __INT_LEAST16_MIN
# define __INT_LEAST16_MIN   INT48_MIN
# undef __INT_LEAST16_MAX
# define __INT_LEAST16_MAX   INT48_MAX
# undef __UINT_LEAST16_MAX
# define __UINT_LEAST16_MAX UINT48_MAX
# undef __INT_LEAST8_MIN
# define __INT_LEAST8_MIN    INT48_MIN
# undef __INT_LEAST8_MAX
# define __INT_LEAST8_MAX    INT48_MAX
# undef __UINT_LEAST8_MAX
# define __UINT_LEAST8_MAX  UINT48_MAX

#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 634 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#define UINT48_WIDTH         48
#define INT48_WIDTH          UINT48_WIDTH
#define UINT_LEAST48_WIDTH   UINT48_WIDTH
#define INT_LEAST48_WIDTH    UINT_LEAST48_WIDTH
#define UINT_FAST48_WIDTH    UINT48_WIDTH
#define INT_FAST48_WIDTH     UINT_FAST48_WIDTH
#undef __UINT_LEAST32_WIDTH
#define __UINT_LEAST32_WIDTH UINT48_WIDTH
# undef __UINT_LEAST16_WIDTH
#define __UINT_LEAST16_WIDTH UINT48_WIDTH
# undef __UINT_LEAST8_WIDTH
#define __UINT_LEAST8_WIDTH  UINT48_WIDTH
#endif /* __STDC_VERSION__ */
# 647 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT48_TYPE__ */
# 648 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT40_TYPE__
# define INT40_MAX           INT40_C(549755813887)
# define INT40_MIN         (-INT40_C(549755813887)-1)
# define UINT40_MAX         UINT40_C(1099511627775)
# define INT_LEAST40_MIN     INT40_MIN
# define INT_LEAST40_MAX     INT40_MAX
# define UINT_LEAST40_MAX   UINT40_MAX
# define INT_FAST40_MIN      INT40_MIN
# define INT_FAST40_MAX      INT40_MAX
# define UINT_FAST40_MAX    UINT40_MAX

# undef __INT_LEAST32_MIN
# define __INT_LEAST32_MIN   INT40_MIN
# undef __INT_LEAST32_MAX
# define __INT_LEAST32_MAX   INT40_MAX
# undef __UINT_LEAST32_MAX
# define __UINT_LEAST32_MAX UINT40_MAX
# undef __INT_LEAST16_MIN
# define __INT_LEAST16_MIN   INT40_MIN
# undef __INT_LEAST16_MAX
# define __INT_LEAST16_MAX   INT40_MAX
# undef __UINT_LEAST16_MAX
# define __UINT_LEAST16_MAX UINT40_MAX
# undef __INT_LEAST8_MIN
# define __INT_LEAST8_MIN    INT40_MIN
# undef __INT_LEAST8_MAX
# define __INT_LEAST8_MAX    INT40_MAX
# undef __UINT_LEAST8_MAX
# define __UINT_LEAST8_MAX  UINT40_MAX

#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 681 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
# define UINT40_WIDTH         40
# define INT40_WIDTH          UINT40_WIDTH
# define UINT_LEAST40_WIDTH   UINT40_WIDTH
# define INT_LEAST40_WIDTH    UINT_LEAST40_WIDTH
# define UINT_FAST40_WIDTH    UINT40_WIDTH
# define INT_FAST40_WIDTH     UINT_FAST40_WIDTH
# undef __UINT_LEAST32_WIDTH
# define __UINT_LEAST32_WIDTH UINT40_WIDTH
# undef __UINT_LEAST16_WIDTH
# define __UINT_LEAST16_WIDTH UINT40_WIDTH
# undef __UINT_LEAST8_WIDTH
# define __UINT_LEAST8_WIDTH  UINT40_WIDTH
#endif /* __STDC_VERSION__ */
# 694 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT40_TYPE__ */
# 695 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT32_TYPE__
# define INT32_MAX           INT32_C(2147483647)
# define INT32_MIN         (-INT32_C(2147483647)-1)
# define UINT32_MAX         UINT32_C(4294967295)

# undef __INT_LEAST32_MIN
# define __INT_LEAST32_MIN   INT32_MIN
# undef __INT_LEAST32_MAX
# define __INT_LEAST32_MAX   INT32_MAX
# undef __UINT_LEAST32_MAX
# define __UINT_LEAST32_MAX UINT32_MAX
# undef __INT_LEAST16_MIN
# define __INT_LEAST16_MIN   INT32_MIN
# undef __INT_LEAST16_MAX
# define __INT_LEAST16_MAX   INT32_MAX
# undef __UINT_LEAST16_MAX
# define __UINT_LEAST16_MAX UINT32_MAX
# undef __INT_LEAST8_MIN
# define __INT_LEAST8_MIN    INT32_MIN
# undef __INT_LEAST8_MAX
# define __INT_LEAST8_MAX    INT32_MAX
# undef __UINT_LEAST8_MAX
# define __UINT_LEAST8_MAX  UINT32_MAX

#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 722 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
# define UINT32_WIDTH         32
# define INT32_WIDTH          UINT32_WIDTH
# undef __UINT_LEAST32_WIDTH
# define __UINT_LEAST32_WIDTH UINT32_WIDTH
# undef __UINT_LEAST16_WIDTH
# define __UINT_LEAST16_WIDTH UINT32_WIDTH
# undef __UINT_LEAST8_WIDTH
# define __UINT_LEAST8_WIDTH  UINT32_WIDTH
#endif /* __STDC_VERSION__ */
# 731 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT32_TYPE__ */
# 732 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifdef __INT_LEAST32_MIN
# define INT_LEAST32_MIN   __INT_LEAST32_MIN
# define INT_LEAST32_MAX   __INT_LEAST32_MAX
# define UINT_LEAST32_MAX __UINT_LEAST32_MAX
# define INT_FAST32_MIN    __INT_LEAST32_MIN
# define INT_FAST32_MAX    __INT_LEAST32_MAX
# define UINT_FAST32_MAX  __UINT_LEAST32_MAX

#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 742 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
# define UINT_LEAST32_WIDTH __UINT_LEAST32_WIDTH
# define INT_LEAST32_WIDTH  UINT_LEAST32_WIDTH
# define UINT_FAST32_WIDTH  __UINT_LEAST32_WIDTH
# define INT_FAST32_WIDTH   UINT_FAST32_WIDTH
#endif /* __STDC_VERSION__ */
# 747 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT_LEAST32_MIN */
# 748 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT24_TYPE__
# define INT24_MAX           INT24_C(8388607)
# define INT24_MIN         (-INT24_C(8388607)-1)
# define UINT24_MAX         UINT24_C(16777215)
# define INT_LEAST24_MIN     INT24_MIN
# define INT_LEAST24_MAX     INT24_MAX
# define UINT_LEAST24_MAX   UINT24_MAX
# define INT_FAST24_MIN      INT24_MIN
# define INT_FAST24_MAX      INT24_MAX
# define UINT_FAST24_MAX    UINT24_MAX

# undef __INT_LEAST16_MIN
# define __INT_LEAST16_MIN   INT24_MIN
# undef __INT_LEAST16_MAX
# define __INT_LEAST16_MAX   INT24_MAX
# undef __UINT_LEAST16_MAX
# define __UINT_LEAST16_MAX UINT24_MAX
# undef __INT_LEAST8_MIN
# define __INT_LEAST8_MIN    INT24_MIN
# undef __INT_LEAST8_MAX
# define __INT_LEAST8_MAX    INT24_MAX
# undef __UINT_LEAST8_MAX
# define __UINT_LEAST8_MAX  UINT24_MAX

#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 775 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
# define UINT24_WIDTH         24
# define INT24_WIDTH          UINT24_WIDTH
# define UINT_LEAST24_WIDTH   UINT24_WIDTH
# define INT_LEAST24_WIDTH    UINT_LEAST24_WIDTH
# define UINT_FAST24_WIDTH    UINT24_WIDTH
# define INT_FAST24_WIDTH     UINT_FAST24_WIDTH
# undef __UINT_LEAST16_WIDTH
# define __UINT_LEAST16_WIDTH UINT24_WIDTH
# undef __UINT_LEAST8_WIDTH
# define __UINT_LEAST8_WIDTH  UINT24_WIDTH
#endif /* __STDC_VERSION__ */
# 786 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT24_TYPE__ */
# 787 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT16_TYPE__
#define INT16_MAX            INT16_C(32767)
#define INT16_MIN          (-INT16_C(32767)-1)
#define UINT16_MAX          UINT16_C(65535)

# undef __INT_LEAST16_MIN
# define __INT_LEAST16_MIN   INT16_MIN
# undef __INT_LEAST16_MAX
# define __INT_LEAST16_MAX   INT16_MAX
# undef __UINT_LEAST16_MAX
# define __UINT_LEAST16_MAX UINT16_MAX
# undef __INT_LEAST8_MIN
# define __INT_LEAST8_MIN    INT16_MIN
# undef __INT_LEAST8_MAX
# define __INT_LEAST8_MAX    INT16_MAX
# undef __UINT_LEAST8_MAX
# define __UINT_LEAST8_MAX  UINT16_MAX

#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 808 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
# define UINT16_WIDTH         16
# define INT16_WIDTH          UINT16_WIDTH
# undef __UINT_LEAST16_WIDTH
# define __UINT_LEAST16_WIDTH UINT16_WIDTH
# undef __UINT_LEAST8_WIDTH
# define __UINT_LEAST8_WIDTH  UINT16_WIDTH
#endif /* __STDC_VERSION__ */
# 815 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT16_TYPE__ */
# 816 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifdef __INT_LEAST16_MIN
# define INT_LEAST16_MIN   __INT_LEAST16_MIN
# define INT_LEAST16_MAX   __INT_LEAST16_MAX
# define UINT_LEAST16_MAX __UINT_LEAST16_MAX
# define INT_FAST16_MIN    __INT_LEAST16_MIN
# define INT_FAST16_MAX    __INT_LEAST16_MAX
# define UINT_FAST16_MAX  __UINT_LEAST16_MAX

#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 826 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
# define UINT_LEAST16_WIDTH __UINT_LEAST16_WIDTH
# define INT_LEAST16_WIDTH  UINT_LEAST16_WIDTH
# define UINT_FAST16_WIDTH  __UINT_LEAST16_WIDTH
# define INT_FAST16_WIDTH   UINT_FAST16_WIDTH
#endif /* __STDC_VERSION__ */
# 831 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT_LEAST16_MIN */
# 832 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3


#ifdef __INT8_TYPE__
# define INT8_MAX            INT8_C(127)
# define INT8_MIN          (-INT8_C(127)-1)
# define UINT8_MAX          UINT8_C(255)

# undef __INT_LEAST8_MIN
# define __INT_LEAST8_MIN    INT8_MIN
# undef __INT_LEAST8_MAX
# define __INT_LEAST8_MAX    INT8_MAX
# undef __UINT_LEAST8_MAX
# define __UINT_LEAST8_MAX  UINT8_MAX

#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 847 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
# define UINT8_WIDTH         8
# define INT8_WIDTH          UINT8_WIDTH
# undef __UINT_LEAST8_WIDTH
# define __UINT_LEAST8_WIDTH UINT8_WIDTH
#endif /* __STDC_VERSION__ */
# 852 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT8_TYPE__ */
# 853 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifdef __INT_LEAST8_MIN
# define INT_LEAST8_MIN   __INT_LEAST8_MIN
# define INT_LEAST8_MAX   __INT_LEAST8_MAX
# define UINT_LEAST8_MAX __UINT_LEAST8_MAX
# define INT_FAST8_MIN    __INT_LEAST8_MIN
# define INT_FAST8_MAX    __INT_LEAST8_MAX
# define UINT_FAST8_MAX  __UINT_LEAST8_MAX

#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 863 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
# define UINT_LEAST8_WIDTH __UINT_LEAST8_WIDTH
# define INT_LEAST8_WIDTH  UINT_LEAST8_WIDTH
# define UINT_FAST8_WIDTH  __UINT_LEAST8_WIDTH
# define INT_FAST8_WIDTH   UINT_FAST8_WIDTH
#endif /* __STDC_VERSION__ */
# 868 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __INT_LEAST8_MIN */
# 869 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

/* Some utility macros */
#define  __INTN_MIN(n)  __stdint_join3( INT, n, _MIN)
#define  __INTN_MAX(n)  __stdint_join3( INT, n, _MAX)
#define __UINTN_MAX(n)  __stdint_join3(UINT, n, _MAX)
#define  __INTN_C(n, v) __stdint_join3( INT, n, _C(v))
#define __UINTN_C(n, v) __stdint_join3(UINT, n, _C(v))

/* C99 7.18.2.4 Limits of integer types capable of holding object pointers. */
/* C99 7.18.3 Limits of other integer types. */

#define  INTPTR_MIN  (-__INTPTR_MAX__-1)
#define  INTPTR_MAX    __INTPTR_MAX__
#define UINTPTR_MAX   __UINTPTR_MAX__
#define PTRDIFF_MIN (-__PTRDIFF_MAX__-1)
#define PTRDIFF_MAX   __PTRDIFF_MAX__
#define    SIZE_MAX      __SIZE_MAX__

/* C23 7.22.2.4 Width of integer types capable of holding object pointers. */
#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 889 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
/* NB: The C standard requires that these be the same value, but the compiler
   exposes separate internal width macros. */
#define INTPTR_WIDTH  __INTPTR_WIDTH__
#define UINTPTR_WIDTH __UINTPTR_WIDTH__
#endif
# 894 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

/* ISO9899:2011 7.20 (C11 Annex K): Define RSIZE_MAX if __STDC_WANT_LIB_EXT1__
 * is enabled. */
#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 898 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#define   RSIZE_MAX            (SIZE_MAX >> 1)
#endif
# 900 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

/* C99 7.18.2.5 Limits of greatest-width integer types. */
#define  INTMAX_MIN (-__INTMAX_MAX__-1)
#define  INTMAX_MAX   __INTMAX_MAX__
#define UINTMAX_MAX  __UINTMAX_MAX__

/* C23 7.22.2.5 Width of greatest-width integer types. */
#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 908 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
/* NB: The C standard requires that these be the same value, but the compiler
   exposes separate internal width macros. */
#define INTMAX_WIDTH __INTMAX_WIDTH__
#define UINTMAX_WIDTH __UINTMAX_WIDTH__
#endif
# 913 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

/* C99 7.18.3 Limits of other integer types. */
#define SIG_ATOMIC_MIN __INTN_MIN(__SIG_ATOMIC_WIDTH__)
#define SIG_ATOMIC_MAX __INTN_MAX(__SIG_ATOMIC_WIDTH__)
#ifdef __WINT_UNSIGNED__
# define WINT_MIN       __UINTN_C(__WINT_WIDTH__, 0)
# define WINT_MAX       __UINTN_MAX(__WINT_WIDTH__)
#else
# 921 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
# define WINT_MIN       __INTN_MIN(__WINT_WIDTH__)
# define WINT_MAX       __INTN_MAX(__WINT_WIDTH__)
#endif
# 924 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#ifndef WCHAR_MAX
# define WCHAR_MAX __WCHAR_MAX__
#endif
# 928 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#ifndef WCHAR_MIN
#if 0 /* disabled by -frewrite-includes */
# if __WCHAR_MAX__ == __INTN_MAX(__WCHAR_WIDTH__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 930 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#  define WCHAR_MIN __INTN_MIN(__WCHAR_WIDTH__)
# else
# 932 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#  define WCHAR_MIN __UINTN_C(__WCHAR_WIDTH__, 0)
# endif
# 934 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif
# 935 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

/* 7.18.4.2 Macros for greatest-width integer constants. */
#define  INTMAX_C(v) __int_c(v,  __INTMAX_C_SUFFIX__)
#define UINTMAX_C(v) __int_c(v, __UINTMAX_C_SUFFIX__)

/* C23 7.22.3.x Width of other integer types. */
#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 942 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#define PTRDIFF_WIDTH    __PTRDIFF_WIDTH__
#define SIG_ATOMIC_WIDTH __SIG_ATOMIC_WIDTH__
#define SIZE_WIDTH       __SIZE_WIDTH__
#define WCHAR_WIDTH      __WCHAR_WIDTH__
#define WINT_WIDTH       __WINT_WIDTH__
#endif
# 948 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3

#endif /* __STDC_HOSTED__ */
# 950 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* __CLANG_STDINT_H */
# 951 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdint.h" 3
#endif /* stdint.h expanded by -frewrite-includes */
# 125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 2 3
#endif
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 3

#endif // _LIBCPP_STDINT_H
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdint.h" 3
#endif /* stdint.h expanded by -frewrite-includes */
# 147 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdint" 2 3

#ifndef _LIBCPP_STDINT_H
#   error <cstdint> tried including <stdint.h> but didn't find libc++'s <stdint.h> header. \
          This usually means that your header search paths are not configured properly. \
          The header search paths should contain the C++ Standard Library headers before \
          any C Standard Library, and you are probably using compiler flags that make that \
          not be the case.
#endif
# 155 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdint" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 157 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdint" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdint" 3
#endif
# 159 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdint" 3

_LIBCPP_BEGIN_NAMESPACE_STD

using ::int8_t _LIBCPP_USING_IF_EXISTS;
using ::int16_t _LIBCPP_USING_IF_EXISTS;
using ::int32_t _LIBCPP_USING_IF_EXISTS;
using ::int64_t _LIBCPP_USING_IF_EXISTS;

using ::uint8_t _LIBCPP_USING_IF_EXISTS;
using ::uint16_t _LIBCPP_USING_IF_EXISTS;
using ::uint32_t _LIBCPP_USING_IF_EXISTS;
using ::uint64_t _LIBCPP_USING_IF_EXISTS;

using ::int_least8_t _LIBCPP_USING_IF_EXISTS;
using ::int_least16_t _LIBCPP_USING_IF_EXISTS;
using ::int_least32_t _LIBCPP_USING_IF_EXISTS;
using ::int_least64_t _LIBCPP_USING_IF_EXISTS;

using ::uint_least8_t _LIBCPP_USING_IF_EXISTS;
using ::uint_least16_t _LIBCPP_USING_IF_EXISTS;
using ::uint_least32_t _LIBCPP_USING_IF_EXISTS;
using ::uint_least64_t _LIBCPP_USING_IF_EXISTS;

using ::int_fast8_t _LIBCPP_USING_IF_EXISTS;
using ::int_fast16_t _LIBCPP_USING_IF_EXISTS;
using ::int_fast32_t _LIBCPP_USING_IF_EXISTS;
using ::int_fast64_t _LIBCPP_USING_IF_EXISTS;

using ::uint_fast8_t _LIBCPP_USING_IF_EXISTS;
using ::uint_fast16_t _LIBCPP_USING_IF_EXISTS;
using ::uint_fast32_t _LIBCPP_USING_IF_EXISTS;
using ::uint_fast64_t _LIBCPP_USING_IF_EXISTS;

using ::intptr_t _LIBCPP_USING_IF_EXISTS;
using ::uintptr_t _LIBCPP_USING_IF_EXISTS;

using ::intmax_t _LIBCPP_USING_IF_EXISTS;
using ::uintmax_t _LIBCPP_USING_IF_EXISTS;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_CSTDINT
# 201 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdint" 3
#endif /* cstdint expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cstring expanded by -frewrite-includes */
#include <cstring>
#else /* cstring expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstring" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CSTRING
#define _LIBCPP_CSTRING

/*
    cstring synopsis

Macros:

    NULL

namespace std
{

Types:

    size_t

void* memcpy(void* restrict s1, const void* restrict s2, size_t n);
void* memmove(void* s1, const void* s2, size_t n);
char* strcpy (char* restrict s1, const char* restrict s2);
char* strncpy(char* restrict s1, const char* restrict s2, size_t n);
char* strcat (char* restrict s1, const char* restrict s2);
char* strncat(char* restrict s1, const char* restrict s2, size_t n);
int memcmp(const void* s1, const void* s2, size_t n);
int strcmp (const char* s1, const char* s2);
int strncmp(const char* s1, const char* s2, size_t n);
int strcoll(const char* s1, const char* s2);
size_t strxfrm(char* restrict s1, const char* restrict s2, size_t n);
const void* memchr(const void* s, int c, size_t n);
      void* memchr(      void* s, int c, size_t n);
const char* strchr(const char* s, int c);
      char* strchr(      char* s, int c);
size_t strcspn(const char* s1, const char* s2);
const char* strpbrk(const char* s1, const char* s2);
      char* strpbrk(      char* s1, const char* s2);
const char* strrchr(const char* s, int c);
      char* strrchr(      char* s, int c);
size_t strspn(const char* s1, const char* s2);
const char* strstr(const char* s1, const char* s2);
      char* strstr(      char* s1, const char* s2);
char* strtok(char* restrict s1, const char* restrict s2);
void* memset(void* s, int c, size_t n);
char* strerror(int errnum);
size_t strlen(const char* s);

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstring" 3
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstring" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstring" 3
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstring" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_constant_evaluated.h expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#else /* is_constant_evaluated.h expanded by -frewrite-includes */
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstring" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constant_evaluated.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_CONSTANT_EVALUATED_H
#define _LIBCPP___TYPE_TRAITS_IS_CONSTANT_EVALUATED_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constant_evaluated.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constant_evaluated.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constant_evaluated.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constant_evaluated.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constant_evaluated.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constant_evaluated.h" 3
_LIBCPP_INLINE_VISIBILITY inline constexpr bool is_constant_evaluated() noexcept {
  return __builtin_is_constant_evaluated();
}
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constant_evaluated.h" 3

_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR bool __libcpp_is_constant_evaluated() _NOEXCEPT {
  return __builtin_is_constant_evaluated();
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_CONSTANT_EVALUATED_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_constant_evaluated.h" 3
#endif /* is_constant_evaluated.h expanded by -frewrite-includes */
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstring" 2 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* string.h expanded by -frewrite-includes */
#include <string.h>
#else /* string.h expanded by -frewrite-includes */
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstring" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_STRING_H
#define _LIBCPP_STRING_H

/*
    string.h synopsis

Macros:

    NULL

Types:

    size_t

void* memcpy(void* restrict s1, const void* restrict s2, size_t n);
void* memmove(void* s1, const void* s2, size_t n);
char* strcpy (char* restrict s1, const char* restrict s2);
char* strncpy(char* restrict s1, const char* restrict s2, size_t n);
char* strcat (char* restrict s1, const char* restrict s2);
char* strncat(char* restrict s1, const char* restrict s2, size_t n);
int memcmp(const void* s1, const void* s2, size_t n);
int strcmp (const char* s1, const char* s2);
int strncmp(const char* s1, const char* s2, size_t n);
int strcoll(const char* s1, const char* s2);
size_t strxfrm(char* restrict s1, const char* restrict s2, size_t n);
const void* memchr(const void* s, int c, size_t n);
      void* memchr(      void* s, int c, size_t n);
const char* strchr(const char* s, int c);
      char* strchr(      char* s, int c);
size_t strcspn(const char* s1, const char* s2);
const char* strpbrk(const char* s1, const char* s2);
      char* strpbrk(      char* s1, const char* s2);
const char* strrchr(const char* s, int c);
      char* strrchr(      char* s, int c);
size_t strspn(const char* s1, const char* s2);
const char* strstr(const char* s1, const char* s2);
      char* strstr(      char* s1, const char* s2);
char* strtok(char* restrict s1, const char* restrict s2);
void* memset(void* s, int c, size_t n);
char* strerror(int errnum);
size_t strlen(const char* s);

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string.h" 3
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string.h" 3
#endif
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string.h" 3

#if 0 /* disabled by -frewrite-includes */
#if __has_include_next(<string.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* string.h expanded by -frewrite-includes */
#  include_next <string.h>
#else /* string.h expanded by -frewrite-includes */
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string.h" 3
# 1 "gen/zircon/public/sysroot/cpp/include/string.h" 1 3 4
#ifndef SYSROOT_STRING_H_
#define SYSROOT_STRING_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* features.h expanded by -frewrite-includes */
#include <features.h>
#else /* features.h expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/features.h" 1 3 4
#ifndef SYSROOT_FEATURES_H_
#define SYSROOT_FEATURES_H_

#if 0 /* disabled by -frewrite-includes */
#if defined(_ALL_SOURCE) && !defined(_GNU_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 5 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4
#define _GNU_SOURCE 1
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if !defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 9 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4
#define _BSD_SOURCE 1
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) && \
    !defined(_GNU_SOURCE) && !defined(_BSD_SOURCE) && !defined(__STRICT_ANSI__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 14 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4
#define _BSD_SOURCE 1
#define _XOPEN_SOURCE 700
#endif
# 17 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if __STDC_VERSION__ >= 199901L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 19 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4
#define __restrict restrict
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(__GNUC__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 21 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4
#define __restrict
#endif
# 23 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if __STDC_VERSION__ >= 199901L || defined(__cplusplus)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4
#define __inline inline
#endif
# 27 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if __STDC_VERSION__ >= 201112L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__GNUC__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 30 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4
#define _Noreturn __attribute__((__noreturn__))
#else
# 32 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4
#define _Noreturn
#endif
# 34 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4

#ifndef __cplusplus
#ifdef __GNUC__
#define __nothrow_fn __attribute__((__nothrow__))
#else
# 39 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4
#define __nothrow_fn
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif __cplusplus >= 201710L
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 42 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4
#define __nothrow_fn noexcept
#else
# 44 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4
#define __nothrow_fn throw()
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4

#endif  // SYSROOT_FEATURES_H_
# 48 "gen/zircon/public/sysroot/cpp/include/features.h" 3 4
#endif /* features.h expanded by -frewrite-includes */
# 9 "gen/zircon/public/sysroot/cpp/include/string.h" 2 3 4

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* null.h expanded by -frewrite-includes */
#include <bits/null.h>
#else /* null.h expanded by -frewrite-includes */
# 10 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/null.h" 1 3 4
#ifndef SYSROOT_BITS_NULL_H_
#define SYSROOT_BITS_NULL_H_

// The compiler's <stddef.h> defines NULL without defining anything
// else if __need_NULL is defined first.
#define __need_NULL
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stddef.h expanded by -frewrite-includes */
#include <stddef.h>
#else /* stddef.h expanded by -frewrite-includes */
# 7 "gen/zircon/public/sysroot/cpp/include/bits/null.h" 3 4
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 1 3 4
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_ptrdiff_t) || defined(__need_size_t) || \
    defined(__need_wchar_t) || defined(__need_NULL) || defined(__need_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#endif
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stddef.h expanded by -frewrite-includes */
#include_next <stddef.h>
#else /* stddef.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 1 3
/*===---- stddef.h - Basic type definitions --------------------------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

/*
 * This header is designed to be included multiple times. If any of the __need_
 * macros are defined, then only that subset of interfaces are provided. This
 * can be useful for POSIX headers that need to not expose all of stddef.h, but
 * need to use some of its interfaces. Otherwise this header provides all of
 * the expected interfaces.
 *
 * When clang modules are enabled, this header is a textual header. It ignores
 * its header guard so that multiple submodules can export its interfaces.
 * Take module SM with submodules A and B, whose headers both include stddef.h
 * When SM.A builds, __STDDEF_H will be defined. When SM.B builds, the
 * definition from SM.A will leak when building without local submodule
 * visibility. stddef.h wouldn't include any of its implementation headers, and
 * SM.B wouldn't import any of the stddef modules, and SM.B's `export *`
 * wouldn't export any stddef interfaces as expected. However, since stddef.h
 * ignores its header guard when building with modules, it all works as
 * expected.
 *
 * When clang modules are not enabled, the header guards can function in the
 * normal simple fashion.
 */
#if 0 /* disabled by -frewrite-includes */
#if !defined(__STDDEF_H) || __has_feature(modules) ||                          \
    (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1) ||        \
    defined(__need_ptrdiff_t) || defined(__need_size_t) ||                     \
    defined(__need_rsize_t) || defined(__need_wchar_t) ||                      \
    defined(__need_NULL) || defined(__need_nullptr_t) ||                       \
    defined(__need_unreachable) || defined(__need_max_align_t) ||              \
    defined(__need_offsetof) || defined(__need_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(__need_ptrdiff_t) && !defined(__need_size_t) &&                   \
    !defined(__need_rsize_t) && !defined(__need_wchar_t) &&                    \
    !defined(__need_NULL) && !defined(__need_nullptr_t) &&                     \
    !defined(__need_unreachable) && !defined(__need_max_align_t) &&            \
    !defined(__need_offsetof) && !defined(__need_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#define __STDDEF_H
#define __need_ptrdiff_t
#define __need_size_t
/* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
 * enabled. */
#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 50 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#define __need_rsize_t
#endif
# 52 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#define __need_wchar_t
#define __need_NULL
#if 0 /* disabled by -frewrite-includes */
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) ||              \
    defined(__cplusplus)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 56 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#define __need_nullptr_t
#endif
# 58 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 59 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#define __need_unreachable
#endif
# 61 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* disabled by -frewrite-includes */
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) ||              \
    (defined(__cplusplus) && __cplusplus >= 201103L)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#define __need_max_align_t
#endif
# 65 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#define __need_offsetof
/* wint_t is provided by <wchar.h> and not <stddef.h>. It's here
 * for compatibility, but must be explicitly requested. Therefore
 * __need_wint_t is intentionally not defined here. */
#endif
# 70 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 72 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__stddef_ptrdiff_t.h>
#endif /* expanded by -frewrite-includes */
# 72 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 73 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#undef __need_ptrdiff_t
#endif /* defined(__need_ptrdiff_t) */
# 75 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 77 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__stddef_size_t.h>
#endif /* expanded by -frewrite-includes */
# 77 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 78 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#undef __need_size_t
#endif /*defined(__need_size_t) */
# 80 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_rsize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 82 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__stddef_rsize_t.h>
#endif /* expanded by -frewrite-includes */
# 82 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 83 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#undef __need_rsize_t
#endif /* defined(__need_rsize_t) */
# 85 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__stddef_wchar_t.h>
#endif /* expanded by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 88 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#undef __need_wchar_t
#endif /* defined(__need_wchar_t) */
# 90 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_NULL)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 92 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stddef_null.h expanded by -frewrite-includes */
#include <__stddef_null.h>
#else /* __stddef_null.h expanded by -frewrite-includes */
# 92 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 1 3
/*===---- __stddef_null.h - Definition of NULL -----------------------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

#if 0 /* disabled by -frewrite-includes */
#if !defined(NULL) || !__has_feature(modules)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 11 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 3

/* linux/stddef.h will define NULL to 0. glibc (and other) headers then define
 * __need_NULL and rely on stddef.h to redefine NULL to the correct value again.
 * Modules don't support redefining macros like that, but support that pattern
 * in the non-modules case.
 */
#undef NULL

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if !defined(__MINGW32__) && !defined(_MSC_VER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 3
#define NULL __null
#else
# 23 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 3
#define NULL 0
#endif
# 25 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 3
#else
# 26 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 3
#define NULL ((void*)0)
#endif
# 28 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 3

#endif
# 30 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stddef_null.h" 3
#endif /* __stddef_null.h expanded by -frewrite-includes */
# 93 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 2 3
#undef __need_NULL
#endif /* defined(__need_NULL) */
# 95 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_nullptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 97 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__stddef_nullptr_t.h>
#endif /* expanded by -frewrite-includes */
# 97 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 98 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#undef __need_nullptr_t
#endif /* defined(__need_nullptr_t) */
# 100 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_unreachable)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 102 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__stddef_unreachable.h>
#endif /* expanded by -frewrite-includes */
# 102 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 103 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#undef __need_unreachable
#endif /* defined(__need_unreachable) */
# 105 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 107 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__stddef_max_align_t.h>
#endif /* expanded by -frewrite-includes */
# 107 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 108 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#undef __need_max_align_t
#endif /* defined(__need_max_align_t) */
# 110 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_offsetof)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 112 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__stddef_offsetof.h>
#endif /* expanded by -frewrite-includes */
# 112 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 113 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#undef __need_offsetof
#endif /* defined(__need_offsetof) */
# 115 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

/* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
__WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
#if 0 /* disabled by -frewrite-includes */
#if defined(__need_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 119 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__stddef_wint_t.h>
#endif /* expanded by -frewrite-includes */
# 119 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
# 120 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#undef __need_wint_t
#endif /* __need_wint_t */
# 122 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3

#endif
# 124 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stddef.h" 3
#endif /* stddef.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_STDDEF_H)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#define _LIBCPP_STDDEF_H

/*
    stddef.h synopsis

Macros:

    offsetof(type,member-designator)
    NULL

Types:

    ptrdiff_t
    size_t
    max_align_t // C++11
    nullptr_t

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<stddef.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#    include_next <stddef.h>
#endif /* expanded by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#  endif
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#ifdef __cplusplus
    typedef decltype(nullptr) nullptr_t;
#endif
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#endif // _LIBCPP_STDDEF_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#endif /* stddef.h expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/null.h" 2 3 4

#endif  // SYSROOT_BITS_NULL_H_
# 10 "gen/zircon/public/sysroot/cpp/include/bits/null.h" 3 4
#endif /* null.h expanded by -frewrite-includes */
# 11 "gen/zircon/public/sysroot/cpp/include/string.h" 2 3 4

#define __NEED_size_t

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 14 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 15 "gen/zircon/public/sysroot/cpp/include/string.h" 2 3 4

void* memcpy(void* __restrict, const void* __restrict, size_t);
void* memmove(void*, const void*, size_t);
void* memset(void*, int, size_t);
int memcmp(const void*, const void*, size_t);
void* memchr(const void*, int, size_t);

char* strcpy(char* __restrict, const char* __restrict);
char* strncpy(char* __restrict, const char* __restrict, size_t);

char* strcat(char* __restrict, const char* __restrict);
char* strncat(char* __restrict, const char* __restrict, size_t);

int strcmp(const char*, const char*);
int strncmp(const char*, const char*, size_t);

int strcoll(const char*, const char*);
size_t strxfrm(char* __restrict, const char* __restrict, size_t);

char* strchr(const char*, int);
char* strrchr(const char*, int);

size_t strcspn(const char*, const char*);
size_t strspn(const char*, const char*);
char* strpbrk(const char*, const char*);
char* strstr(const char*, const char*);
char* strtok(char* __restrict, const char* __restrict);

size_t strlen(const char*);

char* strerror(int);

#if 0 /* disabled by -frewrite-includes */
#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* strings.h expanded by -frewrite-includes */
#include <strings.h>
#else /* strings.h expanded by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/strings.h" 1 3 4
#ifndef SYSROOT_STRINGS_H_
#define SYSROOT_STRINGS_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/strings.h" 3 4

#define __NEED_size_t
#define __NEED_locale_t
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 10 "gen/zircon/public/sysroot/cpp/include/strings.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 11 "gen/zircon/public/sysroot/cpp/include/strings.h" 2 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_POSIX_SOURCE) || \
    (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE + 0 < 200809L) ||            \
    (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE + 0 < 700)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "gen/zircon/public/sysroot/cpp/include/strings.h" 3 4
int bcmp(const void*, const void*, size_t);
void bcopy(const void*, void*, size_t);
void bzero(void*, size_t);
char* index(const char*, int);
char* rindex(const char*, int);
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/strings.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/strings.h" 3 4
int ffs(int);
int ffsl(long);
int ffsll(long long);
#endif
# 27 "gen/zircon/public/sysroot/cpp/include/strings.h" 3 4

int strcasecmp(const char*, const char*);
int strncasecmp(const char*, const char*, size_t);

int strcasecmp_l(const char*, const char*, locale_t);
int strncasecmp_l(const char*, const char*, size_t, locale_t);

#ifdef __cplusplus
}
#endif
# 37 "gen/zircon/public/sysroot/cpp/include/strings.h" 3 4

#endif  // SYSROOT_STRINGS_H_
# 39 "gen/zircon/public/sysroot/cpp/include/strings.h" 3 4
#endif /* strings.h expanded by -frewrite-includes */
# 49 "gen/zircon/public/sysroot/cpp/include/string.h" 2 3 4
#endif
# 50 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
    defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4
char* strtok_r(char* __restrict, const char* __restrict, char** __restrict);
int strerror_r(int, char*, size_t);
char* stpcpy(char* __restrict, const char* __restrict);
char* stpncpy(char* __restrict, const char* __restrict, size_t);
size_t strnlen(const char*, size_t);
char* strdup(const char*);
char* strndup(const char*, size_t);
char* strsignal(int);
#endif
# 62 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 64 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4
void* memccpy(void* __restrict, const void* __restrict, int, size_t);
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4
char* strsep(char**, const char*);
size_t strlcat(char*, const char*, size_t);
size_t strlcpy(char*, const char*, size_t);
#endif
# 72 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4

#ifdef _GNU_SOURCE
#define strdupa(x) strcpy(alloca(strlen(x) + 1), x)
int strverscmp(const char*, const char*);
char* strchrnul(const char*, int);
char* strcasestr(const char*, const char*);
void* memmem(const void*, size_t, const void*, size_t);
void* memrchr(const void*, int, size_t);
void* mempcpy(void*, const void*, size_t);
#ifndef __cplusplus
char* basename(char*);
#endif
# 84 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4
#endif
# 85 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4

#ifdef __cplusplus
}
#endif
# 89 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4

#endif  // SYSROOT_STRING_H_
# 91 "gen/zircon/public/sysroot/cpp/include/string.h" 3 4
#endif /* string.h expanded by -frewrite-includes */
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string.h" 2 3
#endif
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string.h" 3

// MSVCRT, GNU libc and its derivates may already have the correct prototype in
// <string.h>. This macro can be defined by users if their C library provides
// the right signature.
#if 0 /* disabled by -frewrite-includes */
#if defined(__CORRECT_ISO_CPP_STRING_H_PROTO) || defined(_LIBCPP_MSVCRT) || defined(_STRING_H_CPLUSPLUS_98_CONFORMANCE_)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string.h" 3
#define _LIBCPP_STRING_H_HAS_CONST_OVERLOADS
#endif
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(_LIBCPP_STRING_H_HAS_CONST_OVERLOADS) && defined(_LIBCPP_PREFERRED_OVERLOAD)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string.h" 3
extern "C++" {
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strchr(const char* __s, int __c) {
  return __builtin_strchr(__s, __c);
}
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strchr(char* __s, int __c) {
  return __builtin_strchr(__s, __c);
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strpbrk(const char* __s1, const char* __s2) {
  return __builtin_strpbrk(__s1, __s2);
}
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strpbrk(char* __s1, const char* __s2) {
  return __builtin_strpbrk(__s1, __s2);
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strrchr(const char* __s, int __c) {
  return __builtin_strrchr(__s, __c);
}
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strrchr(char* __s, int __c) {
  return __builtin_strrchr(__s, __c);
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const void* memchr(const void* __s, int __c, size_t __n) {
  return __builtin_memchr(__s, __c, __n);
}
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD void* memchr(void* __s, int __c, size_t __n) {
  return __builtin_memchr(__s, __c, __n);
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strstr(const char* __s1, const char* __s2) {
  return __builtin_strstr(__s1, __s2);
}
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strstr(char* __s1, const char* __s2) {
  return __builtin_strstr(__s1, __s2);
}
} // extern "C++"
#endif
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string.h" 3

#endif // _LIBCPP_STRING_H
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string.h" 3
#endif /* string.h expanded by -frewrite-includes */
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstring" 2 3

#ifndef _LIBCPP_STRING_H
#   error <cstring> tried including <string.h> but didn't find libc++'s <string.h> header. \
          This usually means that your header search paths are not configured properly. \
          The header search paths should contain the C++ Standard Library headers before \
          any C Standard Library, and you are probably using compiler flags that make that \
          not be the case.
#endif
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstring" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstring" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstring" 3
#endif
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstring" 3

_LIBCPP_BEGIN_NAMESPACE_STD

using ::size_t _LIBCPP_USING_IF_EXISTS;
using ::memcpy _LIBCPP_USING_IF_EXISTS;
using ::memmove _LIBCPP_USING_IF_EXISTS;
using ::strcpy _LIBCPP_USING_IF_EXISTS;
using ::strncpy _LIBCPP_USING_IF_EXISTS;
using ::strcat _LIBCPP_USING_IF_EXISTS;
using ::strncat _LIBCPP_USING_IF_EXISTS;
using ::memcmp _LIBCPP_USING_IF_EXISTS;
using ::strcmp _LIBCPP_USING_IF_EXISTS;
using ::strncmp _LIBCPP_USING_IF_EXISTS;
using ::strcoll _LIBCPP_USING_IF_EXISTS;
using ::strxfrm _LIBCPP_USING_IF_EXISTS;
using ::memchr _LIBCPP_USING_IF_EXISTS;
using ::strchr _LIBCPP_USING_IF_EXISTS;
using ::strcspn _LIBCPP_USING_IF_EXISTS;
using ::strpbrk _LIBCPP_USING_IF_EXISTS;
using ::strrchr _LIBCPP_USING_IF_EXISTS;
using ::strspn _LIBCPP_USING_IF_EXISTS;
using ::strstr _LIBCPP_USING_IF_EXISTS;
using ::strtok _LIBCPP_USING_IF_EXISTS;
using ::memset _LIBCPP_USING_IF_EXISTS;
using ::strerror _LIBCPP_USING_IF_EXISTS;
using ::strlen _LIBCPP_USING_IF_EXISTS;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_CSTRING
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstring" 3
#endif /* cstring expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Size>
inline _LIBCPP_HIDE_FROM_ABI
_Size
__loadword(const void* __p)
{
    _Size __r;
    _VSTD::memcpy(&__r, __p, sizeof(__r));
    return __r;
}

// We use murmur2 when size_t is 32 bits, and cityhash64 when size_t
// is 64 bits.  This is because cityhash64 uses 64bit x 64bit
// multiplication, which can be very slow on 32-bit systems.
template <class _Size, size_t = sizeof(_Size)*__CHAR_BIT__>
struct __murmur2_or_cityhash;

template <class _Size>
struct __murmur2_or_cityhash<_Size, 32>
{
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
    _Size operator()(const void* __key, _Size __len) const {
      // murmur2
      const _Size __m = 0x5bd1e995;
      const _Size __r = 24;
      _Size __h = __len;
      const unsigned char* __data = static_cast<const unsigned char*>(__key);
      for (; __len >= 4; __data += 4, __len -= 4)
      {
          _Size __k = std::__loadword<_Size>(__data);
          __k *= __m;
          __k ^= __k >> __r;
          __k *= __m;
          __h *= __m;
          __h ^= __k;
      }
      switch (__len)
      {
      case 3:
          __h ^= static_cast<_Size>(__data[2] << 16);
          _LIBCPP_FALLTHROUGH();
      case 2:
          __h ^= static_cast<_Size>(__data[1] << 8);
          _LIBCPP_FALLTHROUGH();
      case 1:
          __h ^= __data[0];
          __h *= __m;
      }
      __h ^= __h >> 13;
      __h *= __m;
      __h ^= __h >> 15;
      return __h;
    }
};

template <class _Size>
struct __murmur2_or_cityhash<_Size, 64>
{
  // cityhash64
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
  _Size operator()(const void* __key, _Size __len) const {
    const char* __s = static_cast<const char*>(__key);
    if (__len <= 32) {
        if (__len <= 16) {
        return __hash_len_0_to_16(__s, __len);
        } else {
        return __hash_len_17_to_32(__s, __len);
        }
    } else if (__len <= 64) {
        return __hash_len_33_to_64(__s, __len);
    }

    // For strings over 64 bytes we hash the end first, and then as we
    // loop we keep 56 bytes of state: v, w, x, y, and z.
    _Size __x = std::__loadword<_Size>(__s + __len - 40);
    _Size __y = std::__loadword<_Size>(__s + __len - 16) +
                std::__loadword<_Size>(__s + __len - 56);
    _Size __z = __hash_len_16(std::__loadword<_Size>(__s + __len - 48) + __len,
                            std::__loadword<_Size>(__s + __len - 24));
    pair<_Size, _Size> __v = __weak_hash_len_32_with_seeds(__s + __len - 64, __len, __z);
    pair<_Size, _Size> __w = __weak_hash_len_32_with_seeds(__s + __len - 32, __y + __k1, __x);
    __x = __x * __k1 + std::__loadword<_Size>(__s);

    // Decrease len to the nearest multiple of 64, and operate on 64-byte chunks.
    __len = (__len - 1) & ~static_cast<_Size>(63);
    do {
        __x = __rotate(__x + __y + __v.first + std::__loadword<_Size>(__s + 8), 37) * __k1;
        __y = __rotate(__y + __v.second + std::__loadword<_Size>(__s + 48), 42) * __k1;
        __x ^= __w.second;
        __y += __v.first + std::__loadword<_Size>(__s + 40);
        __z = __rotate(__z + __w.first, 33) * __k1;
        __v = __weak_hash_len_32_with_seeds(__s, __v.second * __k1, __x + __w.first);
        __w = __weak_hash_len_32_with_seeds(__s + 32, __z + __w.second,
                                            __y + std::__loadword<_Size>(__s + 16));
        _VSTD::swap(__z, __x);
        __s += 64;
        __len -= 64;
    } while (__len != 0);
    return __hash_len_16(
        __hash_len_16(__v.first, __w.first) + __shift_mix(__y) * __k1 + __z,
        __hash_len_16(__v.second, __w.second) + __x);
  }

  private:
    // Some primes between 2^63 and 2^64.
    static const _Size __k0 = 0xc3a5c85c97cb3127ULL;
    static const _Size __k1 = 0xb492b66fbe98f273ULL;
    static const _Size __k2 = 0x9ae16a3b2f90404fULL;
    static const _Size __k3 = 0xc949d7c7509e6557ULL;

  _LIBCPP_HIDE_FROM_ABI
  static _Size __rotate(_Size __val, int __shift) {
    return __shift == 0 ? __val : ((__val >> __shift) | (__val << (64 - __shift)));
  }

  _LIBCPP_HIDE_FROM_ABI
  static _Size __rotate_by_at_least_1(_Size __val, int __shift) {
    return (__val >> __shift) | (__val << (64 - __shift));
  }

  _LIBCPP_HIDE_FROM_ABI
  static _Size __shift_mix(_Size __val) {
    return __val ^ (__val >> 47);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
  static _Size __hash_len_16(_Size __u, _Size __v) {
    const _Size __mul = 0x9ddfea08eb382d69ULL;
    _Size __a = (__u ^ __v) * __mul;
    __a ^= (__a >> 47);
    _Size __b = (__v ^ __a) * __mul;
    __b ^= (__b >> 47);
    __b *= __mul;
    return __b;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
  static _Size __hash_len_0_to_16(const char* __s, _Size __len) {
    if (__len > 8) {
      const _Size __a = std::__loadword<_Size>(__s);
      const _Size __b = std::__loadword<_Size>(__s + __len - 8);
      return __hash_len_16(__a, __rotate_by_at_least_1(__b + __len, __len)) ^ __b;
    }
    if (__len >= 4) {
      const uint32_t __a = std::__loadword<uint32_t>(__s);
      const uint32_t __b = std::__loadword<uint32_t>(__s + __len - 4);
#ifdef _LIBCPP_ABI_FIX_CITYHASH_IMPLEMENTATION
      return __hash_len_16(__len + (static_cast<_Size>(__a) << 3), __b);
#else
# 185 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
      return __hash_len_16(__len + (__a << 3), __b);
#endif
# 187 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
    }
    if (__len > 0) {
      const unsigned char __a = static_cast<unsigned char>(__s[0]);
      const unsigned char __b = static_cast<unsigned char>(__s[__len >> 1]);
      const unsigned char __c = static_cast<unsigned char>(__s[__len - 1]);
      const uint32_t __y = static_cast<uint32_t>(__a) +
                           (static_cast<uint32_t>(__b) << 8);
      const uint32_t __z = __len + (static_cast<uint32_t>(__c) << 2);
      return __shift_mix(__y * __k2 ^ __z * __k3) * __k2;
    }
    return __k2;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
  static _Size __hash_len_17_to_32(const char *__s, _Size __len) {
    const _Size __a = std::__loadword<_Size>(__s) * __k1;
    const _Size __b = std::__loadword<_Size>(__s + 8);
    const _Size __c = std::__loadword<_Size>(__s + __len - 8) * __k2;
    const _Size __d = std::__loadword<_Size>(__s + __len - 16) * __k0;
    return __hash_len_16(__rotate(__a - __b, 43) + __rotate(__c, 30) + __d,
                         __a + __rotate(__b ^ __k3, 20) - __c + __len);
  }

  // Return a 16-byte hash for 48 bytes.  Quick and dirty.
  // Callers do best to use "random-looking" values for a and b.
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
  static pair<_Size, _Size> __weak_hash_len_32_with_seeds(
      _Size __w, _Size __x, _Size __y, _Size __z, _Size __a, _Size __b)
  {
    __a += __w;
    __b = __rotate(__b + __a + __z, 21);
    const _Size __c = __a;
    __a += __x;
    __a += __y;
    __b += __rotate(__a, 44);
    return pair<_Size, _Size>(__a + __z, __b + __c);
  }

  // Return a 16-byte hash for s[0] ... s[31], a, and b.  Quick and dirty.
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
  static pair<_Size, _Size> __weak_hash_len_32_with_seeds(
      const char* __s, _Size __a, _Size __b)
  {
    return __weak_hash_len_32_with_seeds(std::__loadword<_Size>(__s),
                                         std::__loadword<_Size>(__s + 8),
                                         std::__loadword<_Size>(__s + 16),
                                         std::__loadword<_Size>(__s + 24),
                                         __a,
                                         __b);
  }

  // Return an 8-byte hash for 33 to 64 bytes.
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
  static _Size __hash_len_33_to_64(const char *__s, size_t __len) {
    _Size __z = std::__loadword<_Size>(__s + 24);
    _Size __a = std::__loadword<_Size>(__s) +
                (__len + std::__loadword<_Size>(__s + __len - 16)) * __k0;
    _Size __b = __rotate(__a + __z, 52);
    _Size __c = __rotate(__a, 37);
    __a += std::__loadword<_Size>(__s + 8);
    __c += __rotate(__a, 7);
    __a += std::__loadword<_Size>(__s + 16);
    _Size __vf = __a + __z;
    _Size __vs = __b + __rotate(__a, 31) + __c;
    __a = std::__loadword<_Size>(__s + 16) + std::__loadword<_Size>(__s + __len - 32);
    __z += std::__loadword<_Size>(__s + __len - 8);
    __b = __rotate(__a + __z, 52);
    __c = __rotate(__a, 37);
    __a += std::__loadword<_Size>(__s + __len - 24);
    __c += __rotate(__a, 7);
    __a += std::__loadword<_Size>(__s + __len - 16);
    _Size __wf = __a + __z;
    _Size __ws = __b + __rotate(__a, 31) + __c;
    _Size __r = __shift_mix((__vf + __ws) * __k2 + (__wf + __vs) * __k0);
    return __shift_mix(__r * __k0 + __vs) * __k2;
  }
};

template <class _Tp, size_t = sizeof(_Tp) / sizeof(size_t)>
struct __scalar_hash;

template <class _Tp>
struct __scalar_hash<_Tp, 0>
    : public __unary_function<_Tp, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(_Tp __v) const _NOEXCEPT
    {
        union
        {
            _Tp    __t;
            size_t __a;
        } __u;
        __u.__a = 0;
        __u.__t = __v;
        return __u.__a;
    }
};

template <class _Tp>
struct __scalar_hash<_Tp, 1>
    : public __unary_function<_Tp, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(_Tp __v) const _NOEXCEPT
    {
        union
        {
            _Tp    __t;
            size_t __a;
        } __u;
        __u.__t = __v;
        return __u.__a;
    }
};

template <class _Tp>
struct __scalar_hash<_Tp, 2>
    : public __unary_function<_Tp, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(_Tp __v) const _NOEXCEPT
    {
        union
        {
            _Tp __t;
            struct
            {
                size_t __a;
                size_t __b;
            } __s;
        } __u;
        __u.__t = __v;
        return __murmur2_or_cityhash<size_t>()(&__u, sizeof(__u));
    }
};

template <class _Tp>
struct __scalar_hash<_Tp, 3>
    : public __unary_function<_Tp, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(_Tp __v) const _NOEXCEPT
    {
        union
        {
            _Tp __t;
            struct
            {
                size_t __a;
                size_t __b;
                size_t __c;
            } __s;
        } __u;
        __u.__t = __v;
        return __murmur2_or_cityhash<size_t>()(&__u, sizeof(__u));
    }
};

template <class _Tp>
struct __scalar_hash<_Tp, 4>
    : public __unary_function<_Tp, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(_Tp __v) const _NOEXCEPT
    {
        union
        {
            _Tp __t;
            struct
            {
                size_t __a;
                size_t __b;
                size_t __c;
                size_t __d;
            } __s;
        } __u;
        __u.__t = __v;
        return __murmur2_or_cityhash<size_t>()(&__u, sizeof(__u));
    }
};

struct _PairT {
  size_t first;
  size_t second;
};

_LIBCPP_HIDE_FROM_ABI
inline size_t __hash_combine(size_t __lhs, size_t __rhs) _NOEXCEPT {
    typedef __scalar_hash<_PairT> _HashT;
    const _PairT __p = {__lhs, __rhs};
    return _HashT()(__p);
}

template<class _Tp>
struct _LIBCPP_TEMPLATE_VIS hash<_Tp*>
    : public __unary_function<_Tp*, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(_Tp* __v) const _NOEXCEPT
    {
        union
        {
            _Tp* __t;
            size_t __a;
        } __u;
        __u.__t = __v;
        return __murmur2_or_cityhash<size_t>()(&__u, sizeof(__u));
    }
};

template <>
struct _LIBCPP_TEMPLATE_VIS hash<bool>
    : public __unary_function<bool, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(bool __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
};

template <>
struct _LIBCPP_TEMPLATE_VIS hash<char>
    : public __unary_function<char, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(char __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
};

template <>
struct _LIBCPP_TEMPLATE_VIS hash<signed char>
    : public __unary_function<signed char, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(signed char __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
};

template <>
struct _LIBCPP_TEMPLATE_VIS hash<unsigned char>
    : public __unary_function<unsigned char, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(unsigned char __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
};

#ifndef _LIBCPP_HAS_NO_CHAR8_T
template <>
struct _LIBCPP_TEMPLATE_VIS hash<char8_t>
    : public __unary_function<char8_t, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(char8_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
};
#endif // !_LIBCPP_HAS_NO_CHAR8_T
# 439 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3

template <>
struct _LIBCPP_TEMPLATE_VIS hash<char16_t>
    : public __unary_function<char16_t, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(char16_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
};

template <>
struct _LIBCPP_TEMPLATE_VIS hash<char32_t>
    : public __unary_function<char32_t, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(char32_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
};

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
struct _LIBCPP_TEMPLATE_VIS hash<wchar_t>
    : public __unary_function<wchar_t, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(wchar_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
};
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 465 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3

template <>
struct _LIBCPP_TEMPLATE_VIS hash<short>
    : public __unary_function<short, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(short __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
};

template <>
struct _LIBCPP_TEMPLATE_VIS hash<unsigned short>
    : public __unary_function<unsigned short, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(unsigned short __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
};

template <>
struct _LIBCPP_TEMPLATE_VIS hash<int>
    : public __unary_function<int, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(int __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
};

template <>
struct _LIBCPP_TEMPLATE_VIS hash<unsigned int>
    : public __unary_function<unsigned int, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(unsigned int __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
};

template <>
struct _LIBCPP_TEMPLATE_VIS hash<long>
    : public __unary_function<long, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(long __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
};

template <>
struct _LIBCPP_TEMPLATE_VIS hash<unsigned long>
    : public __unary_function<unsigned long, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(unsigned long __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
};

template <>
struct _LIBCPP_TEMPLATE_VIS hash<long long>
    : public __scalar_hash<long long>
{
};

template <>
struct _LIBCPP_TEMPLATE_VIS hash<unsigned long long>
    : public __scalar_hash<unsigned long long>
{
};

#ifndef _LIBCPP_HAS_NO_INT128

template <>
struct _LIBCPP_TEMPLATE_VIS hash<__int128_t>
    : public __scalar_hash<__int128_t>
{
};

template <>
struct _LIBCPP_TEMPLATE_VIS hash<__uint128_t>
    : public __scalar_hash<__uint128_t>
{
};

#endif
# 541 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3

template <>
struct _LIBCPP_TEMPLATE_VIS hash<float>
    : public __scalar_hash<float>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(float __v) const _NOEXCEPT
    {
        // -0.0 and 0.0 should return same hash
       if (__v == 0.0f)
           return 0;
        return __scalar_hash<float>::operator()(__v);
    }
};

template <>
struct _LIBCPP_TEMPLATE_VIS hash<double>
    : public __scalar_hash<double>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(double __v) const _NOEXCEPT
    {
        // -0.0 and 0.0 should return same hash
       if (__v == 0.0)
           return 0;
        return __scalar_hash<double>::operator()(__v);
    }
};

template <>
struct _LIBCPP_TEMPLATE_VIS hash<long double>
    : public __scalar_hash<long double>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(long double __v) const _NOEXCEPT
    {
        // -0.0 and 0.0 should return same hash
        if (__v == 0.0L)
            return 0;
#if 0 /* disabled by -frewrite-includes */
#if defined(__i386__) || (defined(__x86_64__) && defined(__ILP32__))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 581 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
        // Zero out padding bits
        union
        {
            long double __t;
            struct
            {
                size_t __a;
                size_t __b;
                size_t __c;
                size_t __d;
            } __s;
        } __u;
        __u.__s.__a = 0;
        __u.__s.__b = 0;
        __u.__s.__c = 0;
        __u.__s.__d = 0;
        __u.__t = __v;
        return __u.__s.__a ^ __u.__s.__b ^ __u.__s.__c ^ __u.__s.__d;
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__x86_64__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 600 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
        // Zero out padding bits
        union
        {
            long double __t;
            struct
            {
                size_t __a;
                size_t __b;
            } __s;
        } __u;
        __u.__s.__a = 0;
        __u.__s.__b = 0;
        __u.__t = __v;
        return __u.__s.__a ^ __u.__s.__b;
#else
# 615 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
        return __scalar_hash<long double>::operator()(__v);
#endif
# 617 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
    }
};

template <class _Tp, bool = is_enum<_Tp>::value>
struct _LIBCPP_TEMPLATE_VIS __enum_hash
    : public __unary_function<_Tp, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(_Tp __v) const _NOEXCEPT
    {
        typedef typename underlying_type<_Tp>::type type;
        return hash<type>()(static_cast<type>(__v));
    }
};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS __enum_hash<_Tp, false> {
    __enum_hash() = delete;
    __enum_hash(__enum_hash const&) = delete;
    __enum_hash& operator=(__enum_hash const&) = delete;
};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS hash : public __enum_hash<_Tp>
{
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 644 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3

template <>
struct _LIBCPP_TEMPLATE_VIS hash<nullptr_t>
  : public __unary_function<nullptr_t, size_t>
{
    _LIBCPP_HIDE_FROM_ABI
    size_t operator()(nullptr_t) const _NOEXCEPT {
        return 662607004ull;
    }
};
#endif
# 655 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3

#ifndef _LIBCPP_CXX03_LANG
template <class _Key, class _Hash>
using __check_hash_requirements _LIBCPP_NODEBUG = integral_constant<bool,
    is_copy_constructible<_Hash>::value &&
    is_move_constructible<_Hash>::value &&
    __invokable_r<size_t, _Hash, _Key const&>::value
>;

template <class _Key, class _Hash = hash<_Key> >
using __has_enabled_hash _LIBCPP_NODEBUG = integral_constant<bool,
    __check_hash_requirements<_Key, _Hash>::value &&
    is_default_constructible<_Hash>::value
>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 671 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
template <class _Type, class>
using __enable_hash_helper_imp _LIBCPP_NODEBUG = _Type;

template <class _Type, class ..._Keys>
using __enable_hash_helper _LIBCPP_NODEBUG = __enable_hash_helper_imp<_Type,
  __enable_if_t<__all<__has_enabled_hash<_Keys>::value...>::value>
>;
#else
# 679 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
template <class _Type, class ...>
using __enable_hash_helper _LIBCPP_NODEBUG = _Type;
#endif
# 682 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3

#endif // !_LIBCPP_CXX03_LANG
# 684 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_HASH_H
# 688 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/hash.h" 3
#endif /* hash.h expanded by -frewrite-includes */
# 215 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 215 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* operations.h expanded by -frewrite-includes */
#include <__functional/operations.h>
#else /* operations.h expanded by -frewrite-includes */
# 216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_OPERATIONS_H
#define _LIBCPP___FUNCTIONAL_OPERATIONS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* binary_function.h expanded by -frewrite-includes */
#include <__functional/binary_function.h>
#else /* binary_function.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_function.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_BINARY_FUNCTION_H
#define _LIBCPP___FUNCTIONAL_BINARY_FUNCTION_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_function.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_function.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_function.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_function.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_function.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_function.h" 3

template <class _Arg1, class _Arg2, class _Result>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binary_function
{
    typedef _Arg1   first_argument_type;
    typedef _Arg2   second_argument_type;
    typedef _Result result_type;
};

#endif // _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_function.h" 3

template <class _Arg1, class _Arg2, class _Result> struct __binary_function_keep_layout_base {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_function.h" 3
  using first_argument_type _LIBCPP_DEPRECATED_IN_CXX17 = _Arg1;
  using second_argument_type _LIBCPP_DEPRECATED_IN_CXX17 = _Arg2;
  using result_type _LIBCPP_DEPRECATED_IN_CXX17 = _Result;
#endif
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_function.h" 3
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_function.h" 3
_LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")
template <class _Arg1, class _Arg2, class _Result>
using __binary_function = binary_function<_Arg1, _Arg2, _Result>;
_LIBCPP_DIAGNOSTIC_POP
#else
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_function.h" 3
template <class _Arg1, class _Arg2, class _Result>
using __binary_function = __binary_function_keep_layout_base<_Arg1, _Arg2, _Result>;
#endif
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_function.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_BINARY_FUNCTION_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_function.h" 3
#endif /* binary_function.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* operation_traits.h expanded by -frewrite-includes */
#include <__type_traits/operation_traits.h>
#else /* operation_traits.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/operation_traits.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_OPERATION_TRAITS_H
#define _LIBCPP___TYPE_TRAITS_OPERATION_TRAITS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/operation_traits.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/operation_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/operation_traits.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/operation_traits.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/operation_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/operation_traits.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/operation_traits.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Pred, class _Lhs, class _Rhs>
struct __is_trivial_plus_operation : false_type {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_OPERATION_TRAITS_H
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/operation_traits.h" 3
#endif /* operation_traits.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* predicate_traits.h expanded by -frewrite-includes */
#include <__type_traits/predicate_traits.h>
#else /* predicate_traits.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/predicate_traits.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_PREDICATE_TRAITS
#define _LIBCPP___TYPE_TRAITS_PREDICATE_TRAITS

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/predicate_traits.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/predicate_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/predicate_traits.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/predicate_traits.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/predicate_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/predicate_traits.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/predicate_traits.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Pred, class _Lhs, class _Rhs>
struct __is_trivial_equality_predicate : false_type {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_PREDICATE_TRAITS
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/predicate_traits.h" 3
#endif /* predicate_traits.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Arithmetic operations

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS plus
    : __binary_function<_Tp, _Tp, _Tp>
{
    typedef _Tp __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
        {return __x + __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(plus);

template <class _Tp>
struct __is_trivial_plus_operation<plus<_Tp>, _Tp, _Tp> : true_type {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp, class _Up>
struct __is_trivial_plus_operation<plus<>, _Tp, _Up> : true_type {};
#endif
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS plus<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS minus
    : __binary_function<_Tp, _Tp, _Tp>
{
    typedef _Tp __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
        {return __x - __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(minus);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS minus<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 100 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS multiplies
    : __binary_function<_Tp, _Tp, _Tp>
{
    typedef _Tp __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
        {return __x * __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(multiplies);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS multiplies<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 123 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 127 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS divides
    : __binary_function<_Tp, _Tp, _Tp>
{
    typedef _Tp __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
        {return __x / __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(divides);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 140 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS divides<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 154 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 156 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS modulus
    : __binary_function<_Tp, _Tp, _Tp>
{
    typedef _Tp __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
        {return __x % __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(modulus);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 169 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS modulus<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 181 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 183 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 185 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 187 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS negate
    : __unary_function<_Tp, _Tp>
{
    typedef _Tp __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    _Tp operator()(const _Tp& __x) const
        {return -__x;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(negate);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 198 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS negate<void>
{
    template <class _Tp>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_Tp&& __x) const
        noexcept(noexcept(- _VSTD::forward<_Tp>(__x)))
        -> decltype(      - _VSTD::forward<_Tp>(__x))
        { return          - _VSTD::forward<_Tp>(__x); }
    typedef void is_transparent;
};
#endif
# 210 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

// Bitwise operations

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS bit_and
    : __binary_function<_Tp, _Tp, _Tp>
{
    typedef _Tp __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
        {return __x & __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_and);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS bit_and<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 241 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 243 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
struct _LIBCPP_TEMPLATE_VIS bit_not
    : __unary_function<_Tp, _Tp>
{
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    _Tp operator()(const _Tp& __x) const
        {return ~__x;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_not);

template <>
struct _LIBCPP_TEMPLATE_VIS bit_not<void>
{
    template <class _Tp>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_Tp&& __x) const
        noexcept(noexcept(~_VSTD::forward<_Tp>(__x)))
        -> decltype(      ~_VSTD::forward<_Tp>(__x))
        { return          ~_VSTD::forward<_Tp>(__x); }
    typedef void is_transparent;
};
#endif
# 265 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 267 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 269 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 271 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS bit_or
    : __binary_function<_Tp, _Tp, _Tp>
{
    typedef _Tp __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
        {return __x | __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_or);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 282 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS bit_or<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 294 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 296 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 298 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 300 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS bit_xor
    : __binary_function<_Tp, _Tp, _Tp>
{
    typedef _Tp __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
        {return __x ^ __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_xor);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 311 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS bit_xor<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 323 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

// Comparison operations

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 327 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 329 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 331 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS equal_to
    : __binary_function<_Tp, _Tp, bool>
{
    typedef bool __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Tp& __x, const _Tp& __y) const
        {return __x == __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(equal_to);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 342 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS equal_to<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 354 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

template <class _Tp>
struct __is_trivial_equality_predicate<equal_to<_Tp>, _Tp, _Tp> : true_type {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 359 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
struct __is_trivial_equality_predicate<equal_to<>, _Tp, _Tp> : true_type {};
#endif
# 362 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 364 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 366 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 368 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS not_equal_to
    : __binary_function<_Tp, _Tp, bool>
{
    typedef bool __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Tp& __x, const _Tp& __y) const
        {return __x != __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(not_equal_to);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 379 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS not_equal_to<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 391 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 393 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 395 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 397 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS less
    : __binary_function<_Tp, _Tp, bool>
{
    typedef bool __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Tp& __x, const _Tp& __y) const
        {return __x < __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 408 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS less<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 420 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 422 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 424 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 426 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS less_equal
    : __binary_function<_Tp, _Tp, bool>
{
    typedef bool __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Tp& __x, const _Tp& __y) const
        {return __x <= __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less_equal);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 437 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS less_equal<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 449 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 451 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 453 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 455 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS greater_equal
    : __binary_function<_Tp, _Tp, bool>
{
    typedef bool __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Tp& __x, const _Tp& __y) const
        {return __x >= __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater_equal);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 466 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS greater_equal<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 478 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 480 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 482 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 484 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS greater
    : __binary_function<_Tp, _Tp, bool>
{
    typedef bool __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Tp& __x, const _Tp& __y) const
        {return __x > __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 495 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS greater<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 507 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

// Logical operations

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 511 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 513 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 515 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS logical_and
    : __binary_function<_Tp, _Tp, bool>
{
    typedef bool __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Tp& __x, const _Tp& __y) const
        {return __x && __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_and);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 526 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS logical_and<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 538 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 540 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 542 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 544 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS logical_not
    : __unary_function<_Tp, bool>
{
    typedef bool __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Tp& __x) const
        {return !__x;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_not);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 555 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS logical_not<void>
{
    template <class _Tp>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_Tp&& __x) const
        noexcept(noexcept(!_VSTD::forward<_Tp>(__x)))
        -> decltype(      !_VSTD::forward<_Tp>(__x))
        { return          !_VSTD::forward<_Tp>(__x); }
    typedef void is_transparent;
};
#endif
# 567 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 569 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp = void>
#else
# 571 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <class _Tp>
#endif
# 573 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
struct _LIBCPP_TEMPLATE_VIS logical_or
    : __binary_function<_Tp, _Tp, bool>
{
    typedef bool __result_type;  // used by valarray
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Tp& __x, const _Tp& __y) const
        {return __x || __y;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_or);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 584 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS logical_or<void>
{
    template <class _T1, class _T2>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u)))
        -> decltype(      _VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u))
        { return          _VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u); }
    typedef void is_transparent;
};
#endif
# 596 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_OPERATIONS_H
# 600 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/operations.h" 3
#endif /* operations.h expanded by -frewrite-includes */
# 217 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 217 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 219 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_const.h>
#endif /* expanded by -frewrite-includes */
# 219 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_cv.h>
#endif /* expanded by -frewrite-includes */
# 220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 221 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_pointer.h>
#endif /* expanded by -frewrite-includes */
# 221 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 222 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_volatile.h>
#endif /* expanded by -frewrite-includes */
# 222 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 223 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* dependent_type.h expanded by -frewrite-includes */
#include <__type_traits/dependent_type.h>
#else /* dependent_type.h expanded by -frewrite-includes */
# 223 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/dependent_type.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_DEPENDENT_TYPE_H
#define _LIBCPP___TYPE_TRAITS_DEPENDENT_TYPE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/dependent_type.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/dependent_type.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/dependent_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/dependent_type.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/dependent_type.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, bool>
struct _LIBCPP_TEMPLATE_VIS __dependent_type : public _Tp {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_DEPENDENT_TYPE_H
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/dependent_type.h" 3
#endif /* dependent_type.h expanded by -frewrite-includes */
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_array.h>
#endif /* expanded by -frewrite-includes */
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 225 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_destructible.h>
#endif /* expanded by -frewrite-includes */
# 225 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 226 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 226 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_trivially_copy_assignable.h expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copy_assignable.h>
#else /* is_trivially_copy_assignable.h expanded by -frewrite-includes */
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_assignable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPY_ASSIGNABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPY_ASSIGNABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_assignable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_const.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_assignable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_assignable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_assignable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_assignable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_assignable.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_assignable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_assignable
    : public integral_constant<bool,
                               __is_trivially_assignable(__add_lvalue_reference_t<_Tp>,
                                                         __add_lvalue_reference_t<typename add_const<_Tp>::type>)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_assignable.h" 3
template <class _Tp>
inline constexpr bool is_trivially_copy_assignable_v = is_trivially_copy_assignable<_Tp>::value;
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_assignable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPY_ASSIGNABLE_H
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_assignable.h" 3
#endif /* is_trivially_copy_assignable.h expanded by -frewrite-includes */
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_trivially_copy_constructible.h expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copy_constructible.h>
#else /* is_trivially_copy_constructible.h expanded by -frewrite-includes */
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_constructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_constructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_constructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_constructible.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_constructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_constructible.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_constructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_constructible
    : public integral_constant<bool, __is_trivially_constructible(_Tp, __add_lvalue_reference_t<const _Tp>)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_constructible.h" 3
template <class _Tp>
inline constexpr bool is_trivially_copy_constructible_v = is_trivially_copy_constructible<_Tp>::value;
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_constructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_H
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copy_constructible.h" 3
#endif /* is_trivially_copy_constructible.h expanded by -frewrite-includes */
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_trivially_destructible.h expanded by -frewrite-includes */
#include <__type_traits/is_trivially_destructible.h>
#else /* is_trivially_destructible.h expanded by -frewrite-includes */
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_DESTRUCTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_DESTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_destructible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_trivially_destructible)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible
    : public integral_constant<bool, __is_trivially_destructible(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif __has_builtin(__has_trivial_destructor)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible
    : public integral_constant<bool, is_destructible<_Tp>::value&& __has_trivial_destructor(_Tp)> {};

#else
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3

#  error is_trivially_destructible is not implemented

#endif // __has_builtin(__is_trivially_destructible)
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3
template <class _Tp>
inline constexpr bool is_trivially_destructible_v = is_trivially_destructible<_Tp>::value;
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_DESTRUCTIBLE_H
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_destructible.h" 3
#endif /* is_trivially_destructible.h expanded by -frewrite-includes */
# 230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_trivially_move_assignable.h expanded by -frewrite-includes */
#include <__type_traits/is_trivially_move_assignable.h>
#else /* is_trivially_move_assignable.h expanded by -frewrite-includes */
# 230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_assignable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_MOVE_ASSIGNABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_MOVE_ASSIGNABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_assignable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_assignable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_rvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_assignable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_assignable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_assignable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_assignable.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_assignable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_trivially_move_assignable
    : public integral_constant<
          bool,
          __is_trivially_assignable(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_assignable.h" 3
template <class _Tp>
inline constexpr bool is_trivially_move_assignable_v = is_trivially_move_assignable<_Tp>::value;
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_assignable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_MOVE_ASSIGNABLE_H
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_assignable.h" 3
#endif /* is_trivially_move_assignable.h expanded by -frewrite-includes */
# 231 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_trivially_move_constructible.h expanded by -frewrite-includes */
#include <__type_traits/is_trivially_move_constructible.h>
#else /* is_trivially_move_constructible.h expanded by -frewrite-includes */
# 231 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_constructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_constructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_rvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_constructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_constructible.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_constructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_constructible.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_constructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_trivially_move_constructible
    : public integral_constant<bool, __is_trivially_constructible(_Tp, __add_rvalue_reference_t<_Tp>)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_constructible.h" 3
template <class _Tp>
inline constexpr bool is_trivially_move_constructible_v = is_trivially_move_constructible<_Tp>::value;
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_constructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_H
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_move_constructible.h" 3
#endif /* is_trivially_move_constructible.h expanded by -frewrite-includes */
# 232 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_void.h>
#endif /* expanded by -frewrite-includes */
# 232 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 233 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_const.h>
#endif /* expanded by -frewrite-includes */
# 233 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 234 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* type_identity.h expanded by -frewrite-includes */
#include <__type_traits/type_identity.h>
#else /* type_identity.h expanded by -frewrite-includes */
# 234 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_identity.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_TYPE_IDENTITY_H
#define _LIBCPP___TYPE_TRAITS_TYPE_IDENTITY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_identity.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_identity.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_identity.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_identity.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_identity.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct __type_identity {
  typedef _Tp type;
};

template <class _Tp>
using __type_identity_t _LIBCPP_NODEBUG = typename __type_identity<_Tp>::type;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_identity.h" 3
template <class _Tp>
struct type_identity {
  typedef _Tp type;
};
template <class _Tp>
using type_identity_t = typename type_identity<_Tp>::type;
#endif
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_identity.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_TYPE_IDENTITY_H
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/type_identity.h" 3
#endif /* type_identity.h expanded by -frewrite-includes */
# 235 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/void_t.h>
#endif /* expanded by -frewrite-includes */
# 235 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 236 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 236 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 237 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 237 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 238 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* in_place.h expanded by -frewrite-includes */
#include <__utility/in_place.h>
#else /* in_place.h expanded by -frewrite-includes */
# 238 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/in_place.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_IN_PLACE_H
#define _LIBCPP___UTILITY_IN_PLACE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/in_place.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/in_place.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/in_place.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/in_place.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/in_place.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/in_place.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/in_place.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/in_place.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/in_place.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/in_place.h" 3

struct _LIBCPP_EXPORTED_FROM_ABI in_place_t {
  explicit in_place_t() = default;
};
inline constexpr in_place_t in_place{};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS in_place_type_t {
  _LIBCPP_HIDE_FROM_ABI explicit in_place_type_t() = default;
};
template <class _Tp>
inline constexpr in_place_type_t<_Tp> in_place_type{};

template <size_t _Idx>
struct _LIBCPP_TEMPLATE_VIS in_place_index_t {
  _LIBCPP_HIDE_FROM_ABI explicit in_place_index_t() = default;
};
template <size_t _Idx>
inline constexpr in_place_index_t<_Idx> in_place_index{};

template <class _Tp> struct __is_inplace_type_imp : false_type {};
template <class _Tp> struct __is_inplace_type_imp<in_place_type_t<_Tp>> : true_type {};

template <class _Tp>
using __is_inplace_type = __is_inplace_type_imp<__remove_cvref_t<_Tp>>;

template <class _Tp> struct __is_inplace_index_imp : false_type {};
template <size_t _Idx> struct __is_inplace_index_imp<in_place_index_t<_Idx>> : true_type {};

template <class _Tp>
using __is_inplace_index = __is_inplace_index_imp<__remove_cvref_t<_Tp>>;

#endif // _LIBCPP_STD_VER >= 17
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/in_place.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___UTILITY_IN_PLACE_H
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/in_place.h" 3
#endif /* in_place.h expanded by -frewrite-includes */
# 239 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 239 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 240 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 240 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 241 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* monostate.h expanded by -frewrite-includes */
#include <__variant/monostate.h>
#else /* monostate.h expanded by -frewrite-includes */
# 241 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___VARIANT_MONOSTATE_H
#define _LIBCPP___VARIANT_MONOSTATE_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/hash.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3

struct _LIBCPP_TEMPLATE_VIS monostate {};

_LIBCPP_HIDE_FROM_ABI constexpr bool operator==(monostate, monostate) noexcept { return true; }

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3

_LIBCPP_HIDE_FROM_ABI constexpr strong_ordering operator<=>(monostate, monostate) noexcept {
  return strong_ordering::equal;
}

#  else // _LIBCPP_STD_VER >= 20
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3

_LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(monostate, monostate) noexcept { return false; }

_LIBCPP_HIDE_FROM_ABI constexpr bool operator<(monostate, monostate) noexcept { return false; }

_LIBCPP_HIDE_FROM_ABI constexpr bool operator>(monostate, monostate) noexcept { return false; }

_LIBCPP_HIDE_FROM_ABI constexpr bool operator<=(monostate, monostate) noexcept { return true; }

_LIBCPP_HIDE_FROM_ABI constexpr bool operator>=(monostate, monostate) noexcept { return true; }

#  endif // _LIBCPP_STD_VER >= 20
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3

template <>
struct _LIBCPP_TEMPLATE_VIS hash<monostate> {
  using argument_type = monostate;
  using result_type = size_t;

  inline _LIBCPP_HIDE_FROM_ABI result_type operator()(const argument_type&) const _NOEXCEPT {
    return 66740831; // return a fundamentally attractive random value.
  }
};

#endif // _LIBCPP_STD_VER >= 17
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___VARIANT_MONOSTATE_H
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__variant/monostate.h" 3
#endif /* monostate.h expanded by -frewrite-includes */
# 242 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__verbose_abort>
#endif /* expanded by -frewrite-includes */
# 242 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 243 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* initializer_list expanded by -frewrite-includes */
#include <initializer_list>
#else /* initializer_list expanded by -frewrite-includes */
# 243 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/initializer_list" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_INITIALIZER_LIST
#define _LIBCPP_INITIALIZER_LIST

/*
    initializer_list synopsis

namespace std
{

template<class E>
class initializer_list
{
public:
    typedef E        value_type;
    typedef const E& reference;
    typedef const E& const_reference;
    typedef size_t   size_type;

    typedef const E* iterator;
    typedef const E* const_iterator;

    initializer_list() noexcept; // constexpr in C++14

    size_t   size()  const noexcept; // constexpr in C++14
    const E* begin() const noexcept; // constexpr in C++14
    const E* end()   const noexcept; // constexpr in C++14
};

template<class E> const E* begin(initializer_list<E> il) noexcept; // constexpr in C++14
template<class E> const E* end(initializer_list<E> il) noexcept; // constexpr in C++14

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/initializer_list" 3
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/initializer_list" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/initializer_list" 3
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/initializer_list" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/initializer_list" 3
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/initializer_list" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/initializer_list" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/initializer_list" 3
#endif
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/initializer_list" 3

namespace std  // purposefully not versioned
{

#ifndef _LIBCPP_CXX03_LANG

template<class _Ep>
class _LIBCPP_TEMPLATE_VIS initializer_list
{
    const _Ep* __begin_;
    size_t    __size_;

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX14
    initializer_list(const _Ep* __b, size_t __s) _NOEXCEPT
        : __begin_(__b),
          __size_(__s)
        {}
public:
    typedef _Ep        value_type;
    typedef const _Ep& reference;
    typedef const _Ep& const_reference;
    typedef size_t    size_type;

    typedef const _Ep* iterator;
    typedef const _Ep* const_iterator;

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX14
    initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {}

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX14
    size_t    size()  const _NOEXCEPT {return __size_;}

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX14
    const _Ep* begin() const _NOEXCEPT {return __begin_;}

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX14
    const _Ep* end()   const _NOEXCEPT {return __begin_ + __size_;}
};

template<class _Ep>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR_SINCE_CXX14
const _Ep*
begin(initializer_list<_Ep> __il) _NOEXCEPT
{
    return __il.begin();
}

template<class _Ep>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR_SINCE_CXX14
const _Ep*
end(initializer_list<_Ep> __il) _NOEXCEPT
{
    return __il.end();
}

#endif // !defined(_LIBCPP_CXX03_LANG)
# 115 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/initializer_list" 3

} // namespace std

#endif // _LIBCPP_INITIALIZER_LIST
# 119 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/initializer_list" 3
#endif /* initializer_list expanded by -frewrite-includes */
# 244 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 244 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 245 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* new expanded by -frewrite-includes */
#include <new>
#else /* new expanded by -frewrite-includes */
# 245 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_NEW
#define _LIBCPP_NEW

/*
    new synopsis

namespace std
{

class bad_alloc
    : public exception
{
public:
    bad_alloc() noexcept;
    bad_alloc(const bad_alloc&) noexcept;
    bad_alloc& operator=(const bad_alloc&) noexcept;
    virtual const char* what() const noexcept;
};

class bad_array_new_length : public bad_alloc // C++14
{
public:
    bad_array_new_length() noexcept;
};

enum class align_val_t : size_t {}; // C++17

struct destroying_delete_t { // C++20
  explicit destroying_delete_t() = default;
};
inline constexpr destroying_delete_t destroying_delete{}; // C++20

struct nothrow_t { explicit nothrow_t() = default; };
extern const nothrow_t nothrow;
typedef void (*new_handler)();
new_handler set_new_handler(new_handler new_p) noexcept;
new_handler get_new_handler() noexcept;

// 21.6.4, pointer optimization barrier
template <class T> constexpr T* launder(T* p) noexcept; // C++17
}  // std

void* operator new(std::size_t size);                                   // replaceable, nodiscard in C++20
void* operator new(std::size_t size, std::align_val_t alignment);       // replaceable, C++17, nodiscard in C++20
void* operator new(std::size_t size, const std::nothrow_t&) noexcept;   // replaceable, nodiscard in C++20
void* operator new(std::size_t size, std::align_val_t alignment,
                   const std::nothrow_t&) noexcept;                     // replaceable, C++17, nodiscard in C++20
void  operator delete(void* ptr) noexcept;                              // replaceable
void  operator delete(void* ptr, std::size_t size) noexcept;            // replaceable, C++14
void  operator delete(void* ptr, std::align_val_t alignment) noexcept;  // replaceable, C++17
void  operator delete(void* ptr, std::size_t size,
                      std::align_val_t alignment) noexcept;             // replaceable, C++17
void  operator delete(void* ptr, const std::nothrow_t&) noexcept;       // replaceable
void  operator delete(void* ptr, std:align_val_t alignment,
                      const std::nothrow_t&) noexcept;                  // replaceable, C++17

void* operator new[](std::size_t size);                                 // replaceable, nodiscard in C++20
void* operator new[](std::size_t size,
                     std::align_val_t alignment) noexcept;              // replaceable, C++17, nodiscard in C++20
void* operator new[](std::size_t size, const std::nothrow_t&) noexcept; // replaceable, nodiscard in C++20
void* operator new[](std::size_t size, std::align_val_t alignment,
                     const std::nothrow_t&) noexcept;                   // replaceable, C++17, nodiscard in C++20
void  operator delete[](void* ptr) noexcept;                            // replaceable
void  operator delete[](void* ptr, std::size_t size) noexcept;          // replaceable, C++14
void  operator delete[](void* ptr,
                        std::align_val_t alignment) noexcept;           // replaceable, C++17
void  operator delete[](void* ptr, std::size_t size,
                        std::align_val_t alignment) noexcept;           // replaceable, C++17
void  operator delete[](void* ptr, const std::nothrow_t&) noexcept;     // replaceable
void  operator delete[](void* ptr, std::align_val_t alignment,
                        const std::nothrow_t&) noexcept;                // replaceable, C++17

void* operator new  (std::size_t size, void* ptr) noexcept;             // nodiscard in C++20
void* operator new[](std::size_t size, void* ptr) noexcept;             // nodiscard in C++20
void  operator delete  (void* ptr, void*) noexcept;
void  operator delete[](void* ptr, void*) noexcept;

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#if 0 /* expanded by -frewrite-includes */
#include <__exception/exception.h>
#endif /* expanded by -frewrite-includes */
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# 93 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alignment_of.h expanded by -frewrite-includes */
#include <__type_traits/alignment_of.h>
#else /* alignment_of.h expanded by -frewrite-includes */
# 93 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/alignment_of.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_ALIGNMENT_OF_H
#define _LIBCPP___TYPE_TRAITS_ALIGNMENT_OF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/alignment_of.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/alignment_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/alignment_of.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/alignment_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/alignment_of.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/alignment_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/alignment_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/alignment_of.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/alignment_of.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS alignment_of : public integral_constant<size_t, _LIBCPP_ALIGNOF(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/alignment_of.h" 3
template <class _Tp>
inline constexpr size_t alignment_of_v = _LIBCPP_ALIGNOF(_Tp);
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/alignment_of.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_ALIGNMENT_OF_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/alignment_of.h" 3
#endif /* alignment_of.h expanded by -frewrite-includes */
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_function.h>
#endif /* expanded by -frewrite-includes */
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#if 0 /* expanded by -frewrite-includes */
#include <__verbose_abort>
#endif /* expanded by -frewrite-includes */
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cstdlib expanded by -frewrite-includes */
#include <cstdlib>
#else /* cstdlib expanded by -frewrite-includes */
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CSTDLIB
#define _LIBCPP_CSTDLIB

/*
    cstdlib synopsis

Macros:

    EXIT_FAILURE
    EXIT_SUCCESS
    MB_CUR_MAX
    NULL
    RAND_MAX

namespace std
{

Types:

    size_t
    div_t
    ldiv_t
    lldiv_t                                                               // C99

double    atof (const char* nptr);
int       atoi (const char* nptr);
long      atol (const char* nptr);
long long atoll(const char* nptr);                                        // C99
double             strtod  (const char* restrict nptr, char** restrict endptr);
float              strtof  (const char* restrict nptr, char** restrict endptr); // C99
long double        strtold (const char* restrict nptr, char** restrict endptr); // C99
long               strtol  (const char* restrict nptr, char** restrict endptr, int base);
long long          strtoll (const char* restrict nptr, char** restrict endptr, int base); // C99
unsigned long      strtoul (const char* restrict nptr, char** restrict endptr, int base);
unsigned long long strtoull(const char* restrict nptr, char** restrict endptr, int base); // C99
int rand(void);
void srand(unsigned int seed);
void* calloc(size_t nmemb, size_t size);
void free(void* ptr);
void* malloc(size_t size);
void* realloc(void* ptr, size_t size);
void abort(void);
int atexit(void (*func)(void));
void exit(int status);
void _Exit(int status);
char* getenv(const char* name);
int system(const char* string);
void* bsearch(const void* key, const void* base, size_t nmemb, size_t size,
              int (*compar)(const void *, const void *));
void qsort(void* base, size_t nmemb, size_t size,
           int (*compar)(const void *, const void *));
int         abs(      int j);
long        abs(     long j);
long long   abs(long long j);                                             // C++0X
long       labs(     long j);
long long llabs(long long j);                                             // C99
div_t     div(      int numer,       int denom);
ldiv_t    div(     long numer,      long denom);
lldiv_t   div(long long numer, long long denom);                          // C++0X
ldiv_t   ldiv(     long numer,      long denom);
lldiv_t lldiv(long long numer, long long denom);                          // C99
int mblen(const char* s, size_t n);
int mbtowc(wchar_t* restrict pwc, const char* restrict s, size_t n);
int wctomb(char* s, wchar_t wchar);
size_t mbstowcs(wchar_t* restrict pwcs, const char* restrict s, size_t n);
size_t wcstombs(char* restrict s, const wchar_t* restrict pwcs, size_t n);
int at_quick_exit(void (*func)(void))                                     // C++11
void quick_exit(int status);                                              // C++11
void *aligned_alloc(size_t alignment, size_t size);                       // C11

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 3
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 3
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdlib.h expanded by -frewrite-includes */
#include <stdlib.h>
#else /* stdlib.h expanded by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_malloc_and_calloc)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 11 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* expanded by -frewrite-includes */
#include_next <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_STDLIB_H)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#define _LIBCPP_STDLIB_H

/*
    stdlib.h synopsis

Macros:

    EXIT_FAILURE
    EXIT_SUCCESS
    MB_CUR_MAX
    NULL
    RAND_MAX

Types:

    size_t
    div_t
    ldiv_t
    lldiv_t                                                               // C99

double    atof (const char* nptr);
int       atoi (const char* nptr);
long      atol (const char* nptr);
long long atoll(const char* nptr);                                        // C99
double             strtod  (const char* restrict nptr, char** restrict endptr);
float              strtof  (const char* restrict nptr, char** restrict endptr); // C99
long double        strtold (const char* restrict nptr, char** restrict endptr); // C99
long               strtol  (const char* restrict nptr, char** restrict endptr, int base);
long long          strtoll (const char* restrict nptr, char** restrict endptr, int base); // C99
unsigned long      strtoul (const char* restrict nptr, char** restrict endptr, int base);
unsigned long long strtoull(const char* restrict nptr, char** restrict endptr, int base); // C99
int rand(void);
void srand(unsigned int seed);
void* calloc(size_t nmemb, size_t size);
void free(void* ptr);
void* malloc(size_t size);
void* realloc(void* ptr, size_t size);
void abort(void);
int atexit(void (*func)(void));
void exit(int status);
void _Exit(int status);
char* getenv(const char* name);
int system(const char* string);
void* bsearch(const void* key, const void* base, size_t nmemb, size_t size,
              int (*compar)(const void *, const void *));
void qsort(void* base, size_t nmemb, size_t size,
           int (*compar)(const void *, const void *));
int         abs(      int j);
long        abs(     long j);
long long   abs(long long j);                                             // C++0X
long       labs(     long j);
long long llabs(long long j);                                             // C99
div_t     div(      int numer,       int denom);
ldiv_t    div(     long numer,      long denom);
lldiv_t   div(long long numer, long long denom);                          // C++0X
ldiv_t   ldiv(     long numer,      long denom);
lldiv_t lldiv(long long numer, long long denom);                          // C99
int mblen(const char* s, size_t n);
int mbtowc(wchar_t* restrict pwc, const char* restrict s, size_t n);
int wctomb(char* s, wchar_t wchar);
size_t mbstowcs(wchar_t* restrict pwcs, const char* restrict s, size_t n);
size_t wcstombs(char* restrict s, const wchar_t* restrict pwcs, size_t n);
int at_quick_exit(void (*func)(void))                                     // C++11
void quick_exit(int status);                                              // C++11
void *aligned_alloc(size_t alignment, size_t size);                       // C11

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<stdlib.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdlib.h expanded by -frewrite-includes */
#    include_next <stdlib.h>
#else /* stdlib.h expanded by -frewrite-includes */
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
# 1 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 1 3 4
#ifndef SYSROOT_STDLIB_H_
#define SYSROOT_STDLIB_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <bits/null.h>
#endif /* expanded by -frewrite-includes */
# 10 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4
# 11 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4

#define __NEED_size_t
#define __NEED_wchar_t

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 15 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 16 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 2 3 4

int atoi(const char*);
long atol(const char*);
long long atoll(const char*);
double atof(const char*);

float strtof(const char* __restrict, char** __restrict);
double strtod(const char* __restrict, char** __restrict);
long double strtold(const char* __restrict, char** __restrict);

long strtol(const char* __restrict, char** __restrict, int);
unsigned long strtoul(const char* __restrict, char** __restrict, int);
long long strtoll(const char* __restrict, char** __restrict, int);
unsigned long long strtoull(const char* __restrict, char** __restrict, int);

int rand(void);
void srand(unsigned);

void* malloc(size_t) __nothrow_fn;
void* calloc(size_t, size_t) __nothrow_fn;
void* realloc(void*, size_t) __nothrow_fn;
void free(void*) __nothrow_fn;
void* aligned_alloc(size_t alignment, size_t size) __nothrow_fn;

_Noreturn void abort(void);
int atexit(void (*)(void));
_Noreturn void exit(int);
_Noreturn void _Exit(int);
int at_quick_exit(void (*)(void));
_Noreturn void quick_exit(int);

char* getenv(const char*);

int system(const char*);

void* bsearch(const void*, const void*, size_t, size_t, int (*)(const void*, const void*));
void qsort(void*, size_t, size_t, int (*)(const void*, const void*));

int abs(int);
long labs(long);
long long llabs(long long);

typedef struct {
  int quot, rem;
} div_t;
typedef struct {
  long quot, rem;
} ldiv_t;
typedef struct {
  long long quot, rem;
} lldiv_t;

div_t div(int, int);
ldiv_t ldiv(long, long);
lldiv_t lldiv(long long, long long);

int mblen(const char*, size_t);
int mbtowc(wchar_t* __restrict, const char* __restrict, size_t);
int wctomb(char*, wchar_t);
size_t mbstowcs(wchar_t* __restrict, const char* __restrict, size_t);
size_t wcstombs(char* __restrict, const wchar_t* __restrict, size_t);

#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0

size_t __ctype_get_mb_cur_max(void);
#define MB_CUR_MAX (__ctype_get_mb_cur_max())

#define RAND_MAX (0x7fffffff)

#if 0 /* disabled by -frewrite-includes */
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
    defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4

#define WNOHANG 1
#define WUNTRACED 2

#define WEXITSTATUS(s) (((s)&0xff00) >> 8)
#define WTERMSIG(s) ((s)&0x7f)
#define WSTOPSIG(s) WEXITSTATUS(s)
#define WIFEXITED(s) (!WTERMSIG(s))
#define WIFSTOPPED(s) ((short)((((s)&0xffff) * 0x10001) >> 8) > 0x7f00)
#define WIFSIGNALED(s) (((s)&0xffff) - 1U < 0xffu)

int posix_memalign(void**, size_t, size_t) __nothrow_fn;
int setenv(const char*, const char*, int);
int unsetenv(const char*);
int mkstemp(char*);
int mkostemp(char*, int);
char* mkdtemp(char*);
int getsubopt(char**, char* const*, char**);
int rand_r(unsigned*);

#endif
# 109 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 111 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4
char* realpath(const char* __restrict, char* __restrict);
long int random(void);
void srandom(unsigned int);
char* initstate(unsigned int, char*, size_t);
char* setstate(char*);
int putenv(char*);
int posix_openpt(int);
int grantpt(int);
int unlockpt(int);
char* ptsname(int);
long a64l(const char*);
void setkey(const char*);
double drand48(void);
double erand48(unsigned short[3]);
long int lrand48(void);
long int nrand48(unsigned short[3]);
long mrand48(void);
long jrand48(unsigned short[3]);
void srand48(long);
unsigned short* seed48(unsigned short[3]);
void lcong48(unsigned short[7]);
#endif
# 133 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 135 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alloca.h expanded by -frewrite-includes */
#include <alloca.h>
#else /* alloca.h expanded by -frewrite-includes */
# 135 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/alloca.h" 1 3 4
#ifndef SYSROOT_ALLOCA_H_
#define SYSROOT_ALLOCA_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/alloca.h" 3 4

#define __NEED_size_t
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 9 "gen/zircon/public/sysroot/cpp/include/alloca.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 10 "gen/zircon/public/sysroot/cpp/include/alloca.h" 2 3 4

void* alloca(size_t);

#ifdef __GNUC__
#define alloca __builtin_alloca
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/alloca.h" 3 4

#ifdef __cplusplus
}
#endif
# 20 "gen/zircon/public/sysroot/cpp/include/alloca.h" 3 4

#endif  // SYSROOT_ALLOCA_H_
# 22 "gen/zircon/public/sysroot/cpp/include/alloca.h" 3 4
#endif /* alloca.h expanded by -frewrite-includes */
# 136 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 2 3 4
char* mktemp(char*);
int mkstemps(char*, int);
int mkostemps(char*, int, int);
void* valloc(size_t) __nothrow_fn;
void* memalign(size_t, size_t) __nothrow_fn;
int clearenv(void);
#define WCOREDUMP(s) ((s)&0x80)
#define WIFCONTINUED(s) ((s) == 0xffff)
#endif
# 145 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4

#ifdef _GNU_SOURCE
int ptsname_r(int, char*, size_t);
char* ecvt(double, int, int*, int*);
char* fcvt(double, int, int*, int*);
char* gcvt(double, int, char*);
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4

#ifdef __cplusplus
}
#endif
# 156 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4

#endif  // SYSROOT_STDLIB_H_
# 158 "gen/zircon/public/sysroot/cpp/include/stdlib.h" 3 4
#endif /* stdlib.h expanded by -frewrite-includes */
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 2 3
#  endif
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#ifdef __cplusplus
extern "C++" {
// abs

#ifdef abs
# undef abs
#endif
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef labs
# undef labs
#endif
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef llabs
# undef llabs
#endif
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

// MSVCRT already has the correct prototype in <stdlib.h> if __cplusplus is defined
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_MSVCRT)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long abs(long __x) _NOEXCEPT {
  return __builtin_labs(__x);
}
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {
  return __builtin_llabs(__x);
}
#endif // !defined(_LIBCPP_MSVCRT)
# 120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY float abs(float __lcpp_x) _NOEXCEPT {
  return __builtin_fabsf(__lcpp_x); // Use builtins to prevent needing math.h
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY double abs(double __lcpp_x) _NOEXCEPT {
  return __builtin_fabs(__lcpp_x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long double
abs(long double __lcpp_x) _NOEXCEPT {
  return __builtin_fabsl(__lcpp_x);
}

// div

#ifdef div
# undef div
#endif
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef ldiv
# undef ldiv
#endif
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef lldiv
# undef lldiv
#endif
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

// MSVCRT already has the correct prototype in <stdlib.h> if __cplusplus is defined
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_MSVCRT)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
  return ::ldiv(__x, __y);
}
#if 0 /* disabled by -frewrite-includes */
#if !(defined(__FreeBSD__) && !defined(__LONG_LONG_SUPPORTED))
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,
                                             long long __y) _NOEXCEPT {
  return ::lldiv(__x, __y);
}
#endif
# 157 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif // _LIBCPP_MSVCRT
# 158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
} // extern "C++"
#endif // __cplusplus
# 160 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#endif // _LIBCPP_STDLIB_H
# 162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif /* stdlib.h expanded by -frewrite-includes */
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 2 3

#ifndef _LIBCPP_STDLIB_H
#   error <cstdlib> tried including <stdlib.h> but didn't find libc++'s <stdlib.h> header. \
          This usually means that your header search paths are not configured properly. \
          The header search paths should contain the C++ Standard Library headers before \
          any C Standard Library, and you are probably using compiler flags that make that \
          not be the case.
#endif
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 3
#endif
# 100 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 3

_LIBCPP_BEGIN_NAMESPACE_STD

using ::size_t _LIBCPP_USING_IF_EXISTS;
using ::div_t _LIBCPP_USING_IF_EXISTS;
using ::ldiv_t _LIBCPP_USING_IF_EXISTS;
using ::lldiv_t _LIBCPP_USING_IF_EXISTS;
using ::atof _LIBCPP_USING_IF_EXISTS;
using ::atoi _LIBCPP_USING_IF_EXISTS;
using ::atol _LIBCPP_USING_IF_EXISTS;
using ::atoll _LIBCPP_USING_IF_EXISTS;
using ::strtod _LIBCPP_USING_IF_EXISTS;
using ::strtof _LIBCPP_USING_IF_EXISTS;
using ::strtold _LIBCPP_USING_IF_EXISTS;
using ::strtol _LIBCPP_USING_IF_EXISTS;
using ::strtoll _LIBCPP_USING_IF_EXISTS;
using ::strtoul _LIBCPP_USING_IF_EXISTS;
using ::strtoull _LIBCPP_USING_IF_EXISTS;
using ::rand _LIBCPP_USING_IF_EXISTS;
using ::srand _LIBCPP_USING_IF_EXISTS;
using ::calloc _LIBCPP_USING_IF_EXISTS;
using ::free _LIBCPP_USING_IF_EXISTS;
using ::malloc _LIBCPP_USING_IF_EXISTS;
using ::realloc _LIBCPP_USING_IF_EXISTS;
using ::abort _LIBCPP_USING_IF_EXISTS;
using ::atexit _LIBCPP_USING_IF_EXISTS;
using ::exit _LIBCPP_USING_IF_EXISTS;
using ::_Exit _LIBCPP_USING_IF_EXISTS;
using ::getenv _LIBCPP_USING_IF_EXISTS;
using ::system _LIBCPP_USING_IF_EXISTS;
using ::bsearch _LIBCPP_USING_IF_EXISTS;
using ::qsort _LIBCPP_USING_IF_EXISTS;
using ::abs _LIBCPP_USING_IF_EXISTS;
using ::labs _LIBCPP_USING_IF_EXISTS;
using ::llabs _LIBCPP_USING_IF_EXISTS;
using ::div _LIBCPP_USING_IF_EXISTS;
using ::ldiv _LIBCPP_USING_IF_EXISTS;
using ::lldiv _LIBCPP_USING_IF_EXISTS;
using ::mblen _LIBCPP_USING_IF_EXISTS;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using ::mbtowc _LIBCPP_USING_IF_EXISTS;
using ::wctomb _LIBCPP_USING_IF_EXISTS;
using ::mbstowcs _LIBCPP_USING_IF_EXISTS;
using ::wcstombs _LIBCPP_USING_IF_EXISTS;
#endif
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 3
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_CXX03_LANG)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 3
using ::at_quick_exit _LIBCPP_USING_IF_EXISTS;
using ::quick_exit _LIBCPP_USING_IF_EXISTS;
#endif
# 149 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 3
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 150 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 3
using ::aligned_alloc _LIBCPP_USING_IF_EXISTS;
#endif
# 152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_CSTDLIB
# 156 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdlib" 3
#endif /* cstdlib expanded by -frewrite-includes */
# 100 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 100 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_ABI_VCRUNTIME)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#if 0 /* expanded by -frewrite-includes */
#include <new.h>
#endif /* expanded by -frewrite-includes */
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#endif
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#endif
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(__cpp_sized_deallocation) || __cpp_sized_deallocation  < 201309L
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#define _LIBCPP_HAS_NO_LANGUAGE_SIZED_DEALLOCATION
#endif
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_BUILDING_LIBRARY) && _LIBCPP_STD_VER < 14 && \
    defined(_LIBCPP_HAS_NO_LANGUAGE_SIZED_DEALLOCATION)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# define _LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION
#endif
# 118 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION) || \
    defined(_LIBCPP_HAS_NO_LANGUAGE_SIZED_DEALLOCATION)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 121 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# define _LIBCPP_HAS_NO_SIZED_DEALLOCATION
#endif
# 123 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

namespace std  // purposefully not using versioning namespace
{

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_ABI_VCRUNTIME)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
struct _LIBCPP_EXPORTED_FROM_ABI nothrow_t { explicit nothrow_t() = default; };
extern _LIBCPP_EXPORTED_FROM_ABI const nothrow_t nothrow;

class _LIBCPP_EXPORTED_FROM_ABI bad_alloc
    : public exception
{
public:
    bad_alloc() _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI bad_alloc(const bad_alloc&) _NOEXCEPT = default;
    _LIBCPP_HIDE_FROM_ABI bad_alloc& operator=(const bad_alloc&) _NOEXCEPT = default;
    ~bad_alloc() _NOEXCEPT override;
    const char* what() const _NOEXCEPT override;
};

class _LIBCPP_EXPORTED_FROM_ABI bad_array_new_length
    : public bad_alloc
{
public:
    bad_array_new_length() _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI bad_array_new_length(const bad_array_new_length&) _NOEXCEPT = default;
    _LIBCPP_HIDE_FROM_ABI bad_array_new_length& operator=(const bad_array_new_length&) _NOEXCEPT = default;
    ~bad_array_new_length() _NOEXCEPT override;
    const char* what() const _NOEXCEPT override;
};

typedef void (*new_handler)();
_LIBCPP_EXPORTED_FROM_ABI new_handler set_new_handler(new_handler) _NOEXCEPT;
_LIBCPP_EXPORTED_FROM_ABI new_handler get_new_handler() _NOEXCEPT;

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS == 0 // !_LIBCPP_ABI_VCRUNTIME
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

// When _HAS_EXCEPTIONS == 0, these complete definitions are needed,
// since they would normally be provided in vcruntime_exception.h
class bad_alloc : public exception {
public:
  bad_alloc() noexcept : exception("bad allocation") {}

private:
  friend class bad_array_new_length;

  bad_alloc(char const* const __message) noexcept : exception(__message) {}
};

class bad_array_new_length : public bad_alloc {
public:
  bad_array_new_length() noexcept : bad_alloc("bad array new length") {}
};
#endif // defined(_LIBCPP_ABI_VCRUNTIME) && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS == 0
# 176 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

_LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_bad_alloc();  // not in C++ spec

_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_bad_array_new_length()
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    throw bad_array_new_length();
#else
# 185 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
    _LIBCPP_VERBOSE_ABORT("bad_array_new_length was thrown in -fno-exceptions mode");
#endif
# 187 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
}

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) && \
    !defined(_LIBCPP_ABI_VCRUNTIME)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 191 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#ifndef _LIBCPP_CXX03_LANG
enum class align_val_t : size_t { };
#else
# 194 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
enum align_val_t { __zero = 0, __max = (size_t)-1 };
#endif
# 196 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#endif
# 197 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 199 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
// Enable the declaration even if the compiler doesn't support the language
// feature.
struct destroying_delete_t {
  explicit destroying_delete_t() = default;
};
inline constexpr destroying_delete_t destroying_delete{};
#endif // _LIBCPP_STD_VER >= 20
# 206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

} // namespace std

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_CXX03_LANG)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 210 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#define _THROW_BAD_ALLOC throw(std::bad_alloc)
#else
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#define _THROW_BAD_ALLOC
#endif
# 214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_ABI_VCRUNTIME)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz) _THROW_BAD_ALLOC;
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS;
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p) _NOEXCEPT;
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT;
#ifndef _LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION
_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void  operator delete(void* __p, std::size_t __sz) _NOEXCEPT;
#endif
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz) _THROW_BAD_ALLOC;
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS;
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p) _NOEXCEPT;
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p, const std::nothrow_t&) _NOEXCEPT;
#ifndef _LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION
_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void  operator delete[](void* __p, std::size_t __sz) _NOEXCEPT;
#endif
# 232 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

#ifndef _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS;
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p, std::align_val_t) _NOEXCEPT;
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT;
#ifndef _LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION
_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void  operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
#endif
# 241 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS;
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p, std::align_val_t) _NOEXCEPT;
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT;
#ifndef _LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION
_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void  operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
#endif
# 249 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#endif
# 250 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY void* operator new  (std::size_t, void* __p) _NOEXCEPT {return __p;}
_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY void* operator new[](std::size_t, void* __p) _NOEXCEPT {return __p;}
inline _LIBCPP_INLINE_VISIBILITY void  operator delete  (void*, void*) _NOEXCEPT {}
inline _LIBCPP_INLINE_VISIBILITY void  operator delete[](void*, void*) _NOEXCEPT {}

#endif // !_LIBCPP_ABI_VCRUNTIME
# 257 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

_LIBCPP_BEGIN_NAMESPACE_STD

_LIBCPP_CONSTEXPR inline _LIBCPP_INLINE_VISIBILITY bool __is_overaligned_for_new(size_t __align) _NOEXCEPT {
#ifdef __STDCPP_DEFAULT_NEW_ALIGNMENT__
  return __align > __STDCPP_DEFAULT_NEW_ALIGNMENT__;
#else
# 264 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
  return __align > alignment_of<max_align_t>::value;
#endif
# 266 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
}

template <class ..._Args>
_LIBCPP_INLINE_VISIBILITY
void* __libcpp_operator_new(_Args ...__args) {
#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__builtin_operator_new) && __has_builtin(__builtin_operator_delete)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 272 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
  return __builtin_operator_new(__args...);
#else
# 274 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
  return ::operator new(__args...);
#endif
# 276 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
}

template <class ..._Args>
_LIBCPP_INLINE_VISIBILITY
void __libcpp_operator_delete(_Args ...__args) {
#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__builtin_operator_new) && __has_builtin(__builtin_operator_delete)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 282 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
  __builtin_operator_delete(__args...);
#else
# 284 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
  ::operator delete(__args...);
#endif
# 286 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
}

inline _LIBCPP_INLINE_VISIBILITY
void *__libcpp_allocate(size_t __size, size_t __align) {
#ifndef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
  if (__is_overaligned_for_new(__align)) {
    const align_val_t __align_val = static_cast<align_val_t>(__align);
    return __libcpp_operator_new(__size, __align_val);
  }
#endif
# 296 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

  (void)__align;
  return __libcpp_operator_new(__size);
}

template <class ..._Args>
_LIBCPP_INLINE_VISIBILITY
void __do_deallocate_handle_size(void *__ptr, size_t __size, _Args ...__args) {
#ifdef _LIBCPP_HAS_NO_SIZED_DEALLOCATION
  (void)__size;
  return std::__libcpp_operator_delete(__ptr, __args...);
#else
# 308 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
  return std::__libcpp_operator_delete(__ptr, __size, __args...);
#endif
# 310 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
}

inline _LIBCPP_INLINE_VISIBILITY
void __libcpp_deallocate(void* __ptr, size_t __size, size_t __align) {
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 315 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
    (void)__align;
    return __do_deallocate_handle_size(__ptr, __size);
#else
# 318 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
    if (__is_overaligned_for_new(__align)) {
      const align_val_t __align_val = static_cast<align_val_t>(__align);
      return __do_deallocate_handle_size(__ptr, __size, __align_val);
    } else {
      return __do_deallocate_handle_size(__ptr, __size);
    }
#endif
# 325 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
}

inline _LIBCPP_INLINE_VISIBILITY void __libcpp_deallocate_unsized(void* __ptr, size_t __align) {
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 329 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
    (void)__align;
    return __libcpp_operator_delete(__ptr);
#else
# 332 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
    if (__is_overaligned_for_new(__align)) {
      const align_val_t __align_val = static_cast<align_val_t>(__align);
      return __libcpp_operator_delete(__ptr, __align_val);
    } else {
      return __libcpp_operator_delete(__ptr);
    }
#endif
# 339 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
}

template <class _Tp>
_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR _Tp* __launder(_Tp* __p) _NOEXCEPT
{
    static_assert (!(is_function<_Tp>::value), "can't launder functions" );
    static_assert (!(is_same<void, __remove_cv_t<_Tp> >::value), "can't launder cv-void" );
    return __builtin_launder(__p);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 351 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
template <class _Tp>
_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_HIDE_FROM_ABI
constexpr _Tp* launder(_Tp* __p) noexcept
{
    return _VSTD::__launder(__p);
}
#endif
# 358 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 360 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 362 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

inline constexpr size_t hardware_destructive_interference_size = __GCC_DESTRUCTIVE_SIZE;
inline constexpr size_t hardware_constructive_interference_size = __GCC_CONSTRUCTIVE_SIZE;

#endif // defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE)
# 367 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

#endif // _LIBCPP_STD_VER >= 17
# 369 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

_LIBCPP_END_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 373 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#if 0 /* expanded by -frewrite-includes */
#  include <exception>
#endif /* expanded by -frewrite-includes */
# 373 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# 374 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 374 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
# 375 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#endif
# 376 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3

#endif // _LIBCPP_NEW
# 378 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/new" 3
#endif /* new expanded by -frewrite-includes */
# 246 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* tuple expanded by -frewrite-includes */
#include <tuple>
#else /* tuple expanded by -frewrite-includes */
# 246 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_TUPLE
#define _LIBCPP_TUPLE

/*
    tuple synopsis

namespace std
{

template <class... T>
class tuple {
public:
    explicit(see-below) constexpr tuple();
    explicit(see-below) tuple(const T&...);  // constexpr in C++14
    template <class... U>
        explicit(see-below) tuple(U&&...);  // constexpr in C++14
    tuple(const tuple&) = default;
    tuple(tuple&&) = default;

    template<class... UTypes>
        constexpr explicit(see-below) tuple(tuple<UTypes...>&);  // C++23
    template <class... U>
        explicit(see-below) tuple(const tuple<U...>&);  // constexpr in C++14
    template <class... U>
        explicit(see-below) tuple(tuple<U...>&&);  // constexpr in C++14
    template<class... UTypes>
        constexpr explicit(see-below) tuple(const tuple<UTypes...>&&); // C++23

    template<class U1, class U2>
        constexpr explicit(see-below) tuple(pair<U1, U2>&);  // iff sizeof...(Types) == 2 // C++23
    template <class U1, class U2>
        explicit(see-below) tuple(const pair<U1, U2>&); // iff sizeof...(T) == 2 // constexpr in C++14
    template <class U1, class U2>
        explicit(see-below) tuple(pair<U1, U2>&&); // iff sizeof...(T) == 2  // constexpr in C++14
    template<class U1, class U2>
        constexpr explicit(see-below) tuple(const pair<U1, U2>&&);  // iff sizeof...(Types) == 2 // C++23

    // allocator-extended constructors
    template <class Alloc>
        tuple(allocator_arg_t, const Alloc& a);
    template <class Alloc>
        explicit(see-below) tuple(allocator_arg_t, const Alloc& a, const T&...);          // constexpr in C++20
    template <class Alloc, class... U>
        explicit(see-below) tuple(allocator_arg_t, const Alloc& a, U&&...);               // constexpr in C++20
    template <class Alloc>
        tuple(allocator_arg_t, const Alloc& a, const tuple&);                             // constexpr in C++20
    template <class Alloc>
        tuple(allocator_arg_t, const Alloc& a, tuple&&);                                  // constexpr in C++20
    template<class Alloc, class... UTypes>
        constexpr explicit(see-below)
          tuple(allocator_arg_t, const Alloc& a, tuple<UTypes...>&);                      // C++23
    template <class Alloc, class... U>
        explicit(see-below) tuple(allocator_arg_t, const Alloc& a, const tuple<U...>&);   // constexpr in C++20
    template <class Alloc, class... U>
        explicit(see-below) tuple(allocator_arg_t, const Alloc& a, tuple<U...>&&);        // constexpr in C++20
    template<class Alloc, class... UTypes>
        constexpr explicit(see-below)
          tuple(allocator_arg_t, const Alloc& a, const tuple<UTypes...>&&);               // C++23
    template<class Alloc, class U1, class U2>
        constexpr explicit(see-below)
          tuple(allocator_arg_t, const Alloc& a, pair<U1, U2>&);                          // C++23
    template <class Alloc, class U1, class U2>
        explicit(see-below) tuple(allocator_arg_t, const Alloc& a, const pair<U1, U2>&);  // constexpr in C++20
    template <class Alloc, class U1, class U2>
        explicit(see-below) tuple(allocator_arg_t, const Alloc& a, pair<U1, U2>&&);       // constexpr in C++20
    template<class Alloc, class U1, class U2>
        constexpr explicit(see-below)
          tuple(allocator_arg_t, const Alloc& a, const pair<U1, U2>&&);                   // C++23

    tuple& operator=(const tuple&);                                                       // constexpr in C++20
    constexpr const tuple& operator=(const tuple&) const;                                 // C++23
    tuple& operator=(tuple&&) noexcept(is_nothrow_move_assignable_v<T> && ...);           // constexpr in C++20
    constexpr const tuple& operator=(tuple&&) const;                                      // C++23
    template <class... U>
        tuple& operator=(const tuple<U...>&);                                             // constexpr in C++20
    template<class... UTypes>
        constexpr const tuple& operator=(const tuple<UTypes...>&) const;                  // C++23
    template <class... U>
        tuple& operator=(tuple<U...>&&);                                                  // constexpr in C++20
    template<class... UTypes>
        constexpr const tuple& operator=(tuple<UTypes...>&&) const;                       // C++23
    template <class U1, class U2>
        tuple& operator=(const pair<U1, U2>&); // iff sizeof...(T) == 2                   // constexpr in C++20
    template<class U1, class U2>
        constexpr const tuple& operator=(const pair<U1, U2>&) const;   // iff sizeof...(Types) == 2 // C++23
    template <class U1, class U2>
        tuple& operator=(pair<U1, U2>&&); // iff sizeof...(T) == 2                        // constexpr in C++20
    template<class U1, class U2>
        constexpr const tuple& operator=(pair<U1, U2>&&) const;  // iff sizeof...(Types) == 2 // C++23

    template<class U, size_t N>
        tuple& operator=(array<U, N> const&) // iff sizeof...(T) == N, EXTENSION
    template<class U, size_t N>
        tuple& operator=(array<U, N>&&) // iff sizeof...(T) == N, EXTENSION

    void swap(tuple&) noexcept(AND(swap(declval<T&>(), declval<T&>())...));               // constexpr in C++20
    constexpr void swap(const tuple&) const noexcept(see-below);                          // C++23
};


template<class... TTypes, class... UTypes, template<class> class TQual, template<class> class UQual> // since C++23
  requires requires { typename tuple<common_reference_t<TQual<TTypes>, UQual<UTypes>>...>; }
struct basic_common_reference<tuple<TTypes...>, tuple<UTypes...>, TQual, UQual> {
  using type = tuple<common_reference_t<TQual<TTypes>, UQual<UTypes>>...>;
};

template<class... TTypes, class... UTypes>                                // since C++23
  requires requires { typename tuple<common_type_t<TTypes, UTypes>...>; }
struct common_type<tuple<TTypes...>, tuple<UTypes...>> {
  using type = tuple<common_type_t<TTypes, UTypes>...>;
};

template <class ...T>
tuple(T...) -> tuple<T...>;                                         // since C++17
template <class T1, class T2>
tuple(pair<T1, T2>) -> tuple<T1, T2>;                               // since C++17
template <class Alloc, class ...T>
tuple(allocator_arg_t, Alloc, T...) -> tuple<T...>;                 // since C++17
template <class Alloc, class T1, class T2>
tuple(allocator_arg_t, Alloc, pair<T1, T2>) -> tuple<T1, T2>;       // since C++17
template <class Alloc, class ...T>
tuple(allocator_arg_t, Alloc, tuple<T...>) -> tuple<T...>;          // since C++17

inline constexpr unspecified ignore;

template <class... T> tuple<V...>  make_tuple(T&&...); // constexpr in C++14
template <class... T> tuple<ATypes...> forward_as_tuple(T&&...) noexcept; // constexpr in C++14
template <class... T> tuple<T&...> tie(T&...) noexcept; // constexpr in C++14
template <class... Tuples> tuple<CTypes...> tuple_cat(Tuples&&... tpls); // constexpr in C++14

// [tuple.apply], calling a function with a tuple of arguments:
template <class F, class Tuple>
  constexpr decltype(auto) apply(F&& f, Tuple&& t); // C++17
template <class T, class Tuple>
  constexpr T make_from_tuple(Tuple&& t); // C++17

// 20.4.1.4, tuple helper classes:
template <class T> struct tuple_size; // undefined
template <class... T> struct tuple_size<tuple<T...>>;
template <class T>
 inline constexpr size_t tuple_size_v = tuple_size<T>::value; // C++17
template <size_t I, class T> struct tuple_element; // undefined
template <size_t I, class... T> struct tuple_element<I, tuple<T...>>;
template <size_t I, class T>
  using tuple_element_t = typename tuple_element <I, T>::type; // C++14

// 20.4.1.5, element access:
template <size_t I, class... T>
    typename tuple_element<I, tuple<T...>>::type&
    get(tuple<T...>&) noexcept; // constexpr in C++14
template <size_t I, class... T>
    const typename tuple_element<I, tuple<T...>>::type&
    get(const tuple<T...>&) noexcept; // constexpr in C++14
template <size_t I, class... T>
    typename tuple_element<I, tuple<T...>>::type&&
    get(tuple<T...>&&) noexcept; // constexpr in C++14
template <size_t I, class... T>
    const typename tuple_element<I, tuple<T...>>::type&&
    get(const tuple<T...>&&) noexcept; // constexpr in C++14

template <class T1, class... T>
    constexpr T1& get(tuple<T...>&) noexcept;  // C++14
template <class T1, class... T>
    constexpr const T1& get(const tuple<T...>&) noexcept;   // C++14
template <class T1, class... T>
    constexpr T1&& get(tuple<T...>&&) noexcept;   // C++14
template <class T1, class... T>
    constexpr const T1&& get(const tuple<T...>&&) noexcept;   // C++14

// 20.4.1.6, relational operators:
template<class... T, class... U> bool operator==(const tuple<T...>&, const tuple<U...>&); // constexpr in C++14
template<class... T, class... U> bool operator<(const tuple<T...>&, const tuple<U...>&);  // constexpr in C++14, removed in C++20
template<class... T, class... U> bool operator!=(const tuple<T...>&, const tuple<U...>&); // constexpr in C++14, removed in C++20
template<class... T, class... U> bool operator>(const tuple<T...>&, const tuple<U...>&);  // constexpr in C++14, removed in C++20
template<class... T, class... U> bool operator<=(const tuple<T...>&, const tuple<U...>&); // constexpr in C++14, removed in C++20
template<class... T, class... U> bool operator>=(const tuple<T...>&, const tuple<U...>&); // constexpr in C++14, removed in C++20
template<class... T, class... U>
  constexpr common_comparison_category_t<synth-three-way-result<T, U>...>
    operator<=>(const tuple<T...>&, const tuple<U...>&);                                  // since C++20

template <class... Types, class Alloc>
  struct uses_allocator<tuple<Types...>, Alloc>;

template <class... Types>
  void
  swap(tuple<Types...>& x, tuple<Types...>& y) noexcept(noexcept(x.swap(y)));

template <class... Types>
  constexpr void swap(const tuple<Types...>& x, const tuple<Types...>& y) noexcept(see-below);   // C++23

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 205 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/common_comparison_category.h>
#endif /* expanded by -frewrite-includes */
# 205 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/synth_three_way.h>
#endif /* expanded by -frewrite-includes */
# 206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 207 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 207 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/array.h>
#endif /* expanded by -frewrite-includes */
# 209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 210 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/get.h>
#endif /* expanded by -frewrite-includes */
# 210 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 211 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/tuple.h>
#endif /* expanded by -frewrite-includes */
# 211 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* allocator_arg_t.h expanded by -frewrite-includes */
#include <__memory/allocator_arg_t.h>
#else /* allocator_arg_t.h expanded by -frewrite-includes */
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_ALLOCATOR_ARG_T_H
#define _LIBCPP___FUNCTIONAL_ALLOCATOR_ARG_T_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* uses_allocator.h expanded by -frewrite-includes */
#include <__memory/uses_allocator.h>
#else /* uses_allocator.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_USES_ALLOCATOR_H
#define _LIBCPP___MEMORY_USES_ALLOCATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct __has_allocator_type
{
private:
    template <class _Up> static false_type __test(...);
    template <class _Up> static true_type __test(typename _Up::allocator_type* = 0);
public:
    static const bool value = decltype(__test<_Tp>(0))::value;
};

template <class _Tp, class _Alloc, bool = __has_allocator_type<_Tp>::value>
struct __uses_allocator
    : public integral_constant<bool,
        is_convertible<_Alloc, typename _Tp::allocator_type>::value>
{
};

template <class _Tp, class _Alloc>
struct __uses_allocator<_Tp, _Alloc, false>
    : public false_type
{
};

template <class _Tp, class _Alloc>
struct _LIBCPP_TEMPLATE_VIS uses_allocator
    : public __uses_allocator<_Tp, _Alloc>
{
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator.h" 3
template <class _Tp, class _Alloc>
inline constexpr bool uses_allocator_v = uses_allocator<_Tp, _Alloc>::value;
#endif
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_USES_ALLOCATOR_H
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator.h" 3
#endif /* uses_allocator.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

struct _LIBCPP_TEMPLATE_VIS allocator_arg_t { explicit allocator_arg_t() = default; };

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3
inline constexpr allocator_arg_t allocator_arg = allocator_arg_t();
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_CXX03_LANG)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3
constexpr allocator_arg_t allocator_arg = allocator_arg_t();
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3

#ifndef _LIBCPP_CXX03_LANG

// allocator construction

template <class _Tp, class _Alloc, class ..._Args>
struct __uses_alloc_ctor_imp
{
    typedef _LIBCPP_NODEBUG __remove_cvref_t<_Alloc> _RawAlloc;
    static const bool __ua = uses_allocator<_Tp, _RawAlloc>::value;
    static const bool __ic =
        is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value;
    static const int value = __ua ? 2 - __ic : 0;
};

template <class _Tp, class _Alloc, class ..._Args>
struct __uses_alloc_ctor
    : integral_constant<int, __uses_alloc_ctor_imp<_Tp, _Alloc, _Args...>::value>
    {};

template <class _Tp, class _Allocator, class... _Args>
inline _LIBCPP_INLINE_VISIBILITY
void __user_alloc_construct_impl (integral_constant<int, 0>, _Tp *__storage, const _Allocator &, _Args &&... __args )
{
    new (__storage) _Tp (_VSTD::forward<_Args>(__args)...);
}

// FIXME: This should have a version which takes a non-const alloc.
template <class _Tp, class _Allocator, class... _Args>
inline _LIBCPP_INLINE_VISIBILITY
void __user_alloc_construct_impl (integral_constant<int, 1>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
{
    new (__storage) _Tp (allocator_arg, __a, _VSTD::forward<_Args>(__args)...);
}

// FIXME: This should have a version which takes a non-const alloc.
template <class _Tp, class _Allocator, class... _Args>
inline _LIBCPP_INLINE_VISIBILITY
void __user_alloc_construct_impl (integral_constant<int, 2>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
{
    new (__storage) _Tp (_VSTD::forward<_Args>(__args)..., __a);
}

#endif // _LIBCPP_CXX03_LANG
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_ALLOCATOR_ARG_T_H
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_arg_t.h" 3
#endif /* allocator_arg_t.h expanded by -frewrite-includes */
# 213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/uses_allocator.h>
#endif /* expanded by -frewrite-includes */
# 213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/make_tuple_types.h>
#endif /* expanded by -frewrite-includes */
# 214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 215 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/sfinae_helpers.h>
#endif /* expanded by -frewrite-includes */
# 215 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_element.h>
#endif /* expanded by -frewrite-includes */
# 216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 217 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_indices.h>
#endif /* expanded by -frewrite-includes */
# 217 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_like_ext.h>
#endif /* expanded by -frewrite-includes */
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 219 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_size.h>
#endif /* expanded by -frewrite-includes */
# 219 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_types.h>
#endif /* expanded by -frewrite-includes */
# 220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 221 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/apply_cv.h>
#endif /* expanded by -frewrite-includes */
# 221 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 222 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_reference.h>
#endif /* expanded by -frewrite-includes */
# 222 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 223 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 223 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 225 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conjunction.h>
#endif /* expanded by -frewrite-includes */
# 225 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 226 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/copy_cvref.h>
#endif /* expanded by -frewrite-includes */
# 226 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/disjunction.h>
#endif /* expanded by -frewrite-includes */
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_assignable.h>
#endif /* expanded by -frewrite-includes */
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 231 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 231 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 232 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_assignable.h>
#endif /* expanded by -frewrite-includes */
# 232 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 233 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 233 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 234 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 234 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 235 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_empty.h expanded by -frewrite-includes */
#include <__type_traits/is_empty.h>
#else /* is_empty.h expanded by -frewrite-includes */
# 235 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_empty.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_EMPTY_H
#define _LIBCPP___TYPE_TRAITS_IS_EMPTY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_empty.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_empty.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_empty.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_empty.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_empty.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_empty.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_empty.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_empty : public integral_constant<bool, __is_empty(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_empty.h" 3
template <class _Tp>
inline constexpr bool is_empty_v = __is_empty(_Tp);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_empty.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_EMPTY_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_empty.h" 3
#endif /* is_empty.h expanded by -frewrite-includes */
# 236 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_final.h expanded by -frewrite-includes */
#include <__type_traits/is_final.h>
#else /* is_final.h expanded by -frewrite-includes */
# 236 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_final.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_FINAL_H
#define _LIBCPP___TYPE_TRAITS_IS_FINAL_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_final.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_final.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_final.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_final.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_final.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_final.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_final.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS __libcpp_is_final : public integral_constant<bool, __is_final(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_final.h" 3
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_final : public integral_constant<bool, __is_final(_Tp)> {};
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_final.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_final.h" 3
template <class _Tp>
inline constexpr bool is_final_v = __is_final(_Tp);
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_final.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_FINAL_H
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_final.h" 3
#endif /* is_final.h expanded by -frewrite-includes */
# 237 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_implicitly_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 237 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 238 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 238 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 239 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 239 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 240 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_assignable.h>
#endif /* expanded by -frewrite-includes */
# 240 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 241 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 241 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 242 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_copy_assignable.h>
#endif /* expanded by -frewrite-includes */
# 242 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 243 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 243 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 244 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 244 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 245 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 245 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 246 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 246 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 247 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 247 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 248 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_swappable.h>
#endif /* expanded by -frewrite-includes */
# 248 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 249 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* lazy.h expanded by -frewrite-includes */
#include <__type_traits/lazy.h>
#else /* lazy.h expanded by -frewrite-includes */
# 249 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/lazy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_LAZY_H
#define _LIBCPP___TYPE_TRAITS_LAZY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/lazy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/lazy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/lazy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/lazy.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/lazy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <template <class...> class _Func, class... _Args>
struct _Lazy : _Func<_Args...> {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_LAZY_H
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/lazy.h" 3
#endif /* lazy.h expanded by -frewrite-includes */
# 250 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* maybe_const.h expanded by -frewrite-includes */
#include <__type_traits/maybe_const.h>
#else /* maybe_const.h expanded by -frewrite-includes */
# 250 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/maybe_const.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_MAYBE_CONST_H
#define _LIBCPP___TYPE_TRAITS_MAYBE_CONST_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/maybe_const.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/maybe_const.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/maybe_const.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/maybe_const.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/maybe_const.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/maybe_const.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/maybe_const.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <bool _Const, class _Tp>
using __maybe_const = __conditional_t<_Const, const _Tp, _Tp>;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_MAYBE_CONST_H
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/maybe_const.h" 3
#endif /* maybe_const.h expanded by -frewrite-includes */
# 251 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/nat.h>
#endif /* expanded by -frewrite-includes */
# 251 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 252 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* negation.h expanded by -frewrite-includes */
#include <__type_traits/negation.h>
#else /* negation.h expanded by -frewrite-includes */
# 252 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/negation.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_NEGATION_H
#define _LIBCPP___TYPE_TRAITS_NEGATION_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/negation.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/negation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/negation.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/negation.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/negation.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/negation.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/negation.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Pred>
struct _Not : _BoolConstant<!_Pred::value> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/negation.h" 3
template <class _Tp>
struct negation : _Not<_Tp> {};
template <class _Tp>
inline constexpr bool negation_v = !_Tp::value;
#endif // _LIBCPP_STD_VER >= 17
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/negation.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_NEGATION_H
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/negation.h" 3
#endif /* negation.h expanded by -frewrite-includes */
# 253 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 253 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 254 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 254 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 255 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/unwrap_ref.h>
#endif /* expanded by -frewrite-includes */
# 255 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 256 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 256 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 257 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/integer_sequence.h>
#endif /* expanded by -frewrite-includes */
# 257 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 258 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 258 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 259 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 259 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 260 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/piecewise_construct.h>
#endif /* expanded by -frewrite-includes */
# 260 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 261 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 261 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 262 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 262 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 263 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 263 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 264 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

// standard-mandated includes

// [tuple.syn]
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* compare expanded by -frewrite-includes */
#include <compare>
#else /* compare expanded by -frewrite-includes */
# 268 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_COMPARE
#define _LIBCPP_COMPARE

/*
    compare synopsis

namespace std {
  // [cmp.categories], comparison category types
  class partial_ordering;
  class weak_ordering;
  class strong_ordering;

  // named comparison functions
  constexpr bool is_eq  (partial_ordering cmp) noexcept { return cmp == 0; }
  constexpr bool is_neq (partial_ordering cmp) noexcept { return cmp != 0; }
  constexpr bool is_lt  (partial_ordering cmp) noexcept { return cmp < 0; }
  constexpr bool is_lteq(partial_ordering cmp) noexcept { return cmp <= 0; }
  constexpr bool is_gt  (partial_ordering cmp) noexcept { return cmp > 0; }
  constexpr bool is_gteq(partial_ordering cmp) noexcept { return cmp >= 0; }

  // [cmp.common], common comparison category type
  template<class... Ts>
  struct common_comparison_category {
    using type = see below;
  };
  template<class... Ts>
    using common_comparison_category_t = typename common_comparison_category<Ts...>::type;

  // [cmp.concept], concept three_way_comparable
  template<class T, class Cat = partial_ordering>
    concept three_way_comparable = see below;
  template<class T, class U, class Cat = partial_ordering>
    concept three_way_comparable_with = see below;

  // [cmp.result], result of three-way comparison
  template<class T, class U = T> struct compare_three_way_result;

  template<class T, class U = T>
    using compare_three_way_result_t = typename compare_three_way_result<T, U>::type;

  // [comparisons.three.way], class compare_three_way
  struct compare_three_way; // C++20

  // [cmp.alg], comparison algorithms
  inline namespace unspecified {
    inline constexpr unspecified strong_order = unspecified;
    inline constexpr unspecified weak_order = unspecified;
    inline constexpr unspecified partial_order = unspecified;
    inline constexpr unspecified compare_strong_order_fallback = unspecified;
    inline constexpr unspecified compare_weak_order_fallback = unspecified;
    inline constexpr unspecified compare_partial_order_fallback = unspecified;
  }

  // [cmp.partialord], Class partial_ordering
  class partial_ordering {
  public:
    // valid values
    static const partial_ordering less;
    static const partial_ordering equivalent;
    static const partial_ordering greater;
    static const partial_ordering unordered;

    // comparisons
    friend constexpr bool operator==(partial_ordering v, unspecified) noexcept;
    friend constexpr bool operator==(partial_ordering v, partial_ordering w) noexcept = default;
    friend constexpr bool operator< (partial_ordering v, unspecified) noexcept;
    friend constexpr bool operator> (partial_ordering v, unspecified) noexcept;
    friend constexpr bool operator<=(partial_ordering v, unspecified) noexcept;
    friend constexpr bool operator>=(partial_ordering v, unspecified) noexcept;
    friend constexpr bool operator< (unspecified, partial_ordering v) noexcept;
    friend constexpr bool operator> (unspecified, partial_ordering v) noexcept;
    friend constexpr bool operator<=(unspecified, partial_ordering v) noexcept;
    friend constexpr bool operator>=(unspecified, partial_ordering v) noexcept;
    friend constexpr partial_ordering operator<=>(partial_ordering v, unspecified) noexcept;
    friend constexpr partial_ordering operator<=>(unspecified, partial_ordering v) noexcept;
  };

  // [cmp.weakord], Class weak_ordering
  class weak_ordering {
  public:
    // valid values
    static const weak_ordering less;
    static const weak_ordering equivalent;
    static const weak_ordering greater;

    // conversions
    constexpr operator partial_ordering() const noexcept;

    // comparisons
    friend constexpr bool operator==(weak_ordering v, unspecified) noexcept;
    friend constexpr bool operator==(weak_ordering v, weak_ordering w) noexcept = default;
    friend constexpr bool operator< (weak_ordering v, unspecified) noexcept;
    friend constexpr bool operator> (weak_ordering v, unspecified) noexcept;
    friend constexpr bool operator<=(weak_ordering v, unspecified) noexcept;
    friend constexpr bool operator>=(weak_ordering v, unspecified) noexcept;
    friend constexpr bool operator< (unspecified, weak_ordering v) noexcept;
    friend constexpr bool operator> (unspecified, weak_ordering v) noexcept;
    friend constexpr bool operator<=(unspecified, weak_ordering v) noexcept;
    friend constexpr bool operator>=(unspecified, weak_ordering v) noexcept;
    friend constexpr weak_ordering operator<=>(weak_ordering v, unspecified) noexcept;
    friend constexpr weak_ordering operator<=>(unspecified, weak_ordering v) noexcept;
  };

  // [cmp.strongord], Class strong_ordering
  class strong_ordering {
  public:
    // valid values
    static const strong_ordering less;
    static const strong_ordering equal;
    static const strong_ordering equivalent;
    static const strong_ordering greater;

    // conversions
    constexpr operator partial_ordering() const noexcept;
    constexpr operator weak_ordering() const noexcept;

    // comparisons
    friend constexpr bool operator==(strong_ordering v, unspecified) noexcept;
    friend constexpr bool operator==(strong_ordering v, strong_ordering w) noexcept = default;
    friend constexpr bool operator< (strong_ordering v, unspecified) noexcept;
    friend constexpr bool operator> (strong_ordering v, unspecified) noexcept;
    friend constexpr bool operator<=(strong_ordering v, unspecified) noexcept;
    friend constexpr bool operator>=(strong_ordering v, unspecified) noexcept;
    friend constexpr bool operator< (unspecified, strong_ordering v) noexcept;
    friend constexpr bool operator> (unspecified, strong_ordering v) noexcept;
    friend constexpr bool operator<=(unspecified, strong_ordering v) noexcept;
    friend constexpr bool operator>=(unspecified, strong_ordering v) noexcept;
    friend constexpr strong_ordering operator<=>(strong_ordering v, unspecified) noexcept;
    friend constexpr strong_ordering operator<=>(unspecified, strong_ordering v) noexcept;
  };
}
*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 143 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 144 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/common_comparison_category.h>
#endif /* expanded by -frewrite-includes */
# 144 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* compare_partial_order_fallback.h expanded by -frewrite-includes */
#include <__compare/compare_partial_order_fallback.h>
#else /* compare_partial_order_fallback.h expanded by -frewrite-includes */
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___COMPARE_COMPARE_PARTIAL_ORDER_FALLBACK
#define _LIBCPP___COMPARE_COMPARE_PARTIAL_ORDER_FALLBACK

#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* partial_order.h expanded by -frewrite-includes */
#include <__compare/partial_order.h>
#else /* partial_order.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___COMPARE_PARTIAL_ORDER
#define _LIBCPP___COMPARE_PARTIAL_ORDER

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* compare_three_way.h expanded by -frewrite-includes */
#include <__compare/compare_three_way.h>
#else /* compare_three_way.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___COMPARE_COMPARE_THREE_WAY_H
#define _LIBCPP___COMPARE_COMPARE_THREE_WAY_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/three_way_comparable.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way.h" 3

struct _LIBCPP_TEMPLATE_VIS compare_three_way
{
    template<class _T1, class _T2>
        requires three_way_comparable_with<_T1, _T2>
    constexpr _LIBCPP_HIDE_FROM_ABI
    auto operator()(_T1&& __t, _T2&& __u) const
        noexcept(noexcept(_VSTD::forward<_T1>(__t) <=> _VSTD::forward<_T2>(__u)))
        { return          _VSTD::forward<_T1>(__t) <=> _VSTD::forward<_T2>(__u); }

    using is_transparent = void;
};

#endif // _LIBCPP_STD_VER >= 20
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___COMPARE_COMPARE_THREE_WAY_H
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_three_way.h" 3
#endif /* compare_three_way.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* weak_order.h expanded by -frewrite-includes */
#include <__compare/weak_order.h>
#else /* weak_order.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___COMPARE_WEAK_ORDER
#define _LIBCPP___COMPARE_WEAK_ORDER

#if 0 /* expanded by -frewrite-includes */
#include <__compare/compare_three_way.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* strong_order.h expanded by -frewrite-includes */
#include <__compare/strong_order.h>
#else /* strong_order.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___COMPARE_STRONG_ORDER
#define _LIBCPP___COMPARE_STRONG_ORDER

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* bit_cast.h expanded by -frewrite-includes */
#include <__bit/bit_cast.h>
#else /* bit_cast.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_cast.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___BIT_BIT_CAST_H
#define _LIBCPP___BIT_BIT_CAST_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_cast.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_cast.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_trivially_copyable.h expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copyable.h>
#else /* is_trivially_copyable.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_cast.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copyable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copyable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copyable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copyable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copyable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copyable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copyable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copyable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copyable.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copyable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_trivially_copyable : public integral_constant<bool, __is_trivially_copyable(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copyable.h" 3
template <class _Tp>
inline constexpr bool is_trivially_copyable_v = __is_trivially_copyable(_Tp);
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copyable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copyable.h" 3
template <class _Tp>
inline constexpr bool __is_cheap_to_copy = is_trivially_copyable_v<_Tp> && sizeof(_Tp) <= sizeof(std::intmax_t);
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copyable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_H
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_copyable.h" 3
#endif /* is_trivially_copyable.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_cast.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_cast.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_cast.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_cast.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_cast.h" 3

template <class _ToType, class _FromType>
  requires(sizeof(_ToType) == sizeof(_FromType) &&
           is_trivially_copyable_v<_ToType> &&
           is_trivially_copyable_v<_FromType>)
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _ToType bit_cast(const _FromType& __from) noexcept {
  return __builtin_bit_cast(_ToType, __from);
}

#endif // _LIBCPP_STD_VER >= 20
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_cast.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___BIT_BIT_CAST_H
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_cast.h" 3
#endif /* bit_cast.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/compare_three_way.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* priority_tag.h expanded by -frewrite-includes */
#include <__utility/priority_tag.h>
#else /* priority_tag.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/priority_tag.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_PRIORITY_TAG_H
#define _LIBCPP___UTILITY_PRIORITY_TAG_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/priority_tag.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/priority_tag.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/priority_tag.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/priority_tag.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/priority_tag.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/priority_tag.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/priority_tag.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template<size_t _Ip> struct __priority_tag : __priority_tag<_Ip - 1> {};
template<> struct __priority_tag<0> {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___UTILITY_PRIORITY_TAG_H
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/priority_tag.h" 3
#endif /* priority_tag.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cmath expanded by -frewrite-includes */
#include <cmath>
#else /* cmath expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CMATH
#define _LIBCPP_CMATH

/*
    cmath synopsis

Macros:

    HUGE_VAL
    HUGE_VALF               // C99
    HUGE_VALL               // C99
    INFINITY                // C99
    NAN                     // C99
    FP_INFINITE             // C99
    FP_NAN                  // C99
    FP_NORMAL               // C99
    FP_SUBNORMAL            // C99
    FP_ZERO                 // C99
    FP_FAST_FMA             // C99
    FP_FAST_FMAF            // C99
    FP_FAST_FMAL            // C99
    FP_ILOGB0               // C99
    FP_ILOGBNAN             // C99
    MATH_ERRNO              // C99
    MATH_ERREXCEPT          // C99
    math_errhandling        // C99

namespace std
{

Types:

    float_t                 // C99
    double_t                // C99

// C90

floating_point abs(floating_point x);

floating_point acos (arithmetic x);
float          acosf(float x);
long double    acosl(long double x);

floating_point asin (arithmetic x);
float          asinf(float x);
long double    asinl(long double x);

floating_point atan (arithmetic x);
float          atanf(float x);
long double    atanl(long double x);

floating_point atan2 (arithmetic y, arithmetic x);
float          atan2f(float y, float x);
long double    atan2l(long double y, long double x);

floating_point ceil (arithmetic x);
float          ceilf(float x);
long double    ceill(long double x);

floating_point cos (arithmetic x);
float          cosf(float x);
long double    cosl(long double x);

floating_point cosh (arithmetic x);
float          coshf(float x);
long double    coshl(long double x);

floating_point exp (arithmetic x);
float          expf(float x);
long double    expl(long double x);

floating_point fabs (arithmetic x);
float          fabsf(float x);
long double    fabsl(long double x);

floating_point floor (arithmetic x);
float          floorf(float x);
long double    floorl(long double x);

floating_point fmod (arithmetic x, arithmetic y);
float          fmodf(float x, float y);
long double    fmodl(long double x, long double y);

floating_point frexp (arithmetic value, int* exp);
float          frexpf(float value, int* exp);
long double    frexpl(long double value, int* exp);

floating_point ldexp (arithmetic value, int exp);
float          ldexpf(float value, int exp);
long double    ldexpl(long double value, int exp);

floating_point log (arithmetic x);
float          logf(float x);
long double    logl(long double x);

floating_point log10 (arithmetic x);
float          log10f(float x);
long double    log10l(long double x);

floating_point modf (floating_point value, floating_point* iptr);
float          modff(float value, float* iptr);
long double    modfl(long double value, long double* iptr);

floating_point pow (arithmetic x, arithmetic y);
float          powf(float x, float y);
long double    powl(long double x, long double y);

floating_point sin (arithmetic x);
float          sinf(float x);
long double    sinl(long double x);

floating_point sinh (arithmetic x);
float          sinhf(float x);
long double    sinhl(long double x);

floating_point sqrt (arithmetic x);
float          sqrtf(float x);
long double    sqrtl(long double x);

floating_point tan (arithmetic x);
float          tanf(float x);
long double    tanl(long double x);

floating_point tanh (arithmetic x);
float          tanhf(float x);
long double    tanhl(long double x);

//  C99

bool signbit(arithmetic x);

int fpclassify(arithmetic x);

bool isfinite(arithmetic x);
bool isinf(arithmetic x);
bool isnan(arithmetic x);
bool isnormal(arithmetic x);

bool isgreater(arithmetic x, arithmetic y);
bool isgreaterequal(arithmetic x, arithmetic y);
bool isless(arithmetic x, arithmetic y);
bool islessequal(arithmetic x, arithmetic y);
bool islessgreater(arithmetic x, arithmetic y);
bool isunordered(arithmetic x, arithmetic y);

floating_point acosh (arithmetic x);
float          acoshf(float x);
long double    acoshl(long double x);

floating_point asinh (arithmetic x);
float          asinhf(float x);
long double    asinhl(long double x);

floating_point atanh (arithmetic x);
float          atanhf(float x);
long double    atanhl(long double x);

floating_point cbrt (arithmetic x);
float          cbrtf(float x);
long double    cbrtl(long double x);

floating_point copysign (arithmetic x, arithmetic y);
float          copysignf(float x, float y);
long double    copysignl(long double x, long double y);

floating_point erf (arithmetic x);
float          erff(float x);
long double    erfl(long double x);

floating_point erfc (arithmetic x);
float          erfcf(float x);
long double    erfcl(long double x);

floating_point exp2 (arithmetic x);
float          exp2f(float x);
long double    exp2l(long double x);

floating_point expm1 (arithmetic x);
float          expm1f(float x);
long double    expm1l(long double x);

floating_point fdim (arithmetic x, arithmetic y);
float          fdimf(float x, float y);
long double    fdiml(long double x, long double y);

floating_point fma (arithmetic x, arithmetic y, arithmetic z);
float          fmaf(float x, float y, float z);
long double    fmal(long double x, long double y, long double z);

floating_point fmax (arithmetic x, arithmetic y);
float          fmaxf(float x, float y);
long double    fmaxl(long double x, long double y);

floating_point fmin (arithmetic x, arithmetic y);
float          fminf(float x, float y);
long double    fminl(long double x, long double y);

floating_point hypot (arithmetic x, arithmetic y);
float          hypotf(float x, float y);
long double    hypotl(long double x, long double y);

double       hypot(double x, double y, double z);                // C++17
float        hypot(float x, float y, float z);                   // C++17
long double  hypot(long double x, long double y, long double z); // C++17

int ilogb (arithmetic x);
int ilogbf(float x);
int ilogbl(long double x);

floating_point lgamma (arithmetic x);
float          lgammaf(float x);
long double    lgammal(long double x);

long long llrint (arithmetic x);
long long llrintf(float x);
long long llrintl(long double x);

long long llround (arithmetic x);
long long llroundf(float x);
long long llroundl(long double x);

floating_point log1p (arithmetic x);
float          log1pf(float x);
long double    log1pl(long double x);

floating_point log2 (arithmetic x);
float          log2f(float x);
long double    log2l(long double x);

floating_point logb (arithmetic x);
float          logbf(float x);
long double    logbl(long double x);

long lrint (arithmetic x);
long lrintf(float x);
long lrintl(long double x);

long lround (arithmetic x);
long lroundf(float x);
long lroundl(long double x);

double      nan (const char* str);
float       nanf(const char* str);
long double nanl(const char* str);

floating_point nearbyint (arithmetic x);
float          nearbyintf(float x);
long double    nearbyintl(long double x);

floating_point nextafter (arithmetic x, arithmetic y);
float          nextafterf(float x, float y);
long double    nextafterl(long double x, long double y);

floating_point nexttoward (arithmetic x, long double y);
float          nexttowardf(float x, long double y);
long double    nexttowardl(long double x, long double y);

floating_point remainder (arithmetic x, arithmetic y);
float          remainderf(float x, float y);
long double    remainderl(long double x, long double y);

floating_point remquo (arithmetic x, arithmetic y, int* pquo);
float          remquof(float x, float y, int* pquo);
long double    remquol(long double x, long double y, int* pquo);

floating_point rint (arithmetic x);
float          rintf(float x);
long double    rintl(long double x);

floating_point round (arithmetic x);
float          roundf(float x);
long double    roundl(long double x);

floating_point scalbln (arithmetic x, long ex);
float          scalblnf(float x, long ex);
long double    scalblnl(long double x, long ex);

floating_point scalbn (arithmetic x, int ex);
float          scalbnf(float x, int ex);
long double    scalbnl(long double x, int ex);

floating_point tgamma (arithmetic x);
float          tgammaf(float x);
long double    tgammal(long double x);

floating_point trunc (arithmetic x);
float          truncf(float x);
long double    truncl(long double x);

constexpr float       lerp(float a, float b, float t) noexcept;                   // C++20
constexpr double      lerp(double a, double b, double t) noexcept;                // C++20
constexpr long double lerp(long double a, long double b, long double t) noexcept; // C++20

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 307 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
# 308 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 308 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
# 309 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 309 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
# 310 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 310 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
# 311 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 311 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
# 312 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_floating_point.h>
#endif /* expanded by -frewrite-includes */
# 312 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
# 313 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 313 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
# 314 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* promote.h expanded by -frewrite-includes */
#include <__type_traits/promote.h>
#else /* promote.h expanded by -frewrite-includes */
# 314 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/promote.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_PROMOTE_H
#define _LIBCPP___TYPE_TRAITS_PROMOTE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/promote.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/promote.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/promote.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/promote.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/promote.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/promote.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/promote.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/promote.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/promote.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/promote.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/promote.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct __numeric_type {
  static void __test(...);
  static float __test(float);
  static double __test(char);
  static double __test(int);
  static double __test(unsigned);
  static double __test(long);
  static double __test(unsigned long);
  static double __test(long long);
  static double __test(unsigned long long);
#ifndef _LIBCPP_HAS_NO_INT128
  static double __test(__int128_t);
  static double __test(__uint128_t);
#endif
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/promote.h" 3
  static double __test(double);
  static long double __test(long double);

  typedef decltype(__test(std::declval<_Tp>())) type;
  static const bool value = _IsNotSame<type, void>::value;
};

template <>
struct __numeric_type<void> {
  static const bool value = true;
};

template <class _A1,
          class _A2 = void,
          class _A3 = void,
          bool      = __numeric_type<_A1>::value && __numeric_type<_A2>::value && __numeric_type<_A3>::value>
class __promote_imp {
public:
  static const bool value = false;
};

template <class _A1, class _A2, class _A3>
class __promote_imp<_A1, _A2, _A3, true> {
private:
  typedef typename __promote_imp<_A1>::type __type1;
  typedef typename __promote_imp<_A2>::type __type2;
  typedef typename __promote_imp<_A3>::type __type3;

public:
  typedef decltype(__type1() + __type2() + __type3()) type;
  static const bool value = true;
};

template <class _A1, class _A2>
class __promote_imp<_A1, _A2, void, true> {
private:
  typedef typename __promote_imp<_A1>::type __type1;
  typedef typename __promote_imp<_A2>::type __type2;

public:
  typedef decltype(__type1() + __type2()) type;
  static const bool value = true;
};

template <class _A1>
class __promote_imp<_A1, void, void, true> {
public:
  typedef typename __numeric_type<_A1>::type type;
  static const bool value = true;
};

template <class _A1, class _A2 = void, class _A3 = void>
class __promote : public __promote_imp<_A1, _A2, _A3> {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_PROMOTE_H
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/promote.h" 3
#endif /* promote.h expanded by -frewrite-includes */
# 315 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 315 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
# 316 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 316 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
# 317 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 317 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
# 318 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* math.h expanded by -frewrite-includes */
#include <math.h>
#else /* math.h expanded by -frewrite-includes */
# 319 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_MATH_H
#define _LIBCPP_MATH_H

/*
    math.h synopsis

Macros:

    HUGE_VAL
    HUGE_VALF               // C99
    HUGE_VALL               // C99
    INFINITY                // C99
    NAN                     // C99
    FP_INFINITE             // C99
    FP_NAN                  // C99
    FP_NORMAL               // C99
    FP_SUBNORMAL            // C99
    FP_ZERO                 // C99
    FP_FAST_FMA             // C99
    FP_FAST_FMAF            // C99
    FP_FAST_FMAL            // C99
    FP_ILOGB0               // C99
    FP_ILOGBNAN             // C99
    MATH_ERRNO              // C99
    MATH_ERREXCEPT          // C99
    math_errhandling        // C99

Types:

    float_t                 // C99
    double_t                // C99

// C90

floating_point abs(floating_point x);

floating_point acos (arithmetic x);
float          acosf(float x);
long double    acosl(long double x);

floating_point asin (arithmetic x);
float          asinf(float x);
long double    asinl(long double x);

floating_point atan (arithmetic x);
float          atanf(float x);
long double    atanl(long double x);

floating_point atan2 (arithmetic y, arithmetic x);
float          atan2f(float y, float x);
long double    atan2l(long double y, long double x);

floating_point ceil (arithmetic x);
float          ceilf(float x);
long double    ceill(long double x);

floating_point cos (arithmetic x);
float          cosf(float x);
long double    cosl(long double x);

floating_point cosh (arithmetic x);
float          coshf(float x);
long double    coshl(long double x);

floating_point exp (arithmetic x);
float          expf(float x);
long double    expl(long double x);

floating_point fabs (arithmetic x);
float          fabsf(float x);
long double    fabsl(long double x);

floating_point floor (arithmetic x);
float          floorf(float x);
long double    floorl(long double x);

floating_point fmod (arithmetic x, arithmetic y);
float          fmodf(float x, float y);
long double    fmodl(long double x, long double y);

floating_point frexp (arithmetic value, int* exp);
float          frexpf(float value, int* exp);
long double    frexpl(long double value, int* exp);

floating_point ldexp (arithmetic value, int exp);
float          ldexpf(float value, int exp);
long double    ldexpl(long double value, int exp);

floating_point log (arithmetic x);
float          logf(float x);
long double    logl(long double x);

floating_point log10 (arithmetic x);
float          log10f(float x);
long double    log10l(long double x);

floating_point modf (floating_point value, floating_point* iptr);
float          modff(float value, float* iptr);
long double    modfl(long double value, long double* iptr);

floating_point pow (arithmetic x, arithmetic y);
float          powf(float x, float y);
long double    powl(long double x, long double y);

floating_point sin (arithmetic x);
float          sinf(float x);
long double    sinl(long double x);

floating_point sinh (arithmetic x);
float          sinhf(float x);
long double    sinhl(long double x);

floating_point sqrt (arithmetic x);
float          sqrtf(float x);
long double    sqrtl(long double x);

floating_point tan (arithmetic x);
float          tanf(float x);
long double    tanl(long double x);

floating_point tanh (arithmetic x);
float          tanhf(float x);
long double    tanhl(long double x);

//  C99

bool signbit(arithmetic x);

int fpclassify(arithmetic x);

bool isfinite(arithmetic x);
bool isinf(arithmetic x);
bool isnan(arithmetic x);
bool isnormal(arithmetic x);

bool isgreater(arithmetic x, arithmetic y);
bool isgreaterequal(arithmetic x, arithmetic y);
bool isless(arithmetic x, arithmetic y);
bool islessequal(arithmetic x, arithmetic y);
bool islessgreater(arithmetic x, arithmetic y);
bool isunordered(arithmetic x, arithmetic y);

floating_point acosh (arithmetic x);
float          acoshf(float x);
long double    acoshl(long double x);

floating_point asinh (arithmetic x);
float          asinhf(float x);
long double    asinhl(long double x);

floating_point atanh (arithmetic x);
float          atanhf(float x);
long double    atanhl(long double x);

floating_point cbrt (arithmetic x);
float          cbrtf(float x);
long double    cbrtl(long double x);

floating_point copysign (arithmetic x, arithmetic y);
float          copysignf(float x, float y);
long double    copysignl(long double x, long double y);

floating_point erf (arithmetic x);
float          erff(float x);
long double    erfl(long double x);

floating_point erfc (arithmetic x);
float          erfcf(float x);
long double    erfcl(long double x);

floating_point exp2 (arithmetic x);
float          exp2f(float x);
long double    exp2l(long double x);

floating_point expm1 (arithmetic x);
float          expm1f(float x);
long double    expm1l(long double x);

floating_point fdim (arithmetic x, arithmetic y);
float          fdimf(float x, float y);
long double    fdiml(long double x, long double y);

floating_point fma (arithmetic x, arithmetic y, arithmetic z);
float          fmaf(float x, float y, float z);
long double    fmal(long double x, long double y, long double z);

floating_point fmax (arithmetic x, arithmetic y);
float          fmaxf(float x, float y);
long double    fmaxl(long double x, long double y);

floating_point fmin (arithmetic x, arithmetic y);
float          fminf(float x, float y);
long double    fminl(long double x, long double y);

floating_point hypot (arithmetic x, arithmetic y);
float          hypotf(float x, float y);
long double    hypotl(long double x, long double y);

int ilogb (arithmetic x);
int ilogbf(float x);
int ilogbl(long double x);

floating_point lgamma (arithmetic x);
float          lgammaf(float x);
long double    lgammal(long double x);

long long llrint (arithmetic x);
long long llrintf(float x);
long long llrintl(long double x);

long long llround (arithmetic x);
long long llroundf(float x);
long long llroundl(long double x);

floating_point log1p (arithmetic x);
float          log1pf(float x);
long double    log1pl(long double x);

floating_point log2 (arithmetic x);
float          log2f(float x);
long double    log2l(long double x);

floating_point logb (arithmetic x);
float          logbf(float x);
long double    logbl(long double x);

long lrint (arithmetic x);
long lrintf(float x);
long lrintl(long double x);

long lround (arithmetic x);
long lroundf(float x);
long lroundl(long double x);

double      nan (const char* str);
float       nanf(const char* str);
long double nanl(const char* str);

floating_point nearbyint (arithmetic x);
float          nearbyintf(float x);
long double    nearbyintl(long double x);

floating_point nextafter (arithmetic x, arithmetic y);
float          nextafterf(float x, float y);
long double    nextafterl(long double x, long double y);

floating_point nexttoward (arithmetic x, long double y);
float          nexttowardf(float x, long double y);
long double    nexttowardl(long double x, long double y);

floating_point remainder (arithmetic x, arithmetic y);
float          remainderf(float x, float y);
long double    remainderl(long double x, long double y);

floating_point remquo (arithmetic x, arithmetic y, int* pquo);
float          remquof(float x, float y, int* pquo);
long double    remquol(long double x, long double y, int* pquo);

floating_point rint (arithmetic x);
float          rintf(float x);
long double    rintl(long double x);

floating_point round (arithmetic x);
float          roundf(float x);
long double    roundl(long double x);

floating_point scalbln (arithmetic x, long ex);
float          scalblnf(float x, long ex);
long double    scalblnl(long double x, long ex);

floating_point scalbn (arithmetic x, int ex);
float          scalbnf(float x, int ex);
long double    scalbnl(long double x, int ex);

floating_point tgamma (arithmetic x);
float          tgammaf(float x);
long double    tgammal(long double x);

floating_point trunc (arithmetic x);
float          truncf(float x);
long double    truncl(long double x);

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 294 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 295 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 297 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 298 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#endif
# 299 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<math.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 301 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* math.h expanded by -frewrite-includes */
#    include_next <math.h>
#else /* math.h expanded by -frewrite-includes */
# 301 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "gen/zircon/public/sysroot/cpp/include/math.h" 1 3 4
#ifndef SYSROOT_MATH_H_
#define SYSROOT_MATH_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4

#define __NEED_float_t
#define __NEED_double_t
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 12 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/math.h" 2 3 4

#if 0 /* disabled by -frewrite-includes */
#if 100 * __GNUC__ + __GNUC_MINOR__ >= 303
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4
#define NAN __builtin_nanf("")
#define INFINITY __builtin_inff()
#else
# 18 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4
#define NAN (0.0f / 0.0f)
#define INFINITY 1e5000f
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4

#define HUGE_VALF INFINITY
#define HUGE_VAL ((double)INFINITY)
#define HUGE_VALL ((long double)INFINITY)

#define MATH_ERRNO 1
#define MATH_ERREXCEPT 2
#define math_errhandling 2

#define FP_ILOGBNAN (-1 - (int)(((unsigned)-1) >> 1))
#define FP_ILOGB0 FP_ILOGBNAN

#define FP_NAN 0
#define FP_INFINITE 1
#define FP_ZERO 2
#define FP_SUBNORMAL 3
#define FP_NORMAL 4

int __fpclassify(double);
int __fpclassifyf(float);
int __fpclassifyl(long double);

static __inline unsigned __FLOAT_BITS(float __f) {
  union {
    float __f;
    unsigned __i;
  } __u;
  __u.__f = __f;
  return __u.__i;
}
static __inline unsigned long long __DOUBLE_BITS(double __f) {
  union {
    double __f;
    unsigned long long __i;
  } __u;
  __u.__f = __f;
  return __u.__i;
}

#define fpclassify(x)                            \
  (sizeof(x) == sizeof(float) ? __fpclassifyf(x) \
                              : sizeof(x) == sizeof(double) ? __fpclassify(x) : __fpclassifyl(x))

#define isinf(x)                                                                         \
  (sizeof(x) == sizeof(float)                                                            \
       ? (__FLOAT_BITS(x) & 0x7fffffff) == 0x7f800000                                    \
       : sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL >> 1) == 0x7ffULL << 52 \
                                     : __fpclassifyl(x) == FP_INFINITE)

#define isnan(x)                                                                        \
  (sizeof(x) == sizeof(float)                                                           \
       ? (__FLOAT_BITS(x) & 0x7fffffff) > 0x7f800000                                    \
       : sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL >> 1) > 0x7ffULL << 52 \
                                     : __fpclassifyl(x) == FP_NAN)

#define isnormal(x)                                                                                \
  (sizeof(x) == sizeof(float) ? ((__FLOAT_BITS(x) + 0x00800000) & 0x7fffffff) >= 0x01000000        \
                              : sizeof(x) == sizeof(double) ? ((__DOUBLE_BITS(x) + (1ULL << 52)) & \
                                                               -1ULL >> 1) >= 1ULL << 53           \
                                                            : __fpclassifyl(x) == FP_NORMAL)

#define isfinite(x)                                                                     \
  (sizeof(x) == sizeof(float)                                                           \
       ? (__FLOAT_BITS(x) & 0x7fffffff) < 0x7f800000                                    \
       : sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL >> 1) < 0x7ffULL << 52 \
                                     : __fpclassifyl(x) > FP_INFINITE)

int __signbit(double);
int __signbitf(float);
int __signbitl(long double);

#define signbit(x)                    \
  (sizeof(x) == sizeof(float)         \
       ? (int)(__FLOAT_BITS(x) >> 31) \
       : sizeof(x) == sizeof(double) ? (int)(__DOUBLE_BITS(x) >> 63) : __signbitl(x))

#define isunordered(x, y) __builtin_isunordered(x, y)

#define __ISREL_DEF(rel, op, type) \
  static __inline int __is##rel(type __x, type __y) { return !isunordered(__x, __y) && __x op __y; }

__ISREL_DEF(lessf, <, float_t)
__ISREL_DEF(less, <, double_t)
__ISREL_DEF(lessl, <, long double)
__ISREL_DEF(lessequalf, <=, float_t)
__ISREL_DEF(lessequal, <=, double_t)
__ISREL_DEF(lessequall, <=, long double)
__ISREL_DEF(lessgreaterf, !=, float_t)
__ISREL_DEF(lessgreater, !=, double_t)
__ISREL_DEF(lessgreaterl, !=, long double)
__ISREL_DEF(greaterf, >, float_t)
__ISREL_DEF(greater, >, double_t)
__ISREL_DEF(greaterl, >, long double)
__ISREL_DEF(greaterequalf, >=, float_t)
__ISREL_DEF(greaterequal, >=, double_t)
__ISREL_DEF(greaterequall, >=, long double)

#define isless(x, y) __builtin_isless(x, y)
#define islessequal(x, y) __builtin_islessequal(x, y)
#define islessgreater(x, y) __builtin_islessgreater(x, y)
#define isgreater(x, y) __builtin_isgreater(x, y)
#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)

double acos(double);
float acosf(float);
long double acosl(long double);

double acosh(double);
float acoshf(float);
long double acoshl(long double);

double asin(double);
float asinf(float);
long double asinl(long double);

double asinh(double);
float asinhf(float);
long double asinhl(long double);

double atan(double);
float atanf(float);
long double atanl(long double);

double atan2(double, double);
float atan2f(float, float);
long double atan2l(long double, long double);

double atanh(double);
float atanhf(float);
long double atanhl(long double);

double cbrt(double);
float cbrtf(float);
long double cbrtl(long double);

double ceil(double);
float ceilf(float);
long double ceill(long double);

double copysign(double, double);
float copysignf(float, float);
long double copysignl(long double, long double);

double cos(double);
float cosf(float);
long double cosl(long double);

double cosh(double);
float coshf(float);
long double coshl(long double);

double erf(double);
float erff(float);
long double erfl(long double);

double erfc(double);
float erfcf(float);
long double erfcl(long double);

double exp(double);
float expf(float);
long double expl(long double);

double exp2(double);
float exp2f(float);
long double exp2l(long double);

double expm1(double);
float expm1f(float);
long double expm1l(long double);

double fabs(double);
float fabsf(float);
long double fabsl(long double);

double fdim(double, double);
float fdimf(float, float);
long double fdiml(long double, long double);

double floor(double);
float floorf(float);
long double floorl(long double);

double fma(double, double, double);
float fmaf(float, float, float);
long double fmal(long double, long double, long double);

double fmax(double, double);
float fmaxf(float, float);
long double fmaxl(long double, long double);

double fmin(double, double);
float fminf(float, float);
long double fminl(long double, long double);

double fmod(double, double);
float fmodf(float, float);
long double fmodl(long double, long double);

double frexp(double, int*);
float frexpf(float, int*);
long double frexpl(long double, int*);

double hypot(double, double);
float hypotf(float, float);
long double hypotl(long double, long double);

int ilogb(double);
int ilogbf(float);
int ilogbl(long double);

double ldexp(double, int);
float ldexpf(float, int);
long double ldexpl(long double, int);

double lgamma(double);
float lgammaf(float);
long double lgammal(long double);

long long llrint(double);
long long llrintf(float);
long long llrintl(long double);

long long llround(double);
long long llroundf(float);
long long llroundl(long double);

double log(double);
float logf(float);
long double logl(long double);

double log10(double);
float log10f(float);
long double log10l(long double);

double log1p(double);
float log1pf(float);
long double log1pl(long double);

double log2(double);
float log2f(float);
long double log2l(long double);

double logb(double);
float logbf(float);
long double logbl(long double);

long lrint(double);
long lrintf(float);
long lrintl(long double);

long lround(double);
long lroundf(float);
long lroundl(long double);

double modf(double, double*);
float modff(float, float*);
long double modfl(long double, long double*);

double nan(const char*);
float nanf(const char*);
long double nanl(const char*);

double nearbyint(double);
float nearbyintf(float);
long double nearbyintl(long double);

double nextafter(double, double);
float nextafterf(float, float);
long double nextafterl(long double, long double);

double nexttoward(double, long double);
float nexttowardf(float, long double);
long double nexttowardl(long double, long double);

double pow(double, double);
float powf(float, float);
long double powl(long double, long double);

double remainder(double, double);
float remainderf(float, float);
long double remainderl(long double, long double);

double remquo(double, double, int*);
float remquof(float, float, int*);
long double remquol(long double, long double, int*);

double rint(double);
float rintf(float);
long double rintl(long double);

double round(double);
float roundf(float);
long double roundl(long double);

double scalbln(double, long);
float scalblnf(float, long);
long double scalblnl(long double, long);

double scalbn(double, int);
float scalbnf(float, int);
long double scalbnl(long double, int);

double sin(double);
float sinf(float);
long double sinl(long double);

double sinh(double);
float sinhf(float);
long double sinhl(long double);

double sqrt(double);
float sqrtf(float);
long double sqrtl(long double);

double tan(double);
float tanf(float);
long double tanl(long double);

double tanh(double);
float tanhf(float);
long double tanhl(long double);

double tgamma(double);
float tgammaf(float);
long double tgammal(long double);

double trunc(double);
float truncf(float);
long double truncl(long double);

#if 0 /* disabled by -frewrite-includes */
#if defined(_XOPEN_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 353 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4
#undef MAXFLOAT
#define MAXFLOAT 3.40282346638528859812e+38F
#endif
# 356 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 358 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4
#define M_E 2.7182818284590452354         /* e */
#define M_LOG2E 1.4426950408889634074     /* log_2 e */
#define M_LOG10E 0.43429448190325182765   /* log_10 e */
#define M_LN2 0.69314718055994530942      /* log_e 2 */
#define M_LN10 2.30258509299404568402     /* log_e 10 */
#define M_PI 3.14159265358979323846       /* pi */
#define M_PI_2 1.57079632679489661923     /* pi/2 */
#define M_PI_4 0.78539816339744830962     /* pi/4 */
#define M_1_PI 0.31830988618379067154     /* 1/pi */
#define M_2_PI 0.63661977236758134308     /* 2/pi */
#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
#define M_SQRT2 1.41421356237309504880    /* sqrt(2) */
#define M_SQRT1_2 0.70710678118654752440  /* 1/sqrt(2) */

extern int signgam;

double j0(double);
double j1(double);
double jn(int, double);

double y0(double);
double y1(double);
double yn(int, double);
#endif
# 382 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 384 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4
#define HUGE 3.40282346638528859812e+38F

double drem(double, double);
float dremf(float, float);

int finite(double);
int finitef(float);

double scalb(double, double);
float scalbf(float, float);

double significand(double);
float significandf(float);

double lgamma_r(double, int*);
float lgammaf_r(float, int*);

float j0f(float);
float j1f(float);
float jnf(int, float);

float y0f(float);
float y1f(float);
float ynf(int, float);
#endif
# 409 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4

#ifdef _GNU_SOURCE
long double lgammal_r(long double, int*);

void sincos(double, double*, double*);
void sincosf(float, float*, float*);
void sincosl(long double, long double*, long double*);

double exp10(double);
float exp10f(float);
long double exp10l(long double);

double pow10(double);
float pow10f(float);
long double pow10l(long double);
#endif
# 425 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4

#ifdef __cplusplus
}
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4

#endif  // SYSROOT_MATH_H_
# 431 "gen/zircon/public/sysroot/cpp/include/math.h" 3 4
#endif /* math.h expanded by -frewrite-includes */
# 302 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#  endif
# 303 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#ifdef __cplusplus

// We support including .h headers inside 'extern "C"' contexts, so switch
// back to C++ linkage before including these C++ headers.
extern "C++" {

#    ifdef fpclassify
#      undef fpclassify
#    endif
# 313 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef signbit
#      undef signbit
#    endif
# 317 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isfinite
#      undef isfinite
#    endif
# 321 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isinf
#      undef isinf
#    endif
# 325 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isnan
#      undef isnan
#    endif
# 329 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isnormal
#      undef isnormal
#    endif
# 333 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isgreater
#      undef isgreater
#    endif
# 337 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isgreaterequal
#      undef isgreaterequal
#    endif
# 341 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isless
#      undef isless
#    endif
# 345 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef islessequal
#      undef islessequal
#    endif
# 349 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef islessgreater
#      undef islessgreater
#    endif
# 353 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isunordered
#      undef isunordered
#    endif
# 357 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* abs.h expanded by -frewrite-includes */
#include <__math/abs.h>
#else /* abs.h expanded by -frewrite-includes */
# 358 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/abs.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_ABS_H
#define _LIBCPP___MATH_ABS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/abs.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/abs.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/abs.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/abs.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/abs.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/abs.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/abs.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/abs.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/abs.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// fabs

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI float fabs(float __x) _NOEXCEPT { return __builtin_fabsf(__x); }

template <class = int>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI double fabs(double __x) _NOEXCEPT {
  return __builtin_fabs(__x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long double fabs(long double __x) _NOEXCEPT {
  return __builtin_fabsl(__x);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double fabs(_A1 __x) _NOEXCEPT {
  return __builtin_fabs((double)__x);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_ABS_H
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/abs.h" 3
#endif /* abs.h expanded by -frewrite-includes */
# 359 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* copysign.h expanded by -frewrite-includes */
#include <__math/copysign.h>
#else /* copysign.h expanded by -frewrite-includes */
# 359 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/copysign.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_COPYSIGN_H
#define _LIBCPP___MATH_COPYSIGN_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/copysign.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/copysign.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/copysign.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/copysign.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/copysign.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/copysign.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/promote.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/copysign.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/copysign.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/copysign.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/copysign.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/copysign.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/copysign.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/copysign.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// copysign

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI float copysign(float __x, float __y) _NOEXCEPT {
  return ::__builtin_copysignf(__x, __y);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long double copysign(long double __x, long double __y) _NOEXCEPT {
  return ::__builtin_copysignl(__x, __y);
}

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type
copysign(_A1 __x, _A2 __y) _NOEXCEPT {
  return ::__builtin_copysign(__x, __y);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_COPYSIGN_H
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/copysign.h" 3
#endif /* copysign.h expanded by -frewrite-includes */
# 360 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* error_functions.h expanded by -frewrite-includes */
#include <__math/error_functions.h>
#else /* error_functions.h expanded by -frewrite-includes */
# 360 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/error_functions.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_ERROR_FUNCTIONS_H
#define _LIBCPP___MATH_ERROR_FUNCTIONS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/error_functions.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/error_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/error_functions.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/error_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/error_functions.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/error_functions.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/error_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/error_functions.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/error_functions.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// erf

inline _LIBCPP_HIDE_FROM_ABI float erf(float __x) _NOEXCEPT { return __builtin_erff(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double erf(double __x) _NOEXCEPT {
  return __builtin_erf(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double erf(long double __x) _NOEXCEPT { return __builtin_erfl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double erf(_A1 __x) _NOEXCEPT {
  return __builtin_erf((double)__x);
}

// erfc

inline _LIBCPP_HIDE_FROM_ABI float erfc(float __x) _NOEXCEPT { return __builtin_erfcf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double erfc(double __x) _NOEXCEPT {
  return __builtin_erfc(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double erfc(long double __x) _NOEXCEPT { return __builtin_erfcl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double erfc(_A1 __x) _NOEXCEPT {
  return __builtin_erfc((double)__x);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_ERROR_FUNCTIONS_H
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/error_functions.h" 3
#endif /* error_functions.h expanded by -frewrite-includes */
# 361 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* exponential_functions.h expanded by -frewrite-includes */
#include <__math/exponential_functions.h>
#else /* exponential_functions.h expanded by -frewrite-includes */
# 361 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_EXPONENTIAL_FUNCTIONS_H
#define _LIBCPP___MATH_EXPONENTIAL_FUNCTIONS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/promote.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// exp

inline _LIBCPP_HIDE_FROM_ABI float exp(float __x) _NOEXCEPT { return __builtin_expf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double exp(double __x) _NOEXCEPT {
  return __builtin_exp(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double exp(long double __x) _NOEXCEPT { return __builtin_expl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double exp(_A1 __x) _NOEXCEPT {
  return __builtin_exp((double)__x);
}

// frexp

inline _LIBCPP_HIDE_FROM_ABI float frexp(float __x, int* __e) _NOEXCEPT { return __builtin_frexpf(__x, __e); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double frexp(double __x, int* __e) _NOEXCEPT {
  return __builtin_frexp(__x, __e);
}

inline _LIBCPP_HIDE_FROM_ABI long double frexp(long double __x, int* __e) _NOEXCEPT {
  return __builtin_frexpl(__x, __e);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double frexp(_A1 __x, int* __e) _NOEXCEPT {
  return __builtin_frexp((double)__x, __e);
}

// ldexp

inline _LIBCPP_HIDE_FROM_ABI float ldexp(float __x, int __e) _NOEXCEPT { return __builtin_ldexpf(__x, __e); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double ldexp(double __x, int __e) _NOEXCEPT {
  return __builtin_ldexp(__x, __e);
}

inline _LIBCPP_HIDE_FROM_ABI long double ldexp(long double __x, int __e) _NOEXCEPT {
  return __builtin_ldexpl(__x, __e);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double ldexp(_A1 __x, int __e) _NOEXCEPT {
  return __builtin_ldexp((double)__x, __e);
}

// exp2

inline _LIBCPP_HIDE_FROM_ABI float exp2(float __x) _NOEXCEPT { return __builtin_exp2f(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double exp2(double __x) _NOEXCEPT {
  return __builtin_exp2(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double exp2(long double __x) _NOEXCEPT { return __builtin_exp2l(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double exp2(_A1 __x) _NOEXCEPT {
  return __builtin_exp2((double)__x);
}

// expm1

inline _LIBCPP_HIDE_FROM_ABI float expm1(float __x) _NOEXCEPT { return __builtin_expm1f(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double expm1(double __x) _NOEXCEPT {
  return __builtin_expm1(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double expm1(long double __x) _NOEXCEPT { return __builtin_expm1l(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double expm1(_A1 __x) _NOEXCEPT {
  return __builtin_expm1((double)__x);
}

// scalbln

inline _LIBCPP_HIDE_FROM_ABI float scalbln(float __x, long __y) _NOEXCEPT { return __builtin_scalblnf(__x, __y); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double scalbln(double __x, long __y) _NOEXCEPT {
  return __builtin_scalbln(__x, __y);
}

inline _LIBCPP_HIDE_FROM_ABI long double scalbln(long double __x, long __y) _NOEXCEPT {
  return __builtin_scalblnl(__x, __y);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double scalbln(_A1 __x, long __y) _NOEXCEPT {
  return __builtin_scalbln((double)__x, __y);
}

// scalbn

inline _LIBCPP_HIDE_FROM_ABI float scalbn(float __x, int __y) _NOEXCEPT { return __builtin_scalbnf(__x, __y); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double scalbn(double __x, int __y) _NOEXCEPT {
  return __builtin_scalbn(__x, __y);
}

inline _LIBCPP_HIDE_FROM_ABI long double scalbn(long double __x, int __y) _NOEXCEPT {
  return __builtin_scalbnl(__x, __y);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double scalbn(_A1 __x, int __y) _NOEXCEPT {
  return __builtin_scalbn((double)__x, __y);
}

// pow

inline _LIBCPP_HIDE_FROM_ABI float pow(float __x, float __y) _NOEXCEPT { return __builtin_powf(__x, __y); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double pow(double __x, double __y) _NOEXCEPT {
  return __builtin_pow(__x, __y);
}

inline _LIBCPP_HIDE_FROM_ABI long double pow(long double __x, long double __y) _NOEXCEPT {
  return __builtin_powl(__x, __y);
}

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type pow(_A1 __x, _A2 __y) _NOEXCEPT {
  using __result_type = typename __promote<_A1, _A2>::type;
  static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
  return __math::pow((__result_type)__x, (__result_type)__y);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_EXPONENTIAL_FUNCTIONS_H
# 172 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/exponential_functions.h" 3
#endif /* exponential_functions.h expanded by -frewrite-includes */
# 362 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* fdim.h expanded by -frewrite-includes */
#include <__math/fdim.h>
#else /* fdim.h expanded by -frewrite-includes */
# 362 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fdim.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_FDIM_H
#define _LIBCPP___MATH_FDIM_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fdim.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fdim.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fdim.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fdim.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fdim.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fdim.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fdim.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fdim.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/promote.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fdim.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fdim.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fdim.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fdim.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fdim.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

inline _LIBCPP_HIDE_FROM_ABI float fdim(float __x, float __y) _NOEXCEPT { return __builtin_fdimf(__x, __y); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double fdim(double __x, double __y) _NOEXCEPT {
  return __builtin_fdim(__x, __y);
}

inline _LIBCPP_HIDE_FROM_ABI long double fdim(long double __x, long double __y) _NOEXCEPT {
  return __builtin_fdiml(__x, __y);
}

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type fdim(_A1 __x, _A2 __y) _NOEXCEPT {
  using __result_type = typename __promote<_A1, _A2>::type;
  static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
  return __math::fdim((__result_type)__x, (__result_type)__y);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_FDIM_H
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fdim.h" 3
#endif /* fdim.h expanded by -frewrite-includes */
# 363 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* fma.h expanded by -frewrite-includes */
#include <__math/fma.h>
#else /* fma.h expanded by -frewrite-includes */
# 363 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fma.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_FMA_H
#define _LIBCPP___MATH_FMA_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fma.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fma.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fma.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fma.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fma.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fma.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fma.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fma.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/promote.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fma.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fma.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fma.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fma.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fma.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

inline _LIBCPP_HIDE_FROM_ABI float fma(float __x, float __y, float __z) _NOEXCEPT {
  return __builtin_fmaf(__x, __y, __z);
}

template <class = int>
_LIBCPP_HIDE_FROM_ABI double fma(double __x, double __y, double __z) _NOEXCEPT {
  return __builtin_fma(__x, __y, __z);
}

inline _LIBCPP_HIDE_FROM_ABI long double fma(long double __x, long double __y, long double __z) _NOEXCEPT {
  return __builtin_fmal(__x, __y, __z);
}

template <class _A1,
          class _A2,
          class _A3,
          __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value && is_arithmetic<_A3>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2, _A3>::type fma(_A1 __x, _A2 __y, _A3 __z) _NOEXCEPT {
  using __result_type = typename __promote<_A1, _A2, _A3>::type;
  static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value &&
                   _IsSame<_A3, __result_type>::value)),
                "");
  return __builtin_fma((__result_type)__x, (__result_type)__y, (__result_type)__z);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_FMA_H
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/fma.h" 3
#endif /* fma.h expanded by -frewrite-includes */
# 364 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* gamma.h expanded by -frewrite-includes */
#include <__math/gamma.h>
#else /* gamma.h expanded by -frewrite-includes */
# 364 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/gamma.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_GAMMA_H
#define _LIBCPP___MATH_GAMMA_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/gamma.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/gamma.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/gamma.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/gamma.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/gamma.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/gamma.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/gamma.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/gamma.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/gamma.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// lgamma

inline _LIBCPP_HIDE_FROM_ABI float lgamma(float __x) _NOEXCEPT { return __builtin_lgammaf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double lgamma(double __x) _NOEXCEPT {
  return __builtin_lgamma(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double lgamma(long double __x) _NOEXCEPT { return __builtin_lgammal(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double lgamma(_A1 __x) _NOEXCEPT {
  return __builtin_lgamma((double)__x);
}

// nan

// tgamma

inline _LIBCPP_HIDE_FROM_ABI float tgamma(float __x) _NOEXCEPT { return __builtin_tgammaf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double tgamma(double __x) _NOEXCEPT {
  return __builtin_tgamma(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double tgamma(long double __x) _NOEXCEPT { return __builtin_tgammal(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double tgamma(_A1 __x) _NOEXCEPT {
  return __builtin_tgamma((double)__x);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_GAMMA_H
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/gamma.h" 3
#endif /* gamma.h expanded by -frewrite-includes */
# 365 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* hyperbolic_functions.h expanded by -frewrite-includes */
#include <__math/hyperbolic_functions.h>
#else /* hyperbolic_functions.h expanded by -frewrite-includes */
# 365 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hyperbolic_functions.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_HYPERBOLIC_FUNCTIONS_H
#define _LIBCPP___MATH_HYPERBOLIC_FUNCTIONS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hyperbolic_functions.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hyperbolic_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hyperbolic_functions.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hyperbolic_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hyperbolic_functions.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hyperbolic_functions.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hyperbolic_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hyperbolic_functions.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hyperbolic_functions.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// cosh

inline _LIBCPP_HIDE_FROM_ABI float cosh(float __x) _NOEXCEPT { return __builtin_coshf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double cosh(double __x) _NOEXCEPT {
  return __builtin_cosh(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double cosh(long double __x) _NOEXCEPT { return __builtin_coshl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double cosh(_A1 __x) _NOEXCEPT {
  return __builtin_cosh((double)__x);
}

// sinh

inline _LIBCPP_HIDE_FROM_ABI float sinh(float __x) _NOEXCEPT { return __builtin_sinhf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double sinh(double __x) _NOEXCEPT {
  return __builtin_sinh(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double sinh(long double __x) _NOEXCEPT { return __builtin_sinhl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double sinh(_A1 __x) _NOEXCEPT {
  return __builtin_sinh((double)__x);
}

// tanh

inline _LIBCPP_HIDE_FROM_ABI float tanh(float __x) _NOEXCEPT { return __builtin_tanhf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double tanh(double __x) _NOEXCEPT {
  return __builtin_tanh(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double tanh(long double __x) _NOEXCEPT { return __builtin_tanhl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double tanh(_A1 __x) _NOEXCEPT {
  return __builtin_tanh((double)__x);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_HYPERBOLIC_FUNCTIONS_H
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hyperbolic_functions.h" 3
#endif /* hyperbolic_functions.h expanded by -frewrite-includes */
# 366 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* hypot.h expanded by -frewrite-includes */
#include <__math/hypot.h>
#else /* hypot.h expanded by -frewrite-includes */
# 366 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hypot.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_HYPOT_H
#define _LIBCPP___MATH_HYPOT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hypot.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hypot.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hypot.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hypot.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hypot.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hypot.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hypot.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hypot.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/promote.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hypot.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hypot.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hypot.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hypot.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hypot.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

inline _LIBCPP_HIDE_FROM_ABI float hypot(float __x, float __y) _NOEXCEPT { return __builtin_hypotf(__x, __y); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double hypot(double __x, double __y) _NOEXCEPT {
  return __builtin_hypot(__x, __y);
}

inline _LIBCPP_HIDE_FROM_ABI long double hypot(long double __x, long double __y) _NOEXCEPT {
  return __builtin_hypotl(__x, __y);
}

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type hypot(_A1 __x, _A2 __y) _NOEXCEPT {
  using __result_type = typename __promote<_A1, _A2>::type;
  static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
  return __math::hypot((__result_type)__x, (__result_type)__y);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_HYPOT_H
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/hypot.h" 3
#endif /* hypot.h expanded by -frewrite-includes */
# 367 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* inverse_hyperbolic_functions.h expanded by -frewrite-includes */
#include <__math/inverse_hyperbolic_functions.h>
#else /* inverse_hyperbolic_functions.h expanded by -frewrite-includes */
# 367 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_hyperbolic_functions.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_INVERSE_HYPERBOLIC_FUNCTIONS_H
#define _LIBCPP___MATH_INVERSE_HYPERBOLIC_FUNCTIONS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_hyperbolic_functions.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_hyperbolic_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_hyperbolic_functions.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_hyperbolic_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_hyperbolic_functions.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_hyperbolic_functions.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_hyperbolic_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_hyperbolic_functions.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_hyperbolic_functions.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// acosh

inline _LIBCPP_HIDE_FROM_ABI float acosh(float __x) _NOEXCEPT { return __builtin_acoshf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double acosh(double __x) _NOEXCEPT {
  return __builtin_acosh(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double acosh(long double __x) _NOEXCEPT { return __builtin_acoshl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double acosh(_A1 __x) _NOEXCEPT {
  return __builtin_acosh((double)__x);
}

// asinh

inline _LIBCPP_HIDE_FROM_ABI float asinh(float __x) _NOEXCEPT { return __builtin_asinhf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double asinh(double __x) _NOEXCEPT {
  return __builtin_asinh(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double asinh(long double __x) _NOEXCEPT { return __builtin_asinhl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double asinh(_A1 __x) _NOEXCEPT {
  return __builtin_asinh((double)__x);
}

// atanh

inline _LIBCPP_HIDE_FROM_ABI float atanh(float __x) _NOEXCEPT { return __builtin_atanhf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double atanh(double __x) _NOEXCEPT {
  return __builtin_atanh(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double atanh(long double __x) _NOEXCEPT { return __builtin_atanhl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double atanh(_A1 __x) _NOEXCEPT {
  return __builtin_atanh((double)__x);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_INVERSE_HYPERBOLIC_FUNCTIONS_H
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_hyperbolic_functions.h" 3
#endif /* inverse_hyperbolic_functions.h expanded by -frewrite-includes */
# 368 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* inverse_trigonometric_functions.h expanded by -frewrite-includes */
#include <__math/inverse_trigonometric_functions.h>
#else /* inverse_trigonometric_functions.h expanded by -frewrite-includes */
# 368 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_INVERSE_TRIGONOMETRIC_FUNCTIONS_H
#define _LIBCPP___MATH_INVERSE_TRIGONOMETRIC_FUNCTIONS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/promote.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// acos

inline _LIBCPP_HIDE_FROM_ABI float acos(float __x) _NOEXCEPT { return __builtin_acosf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double acos(double __x) _NOEXCEPT {
  return __builtin_acos(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double acos(long double __x) _NOEXCEPT { return __builtin_acosl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double acos(_A1 __x) _NOEXCEPT {
  return __builtin_acos((double)__x);
}

// asin

inline _LIBCPP_HIDE_FROM_ABI float asin(float __x) _NOEXCEPT { return __builtin_asinf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double asin(double __x) _NOEXCEPT {
  return __builtin_asin(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double asin(long double __x) _NOEXCEPT { return __builtin_asinl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double asin(_A1 __x) _NOEXCEPT {
  return __builtin_asin((double)__x);
}

// atan

inline _LIBCPP_HIDE_FROM_ABI float atan(float __x) _NOEXCEPT { return __builtin_atanf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double atan(double __x) _NOEXCEPT {
  return __builtin_atan(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double atan(long double __x) _NOEXCEPT { return __builtin_atanl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double atan(_A1 __x) _NOEXCEPT {
  return __builtin_atan((double)__x);
}

// atan2

inline _LIBCPP_HIDE_FROM_ABI float atan2(float __y, float __x) _NOEXCEPT { return __builtin_atan2f(__y, __x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double atan2(double __x, double __y) _NOEXCEPT {
  return __builtin_atan2(__x, __y);
}

inline _LIBCPP_HIDE_FROM_ABI long double atan2(long double __y, long double __x) _NOEXCEPT {
  return __builtin_atan2l(__y, __x);
}

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type atan2(_A1 __y, _A2 __x) _NOEXCEPT {
  using __result_type = typename __promote<_A1, _A2>::type;
  static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
  return __math::atan2((__result_type)__y, (__result_type)__x);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_INVERSE_TRIGONOMETRIC_FUNCTIONS_H
# 100 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/inverse_trigonometric_functions.h" 3
#endif /* inverse_trigonometric_functions.h expanded by -frewrite-includes */
# 369 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* logarithms.h expanded by -frewrite-includes */
#include <__math/logarithms.h>
#else /* logarithms.h expanded by -frewrite-includes */
# 369 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/logarithms.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_LOGARITHMS_H
#define _LIBCPP___MATH_LOGARITHMS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/logarithms.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/logarithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/logarithms.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/logarithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/logarithms.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/logarithms.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/logarithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/logarithms.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/logarithms.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// log

inline _LIBCPP_HIDE_FROM_ABI float log(float __x) _NOEXCEPT { return __builtin_logf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double log(double __x) _NOEXCEPT {
  return __builtin_log(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double log(long double __x) _NOEXCEPT { return __builtin_logl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double log(_A1 __x) _NOEXCEPT {
  return __builtin_log((double)__x);
}

// log10

inline _LIBCPP_HIDE_FROM_ABI float log10(float __x) _NOEXCEPT { return __builtin_log10f(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double log10(double __x) _NOEXCEPT {
  return __builtin_log10(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double log10(long double __x) _NOEXCEPT { return __builtin_log10l(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double log10(_A1 __x) _NOEXCEPT {
  return __builtin_log10((double)__x);
}

// ilogb

inline _LIBCPP_HIDE_FROM_ABI int ilogb(float __x) _NOEXCEPT { return __builtin_ilogbf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double ilogb(double __x) _NOEXCEPT {
  return __builtin_ilogb(__x);
}

inline _LIBCPP_HIDE_FROM_ABI int ilogb(long double __x) _NOEXCEPT { return __builtin_ilogbl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI int ilogb(_A1 __x) _NOEXCEPT {
  return __builtin_ilogb((double)__x);
}

// log1p

inline _LIBCPP_HIDE_FROM_ABI float log1p(float __x) _NOEXCEPT { return __builtin_log1pf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double log1p(double __x) _NOEXCEPT {
  return __builtin_log1p(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double log1p(long double __x) _NOEXCEPT { return __builtin_log1pl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double log1p(_A1 __x) _NOEXCEPT {
  return __builtin_log1p((double)__x);
}

// log2

inline _LIBCPP_HIDE_FROM_ABI float log2(float __x) _NOEXCEPT { return __builtin_log2f(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double log2(double __x) _NOEXCEPT {
  return __builtin_log2(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double log2(long double __x) _NOEXCEPT { return __builtin_log2l(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double log2(_A1 __x) _NOEXCEPT {
  return __builtin_log2((double)__x);
}

// logb

inline _LIBCPP_HIDE_FROM_ABI float logb(float __x) _NOEXCEPT { return __builtin_logbf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double logb(double __x) _NOEXCEPT {
  return __builtin_logb(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double logb(long double __x) _NOEXCEPT { return __builtin_logbl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double logb(_A1 __x) _NOEXCEPT {
  return __builtin_logb((double)__x);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_LOGARITHMS_H
# 125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/logarithms.h" 3
#endif /* logarithms.h expanded by -frewrite-includes */
# 370 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* min_max.h expanded by -frewrite-includes */
#include <__math/min_max.h>
#else /* min_max.h expanded by -frewrite-includes */
# 370 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/min_max.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_MIN_MAX_H
#define _LIBCPP___MATH_MIN_MAX_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/min_max.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/min_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/min_max.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/min_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/min_max.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/min_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/min_max.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/min_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/promote.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/min_max.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/min_max.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/min_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/min_max.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/min_max.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// fmax

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI float fmax(float __x, float __y) _NOEXCEPT {
  return __builtin_fmaxf(__x, __y);
}

template <class = int>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI double fmax(double __x, double __y) _NOEXCEPT {
  return __builtin_fmax(__x, __y);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long double fmax(long double __x, long double __y) _NOEXCEPT {
  return __builtin_fmaxl(__x, __y);
}

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type fmax(_A1 __x, _A2 __y) _NOEXCEPT {
  using __result_type = typename __promote<_A1, _A2>::type;
  static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
  return __math::fmax((__result_type)__x, (__result_type)__y);
}

// fmin

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI float fmin(float __x, float __y) _NOEXCEPT {
  return __builtin_fminf(__x, __y);
}

template <class = int>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI double fmin(double __x, double __y) _NOEXCEPT {
  return __builtin_fmin(__x, __y);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long double fmin(long double __x, long double __y) _NOEXCEPT {
  return __builtin_fminl(__x, __y);
}

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type fmin(_A1 __x, _A2 __y) _NOEXCEPT {
  using __result_type = typename __promote<_A1, _A2>::type;
  static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
  return __math::fmin((__result_type)__x, (__result_type)__y);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_MIN_MAX_H
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/min_max.h" 3
#endif /* min_max.h expanded by -frewrite-includes */
# 371 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* modulo.h expanded by -frewrite-includes */
#include <__math/modulo.h>
#else /* modulo.h expanded by -frewrite-includes */
# 371 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/modulo.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_MODULO_H
#define _LIBCPP___MATH_MODULO_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/modulo.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/modulo.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/modulo.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/modulo.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/modulo.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/modulo.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/modulo.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/modulo.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/promote.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/modulo.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/modulo.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/modulo.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/modulo.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/modulo.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// fmod

inline _LIBCPP_HIDE_FROM_ABI float fmod(float __x, float __y) _NOEXCEPT { return __builtin_fmodf(__x, __y); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double fmod(double __x, double __y) _NOEXCEPT {
  return __builtin_fmod(__x, __y);
}

inline _LIBCPP_HIDE_FROM_ABI long double fmod(long double __x, long double __y) _NOEXCEPT {
  return __builtin_fmodl(__x, __y);
}

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type fmod(_A1 __x, _A2 __y) _NOEXCEPT {
  using __result_type = typename __promote<_A1, _A2>::type;
  static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
  return __math::fmod((__result_type)__x, (__result_type)__y);
}

// modf

inline _LIBCPP_HIDE_FROM_ABI float modf(float __x, float* __y) _NOEXCEPT { return __builtin_modff(__x, __y); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double modf(double __x, double* __y) _NOEXCEPT {
  return __builtin_modf(__x, __y);
}

inline _LIBCPP_HIDE_FROM_ABI long double modf(long double __x, long double* __y) _NOEXCEPT {
  return __builtin_modfl(__x, __y);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_MODULO_H
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/modulo.h" 3
#endif /* modulo.h expanded by -frewrite-includes */
# 372 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* remainder.h expanded by -frewrite-includes */
#include <__math/remainder.h>
#else /* remainder.h expanded by -frewrite-includes */
# 372 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_REMAINDER_H
#define _LIBCPP___MATH_REMAINDER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/promote.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// remainder

inline _LIBCPP_HIDE_FROM_ABI float remainder(float __x, float __y) _NOEXCEPT { return __builtin_remainderf(__x, __y); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double remainder(double __x, double __y) _NOEXCEPT {
  return __builtin_remainder(__x, __y);
}

inline _LIBCPP_HIDE_FROM_ABI long double remainder(long double __x, long double __y) _NOEXCEPT {
  return __builtin_remainderl(__x, __y);
}

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type remainder(_A1 __x, _A2 __y) _NOEXCEPT {
  using __result_type = typename __promote<_A1, _A2>::type;
  static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
  return __math::remainder((__result_type)__x, (__result_type)__y);
}

// remquo

inline _LIBCPP_HIDE_FROM_ABI float remquo(float __x, float __y, int* __z) _NOEXCEPT {
  return __builtin_remquof(__x, __y, __z);
}

template <class = int>
_LIBCPP_HIDE_FROM_ABI double remquo(double __x, double __y, int* __z) _NOEXCEPT {
  return __builtin_remquo(__x, __y, __z);
}

inline _LIBCPP_HIDE_FROM_ABI long double remquo(long double __x, long double __y, int* __z) _NOEXCEPT {
  return __builtin_remquol(__x, __y, __z);
}

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type remquo(_A1 __x, _A2 __y, int* __z) _NOEXCEPT {
  using __result_type = typename __promote<_A1, _A2>::type;
  static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
  return __math::remquo((__result_type)__x, (__result_type)__y, __z);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_REMAINDER_H
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/remainder.h" 3
#endif /* remainder.h expanded by -frewrite-includes */
# 373 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* roots.h expanded by -frewrite-includes */
#include <__math/roots.h>
#else /* roots.h expanded by -frewrite-includes */
# 373 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/roots.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_ROOTS_H
#define _LIBCPP___MATH_ROOTS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/roots.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/roots.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/roots.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/roots.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/roots.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/roots.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/roots.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/roots.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/roots.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// sqrt

inline _LIBCPP_HIDE_FROM_ABI float sqrt(float __x) _NOEXCEPT { return __builtin_sqrtf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double sqrt(double __x) _NOEXCEPT {
  return __builtin_sqrt(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double sqrt(long double __x) _NOEXCEPT { return __builtin_sqrtl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double sqrt(_A1 __x) _NOEXCEPT {
  return __builtin_sqrt((double)__x);
}

// cbrt

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI float cbrt(float __x) _NOEXCEPT { return __builtin_cbrtf(__x); }

template <class = int>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI double cbrt(double __x) _NOEXCEPT {
  return __builtin_cbrt(__x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long double cbrt(long double __x) _NOEXCEPT {
  return __builtin_cbrtl(__x);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double cbrt(_A1 __x) _NOEXCEPT {
  return __builtin_cbrt((double)__x);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_ROOTS_H
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/roots.h" 3
#endif /* roots.h expanded by -frewrite-includes */
# 374 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* rounding_functions.h expanded by -frewrite-includes */
#include <__math/rounding_functions.h>
#else /* rounding_functions.h expanded by -frewrite-includes */
# 374 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_ROUNDING_FUNCTIONS_H
#define _LIBCPP___MATH_ROUNDING_FUNCTIONS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/promote.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// ceil

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI float ceil(float __x) _NOEXCEPT { return __builtin_ceilf(__x); }

template <class = int>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI double ceil(double __x) _NOEXCEPT {
  return __builtin_ceil(__x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long double ceil(long double __x) _NOEXCEPT {
  return __builtin_ceill(__x);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double ceil(_A1 __x) _NOEXCEPT {
  return __builtin_ceil((double)__x);
}

// floor

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI float floor(float __x) _NOEXCEPT { return __builtin_floorf(__x); }

template <class = int>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI double floor(double __x) _NOEXCEPT {
  return __builtin_floor(__x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long double floor(long double __x) _NOEXCEPT {
  return __builtin_floorl(__x);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double floor(_A1 __x) _NOEXCEPT {
  return __builtin_floor((double)__x);
}

// llrint

inline _LIBCPP_HIDE_FROM_ABI long long llrint(float __x) _NOEXCEPT { return __builtin_llrintf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI long long llrint(double __x) _NOEXCEPT {
  return __builtin_llrint(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long long llrint(long double __x) _NOEXCEPT { return __builtin_llrintl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI long long llrint(_A1 __x) _NOEXCEPT {
  return __builtin_llrint((double)__x);
}

// llround

inline _LIBCPP_HIDE_FROM_ABI long long llround(float __x) _NOEXCEPT { return __builtin_llroundf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI long long llround(double __x) _NOEXCEPT {
  return __builtin_llround(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long long llround(long double __x) _NOEXCEPT { return __builtin_llroundl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI long long llround(_A1 __x) _NOEXCEPT {
  return __builtin_llround((double)__x);
}

// lrint

inline _LIBCPP_HIDE_FROM_ABI long lrint(float __x) _NOEXCEPT { return __builtin_lrintf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI long lrint(double __x) _NOEXCEPT {
  return __builtin_lrint(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long lrint(long double __x) _NOEXCEPT { return __builtin_lrintl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI long lrint(_A1 __x) _NOEXCEPT {
  return __builtin_lrint((double)__x);
}

// lround

inline _LIBCPP_HIDE_FROM_ABI long lround(float __x) _NOEXCEPT { return __builtin_lroundf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI long lround(double __x) _NOEXCEPT {
  return __builtin_lround(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long lround(long double __x) _NOEXCEPT { return __builtin_lroundl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI long lround(_A1 __x) _NOEXCEPT {
  return __builtin_lround((double)__x);
}

// nearbyint

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI float nearbyint(float __x) _NOEXCEPT {
  return __builtin_nearbyintf(__x);
}

template <class = int>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI double nearbyint(double __x) _NOEXCEPT {
  return __builtin_nearbyint(__x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long double nearbyint(long double __x) _NOEXCEPT {
  return __builtin_nearbyintl(__x);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double nearbyint(_A1 __x) _NOEXCEPT {
  return __builtin_nearbyint((double)__x);
}

// nextafter

inline _LIBCPP_HIDE_FROM_ABI float nextafter(float __x, float __y) _NOEXCEPT { return __builtin_nextafterf(__x, __y); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double nextafter(double __x, double __y) _NOEXCEPT {
  return __builtin_nextafter(__x, __y);
}

inline _LIBCPP_HIDE_FROM_ABI long double nextafter(long double __x, long double __y) _NOEXCEPT {
  return __builtin_nextafterl(__x, __y);
}

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type nextafter(_A1 __x, _A2 __y) _NOEXCEPT {
  using __result_type = typename __promote<_A1, _A2>::type;
  static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
  return __math::nextafter((__result_type)__x, (__result_type)__y);
}

// nexttoward

inline _LIBCPP_HIDE_FROM_ABI float nexttoward(float __x, long double __y) _NOEXCEPT {
  return __builtin_nexttowardf(__x, __y);
}

template <class = int>
_LIBCPP_HIDE_FROM_ABI double nexttoward(double __x, long double __y) _NOEXCEPT {
  return __builtin_nexttoward(__x, __y);
}

inline _LIBCPP_HIDE_FROM_ABI long double nexttoward(long double __x, long double __y) _NOEXCEPT {
  return __builtin_nexttowardl(__x, __y);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double nexttoward(_A1 __x, long double __y) _NOEXCEPT {
  return __builtin_nexttoward((double)__x, __y);
}

// rint

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI float rint(float __x) _NOEXCEPT { return __builtin_rintf(__x); }

template <class = int>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI double rint(double __x) _NOEXCEPT {
  return __builtin_rint(__x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long double rint(long double __x) _NOEXCEPT {
  return __builtin_rintl(__x);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double rint(_A1 __x) _NOEXCEPT {
  return __builtin_rint((double)__x);
}

// round

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI float round(float __x) _NOEXCEPT { return __builtin_round(__x); }

template <class = int>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI double round(double __x) _NOEXCEPT {
  return __builtin_round(__x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long double round(long double __x) _NOEXCEPT {
  return __builtin_roundl(__x);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double round(_A1 __x) _NOEXCEPT {
  return __builtin_round((double)__x);
}

// trunc

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI float trunc(float __x) _NOEXCEPT { return __builtin_trunc(__x); }

template <class = int>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI double trunc(double __x) _NOEXCEPT {
  return __builtin_trunc(__x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long double trunc(long double __x) _NOEXCEPT {
  return __builtin_truncl(__x);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI double trunc(_A1 __x) _NOEXCEPT {
  return __builtin_trunc((double)__x);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_ROUNDING_FUNCTIONS_H
# 246 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/rounding_functions.h" 3
#endif /* rounding_functions.h expanded by -frewrite-includes */
# 375 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* traits.h expanded by -frewrite-includes */
#include <__math/traits.h>
#else /* traits.h expanded by -frewrite-includes */
# 375 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_TRAITS_H
#define _LIBCPP___MATH_TRAITS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_floating_point.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_signed.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/promote.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// signbit

template <class _A1, __enable_if_t<is_floating_point<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool signbit(_A1 __x) _NOEXCEPT {
  return __builtin_signbit(__x);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value && is_signed<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool signbit(_A1 __x) _NOEXCEPT {
  return __x < 0;
}

template <class _A1, __enable_if_t<is_integral<_A1>::value && !is_signed<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool signbit(_A1) _NOEXCEPT {
  return false;
}

// isfinite

template <class _A1, __enable_if_t<is_arithmetic<_A1>::value && numeric_limits<_A1>::has_infinity, int> = 0>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isfinite(_A1 __x) _NOEXCEPT {
  return __builtin_isfinite((typename __promote<_A1>::type)__x);
}

template <class _A1, __enable_if_t<is_arithmetic<_A1>::value && !numeric_limits<_A1>::has_infinity, int> = 0>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isfinite(_A1) _NOEXCEPT {
  return true;
}

// isinf

template <class _A1, __enable_if_t<is_arithmetic<_A1>::value && numeric_limits<_A1>::has_infinity, int> = 0>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isinf(_A1 __x) _NOEXCEPT {
  return __builtin_isinf((typename __promote<_A1>::type)__x);
}

template <class _A1, __enable_if_t<is_arithmetic<_A1>::value && !numeric_limits<_A1>::has_infinity, int> = 0>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isinf(_A1) _NOEXCEPT {
  return false;
}

#ifdef _LIBCPP_PREFERRED_OVERLOAD
_LIBCPP_NODISCARD_EXT inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isinf(float __x) _NOEXCEPT {
  return __builtin_isinf(__x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD bool
isinf(double __x) _NOEXCEPT {
  return __builtin_isinf(__x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isinf(long double __x) _NOEXCEPT {
  return __builtin_isinf(__x);
}
#endif
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3

// isnan

template <class _A1, __enable_if_t<is_floating_point<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnan(_A1 __x) _NOEXCEPT {
  return __builtin_isnan(__x);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnan(_A1) _NOEXCEPT {
  return false;
}

#ifdef _LIBCPP_PREFERRED_OVERLOAD
_LIBCPP_NODISCARD_EXT inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnan(float __x) _NOEXCEPT {
  return __builtin_isnan(__x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD bool
isnan(double __x) _NOEXCEPT {
  return __builtin_isnan(__x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnan(long double __x) _NOEXCEPT {
  return __builtin_isnan(__x);
}
#endif
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3

// isnormal

template <class _A1, __enable_if_t<is_floating_point<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnormal(_A1 __x) _NOEXCEPT {
  return __builtin_isnormal(__x);
}

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnormal(_A1 __x) _NOEXCEPT {
  return __x != 0;
}

// isgreater

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool isgreater(_A1 __x, _A2 __y) _NOEXCEPT {
  using type = typename __promote<_A1, _A2>::type;
  return __builtin_isgreater((type)__x, (type)__y);
}

// isgreaterequal

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool isgreaterequal(_A1 __x, _A2 __y) _NOEXCEPT {
  using type = typename __promote<_A1, _A2>::type;
  return __builtin_isgreaterequal((type)__x, (type)__y);
}

// isless

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool isless(_A1 __x, _A2 __y) _NOEXCEPT {
  using type = typename __promote<_A1, _A2>::type;
  return __builtin_isless((type)__x, (type)__y);
}

// islessequal

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool islessequal(_A1 __x, _A2 __y) _NOEXCEPT {
  using type = typename __promote<_A1, _A2>::type;
  return __builtin_islessequal((type)__x, (type)__y);
}

// islessgreater

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool islessgreater(_A1 __x, _A2 __y) _NOEXCEPT {
  using type = typename __promote<_A1, _A2>::type;
  return __builtin_islessgreater((type)__x, (type)__y);
}

// isunordered

template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI bool isunordered(_A1 __x, _A2 __y) _NOEXCEPT {
  using type = typename __promote<_A1, _A2>::type;
  return __builtin_isunordered((type)__x, (type)__y);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_TRAITS_H
# 177 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/traits.h" 3
#endif /* traits.h expanded by -frewrite-includes */
# 376 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* trigonometric_functions.h expanded by -frewrite-includes */
#include <__math/trigonometric_functions.h>
#else /* trigonometric_functions.h expanded by -frewrite-includes */
# 376 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/trigonometric_functions.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MATH_TRIGONOMETRIC_FUNCTIONS_H
#define _LIBCPP___MATH_TRIGONOMETRIC_FUNCTIONS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/trigonometric_functions.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/trigonometric_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/trigonometric_functions.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/trigonometric_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/trigonometric_functions.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/trigonometric_functions.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/trigonometric_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/trigonometric_functions.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/trigonometric_functions.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// cos

inline _LIBCPP_HIDE_FROM_ABI float cos(float __x) _NOEXCEPT { return __builtin_cosf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double cos(double __x) _NOEXCEPT {
  return __builtin_cos(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double cos(long double __x) _NOEXCEPT { return __builtin_cosl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double cos(_A1 __x) _NOEXCEPT {
  return __builtin_cos((double)__x);
}

// sin

inline _LIBCPP_HIDE_FROM_ABI float sin(float __x) _NOEXCEPT { return __builtin_sinf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double sin(double __x) _NOEXCEPT {
  return __builtin_sin(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double sin(long double __x) _NOEXCEPT { return __builtin_sinl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double sin(_A1 __x) _NOEXCEPT {
  return __builtin_sin((double)__x);
}

// tan

inline _LIBCPP_HIDE_FROM_ABI float tan(float __x) _NOEXCEPT { return __builtin_tanf(__x); }

template <class = int>
_LIBCPP_HIDE_FROM_ABI double tan(double __x) _NOEXCEPT {
  return __builtin_tan(__x);
}

inline _LIBCPP_HIDE_FROM_ABI long double tan(long double __x) _NOEXCEPT { return __builtin_tanl(__x); }

template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI double tan(_A1 __x) _NOEXCEPT {
  return __builtin_tan((double)__x);
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MATH_TRIGONOMETRIC_FUNCTIONS_H
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__math/trigonometric_functions.h" 3
#endif /* trigonometric_functions.h expanded by -frewrite-includes */
# 377 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 377 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 378 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_floating_point.h>
#endif /* expanded by -frewrite-includes */
# 378 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 379 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 379 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 380 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdlib.h expanded by -frewrite-includes */
#include <stdlib.h>
#else /* stdlib.h expanded by -frewrite-includes */
# 380 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_malloc_and_calloc)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 11 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* expanded by -frewrite-includes */
#include_next <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_STDLIB_H)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#define _LIBCPP_STDLIB_H

/*
    stdlib.h synopsis

Macros:

    EXIT_FAILURE
    EXIT_SUCCESS
    MB_CUR_MAX
    NULL
    RAND_MAX

Types:

    size_t
    div_t
    ldiv_t
    lldiv_t                                                               // C99

double    atof (const char* nptr);
int       atoi (const char* nptr);
long      atol (const char* nptr);
long long atoll(const char* nptr);                                        // C99
double             strtod  (const char* restrict nptr, char** restrict endptr);
float              strtof  (const char* restrict nptr, char** restrict endptr); // C99
long double        strtold (const char* restrict nptr, char** restrict endptr); // C99
long               strtol  (const char* restrict nptr, char** restrict endptr, int base);
long long          strtoll (const char* restrict nptr, char** restrict endptr, int base); // C99
unsigned long      strtoul (const char* restrict nptr, char** restrict endptr, int base);
unsigned long long strtoull(const char* restrict nptr, char** restrict endptr, int base); // C99
int rand(void);
void srand(unsigned int seed);
void* calloc(size_t nmemb, size_t size);
void free(void* ptr);
void* malloc(size_t size);
void* realloc(void* ptr, size_t size);
void abort(void);
int atexit(void (*func)(void));
void exit(int status);
void _Exit(int status);
char* getenv(const char* name);
int system(const char* string);
void* bsearch(const void* key, const void* base, size_t nmemb, size_t size,
              int (*compar)(const void *, const void *));
void qsort(void* base, size_t nmemb, size_t size,
           int (*compar)(const void *, const void *));
int         abs(      int j);
long        abs(     long j);
long long   abs(long long j);                                             // C++0X
long       labs(     long j);
long long llabs(long long j);                                             // C99
div_t     div(      int numer,       int denom);
ldiv_t    div(     long numer,      long denom);
lldiv_t   div(long long numer, long long denom);                          // C++0X
ldiv_t   ldiv(     long numer,      long denom);
lldiv_t lldiv(long long numer, long long denom);                          // C99
int mblen(const char* s, size_t n);
int mbtowc(wchar_t* restrict pwc, const char* restrict s, size_t n);
int wctomb(char* s, wchar_t wchar);
size_t mbstowcs(wchar_t* restrict pwcs, const char* restrict s, size_t n);
size_t wcstombs(char* restrict s, const wchar_t* restrict pwcs, size_t n);
int at_quick_exit(void (*func)(void))                                     // C++11
void quick_exit(int status);                                              // C++11
void *aligned_alloc(size_t alignment, size_t size);                       // C11

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<stdlib.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#if 0 /* expanded by -frewrite-includes */
#    include_next <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#  endif
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#ifdef __cplusplus
extern "C++" {
// abs

#ifdef abs
# undef abs
#endif
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef labs
# undef labs
#endif
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef llabs
# undef llabs
#endif
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

// MSVCRT already has the correct prototype in <stdlib.h> if __cplusplus is defined
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_MSVCRT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long abs(long __x) _NOEXCEPT {
  return __builtin_labs(__x);
}
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {
  return __builtin_llabs(__x);
}
#endif // !defined(_LIBCPP_MSVCRT)
# 120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY float abs(float __lcpp_x) _NOEXCEPT {
  return __builtin_fabsf(__lcpp_x); // Use builtins to prevent needing math.h
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY double abs(double __lcpp_x) _NOEXCEPT {
  return __builtin_fabs(__lcpp_x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long double
abs(long double __lcpp_x) _NOEXCEPT {
  return __builtin_fabsl(__lcpp_x);
}

// div

#ifdef div
# undef div
#endif
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef ldiv
# undef ldiv
#endif
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef lldiv
# undef lldiv
#endif
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

// MSVCRT already has the correct prototype in <stdlib.h> if __cplusplus is defined
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_MSVCRT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
  return ::ldiv(__x, __y);
}
#if 0 /* disabled by -frewrite-includes */
#if !(defined(__FreeBSD__) && !defined(__LONG_LONG_SUPPORTED))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,
                                             long long __y) _NOEXCEPT {
  return ::lldiv(__x, __y);
}
#endif
# 157 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif // _LIBCPP_MSVCRT
# 158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
} // extern "C++"
#endif // __cplusplus
# 160 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#endif // _LIBCPP_STDLIB_H
# 162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif /* stdlib.h expanded by -frewrite-includes */
# 381 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 2 3


// fpclassify relies on implementation-defined constants, so we can't move it to a detail header
_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// fpclassify

// template on non-double overloads to make them weaker than same overloads from MSVC runtime
template <class = int>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI int fpclassify(float __x) _NOEXCEPT {
  return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
}

template <class = int>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI int fpclassify(double __x) _NOEXCEPT {
  return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
}

template <class = int>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI int fpclassify(long double __x) _NOEXCEPT {
  return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
}

template <class _A1, std::__enable_if_t<std::is_integral<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI int fpclassify(_A1 __x) _NOEXCEPT {
  return __x == 0 ? FP_ZERO : FP_NORMAL;
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

using std::__math::fpclassify;
using std::__math::signbit;

// The MSVC runtime already provides these functions as templates
#ifndef _LIBCPP_MSVCRT
using std::__math::isfinite;
using std::__math::isgreater;
using std::__math::isgreaterequal;
using std::__math::isinf;
using std::__math::isless;
using std::__math::islessequal;
using std::__math::islessgreater;
using std::__math::isnan;
using std::__math::isnormal;
using std::__math::isunordered;
#endif // _LIBCPP_MSVCRT
# 431 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

// abs
//
// handled in stdlib.h

// div
//
// handled in stdlib.h

// We have to provide double overloads for <math.h> to work on platforms that don't provide the full set of math
// functions. To make the overload set work with multiple functions that take the same arguments, we make our overloads
// templates. Functions are preferred over function templates during overload resolution, which means that our overload
// will only be selected when the C library doesn't provide one.

using std::__math::acosh;
using std::__math::acos;
using std::__math::asinh;
using std::__math::asin;
using std::__math::atanh;
using std::__math::atan;
using std::__math::atan2;
using std::__math::cbrt;
using std::__math::ceil;
using std::__math::copysign;
using std::__math::cos;
using std::__math::cosh;
using std::__math::erf;
using std::__math::erfc;
using std::__math::exp;
using std::__math::exp2;
using std::__math::expm1;
using std::__math::fabs;
using std::__math::fdim;
using std::__math::floor;
using std::__math::fma;
using std::__math::fmax;
using std::__math::fmin;
using std::__math::fmod;
using std::__math::frexp;
using std::__math::hypot;
using std::__math::ilogb;
using std::__math::ldexp;
using std::__math::lgamma;
using std::__math::llrint;
using std::__math::llround;
using std::__math::lrint;
using std::__math::lround;
using std::__math::log;
using std::__math::log10;
using std::__math::log1p;
using std::__math::log2;
using std::__math::logb;
using std::__math::modf;
using std::__math::nearbyint;
using std::__math::nextafter;
using std::__math::nexttoward;
using std::__math::pow;
using std::__math::remainder;
using std::__math::remquo;
using std::__math::rint;
using std::__math::round;
using std::__math::scalbln;
using std::__math::scalbn;
using std::__math::signbit;
using std::__math::sin;
using std::__math::sinh;
using std::__math::sqrt;
using std::__math::tan;
using std::__math::tanh;
using std::__math::tgamma;
using std::__math::trunc;

} // extern "C++"

#endif // __cplusplus
# 506 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#else // _LIBCPP_MATH_H
# 508 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

// This include lives outside the header guard in order to support an MSVC
// extension which allows users to do:
//
// #define _USE_MATH_DEFINES
// #include <math.h>
//
// and receive the definitions of mathematical constants, even if <math.h>
// has previously been included.
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_MSVCRT) && defined(_USE_MATH_DEFINES)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 518 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include_next <math.h>
#endif /* expanded by -frewrite-includes */
# 518 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 519 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#endif
# 520 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#endif // _LIBCPP_MATH_H
# 522 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#endif /* math.h expanded by -frewrite-includes */
# 320 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 2 3

#ifndef _LIBCPP_MATH_H
#   error <cmath> tried including <math.h> but didn't find libc++'s <math.h> header. \
          This usually means that your header search paths are not configured properly. \
          The header search paths should contain the C++ Standard Library headers before \
          any C Standard Library, and you are probably using compiler flags that make that \
          not be the case.
#endif
# 328 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 330 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 331 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
#endif
# 332 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 334 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 335 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

using ::signbit _LIBCPP_USING_IF_EXISTS;
using ::fpclassify _LIBCPP_USING_IF_EXISTS;
using ::isfinite _LIBCPP_USING_IF_EXISTS;
using ::isinf _LIBCPP_USING_IF_EXISTS;
using ::isnan _LIBCPP_USING_IF_EXISTS;
using ::isnormal _LIBCPP_USING_IF_EXISTS;
using ::isgreater _LIBCPP_USING_IF_EXISTS;
using ::isgreaterequal _LIBCPP_USING_IF_EXISTS;
using ::isless _LIBCPP_USING_IF_EXISTS;
using ::islessequal _LIBCPP_USING_IF_EXISTS;
using ::islessgreater _LIBCPP_USING_IF_EXISTS;
using ::isunordered _LIBCPP_USING_IF_EXISTS;
using ::isunordered _LIBCPP_USING_IF_EXISTS;

using ::float_t _LIBCPP_USING_IF_EXISTS;
using ::double_t _LIBCPP_USING_IF_EXISTS;

using ::abs _LIBCPP_USING_IF_EXISTS;

using ::acos _LIBCPP_USING_IF_EXISTS;
using ::acosf _LIBCPP_USING_IF_EXISTS;
using ::asin _LIBCPP_USING_IF_EXISTS;
using ::asinf _LIBCPP_USING_IF_EXISTS;
using ::atan _LIBCPP_USING_IF_EXISTS;
using ::atanf _LIBCPP_USING_IF_EXISTS;
using ::atan2 _LIBCPP_USING_IF_EXISTS;
using ::atan2f _LIBCPP_USING_IF_EXISTS;
using ::ceil _LIBCPP_USING_IF_EXISTS;
using ::ceilf _LIBCPP_USING_IF_EXISTS;
using ::cos _LIBCPP_USING_IF_EXISTS;
using ::cosf _LIBCPP_USING_IF_EXISTS;
using ::cosh _LIBCPP_USING_IF_EXISTS;
using ::coshf _LIBCPP_USING_IF_EXISTS;

using ::exp _LIBCPP_USING_IF_EXISTS;
using ::expf _LIBCPP_USING_IF_EXISTS;

using ::fabs _LIBCPP_USING_IF_EXISTS;
using ::fabsf _LIBCPP_USING_IF_EXISTS;
using ::floor _LIBCPP_USING_IF_EXISTS;
using ::floorf _LIBCPP_USING_IF_EXISTS;

using ::fmod _LIBCPP_USING_IF_EXISTS;
using ::fmodf _LIBCPP_USING_IF_EXISTS;

using ::frexp _LIBCPP_USING_IF_EXISTS;
using ::frexpf _LIBCPP_USING_IF_EXISTS;
using ::ldexp _LIBCPP_USING_IF_EXISTS;
using ::ldexpf _LIBCPP_USING_IF_EXISTS;

using ::log _LIBCPP_USING_IF_EXISTS;
using ::logf _LIBCPP_USING_IF_EXISTS;

using ::log10 _LIBCPP_USING_IF_EXISTS;
using ::log10f _LIBCPP_USING_IF_EXISTS;
using ::modf _LIBCPP_USING_IF_EXISTS;
using ::modff _LIBCPP_USING_IF_EXISTS;

using ::pow _LIBCPP_USING_IF_EXISTS;
using ::powf _LIBCPP_USING_IF_EXISTS;

using ::sin _LIBCPP_USING_IF_EXISTS;
using ::sinf _LIBCPP_USING_IF_EXISTS;
using ::sinh _LIBCPP_USING_IF_EXISTS;
using ::sinhf _LIBCPP_USING_IF_EXISTS;

using ::sqrt _LIBCPP_USING_IF_EXISTS;
using ::sqrtf _LIBCPP_USING_IF_EXISTS;
using ::tan _LIBCPP_USING_IF_EXISTS;
using ::tanf _LIBCPP_USING_IF_EXISTS;

using ::tanh _LIBCPP_USING_IF_EXISTS;
using ::tanhf _LIBCPP_USING_IF_EXISTS;

using ::acosh _LIBCPP_USING_IF_EXISTS;
using ::acoshf _LIBCPP_USING_IF_EXISTS;
using ::asinh _LIBCPP_USING_IF_EXISTS;
using ::asinhf _LIBCPP_USING_IF_EXISTS;
using ::atanh _LIBCPP_USING_IF_EXISTS;
using ::atanhf _LIBCPP_USING_IF_EXISTS;
using ::cbrt _LIBCPP_USING_IF_EXISTS;
using ::cbrtf _LIBCPP_USING_IF_EXISTS;

using ::copysign _LIBCPP_USING_IF_EXISTS;
using ::copysignf _LIBCPP_USING_IF_EXISTS;

using ::erf _LIBCPP_USING_IF_EXISTS;
using ::erff _LIBCPP_USING_IF_EXISTS;
using ::erfc _LIBCPP_USING_IF_EXISTS;
using ::erfcf _LIBCPP_USING_IF_EXISTS;
using ::exp2 _LIBCPP_USING_IF_EXISTS;
using ::exp2f _LIBCPP_USING_IF_EXISTS;
using ::expm1 _LIBCPP_USING_IF_EXISTS;
using ::expm1f _LIBCPP_USING_IF_EXISTS;
using ::fdim _LIBCPP_USING_IF_EXISTS;
using ::fdimf _LIBCPP_USING_IF_EXISTS;
using ::fmaf _LIBCPP_USING_IF_EXISTS;
using ::fma _LIBCPP_USING_IF_EXISTS;
using ::fmax _LIBCPP_USING_IF_EXISTS;
using ::fmaxf _LIBCPP_USING_IF_EXISTS;
using ::fmin _LIBCPP_USING_IF_EXISTS;
using ::fminf _LIBCPP_USING_IF_EXISTS;
using ::hypot _LIBCPP_USING_IF_EXISTS;
using ::hypotf _LIBCPP_USING_IF_EXISTS;
using ::ilogb _LIBCPP_USING_IF_EXISTS;
using ::ilogbf _LIBCPP_USING_IF_EXISTS;
using ::lgamma _LIBCPP_USING_IF_EXISTS;
using ::lgammaf _LIBCPP_USING_IF_EXISTS;
using ::llrint _LIBCPP_USING_IF_EXISTS;
using ::llrintf _LIBCPP_USING_IF_EXISTS;
using ::llround _LIBCPP_USING_IF_EXISTS;
using ::llroundf _LIBCPP_USING_IF_EXISTS;
using ::log1p _LIBCPP_USING_IF_EXISTS;
using ::log1pf _LIBCPP_USING_IF_EXISTS;
using ::log2 _LIBCPP_USING_IF_EXISTS;
using ::log2f _LIBCPP_USING_IF_EXISTS;
using ::logb _LIBCPP_USING_IF_EXISTS;
using ::logbf _LIBCPP_USING_IF_EXISTS;
using ::lrint _LIBCPP_USING_IF_EXISTS;
using ::lrintf _LIBCPP_USING_IF_EXISTS;
using ::lround _LIBCPP_USING_IF_EXISTS;
using ::lroundf _LIBCPP_USING_IF_EXISTS;

using ::nan _LIBCPP_USING_IF_EXISTS;
using ::nanf _LIBCPP_USING_IF_EXISTS;

using ::nearbyint _LIBCPP_USING_IF_EXISTS;
using ::nearbyintf _LIBCPP_USING_IF_EXISTS;
using ::nextafter _LIBCPP_USING_IF_EXISTS;
using ::nextafterf _LIBCPP_USING_IF_EXISTS;
using ::nexttoward _LIBCPP_USING_IF_EXISTS;
using ::nexttowardf _LIBCPP_USING_IF_EXISTS;
using ::remainder _LIBCPP_USING_IF_EXISTS;
using ::remainderf _LIBCPP_USING_IF_EXISTS;
using ::remquo _LIBCPP_USING_IF_EXISTS;
using ::remquof _LIBCPP_USING_IF_EXISTS;
using ::rint _LIBCPP_USING_IF_EXISTS;
using ::rintf _LIBCPP_USING_IF_EXISTS;
using ::round _LIBCPP_USING_IF_EXISTS;
using ::roundf _LIBCPP_USING_IF_EXISTS;
using ::scalbln _LIBCPP_USING_IF_EXISTS;
using ::scalblnf _LIBCPP_USING_IF_EXISTS;
using ::scalbn _LIBCPP_USING_IF_EXISTS;
using ::scalbnf _LIBCPP_USING_IF_EXISTS;
using ::tgamma _LIBCPP_USING_IF_EXISTS;
using ::tgammaf _LIBCPP_USING_IF_EXISTS;
using ::trunc _LIBCPP_USING_IF_EXISTS;
using ::truncf _LIBCPP_USING_IF_EXISTS;

using ::acosl _LIBCPP_USING_IF_EXISTS;
using ::asinl _LIBCPP_USING_IF_EXISTS;
using ::atanl _LIBCPP_USING_IF_EXISTS;
using ::atan2l _LIBCPP_USING_IF_EXISTS;
using ::ceill _LIBCPP_USING_IF_EXISTS;
using ::cosl _LIBCPP_USING_IF_EXISTS;
using ::coshl _LIBCPP_USING_IF_EXISTS;
using ::expl _LIBCPP_USING_IF_EXISTS;
using ::fabsl _LIBCPP_USING_IF_EXISTS;
using ::floorl _LIBCPP_USING_IF_EXISTS;
using ::fmodl _LIBCPP_USING_IF_EXISTS;
using ::frexpl _LIBCPP_USING_IF_EXISTS;
using ::ldexpl _LIBCPP_USING_IF_EXISTS;
using ::logl _LIBCPP_USING_IF_EXISTS;
using ::log10l _LIBCPP_USING_IF_EXISTS;
using ::modfl _LIBCPP_USING_IF_EXISTS;
using ::powl _LIBCPP_USING_IF_EXISTS;
using ::sinl _LIBCPP_USING_IF_EXISTS;
using ::sinhl _LIBCPP_USING_IF_EXISTS;
using ::sqrtl _LIBCPP_USING_IF_EXISTS;
using ::tanl _LIBCPP_USING_IF_EXISTS;

using ::tanhl _LIBCPP_USING_IF_EXISTS;
using ::acoshl _LIBCPP_USING_IF_EXISTS;
using ::asinhl _LIBCPP_USING_IF_EXISTS;
using ::atanhl _LIBCPP_USING_IF_EXISTS;
using ::cbrtl _LIBCPP_USING_IF_EXISTS;

using ::copysignl _LIBCPP_USING_IF_EXISTS;

using ::erfl _LIBCPP_USING_IF_EXISTS;
using ::erfcl _LIBCPP_USING_IF_EXISTS;
using ::exp2l _LIBCPP_USING_IF_EXISTS;
using ::expm1l _LIBCPP_USING_IF_EXISTS;
using ::fdiml _LIBCPP_USING_IF_EXISTS;
using ::fmal _LIBCPP_USING_IF_EXISTS;
using ::fmaxl _LIBCPP_USING_IF_EXISTS;
using ::fminl _LIBCPP_USING_IF_EXISTS;
using ::hypotl _LIBCPP_USING_IF_EXISTS;
using ::ilogbl _LIBCPP_USING_IF_EXISTS;
using ::lgammal _LIBCPP_USING_IF_EXISTS;
using ::llrintl _LIBCPP_USING_IF_EXISTS;
using ::llroundl _LIBCPP_USING_IF_EXISTS;
using ::log1pl _LIBCPP_USING_IF_EXISTS;
using ::log2l _LIBCPP_USING_IF_EXISTS;
using ::logbl _LIBCPP_USING_IF_EXISTS;
using ::lrintl _LIBCPP_USING_IF_EXISTS;
using ::lroundl _LIBCPP_USING_IF_EXISTS;
using ::nanl _LIBCPP_USING_IF_EXISTS;
using ::nearbyintl _LIBCPP_USING_IF_EXISTS;
using ::nextafterl _LIBCPP_USING_IF_EXISTS;
using ::nexttowardl _LIBCPP_USING_IF_EXISTS;
using ::remainderl _LIBCPP_USING_IF_EXISTS;
using ::remquol _LIBCPP_USING_IF_EXISTS;
using ::rintl _LIBCPP_USING_IF_EXISTS;
using ::roundl _LIBCPP_USING_IF_EXISTS;
using ::scalblnl _LIBCPP_USING_IF_EXISTS;
using ::scalbnl _LIBCPP_USING_IF_EXISTS;
using ::tgammal _LIBCPP_USING_IF_EXISTS;
using ::truncl _LIBCPP_USING_IF_EXISTS;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 549 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
inline _LIBCPP_INLINE_VISIBILITY float       hypot(       float __x,       float __y,       float __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
inline _LIBCPP_INLINE_VISIBILITY double      hypot(      double __x,      double __y,      double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
inline _LIBCPP_INLINE_VISIBILITY long double hypot( long double __x, long double __y, long double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }

template <class _A1, class _A2, class _A3>
inline _LIBCPP_INLINE_VISIBILITY
typename enable_if_t
<
    is_arithmetic<_A1>::value &&
    is_arithmetic<_A2>::value &&
    is_arithmetic<_A3>::value,
    __promote<_A1, _A2, _A3>
>::type
hypot(_A1 __lcpp_x, _A2 __lcpp_y, _A3 __lcpp_z) _NOEXCEPT
{
    typedef typename __promote<_A1, _A2, _A3>::type __result_type;
    static_assert((!(is_same<_A1, __result_type>::value &&
                     is_same<_A2, __result_type>::value &&
                     is_same<_A3, __result_type>::value)), "");
    return std::hypot((__result_type)__lcpp_x, (__result_type)__lcpp_y, (__result_type)__lcpp_z);
}
#endif
# 571 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3

template <class _A1, __enable_if_t<is_floating_point<_A1>::value, int> = 0>
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR bool
__constexpr_isnan(_A1 __lcpp_x) _NOEXCEPT
{
#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__builtin_isnan)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 578 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
    return __builtin_isnan(__lcpp_x);
#else
# 580 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
    return isnan(__lcpp_x);
#endif
# 582 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
}

template <class _A1, __enable_if_t<!is_floating_point<_A1>::value, int> = 0>
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR bool
__constexpr_isnan(_A1 __lcpp_x) _NOEXCEPT
{
    return std::isnan(__lcpp_x);
}

template <class _A1, __enable_if_t<is_floating_point<_A1>::value, int> = 0>
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR bool
__constexpr_isinf(_A1 __lcpp_x) _NOEXCEPT
{
#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__builtin_isinf)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 598 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
    return __builtin_isinf(__lcpp_x);
#else
# 600 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
    return isinf(__lcpp_x);
#endif
# 602 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
}

template <class _A1, __enable_if_t<!is_floating_point<_A1>::value, int> = 0>
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR bool
__constexpr_isinf(_A1 __lcpp_x) _NOEXCEPT
{
    return std::isinf(__lcpp_x);
}

template <class _A1, __enable_if_t<is_floating_point<_A1>::value, int> = 0>
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR bool
__constexpr_isfinite(_A1 __lcpp_x) _NOEXCEPT
{
#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__builtin_isfinite)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 618 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
    return __builtin_isfinite(__lcpp_x);
#else
# 620 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
    return isfinite(__lcpp_x);
#endif
# 622 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
}

template <class _A1, __enable_if_t<!is_floating_point<_A1>::value, int> = 0>
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR bool
__constexpr_isfinite(_A1 __lcpp_x) _NOEXCEPT
{
    return __builtin_isfinite(__lcpp_x);
}

_LIBCPP_CONSTEXPR inline _LIBCPP_HIDE_FROM_ABI float __constexpr_copysign(float __x, float __y) _NOEXCEPT {
    return __builtin_copysignf(__x, __y);
}

_LIBCPP_CONSTEXPR inline _LIBCPP_HIDE_FROM_ABI double __constexpr_copysign(double __x, double __y) _NOEXCEPT {
    return __builtin_copysign(__x, __y);
}

_LIBCPP_CONSTEXPR inline _LIBCPP_HIDE_FROM_ABI long double
__constexpr_copysign(long double __x, long double __y) _NOEXCEPT {
    return __builtin_copysignl(__x, __y);
}

template <class _A1, class _A2, __enable_if_t<std::is_arithmetic<_A1>::value && std::is_arithmetic<_A2>::value, int> = 0>
_LIBCPP_CONSTEXPR inline _LIBCPP_HIDE_FROM_ABI
    typename __promote<_A1, _A2>::type
    __constexpr_copysign(_A1 __x, _A2 __y) _NOEXCEPT {
    typedef typename std::__promote<_A1, _A2>::type __result_type;
    static_assert((!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value)), "");
    return __builtin_copysign((__result_type)__x, (__result_type)__y);
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR float __constexpr_fabs(float __x) _NOEXCEPT {
    return __builtin_fabsf(__x);
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR double __constexpr_fabs(double __x) _NOEXCEPT {
    return __builtin_fabs(__x);
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR long double __constexpr_fabs(long double __x) _NOEXCEPT {
    return __builtin_fabsl(__x);
}

template <class _Tp, __enable_if_t<is_integral<_Tp>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR double __constexpr_fabs(_Tp __x) _NOEXCEPT {
    return __builtin_fabs(static_cast<double>(__x));
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 float __constexpr_fmax(float __x, float __y) _NOEXCEPT {
#if 0 /* disabled by -frewrite-includes */
#if !__has_constexpr_builtin(__builtin_fmaxf)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 673 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
  if (__libcpp_is_constant_evaluated()) {
    if (std::__constexpr_isnan(__x))
      return __y;
    if (std::__constexpr_isnan(__y))
      return __x;
    return __x < __y ? __y : __x;
  }
#endif
# 681 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
  return __builtin_fmaxf(__x, __y);
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 double __constexpr_fmax(double __x, double __y) _NOEXCEPT {
#if 0 /* disabled by -frewrite-includes */
#if !__has_constexpr_builtin(__builtin_fmax)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 686 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
  if (__libcpp_is_constant_evaluated()) {
    if (std::__constexpr_isnan(__x))
      return __y;
    if (std::__constexpr_isnan(__y))
      return __x;
    return __x < __y ? __y : __x;
  }
#endif
# 694 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
  return __builtin_fmax(__x, __y);
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 long double
__constexpr_fmax(long double __x, long double __y) _NOEXCEPT {
#if 0 /* disabled by -frewrite-includes */
#if !__has_constexpr_builtin(__builtin_fmaxl)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 700 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
  if (__libcpp_is_constant_evaluated()) {
    if (std::__constexpr_isnan(__x))
      return __y;
    if (std::__constexpr_isnan(__y))
      return __x;
    return __x < __y ? __y : __x;
  }
#endif
# 708 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
  return __builtin_fmaxl(__x, __y);
}

template <class _Tp, class _Up, __enable_if_t<is_arithmetic<_Tp>::value && is_arithmetic<_Up>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename __promote<_Tp, _Up>::type
__constexpr_fmax(_Tp __x, _Up __y) _NOEXCEPT {
  using __result_type = typename __promote<_Tp, _Up>::type;
  return std::__constexpr_fmax(static_cast<__result_type>(__x), static_cast<__result_type>(__y));
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp __constexpr_logb(_Tp __x) {
#if 0 /* disabled by -frewrite-includes */
#if !__has_constexpr_builtin(__builtin_logb)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 721 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
  if (__libcpp_is_constant_evaluated()) {
    if (__x == _Tp(0)) {
      // raise FE_DIVBYZERO
      return -numeric_limits<_Tp>::infinity();
    }

    if (std::__constexpr_isinf(__x))
      return numeric_limits<_Tp>::infinity();

    if (std::__constexpr_isnan(__x))
      return numeric_limits<_Tp>::quiet_NaN();

    __x = std::__constexpr_fabs(__x);
    unsigned long long __exp = 0;
    while (__x >= numeric_limits<_Tp>::radix) {
      __x /= numeric_limits<_Tp>::radix;
      __exp += 1;
    }
    return _Tp(__exp);
  }
#endif // !__has_constexpr_builtin(__builtin_logb)
# 742 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
  return __builtin_logb(__x);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp __constexpr_scalbn(_Tp __x, int __exp) {
#if 0 /* disabled by -frewrite-includes */
#if !__has_constexpr_builtin(__builtin_scalbln)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 748 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
  if (__libcpp_is_constant_evaluated()) {
    if (__x == _Tp(0))
      return __x;

    if (std::__constexpr_isinf(__x))
      return __x;

    if (__exp == _Tp(0))
      return __x;

    if (std::__constexpr_isnan(__x))
      return numeric_limits<_Tp>::quiet_NaN();

    _Tp __mult(1);
    if (__exp > 0) {
      __mult = numeric_limits<_Tp>::radix;
      --__exp;
    } else {
      ++__exp;
      __exp = -__exp;
      __mult /= numeric_limits<_Tp>::radix;
    }

    while (__exp > 0) {
      if (!(__exp & 1)) {
        __mult *= __mult;
        __exp >>= 1;
      } else {
        __x *= __mult;
        --__exp;
      }
    }
    return __x;
  }
#endif // !__has_constexpr_builtin(__builtin_scalbln)
# 783 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
  return __builtin_scalbn(__x, __exp);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 787 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
template <typename _Fp>
_LIBCPP_HIDE_FROM_ABI constexpr
_Fp __lerp(_Fp __a, _Fp __b, _Fp __t) noexcept {
    if ((__a <= 0 && __b >= 0) || (__a >= 0 && __b <= 0))
        return __t * __b + (1 - __t) * __a;

    if (__t == 1) return __b;
    const _Fp __x = __a + __t * (__b - __a);
    if ((__t > 1) == (__b > __a))
        return __b < __x ? __x : __b;
    else
        return __x < __b ? __x : __b;
}

_LIBCPP_HIDE_FROM_ABI constexpr float
lerp(float __a, float __b, float __t)                   _NOEXCEPT { return __lerp(__a, __b, __t); }

_LIBCPP_HIDE_FROM_ABI constexpr double
lerp(double __a, double __b, double __t)                _NOEXCEPT { return __lerp(__a, __b, __t); }

_LIBCPP_HIDE_FROM_ABI constexpr long double
lerp(long double __a, long double __b, long double __t) _NOEXCEPT { return __lerp(__a, __b, __t); }

template <class _A1, class _A2, class _A3>
inline _LIBCPP_HIDE_FROM_ABI
constexpr typename enable_if_t
<
    is_arithmetic<_A1>::value &&
    is_arithmetic<_A2>::value &&
    is_arithmetic<_A3>::value,
    __promote<_A1, _A2, _A3>
>::type
lerp(_A1 __a, _A2 __b, _A3 __t) noexcept
{
    typedef typename __promote<_A1, _A2, _A3>::type __result_type;
    static_assert(!(_IsSame<_A1, __result_type>::value &&
                    _IsSame<_A2, __result_type>::value &&
                    _IsSame<_A3, __result_type>::value));
    return std::__lerp((__result_type)__a, (__result_type)__b, (__result_type)__t);
}
#endif // _LIBCPP_STD_VER >= 20
# 828 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 834 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 834 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
# 835 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
#endif
# 836 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3

#endif // _LIBCPP_CMATH
# 838 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cmath" 3
#endif /* cmath expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3

#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3

// [cmp.alg]
namespace __strong_order {
    struct __fn {
    // NOLINTBEGIN(libcpp-robust-against-adl) strong_order should use ADL, but only here
        template<class _Tp, class _Up>
            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
        _LIBCPP_HIDE_FROM_ABI static constexpr auto
        __go(_Tp&& __t, _Up&& __u, __priority_tag<2>)
            noexcept(noexcept(strong_ordering(strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
            -> decltype(      strong_ordering(strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
            { return          strong_ordering(strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
    // NOLINTEND(libcpp-robust-against-adl)

        template<class _Tp, class _Up, class _Dp = decay_t<_Tp>>
            requires is_same_v<_Dp, decay_t<_Up>> && is_floating_point_v<_Dp>
        _LIBCPP_HIDE_FROM_ABI static constexpr strong_ordering
        __go(_Tp&& __t, _Up&& __u, __priority_tag<1>) noexcept
        {
            if constexpr (numeric_limits<_Dp>::is_iec559 && sizeof(_Dp) == sizeof(int32_t)) {
                int32_t __rx = _VSTD::bit_cast<int32_t>(__t);
                int32_t __ry = _VSTD::bit_cast<int32_t>(__u);
                __rx = (__rx < 0) ? (numeric_limits<int32_t>::min() - __rx - 1) : __rx;
                __ry = (__ry < 0) ? (numeric_limits<int32_t>::min() - __ry - 1) : __ry;
                return (__rx <=> __ry);
            } else if constexpr (numeric_limits<_Dp>::is_iec559 && sizeof(_Dp) == sizeof(int64_t)) {
                int64_t __rx = _VSTD::bit_cast<int64_t>(__t);
                int64_t __ry = _VSTD::bit_cast<int64_t>(__u);
                __rx = (__rx < 0) ? (numeric_limits<int64_t>::min() - __rx - 1) : __rx;
                __ry = (__ry < 0) ? (numeric_limits<int64_t>::min() - __ry - 1) : __ry;
                return (__rx <=> __ry);
            } else if (__t < __u) {
                return strong_ordering::less;
            } else if (__t > __u) {
                return strong_ordering::greater;
            } else if (__t == __u) {
                if constexpr (numeric_limits<_Dp>::radix == 2) {
                    return _VSTD::signbit(__u) <=> _VSTD::signbit(__t);
                } else {
                    // This is bullet 3 of the IEEE754 algorithm, relevant
                    // only for decimal floating-point;
                    // see https://stackoverflow.com/questions/69068075/
                    if (__t == 0 || _VSTD::isinf(__t)) {
                        return _VSTD::signbit(__u) <=> _VSTD::signbit(__t);
                    } else {
                        int __texp, __uexp;
                        (void)_VSTD::frexp(__t, &__texp);
                        (void)_VSTD::frexp(__u, &__uexp);
                        return (__t < 0) ? (__texp <=> __uexp) : (__uexp <=> __texp);
                    }
                }
            } else {
                // They're unordered, so one of them must be a NAN.
                // The order is -QNAN, -SNAN, numbers, +SNAN, +QNAN.
                bool __t_is_nan = _VSTD::isnan(__t);
                bool __u_is_nan = _VSTD::isnan(__u);
                bool __t_is_negative = _VSTD::signbit(__t);
                bool __u_is_negative = _VSTD::signbit(__u);
                using _IntType = conditional_t<
                    sizeof(__t) == sizeof(int32_t), int32_t, conditional_t<
                    sizeof(__t) == sizeof(int64_t), int64_t, void>
                >;
                if constexpr (is_same_v<_IntType, void>) {
                    static_assert(sizeof(_Dp) == 0, "std::strong_order is unimplemented for this floating-point type");
                } else if (__t_is_nan && __u_is_nan) {
                    // Order by sign bit, then by "payload bits" (we'll just use bit_cast).
                    if (__t_is_negative != __u_is_negative) {
                        return (__u_is_negative <=> __t_is_negative);
                    } else {
                        return _VSTD::bit_cast<_IntType>(__t) <=> _VSTD::bit_cast<_IntType>(__u);
                    }
                } else if (__t_is_nan) {
                    return __t_is_negative ? strong_ordering::less : strong_ordering::greater;
                } else {
                    return __u_is_negative ? strong_ordering::greater : strong_ordering::less;
                }
            }
        }

        template<class _Tp, class _Up>
            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
        _LIBCPP_HIDE_FROM_ABI static constexpr auto
        __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
            noexcept(noexcept(strong_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
            -> decltype(      strong_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
            { return          strong_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }

        template<class _Tp, class _Up>
        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
            noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>())))
            -> decltype(      __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()))
            { return          __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()); }
    };
} // namespace __strong_order

inline namespace __cpo {
    inline constexpr auto strong_order = __strong_order::__fn{};
} // namespace __cpo

#endif // _LIBCPP_STD_VER >= 20
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___COMPARE_STRONG_ORDER
# 140 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/strong_order.h" 3
#endif /* strong_order.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/priority_tag.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cmath>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3

#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3

// [cmp.alg]
namespace __weak_order {
    struct __fn {
    // NOLINTBEGIN(libcpp-robust-against-adl) weak_order should use ADL, but only here
        template<class _Tp, class _Up>
            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
        _LIBCPP_HIDE_FROM_ABI static constexpr auto
        __go(_Tp&& __t, _Up&& __u, __priority_tag<3>)
            noexcept(noexcept(weak_ordering(weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
            -> decltype(      weak_ordering(weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
            { return          weak_ordering(weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
    // NOLINTEND(libcpp-robust-against-adl)

        template<class _Tp, class _Up, class _Dp = decay_t<_Tp>>
            requires is_same_v<_Dp, decay_t<_Up>> && is_floating_point_v<_Dp>
        _LIBCPP_HIDE_FROM_ABI static constexpr weak_ordering
        __go(_Tp&& __t, _Up&& __u, __priority_tag<2>) noexcept
        {
            partial_ordering __po = (__t <=> __u);
            if (__po == partial_ordering::less) {
                return weak_ordering::less;
            } else if (__po == partial_ordering::equivalent) {
                return weak_ordering::equivalent;
            } else if (__po == partial_ordering::greater) {
                return weak_ordering::greater;
            } else {
                // Otherwise, at least one of them is a NaN.
                bool __t_is_nan = _VSTD::isnan(__t);
                bool __u_is_nan = _VSTD::isnan(__u);
                bool __t_is_negative = _VSTD::signbit(__t);
                bool __u_is_negative = _VSTD::signbit(__u);
                if (__t_is_nan && __u_is_nan) {
                    return (__u_is_negative <=> __t_is_negative);
                } else if (__t_is_nan) {
                    return __t_is_negative ? weak_ordering::less : weak_ordering::greater;
                } else {
                    return __u_is_negative ? weak_ordering::greater : weak_ordering::less;
                }
            }
        }

        template<class _Tp, class _Up>
            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
        _LIBCPP_HIDE_FROM_ABI static constexpr auto
        __go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
            noexcept(noexcept(weak_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
            -> decltype(      weak_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
            { return          weak_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }

        template<class _Tp, class _Up>
            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
        _LIBCPP_HIDE_FROM_ABI static constexpr auto
        __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
            noexcept(noexcept(weak_ordering(_VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
            -> decltype(      weak_ordering(_VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
            { return          weak_ordering(_VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }

        template<class _Tp, class _Up>
        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
            noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<3>())))
            -> decltype(      __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<3>()))
            { return          __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<3>()); }
    };
} // namespace __weak_order

inline namespace __cpo {
    inline constexpr auto weak_order = __weak_order::__fn{};
} // namespace __cpo

#endif // _LIBCPP_STD_VER >= 20
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___COMPARE_WEAK_ORDER
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/weak_order.h" 3
#endif /* weak_order.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/priority_tag.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3

#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3

// [cmp.alg]
namespace __partial_order {
    struct __fn {
    // NOLINTBEGIN(libcpp-robust-against-adl) partial_order should use ADL, but only here
        template<class _Tp, class _Up>
            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
        _LIBCPP_HIDE_FROM_ABI static constexpr auto
        __go(_Tp&& __t, _Up&& __u, __priority_tag<2>)
            noexcept(noexcept(partial_ordering(partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
            -> decltype(      partial_ordering(partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
            { return          partial_ordering(partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
    // NOLINTEND(libcpp-robust-against-adl)

        template<class _Tp, class _Up>
            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
        _LIBCPP_HIDE_FROM_ABI static constexpr auto
        __go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
            noexcept(noexcept(partial_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
            -> decltype(      partial_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
            { return          partial_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }

        template<class _Tp, class _Up>
            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
        _LIBCPP_HIDE_FROM_ABI static constexpr auto
        __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
            noexcept(noexcept(partial_ordering(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
            -> decltype(      partial_ordering(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
            { return          partial_ordering(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }

        template<class _Tp, class _Up>
        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
            noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>())))
            -> decltype(      __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()))
            { return          __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()); }
    };
} // namespace __partial_order

inline namespace __cpo {
    inline constexpr auto partial_order = __partial_order::__fn{};
} // namespace __cpo

#endif // _LIBCPP_STD_VER >= 20
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___COMPARE_PARTIAL_ORDER
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/partial_order.h" 3
#endif /* partial_order.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/priority_tag.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3

#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3

// [cmp.alg]
namespace __compare_partial_order_fallback {
    struct __fn {
        template<class _Tp, class _Up>
            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
        _LIBCPP_HIDE_FROM_ABI static constexpr auto
        __go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
            noexcept(noexcept(_VSTD::partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
            -> decltype(      _VSTD::partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))
            { return          _VSTD::partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)); }

        template<class _Tp, class _Up>
            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
        _LIBCPP_HIDE_FROM_ABI static constexpr auto
        __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
            noexcept(noexcept(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? partial_ordering::equivalent :
                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? partial_ordering::less :
                              _VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t) ? partial_ordering::greater :
                              partial_ordering::unordered))
            -> decltype(      _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? partial_ordering::equivalent :
                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? partial_ordering::less :
                              _VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t) ? partial_ordering::greater :
                              partial_ordering::unordered)
        {
            return            _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? partial_ordering::equivalent :
                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? partial_ordering::less :
                              _VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t) ? partial_ordering::greater :
                              partial_ordering::unordered;
        }

        template<class _Tp, class _Up>
        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
            noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>())))
            -> decltype(      __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()))
            { return          __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()); }
    };
} // namespace __compare_partial_order_fallback

inline namespace __cpo {
    inline constexpr auto compare_partial_order_fallback = __compare_partial_order_fallback::__fn{};
} // namespace __cpo

#endif // _LIBCPP_STD_VER >= 20
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___COMPARE_COMPARE_PARTIAL_ORDER_FALLBACK
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h" 3
#endif /* compare_partial_order_fallback.h expanded by -frewrite-includes */
# 146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* compare_strong_order_fallback.h expanded by -frewrite-includes */
#include <__compare/compare_strong_order_fallback.h>
#else /* compare_strong_order_fallback.h expanded by -frewrite-includes */
# 146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___COMPARE_COMPARE_STRONG_ORDER_FALLBACK
#define _LIBCPP___COMPARE_COMPARE_STRONG_ORDER_FALLBACK

#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/strong_order.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/priority_tag.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3

#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3

// [cmp.alg]
namespace __compare_strong_order_fallback {
    struct __fn {
        template<class _Tp, class _Up>
            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
        _LIBCPP_HIDE_FROM_ABI static constexpr auto
        __go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
            noexcept(noexcept(_VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
            -> decltype(      _VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))
            { return          _VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)); }

        template<class _Tp, class _Up>
            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
        _LIBCPP_HIDE_FROM_ABI static constexpr auto
        __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
            noexcept(noexcept(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? strong_ordering::equal :
                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? strong_ordering::less :
                              strong_ordering::greater))
            -> decltype(      _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? strong_ordering::equal :
                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? strong_ordering::less :
                              strong_ordering::greater)
        {
            return            _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? strong_ordering::equal :
                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? strong_ordering::less :
                              strong_ordering::greater;
        }

        template<class _Tp, class _Up>
        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
            noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>())))
            -> decltype(      __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()))
            { return          __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()); }
    };
} // namespace __compare_strong_order_fallback

inline namespace __cpo {
    inline constexpr auto compare_strong_order_fallback = __compare_strong_order_fallback::__fn{};
} // namespace __cpo

#endif // _LIBCPP_STD_VER >= 20
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___COMPARE_COMPARE_STRONG_ORDER_FALLBACK
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_strong_order_fallback.h" 3
#endif /* compare_strong_order_fallback.h expanded by -frewrite-includes */
# 147 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/compare_three_way.h>
#endif /* expanded by -frewrite-includes */
# 147 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/compare_three_way_result.h>
#endif /* expanded by -frewrite-includes */
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 149 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* compare_weak_order_fallback.h expanded by -frewrite-includes */
#include <__compare/compare_weak_order_fallback.h>
#else /* compare_weak_order_fallback.h expanded by -frewrite-includes */
# 149 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___COMPARE_COMPARE_WEAK_ORDER_FALLBACK
#define _LIBCPP___COMPARE_COMPARE_WEAK_ORDER_FALLBACK

#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/weak_order.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/priority_tag.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3

#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3

// [cmp.alg]
namespace __compare_weak_order_fallback {
    struct __fn {
        template<class _Tp, class _Up>
            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
        _LIBCPP_HIDE_FROM_ABI static constexpr auto
        __go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
            noexcept(noexcept(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
            -> decltype(      _VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))
            { return          _VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)); }

        template<class _Tp, class _Up>
            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
        _LIBCPP_HIDE_FROM_ABI static constexpr auto
        __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
            noexcept(noexcept(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? weak_ordering::equivalent :
                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? weak_ordering::less :
                              weak_ordering::greater))
            -> decltype(      _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? weak_ordering::equivalent :
                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? weak_ordering::less :
                              weak_ordering::greater)
        {
            return            _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? weak_ordering::equivalent :
                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? weak_ordering::less :
                              weak_ordering::greater;
        }

        template<class _Tp, class _Up>
        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
            noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>())))
            -> decltype(      __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()))
            { return          __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()); }
    };
} // namespace __compare_weak_order_fallback

inline namespace __cpo {
    inline constexpr auto compare_weak_order_fallback = __compare_weak_order_fallback::__fn{};
} // namespace __cpo

#endif // _LIBCPP_STD_VER >= 20
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___COMPARE_COMPARE_WEAK_ORDER_FALLBACK
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/compare_weak_order_fallback.h" 3
#endif /* compare_weak_order_fallback.h expanded by -frewrite-includes */
# 150 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_eq.h expanded by -frewrite-includes */
#include <__compare/is_eq.h>
#else /* is_eq.h expanded by -frewrite-includes */
# 150 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/is_eq.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___COMPARE_IS_EQ_H
#define _LIBCPP___COMPARE_IS_EQ_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/is_eq.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/is_eq.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/is_eq.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/is_eq.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/is_eq.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/is_eq.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/is_eq.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/is_eq.h" 3

_LIBCPP_HIDE_FROM_ABI inline constexpr bool is_eq(partial_ordering __c) noexcept { return __c == 0; }
_LIBCPP_HIDE_FROM_ABI inline constexpr bool is_neq(partial_ordering __c) noexcept { return __c != 0; }
_LIBCPP_HIDE_FROM_ABI inline constexpr bool is_lt(partial_ordering __c) noexcept { return __c < 0; }
_LIBCPP_HIDE_FROM_ABI inline constexpr bool is_lteq(partial_ordering __c) noexcept { return __c <= 0; }
_LIBCPP_HIDE_FROM_ABI inline constexpr bool is_gt(partial_ordering __c) noexcept { return __c > 0; }
_LIBCPP_HIDE_FROM_ABI inline constexpr bool is_gteq(partial_ordering __c) noexcept { return __c >= 0; }

#endif // _LIBCPP_STD_VER >= 20
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/is_eq.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___COMPARE_IS_EQ_H
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__compare/is_eq.h" 3
#endif /* is_eq.h expanded by -frewrite-includes */
# 151 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 151 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/partial_order.h>
#endif /* expanded by -frewrite-includes */
# 152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 153 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/strong_order.h>
#endif /* expanded by -frewrite-includes */
# 153 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 154 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/synth_three_way.h>
#endif /* expanded by -frewrite-includes */
# 154 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 155 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/three_way_comparable.h>
#endif /* expanded by -frewrite-includes */
# 155 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 156 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/weak_order.h>
#endif /* expanded by -frewrite-includes */
# 156 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 157 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 157 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 159 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 161 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#endif
# 163 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 165 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
# 166 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#endif
# 167 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3

#endif // _LIBCPP_COMPARE
# 169 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/compare" 3
#endif /* compare expanded by -frewrite-includes */
# 269 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 271 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 272 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#endif
# 273 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 275 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 276 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#ifndef _LIBCPP_CXX03_LANG


// __tuple_leaf

template <size_t _Ip, class _Hp,
          bool=is_empty<_Hp>::value && !__libcpp_is_final<_Hp>::value
         >
class __tuple_leaf;

template <size_t _Ip, class _Hp, bool _Ep>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
void swap(__tuple_leaf<_Ip, _Hp, _Ep>& __x, __tuple_leaf<_Ip, _Hp, _Ep>& __y)
    _NOEXCEPT_(__is_nothrow_swappable<_Hp>::value)
{
    swap(__x.get(), __y.get());
}

template <size_t _Ip, class _Hp, bool _Ep>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void swap(const __tuple_leaf<_Ip, _Hp, _Ep>& __x, const __tuple_leaf<_Ip, _Hp, _Ep>& __y)
     _NOEXCEPT_(__is_nothrow_swappable<const _Hp>::value) {
  swap(__x.get(), __y.get());
}

template <size_t _Ip, class _Hp, bool>
class __tuple_leaf
{
    _Hp __value_;

    template <class _Tp>
    static _LIBCPP_HIDE_FROM_ABI constexpr bool __can_bind_reference() {
#if 0 /* disabled by -frewrite-includes */
#if __has_keyword(__reference_binds_to_temporary)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 312 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
      return !__reference_binds_to_temporary(_Hp, _Tp);
#else
# 314 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
      return true;
#endif
# 316 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14
    __tuple_leaf& operator=(const __tuple_leaf&);
public:
    _LIBCPP_INLINE_VISIBILITY constexpr __tuple_leaf()
             _NOEXCEPT_(is_nothrow_default_constructible<_Hp>::value) : __value_()
       {static_assert(!is_reference<_Hp>::value,
              "Attempted to default construct a reference element in a tuple");}

    template <class _Alloc>
        _LIBCPP_INLINE_VISIBILITY constexpr
        __tuple_leaf(integral_constant<int, 0>, const _Alloc&)
            : __value_()
        {static_assert(!is_reference<_Hp>::value,
              "Attempted to default construct a reference element in a tuple");}

    template <class _Alloc>
        _LIBCPP_INLINE_VISIBILITY constexpr
        __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a)
            : __value_(allocator_arg_t(), __a)
        {static_assert(!is_reference<_Hp>::value,
              "Attempted to default construct a reference element in a tuple");}

    template <class _Alloc>
        _LIBCPP_INLINE_VISIBILITY constexpr
        __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a)
            : __value_(__a)
        {static_assert(!is_reference<_Hp>::value,
              "Attempted to default construct a reference element in a tuple");}

    template <class _Tp,
              class = __enable_if_t<
                  _And<
                      _IsNotSame<__remove_cvref_t<_Tp>, __tuple_leaf>,
                      is_constructible<_Hp, _Tp>
                    >::value
                >
            >
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
        explicit __tuple_leaf(_Tp&& __t) _NOEXCEPT_((is_nothrow_constructible<_Hp, _Tp>::value))
            : __value_(_VSTD::forward<_Tp>(__t))
        {static_assert(__can_bind_reference<_Tp&&>(),
       "Attempted construction of reference element binds to a temporary whose lifetime has ended");}

    template <class _Tp, class _Alloc>
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
        explicit __tuple_leaf(integral_constant<int, 0>, const _Alloc&, _Tp&& __t)
            : __value_(_VSTD::forward<_Tp>(__t))
        {static_assert(__can_bind_reference<_Tp&&>(),
       "Attempted construction of reference element binds to a temporary whose lifetime has ended");}

    template <class _Tp, class _Alloc>
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
        explicit __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a, _Tp&& __t)
            : __value_(allocator_arg_t(), __a, _VSTD::forward<_Tp>(__t))
        {static_assert(!is_reference<_Hp>::value,
            "Attempted to uses-allocator construct a reference element in a tuple");}

    template <class _Tp, class _Alloc>
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
        explicit __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a, _Tp&& __t)
            : __value_(_VSTD::forward<_Tp>(__t), __a)
        {static_assert(!is_reference<_Hp>::value,
           "Attempted to uses-allocator construct a reference element in a tuple");}

    _LIBCPP_HIDE_FROM_ABI __tuple_leaf(const __tuple_leaf& __t) = default;
    _LIBCPP_HIDE_FROM_ABI __tuple_leaf(__tuple_leaf&& __t) = default;

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    int swap(__tuple_leaf& __t) _NOEXCEPT_(__is_nothrow_swappable<__tuple_leaf>::value)
    {
        _VSTD::swap(*this, __t);
        return 0;
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    int swap(const __tuple_leaf& __t) const _NOEXCEPT_(__is_nothrow_swappable<const __tuple_leaf>::value) {
        _VSTD::swap(*this, __t);
        return 0;
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14       _Hp& get()       _NOEXCEPT {return __value_;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Hp& get() const _NOEXCEPT {return __value_;}
};

template <size_t _Ip, class _Hp>
class __tuple_leaf<_Ip, _Hp, true>
    : private _Hp
{
    _LIBCPP_CONSTEXPR_SINCE_CXX14
    __tuple_leaf& operator=(const __tuple_leaf&);
public:
    _LIBCPP_INLINE_VISIBILITY constexpr __tuple_leaf()
             _NOEXCEPT_(is_nothrow_default_constructible<_Hp>::value) {}

    template <class _Alloc>
        _LIBCPP_INLINE_VISIBILITY constexpr
        __tuple_leaf(integral_constant<int, 0>, const _Alloc&) {}

    template <class _Alloc>
        _LIBCPP_INLINE_VISIBILITY constexpr
        __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a)
            : _Hp(allocator_arg_t(), __a) {}

    template <class _Alloc>
        _LIBCPP_INLINE_VISIBILITY constexpr
        __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a)
            : _Hp(__a) {}

    template <class _Tp,
              class = __enable_if_t<
                  _And<
                    _IsNotSame<__remove_cvref_t<_Tp>, __tuple_leaf>,
                    is_constructible<_Hp, _Tp>
                  >::value
                >
            >
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
        explicit __tuple_leaf(_Tp&& __t) _NOEXCEPT_((is_nothrow_constructible<_Hp, _Tp>::value))
            : _Hp(_VSTD::forward<_Tp>(__t)) {}

    template <class _Tp, class _Alloc>
        _LIBCPP_INLINE_VISIBILITY constexpr
        explicit __tuple_leaf(integral_constant<int, 0>, const _Alloc&, _Tp&& __t)
            : _Hp(_VSTD::forward<_Tp>(__t)) {}

    template <class _Tp, class _Alloc>
        _LIBCPP_INLINE_VISIBILITY constexpr
        explicit __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a, _Tp&& __t)
            : _Hp(allocator_arg_t(), __a, _VSTD::forward<_Tp>(__t)) {}

    template <class _Tp, class _Alloc>
        _LIBCPP_INLINE_VISIBILITY constexpr
        explicit __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a, _Tp&& __t)
            : _Hp(_VSTD::forward<_Tp>(__t), __a) {}

    __tuple_leaf(__tuple_leaf const &) = default;
    __tuple_leaf(__tuple_leaf &&) = default;

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    int
    swap(__tuple_leaf& __t) _NOEXCEPT_(__is_nothrow_swappable<__tuple_leaf>::value)
    {
        _VSTD::swap(*this, __t);
        return 0;
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    int swap(const __tuple_leaf& __rhs) const _NOEXCEPT_(__is_nothrow_swappable<const __tuple_leaf>::value) {
        _VSTD::swap(*this, __rhs);
        return 0;
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14       _Hp& get()       _NOEXCEPT {return static_cast<_Hp&>(*this);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Hp& get() const _NOEXCEPT {return static_cast<const _Hp&>(*this);}
};

template <class ..._Tp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
void __swallow(_Tp&&...) _NOEXCEPT {}

template <class _Tp>
struct __all_default_constructible;

template <class ..._Tp>
struct __all_default_constructible<__tuple_types<_Tp...>>
    : __all<is_default_constructible<_Tp>::value...>
{ };

// __tuple_impl

template<class _Indx, class ..._Tp> struct __tuple_impl;

template<size_t ..._Indx, class ..._Tp>
struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
    : public __tuple_leaf<_Indx, _Tp>...
{
    _LIBCPP_INLINE_VISIBILITY
    constexpr __tuple_impl()
        _NOEXCEPT_(__all<is_nothrow_default_constructible<_Tp>::value...>::value) {}

    template <size_t ..._Uf, class ..._Tf,
              size_t ..._Ul, class ..._Tl, class ..._Up>
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
        explicit
        __tuple_impl(__tuple_indices<_Uf...>, __tuple_types<_Tf...>,
                     __tuple_indices<_Ul...>, __tuple_types<_Tl...>,
                     _Up&&... __u)
                     _NOEXCEPT_((__all<is_nothrow_constructible<_Tf, _Up>::value...>::value &&
                                 __all<is_nothrow_default_constructible<_Tl>::value...>::value)) :
            __tuple_leaf<_Uf, _Tf>(_VSTD::forward<_Up>(__u))...,
            __tuple_leaf<_Ul, _Tl>()...
            {}

    template <class _Alloc, size_t ..._Uf, class ..._Tf,
              size_t ..._Ul, class ..._Tl, class ..._Up>
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
        explicit
        __tuple_impl(allocator_arg_t, const _Alloc& __a,
                     __tuple_indices<_Uf...>, __tuple_types<_Tf...>,
                     __tuple_indices<_Ul...>, __tuple_types<_Tl...>,
                     _Up&&... __u) :
            __tuple_leaf<_Uf, _Tf>(__uses_alloc_ctor<_Tf, _Alloc, _Up>(), __a,
            _VSTD::forward<_Up>(__u))...,
            __tuple_leaf<_Ul, _Tl>(__uses_alloc_ctor<_Tl, _Alloc>(), __a)...
            {}

    template <class _Tuple,
              class = __enable_if_t<__tuple_constructible<_Tuple, tuple<_Tp...> >::value>
             >
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
        __tuple_impl(_Tuple&& __t) _NOEXCEPT_((__all<is_nothrow_constructible<_Tp, typename tuple_element<_Indx,
                                       typename __make_tuple_types<_Tuple>::type>::type>::value...>::value))
            : __tuple_leaf<_Indx, _Tp>(_VSTD::forward<typename tuple_element<_Indx,
                                       typename __make_tuple_types<_Tuple>::type>::type>(_VSTD::get<_Indx>(__t)))...
            {}

    template <class _Alloc, class _Tuple,
              class = __enable_if_t<__tuple_constructible<_Tuple, tuple<_Tp...> >::value>
             >
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
        __tuple_impl(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
            : __tuple_leaf<_Indx, _Tp>(__uses_alloc_ctor<_Tp, _Alloc, typename tuple_element<_Indx,
                                       typename __make_tuple_types<_Tuple>::type>::type>(), __a,
                                       _VSTD::forward<typename tuple_element<_Indx,
                                       typename __make_tuple_types<_Tuple>::type>::type>(_VSTD::get<_Indx>(__t)))...
            {}

    __tuple_impl(const __tuple_impl&) = default;
    __tuple_impl(__tuple_impl&&) = default;

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    void swap(__tuple_impl& __t)
        _NOEXCEPT_(__all<__is_nothrow_swappable<_Tp>::value...>::value)
    {
        _VSTD::__swallow(__tuple_leaf<_Indx, _Tp>::swap(static_cast<__tuple_leaf<_Indx, _Tp>&>(__t))...);
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    void swap(const __tuple_impl& __t) const
        _NOEXCEPT_(__all<__is_nothrow_swappable<const _Tp>::value...>::value)
    {
        _VSTD::__swallow(__tuple_leaf<_Indx, _Tp>::swap(static_cast<const __tuple_leaf<_Indx, _Tp>&>(__t))...);
    }
};

template<class _Dest, class _Source, size_t ..._Np>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
void __memberwise_copy_assign(_Dest& __dest, _Source const& __source, __tuple_indices<_Np...>) {
    _VSTD::__swallow(((_VSTD::get<_Np>(__dest) = _VSTD::get<_Np>(__source)), void(), 0)...);
}

template<class _Dest, class _Source, class ..._Up, size_t ..._Np>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
void __memberwise_forward_assign(_Dest& __dest, _Source&& __source, __tuple_types<_Up...>, __tuple_indices<_Np...>) {
    _VSTD::__swallow(((
        _VSTD::get<_Np>(__dest) = _VSTD::forward<_Up>(_VSTD::get<_Np>(__source))
    ), void(), 0)...);
}

template <class ..._Tp>
class _LIBCPP_TEMPLATE_VIS tuple
{
    typedef __tuple_impl<typename __make_tuple_indices<sizeof...(_Tp)>::type, _Tp...> _BaseT;

    _BaseT __base_;

    template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_SINCE_CXX14
        typename tuple_element<_Jp, tuple<_Up...> >::type& get(tuple<_Up...>&) _NOEXCEPT;
    template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_SINCE_CXX14
        const typename tuple_element<_Jp, tuple<_Up...> >::type& get(const tuple<_Up...>&) _NOEXCEPT;
    template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_SINCE_CXX14
        typename tuple_element<_Jp, tuple<_Up...> >::type&& get(tuple<_Up...>&&) _NOEXCEPT;
    template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_SINCE_CXX14
        const typename tuple_element<_Jp, tuple<_Up...> >::type&& get(const tuple<_Up...>&&) _NOEXCEPT;
public:
    // [tuple.cnstr]

_LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wc++20-extensions")
_LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wc++20-extensions")

    // tuple() constructors (including allocator_arg_t variants)
    template <template<class...> class _IsImpDefault = __is_implicitly_default_constructible,
              template<class...> class _IsDefault = is_default_constructible, __enable_if_t<
        _And<
            _IsDefault<_Tp>...
        >::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    explicit(_Not<_Lazy<_And, _IsImpDefault<_Tp>...> >::value) tuple()
        _NOEXCEPT_(_And<is_nothrow_default_constructible<_Tp>...>::value)
    { }

    template <class _Alloc,
              template<class...> class _IsImpDefault = __is_implicitly_default_constructible,
              template<class...> class _IsDefault = is_default_constructible, __enable_if_t<
        _And<
            _IsDefault<_Tp>...
        >::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    explicit(_Not<_Lazy<_And, _IsImpDefault<_Tp>...> >::value) tuple(allocator_arg_t, _Alloc const& __a)
      : __base_(allocator_arg_t(), __a,
                    __tuple_indices<>(), __tuple_types<>(),
                    typename __make_tuple_indices<sizeof...(_Tp), 0>::type(),
                    __tuple_types<_Tp...>()) {}

    // tuple(const T&...) constructors (including allocator_arg_t variants)
    template <template<class...> class _And = _And, __enable_if_t<
        _And<
            _BoolConstant<sizeof...(_Tp) >= 1>,
            is_copy_constructible<_Tp>...
        >::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    explicit(_Not<_Lazy<_And, is_convertible<const _Tp&, _Tp>...> >::value) tuple(const _Tp& ... __t)
        _NOEXCEPT_(_And<is_nothrow_copy_constructible<_Tp>...>::value)
        : __base_(typename __make_tuple_indices<sizeof...(_Tp)>::type(),
                typename __make_tuple_types<tuple, sizeof...(_Tp)>::type(),
                typename __make_tuple_indices<0>::type(),
                typename __make_tuple_types<tuple, 0>::type(),
                __t...
               ) {}

    template <class _Alloc, template<class...> class _And = _And, __enable_if_t<
        _And<
            _BoolConstant<sizeof...(_Tp) >= 1>,
            is_copy_constructible<_Tp>...
        >::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    explicit(_Not<_Lazy<_And, is_convertible<const _Tp&, _Tp>...> >::value) tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
        : __base_(allocator_arg_t(), __a,
                typename __make_tuple_indices<sizeof...(_Tp)>::type(),
                typename __make_tuple_types<tuple, sizeof...(_Tp)>::type(),
                typename __make_tuple_indices<0>::type(),
                typename __make_tuple_types<tuple, 0>::type(),
                __t...
               ) {}

    // tuple(U&& ...) constructors (including allocator_arg_t variants)
    template <class ..._Up> struct _IsThisTuple : false_type { };
    template <class _Up> struct _IsThisTuple<_Up> : is_same<__remove_cvref_t<_Up>, tuple> { };

    template <class ..._Up>
    struct _EnableUTypesCtor : _And<
        _BoolConstant<sizeof...(_Tp) >= 1>,
        _Not<_IsThisTuple<_Up...> >, // extension to allow mis-behaved user constructors
        is_constructible<_Tp, _Up>...
    > { };

    template <class ..._Up, __enable_if_t<
        _And<
            _BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>,
            _EnableUTypesCtor<_Up...>
        >::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    explicit(_Not<_Lazy<_And, is_convertible<_Up, _Tp>...> >::value) tuple(_Up&&... __u)
        _NOEXCEPT_((_And<is_nothrow_constructible<_Tp, _Up>...>::value))
        : __base_(typename __make_tuple_indices<sizeof...(_Up)>::type(),
                    typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
                    typename __make_tuple_indices<sizeof...(_Tp), sizeof...(_Up)>::type(),
                    typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
                    _VSTD::forward<_Up>(__u)...) {}

    template <class _Alloc, class ..._Up, __enable_if_t<
        _And<
            _BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>,
            _EnableUTypesCtor<_Up...>
        >::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    explicit(_Not<_Lazy<_And, is_convertible<_Up, _Tp>...> >::value) tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
        : __base_(allocator_arg_t(), __a,
                    typename __make_tuple_indices<sizeof...(_Up)>::type(),
                    typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
                    typename __make_tuple_indices<sizeof...(_Tp), sizeof...(_Up)>::type(),
                    typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
                    _VSTD::forward<_Up>(__u)...) {}

    // Copy and move constructors (including the allocator_arg_t variants)
    tuple(const tuple&) = default;
    tuple(tuple&&) = default;

    template <class _Alloc, template<class...> class _And = _And, __enable_if_t<
        _And<is_copy_constructible<_Tp>...>::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    tuple(allocator_arg_t, const _Alloc& __alloc, const tuple& __t)
        : __base_(allocator_arg_t(), __alloc, __t)
    { }

    template <class _Alloc, template<class...> class _And = _And, __enable_if_t<
        _And<is_move_constructible<_Tp>...>::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    tuple(allocator_arg_t, const _Alloc& __alloc, tuple&& __t)
        : __base_(allocator_arg_t(), __alloc, _VSTD::move(__t))
    { }

    // tuple(const tuple<U...>&) constructors (including allocator_arg_t variants)

    template <class _OtherTuple, class _DecayedOtherTuple = __remove_cvref_t<_OtherTuple>, class = void>
    struct _EnableCtorFromUTypesTuple : false_type {};

    template <class _OtherTuple, class... _Up>
    struct _EnableCtorFromUTypesTuple<_OtherTuple, tuple<_Up...>,
              // the length of the packs needs to checked first otherwise the 2 packs cannot be expanded simultaneously below
               __enable_if_t<sizeof...(_Up) == sizeof...(_Tp)>> : _And<
        // the two conditions below are not in spec. The purpose is to disable the UTypes Ctor when copy/move Ctor can work.
        // Otherwise, is_constructible can trigger hard error in those cases https://godbolt.org/z/M94cGdKcE
        _Not<is_same<_OtherTuple, const tuple&> >,
        _Not<is_same<_OtherTuple, tuple&&> >,
        is_constructible<_Tp, __copy_cvref_t<_OtherTuple, _Up> >...,
        _Lazy<_Or, _BoolConstant<sizeof...(_Tp) != 1>,
            // _Tp and _Up are 1-element packs - the pack expansions look
            // weird to avoid tripping up the type traits in degenerate cases
            _Lazy<_And,
                _Not<is_same<_Tp, _Up> >...,
                _Not<is_convertible<_OtherTuple, _Tp> >...,
                _Not<is_constructible<_Tp, _OtherTuple> >...
            >
        >
    > {};

    template <class ..._Up, __enable_if_t<
        _And<
            _EnableCtorFromUTypesTuple<const tuple<_Up...>&>
        >::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    explicit(_Not<_Lazy<_And, is_convertible<const _Up&, _Tp>...> >::value) tuple(const tuple<_Up...>& __t)
        _NOEXCEPT_((_And<is_nothrow_constructible<_Tp, const _Up&>...>::value))
        : __base_(__t)
    { }

    template <class ..._Up, class _Alloc, __enable_if_t<
        _And<
            _EnableCtorFromUTypesTuple<const tuple<_Up...>&>
        >::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    explicit(_Not<_Lazy<_And, is_convertible<const _Up&, _Tp>...> >::value) tuple(allocator_arg_t, const _Alloc& __a, const tuple<_Up...>& __t)
        : __base_(allocator_arg_t(), __a, __t)
    { }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 766 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
    // tuple(tuple<U...>&) constructors (including allocator_arg_t variants)

    template <class... _Up, enable_if_t<
        _EnableCtorFromUTypesTuple<tuple<_Up...>&>::value>* = nullptr>
    _LIBCPP_HIDE_FROM_ABI constexpr
        explicit(!_Lazy<_And, is_convertible<_Up&, _Tp>...>::value)
    tuple(tuple<_Up...>& __t) : __base_(__t) {}

    template <class _Alloc, class... _Up, enable_if_t<
        _EnableCtorFromUTypesTuple<tuple<_Up...>&>::value>* = nullptr>
    _LIBCPP_HIDE_FROM_ABI constexpr
        explicit(!_Lazy<_And, is_convertible<_Up&, _Tp>...>::value)
    tuple(allocator_arg_t, const _Alloc& __alloc, tuple<_Up...>& __t) : __base_(allocator_arg_t(), __alloc, __t) {}
#endif // _LIBCPP_STD_VER >= 23
# 780 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

    // tuple(tuple<U...>&&) constructors (including allocator_arg_t variants)
    template <class ..._Up, __enable_if_t<
        _And<
            _EnableCtorFromUTypesTuple<tuple<_Up...>&&>
        >::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    explicit(_Not<_Lazy<_And, is_convertible<_Up, _Tp>...> >::value) tuple(tuple<_Up...>&& __t)
        _NOEXCEPT_((_And<is_nothrow_constructible<_Tp, _Up>...>::value))
        : __base_(_VSTD::move(__t))
    { }

    template <class _Alloc, class ..._Up, __enable_if_t<
        _And<
            _EnableCtorFromUTypesTuple<tuple<_Up...>&&>
        >::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    explicit(_Not<_Lazy<_And, is_convertible<_Up, _Tp>...> >::value) tuple(allocator_arg_t, const _Alloc& __a, tuple<_Up...>&& __t)
        : __base_(allocator_arg_t(), __a, _VSTD::move(__t))
    { }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 804 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
    // tuple(const tuple<U...>&&) constructors (including allocator_arg_t variants)

    template <class... _Up, enable_if_t<
        _EnableCtorFromUTypesTuple<const tuple<_Up...>&&>::value>* = nullptr>
    _LIBCPP_HIDE_FROM_ABI constexpr
        explicit(!_Lazy<_And, is_convertible<const _Up&&, _Tp>...>::value)
    tuple(const tuple<_Up...>&& __t) : __base_(std::move(__t)) {}

    template <class _Alloc, class... _Up, enable_if_t<
        _EnableCtorFromUTypesTuple<const tuple<_Up...>&&>::value>* = nullptr>
    _LIBCPP_HIDE_FROM_ABI constexpr
        explicit(!_Lazy<_And, is_convertible<const _Up&&, _Tp>...>::value)
    tuple(allocator_arg_t, const _Alloc& __alloc, const tuple<_Up...>&& __t)
        : __base_(allocator_arg_t(), __alloc, std::move(__t)) {}
#endif // _LIBCPP_STD_VER >= 23
# 819 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

    // tuple(const pair<U1, U2>&) constructors (including allocator_arg_t variants)

    template <template <class...> class _Pred, class _Pair, class _DecayedPair = __remove_cvref_t<_Pair>, class _Tuple = tuple>
    struct _CtorPredicateFromPair : false_type{};

    template <template <class...> class _Pred, class _Pair, class _Up1, class _Up2, class _Tp1, class _Tp2>
    struct _CtorPredicateFromPair<_Pred, _Pair, pair<_Up1, _Up2>, tuple<_Tp1, _Tp2> > : _And<
        _Pred<_Tp1, __copy_cvref_t<_Pair, _Up1> >,
        _Pred<_Tp2, __copy_cvref_t<_Pair, _Up2> >
    > {};

    template <class _Pair>
    struct _EnableCtorFromPair : _CtorPredicateFromPair<is_constructible, _Pair>{};

    template <class _Pair>
    struct _NothrowConstructibleFromPair : _CtorPredicateFromPair<is_nothrow_constructible, _Pair>{};

    template <class _Pair, class _DecayedPair = __remove_cvref_t<_Pair>, class _Tuple = tuple>
    struct _BothImplicitlyConvertible : false_type{};

    template <class _Pair, class _Up1, class _Up2, class _Tp1, class _Tp2>
    struct _BothImplicitlyConvertible<_Pair, pair<_Up1, _Up2>, tuple<_Tp1, _Tp2> > : _And<
        is_convertible<__copy_cvref_t<_Pair, _Up1>, _Tp1>,
        is_convertible<__copy_cvref_t<_Pair, _Up2>, _Tp2>
    > {};

    template <class _Up1, class _Up2, template<class...> class _And = _And, __enable_if_t<
        _And<
            _EnableCtorFromPair<const pair<_Up1, _Up2>&>
        >::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    explicit(_Not<_BothImplicitlyConvertible<const pair<_Up1, _Up2>&> >::value) tuple(const pair<_Up1, _Up2>& __p)
        _NOEXCEPT_((_NothrowConstructibleFromPair<const pair<_Up1, _Up2>&>::value))
        : __base_(__p)
    { }

    template <class _Alloc, class _Up1, class _Up2, template<class...> class _And = _And, __enable_if_t<
        _And<
            _EnableCtorFromPair<const pair<_Up1, _Up2>&>
        >::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    explicit(_Not<_BothImplicitlyConvertible<const pair<_Up1, _Up2>&> >::value) tuple(allocator_arg_t, const _Alloc& __a, const pair<_Up1, _Up2>& __p)
        : __base_(allocator_arg_t(), __a, __p)
    { }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 868 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
    // tuple(pair<U1, U2>&) constructors (including allocator_arg_t variants)

    template <class _U1, class _U2, enable_if_t<
        _EnableCtorFromPair<pair<_U1, _U2>&>::value>* = nullptr>
    _LIBCPP_HIDE_FROM_ABI constexpr
        explicit(!_BothImplicitlyConvertible<pair<_U1, _U2>&>::value)
    tuple(pair<_U1, _U2>& __p) : __base_(__p) {}

    template <class _Alloc, class _U1, class _U2, enable_if_t<
        _EnableCtorFromPair<std::pair<_U1, _U2>&>::value>* = nullptr>
    _LIBCPP_HIDE_FROM_ABI constexpr
        explicit(!_BothImplicitlyConvertible<pair<_U1, _U2>&>::value)
    tuple(allocator_arg_t, const _Alloc& __alloc, pair<_U1, _U2>& __p) : __base_(allocator_arg_t(), __alloc, __p) {}
#endif
# 882 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

    // tuple(pair<U1, U2>&&) constructors (including allocator_arg_t variants)

    template <class _Up1, class _Up2, template<class...> class _And = _And, __enable_if_t<
        _And<
            _EnableCtorFromPair<pair<_Up1, _Up2>&&>
        >::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    explicit(_Not<_BothImplicitlyConvertible<pair<_Up1, _Up2>&&> >::value) tuple(pair<_Up1, _Up2>&& __p)
        _NOEXCEPT_((_NothrowConstructibleFromPair<pair<_Up1, _Up2>&&>::value))
        : __base_(_VSTD::move(__p))
    { }

    template <class _Alloc, class _Up1, class _Up2, template<class...> class _And = _And, __enable_if_t<
        _And<
            _EnableCtorFromPair<pair<_Up1, _Up2>&&>
        >::value
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    explicit(_Not<_BothImplicitlyConvertible<pair<_Up1, _Up2>&&> >::value) tuple(allocator_arg_t, const _Alloc& __a, pair<_Up1, _Up2>&& __p)
        : __base_(allocator_arg_t(), __a, _VSTD::move(__p))
    { }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 907 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
    // tuple(const pair<U1, U2>&&) constructors (including allocator_arg_t variants)

    template <class _U1, class _U2, enable_if_t<
        _EnableCtorFromPair<const pair<_U1, _U2>&&>::value>* = nullptr>
    _LIBCPP_HIDE_FROM_ABI constexpr
        explicit(!_BothImplicitlyConvertible<const pair<_U1, _U2>&&>::value)
    tuple(const pair<_U1, _U2>&& __p) : __base_(std::move(__p)) {}

    template <class _Alloc, class _U1, class _U2, enable_if_t<
        _EnableCtorFromPair<const pair<_U1, _U2>&&>::value>* = nullptr>
    _LIBCPP_HIDE_FROM_ABI constexpr
        explicit(!_BothImplicitlyConvertible<const pair<_U1, _U2>&&>::value)
    tuple(allocator_arg_t, const _Alloc& __alloc, const pair<_U1, _U2>&& __p)
        : __base_(allocator_arg_t(), __alloc, std::move(__p)) {}
#endif // _LIBCPP_STD_VER >= 23
# 922 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

_LIBCPP_DIAGNOSTIC_POP

    // [tuple.assign]
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    tuple& operator=(_If<_And<is_copy_assignable<_Tp>...>::value, tuple, __nat> const& __tuple)
        _NOEXCEPT_((_And<is_nothrow_copy_assignable<_Tp>...>::value))
    {
        _VSTD::__memberwise_copy_assign(*this, __tuple,
            typename __make_tuple_indices<sizeof...(_Tp)>::type());
        return *this;
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 936 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
    _LIBCPP_HIDE_FROM_ABI constexpr
    const tuple& operator=(tuple const& __tuple) const
      requires (_And<is_copy_assignable<const _Tp>...>::value) {
        std::__memberwise_copy_assign(*this, __tuple, typename __make_tuple_indices<sizeof...(_Tp)>::type());
        return *this;
    }

    _LIBCPP_HIDE_FROM_ABI constexpr
    const tuple& operator=(tuple&& __tuple) const
      requires (_And<is_assignable<const _Tp&, _Tp>...>::value) {
        std::__memberwise_forward_assign(*this,
                                         std::move(__tuple),
                                         __tuple_types<_Tp...>(),
                                         typename __make_tuple_indices<sizeof...(_Tp)>::type());
        return *this;
    }
#endif // _LIBCPP_STD_VER >= 23
# 953 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    tuple& operator=(_If<_And<is_move_assignable<_Tp>...>::value, tuple, __nat>&& __tuple)
        _NOEXCEPT_((_And<is_nothrow_move_assignable<_Tp>...>::value))
    {
        _VSTD::__memberwise_forward_assign(*this, _VSTD::move(__tuple),
            __tuple_types<_Tp...>(),
            typename __make_tuple_indices<sizeof...(_Tp)>::type());
        return *this;
    }

    template<class... _Up, __enable_if_t<
        _And<
            _BoolConstant<sizeof...(_Tp) == sizeof...(_Up)>,
            is_assignable<_Tp&, _Up const&>...
        >::value
    ,int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    tuple& operator=(tuple<_Up...> const& __tuple)
        _NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up const&>...>::value))
    {
        _VSTD::__memberwise_copy_assign(*this, __tuple,
            typename __make_tuple_indices<sizeof...(_Tp)>::type());
        return *this;
    }

    template<class... _Up, __enable_if_t<
        _And<
            _BoolConstant<sizeof...(_Tp) == sizeof...(_Up)>,
            is_assignable<_Tp&, _Up>...
        >::value
    ,int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    tuple& operator=(tuple<_Up...>&& __tuple)
        _NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up>...>::value))
    {
        _VSTD::__memberwise_forward_assign(*this, _VSTD::move(__tuple),
            __tuple_types<_Up...>(),
            typename __make_tuple_indices<sizeof...(_Tp)>::type());
        return *this;
    }


#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 997 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
    template <class... _UTypes, enable_if_t<
        _And<_BoolConstant<sizeof...(_Tp) == sizeof...(_UTypes)>,
             is_assignable<const _Tp&, const _UTypes&>...>::value>* = nullptr>
    _LIBCPP_HIDE_FROM_ABI constexpr
    const tuple& operator=(const tuple<_UTypes...>& __u) const {
        std::__memberwise_copy_assign(*this,
                                      __u,
                                      typename __make_tuple_indices<sizeof...(_Tp)>::type());
        return *this;
    }

    template <class... _UTypes, enable_if_t<
        _And<_BoolConstant<sizeof...(_Tp) == sizeof...(_UTypes)>,
             is_assignable<const _Tp&, _UTypes>...>::value>* = nullptr>
    _LIBCPP_HIDE_FROM_ABI constexpr
    const tuple& operator=(tuple<_UTypes...>&& __u) const {
        std::__memberwise_forward_assign(*this,
                                         __u,
                                         __tuple_types<_UTypes...>(),
                                         typename __make_tuple_indices<sizeof...(_Tp)>::type());
        return *this;
    }
#endif // _LIBCPP_STD_VER >= 23
# 1020 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

    template <template<class...> class _Pred, bool _Const,
              class _Pair, class _DecayedPair = __remove_cvref_t<_Pair>, class _Tuple = tuple>
    struct _AssignPredicateFromPair : false_type {};

    template <template<class...> class _Pred, bool _Const,
              class _Pair, class _Up1, class _Up2, class _Tp1, class _Tp2>
    struct _AssignPredicateFromPair<_Pred, _Const, _Pair, pair<_Up1, _Up2>, tuple<_Tp1, _Tp2> > :
        _And<_Pred<__maybe_const<_Const, _Tp1>&, __copy_cvref_t<_Pair, _Up1> >,
             _Pred<__maybe_const<_Const, _Tp2>&, __copy_cvref_t<_Pair, _Up2> >
            > {};

    template <bool _Const, class _Pair>
    struct _EnableAssignFromPair : _AssignPredicateFromPair<is_assignable, _Const, _Pair> {};

    template <bool _Const, class _Pair>
    struct _NothrowAssignFromPair : _AssignPredicateFromPair<is_nothrow_assignable, _Const, _Pair> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1039 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
    template <class _U1, class _U2, enable_if_t<
        _EnableAssignFromPair<true, const pair<_U1, _U2>&>::value>* = nullptr>
    _LIBCPP_HIDE_FROM_ABI constexpr
    const tuple& operator=(const pair<_U1, _U2>& __pair) const
      noexcept(_NothrowAssignFromPair<true, const pair<_U1, _U2>&>::value) {
        std::get<0>(*this) = __pair.first;
        std::get<1>(*this) = __pair.second;
        return *this;
    }

    template <class _U1, class _U2, enable_if_t<
        _EnableAssignFromPair<true, pair<_U1, _U2>&&>::value>* = nullptr>
    _LIBCPP_HIDE_FROM_ABI constexpr
    const tuple& operator=(pair<_U1, _U2>&& __pair) const
      noexcept(_NothrowAssignFromPair<true, pair<_U1, _U2>&&>::value) {
        std::get<0>(*this) = std::move(__pair.first);
        std::get<1>(*this) = std::move(__pair.second);
        return *this;
    }
#endif // _LIBCPP_STD_VER >= 23
# 1059 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

    template<class _Up1, class _Up2, __enable_if_t<
        _EnableAssignFromPair<false, pair<_Up1, _Up2> const&>::value
    ,int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    tuple& operator=(pair<_Up1, _Up2> const& __pair)
        _NOEXCEPT_((_NothrowAssignFromPair<false, pair<_Up1, _Up2> const&>::value))
    {
        _VSTD::get<0>(*this) = __pair.first;
        _VSTD::get<1>(*this) = __pair.second;
        return *this;
    }

    template<class _Up1, class _Up2, __enable_if_t<
        _EnableAssignFromPair<false, pair<_Up1, _Up2>&&>::value
    ,int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    tuple& operator=(pair<_Up1, _Up2>&& __pair)
        _NOEXCEPT_((_NothrowAssignFromPair<false, pair<_Up1, _Up2>&&>::value))
    {
        _VSTD::get<0>(*this) = _VSTD::forward<_Up1>(__pair.first);
        _VSTD::get<1>(*this) = _VSTD::forward<_Up2>(__pair.second);
        return *this;
    }

    // EXTENSION
    template<class _Up, size_t _Np, class = __enable_if_t<
        _And<
            _BoolConstant<_Np == sizeof...(_Tp)>,
            is_assignable<_Tp&, _Up const&>...
        >::value
    > >
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    tuple& operator=(array<_Up, _Np> const& __array)
        _NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up const&>...>::value))
    {
        _VSTD::__memberwise_copy_assign(*this, __array,
            typename __make_tuple_indices<sizeof...(_Tp)>::type());
        return *this;
    }

    // EXTENSION
    template<class _Up, size_t _Np, class = void, class = __enable_if_t<
        _And<
            _BoolConstant<_Np == sizeof...(_Tp)>,
            is_assignable<_Tp&, _Up>...
        >::value
    > >
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    tuple& operator=(array<_Up, _Np>&& __array)
        _NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up>...>::value))
    {
        _VSTD::__memberwise_forward_assign(*this, _VSTD::move(__array),
            __tuple_types<_If<true, _Up, _Tp>...>(),
            typename __make_tuple_indices<sizeof...(_Tp)>::type());
        return *this;
    }

    // [tuple.swap]
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    void swap(tuple& __t) _NOEXCEPT_(__all<__is_nothrow_swappable<_Tp>::value...>::value)
        {__base_.swap(__t.__base_);}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1123 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
    _LIBCPP_HIDE_FROM_ABI constexpr
    void swap(const tuple& __t) const noexcept(__all<is_nothrow_swappable_v<const _Tp&>...>::value) {
        __base_.swap(__t.__base_);
    }
#endif // _LIBCPP_STD_VER >= 23
# 1128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
};

template <>
class _LIBCPP_TEMPLATE_VIS tuple<>
{
public:
    constexpr tuple() _NOEXCEPT = default;
    template <class _Alloc>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
        tuple(allocator_arg_t, const _Alloc&) _NOEXCEPT {}
    template <class _Alloc>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
        tuple(allocator_arg_t, const _Alloc&, const tuple&) _NOEXCEPT {}
    template <class _Up>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
        tuple(array<_Up, 0>) _NOEXCEPT {}
    template <class _Alloc, class _Up>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
        tuple(allocator_arg_t, const _Alloc&, array<_Up, 0>) _NOEXCEPT {}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    void swap(tuple&) _NOEXCEPT {}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1150 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
    _LIBCPP_HIDE_FROM_ABI constexpr void swap(const tuple&) const noexcept {}
#endif
# 1152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1155 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
template <class... _TTypes, class... _UTypes, template<class> class _TQual, template<class> class _UQual>
    requires requires { typename tuple<common_reference_t<_TQual<_TTypes>, _UQual<_UTypes>>...>; }
struct basic_common_reference<tuple<_TTypes...>, tuple<_UTypes...>, _TQual, _UQual> {
    using type = tuple<common_reference_t<_TQual<_TTypes>, _UQual<_UTypes>>...>;
};

template <class... _TTypes, class... _UTypes>
    requires requires { typename tuple<common_type_t<_TTypes, _UTypes>...>; }
struct common_type<tuple<_TTypes...>, tuple<_UTypes...>> {
    using type = tuple<common_type_t<_TTypes, _UTypes>...>;
};
#endif // _LIBCPP_STD_VER >= 23
# 1167 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1169 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
template <class ..._Tp>
tuple(_Tp...) -> tuple<_Tp...>;
template <class _Tp1, class _Tp2>
tuple(pair<_Tp1, _Tp2>) -> tuple<_Tp1, _Tp2>;
template <class _Alloc, class ..._Tp>
tuple(allocator_arg_t, _Alloc, _Tp...) -> tuple<_Tp...>;
template <class _Alloc, class _Tp1, class _Tp2>
tuple(allocator_arg_t, _Alloc, pair<_Tp1, _Tp2>) -> tuple<_Tp1, _Tp2>;
template <class _Alloc, class ..._Tp>
tuple(allocator_arg_t, _Alloc, tuple<_Tp...>) -> tuple<_Tp...>;
#endif
# 1180 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

template <class ..._Tp, __enable_if_t<__all<__is_swappable<_Tp>::value...>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
swap(tuple<_Tp...>& __t, tuple<_Tp...>& __u)
                 _NOEXCEPT_(__all<__is_nothrow_swappable<_Tp>::value...>::value)
    {__t.swap(__u);}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1189 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
template <class... _Tp>
_LIBCPP_HIDE_FROM_ABI constexpr
enable_if_t<__all<is_swappable_v<const _Tp>...>::value, void>
swap(const tuple<_Tp...>& __lhs, const tuple<_Tp...>& __rhs)
        noexcept(__all<is_nothrow_swappable_v<const _Tp>...>::value) {
    __lhs.swap(__rhs);
}
#endif
# 1197 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

// get

template <size_t _Ip, class ..._Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Ip, tuple<_Tp...> >::type&
get(tuple<_Tp...>& __t) _NOEXCEPT
{
    typedef _LIBCPP_NODEBUG typename tuple_element<_Ip, tuple<_Tp...> >::type type;
    return static_cast<__tuple_leaf<_Ip, type>&>(__t.__base_).get();
}

template <size_t _Ip, class ..._Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element<_Ip, tuple<_Tp...> >::type&
get(const tuple<_Tp...>& __t) _NOEXCEPT
{
    typedef _LIBCPP_NODEBUG typename tuple_element<_Ip, tuple<_Tp...> >::type type;
    return static_cast<const __tuple_leaf<_Ip, type>&>(__t.__base_).get();
}

template <size_t _Ip, class ..._Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename tuple_element<_Ip, tuple<_Tp...> >::type&&
get(tuple<_Tp...>&& __t) _NOEXCEPT
{
    typedef _LIBCPP_NODEBUG typename tuple_element<_Ip, tuple<_Tp...> >::type type;
    return static_cast<type&&>(
             static_cast<__tuple_leaf<_Ip, type>&&>(__t.__base_).get());
}

template <size_t _Ip, class ..._Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
get(const tuple<_Tp...>&& __t) _NOEXCEPT
{
    typedef _LIBCPP_NODEBUG typename tuple_element<_Ip, tuple<_Tp...> >::type type;
    return static_cast<const type&&>(
             static_cast<const __tuple_leaf<_Ip, type>&&>(__t.__base_).get());
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1239 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

namespace __find_detail {

static constexpr size_t __not_found = static_cast<size_t>(-1);
static constexpr size_t __ambiguous = __not_found - 1;

inline _LIBCPP_INLINE_VISIBILITY
constexpr size_t __find_idx_return(size_t __curr_i, size_t __res, bool __matches) {
    return !__matches ? __res :
        (__res == __not_found ? __curr_i : __ambiguous);
}

template <size_t _Nx>
inline _LIBCPP_INLINE_VISIBILITY
constexpr size_t __find_idx(size_t __i, const bool (&__matches)[_Nx]) {
  return __i == _Nx ? __not_found :
      __find_detail::__find_idx_return(__i, __find_detail::__find_idx(__i + 1, __matches), __matches[__i]);
}

template <class _T1, class ..._Args>
struct __find_exactly_one_checked {
    static constexpr bool __matches[sizeof...(_Args)] = {is_same<_T1, _Args>::value...};
    static constexpr size_t value = __find_detail::__find_idx(0, __matches);
    static_assert(value != __not_found, "type not found in type list" );
    static_assert(value != __ambiguous, "type occurs more than once in type list");
};

template <class _T1>
struct __find_exactly_one_checked<_T1> {
    static_assert(!is_same<_T1, _T1>::value, "type not in empty type list");
};

} // namespace __find_detail

template <typename _T1, typename... _Args>
struct __find_exactly_one_t
    : public __find_detail::__find_exactly_one_checked<_T1, _Args...> {
};

template <class _T1, class... _Args>
inline _LIBCPP_INLINE_VISIBILITY
constexpr _T1& get(tuple<_Args...>& __tup) noexcept
{
    return _VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(__tup);
}

template <class _T1, class... _Args>
inline _LIBCPP_INLINE_VISIBILITY
constexpr _T1 const& get(tuple<_Args...> const& __tup) noexcept
{
    return _VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(__tup);
}

template <class _T1, class... _Args>
inline _LIBCPP_INLINE_VISIBILITY
constexpr _T1&& get(tuple<_Args...>&& __tup) noexcept
{
    return _VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(_VSTD::move(__tup));
}

template <class _T1, class... _Args>
inline _LIBCPP_INLINE_VISIBILITY
constexpr _T1 const&& get(tuple<_Args...> const&& __tup) noexcept
{
    return _VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(_VSTD::move(__tup));
}

#endif
# 1307 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

// tie

template <class ..._Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
tuple<_Tp&...>
tie(_Tp&... __t) _NOEXCEPT
{
    return tuple<_Tp&...>(__t...);
}

template <class _Up>
struct __ignore_t
{
    template <class _Tp>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    const __ignore_t& operator=(_Tp&&) const {return *this;}
};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1327 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
inline constexpr __ignore_t<unsigned char> ignore = __ignore_t<unsigned char>();
#  else
# 1329 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
namespace {
  constexpr __ignore_t<unsigned char> ignore = __ignore_t<unsigned char>();
} // namespace
#  endif
# 1333 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

template <class... _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
tuple<typename __unwrap_ref_decay<_Tp>::type...>
make_tuple(_Tp&&... __t)
{
    return tuple<typename __unwrap_ref_decay<_Tp>::type...>(_VSTD::forward<_Tp>(__t)...);
}

template <class... _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
tuple<_Tp&&...>
forward_as_tuple(_Tp&&... __t) _NOEXCEPT
{
    return tuple<_Tp&&...>(_VSTD::forward<_Tp>(__t)...);
}

template <size_t _Ip>
struct __tuple_equal
{
    template <class _Tp, class _Up>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    bool operator()(const _Tp& __x, const _Up& __y)
    {
        return __tuple_equal<_Ip - 1>()(__x, __y) && _VSTD::get<_Ip-1>(__x) == _VSTD::get<_Ip-1>(__y);
    }
};

template <>
struct __tuple_equal<0>
{
    template <class _Tp, class _Up>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    bool operator()(const _Tp&, const _Up&)
    {
        return true;
    }
};

template <class ..._Tp, class ..._Up>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator==(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
    static_assert (sizeof...(_Tp) == sizeof...(_Up), "Can't compare tuples of different sizes");
    return __tuple_equal<sizeof...(_Tp)>()(__x, __y);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1382 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

// operator<=>

template <class ..._Tp, class ..._Up, size_t ..._Is>
_LIBCPP_HIDE_FROM_ABI constexpr
auto
__tuple_compare_three_way(const tuple<_Tp...>& __x, const tuple<_Up...>& __y, index_sequence<_Is...>) {
    common_comparison_category_t<__synth_three_way_result<_Tp, _Up>...> __result = strong_ordering::equal;
    static_cast<void>(((__result = _VSTD::__synth_three_way(_VSTD::get<_Is>(__x), _VSTD::get<_Is>(__y)), __result != 0) || ...));
    return __result;
}

template <class ..._Tp, class ..._Up>
requires (sizeof...(_Tp) == sizeof...(_Up))
_LIBCPP_HIDE_FROM_ABI constexpr
common_comparison_category_t<__synth_three_way_result<_Tp, _Up>...>
operator<=>(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
    return _VSTD::__tuple_compare_three_way(__x, __y, index_sequence_for<_Tp...>{});
}

#else // _LIBCPP_STD_VER >= 20
# 1404 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

template <class ..._Tp, class ..._Up>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator!=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
    return !(__x == __y);
}

template <size_t _Ip>
struct __tuple_less
{
    template <class _Tp, class _Up>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    bool operator()(const _Tp& __x, const _Up& __y)
    {
        const size_t __idx = tuple_size<_Tp>::value - _Ip;
        if (_VSTD::get<__idx>(__x) < _VSTD::get<__idx>(__y))
            return true;
        if (_VSTD::get<__idx>(__y) < _VSTD::get<__idx>(__x))
            return false;
        return __tuple_less<_Ip-1>()(__x, __y);
    }
};

template <>
struct __tuple_less<0>
{
    template <class _Tp, class _Up>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    bool operator()(const _Tp&, const _Up&)
    {
        return false;
    }
};

template <class ..._Tp, class ..._Up>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator<(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
    static_assert (sizeof...(_Tp) == sizeof...(_Up), "Can't compare tuples of different sizes");
    return __tuple_less<sizeof...(_Tp)>()(__x, __y);
}

template <class ..._Tp, class ..._Up>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator>(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
    return __y < __x;
}

template <class ..._Tp, class ..._Up>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator>=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
    return !(__x < __y);
}

template <class ..._Tp, class ..._Up>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator<=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
{
    return !(__y < __x);
}

#endif // _LIBCPP_STD_VER >= 20
# 1474 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

// tuple_cat

template <class _Tp, class _Up> struct __tuple_cat_type;

template <class ..._Ttypes, class ..._Utypes>
struct __tuple_cat_type<tuple<_Ttypes...>, __tuple_types<_Utypes...> >
{
    typedef _LIBCPP_NODEBUG tuple<_Ttypes..., _Utypes...> type;
};

template <class _ResultTuple, bool _Is_Tuple0TupleLike, class ..._Tuples>
struct __tuple_cat_return_1
{
};

template <class ..._Types, class _Tuple0>
struct __tuple_cat_return_1<tuple<_Types...>, true, _Tuple0>
{
  using type _LIBCPP_NODEBUG = typename __tuple_cat_type<
      tuple<_Types...>,
      typename __make_tuple_types<__remove_cvref_t<_Tuple0> >::type
    >::type;
};

template <class ..._Types, class _Tuple0, class _Tuple1, class ..._Tuples>
struct __tuple_cat_return_1<tuple<_Types...>, true, _Tuple0, _Tuple1, _Tuples...>
    : public __tuple_cat_return_1<
                 typename __tuple_cat_type<
                     tuple<_Types...>,
                     typename __make_tuple_types<__remove_cvref_t<_Tuple0> >::type
                 >::type,
                 __tuple_like_ext<__libcpp_remove_reference_t<_Tuple1> >::value,
                 _Tuple1, _Tuples...>
{
};

template <class ..._Tuples> struct __tuple_cat_return;

template <class _Tuple0, class ..._Tuples>
struct __tuple_cat_return<_Tuple0, _Tuples...>
    : public __tuple_cat_return_1<tuple<>,
         __tuple_like_ext<__libcpp_remove_reference_t<_Tuple0> >::value, _Tuple0,
                                                                     _Tuples...>
{
};

template <>
struct __tuple_cat_return<>
{
    typedef _LIBCPP_NODEBUG tuple<> type;
};

inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
tuple<>
tuple_cat()
{
    return tuple<>();
}

template <class _Rp, class _Indices, class _Tuple0, class ..._Tuples>
struct __tuple_cat_return_ref_imp;

template <class ..._Types, size_t ..._I0, class _Tuple0>
struct __tuple_cat_return_ref_imp<tuple<_Types...>, __tuple_indices<_I0...>, _Tuple0>
{
    typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tuple0> _T0;
    typedef tuple<_Types..., __apply_cv_t<_Tuple0, typename tuple_element<_I0, _T0>::type>&&...> type;
};

template <class ..._Types, size_t ..._I0, class _Tuple0, class _Tuple1, class ..._Tuples>
struct __tuple_cat_return_ref_imp<tuple<_Types...>, __tuple_indices<_I0...>,
                                  _Tuple0, _Tuple1, _Tuples...>
    : public __tuple_cat_return_ref_imp<
         tuple<_Types..., __apply_cv_t<_Tuple0,
                                       typename tuple_element<_I0, __libcpp_remove_reference_t<_Tuple0>>::type>&&...>,
         typename __make_tuple_indices<tuple_size<__libcpp_remove_reference_t<_Tuple1> >::value>::type,
         _Tuple1, _Tuples...>
{
};

template <class _Tuple0, class ..._Tuples>
struct __tuple_cat_return_ref
    : public __tuple_cat_return_ref_imp<tuple<>,
               typename __make_tuple_indices<
                        tuple_size<__libcpp_remove_reference_t<_Tuple0> >::value
               >::type, _Tuple0, _Tuples...>
{
};

template <class _Types, class _I0, class _J0>
struct __tuple_cat;

template <class ..._Types, size_t ..._I0, size_t ..._J0>
struct __tuple_cat<tuple<_Types...>, __tuple_indices<_I0...>, __tuple_indices<_J0...> >
{
    template <class _Tuple0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&>::type
    operator()(tuple<_Types...> __t, _Tuple0&& __t0)
    {
        (void)__t; // avoid unused parameter warning on GCC when _I0 is empty
        return _VSTD::forward_as_tuple(
            _VSTD::forward<_Types>(_VSTD::get<_I0>(__t))...,
            _VSTD::get<_J0>(_VSTD::forward<_Tuple0>(__t0))...);
    }

    template <class _Tuple0, class _Tuple1, class ..._Tuples>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&, _Tuple1&&, _Tuples&&...>::type
    operator()(tuple<_Types...> __t, _Tuple0&& __t0, _Tuple1&& __t1, _Tuples&& ...__tpls)
    {
        (void)__t; // avoid unused parameter warning on GCC when _I0 is empty
        typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tuple0> _T0;
        typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tuple1> _T1;
        return __tuple_cat<tuple<_Types..., __apply_cv_t<_Tuple0, typename tuple_element<_J0, _T0>::type>&&...>,
                           typename __make_tuple_indices<sizeof...(_Types) + tuple_size<_T0>::value>::type,
                           typename __make_tuple_indices<tuple_size<_T1>::value>::type>()(
            _VSTD::forward_as_tuple(
                _VSTD::forward<_Types>(_VSTD::get<_I0>(__t))...,
                _VSTD::get<_J0>(_VSTD::forward<_Tuple0>(__t0))...),
            _VSTD::forward<_Tuple1>(__t1), _VSTD::forward<_Tuples>(__tpls)...);
    }
};

template <class _Tuple0, class... _Tuples>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename __tuple_cat_return<_Tuple0, _Tuples...>::type
tuple_cat(_Tuple0&& __t0, _Tuples&&... __tpls)
{
    typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tuple0> _T0;
    return __tuple_cat<tuple<>, __tuple_indices<>,
                  typename __make_tuple_indices<tuple_size<_T0>::value>::type>()
                  (tuple<>(), _VSTD::forward<_Tuple0>(__t0),
                                            _VSTD::forward<_Tuples>(__tpls)...);
}

template <class ..._Tp, class _Alloc>
struct _LIBCPP_TEMPLATE_VIS uses_allocator<tuple<_Tp...>, _Alloc>
    : true_type {};

template <class _T1, class _T2>
template <class... _Args1, class... _Args2, size_t ..._I1, size_t ..._I2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
pair<_T1, _T2>::pair(piecewise_construct_t,
                     tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args,
                     __tuple_indices<_I1...>, __tuple_indices<_I2...>)
    :  first(_VSTD::forward<_Args1>(_VSTD::get<_I1>( __first_args))...),
      second(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...)
{
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1627 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
template <class _Tp>
inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value;

#define _LIBCPP_NOEXCEPT_RETURN(...) noexcept(noexcept(__VA_ARGS__)) { return __VA_ARGS__; }

template <class _Fn, class _Tuple, size_t ..._Id>
inline _LIBCPP_INLINE_VISIBILITY
constexpr decltype(auto) __apply_tuple_impl(_Fn && __f, _Tuple && __t,
                                            __tuple_indices<_Id...>)
_LIBCPP_NOEXCEPT_RETURN(
    _VSTD::__invoke(
        _VSTD::forward<_Fn>(__f),
        _VSTD::get<_Id>(_VSTD::forward<_Tuple>(__t))...)
)

template <class _Fn, class _Tuple>
inline _LIBCPP_INLINE_VISIBILITY
constexpr decltype(auto) apply(_Fn && __f, _Tuple && __t)
_LIBCPP_NOEXCEPT_RETURN(
    _VSTD::__apply_tuple_impl(
        _VSTD::forward<_Fn>(__f), _VSTD::forward<_Tuple>(__t),
        typename __make_tuple_indices<tuple_size_v<remove_reference_t<_Tuple>>>::type{})
)

template <class _Tp, class _Tuple, size_t... _Idx>
inline _LIBCPP_INLINE_VISIBILITY
constexpr _Tp __make_from_tuple_impl(_Tuple&& __t, __tuple_indices<_Idx...>)
_LIBCPP_NOEXCEPT_RETURN(
    _Tp(_VSTD::get<_Idx>(_VSTD::forward<_Tuple>(__t))...)
)

template <class _Tp, class _Tuple>
inline _LIBCPP_INLINE_VISIBILITY
constexpr _Tp make_from_tuple(_Tuple&& __t)
_LIBCPP_NOEXCEPT_RETURN(
    _VSTD::__make_from_tuple_impl<_Tp>(_VSTD::forward<_Tuple>(__t),
        typename __make_tuple_indices<tuple_size_v<remove_reference_t<_Tuple>>>::type{})
)

#undef _LIBCPP_NOEXCEPT_RETURN

#endif // _LIBCPP_STD_VER >= 17
# 1669 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

#endif // !defined(_LIBCPP_CXX03_LANG)
# 1671 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1677 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#  include <exception>
#endif /* expanded by -frewrite-includes */
# 1677 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 1678 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 1678 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 1679 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#  include <new>
#endif /* expanded by -frewrite-includes */
# 1679 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 1680 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 1680 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 1681 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#  include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 1681 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 1682 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#  include <utility>
#endif /* expanded by -frewrite-includes */
# 1682 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
# 1683 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#endif
# 1684 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3

#endif // _LIBCPP_TUPLE
# 1686 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/tuple" 3
#endif /* tuple expanded by -frewrite-includes */
# 247 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 247 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 248 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3

// standard-mandated includes

// [variant.syn]
#if 0 /* expanded by -frewrite-includes */
#include <compare>
#endif /* expanded by -frewrite-includes */
# 252 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 253 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 255 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 256 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#endif
# 257 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 259 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 260 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 2 3

namespace std { // explicitly not using versioning namespace

class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS bad_variant_access : public exception {
public:
   const char* what() const _NOEXCEPT override;
};

} // namespace std

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 273 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3

// Light N-dimensional array of function pointers. Used in place of std::array to avoid
// adding a dependency.
template<class _Tp, size_t _Size>
struct __farray {
  static_assert(_Size > 0, "N-dimensional array should never be empty in std::visit");
  _Tp __buf_[_Size] = {};

  _LIBCPP_INLINE_VISIBILITY constexpr
  const _Tp &operator[](size_t __n) const noexcept {
      return __buf_[__n];
  }
};

_LIBCPP_NORETURN
inline _LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
void __throw_bad_variant_access() {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        throw bad_variant_access();
#else
# 294 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
    _LIBCPP_VERBOSE_ABORT("bad_variant_access was thrown in -fno-exceptions mode");
#endif
# 296 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
}

template <class... _Types>
class _LIBCPP_TEMPLATE_VIS variant;

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS variant_size;

template <class _Tp>
inline constexpr size_t variant_size_v = variant_size<_Tp>::value;

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS variant_size<const _Tp> : variant_size<_Tp> {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS variant_size<volatile _Tp> : variant_size<_Tp> {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS variant_size<const volatile _Tp>
    : variant_size<_Tp> {};

template <class... _Types>
struct _LIBCPP_TEMPLATE_VIS variant_size<variant<_Types...>>
    : integral_constant<size_t, sizeof...(_Types)> {};

template <size_t _Ip, class _Tp>
struct _LIBCPP_TEMPLATE_VIS variant_alternative;

template <size_t _Ip, class _Tp>
using variant_alternative_t = typename variant_alternative<_Ip, _Tp>::type;

template <size_t _Ip, class _Tp>
struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, const _Tp>
    : add_const<variant_alternative_t<_Ip, _Tp>> {};

template <size_t _Ip, class _Tp>
struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, volatile _Tp>
    : add_volatile<variant_alternative_t<_Ip, _Tp>> {};

template <size_t _Ip, class _Tp>
struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, const volatile _Tp>
    : add_cv<variant_alternative_t<_Ip, _Tp>> {};

template <size_t _Ip, class... _Types>
struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, variant<_Types...>> {
  static_assert(_Ip < sizeof...(_Types), "Index out of bounds in std::variant_alternative<>");
  using type = __type_pack_element<_Ip, _Types...>;
};

inline constexpr size_t variant_npos = static_cast<size_t>(-1);

_LIBCPP_HIDE_FROM_ABI constexpr int __choose_index_type(unsigned int __num_elem) {
  if (__num_elem < numeric_limits<unsigned char>::max())
    return 0;
  if (__num_elem < numeric_limits<unsigned short>::max())
    return 1;
  return 2;
}

template <size_t _NumAlts>
using __variant_index_t =
#ifndef _LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION
  unsigned int;
#else
# 360 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
  std::tuple_element_t<
      __choose_index_type(_NumAlts),
      std::tuple<unsigned char, unsigned short, unsigned int>
  >;
#endif
# 365 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3

template <class _IndexType>
constexpr _IndexType __variant_npos = static_cast<_IndexType>(-1);

template <class... _Types>
class _LIBCPP_TEMPLATE_VIS variant;

template <class... _Types>
_LIBCPP_INLINE_VISIBILITY constexpr variant<_Types...>&
__as_variant(variant<_Types...>& __vs) noexcept {
  return __vs;
}

template <class... _Types>
_LIBCPP_INLINE_VISIBILITY constexpr const variant<_Types...>&
__as_variant(const variant<_Types...>& __vs) noexcept {
  return __vs;
}

template <class... _Types>
_LIBCPP_INLINE_VISIBILITY constexpr variant<_Types...>&&
__as_variant(variant<_Types...>&& __vs) noexcept {
  return _VSTD::move(__vs);
}

template <class... _Types>
_LIBCPP_INLINE_VISIBILITY constexpr const variant<_Types...>&&
__as_variant(const variant<_Types...>&& __vs) noexcept {
  return _VSTD::move(__vs);
}

namespace __find_detail {

template <class _Tp, class... _Types>
_LIBCPP_HIDE_FROM_ABI
constexpr size_t __find_index() {
  constexpr bool __matches[] = {is_same_v<_Tp, _Types>...};
  size_t __result = __not_found;
  for (size_t __i = 0; __i < sizeof...(_Types); ++__i) {
    if (__matches[__i]) {
      if (__result != __not_found) {
        return __ambiguous;
      }
      __result = __i;
    }
  }
  return __result;
}

template <size_t _Index>
struct __find_unambiguous_index_sfinae_impl
    : integral_constant<size_t, _Index> {};

template <>
struct __find_unambiguous_index_sfinae_impl<__not_found> {};

template <>
struct __find_unambiguous_index_sfinae_impl<__ambiguous> {};

template <class _Tp, class... _Types>
struct __find_unambiguous_index_sfinae
    : __find_unambiguous_index_sfinae_impl<__find_index<_Tp, _Types...>()> {};

} // namespace __find_detail

namespace __variant_detail {

struct __valueless_t {};

enum class _Trait { _TriviallyAvailable, _Available, _Unavailable };

template <typename _Tp,
          template <typename> class _IsTriviallyAvailable,
          template <typename> class _IsAvailable>
constexpr _Trait __trait =
    _IsTriviallyAvailable<_Tp>::value
        ? _Trait::_TriviallyAvailable
        : _IsAvailable<_Tp>::value ? _Trait::_Available : _Trait::_Unavailable;

_LIBCPP_HIDE_FROM_ABI
constexpr _Trait __common_trait(initializer_list<_Trait> __traits) {
  _Trait __result = _Trait::_TriviallyAvailable;
  for (_Trait __t : __traits) {
    if (static_cast<int>(__t) > static_cast<int>(__result)) {
      __result = __t;
    }
  }
  return __result;
}

template <typename... _Types>
struct __traits {
  static constexpr _Trait __copy_constructible_trait =
      __variant_detail::__common_trait({__trait<_Types,
                              is_trivially_copy_constructible,
                              is_copy_constructible>...});

  static constexpr _Trait __move_constructible_trait =
      __variant_detail::__common_trait({__trait<_Types,
                              is_trivially_move_constructible,
                              is_move_constructible>...});

  static constexpr _Trait __copy_assignable_trait = __variant_detail::__common_trait(
      {__copy_constructible_trait,
       __trait<_Types, is_trivially_copy_assignable, is_copy_assignable>...});

  static constexpr _Trait __move_assignable_trait = __variant_detail::__common_trait(
      {__move_constructible_trait,
       __trait<_Types, is_trivially_move_assignable, is_move_assignable>...});

  static constexpr _Trait __destructible_trait = __variant_detail::__common_trait(
      {__trait<_Types, is_trivially_destructible, is_destructible>...});
};

namespace __access {

struct __union {
  template <class _Vp>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto&& __get_alt(_Vp&& __v, in_place_index_t<0>) {
    return _VSTD::forward<_Vp>(__v).__head;
  }

  template <class _Vp, size_t _Ip>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto&& __get_alt(_Vp&& __v, in_place_index_t<_Ip>) {
    return __get_alt(_VSTD::forward<_Vp>(__v).__tail, in_place_index<_Ip - 1>);
  }
};

struct __base {
  template <size_t _Ip, class _Vp>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto&& __get_alt(_Vp&& __v) {
    return __union::__get_alt(_VSTD::forward<_Vp>(__v).__data,
                              in_place_index<_Ip>);
  }
};

struct __variant {
  template <size_t _Ip, class _Vp>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto&& __get_alt(_Vp&& __v) {
    return __base::__get_alt<_Ip>(_VSTD::forward<_Vp>(__v).__impl_);
  }
};

} // namespace __access

namespace __visitation {

struct __base {
  template <class _Visitor, class... _Vs>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr decltype(auto)
  __visit_alt_at(size_t __index, _Visitor&& __visitor, _Vs&&... __vs) {
    constexpr auto __fdiagonal =
        __make_fdiagonal<_Visitor&&,
                         decltype(_VSTD::forward<_Vs>(__vs).__as_base())...>();
    return __fdiagonal[__index](_VSTD::forward<_Visitor>(__visitor),
                                _VSTD::forward<_Vs>(__vs).__as_base()...);
  }

  template <class _Visitor, class... _Vs>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr decltype(auto) __visit_alt(_Visitor&& __visitor,
                                              _Vs&&... __vs) {
    constexpr auto __fmatrix =
        __make_fmatrix<_Visitor&&,
                       decltype(_VSTD::forward<_Vs>(__vs).__as_base())...>();
    return __at(__fmatrix, __vs.index()...)(
        _VSTD::forward<_Visitor>(__visitor),
        _VSTD::forward<_Vs>(__vs).__as_base()...);
  }

private:
  template <class _Tp>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr const _Tp& __at(const _Tp& __elem) { return __elem; }

  template <class _Tp, size_t _Np, typename... _Indices>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto&& __at(const __farray<_Tp, _Np>& __elems,
                               size_t __index, _Indices... __indices) {
    return __at(__elems[__index], __indices...);
  }

  template <class _Fp, class... _Fs>
  static _LIBCPP_HIDE_FROM_ABI constexpr void __std_visit_visitor_return_type_check() {
    static_assert(
        __all<is_same_v<_Fp, _Fs>...>::value,
        "`std::visit` requires the visitor to have a single return type.");
  }

  template <class... _Fs>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto __make_farray(_Fs&&... __fs) {
    __std_visit_visitor_return_type_check<__remove_cvref_t<_Fs>...>();
    using __result = __farray<common_type_t<__remove_cvref_t<_Fs>...>, sizeof...(_Fs)>;
    return __result{{_VSTD::forward<_Fs>(__fs)...}};
  }

  template <size_t... _Is>
  struct __dispatcher {
    template <class _Fp, class... _Vs>
    _LIBCPP_HIDE_FROM_ABI
    static constexpr decltype(auto) __dispatch(_Fp __f, _Vs... __vs) {
        return _VSTD::__invoke(
            static_cast<_Fp>(__f),
            __access::__base::__get_alt<_Is>(static_cast<_Vs>(__vs))...);
    }
  };

  template <class _Fp, class... _Vs, size_t... _Is>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto __make_dispatch(index_sequence<_Is...>) {
    return __dispatcher<_Is...>::template __dispatch<_Fp, _Vs...>;
  }

  template <size_t _Ip, class _Fp, class... _Vs>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto __make_fdiagonal_impl() {
    return __make_dispatch<_Fp, _Vs...>(
        index_sequence<((void)__type_identity<_Vs>{}, _Ip)...>{});
  }

  template <class _Fp, class... _Vs, size_t... _Is>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto __make_fdiagonal_impl(index_sequence<_Is...>) {
    return __base::__make_farray(__make_fdiagonal_impl<_Is, _Fp, _Vs...>()...);
  }

  template <class _Fp, class _Vp, class... _Vs>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto __make_fdiagonal() {
    constexpr size_t __np = __remove_cvref_t<_Vp>::__size();
    static_assert(__all<(__np == __remove_cvref_t<_Vs>::__size())...>::value);
    return __make_fdiagonal_impl<_Fp, _Vp, _Vs...>(make_index_sequence<__np>{});
  }

  template <class _Fp, class... _Vs, size_t... _Is>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto __make_fmatrix_impl(index_sequence<_Is...> __is) {
    return __make_dispatch<_Fp, _Vs...>(__is);
  }

  template <class _Fp, class... _Vs, size_t... _Is, size_t... _Js, class... _Ls>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto __make_fmatrix_impl(index_sequence<_Is...>,
                                            index_sequence<_Js...>,
                                            _Ls... __ls) {
    return __base::__make_farray(__make_fmatrix_impl<_Fp, _Vs...>(
        index_sequence<_Is..., _Js>{}, __ls...)...);
  }

  template <class _Fp, class... _Vs>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto __make_fmatrix() {
    return __make_fmatrix_impl<_Fp, _Vs...>(
        index_sequence<>{}, make_index_sequence<__remove_cvref_t<_Vs>::__size()>{}...);
  }
};

struct __variant {
  template <class _Visitor, class... _Vs>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr decltype(auto)
  __visit_alt_at(size_t __index, _Visitor&& __visitor, _Vs&&... __vs) {
    return __base::__visit_alt_at(__index,
                                  _VSTD::forward<_Visitor>(__visitor),
                                  _VSTD::forward<_Vs>(__vs).__impl_...);
  }

  template <class _Visitor, class... _Vs>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr decltype(auto) __visit_alt(_Visitor&& __visitor,
                                              _Vs&&... __vs) {
    return __base::__visit_alt(
        _VSTD::forward<_Visitor>(__visitor),
        _VSTD::__as_variant(_VSTD::forward<_Vs>(__vs)).__impl_...);
  }

  template <class _Visitor, class... _Vs>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr decltype(auto)
  __visit_value_at(size_t __index, _Visitor&& __visitor, _Vs&&... __vs) {
    return __visit_alt_at(
        __index,
        __make_value_visitor(_VSTD::forward<_Visitor>(__visitor)),
        _VSTD::forward<_Vs>(__vs)...);
  }

  template <class _Visitor, class... _Vs>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr decltype(auto) __visit_value(_Visitor&& __visitor,
                                                _Vs&&... __vs) {
    return __visit_alt(
        __make_value_visitor(_VSTD::forward<_Visitor>(__visitor)),
        _VSTD::forward<_Vs>(__vs)...);
  }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 667 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
  template <class _Rp, class _Visitor, class... _Vs>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr _Rp __visit_value(_Visitor&& __visitor,
                                     _Vs&&... __vs) {
    return __visit_alt(
        __make_value_visitor<_Rp>(_VSTD::forward<_Visitor>(__visitor)),
        _VSTD::forward<_Vs>(__vs)...);
  }
#endif
# 676 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3

private:
  template <class _Visitor, class... _Values>
  static _LIBCPP_HIDE_FROM_ABI constexpr void __std_visit_exhaustive_visitor_check() {
    static_assert(is_invocable_v<_Visitor, _Values...>,
                  "`std::visit` requires the visitor to be exhaustive.");
  }

  template <class _Visitor>
  struct __value_visitor {
    template <class... _Alts>
    _LIBCPP_HIDE_FROM_ABI
    constexpr decltype(auto) operator()(_Alts&&... __alts) const {
      __std_visit_exhaustive_visitor_check<
          _Visitor,
          decltype((_VSTD::forward<_Alts>(__alts).__value))...>();
      return _VSTD::__invoke(_VSTD::forward<_Visitor>(__visitor),
                             _VSTD::forward<_Alts>(__alts).__value...);
    }
    _Visitor&& __visitor;
  };

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 699 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
  template <class _Rp, class _Visitor>
  struct __value_visitor_return_type {
    template <class... _Alts>
    _LIBCPP_HIDE_FROM_ABI
    constexpr _Rp operator()(_Alts&&... __alts) const {
      __std_visit_exhaustive_visitor_check<
          _Visitor,
          decltype((_VSTD::forward<_Alts>(__alts).__value))...>();
      if constexpr (is_void_v<_Rp>) {
        _VSTD::__invoke(_VSTD::forward<_Visitor>(__visitor),
                        _VSTD::forward<_Alts>(__alts).__value...);
      }
      else {
        return _VSTD::__invoke(_VSTD::forward<_Visitor>(__visitor),
                               _VSTD::forward<_Alts>(__alts).__value...);
      }
    }

    _Visitor&& __visitor;
  };
#endif
# 720 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3

  template <class _Visitor>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto __make_value_visitor(_Visitor&& __visitor) {
    return __value_visitor<_Visitor>{_VSTD::forward<_Visitor>(__visitor)};
  }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 728 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
  template <class _Rp, class _Visitor>
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto __make_value_visitor(_Visitor&& __visitor) {
    return __value_visitor_return_type<_Rp, _Visitor>{_VSTD::forward<_Visitor>(__visitor)};
  }
#endif
# 734 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
};

} // namespace __visitation

template <size_t _Index, class _Tp>
struct _LIBCPP_TEMPLATE_VIS __alt {
  using __value_type = _Tp;

  template <class... _Args>
  _LIBCPP_HIDE_FROM_ABI
  explicit constexpr __alt(in_place_t, _Args&&... __args)
      : __value(_VSTD::forward<_Args>(__args)...) {}

  __value_type __value;
};

template <_Trait _DestructibleTrait, size_t _Index, class... _Types>
union _LIBCPP_TEMPLATE_VIS __union;

template <_Trait _DestructibleTrait, size_t _Index>
union _LIBCPP_TEMPLATE_VIS __union<_DestructibleTrait, _Index> {};

#define _LIBCPP_VARIANT_UNION(destructible_trait, destructor)                  \
  template <size_t _Index, class _Tp, class... _Types>                         \
  union _LIBCPP_TEMPLATE_VIS __union<destructible_trait,                       \
                                      _Index,                                  \
                                      _Tp,                                     \
                                      _Types...> {                             \
  public:                                                                      \
    _LIBCPP_HIDE_FROM_ABI                                                      \
    explicit constexpr __union(__valueless_t) noexcept : __dummy{} {}          \
                                                                               \
    template <class... _Args>                                                  \
    _LIBCPP_HIDE_FROM_ABI                                                      \
    explicit constexpr __union(in_place_index_t<0>, _Args&&... __args)         \
        : __head(in_place, _VSTD::forward<_Args>(__args)...) {}                \
                                                                               \
    template <size_t _Ip, class... _Args>                                      \
    _LIBCPP_HIDE_FROM_ABI                                                      \
    explicit constexpr __union(in_place_index_t<_Ip>, _Args&&... __args)       \
        : __tail(in_place_index<_Ip - 1>, _VSTD::forward<_Args>(__args)...) {} \
                                                                               \
    __union(const __union&) = default;                                         \
    __union(__union&&) = default;                                              \
                                                                               \
    destructor                                                                 \
                                                                               \
    __union& operator=(const __union&) = default;                              \
    __union& operator=(__union&&) = default;                                   \
                                                                               \
  private:                                                                     \
    char __dummy;                                                              \
    __alt<_Index, _Tp> __head;                                                 \
    __union<destructible_trait, _Index + 1, _Types...> __tail;                 \
                                                                               \
    friend struct __access::__union;                                           \
  }

_LIBCPP_VARIANT_UNION(_Trait::_TriviallyAvailable, ~__union() = default;);
_LIBCPP_VARIANT_UNION(_Trait::_Available, ~__union() {});
_LIBCPP_VARIANT_UNION(_Trait::_Unavailable, ~__union() = delete;);

#undef _LIBCPP_VARIANT_UNION

template <_Trait _DestructibleTrait, class... _Types>
class _LIBCPP_TEMPLATE_VIS __base {
public:
  using __index_t = __variant_index_t<sizeof...(_Types)>;

  _LIBCPP_HIDE_FROM_ABI
  explicit constexpr __base(__valueless_t __tag) noexcept
      : __data(__tag), __index(__variant_npos<__index_t>) {}

  template <size_t _Ip, class... _Args>
  _LIBCPP_HIDE_FROM_ABI
  explicit constexpr __base(in_place_index_t<_Ip>, _Args&&... __args)
      :
        __data(in_place_index<_Ip>, _VSTD::forward<_Args>(__args)...),
        __index(_Ip) {}

  _LIBCPP_HIDE_FROM_ABI
  constexpr bool valueless_by_exception() const noexcept {
    return index() == variant_npos;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr size_t index() const noexcept {
    return __index == __variant_npos<__index_t> ? variant_npos : __index;
  }

protected:
  _LIBCPP_HIDE_FROM_ABI
  constexpr auto&& __as_base() & { return *this; }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto&& __as_base() && { return _VSTD::move(*this); }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto&& __as_base() const & { return *this; }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto&& __as_base() const && { return _VSTD::move(*this); }

  _LIBCPP_HIDE_FROM_ABI
  static constexpr size_t __size() { return sizeof...(_Types); }

  __union<_DestructibleTrait, 0, _Types...> __data;
  __index_t __index;

  friend struct __access::__base;
  friend struct __visitation::__base;
};

template <class _Traits, _Trait = _Traits::__destructible_trait>
class _LIBCPP_TEMPLATE_VIS __dtor;

#define _LIBCPP_VARIANT_DESTRUCTOR(destructible_trait, destructor, destroy)    \
  template <class... _Types>                                                   \
  class _LIBCPP_TEMPLATE_VIS __dtor<__traits<_Types...>,                       \
                                    destructible_trait>                        \
      : public __base<destructible_trait, _Types...> {                         \
    using __base_type = __base<destructible_trait, _Types...>;                 \
    using __index_t = typename __base_type::__index_t;                         \
                                                                               \
  public:                                                                      \
    using __base_type::__base_type;                                            \
    using __base_type::operator=;                                              \
                                                                               \
    __dtor(const __dtor&) = default;                                           \
    __dtor(__dtor&&) = default;                                                \
    destructor                                                                 \
    __dtor& operator=(const __dtor&) = default;                                \
    __dtor& operator=(__dtor&&) = default;                                     \
                                                                               \
  protected:                                                                   \
    inline _LIBCPP_HIDE_FROM_ABI                                               \
    destroy                                                                    \
  }

_LIBCPP_VARIANT_DESTRUCTOR(
    _Trait::_TriviallyAvailable,
    ~__dtor() = default;,
    void __destroy() noexcept { this->__index = __variant_npos<__index_t>; });

_LIBCPP_VARIANT_DESTRUCTOR(
    _Trait::_Available,
    ~__dtor() { __destroy(); },
    void __destroy() noexcept {
      if (!this->valueless_by_exception()) {
        __visitation::__base::__visit_alt(
            [](auto& __alt) noexcept {
              using __alt_type = __remove_cvref_t<decltype(__alt)>;
              __alt.~__alt_type();
            },
            *this);
      }
      this->__index = __variant_npos<__index_t>;
    });

_LIBCPP_VARIANT_DESTRUCTOR(
    _Trait::_Unavailable,
    ~__dtor() = delete;,
    void __destroy() noexcept = delete;);

#undef _LIBCPP_VARIANT_DESTRUCTOR

template <class _Traits>
class _LIBCPP_TEMPLATE_VIS __ctor : public __dtor<_Traits> {
  using __base_type = __dtor<_Traits>;

public:
  using __base_type::__base_type;
  using __base_type::operator=;

protected:
  template <size_t _Ip, class _Tp, class... _Args>
  _LIBCPP_HIDE_FROM_ABI
  static _Tp& __construct_alt(__alt<_Ip, _Tp>& __a, _Args&&... __args) {
    ::new ((void*)_VSTD::addressof(__a))
        __alt<_Ip, _Tp>(in_place, _VSTD::forward<_Args>(__args)...);
    return __a.__value;
  }

  template <class _Rhs>
  _LIBCPP_HIDE_FROM_ABI
  static void __generic_construct(__ctor& __lhs, _Rhs&& __rhs) {
    __lhs.__destroy();
    if (!__rhs.valueless_by_exception()) {
      __visitation::__base::__visit_alt_at(
          __rhs.index(),
          [](auto& __lhs_alt, auto&& __rhs_alt) {
            __construct_alt(
                __lhs_alt,
                _VSTD::forward<decltype(__rhs_alt)>(__rhs_alt).__value);
          },
          __lhs, _VSTD::forward<_Rhs>(__rhs));
      __lhs.__index = __rhs.index();
    }
  }
};

template <class _Traits, _Trait = _Traits::__move_constructible_trait>
class _LIBCPP_TEMPLATE_VIS __move_constructor;

#define _LIBCPP_VARIANT_MOVE_CONSTRUCTOR(move_constructible_trait,             \
                                         move_constructor)                     \
  template <class... _Types>                                                   \
  class _LIBCPP_TEMPLATE_VIS __move_constructor<__traits<_Types...>,           \
                                                move_constructible_trait>      \
      : public __ctor<__traits<_Types...>> {                                   \
    using __base_type = __ctor<__traits<_Types...>>;                           \
                                                                               \
  public:                                                                      \
    using __base_type::__base_type;                                            \
    using __base_type::operator=;                                              \
                                                                               \
    __move_constructor(const __move_constructor&) = default;                   \
    move_constructor                                                           \
    ~__move_constructor() = default;                                           \
    __move_constructor& operator=(const __move_constructor&) = default;        \
    __move_constructor& operator=(__move_constructor&&) = default;             \
  }

_LIBCPP_VARIANT_MOVE_CONSTRUCTOR(
    _Trait::_TriviallyAvailable,
    __move_constructor(__move_constructor&& __that) = default;);

_LIBCPP_VARIANT_MOVE_CONSTRUCTOR(
    _Trait::_Available,
    __move_constructor(__move_constructor&& __that) noexcept(
        __all<is_nothrow_move_constructible_v<_Types>...>::value)
        : __move_constructor(__valueless_t{}) {
      this->__generic_construct(*this, _VSTD::move(__that));
    });

_LIBCPP_VARIANT_MOVE_CONSTRUCTOR(
    _Trait::_Unavailable,
    __move_constructor(__move_constructor&&) = delete;);

#undef _LIBCPP_VARIANT_MOVE_CONSTRUCTOR

template <class _Traits, _Trait = _Traits::__copy_constructible_trait>
class _LIBCPP_TEMPLATE_VIS __copy_constructor;

#define _LIBCPP_VARIANT_COPY_CONSTRUCTOR(copy_constructible_trait,             \
                                         copy_constructor)                     \
  template <class... _Types>                                                   \
  class _LIBCPP_TEMPLATE_VIS __copy_constructor<__traits<_Types...>,           \
                                                 copy_constructible_trait>     \
      : public __move_constructor<__traits<_Types...>> {                       \
    using __base_type = __move_constructor<__traits<_Types...>>;               \
                                                                               \
  public:                                                                      \
    using __base_type::__base_type;                                            \
    using __base_type::operator=;                                              \
                                                                               \
    copy_constructor                                                           \
    __copy_constructor(__copy_constructor&&) = default;                        \
    ~__copy_constructor() = default;                                           \
    __copy_constructor& operator=(const __copy_constructor&) = default;        \
    __copy_constructor& operator=(__copy_constructor&&) = default;             \
  }

_LIBCPP_VARIANT_COPY_CONSTRUCTOR(
    _Trait::_TriviallyAvailable,
    __copy_constructor(const __copy_constructor& __that) = default;);

_LIBCPP_VARIANT_COPY_CONSTRUCTOR(
    _Trait::_Available,
    __copy_constructor(const __copy_constructor& __that)
        : __copy_constructor(__valueless_t{}) {
      this->__generic_construct(*this, __that);
    });

_LIBCPP_VARIANT_COPY_CONSTRUCTOR(
    _Trait::_Unavailable,
    __copy_constructor(const __copy_constructor&) = delete;);

#undef _LIBCPP_VARIANT_COPY_CONSTRUCTOR

template <class _Traits>
class _LIBCPP_TEMPLATE_VIS __assignment : public __copy_constructor<_Traits> {
  using __base_type = __copy_constructor<_Traits>;

public:
  using __base_type::__base_type;
  using __base_type::operator=;

  template <size_t _Ip, class... _Args>
  _LIBCPP_HIDE_FROM_ABI
  auto& __emplace(_Args&&... __args) {
    this->__destroy();
    auto& __res = this->__construct_alt(__access::__base::__get_alt<_Ip>(*this),
                          _VSTD::forward<_Args>(__args)...);
    this->__index = _Ip;
    return __res;
  }

protected:
  template <size_t _Ip, class _Tp, class _Arg>
  _LIBCPP_HIDE_FROM_ABI
  void __assign_alt(__alt<_Ip, _Tp>& __a, _Arg&& __arg) {
    if (this->index() == _Ip) {
      __a.__value = _VSTD::forward<_Arg>(__arg);
    } else {
      struct {
        _LIBCPP_HIDE_FROM_ABI void operator()(true_type) const {
          __this->__emplace<_Ip>(_VSTD::forward<_Arg>(__arg));
        }
        _LIBCPP_HIDE_FROM_ABI void operator()(false_type) const {
          __this->__emplace<_Ip>(_Tp(_VSTD::forward<_Arg>(__arg)));
        }
        __assignment* __this;
        _Arg&& __arg;
      } __impl{this, _VSTD::forward<_Arg>(__arg)};
      __impl(bool_constant<is_nothrow_constructible_v<_Tp, _Arg> ||
                           !is_nothrow_move_constructible_v<_Tp>>{});
    }
  }

  template <class _That>
  _LIBCPP_HIDE_FROM_ABI
  void __generic_assign(_That&& __that) {
    if (this->valueless_by_exception() && __that.valueless_by_exception()) {
      // do nothing.
    } else if (__that.valueless_by_exception()) {
      this->__destroy();
    } else {
      __visitation::__base::__visit_alt_at(
          __that.index(),
          [this](auto& __this_alt, auto&& __that_alt) {
            this->__assign_alt(
                __this_alt,
                _VSTD::forward<decltype(__that_alt)>(__that_alt).__value);
          },
          *this, _VSTD::forward<_That>(__that));
    }
  }
};

template <class _Traits, _Trait = _Traits::__move_assignable_trait>
class _LIBCPP_TEMPLATE_VIS __move_assignment;

#define _LIBCPP_VARIANT_MOVE_ASSIGNMENT(move_assignable_trait,                 \
                                        move_assignment)                       \
  template <class... _Types>                                                   \
  class _LIBCPP_TEMPLATE_VIS __move_assignment<__traits<_Types...>,            \
                                                move_assignable_trait>         \
      : public __assignment<__traits<_Types...>> {                             \
    using __base_type = __assignment<__traits<_Types...>>;                     \
                                                                               \
  public:                                                                      \
    using __base_type::__base_type;                                            \
    using __base_type::operator=;                                              \
                                                                               \
    __move_assignment(const __move_assignment&) = default;                     \
    __move_assignment(__move_assignment&&) = default;                          \
    ~__move_assignment() = default;                                            \
    __move_assignment& operator=(const __move_assignment&) = default;          \
    move_assignment                                                            \
  }

_LIBCPP_VARIANT_MOVE_ASSIGNMENT(
    _Trait::_TriviallyAvailable,
    __move_assignment& operator=(__move_assignment&& __that) = default;);

_LIBCPP_VARIANT_MOVE_ASSIGNMENT(
    _Trait::_Available,
    __move_assignment& operator=(__move_assignment&& __that) noexcept(
        __all<(is_nothrow_move_constructible_v<_Types> &&
               is_nothrow_move_assignable_v<_Types>)...>::value) {
      this->__generic_assign(_VSTD::move(__that));
      return *this;
    });

_LIBCPP_VARIANT_MOVE_ASSIGNMENT(
    _Trait::_Unavailable,
    __move_assignment& operator=(__move_assignment&&) = delete;);

#undef _LIBCPP_VARIANT_MOVE_ASSIGNMENT

template <class _Traits, _Trait = _Traits::__copy_assignable_trait>
class _LIBCPP_TEMPLATE_VIS __copy_assignment;

#define _LIBCPP_VARIANT_COPY_ASSIGNMENT(copy_assignable_trait,                 \
                                        copy_assignment)                       \
  template <class... _Types>                                                   \
  class _LIBCPP_TEMPLATE_VIS __copy_assignment<__traits<_Types...>,            \
                                                copy_assignable_trait>         \
      : public __move_assignment<__traits<_Types...>> {                        \
    using __base_type = __move_assignment<__traits<_Types...>>;                \
                                                                               \
  public:                                                                      \
    using __base_type::__base_type;                                            \
    using __base_type::operator=;                                              \
                                                                               \
    __copy_assignment(const __copy_assignment&) = default;                     \
    __copy_assignment(__copy_assignment&&) = default;                          \
    ~__copy_assignment() = default;                                            \
    copy_assignment                                                            \
    __copy_assignment& operator=(__copy_assignment&&) = default;               \
  }

_LIBCPP_VARIANT_COPY_ASSIGNMENT(
    _Trait::_TriviallyAvailable,
    __copy_assignment& operator=(const __copy_assignment& __that) = default;);

_LIBCPP_VARIANT_COPY_ASSIGNMENT(
    _Trait::_Available,
    __copy_assignment& operator=(const __copy_assignment& __that) {
      this->__generic_assign(__that);
      return *this;
    });

_LIBCPP_VARIANT_COPY_ASSIGNMENT(
    _Trait::_Unavailable,
    __copy_assignment& operator=(const __copy_assignment&) = delete;);

#undef _LIBCPP_VARIANT_COPY_ASSIGNMENT

template <class... _Types>
class _LIBCPP_TEMPLATE_VIS __impl
    : public __copy_assignment<__traits<_Types...>> {
  using __base_type = __copy_assignment<__traits<_Types...>>;

public:
  using __base_type::__base_type; // get in_place_index_t constructor & friends
  _LIBCPP_HIDE_FROM_ABI __impl(__impl const&) = default;
  _LIBCPP_HIDE_FROM_ABI __impl(__impl&&) = default;
  _LIBCPP_HIDE_FROM_ABI __impl& operator=(__impl const&) = default;
  _LIBCPP_HIDE_FROM_ABI __impl& operator=(__impl&&) = default;

  template <size_t _Ip, class _Arg>
  _LIBCPP_HIDE_FROM_ABI
  void __assign(_Arg&& __arg) {
    this->__assign_alt(__access::__base::__get_alt<_Ip>(*this),
                       _VSTD::forward<_Arg>(__arg));
  }

  inline _LIBCPP_HIDE_FROM_ABI
  void __swap(__impl& __that)  {
    if (this->valueless_by_exception() && __that.valueless_by_exception()) {
      // do nothing.
    } else if (this->index() == __that.index()) {
      __visitation::__base::__visit_alt_at(
          this->index(),
          [](auto& __this_alt, auto& __that_alt) {
            using _VSTD::swap;
            swap(__this_alt.__value, __that_alt.__value);
          },
          *this,
          __that);
    } else {
      __impl* __lhs = this;
      __impl* __rhs = _VSTD::addressof(__that);
      if (__lhs->__move_nothrow() && !__rhs->__move_nothrow()) {
        _VSTD::swap(__lhs, __rhs);
      }
      __impl __tmp(_VSTD::move(*__rhs));
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
      if constexpr (__all<is_nothrow_move_constructible_v<_Types>...>::value) {
        this->__generic_construct(*__rhs, _VSTD::move(*__lhs));
      } else {
        // EXTENSION: When the move construction of `__lhs` into `__rhs` throws
        // and `__tmp` is nothrow move constructible then we move `__tmp` back
        // into `__rhs` and provide the strong exception safety guarantee.
        try {
          this->__generic_construct(*__rhs, _VSTD::move(*__lhs));
        } catch (...) {
          if (__tmp.__move_nothrow()) {
            this->__generic_construct(*__rhs, _VSTD::move(__tmp));
          }
          throw;
        }
      }
#else
# 1210 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
      // this isn't consolidated with the `if constexpr` branch above due to
      // `throw` being ill-formed with exceptions disabled even when discarded.
      this->__generic_construct(*__rhs, _VSTD::move(*__lhs));
#endif
# 1214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
      this->__generic_construct(*__lhs, _VSTD::move(__tmp));
    }
  }

private:
  inline _LIBCPP_HIDE_FROM_ABI
  bool __move_nothrow() const {
    constexpr bool __results[] = {is_nothrow_move_constructible_v<_Types>...};
    return this->valueless_by_exception() || __results[this->index()];
  }
};

struct __no_narrowing_check {
  template <class _Dest, class _Source>
  using _Apply = __type_identity<_Dest>;
};

struct __narrowing_check {
  template <class _Dest>
  static auto __test_impl(_Dest (&&)[1]) -> __type_identity<_Dest>;
  template <class _Dest, class _Source>
  using _Apply _LIBCPP_NODEBUG = decltype(__test_impl<_Dest>({std::declval<_Source>()}));
};

template <class _Dest, class _Source>
using __check_for_narrowing _LIBCPP_NODEBUG =
  typename _If<
#ifdef _LIBCPP_ENABLE_NARROWING_CONVERSIONS_IN_VARIANT
    false &&
#endif
# 1244 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
    is_arithmetic<_Dest>::value,
    __narrowing_check,
    __no_narrowing_check
  >::template _Apply<_Dest, _Source>;

template <class _Tp, size_t _Idx>
struct __overload {
  template <class _Up>
  auto operator()(_Tp, _Up&&) const -> __check_for_narrowing<_Tp, _Up>;
};

template <class _Tp, size_t>
struct __overload_bool  {
  template <class _Up, class _Ap = __remove_cvref_t<_Up>>
  auto operator()(bool, _Up&&) const
      -> enable_if_t<is_same_v<_Ap, bool>, __type_identity<_Tp>>;
};

template <size_t _Idx>
struct __overload<bool, _Idx> : __overload_bool<bool, _Idx> {};
template <size_t _Idx>
struct __overload<bool const, _Idx> : __overload_bool<bool const, _Idx> {};
template <size_t _Idx>
struct __overload<bool volatile, _Idx> : __overload_bool<bool volatile, _Idx> {};
template <size_t _Idx>
struct __overload<bool const volatile, _Idx> : __overload_bool<bool const volatile, _Idx> {};

template <class ..._Bases>
struct __all_overloads : _Bases... {
  void operator()() const;
  using _Bases::operator()...;
};

template <class _IdxSeq>
struct __make_overloads_imp;

template <size_t ..._Idx>
struct __make_overloads_imp<__tuple_indices<_Idx...> > {
  template <class ..._Types>
  using _Apply _LIBCPP_NODEBUG = __all_overloads<__overload<_Types, _Idx>...>;
};

template <class ..._Types>
using _MakeOverloads _LIBCPP_NODEBUG = typename __make_overloads_imp<
    __make_indices_imp<sizeof...(_Types), 0> >::template _Apply<_Types...>;

template <class _Tp, class... _Types>
using __best_match_t =
    typename invoke_result_t<_MakeOverloads<_Types...>, _Tp, _Tp>::type;

} // namespace __variant_detail

template <class... _Types>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DECLSPEC_EMPTY_BASES variant
    : private __sfinae_ctor_base<
          __all<is_copy_constructible_v<_Types>...>::value,
          __all<is_move_constructible_v<_Types>...>::value>,
      private __sfinae_assign_base<
          __all<(is_copy_constructible_v<_Types> &&
                 is_copy_assignable_v<_Types>)...>::value,
          __all<(is_move_constructible_v<_Types> &&
                 is_move_assignable_v<_Types>)...>::value> {
  static_assert(0 < sizeof...(_Types),
                "variant must consist of at least one alternative.");

  static_assert(__all<!is_array_v<_Types>...>::value,
                "variant can not have an array type as an alternative.");

  static_assert(__all<!is_reference_v<_Types>...>::value,
                "variant can not have a reference type as an alternative.");

  static_assert(__all<!is_void_v<_Types>...>::value,
                "variant can not have a void type as an alternative.");

  using __first_type = variant_alternative_t<0, variant>;

public:
  template <bool _Dummy = true,
            enable_if_t<__dependent_type<is_default_constructible<__first_type>,
                                         _Dummy>::value,
                        int> = 0>
  _LIBCPP_HIDE_FROM_ABI
  constexpr variant() noexcept(is_nothrow_default_constructible_v<__first_type>)
      : __impl_(in_place_index<0>) {}

  _LIBCPP_HIDE_FROM_ABI constexpr variant(const variant&) = default;
  _LIBCPP_HIDE_FROM_ABI constexpr variant(variant&&) = default;

  template <
      class _Arg,
      enable_if_t<!is_same_v<__remove_cvref_t<_Arg>, variant>, int> = 0,
      enable_if_t<!__is_inplace_type<__remove_cvref_t<_Arg>>::value, int> = 0,
      enable_if_t<!__is_inplace_index<__remove_cvref_t<_Arg>>::value, int> = 0,
      class _Tp = __variant_detail::__best_match_t<_Arg, _Types...>,
      size_t _Ip =
          __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
      enable_if_t<is_constructible_v<_Tp, _Arg>, int> = 0>
  _LIBCPP_HIDE_FROM_ABI
  constexpr variant(_Arg&& __arg) noexcept(
      is_nothrow_constructible_v<_Tp, _Arg>)
      : __impl_(in_place_index<_Ip>, _VSTD::forward<_Arg>(__arg)) {}

  template <size_t _Ip, class... _Args,
            class = enable_if_t<(_Ip < sizeof...(_Types)), int>,
            class _Tp = variant_alternative_t<_Ip, variant<_Types...>>,
            enable_if_t<is_constructible_v<_Tp, _Args...>, int> = 0>
  _LIBCPP_HIDE_FROM_ABI
  explicit constexpr variant(
      in_place_index_t<_Ip>,
      _Args&&... __args) noexcept(is_nothrow_constructible_v<_Tp, _Args...>)
      : __impl_(in_place_index<_Ip>, _VSTD::forward<_Args>(__args)...) {}

  template <
      size_t _Ip,
      class _Up,
      class... _Args,
      enable_if_t<(_Ip < sizeof...(_Types)), int> = 0,
      class _Tp = variant_alternative_t<_Ip, variant<_Types...>>,
      enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>,
                  int> = 0>
  _LIBCPP_HIDE_FROM_ABI
  explicit constexpr variant(
      in_place_index_t<_Ip>,
      initializer_list<_Up> __il,
      _Args&&... __args) noexcept(
      is_nothrow_constructible_v<_Tp, initializer_list<_Up>&, _Args...>)
      : __impl_(in_place_index<_Ip>, __il, _VSTD::forward<_Args>(__args)...) {}

  template <
      class _Tp,
      class... _Args,
      size_t _Ip =
          __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
      enable_if_t<is_constructible_v<_Tp, _Args...>, int> = 0>
  _LIBCPP_HIDE_FROM_ABI
  explicit constexpr variant(in_place_type_t<_Tp>, _Args&&... __args) noexcept(
      is_nothrow_constructible_v<_Tp, _Args...>)
      : __impl_(in_place_index<_Ip>, _VSTD::forward<_Args>(__args)...) {}

  template <
      class _Tp,
      class _Up,
      class... _Args,
      size_t _Ip =
          __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
      enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>,
                  int> = 0>
  _LIBCPP_HIDE_FROM_ABI
  explicit constexpr variant(
      in_place_type_t<_Tp>,
      initializer_list<_Up> __il,
      _Args&&... __args) noexcept(
      is_nothrow_constructible_v<_Tp, initializer_list< _Up>&, _Args...>)
      : __impl_(in_place_index<_Ip>, __il, _VSTD::forward<_Args>(__args)...) {}

  _LIBCPP_HIDE_FROM_ABI ~variant() = default;

  _LIBCPP_HIDE_FROM_ABI constexpr variant& operator=(const variant&) = default;
  _LIBCPP_HIDE_FROM_ABI constexpr variant& operator=(variant&&) = default;

  template <
      class _Arg,
      enable_if_t<!is_same_v<__remove_cvref_t<_Arg>, variant>, int> = 0,
      class _Tp = __variant_detail::__best_match_t<_Arg, _Types...>,
      size_t _Ip =
          __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
      enable_if_t<is_assignable_v<_Tp&, _Arg> && is_constructible_v<_Tp, _Arg>,
                  int> = 0>
  _LIBCPP_HIDE_FROM_ABI
  variant& operator=(_Arg&& __arg) noexcept(
      is_nothrow_assignable_v<_Tp&, _Arg> &&
      is_nothrow_constructible_v<_Tp, _Arg>) {
    __impl_.template __assign<_Ip>(_VSTD::forward<_Arg>(__arg));
    return *this;
  }

  template <
      size_t _Ip,
      class... _Args,
      enable_if_t<(_Ip < sizeof...(_Types)), int> = 0,
      class _Tp = variant_alternative_t<_Ip, variant<_Types...>>,
      enable_if_t<is_constructible_v<_Tp, _Args...>, int> = 0>
  _LIBCPP_HIDE_FROM_ABI
  _Tp& emplace(_Args&&... __args) {
    return __impl_.template __emplace<_Ip>(_VSTD::forward<_Args>(__args)...);
  }

  template <
      size_t _Ip,
      class _Up,
      class... _Args,
      enable_if_t<(_Ip < sizeof...(_Types)), int> = 0,
      class _Tp = variant_alternative_t<_Ip, variant<_Types...>>,
      enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>,
                  int> = 0>
  _LIBCPP_HIDE_FROM_ABI
  _Tp& emplace(initializer_list<_Up> __il, _Args&&... __args) {
    return __impl_.template __emplace<_Ip>(__il, _VSTD::forward<_Args>(__args)...);
  }

  template <
      class _Tp,
      class... _Args,
      size_t _Ip =
          __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
      enable_if_t<is_constructible_v<_Tp, _Args...>, int> = 0>
  _LIBCPP_HIDE_FROM_ABI
  _Tp& emplace(_Args&&... __args) {
    return __impl_.template __emplace<_Ip>(_VSTD::forward<_Args>(__args)...);
  }

  template <
      class _Tp,
      class _Up,
      class... _Args,
      size_t _Ip =
          __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
      enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>,
                  int> = 0>
  _LIBCPP_HIDE_FROM_ABI
  _Tp& emplace(initializer_list<_Up> __il, _Args&&... __args) {
    return __impl_.template __emplace<_Ip>(__il, _VSTD::forward<_Args>(__args)...);
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr bool valueless_by_exception() const noexcept {
    return __impl_.valueless_by_exception();
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr size_t index() const noexcept { return __impl_.index(); }

  template <
      bool _Dummy = true,
      enable_if_t<
          __all<(
              __dependent_type<is_move_constructible<_Types>, _Dummy>::value &&
              __dependent_type<is_swappable<_Types>, _Dummy>::value)...>::value,
          int> = 0>
  _LIBCPP_HIDE_FROM_ABI
  void swap(variant& __that) noexcept(
      __all<(is_nothrow_move_constructible_v<_Types> &&
             is_nothrow_swappable_v<_Types>)...>::value) {
    __impl_.__swap(__that.__impl_);
  }

private:
  __variant_detail::__impl<_Types...> __impl_;

  friend struct __variant_detail::__access::__variant;
  friend struct __variant_detail::__visitation::__variant;
};

template <size_t _Ip, class... _Types>
_LIBCPP_HIDE_FROM_ABI
constexpr bool __holds_alternative(const variant<_Types...>& __v) noexcept {
  return __v.index() == _Ip;
}

template <class _Tp, class... _Types>
_LIBCPP_HIDE_FROM_ABI
constexpr bool holds_alternative(const variant<_Types...>& __v) noexcept {
  return std::__holds_alternative<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
}

template <size_t _Ip, class _Vp>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr auto&& __generic_get(_Vp&& __v) {
  using __variant_detail::__access::__variant;
  if (!std::__holds_alternative<_Ip>(__v)) {
    __throw_bad_variant_access();
  }
  return __variant::__get_alt<_Ip>(_VSTD::forward<_Vp>(__v)).__value;
}

template <size_t _Ip, class... _Types>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr variant_alternative_t<_Ip, variant<_Types...>>& get(
    variant<_Types...>& __v) {
  static_assert(_Ip < sizeof...(_Types));
  static_assert(!is_void_v<variant_alternative_t<_Ip, variant<_Types...>>>);
  return std::__generic_get<_Ip>(__v);
}

template <size_t _Ip, class... _Types>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr variant_alternative_t<_Ip, variant<_Types...>>&& get(
    variant<_Types...>&& __v) {
  static_assert(_Ip < sizeof...(_Types));
  static_assert(!is_void_v<variant_alternative_t<_Ip, variant<_Types...>>>);
  return std::__generic_get<_Ip>(_VSTD::move(__v));
}

template <size_t _Ip, class... _Types>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr const variant_alternative_t<_Ip, variant<_Types...>>& get(
    const variant<_Types...>& __v) {
  static_assert(_Ip < sizeof...(_Types));
  static_assert(!is_void_v<variant_alternative_t<_Ip, variant<_Types...>>>);
  return std::__generic_get<_Ip>(__v);
}

template <size_t _Ip, class... _Types>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr const variant_alternative_t<_Ip, variant<_Types...>>&& get(
    const variant<_Types...>&& __v) {
  static_assert(_Ip < sizeof...(_Types));
  static_assert(!is_void_v<variant_alternative_t<_Ip, variant<_Types...>>>);
  return std::__generic_get<_Ip>(_VSTD::move(__v));
}

template <class _Tp, class... _Types>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr _Tp& get(variant<_Types...>& __v) {
  static_assert(!is_void_v<_Tp>);
  return _VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
}

template <class _Tp, class... _Types>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr _Tp&& get(variant<_Types...>&& __v) {
  static_assert(!is_void_v<_Tp>);
  return _VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>(
      _VSTD::move(__v));
}

template <class _Tp, class... _Types>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr const _Tp& get(const variant<_Types...>& __v) {
  static_assert(!is_void_v<_Tp>);
  return _VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
}

template <class _Tp, class... _Types>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr const _Tp&& get(const variant<_Types...>&& __v) {
  static_assert(!is_void_v<_Tp>);
  return _VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>(
      _VSTD::move(__v));
}

template <size_t _Ip, class _Vp>
_LIBCPP_HIDE_FROM_ABI
constexpr auto* __generic_get_if(_Vp* __v) noexcept {
  using __variant_detail::__access::__variant;
  return __v && std::__holds_alternative<_Ip>(*__v)
             ? _VSTD::addressof(__variant::__get_alt<_Ip>(*__v).__value)
             : nullptr;
}

template <size_t _Ip, class... _Types>
_LIBCPP_HIDE_FROM_ABI
constexpr add_pointer_t<variant_alternative_t<_Ip, variant<_Types...>>>
get_if(variant<_Types...>* __v) noexcept {
  static_assert(_Ip < sizeof...(_Types));
  static_assert(!is_void_v<variant_alternative_t<_Ip, variant<_Types...>>>);
  return std::__generic_get_if<_Ip>(__v);
}

template <size_t _Ip, class... _Types>
_LIBCPP_HIDE_FROM_ABI
constexpr add_pointer_t<const variant_alternative_t<_Ip, variant<_Types...>>>
get_if(const variant<_Types...>* __v) noexcept {
  static_assert(_Ip < sizeof...(_Types));
  static_assert(!is_void_v<variant_alternative_t<_Ip, variant<_Types...>>>);
  return std::__generic_get_if<_Ip>(__v);
}

template <class _Tp, class... _Types>
_LIBCPP_HIDE_FROM_ABI
constexpr add_pointer_t<_Tp>
get_if(variant<_Types...>* __v) noexcept {
  static_assert(!is_void_v<_Tp>);
  return _VSTD::get_if<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
}

template <class _Tp, class... _Types>
_LIBCPP_HIDE_FROM_ABI
constexpr add_pointer_t<const _Tp>
get_if(const variant<_Types...>* __v) noexcept {
  static_assert(!is_void_v<_Tp>);
  return _VSTD::get_if<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
}

template <class _Operator>
struct __convert_to_bool {
  template <class _T1, class _T2>
  _LIBCPP_HIDE_FROM_ABI
  constexpr bool operator()(_T1 && __t1, _T2&& __t2) const {
    static_assert(is_convertible<decltype(_Operator{}(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2))), bool>::value,
        "the relational operator does not return a type which is implicitly convertible to bool");
    return _Operator{}(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2));
  }
};

template <class... _Types>
_LIBCPP_HIDE_FROM_ABI
constexpr bool operator==(const variant<_Types...>& __lhs,
                          const variant<_Types...>& __rhs) {
  using __variant_detail::__visitation::__variant;
  if (__lhs.index() != __rhs.index()) return false;
  if (__lhs.valueless_by_exception()) return true;
  return __variant::__visit_value_at(__lhs.index(), __convert_to_bool<equal_to<>>{}, __lhs, __rhs);
}

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1659 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3

template <class... _Types> requires (three_way_comparable<_Types> && ...)
_LIBCPP_HIDE_FROM_ABI constexpr common_comparison_category_t<compare_three_way_result_t<_Types>...>
operator<=>(const variant<_Types...>& __lhs, const variant<_Types...>& __rhs) {
  using __variant_detail::__visitation::__variant;
  using __result_t = common_comparison_category_t<compare_three_way_result_t<_Types>...>;
  if (__lhs.valueless_by_exception() && __rhs.valueless_by_exception())
    return strong_ordering::equal;
  if (__lhs.valueless_by_exception())
    return strong_ordering::less;
  if (__rhs.valueless_by_exception())
    return strong_ordering::greater;
  if (auto __c = __lhs.index() <=> __rhs.index(); __c != 0)
    return __c;
  auto __three_way = []<class _Type>(const _Type& __v, const _Type& __w) -> __result_t { return __v <=> __w; };
  return __variant::__visit_value_at(__lhs.index(), __three_way, __lhs, __rhs);
}

#  endif // _LIBCPP_STD_VER >= 20
# 1678 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3

template <class... _Types>
_LIBCPP_HIDE_FROM_ABI
constexpr bool operator!=(const variant<_Types...>& __lhs,
                          const variant<_Types...>& __rhs) {
  using __variant_detail::__visitation::__variant;
  if (__lhs.index() != __rhs.index()) return true;
  if (__lhs.valueless_by_exception()) return false;
  return __variant::__visit_value_at(
      __lhs.index(), __convert_to_bool<not_equal_to<>>{}, __lhs, __rhs);
}

template <class... _Types>
_LIBCPP_HIDE_FROM_ABI
constexpr bool operator<(const variant<_Types...>& __lhs,
                         const variant<_Types...>& __rhs) {
  using __variant_detail::__visitation::__variant;
  if (__rhs.valueless_by_exception()) return false;
  if (__lhs.valueless_by_exception()) return true;
  if (__lhs.index() < __rhs.index()) return true;
  if (__lhs.index() > __rhs.index()) return false;
  return __variant::__visit_value_at(__lhs.index(), __convert_to_bool<less<>>{}, __lhs, __rhs);
}

template <class... _Types>
_LIBCPP_HIDE_FROM_ABI
constexpr bool operator>(const variant<_Types...>& __lhs,
                         const variant<_Types...>& __rhs) {
  using __variant_detail::__visitation::__variant;
  if (__lhs.valueless_by_exception()) return false;
  if (__rhs.valueless_by_exception()) return true;
  if (__lhs.index() > __rhs.index()) return true;
  if (__lhs.index() < __rhs.index()) return false;
  return __variant::__visit_value_at(__lhs.index(), __convert_to_bool<greater<>>{}, __lhs, __rhs);
}

template <class... _Types>
_LIBCPP_HIDE_FROM_ABI
constexpr bool operator<=(const variant<_Types...>& __lhs,
                          const variant<_Types...>& __rhs) {
  using __variant_detail::__visitation::__variant;
  if (__lhs.valueless_by_exception()) return true;
  if (__rhs.valueless_by_exception()) return false;
  if (__lhs.index() < __rhs.index()) return true;
  if (__lhs.index() > __rhs.index()) return false;
  return __variant::__visit_value_at(
      __lhs.index(), __convert_to_bool<less_equal<>>{}, __lhs, __rhs);
}

template <class... _Types>
_LIBCPP_HIDE_FROM_ABI
constexpr bool operator>=(const variant<_Types...>& __lhs,
                          const variant<_Types...>& __rhs) {
  using __variant_detail::__visitation::__variant;
  if (__rhs.valueless_by_exception()) return true;
  if (__lhs.valueless_by_exception()) return false;
  if (__lhs.index() > __rhs.index()) return true;
  if (__lhs.index() < __rhs.index()) return false;
  return __variant::__visit_value_at(
      __lhs.index(), __convert_to_bool<greater_equal<>>{}, __lhs, __rhs);
}

template <class... _Vs>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr void __throw_if_valueless(_Vs&&... __vs) {
  const bool __valueless =
      (... || _VSTD::__as_variant(__vs).valueless_by_exception());
  if (__valueless) {
    __throw_bad_variant_access();
  }
}

template <
    class _Visitor, class... _Vs,
    typename = void_t<decltype(_VSTD::__as_variant(std::declval<_Vs>()))...> >
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr decltype(auto) visit(_Visitor&& __visitor, _Vs&&... __vs) {
  using __variant_detail::__visitation::__variant;
  _VSTD::__throw_if_valueless(_VSTD::forward<_Vs>(__vs)...);
  return __variant::__visit_value(_VSTD::forward<_Visitor>(__visitor),
                                  _VSTD::forward<_Vs>(__vs)...);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1764 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
template <
    class _Rp, class _Visitor, class... _Vs,
    typename = void_t<decltype(_VSTD::__as_variant(std::declval<_Vs>()))...> >
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
constexpr _Rp visit(_Visitor&& __visitor, _Vs&&... __vs) {
  using __variant_detail::__visitation::__variant;
  _VSTD::__throw_if_valueless(_VSTD::forward<_Vs>(__vs)...);
  return __variant::__visit_value<_Rp>(_VSTD::forward<_Visitor>(__visitor),
                                       _VSTD::forward<_Vs>(__vs)...);
}
#endif
# 1776 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3

template <class... _Types>
_LIBCPP_HIDE_FROM_ABI
auto swap(variant<_Types...>& __lhs, variant<_Types...>& __rhs)
  noexcept(noexcept(__lhs.swap(__rhs)))
  -> decltype(      __lhs.swap(__rhs))
  { return          __lhs.swap(__rhs); }

template <class... _Types>
struct _LIBCPP_TEMPLATE_VIS hash<
    __enable_hash_helper<variant<_Types...>, remove_const_t<_Types>...>> {
  using argument_type = variant<_Types...>;
  using result_type = size_t;

  _LIBCPP_HIDE_FROM_ABI
  result_type operator()(const argument_type& __v) const {
    using __variant_detail::__visitation::__variant;
    size_t __res =
        __v.valueless_by_exception()
               ? 299792458 // Random value chosen by the universe upon creation
               : __variant::__visit_alt(
                     [](const auto& __alt) {
                       using __alt_type = __remove_cvref_t<decltype(__alt)>;
                       using __value_type = remove_const_t<
                         typename __alt_type::__value_type>;
                       return hash<__value_type>{}(__alt.__value);
                     },
                     __v);
    return std::__hash_combine(__res, hash<size_t>{}(__v.index()));
  }
};

// __unchecked_get is the same as std::get, except, it is UB to use it with the wrong
// type whereas std::get will throw or returning nullptr. This makes it faster than
// std::get.
template <size_t _Ip, class _Vp>
_LIBCPP_HIDE_FROM_ABI
constexpr auto&& __unchecked_get(_Vp&& __v) noexcept {
  using __variant_detail::__access::__variant;
  return __variant::__get_alt<_Ip>(_VSTD::forward<_Vp>(__v)).__value;
}

template <class _Tp, class... _Types>
_LIBCPP_HIDE_FROM_ABI
constexpr auto&& __unchecked_get(const variant<_Types...>& __v) noexcept {
  return std::__unchecked_get<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
}

template <class _Tp, class... _Types>
_LIBCPP_HIDE_FROM_ABI
constexpr auto&& __unchecked_get(variant<_Types...>& __v) noexcept {
  return std::__unchecked_get<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
}

#endif // _LIBCPP_STD_VER >= 17
# 1831 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1837 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#  include <exception>
#endif /* expanded by -frewrite-includes */
# 1837 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1838 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 1838 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1839 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#  include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 1839 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1840 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#if 0 /* expanded by -frewrite-includes */
#  include <utility>
#endif /* expanded by -frewrite-includes */
# 1840 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
# 1841 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#endif
# 1842 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3

#endif // _LIBCPP_VARIANT
# 1844 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/variant" 3
#endif /* variant expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#endif
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3

template<class _Iter>
concept __can_use_postfix_proxy =
  constructible_from<iter_value_t<_Iter>, iter_reference_t<_Iter>> &&
  move_constructible<iter_value_t<_Iter>>;

template<input_or_output_iterator _Iter, sentinel_for<_Iter> _Sent>
  requires (!same_as<_Iter, _Sent> && copyable<_Iter>)
class common_iterator {
  struct __proxy {
    _LIBCPP_HIDE_FROM_ABI constexpr const iter_value_t<_Iter>* operator->() const noexcept {
      return _VSTD::addressof(__value_);
    }
    iter_value_t<_Iter> __value_;
  };

  struct __postfix_proxy {
    _LIBCPP_HIDE_FROM_ABI constexpr const iter_value_t<_Iter>& operator*() const noexcept {
      return __value_;
    }
    iter_value_t<_Iter> __value_;
  };

public:
  variant<_Iter, _Sent> __hold_;

  _LIBCPP_HIDE_FROM_ABI common_iterator() requires default_initializable<_Iter> = default;

  _LIBCPP_HIDE_FROM_ABI constexpr common_iterator(_Iter __i) : __hold_(in_place_type<_Iter>, _VSTD::move(__i)) {}
  _LIBCPP_HIDE_FROM_ABI constexpr common_iterator(_Sent __s) : __hold_(in_place_type<_Sent>, _VSTD::move(__s)) {}

  template<class _I2, class _S2>
    requires convertible_to<const _I2&, _Iter> && convertible_to<const _S2&, _Sent>
  _LIBCPP_HIDE_FROM_ABI constexpr common_iterator(const common_iterator<_I2, _S2>& __other)
    : __hold_([&]() -> variant<_Iter, _Sent> {
      _LIBCPP_ASSERT_UNCATEGORIZED(!__other.__hold_.valueless_by_exception(),
                                   "Attempted to construct from a valueless common_iterator");
      if (__other.__hold_.index() == 0)
        return variant<_Iter, _Sent>{in_place_index<0>, _VSTD::__unchecked_get<0>(__other.__hold_)};
      return variant<_Iter, _Sent>{in_place_index<1>, _VSTD::__unchecked_get<1>(__other.__hold_)};
    }()) {}

  template<class _I2, class _S2>
    requires convertible_to<const _I2&, _Iter> && convertible_to<const _S2&, _Sent> &&
             assignable_from<_Iter&, const _I2&> && assignable_from<_Sent&, const _S2&>
  _LIBCPP_HIDE_FROM_ABI common_iterator& operator=(const common_iterator<_I2, _S2>& __other) {
    _LIBCPP_ASSERT_UNCATEGORIZED(!__other.__hold_.valueless_by_exception(),
                                 "Attempted to assign from a valueless common_iterator");

    auto __idx = __hold_.index();
    auto __other_idx = __other.__hold_.index();

    // If they're the same index, just assign.
    if (__idx == 0 && __other_idx == 0)
      _VSTD::__unchecked_get<0>(__hold_) = _VSTD::__unchecked_get<0>(__other.__hold_);
    else if (__idx == 1 && __other_idx == 1)
      _VSTD::__unchecked_get<1>(__hold_) = _VSTD::__unchecked_get<1>(__other.__hold_);

    // Otherwise replace with the oposite element.
    else if (__other_idx == 1)
      __hold_.template emplace<1>(_VSTD::__unchecked_get<1>(__other.__hold_));
    else if (__other_idx == 0)
      __hold_.template emplace<0>(_VSTD::__unchecked_get<0>(__other.__hold_));

    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator*()
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_Iter>(__hold_),
                                 "Attempted to dereference a non-dereferenceable common_iterator");
    return *_VSTD::__unchecked_get<_Iter>(__hold_);
  }

  _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator*() const
    requires __dereferenceable<const _Iter>
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_Iter>(__hold_),
                                 "Attempted to dereference a non-dereferenceable common_iterator");
    return *_VSTD::__unchecked_get<_Iter>(__hold_);
  }

  template<class _I2 = _Iter>
  _LIBCPP_HIDE_FROM_ABI decltype(auto) operator->() const
    requires indirectly_readable<const _I2> &&
    (requires(const _I2& __i) { __i.operator->(); } ||
     is_reference_v<iter_reference_t<_I2>> ||
     constructible_from<iter_value_t<_I2>, iter_reference_t<_I2>>)
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_Iter>(__hold_),
                                 "Attempted to dereference a non-dereferenceable common_iterator");
    if constexpr (is_pointer_v<_Iter> || requires(const _Iter& __i) { __i.operator->(); })    {
      return _VSTD::__unchecked_get<_Iter>(__hold_);
    } else if constexpr (is_reference_v<iter_reference_t<_Iter>>) {
      auto&& __tmp = *_VSTD::__unchecked_get<_Iter>(__hold_);
      return _VSTD::addressof(__tmp);
    } else {
      return __proxy{*_VSTD::__unchecked_get<_Iter>(__hold_)};
    }
  }

  _LIBCPP_HIDE_FROM_ABI common_iterator& operator++() {
    _LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_Iter>(__hold_),
                                 "Attempted to increment a non-dereferenceable common_iterator");
    ++_VSTD::__unchecked_get<_Iter>(__hold_); return *this;
  }

  _LIBCPP_HIDE_FROM_ABI decltype(auto) operator++(int) {
    _LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_Iter>(__hold_),
                                 "Attempted to increment a non-dereferenceable common_iterator");
    if constexpr (forward_iterator<_Iter>) {
      auto __tmp = *this;
      ++*this;
      return __tmp;
    } else if constexpr (requires (_Iter& __i) { { *__i++ } -> __can_reference; } ||
                         !__can_use_postfix_proxy<_Iter>) {
      return _VSTD::__unchecked_get<_Iter>(__hold_)++;
    } else {
      auto __p = __postfix_proxy{**this};
      ++*this;
      return __p;
    }
  }

  template<class _I2, sentinel_for<_Iter> _S2>
    requires sentinel_for<_Sent, _I2>
  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
    _LIBCPP_ASSERT_UNCATEGORIZED(!__x.__hold_.valueless_by_exception(),
                                 "Attempted to compare a valueless common_iterator");
    _LIBCPP_ASSERT_UNCATEGORIZED(!__y.__hold_.valueless_by_exception(),
                                 "Attempted to compare a valueless common_iterator");

    auto __x_index = __x.__hold_.index();
    auto __y_index = __y.__hold_.index();

    if (__x_index == __y_index)
      return true;

    if (__x_index == 0)
      return _VSTD::__unchecked_get<_Iter>(__x.__hold_) == _VSTD::__unchecked_get<_S2>(__y.__hold_);

    return _VSTD::__unchecked_get<_Sent>(__x.__hold_) == _VSTD::__unchecked_get<_I2>(__y.__hold_);
  }

  template<class _I2, sentinel_for<_Iter> _S2>
    requires sentinel_for<_Sent, _I2> && equality_comparable_with<_Iter, _I2>
  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
    _LIBCPP_ASSERT_UNCATEGORIZED(!__x.__hold_.valueless_by_exception(),
                                 "Attempted to compare a valueless common_iterator");
    _LIBCPP_ASSERT_UNCATEGORIZED(!__y.__hold_.valueless_by_exception(),
                                 "Attempted to compare a valueless common_iterator");

    auto __x_index = __x.__hold_.index();
    auto __y_index = __y.__hold_.index();

    if (__x_index == 1 && __y_index == 1)
      return true;

    if (__x_index == 0 && __y_index == 0)
      return  _VSTD::__unchecked_get<_Iter>(__x.__hold_) ==  _VSTD::__unchecked_get<_I2>(__y.__hold_);

    if (__x_index == 0)
      return  _VSTD::__unchecked_get<_Iter>(__x.__hold_) == _VSTD::__unchecked_get<_S2>(__y.__hold_);

    return _VSTD::__unchecked_get<_Sent>(__x.__hold_) ==  _VSTD::__unchecked_get<_I2>(__y.__hold_);
  }

  template<sized_sentinel_for<_Iter> _I2, sized_sentinel_for<_Iter> _S2>
    requires sized_sentinel_for<_Sent, _I2>
  _LIBCPP_HIDE_FROM_ABI
  friend constexpr iter_difference_t<_I2> operator-(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
    _LIBCPP_ASSERT_UNCATEGORIZED(!__x.__hold_.valueless_by_exception(),
                                 "Attempted to subtract from a valueless common_iterator");
    _LIBCPP_ASSERT_UNCATEGORIZED(!__y.__hold_.valueless_by_exception(),
                                 "Attempted to subtract a valueless common_iterator");

    auto __x_index = __x.__hold_.index();
    auto __y_index = __y.__hold_.index();

    if (__x_index == 1 && __y_index == 1)
      return 0;

    if (__x_index == 0 && __y_index == 0)
      return  _VSTD::__unchecked_get<_Iter>(__x.__hold_) - _VSTD::__unchecked_get<_I2>(__y.__hold_);

    if (__x_index == 0)
      return  _VSTD::__unchecked_get<_Iter>(__x.__hold_) - _VSTD::__unchecked_get<_S2>(__y.__hold_);

    return _VSTD::__unchecked_get<_Sent>(__x.__hold_) - _VSTD::__unchecked_get<_I2>(__y.__hold_);
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr iter_rvalue_reference_t<_Iter> iter_move(const common_iterator& __i)
    noexcept(noexcept(ranges::iter_move(std::declval<const _Iter&>())))
      requires input_iterator<_Iter>
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_Iter>(__i.__hold_),
                                 "Attempted to iter_move a non-dereferenceable common_iterator");
    return ranges::iter_move( _VSTD::__unchecked_get<_Iter>(__i.__hold_));
  }

  template<indirectly_swappable<_Iter> _I2, class _S2>
  _LIBCPP_HIDE_FROM_ABI friend constexpr void iter_swap(const common_iterator& __x, const common_iterator<_I2, _S2>& __y)
      noexcept(noexcept(ranges::iter_swap(std::declval<const _Iter&>(), std::declval<const _I2&>())))
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_Iter>(__x.__hold_),
                                 "Attempted to iter_swap a non-dereferenceable common_iterator");
    _LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_I2>(__y.__hold_),
                                 "Attempted to iter_swap a non-dereferenceable common_iterator");
    return ranges::iter_swap(_VSTD::__unchecked_get<_Iter>(__x.__hold_), _VSTD::__unchecked_get<_I2>(__y.__hold_));
  }
};

template<class _Iter, class _Sent>
struct incrementable_traits<common_iterator<_Iter, _Sent>> {
  using difference_type = iter_difference_t<_Iter>;
};

template<class _Iter>
concept __denotes_forward_iter =
  requires { typename iterator_traits<_Iter>::iterator_category; } &&
  derived_from<typename iterator_traits<_Iter>::iterator_category, forward_iterator_tag>;

template<class _Iter, class _Sent>
concept __common_iter_has_ptr_op = requires(const common_iterator<_Iter, _Sent>& __a) {
  __a.operator->();
};

template<class, class>
struct __arrow_type_or_void {
    using type = void;
};

template<class _Iter, class _Sent>
  requires __common_iter_has_ptr_op<_Iter, _Sent>
struct __arrow_type_or_void<_Iter, _Sent> {
    using type = decltype(std::declval<const common_iterator<_Iter, _Sent>&>().operator->());
};

template<input_iterator _Iter, class _Sent>
struct iterator_traits<common_iterator<_Iter, _Sent>> {
  using iterator_concept = _If<forward_iterator<_Iter>,
                               forward_iterator_tag,
                               input_iterator_tag>;
  using iterator_category = _If<__denotes_forward_iter<_Iter>,
                                forward_iterator_tag,
                                input_iterator_tag>;
  using pointer = typename __arrow_type_or_void<_Iter, _Sent>::type;
  using value_type = iter_value_t<_Iter>;
  using difference_type = iter_difference_t<_Iter>;
  using reference = iter_reference_t<_Iter>;
};

#endif // _LIBCPP_STD_VER >= 20
# 298 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ITERATOR_COMMON_ITERATOR_H
# 304 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/common_iterator.h" 3
#endif /* common_iterator.h expanded by -frewrite-includes */
# 684 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 684 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 685 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* counted_iterator.h expanded by -frewrite-includes */
#include <__iterator/counted_iterator.h>
#else /* counted_iterator.h expanded by -frewrite-includes */
# 685 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_COUNTED_ITERATOR_H
#define _LIBCPP___ITERATOR_COUNTED_ITERATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/assignable.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* common_with.h expanded by -frewrite-includes */
#include <__concepts/common_with.h>
#else /* common_with.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONCEPTS_COMMON_WITH_H
#define _LIBCPP___CONCEPTS_COMMON_WITH_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/common_reference_with.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_reference.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3

// [concept.common]

// clang-format off
template <class _Tp, class _Up>
concept common_with =
    same_as<common_type_t<_Tp, _Up>, common_type_t<_Up, _Tp>> &&
    requires {
        static_cast<common_type_t<_Tp, _Up>>(std::declval<_Tp>());
        static_cast<common_type_t<_Tp, _Up>>(std::declval<_Up>());
    } &&
    common_reference_with<
        add_lvalue_reference_t<const _Tp>,
        add_lvalue_reference_t<const _Up>> &&
    common_reference_with<
        add_lvalue_reference_t<common_type_t<_Tp, _Up>>,
        common_reference_t<
            add_lvalue_reference_t<const _Tp>,
            add_lvalue_reference_t<const _Up>>>;
// clang-format on

#endif // _LIBCPP_STD_VER >= 20
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CONCEPTS_COMMON_WITH_H
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__concepts/common_with.h" 3
#endif /* common_with.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* default_sentinel.h expanded by -frewrite-includes */
#include <__iterator/default_sentinel.h>
#else /* default_sentinel.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/default_sentinel.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_DEFAULT_SENTINEL_H
#define _LIBCPP___ITERATOR_DEFAULT_SENTINEL_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/default_sentinel.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/default_sentinel.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/default_sentinel.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/default_sentinel.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/default_sentinel.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/default_sentinel.h" 3

struct default_sentinel_t { };
inline constexpr default_sentinel_t default_sentinel{};

#endif // _LIBCPP_STD_VER >= 20
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/default_sentinel.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_DEFAULT_SENTINEL_H
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/default_sentinel.h" 3
#endif /* default_sentinel.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_pointer.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <compare>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#endif
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3

template<class>
struct __counted_iterator_concept {};

template<class _Iter>
  requires requires { typename _Iter::iterator_concept; }
struct __counted_iterator_concept<_Iter> {
  using iterator_concept = typename _Iter::iterator_concept;
};

template<class>
struct __counted_iterator_category {};

template<class _Iter>
  requires requires { typename _Iter::iterator_category; }
struct __counted_iterator_category<_Iter> {
  using iterator_category = typename _Iter::iterator_category;
};

template<class>
struct __counted_iterator_value_type {};

template<indirectly_readable _Iter>
struct __counted_iterator_value_type<_Iter> {
  using value_type = iter_value_t<_Iter>;
};

template<input_or_output_iterator _Iter>
class counted_iterator
  : public __counted_iterator_concept<_Iter>
  , public __counted_iterator_category<_Iter>
  , public __counted_iterator_value_type<_Iter>
{
public:
  _LIBCPP_NO_UNIQUE_ADDRESS _Iter __current_ = _Iter();
  iter_difference_t<_Iter> __count_ = 0;

  using iterator_type = _Iter;
  using difference_type = iter_difference_t<_Iter>;

  _LIBCPP_HIDE_FROM_ABI
  constexpr counted_iterator() requires default_initializable<_Iter> = default;

  _LIBCPP_HIDE_FROM_ABI
  constexpr counted_iterator(_Iter __iter, iter_difference_t<_Iter> __n)
   : __current_(_VSTD::move(__iter)), __count_(__n) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__n >= 0, "__n must not be negative.");
  }

  template<class _I2>
    requires convertible_to<const _I2&, _Iter>
  _LIBCPP_HIDE_FROM_ABI
  constexpr counted_iterator(const counted_iterator<_I2>& __other)
   : __current_(__other.__current_), __count_(__other.__count_) {}

  template<class _I2>
    requires assignable_from<_Iter&, const _I2&>
  _LIBCPP_HIDE_FROM_ABI
  constexpr counted_iterator& operator=(const counted_iterator<_I2>& __other) {
    __current_ = __other.__current_;
    __count_ = __other.__count_;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr const _Iter& base() const& noexcept { return __current_; }

  _LIBCPP_HIDE_FROM_ABI
  constexpr _Iter base() && { return _VSTD::move(__current_); }

  _LIBCPP_HIDE_FROM_ABI
  constexpr iter_difference_t<_Iter> count() const noexcept { return __count_; }

  _LIBCPP_HIDE_FROM_ABI
  constexpr decltype(auto) operator*() {
    _LIBCPP_ASSERT_UNCATEGORIZED(__count_ > 0, "Iterator is equal to or past end.");
    return *__current_;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr decltype(auto) operator*() const
    requires __dereferenceable<const _Iter>
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(__count_ > 0, "Iterator is equal to or past end.");
    return *__current_;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator->() const noexcept
    requires contiguous_iterator<_Iter>
  {
    return _VSTD::to_address(__current_);
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr counted_iterator& operator++() {
    _LIBCPP_ASSERT_UNCATEGORIZED(__count_ > 0, "Iterator already at or past end.");
    ++__current_;
    --__count_;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI
  decltype(auto) operator++(int) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__count_ > 0, "Iterator already at or past end.");
    --__count_;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try { return __current_++; }
    catch(...) { ++__count_; throw; }
#else
# 153 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
    return __current_++;
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 155 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr counted_iterator operator++(int)
    requires forward_iterator<_Iter>
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(__count_ > 0, "Iterator already at or past end.");
    counted_iterator __tmp = *this;
    ++*this;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr counted_iterator& operator--()
    requires bidirectional_iterator<_Iter>
  {
    --__current_;
    ++__count_;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr counted_iterator operator--(int)
    requires bidirectional_iterator<_Iter>
  {
    counted_iterator __tmp = *this;
    --*this;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr counted_iterator operator+(iter_difference_t<_Iter> __n) const
    requires random_access_iterator<_Iter>
  {
    return counted_iterator(__current_ + __n, __count_ - __n);
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr counted_iterator operator+(
    iter_difference_t<_Iter> __n, const counted_iterator& __x)
    requires random_access_iterator<_Iter>
  {
    return __x + __n;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr counted_iterator& operator+=(iter_difference_t<_Iter> __n)
    requires random_access_iterator<_Iter>
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(__n <= __count_, "Cannot advance iterator past end.");
    __current_ += __n;
    __count_ -= __n;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr counted_iterator operator-(iter_difference_t<_Iter> __n) const
    requires random_access_iterator<_Iter>
  {
    return counted_iterator(__current_ - __n, __count_ + __n);
  }

  template<common_with<_Iter> _I2>
  _LIBCPP_HIDE_FROM_ABI
  friend constexpr iter_difference_t<_I2> operator-(
    const counted_iterator& __lhs, const counted_iterator<_I2>& __rhs)
  {
    return __rhs.__count_ - __lhs.__count_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr iter_difference_t<_Iter> operator-(
    const counted_iterator& __lhs, default_sentinel_t)
  {
    return -__lhs.__count_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr iter_difference_t<_Iter> operator-(
    default_sentinel_t, const counted_iterator& __rhs)
  {
    return __rhs.__count_;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr counted_iterator& operator-=(iter_difference_t<_Iter> __n)
    requires random_access_iterator<_Iter>
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(-__n <= __count_,
                                 "Attempt to subtract too large of a size: "
                                 "counted_iterator would be decremented before the "
                                 "first element of its range.");
    __current_ -= __n;
    __count_ += __n;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr decltype(auto) operator[](iter_difference_t<_Iter> __n) const
    requires random_access_iterator<_Iter>
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(__n < __count_, "Subscript argument must be less than size.");
    return __current_[__n];
  }

  template<common_with<_Iter> _I2>
  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(
    const counted_iterator& __lhs, const counted_iterator<_I2>& __rhs)
  {
    return __lhs.__count_ == __rhs.__count_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(
    const counted_iterator& __lhs, default_sentinel_t)
  {
    return __lhs.__count_ == 0;
  }

  template<common_with<_Iter> _I2>
  _LIBCPP_HIDE_FROM_ABI friend constexpr strong_ordering operator<=>(
    const counted_iterator& __lhs, const counted_iterator<_I2>& __rhs)
  {
    return __rhs.__count_ <=> __lhs.__count_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr iter_rvalue_reference_t<_Iter> iter_move(const counted_iterator& __i)
    noexcept(noexcept(ranges::iter_move(__i.__current_)))
      requires input_iterator<_Iter>
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(__i.__count_ > 0, "Iterator must not be past end of range.");
    return ranges::iter_move(__i.__current_);
  }

  template<indirectly_swappable<_Iter> _I2>
  _LIBCPP_HIDE_FROM_ABI
  friend constexpr void iter_swap(const counted_iterator& __x, const counted_iterator<_I2>& __y)
    noexcept(noexcept(ranges::iter_swap(__x.__current_, __y.__current_)))
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(__x.__count_ > 0 && __y.__count_ > 0,
                                 "Iterators must not be past end of range.");
    return ranges::iter_swap(__x.__current_, __y.__current_);
  }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(counted_iterator);

template<input_iterator _Iter>
  requires same_as<_ITER_TRAITS<_Iter>, iterator_traits<_Iter>>
struct iterator_traits<counted_iterator<_Iter>> : iterator_traits<_Iter> {
  using pointer = conditional_t<contiguous_iterator<_Iter>,
                                add_pointer_t<iter_reference_t<_Iter>>, void>;
};

#endif // _LIBCPP_STD_VER >= 20
# 311 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ITERATOR_COUNTED_ITERATOR_H
# 317 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/counted_iterator.h" 3
#endif /* counted_iterator.h expanded by -frewrite-includes */
# 686 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* data.h expanded by -frewrite-includes */
#include <__iterator/data.h>
#else /* data.h expanded by -frewrite-includes */
# 686 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/data.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_DATA_H
#define _LIBCPP___ITERATOR_DATA_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/data.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/data.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/data.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/data.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/data.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/data.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/data.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/data.h" 3

template <class _Cont> constexpr
_LIBCPP_INLINE_VISIBILITY
auto data(_Cont& __c)
_NOEXCEPT_(noexcept(__c.data()))
-> decltype        (__c.data())
{ return            __c.data(); }

template <class _Cont> constexpr
_LIBCPP_INLINE_VISIBILITY
auto data(const _Cont& __c)
_NOEXCEPT_(noexcept(__c.data()))
-> decltype        (__c.data())
{ return            __c.data(); }

template <class _Tp, size_t _Sz>
_LIBCPP_INLINE_VISIBILITY
constexpr _Tp* data(_Tp (&__array)[_Sz]) noexcept { return __array; }

template <class _Ep>
_LIBCPP_INLINE_VISIBILITY
constexpr const _Ep* data(initializer_list<_Ep> __il) noexcept { return __il.begin(); }

#endif
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/data.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_DATA_H
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/data.h" 3
#endif /* data.h expanded by -frewrite-includes */
# 687 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/default_sentinel.h>
#endif /* expanded by -frewrite-includes */
# 687 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 688 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* distance.h expanded by -frewrite-includes */
#include <__iterator/distance.h>
#else /* distance.h expanded by -frewrite-includes */
# 688 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_DISTANCE_H
#define _LIBCPP___ITERATOR_DISTANCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* access.h expanded by -frewrite-includes */
#include <__ranges/access.h>
#else /* access.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_ACCESS_H
#define _LIBCPP___RANGES_ACCESS_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/class_or_enum.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* enable_borrowed_range.h expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#else /* enable_borrowed_range.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_borrowed_range.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_ENABLE_BORROWED_RANGE_H
#define _LIBCPP___RANGES_ENABLE_BORROWED_RANGE_H

// These customization variables are used in <span> and <string_view>. The
// separate header is used to avoid including the entire <ranges> header in
// <span> and <string_view>.

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_borrowed_range.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_borrowed_range.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_borrowed_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_borrowed_range.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_borrowed_range.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_borrowed_range.h" 3

namespace ranges {

// [range.range], ranges

template <class>
inline constexpr bool enable_borrowed_range = false;

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_borrowed_range.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_ENABLE_BORROWED_RANGE_H
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_borrowed_range.h" 3
#endif /* enable_borrowed_range.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* auto_cast.h expanded by -frewrite-includes */
#include <__utility/auto_cast.h>
#else /* auto_cast.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/auto_cast.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_AUTO_CAST_H
#define _LIBCPP___UTILITY_AUTO_CAST_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/auto_cast.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/auto_cast.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/auto_cast.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/auto_cast.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/auto_cast.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/auto_cast.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/auto_cast.h" 3

#define _LIBCPP_AUTO_CAST(expr) static_cast<::std::__decay_t<decltype((expr))> >(expr)

#endif // _LIBCPP___UTILITY_AUTO_CAST_H
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/auto_cast.h" 3
#endif /* auto_cast.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3

namespace ranges {
  template <class _Tp>
  concept __can_borrow =
    is_lvalue_reference_v<_Tp> || enable_borrowed_range<remove_cvref_t<_Tp>>;
} // namespace ranges

// [range.access.begin]

namespace ranges {
namespace __begin {
  template <class _Tp>
  concept __member_begin =
    __can_borrow<_Tp> &&
    __workaround_52970<_Tp> &&
    requires(_Tp&& __t) {
      { _LIBCPP_AUTO_CAST(__t.begin()) } -> input_or_output_iterator;
    };

  void begin(auto&) = delete;
  void begin(const auto&) = delete;

  template <class _Tp>
  concept __unqualified_begin =
    !__member_begin<_Tp> &&
    __can_borrow<_Tp> &&
    __class_or_enum<remove_cvref_t<_Tp>> &&
    requires(_Tp && __t) {
      { _LIBCPP_AUTO_CAST(begin(__t)) } -> input_or_output_iterator;
    };

  struct __fn {
    template <class _Tp>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[]) const noexcept
      requires (sizeof(_Tp) >= 0)  // Disallow incomplete element types.
    {
      return __t + 0;
    }

    template <class _Tp, size_t _Np>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[_Np]) const noexcept
      requires (sizeof(_Tp) >= 0)  // Disallow incomplete element types.
    {
      return __t + 0;
    }

    template <class _Tp>
      requires __member_begin<_Tp>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
      noexcept(noexcept(_LIBCPP_AUTO_CAST(__t.begin())))
    {
      return _LIBCPP_AUTO_CAST(__t.begin());
    }

    template <class _Tp>
      requires __unqualified_begin<_Tp>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
      noexcept(noexcept(_LIBCPP_AUTO_CAST(begin(__t))))
    {
      return _LIBCPP_AUTO_CAST(begin(__t));
    }

    void operator()(auto&&) const = delete;
  };
} // namespace __begin

inline namespace __cpo {
  inline constexpr auto begin = __begin::__fn{};
} // namespace __cpo
} // namespace ranges

// [range.range]

namespace ranges {
  template <class _Tp>
  using iterator_t = decltype(ranges::begin(std::declval<_Tp&>()));
} // namespace ranges

// [range.access.end]

namespace ranges {
namespace __end {
  template <class _Tp>
  concept __member_end =
    __can_borrow<_Tp> &&
    __workaround_52970<_Tp> &&
    requires(_Tp&& __t) {
      typename iterator_t<_Tp>;
      { _LIBCPP_AUTO_CAST(__t.end()) } -> sentinel_for<iterator_t<_Tp>>;
    };

  void end(auto&) = delete;
  void end(const auto&) = delete;

  template <class _Tp>
  concept __unqualified_end =
    !__member_end<_Tp> &&
    __can_borrow<_Tp> &&
    __class_or_enum<remove_cvref_t<_Tp>> &&
    requires(_Tp && __t) {
      typename iterator_t<_Tp>;
      { _LIBCPP_AUTO_CAST(end(__t)) } -> sentinel_for<iterator_t<_Tp>>;
    };

  struct __fn {
    template <class _Tp, size_t _Np>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[_Np]) const noexcept
      requires (sizeof(_Tp) >= 0)  // Disallow incomplete element types.
    {
      return __t + _Np;
    }

    template <class _Tp>
      requires __member_end<_Tp>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
      noexcept(noexcept(_LIBCPP_AUTO_CAST(__t.end())))
    {
      return _LIBCPP_AUTO_CAST(__t.end());
    }

    template <class _Tp>
      requires __unqualified_end<_Tp>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
      noexcept(noexcept(_LIBCPP_AUTO_CAST(end(__t))))
    {
      return _LIBCPP_AUTO_CAST(end(__t));
    }

    void operator()(auto&&) const = delete;
  };
} // namespace __end

inline namespace __cpo {
  inline constexpr auto end = __end::__fn{};
} // namespace __cpo
} // namespace ranges

// [range.access.cbegin]

namespace ranges {
namespace __cbegin {
  struct __fn {
    template <class _Tp>
      requires is_lvalue_reference_v<_Tp&&>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Tp&& __t) const
      noexcept(noexcept(ranges::begin(static_cast<const remove_reference_t<_Tp>&>(__t))))
      -> decltype(      ranges::begin(static_cast<const remove_reference_t<_Tp>&>(__t)))
      { return          ranges::begin(static_cast<const remove_reference_t<_Tp>&>(__t)); }

    template <class _Tp>
      requires is_rvalue_reference_v<_Tp&&>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Tp&& __t) const
      noexcept(noexcept(ranges::begin(static_cast<const _Tp&&>(__t))))
      -> decltype(      ranges::begin(static_cast<const _Tp&&>(__t)))
      { return          ranges::begin(static_cast<const _Tp&&>(__t)); }
  };
} // namespace __cbegin

inline namespace __cpo {
  inline constexpr auto cbegin = __cbegin::__fn{};
} // namespace __cpo
} // namespace ranges

// [range.access.cend]

namespace ranges {
namespace __cend {
  struct __fn {
    template <class _Tp>
      requires is_lvalue_reference_v<_Tp&&>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Tp&& __t) const
      noexcept(noexcept(ranges::end(static_cast<const remove_reference_t<_Tp>&>(__t))))
      -> decltype(      ranges::end(static_cast<const remove_reference_t<_Tp>&>(__t)))
      { return          ranges::end(static_cast<const remove_reference_t<_Tp>&>(__t)); }

    template <class _Tp>
      requires is_rvalue_reference_v<_Tp&&>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Tp&& __t) const
      noexcept(noexcept(ranges::end(static_cast<const _Tp&&>(__t))))
      -> decltype(      ranges::end(static_cast<const _Tp&&>(__t)))
      { return          ranges::end(static_cast<const _Tp&&>(__t)); }
  };
} // namespace __cend

inline namespace __cpo {
  inline constexpr auto cend = __cend::__fn{};
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_ACCESS_H
# 231 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/access.h" 3
#endif /* access.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* concepts.h expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#else /* concepts.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_CONCEPTS_H
#define _LIBCPP___RANGES_CONCEPTS_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/movable.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* data.h expanded by -frewrite-includes */
#include <__ranges/data.h>
#else /* data.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_DATA_H
#define _LIBCPP___RANGES_DATA_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/class_or_enum.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_pointer.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* remove_pointer.h expanded by -frewrite-includes */
#include <__type_traits/remove_pointer.h>
#else /* remove_pointer.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_pointer.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_POINTER_H
#define _LIBCPP___TYPE_TRAITS_REMOVE_POINTER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_pointer.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_pointer.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_pointer.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_pointer.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_pointer.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__remove_pointer)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_pointer.h" 3
template <class _Tp>
struct remove_pointer {
  using type _LIBCPP_NODEBUG = __remove_pointer(_Tp);
};

template <class _Tp>
using __remove_pointer_t = __remove_pointer(_Tp);
#else
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_pointer.h" 3
// clang-format off
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer                      {typedef _LIBCPP_NODEBUG _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp*>                {typedef _LIBCPP_NODEBUG _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const>          {typedef _LIBCPP_NODEBUG _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* volatile>       {typedef _LIBCPP_NODEBUG _Tp type;};
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const volatile> {typedef _LIBCPP_NODEBUG _Tp type;};
// clang-format on

template <class _Tp>
using __remove_pointer_t = typename remove_pointer<_Tp>::type;
#endif // !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__remove_pointer)
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_pointer.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_pointer.h" 3
template <class _Tp>
using remove_pointer_t = __remove_pointer_t<_Tp>;
#endif
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_pointer.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_REMOVE_POINTER_H
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_pointer.h" 3
#endif /* remove_pointer.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/auto_cast.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3

// [range.prim.data]

namespace ranges {
namespace __data {
  template <class _Tp>
  concept __ptr_to_object = is_pointer_v<_Tp> && is_object_v<remove_pointer_t<_Tp>>;

  template <class _Tp>
  concept __member_data =
    __can_borrow<_Tp> &&
    __workaround_52970<_Tp> &&
    requires(_Tp&& __t) {
      { _LIBCPP_AUTO_CAST(__t.data()) } -> __ptr_to_object;
    };

  template <class _Tp>
  concept __ranges_begin_invocable =
    !__member_data<_Tp> &&
    __can_borrow<_Tp> &&
    requires(_Tp&& __t) {
      { ranges::begin(__t) } -> contiguous_iterator;
    };

  struct __fn {
    template <__member_data _Tp>
    _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Tp&& __t) const
        noexcept(noexcept(__t.data())) {
      return __t.data();
    }

    template<__ranges_begin_invocable _Tp>
    _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Tp&& __t) const
        noexcept(noexcept(std::to_address(ranges::begin(__t)))) {
      return std::to_address(ranges::begin(__t));
    }
  };
} // namespace __data

inline namespace __cpo {
  inline constexpr auto data = __data::__fn{};
} // namespace __cpo
} // namespace ranges

// [range.prim.cdata]

namespace ranges {
namespace __cdata {
  struct __fn {
    template <class _Tp>
      requires is_lvalue_reference_v<_Tp&&>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Tp&& __t) const
      noexcept(noexcept(ranges::data(static_cast<const remove_reference_t<_Tp>&>(__t))))
      -> decltype(      ranges::data(static_cast<const remove_reference_t<_Tp>&>(__t)))
      { return          ranges::data(static_cast<const remove_reference_t<_Tp>&>(__t)); }

    template <class _Tp>
      requires is_rvalue_reference_v<_Tp&&>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Tp&& __t) const
      noexcept(noexcept(ranges::data(static_cast<const _Tp&&>(__t))))
      -> decltype(      ranges::data(static_cast<const _Tp&&>(__t)))
      { return          ranges::data(static_cast<const _Tp&&>(__t)); }
  };
} // namespace __cdata

inline namespace __cpo {
  inline constexpr auto cdata = __cdata::__fn{};
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_DATA_H
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/data.h" 3
#endif /* data.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* enable_view.h expanded by -frewrite-includes */
#include <__ranges/enable_view.h>
#else /* enable_view.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_ENABLE_VIEW_H
#define _LIBCPP___RANGES_ENABLE_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/derived_from.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_class.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3

namespace ranges {

struct view_base { };

template<class _Derived>
  requires is_class_v<_Derived> && same_as<_Derived, remove_cv_t<_Derived>>
class view_interface;

template<class _Op, class _Yp>
  requires is_convertible_v<_Op*, view_interface<_Yp>*>
void __is_derived_from_view_interface(const _Op*, const view_interface<_Yp>*);

template <class _Tp>
inline constexpr bool enable_view = derived_from<_Tp, view_base> ||
  requires { ranges::__is_derived_from_view_interface((_Tp*)nullptr, (_Tp*)nullptr); };

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_ENABLE_VIEW_H
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/enable_view.h" 3
#endif /* enable_view.h expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* size.h expanded by -frewrite-includes */
#include <__ranges/size.h>
#else /* size.h expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_SIZE_H
#define _LIBCPP___RANGES_SIZE_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/class_or_enum.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_signed.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* make_unsigned.h expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#else /* make_unsigned.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_MAKE_UNSIGNED_H
#define _LIBCPP___TYPE_TRAITS_MAKE_UNSIGNED_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/apply_cv.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_enum.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_unsigned.h expanded by -frewrite-includes */
#include <__type_traits/is_unsigned.h>
#else /* is_unsigned.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_UNSIGNED_H
#define _LIBCPP___TYPE_TRAITS_IS_UNSIGNED_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_unsigned)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_unsigned : _BoolConstant<__is_unsigned(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3
template <class _Tp>
inline constexpr bool is_unsigned_v = __is_unsigned(_Tp);
#  endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3

#else // __has_builtin(__is_unsigned)
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3

template <class _Tp, bool = is_integral<_Tp>::value>
struct __libcpp_is_unsigned_impl : public _BoolConstant<(_Tp(0) < _Tp(-1))> {};

template <class _Tp>
struct __libcpp_is_unsigned_impl<_Tp, false> : public false_type {}; // floating point

template <class _Tp, bool = is_arithmetic<_Tp>::value>
struct __libcpp_is_unsigned : public __libcpp_is_unsigned_impl<_Tp> {};

template <class _Tp>
struct __libcpp_is_unsigned<_Tp, false> : public false_type {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_unsigned : public __libcpp_is_unsigned<_Tp> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3
template <class _Tp>
inline constexpr bool is_unsigned_v = is_unsigned<_Tp>::value;
#  endif
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3

#endif // __has_builtin(__is_unsigned)
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_UNSIGNED_H
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unsigned.h" 3
#endif /* is_unsigned.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/nat.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/type_list.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__make_unsigned)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3

template <class _Tp>
using __make_unsigned_t = __make_unsigned(_Tp);

#else
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
// clang-format off
typedef __type_list<unsigned char,
        __type_list<unsigned short,
        __type_list<unsigned int,
        __type_list<unsigned long,
        __type_list<unsigned long long,
#  ifndef _LIBCPP_HAS_NO_INT128
        __type_list<__uint128_t,
#  endif
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
        __nat
#  ifndef _LIBCPP_HAS_NO_INT128
        >
#  endif
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
        > > > > > __unsigned_types;
// clang-format on

template <class _Tp, bool = is_integral<_Tp>::value || is_enum<_Tp>::value>
struct __make_unsigned{};

template <class _Tp>
struct __make_unsigned<_Tp, true> {
  typedef typename __find_first<__unsigned_types, sizeof(_Tp)>::type type;
};

// clang-format off
template <> struct __make_unsigned<bool,               true> {};
template <> struct __make_unsigned<  signed short,     true> {typedef unsigned short     type;};
template <> struct __make_unsigned<unsigned short,     true> {typedef unsigned short     type;};
template <> struct __make_unsigned<  signed int,       true> {typedef unsigned int       type;};
template <> struct __make_unsigned<unsigned int,       true> {typedef unsigned int       type;};
template <> struct __make_unsigned<  signed long,      true> {typedef unsigned long      type;};
template <> struct __make_unsigned<unsigned long,      true> {typedef unsigned long      type;};
template <> struct __make_unsigned<  signed long long, true> {typedef unsigned long long type;};
template <> struct __make_unsigned<unsigned long long, true> {typedef unsigned long long type;};
#  ifndef _LIBCPP_HAS_NO_INT128
template <> struct __make_unsigned<__int128_t,         true> {typedef __uint128_t        type;};
template <> struct __make_unsigned<__uint128_t,        true> {typedef __uint128_t        type;};
#  endif
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
// clang-format on

template <class _Tp>
using __make_unsigned_t = __apply_cv_t<_Tp, typename __make_unsigned<__remove_cv_t<_Tp> >::type>;

#endif // __has_builtin(__make_unsigned)
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3

template <class _Tp>
struct make_unsigned {
  using type _LIBCPP_NODEBUG = __make_unsigned_t<_Tp>;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
template <class _Tp>
using make_unsigned_t = __make_unsigned_t<_Tp>;
#endif
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3

#ifndef _LIBCPP_CXX03_LANG
template <class _Tp>
_LIBCPP_HIDE_FROM_ABI constexpr __make_unsigned_t<_Tp> __to_unsigned_like(_Tp __x) noexcept {
  return static_cast<__make_unsigned_t<_Tp> >(__x);
}
#endif
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3

template <class _Tp, class _Up>
using __copy_unsigned_t = __conditional_t<is_unsigned<_Tp>::value, __make_unsigned_t<_Up>, _Up>;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_MAKE_UNSIGNED_H
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_unsigned.h" 3
#endif /* make_unsigned.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/auto_cast.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3

namespace ranges {
  template<class>
  inline constexpr bool disable_sized_range = false;
} // namespace ranges

// [range.prim.size]

namespace ranges {
namespace __size {
void size(auto&) = delete;
void size(const auto&) = delete;

template <class _Tp>
concept __size_enabled = !disable_sized_range<remove_cvref_t<_Tp>>;

template <class _Tp>
concept __member_size =
  __size_enabled<_Tp> &&
  __workaround_52970<_Tp> &&
  requires(_Tp&& __t) {
    { _LIBCPP_AUTO_CAST(__t.size()) } -> __integer_like;
  };

template <class _Tp>
concept __unqualified_size =
  __size_enabled<_Tp> &&
  !__member_size<_Tp> &&
  __class_or_enum<remove_cvref_t<_Tp>> &&
  requires(_Tp&& __t) {
    { _LIBCPP_AUTO_CAST(size(__t)) } -> __integer_like;
  };

template <class _Tp>
concept __difference =
  !__member_size<_Tp> &&
  !__unqualified_size<_Tp> &&
  __class_or_enum<remove_cvref_t<_Tp>> &&
  requires(_Tp&& __t) {
    { ranges::begin(__t) } -> forward_iterator;
    { ranges::end(__t) } -> sized_sentinel_for<decltype(ranges::begin(std::declval<_Tp>()))>;
  };

struct __fn {

  // `[range.prim.size]`: the array case (for rvalues).
  template <class _Tp, size_t _Sz>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr size_t operator()(_Tp (&&)[_Sz]) const noexcept {
    return _Sz;
  }

  // `[range.prim.size]`: the array case (for lvalues).
  template <class _Tp, size_t _Sz>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr size_t operator()(_Tp (&)[_Sz]) const noexcept {
    return _Sz;
  }

  // `[range.prim.size]`: `auto(t.size())` is a valid expression.
  template <__member_size _Tp>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __integer_like auto operator()(_Tp&& __t) const
      noexcept(noexcept(_LIBCPP_AUTO_CAST(__t.size()))) {
    return _LIBCPP_AUTO_CAST(__t.size());
  }

  // `[range.prim.size]`: `auto(size(t))` is a valid expression.
  template <__unqualified_size _Tp>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __integer_like auto operator()(_Tp&& __t) const
      noexcept(noexcept(_LIBCPP_AUTO_CAST(size(__t)))) {
    return _LIBCPP_AUTO_CAST(size(__t));
  }

  // [range.prim.size]: the `to-unsigned-like` case.
  template <__difference _Tp>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
    noexcept(noexcept(std::__to_unsigned_like(ranges::end(__t) - ranges::begin(__t))))
    -> decltype(      std::__to_unsigned_like(ranges::end(__t) - ranges::begin(__t)))
    { return          std::__to_unsigned_like(ranges::end(__t) - ranges::begin(__t));
  }
};

} // namespace __size

inline namespace __cpo {
  inline constexpr auto size = __size::__fn{};
} // namespace __cpo
} // namespace ranges

// [range.prim.ssize]

namespace ranges {
namespace __ssize {
struct __fn {
  template<class _Tp>
    requires requires (_Tp&& __t) { ranges::size(__t); }
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr integral auto operator()(_Tp&& __t) const
    noexcept(noexcept(ranges::size(__t))) {
    using _Signed = make_signed_t<decltype(ranges::size(__t))>;
    if constexpr (sizeof(ptrdiff_t) > sizeof(_Signed))
      return static_cast<ptrdiff_t>(ranges::size(__t));
    else
      return static_cast<_Signed>(ranges::size(__t));
  }
};
} // namespace __ssize

inline namespace __cpo {
  inline constexpr auto ssize = __ssize::__fn{};
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_SIZE_H
# 149 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/size.h" 3
#endif /* size.h expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_pointer.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#endif
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3

namespace ranges {

  // [range.range]

  template <class _Tp>
  concept range = requires(_Tp& __t) {
    ranges::begin(__t); // sometimes equality-preserving
    ranges::end(__t);
  };

  template <class _Tp>
  concept input_range = range<_Tp> && input_iterator<iterator_t<_Tp>>;

  template<class _Range>
  concept borrowed_range = range<_Range> &&
    (is_lvalue_reference_v<_Range> || enable_borrowed_range<remove_cvref_t<_Range>>);

  // `iterator_t` defined in <__ranges/access.h>

  template <range _Rp>
  using sentinel_t = decltype(ranges::end(std::declval<_Rp&>()));

  template <range _Rp>
  using range_difference_t = iter_difference_t<iterator_t<_Rp>>;

  template <range _Rp>
  using range_value_t = iter_value_t<iterator_t<_Rp>>;

  template <range _Rp>
  using range_reference_t = iter_reference_t<iterator_t<_Rp>>;

  template <range _Rp>
  using range_rvalue_reference_t = iter_rvalue_reference_t<iterator_t<_Rp>>;

  template <range _Rp>
  using range_common_reference_t = iter_common_reference_t<iterator_t<_Rp>>;

  // [range.sized]
  template <class _Tp>
  concept sized_range = range<_Tp> && requires(_Tp& __t) { ranges::size(__t); };

  template<sized_range _Rp>
  using range_size_t = decltype(ranges::size(std::declval<_Rp&>()));

  // `disable_sized_range` defined in `<__ranges/size.h>`

  // [range.view], views

  // `enable_view` defined in <__ranges/enable_view.h>
  // `view_base` defined in <__ranges/enable_view.h>

  template <class _Tp>
  concept view =
    range<_Tp> &&
    movable<_Tp> &&
    enable_view<_Tp>;

  template <class _Range>
  concept __simple_view =
    view<_Range> && range<const _Range> &&
    same_as<iterator_t<_Range>, iterator_t<const _Range>> &&
    same_as<sentinel_t<_Range>, sentinel_t<const _Range>>;

  // [range.refinements], other range refinements
  template <class _Rp, class _Tp>
  concept output_range = range<_Rp> && output_iterator<iterator_t<_Rp>, _Tp>;

  template <class _Tp>
  concept forward_range = input_range<_Tp> && forward_iterator<iterator_t<_Tp>>;

  template <class _Tp>
  concept bidirectional_range = forward_range<_Tp> && bidirectional_iterator<iterator_t<_Tp>>;

  template <class _Tp>
  concept random_access_range =
      bidirectional_range<_Tp> && random_access_iterator<iterator_t<_Tp>>;

  template<class _Tp>
  concept contiguous_range =
    random_access_range<_Tp> &&
    contiguous_iterator<iterator_t<_Tp>> &&
    requires(_Tp& __t) {
      { ranges::data(__t) } -> same_as<add_pointer_t<range_reference_t<_Tp>>>;
    };

  template <class _Tp>
  concept common_range = range<_Tp> && same_as<iterator_t<_Tp>, sentinel_t<_Tp>>;

  template <class _Tp>
  inline constexpr bool __is_std_initializer_list = false;

  template <class _Ep>
  inline constexpr bool __is_std_initializer_list<initializer_list<_Ep>> = true;

  template <class _Tp>
  concept viewable_range =
    range<_Tp> &&
    ((view<remove_cvref_t<_Tp>> && constructible_from<remove_cvref_t<_Tp>, _Tp>) ||
     (!view<remove_cvref_t<_Tp>> &&
      (is_lvalue_reference_v<_Tp> ||
       (movable<remove_reference_t<_Tp>> && !__is_std_initializer_list<remove_cvref_t<_Tp>>))));

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 147 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_CONCEPTS_H
# 151 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/concepts.h" 3
#endif /* concepts.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIter>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
typename iterator_traits<_InputIter>::difference_type
__distance(_InputIter __first, _InputIter __last, input_iterator_tag)
{
    typename iterator_traits<_InputIter>::difference_type __r(0);
    for (; __first != __last; ++__first)
        ++__r;
    return __r;
}

template <class _RandIter>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
typename iterator_traits<_RandIter>::difference_type
__distance(_RandIter __first, _RandIter __last, random_access_iterator_tag)
{
    return __last - __first;
}

template <class _InputIter>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
typename iterator_traits<_InputIter>::difference_type
distance(_InputIter __first, _InputIter __last)
{
    return _VSTD::__distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3

// [range.iter.op.distance]

namespace ranges {
namespace __distance {

struct __fn {
  template<class _Ip, sentinel_for<_Ip> _Sp>
    requires (!sized_sentinel_for<_Sp, _Ip>)
  _LIBCPP_HIDE_FROM_ABI
  constexpr iter_difference_t<_Ip> operator()(_Ip __first, _Sp __last) const {
    iter_difference_t<_Ip> __n = 0;
    while (__first != __last) {
      ++__first;
      ++__n;
    }
    return __n;
  }

  template<class _Ip, sized_sentinel_for<decay_t<_Ip>> _Sp>
  _LIBCPP_HIDE_FROM_ABI
  constexpr iter_difference_t<_Ip> operator()(_Ip&& __first, _Sp __last) const {
    if constexpr (sized_sentinel_for<_Sp, __remove_cvref_t<_Ip>>) {
      return __last - __first;
    } else {
      return __last - decay_t<_Ip>(__first);
    }
  }

  template<range _Rp>
  _LIBCPP_HIDE_FROM_ABI
  constexpr range_difference_t<_Rp> operator()(_Rp&& __r) const {
    if constexpr (sized_range<_Rp>) {
      return static_cast<range_difference_t<_Rp>>(ranges::size(__r));
    } else {
      return operator()(ranges::begin(__r), ranges::end(__r));
    }
  }
};

} // namespace __distance

inline namespace __cpo {
  inline constexpr auto distance = __distance::__fn{};
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_DISTANCE_H
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/distance.h" 3
#endif /* distance.h expanded by -frewrite-includes */
# 689 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* empty.h expanded by -frewrite-includes */
#include <__iterator/empty.h>
#else /* empty.h expanded by -frewrite-includes */
# 689 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/empty.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_EMPTY_H
#define _LIBCPP___ITERATOR_EMPTY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/empty.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/empty.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/empty.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/empty.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/empty.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/empty.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/empty.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/empty.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/empty.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/empty.h" 3

template <class _Cont>
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
constexpr auto empty(const _Cont& __c)
_NOEXCEPT_(noexcept(__c.empty()))
-> decltype        (__c.empty())
{ return            __c.empty(); }

template <class _Tp, size_t _Sz>
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
constexpr bool empty(const _Tp (&)[_Sz]) noexcept { return false; }

template <class _Ep>
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
constexpr bool empty(initializer_list<_Ep> __il) noexcept { return __il.size() == 0; }

#endif // _LIBCPP_STD_VER >= 17
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/empty.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_EMPTY_H
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/empty.h" 3
#endif /* empty.h expanded by -frewrite-includes */
# 690 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* erase_if_container.h expanded by -frewrite-includes */
#include <__iterator/erase_if_container.h>
#else /* erase_if_container.h expanded by -frewrite-includes */
# 690 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/erase_if_container.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_ERASE_IF_CONTAINER_H
#define _LIBCPP___ITERATOR_ERASE_IF_CONTAINER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/erase_if_container.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/erase_if_container.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/erase_if_container.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/erase_if_container.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/erase_if_container.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/erase_if_container.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/erase_if_container.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Container, class _Predicate>
_LIBCPP_HIDE_FROM_ABI
typename _Container::size_type
__libcpp_erase_if_container(_Container& __c, _Predicate& __pred) {
  typename _Container::size_type __old_size = __c.size();

  const typename _Container::iterator __last = __c.end();
  for (typename _Container::iterator __iter = __c.begin(); __iter != __last;) {
    if (__pred(*__iter))
      __iter = __c.erase(__iter);
    else
      ++__iter;
  }

  return __old_size - __c.size();
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ITERATOR_ERASE_IF_CONTAINER_H
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/erase_if_container.h" 3
#endif /* erase_if_container.h expanded by -frewrite-includes */
# 691 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* front_insert_iterator.h expanded by -frewrite-includes */
#include <__iterator/front_insert_iterator.h>
#else /* front_insert_iterator.h expanded by -frewrite-includes */
# 691 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_FRONT_INSERT_ITERATOR_H
#define _LIBCPP___ITERATOR_FRONT_INSERT_ITERATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Container>
class _LIBCPP_TEMPLATE_VIS front_insert_iterator
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
    : public iterator<output_iterator_tag, void, void, void, void>
#endif
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
{
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
    _Container* container;
public:
    typedef output_iterator_tag iterator_category;
    typedef void value_type;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
    typedef ptrdiff_t difference_type;
#else
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
    typedef void difference_type;
#endif
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
    typedef void pointer;
    typedef void reference;
    typedef _Container container_type;

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit front_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator=(const typename _Container::value_type& __value)
        {container->push_front(__value); return *this;}
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator=(typename _Container::value_type&& __value)
        {container->push_front(_VSTD::move(__value)); return *this;}
#endif // _LIBCPP_CXX03_LANG
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator*()     {return *this;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator++()    {return *this;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator  operator++(int) {return *this;}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(front_insert_iterator);

template <class _Container>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
front_insert_iterator<_Container>
front_inserter(_Container& __x)
{
    return front_insert_iterator<_Container>(__x);
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ITERATOR_FRONT_INSERT_ITERATOR_H
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/front_insert_iterator.h" 3
#endif /* front_insert_iterator.h expanded by -frewrite-includes */
# 692 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 692 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 693 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* indirectly_comparable.h expanded by -frewrite-includes */
#include <__iterator/indirectly_comparable.h>
#else /* indirectly_comparable.h expanded by -frewrite-includes */
# 693 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/indirectly_comparable.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_INDIRECTLY_COMPARABLE_H
#define _LIBCPP___ITERATOR_INDIRECTLY_COMPARABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/indirectly_comparable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/indirectly_comparable.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* identity.h expanded by -frewrite-includes */
#include <__functional/identity.h>
#else /* identity.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/indirectly_comparable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/identity.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_IDENTITY_H
#define _LIBCPP___FUNCTIONAL_IDENTITY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/identity.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/identity.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/identity.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/identity.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/identity.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/identity.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/identity.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/identity.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/identity.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct __is_identity : false_type {};

struct __identity {
  template <class _Tp>
  _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp&& operator()(_Tp&& __t) const _NOEXCEPT {
    return std::forward<_Tp>(__t);
  }

  using is_transparent = void;
};

template <>
struct __is_identity<__identity> : true_type {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/identity.h" 3

struct identity {
    template<class _Tp>
    _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Tp&& operator()(_Tp&& __t) const noexcept
    {
        return _VSTD::forward<_Tp>(__t);
    }

    using is_transparent = void;
};

template <>
struct __is_identity<identity> : true_type {};

#endif // _LIBCPP_STD_VER >= 20
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/identity.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_IDENTITY_H
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/identity.h" 3
#endif /* identity.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/indirectly_comparable.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/indirectly_comparable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/indirectly_comparable.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* projected.h expanded by -frewrite-includes */
#include <__iterator/projected.h>
#else /* projected.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/indirectly_comparable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/projected.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_PROJECTED_H
#define _LIBCPP___ITERATOR_PROJECTED_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/projected.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/projected.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/projected.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/projected.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h> // iter_difference_t
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/projected.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/projected.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/projected.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/projected.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/projected.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/projected.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/projected.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/projected.h" 3

template <class _It, class _Proj>
struct __projected_impl {
  struct __type {
    using value_type = remove_cvref_t<indirect_result_t<_Proj&, _It>>;
    indirect_result_t<_Proj&, _It> operator*() const; // not defined
  };
};

template <weakly_incrementable _It, class _Proj>
struct __projected_impl<_It, _Proj> {
  struct __type {
    using value_type      = remove_cvref_t<indirect_result_t<_Proj&, _It>>;
    using difference_type = iter_difference_t<_It>;
    indirect_result_t<_Proj&, _It> operator*() const; // not defined
  };
};

// Note that we implement std::projected in a way that satisfies P2538R1 even in standard
// modes before C++26 to avoid breaking the ABI between standard modes (even though ABI
// breaks with std::projected are expected to have essentially no impact).
template <indirectly_readable _It, indirectly_regular_unary_invocable<_It> _Proj>
using projected = typename __projected_impl<_It, _Proj>::__type;

#endif // _LIBCPP_STD_VER >= 20
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/projected.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_PROJECTED_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/projected.h" 3
#endif /* projected.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/indirectly_comparable.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/indirectly_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/indirectly_comparable.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/indirectly_comparable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/indirectly_comparable.h" 3

template <class _I1, class _I2, class _Rp, class _P1 = identity, class _P2 = identity>
concept indirectly_comparable =
  indirect_binary_predicate<_Rp, projected<_I1, _P1>, projected<_I2, _P2>>;

#endif // _LIBCPP_STD_VER >= 20
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/indirectly_comparable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_INDIRECTLY_COMPARABLE_H
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/indirectly_comparable.h" 3
#endif /* indirectly_comparable.h expanded by -frewrite-includes */
# 694 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* insert_iterator.h expanded by -frewrite-includes */
#include <__iterator/insert_iterator.h>
#else /* insert_iterator.h expanded by -frewrite-includes */
# 694 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_INSERT_ITERATOR_H
#define _LIBCPP___ITERATOR_INSERT_ITERATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
template <class _Container>
using __insert_iterator_iter_t = ranges::iterator_t<_Container>;
#else
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
template <class _Container>
using __insert_iterator_iter_t = typename _Container::iterator;
#endif
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Container>
class _LIBCPP_TEMPLATE_VIS insert_iterator
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
    : public iterator<output_iterator_tag, void, void, void, void>
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
{
_LIBCPP_SUPPRESS_DEPRECATED_POP
protected:
    _Container* container;
    __insert_iterator_iter_t<_Container> iter;
public:
    typedef output_iterator_tag iterator_category;
    typedef void value_type;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
    typedef ptrdiff_t difference_type;
#else
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
    typedef void difference_type;
#endif
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
    typedef void pointer;
    typedef void reference;
    typedef _Container container_type;

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator(_Container& __x, __insert_iterator_iter_t<_Container> __i)
        : container(_VSTD::addressof(__x)), iter(__i) {}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator=(const typename _Container::value_type& __value)
        {iter = container->insert(iter, __value); ++iter; return *this;}
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator=(typename _Container::value_type&& __value)
        {iter = container->insert(iter, _VSTD::move(__value)); ++iter; return *this;}
#endif // _LIBCPP_CXX03_LANG
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator*()        {return *this;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator++()       {return *this;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator++(int)    {return *this;}
};

template <class _Container>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
insert_iterator<_Container>
inserter(_Container& __x, __insert_iterator_iter_t<_Container> __i)
{
    return insert_iterator<_Container>(__x, __i);
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ITERATOR_INSERT_ITERATOR_H
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/insert_iterator.h" 3
#endif /* insert_iterator.h expanded by -frewrite-includes */
# 695 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* istream_iterator.h expanded by -frewrite-includes */
#include <__iterator/istream_iterator.h>
#else /* istream_iterator.h expanded by -frewrite-includes */
# 695 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_ISTREAM_ITERATOR_H
#define _LIBCPP___ITERATOR_ISTREAM_ITERATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/default_sentinel.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* iosfwd expanded by -frewrite-includes */
#include <iosfwd> // for forward declarations of char_traits and basic_istream
#else /* iosfwd expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_IOSFWD
#define _LIBCPP_IOSFWD

/*
    iosfwd synopsis

namespace std
{

template<class charT> struct char_traits;
template<>            struct char_traits<char>;
template<>            struct char_traits<char8_t>;  // C++20
template<>            struct char_traits<char16_t>;
template<>            struct char_traits<char32_t>;
template<>            struct char_traits<wchar_t>;

template<class T>     class allocator;

class ios_base;
template <class charT, class traits = char_traits<charT> > class basic_ios;

template <class charT, class traits = char_traits<charT> > class basic_streambuf;
template <class charT, class traits = char_traits<charT> > class basic_istream;
template <class charT, class traits = char_traits<charT> > class basic_ostream;
template <class charT, class traits = char_traits<charT> > class basic_iostream;

template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
    class basic_stringbuf;
template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
    class basic_istringstream;
template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
    class basic_ostringstream;
template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
    class basic_stringstream;

template <class charT, class traits = char_traits<charT> > class basic_filebuf;
template <class charT, class traits = char_traits<charT> > class basic_ifstream;
template <class charT, class traits = char_traits<charT> > class basic_ofstream;
template <class charT, class traits = char_traits<charT> > class basic_fstream;

template <class charT, class traits = char_traits<charT> > class istreambuf_iterator;
template <class charT, class traits = char_traits<charT> > class ostreambuf_iterator;

typedef basic_ios<char>              ios;
typedef basic_ios<wchar_t>           wios;

typedef basic_streambuf<char>        streambuf;
typedef basic_istream<char>          istream;
typedef basic_ostream<char>          ostream;
typedef basic_iostream<char>         iostream;

typedef basic_stringbuf<char>        stringbuf;
typedef basic_istringstream<char>    istringstream;
typedef basic_ostringstream<char>    ostringstream;
typedef basic_stringstream<char>     stringstream;

typedef basic_filebuf<char>          filebuf;
typedef basic_ifstream<char>         ifstream;
typedef basic_ofstream<char>         ofstream;
typedef basic_fstream<char>          fstream;

typedef basic_streambuf<wchar_t>     wstreambuf;
typedef basic_istream<wchar_t>       wistream;
typedef basic_ostream<wchar_t>       wostream;
typedef basic_iostream<wchar_t>      wiostream;

typedef basic_stringbuf<wchar_t>     wstringbuf;
typedef basic_istringstream<wchar_t> wistringstream;
typedef basic_ostringstream<wchar_t> wostringstream;
typedef basic_stringstream<wchar_t>  wstringstream;

typedef basic_filebuf<wchar_t>       wfilebuf;
typedef basic_ifstream<wchar_t>      wifstream;
typedef basic_ofstream<wchar_t>      wofstream;
typedef basic_fstream<wchar_t>       wfstream;

template <class state> class fpos;
using streampos  = fpos<char_traits<char>::state_type>;
using wstreampos = fpos<char_traits<wchar_t>::state_type>;
using u8streampos = fpos<char_traits<char8_t>::state_type>; // C++20
using u16streampos = fpos<char_traits<char16_t>::state_type>;
using u32streampos = fpos<char_traits<char32_t>::state_type>;

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* fstream.h expanded by -frewrite-includes */
#include <__fwd/fstream.h>
#else /* fstream.h expanded by -frewrite-includes */
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/fstream.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_FSTREAM_H
#define _LIBCPP___FWD_FSTREAM_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/fstream.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/fstream.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* string.h expanded by -frewrite-includes */
#include <__fwd/string.h>
#else /* string.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/fstream.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_STRING_H
#define _LIBCPP___FWD_STRING_H

#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* memory_resource.h expanded by -frewrite-includes */
#include <__fwd/memory_resource.h>
#else /* memory_resource.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/memory_resource.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_MEMORY_RESOURCE_H
#define _LIBCPP___FWD_MEMORY_RESOURCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/memory_resource.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/memory_resource.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/memory_resource.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/memory_resource.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/memory_resource.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/memory_resource.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/memory_resource.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace pmr {
template <class _ValueType>
class _LIBCPP_AVAILABILITY_PMR _LIBCPP_TEMPLATE_VIS polymorphic_allocator;
} // namespace pmr

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FWD_MEMORY_RESOURCE_H
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/memory_resource.h" 3
#endif /* memory_resource.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _CharT>
struct _LIBCPP_TEMPLATE_VIS char_traits;
template <>
struct char_traits<char>;

#ifndef _LIBCPP_HAS_NO_CHAR8_T
template <>
struct char_traits<char8_t>;
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3

template <>
struct char_traits<char16_t>;
template <>
struct char_traits<char32_t>;

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
struct char_traits<wchar_t>;
#endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3

template <class _Tp>
class _LIBCPP_TEMPLATE_VIS allocator;

template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_string;

using string = basic_string<char>;

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using wstring = basic_string<wchar_t>;
#endif
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3

#ifndef _LIBCPP_HAS_NO_CHAR8_T
using u8string = basic_string<char8_t>;
#endif
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3

using u16string = basic_string<char16_t>;
using u32string = basic_string<char32_t>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3

namespace pmr {
template <class _CharT, class _Traits = char_traits<_CharT>>
using basic_string _LIBCPP_AVAILABILITY_PMR = std::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>;

using string _LIBCPP_AVAILABILITY_PMR = basic_string<char>;

#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using wstring _LIBCPP_AVAILABILITY_PMR = basic_string<wchar_t>;
#  endif
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3

#  ifndef _LIBCPP_HAS_NO_CHAR8_T
using u8string _LIBCPP_AVAILABILITY_PMR = basic_string<char8_t>;
#  endif
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3

using u16string _LIBCPP_AVAILABILITY_PMR = basic_string<char16_t>;
using u32string _LIBCPP_AVAILABILITY_PMR = basic_string<char32_t>;
} // namespace pmr

#endif // _LIBCPP_STD_VER >= 17
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3

// clang-format off
template <class _CharT, class _Traits, class _Allocator>
class _LIBCPP_PREFERRED_NAME(string)
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
      _LIBCPP_PREFERRED_NAME(wstring)
#endif
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3
#ifndef _LIBCPP_HAS_NO_CHAR8_T
      _LIBCPP_PREFERRED_NAME(u8string)
#endif
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3
      _LIBCPP_PREFERRED_NAME(u16string)
      _LIBCPP_PREFERRED_NAME(u32string)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3
      _LIBCPP_PREFERRED_NAME(pmr::string)
#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
      _LIBCPP_PREFERRED_NAME(pmr::wstring)
#  endif
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3
#  ifndef _LIBCPP_HAS_NO_CHAR8_T
      _LIBCPP_PREFERRED_NAME(pmr::u8string)
#  endif
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3
      _LIBCPP_PREFERRED_NAME(pmr::u16string)
      _LIBCPP_PREFERRED_NAME(pmr::u32string)
#endif
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3
      basic_string;
// clang-format on

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FWD_STRING_H
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string.h" 3
#endif /* string.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/fstream.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/fstream.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/fstream.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/fstream.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _CharT, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_filebuf;
template <class _CharT, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_ifstream;
template <class _CharT, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_ofstream;
template <class _CharT, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_fstream;

using filebuf  = basic_filebuf<char>;
using ifstream = basic_ifstream<char>;
using ofstream = basic_ofstream<char>;
using fstream  = basic_fstream<char>;

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using wfilebuf  = basic_filebuf<wchar_t>;
using wifstream = basic_ifstream<wchar_t>;
using wofstream = basic_ofstream<wchar_t>;
using wfstream  = basic_fstream<wchar_t>;
#endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/fstream.h" 3

template <class _CharT, class _Traits>
class _LIBCPP_PREFERRED_NAME(filebuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wfilebuf)) basic_filebuf;
template <class _CharT, class _Traits>
class _LIBCPP_PREFERRED_NAME(ifstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wifstream)) basic_ifstream;
template <class _CharT, class _Traits>
class _LIBCPP_PREFERRED_NAME(ofstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wofstream)) basic_ofstream;
template <class _CharT, class _Traits>
class _LIBCPP_PREFERRED_NAME(fstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wfstream)) basic_fstream;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FWD_FSTREAM_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/fstream.h" 3
#endif /* fstream.h expanded by -frewrite-includes */
# 100 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ios.h expanded by -frewrite-includes */
#include <__fwd/ios.h>
#else /* ios.h expanded by -frewrite-includes */
# 100 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ios.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_IOS_H
#define _LIBCPP___FWD_IOS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ios.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ios.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/string.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ios.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ios.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ios.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ios.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ios.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _CharT, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_ios;

using ios = basic_ios<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using wios = basic_ios<wchar_t>;
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ios.h" 3

template <class _CharT, class _Traits>
class _LIBCPP_PREFERRED_NAME(ios) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wios)) basic_ios;

#if 0 /* disabled by -frewrite-includes */
#if defined(_NEWLIB_VERSION)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ios.h" 3
// On newlib, off_t is 'long int'
using streamoff = long int; // for char_traits in <string>
#else
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ios.h" 3
using streamoff = long long; // for char_traits in <string>
#endif
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ios.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FWD_IOS_H
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ios.h" 3
#endif /* ios.h expanded by -frewrite-includes */
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* istream.h expanded by -frewrite-includes */
#include <__fwd/istream.h>
#else /* istream.h expanded by -frewrite-includes */
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/istream.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_ISTREAM_H
#define _LIBCPP___FWD_ISTREAM_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/istream.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/istream.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/string.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/istream.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/istream.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/istream.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/istream.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/istream.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _CharT, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_istream;

template <class _CharT, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_iostream;

using istream  = basic_istream<char>;
using iostream = basic_iostream<char>;

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using wistream  = basic_istream<wchar_t>;
using wiostream = basic_iostream<wchar_t>;
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/istream.h" 3

template <class _CharT, class _Traits>
class _LIBCPP_PREFERRED_NAME(istream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wistream)) basic_istream;

template <class _CharT, class _Traits>
class _LIBCPP_PREFERRED_NAME(iostream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wiostream)) basic_iostream;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FWD_ISTREAM_H
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/istream.h" 3
#endif /* istream.h expanded by -frewrite-includes */
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ostream.h expanded by -frewrite-includes */
#include <__fwd/ostream.h>
#else /* ostream.h expanded by -frewrite-includes */
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ostream.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_OSTREAM_H
#define _LIBCPP___FWD_OSTREAM_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ostream.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ostream.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/string.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ostream.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ostream.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ostream.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ostream.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ostream.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _CharT, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_ostream;

using ostream = basic_ostream<char>;

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using wostream = basic_ostream<wchar_t>;
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ostream.h" 3

template <class _CharT, class _Traits>
class _LIBCPP_PREFERRED_NAME(ostream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wostream)) basic_ostream;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FWD_OSTREAM_H
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/ostream.h" 3
#endif /* ostream.h expanded by -frewrite-includes */
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* sstream.h expanded by -frewrite-includes */
#include <__fwd/sstream.h>
#else /* sstream.h expanded by -frewrite-includes */
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/sstream.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_SSTREAM_H
#define _LIBCPP___FWD_SSTREAM_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/sstream.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/sstream.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/string.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/sstream.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/sstream.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/sstream.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/sstream.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/sstream.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_stringbuf;

template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_istringstream;
template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_ostringstream;
template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_stringstream;

using stringbuf     = basic_stringbuf<char>;
using istringstream = basic_istringstream<char>;
using ostringstream = basic_ostringstream<char>;
using stringstream  = basic_stringstream<char>;

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using wstringbuf     = basic_stringbuf<wchar_t>;
using wistringstream = basic_istringstream<wchar_t>;
using wostringstream = basic_ostringstream<wchar_t>;
using wstringstream  = basic_stringstream<wchar_t>;
#endif
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/sstream.h" 3

template <class _CharT, class _Traits, class _Allocator>
class _LIBCPP_PREFERRED_NAME(stringbuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstringbuf)) basic_stringbuf;
template <class _CharT, class _Traits, class _Allocator>
class _LIBCPP_PREFERRED_NAME(istringstream)
    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wistringstream)) basic_istringstream;
template <class _CharT, class _Traits, class _Allocator>
class _LIBCPP_PREFERRED_NAME(ostringstream)
    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wostringstream)) basic_ostringstream;
template <class _CharT, class _Traits, class _Allocator>
class _LIBCPP_PREFERRED_NAME(stringstream)
    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstringstream)) basic_stringstream;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FWD_SSTREAM_H
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/sstream.h" 3
#endif /* sstream.h expanded by -frewrite-includes */
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* streambuf.h expanded by -frewrite-includes */
#include <__fwd/streambuf.h>
#else /* streambuf.h expanded by -frewrite-includes */
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/streambuf.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_STREAMBUF_H
#define _LIBCPP___FWD_STREAMBUF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/streambuf.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/streambuf.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/string.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/streambuf.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/streambuf.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/streambuf.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/streambuf.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/streambuf.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _CharT, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_streambuf;

using streambuf = basic_streambuf<char>;

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using wstreambuf = basic_streambuf<wchar_t>;
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/streambuf.h" 3

template <class _CharT, class _Traits>
class _LIBCPP_PREFERRED_NAME(streambuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstreambuf)) basic_streambuf;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FWD_STREAMBUF_H
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/streambuf.h" 3
#endif /* streambuf.h expanded by -frewrite-includes */
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/string.h>
#endif /* expanded by -frewrite-includes */
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __std_mbstate_t.h expanded by -frewrite-includes */
#include <__std_mbstate_t.h>
#else /* __std_mbstate_t.h expanded by -frewrite-includes */
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__std_mbstate_t.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___STD_MBSTATE_T_H
#define _LIBCPP___STD_MBSTATE_T_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__std_mbstate_t.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__std_mbstate_t.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __mbstate_t.h expanded by -frewrite-includes */
#include <__mbstate_t.h>
#else /* __mbstate_t.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__std_mbstate_t.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MBSTATE_T_H
#define _LIBCPP___MBSTATE_T_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3

// The goal of this header is to provide mbstate_t without requiring all of
// <uchar.h> or <wchar.h>. It's also used by the libc++ versions of <uchar.h>
// and <wchar.h> to get mbstate_t when the C library doesn't provide <uchar.h>
// or <wchar.h>, hence the #include_next of those headers instead of #include.
// (e.g. if <wchar.h> isn't present in the C library, the libc++ <wchar.h>
// will include this header. This header needs to not turn around and cyclically
// include <wchar.h>, but fall through to <uchar.h>.)
//
// This does not define std::mbstate_t -- this only brings in the declaration
// in the global namespace.

// We define this here to support older versions of glibc <wchar.h> that do
// not define this for clang. This is also set in libc++'s <wchar.h> header,
// and we need to do so here too to avoid a different function signature given
// a different include order.
#ifdef __cplusplus
#  define __CORRECT_ISO_CPP_WCHAR_H_PROTO
#endif
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_MUSL_LIBC)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
#   define __NEED_mbstate_t
#if 0 /* expanded by -frewrite-includes */
#   include <bits/alltypes.h>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
#   undef __NEED_mbstate_t
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif __has_include(<bits/types/mbstate_t.h>)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
#if 0 /* expanded by -frewrite-includes */
#   include <bits/types/mbstate_t.h> // works on most Unixes
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif __has_include(<sys/_types/_mbstate_t.h>)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
#if 0 /* expanded by -frewrite-includes */
#   include <sys/_types/_mbstate_t.h> // works on Darwin
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS) && __has_include_next(<wchar.h>)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* wchar.h expanded by -frewrite-includes */
#   include_next <wchar.h> // fall back to the C standard provider of mbstate_t
#else /* wchar.h expanded by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
# 1 "gen/zircon/public/sysroot/cpp/include/wchar.h" 1 3 4
#ifndef SYSROOT_WCHAR_H_
#define SYSROOT_WCHAR_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <bits/null.h>
#endif /* expanded by -frewrite-includes */
# 10 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4
# 11 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4

#define __NEED_FILE
#define __NEED___isoc_va_list
#define __NEED_size_t
#define __NEED_wchar_t
#define __NEED_wint_t
#define __NEED_mbstate_t

#if 0 /* disabled by -frewrite-includes */
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
    defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4
#define __NEED_va_list
#endif
# 23 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4
#define __NEED_wctype_t
#endif
# 27 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 29 "gen/zircon/public/sysroot/cpp/include/wchar.h" 2 3 4

#ifndef WCHAR_MAX
#define WCHAR_MAX __WCHAR_MAX__
#endif
# 33 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4

#ifndef WCHAR_MIN
#if 0 /* disabled by -frewrite-includes */
#if defined(__WCHAR_MIN__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 36 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4
#define WCHAR_MIN __WCHAR_MIN__
#else  // defined(__WCHAR_MIN__)
# 38 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__WCHAR_UNSIGNED__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 39 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4
#define WCHAR_MIN (L'\0' + 0)
#else
# 41 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4
#define WCHAR_MIN (-WCHAR_MAX - 1)
#endif  // defined (__WCHAR_UNSIGNED)
# 43 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4
#endif  // defined(__WCHAR_MIN__)
# 44 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4
#endif
# 45 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4

#undef WEOF
#define WEOF 0xffffffffU

wchar_t* wcscpy(wchar_t* __restrict, const wchar_t* __restrict);
wchar_t* wcsncpy(wchar_t* __restrict, const wchar_t* __restrict, size_t);

wchar_t* wcscat(wchar_t* __restrict, const wchar_t* __restrict);
wchar_t* wcsncat(wchar_t* __restrict, const wchar_t* __restrict, size_t);

int wcscmp(const wchar_t*, const wchar_t*);
int wcsncmp(const wchar_t*, const wchar_t*, size_t);

int wcscoll(const wchar_t*, const wchar_t*);
size_t wcsxfrm(wchar_t* __restrict, const wchar_t* __restrict, size_t n);

wchar_t* wcschr(const wchar_t*, wchar_t);
wchar_t* wcsrchr(const wchar_t*, wchar_t);

size_t wcscspn(const wchar_t*, const wchar_t*);
size_t wcsspn(const wchar_t*, const wchar_t*);
wchar_t* wcspbrk(const wchar_t*, const wchar_t*);

wchar_t* wcstok(wchar_t* __restrict, const wchar_t* __restrict, wchar_t** __restrict);

size_t wcslen(const wchar_t*);

wchar_t* wcsstr(const wchar_t* __restrict, const wchar_t* __restrict);
wchar_t* wcswcs(const wchar_t*, const wchar_t*);

wchar_t* wmemchr(const wchar_t*, wchar_t, size_t);
int wmemcmp(const wchar_t*, const wchar_t*, size_t);
wchar_t* wmemcpy(wchar_t* __restrict, const wchar_t* __restrict, size_t);
wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t);
wchar_t* wmemset(wchar_t*, wchar_t, size_t);

wint_t btowc(int);
int wctob(wint_t);

int mbsinit(const mbstate_t*);
size_t mbrtowc(wchar_t* __restrict, const char* __restrict, size_t, mbstate_t* __restrict);
size_t wcrtomb(char* __restrict, wchar_t, mbstate_t* __restrict);

size_t mbrlen(const char* __restrict, size_t, mbstate_t* __restrict);

size_t mbsrtowcs(wchar_t* __restrict, const char** __restrict, size_t, mbstate_t* __restrict);
size_t wcsrtombs(char* __restrict, const wchar_t** __restrict, size_t, mbstate_t* __restrict);

float wcstof(const wchar_t* __restrict, wchar_t** __restrict);
double wcstod(const wchar_t* __restrict, wchar_t** __restrict);
long double wcstold(const wchar_t* __restrict, wchar_t** __restrict);

long wcstol(const wchar_t* __restrict, wchar_t** __restrict, int);
unsigned long wcstoul(const wchar_t* __restrict, wchar_t** __restrict, int);

long long wcstoll(const wchar_t* __restrict, wchar_t** __restrict, int);
unsigned long long wcstoull(const wchar_t* __restrict, wchar_t** __restrict, int);

int fwide(FILE*, int);

int wprintf(const wchar_t* __restrict, ...);
int fwprintf(FILE* __restrict, const wchar_t* __restrict, ...);
int swprintf(wchar_t* __restrict, size_t, const wchar_t* __restrict, ...);

int vwprintf(const wchar_t* __restrict, __isoc_va_list);
int vfwprintf(FILE* __restrict, const wchar_t* __restrict, __isoc_va_list);
int vswprintf(wchar_t* __restrict, size_t, const wchar_t* __restrict, __isoc_va_list);

int wscanf(const wchar_t* __restrict, ...);
int fwscanf(FILE* __restrict, const wchar_t* __restrict, ...);
int swscanf(const wchar_t* __restrict, const wchar_t* __restrict, ...);

int vwscanf(const wchar_t* __restrict, __isoc_va_list);
int vfwscanf(FILE* __restrict, const wchar_t* __restrict, __isoc_va_list);
int vswscanf(const wchar_t* __restrict, const wchar_t* __restrict, __isoc_va_list);

wint_t fgetwc(FILE*);
wint_t getwc(FILE*);
wint_t getwchar(void);

wint_t fputwc(wchar_t, FILE*);
wint_t putwc(wchar_t, FILE*);
wint_t putwchar(wchar_t);

wchar_t* fgetws(wchar_t* __restrict, int, FILE* __restrict);
int fputws(const wchar_t* __restrict, FILE* __restrict);

wint_t ungetwc(wint_t, FILE*);

struct tm;
size_t wcsftime(wchar_t* __restrict, size_t, const wchar_t* __restrict,
                const struct tm* __restrict);

#undef iswdigit

#if 0 /* disabled by -frewrite-includes */
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
    defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 142 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4
FILE* open_wmemstream(wchar_t**, size_t*);
size_t mbsnrtowcs(wchar_t* __restrict, const char** __restrict, size_t, size_t,
                  mbstate_t* __restrict);
size_t wcsnrtombs(char* __restrict, const wchar_t** __restrict, size_t, size_t,
                  mbstate_t* __restrict);
wchar_t* wcsdup(const wchar_t*);
size_t wcsnlen(const wchar_t*, size_t);
wchar_t* wcpcpy(wchar_t* __restrict, const wchar_t* __restrict);
wchar_t* wcpncpy(wchar_t* __restrict, const wchar_t* __restrict, size_t);
int wcscasecmp(const wchar_t*, const wchar_t*);
int wcsncasecmp(const wchar_t*, const wchar_t*, size_t);
#endif
# 154 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 156 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4
int wcwidth(wchar_t);
int wcswidth(const wchar_t*, size_t);
int iswalnum(wint_t);
int iswalpha(wint_t);
int iswblank(wint_t);
int iswcntrl(wint_t);
int iswdigit(wint_t);
int iswgraph(wint_t);
int iswlower(wint_t);
int iswprint(wint_t);
int iswpunct(wint_t);
int iswspace(wint_t);
int iswupper(wint_t);
int iswxdigit(wint_t);
int iswctype(wint_t, wctype_t);
wint_t towlower(wint_t);
wint_t towupper(wint_t);
wctype_t wctype(const char*);

#ifndef __cplusplus
#undef iswdigit
#define iswdigit(a) (0 ? iswdigit(a) : ((unsigned)(a) - '0') < 10)
#endif
# 179 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4
#endif
# 180 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4

#ifdef __cplusplus
}
#endif
# 184 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4

#endif  // SYSROOT_WCHAR_H_
# 186 "gen/zircon/public/sysroot/cpp/include/wchar.h" 3 4
#endif /* wchar.h expanded by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 2 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif __has_include_next(<uchar.h>)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
#if 0 /* expanded by -frewrite-includes */
#   include_next <uchar.h> // <uchar.h> is also required to make mbstate_t visible
#endif /* expanded by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
#else
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
#   error "We don't know how to get the definition of mbstate_t without <wchar.h> on your platform."
#endif
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3

#endif // _LIBCPP___MBSTATE_T_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mbstate_t.h" 3
#endif /* __mbstate_t.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__std_mbstate_t.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__std_mbstate_t.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__std_mbstate_t.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__std_mbstate_t.h" 3

// The goal of this header is to provide std::mbstate_t without requiring all
// of <cuchar> or <cwchar>.

_LIBCPP_BEGIN_NAMESPACE_STD

using ::mbstate_t _LIBCPP_USING_IF_EXISTS;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___STD_MBSTATE_T_H
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__std_mbstate_t.h" 3
#endif /* __std_mbstate_t.h expanded by -frewrite-includes */
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
#endif
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3

_LIBCPP_BEGIN_NAMESPACE_STD

class _LIBCPP_EXPORTED_FROM_ABI ios_base;

template <class _CharT, class _Traits = char_traits<_CharT> >
    class _LIBCPP_TEMPLATE_VIS istreambuf_iterator;
template <class _CharT, class _Traits = char_traits<_CharT> >
    class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator;

template <class _State>             class _LIBCPP_TEMPLATE_VIS fpos;
typedef fpos<mbstate_t>    streampos;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
typedef fpos<mbstate_t>    wstreampos;
#endif
# 127 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
#ifndef _LIBCPP_HAS_NO_CHAR8_T
typedef fpos<mbstate_t>    u8streampos;
#endif
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
typedef fpos<mbstate_t>    u16streampos;
typedef fpos<mbstate_t>    u32streampos;

// Include other forward declarations here
template <class _Tp, class _Alloc = allocator<_Tp> >
class _LIBCPP_TEMPLATE_VIS vector;

template <class _CharT, class _Traits>
class __save_flags
{
    typedef basic_ios<_CharT, _Traits> __stream_type;
    typedef typename __stream_type::fmtflags fmtflags;

    __stream_type& __stream_;
    fmtflags       __fmtflags_;
    _CharT         __fill_;

    __save_flags(const __save_flags&);
    __save_flags& operator=(const __save_flags&);
public:
    _LIBCPP_INLINE_VISIBILITY
    explicit __save_flags(__stream_type& __stream)
        : __stream_(__stream),
          __fmtflags_(__stream.flags()),
          __fill_(__stream.fill())
        {}
    _LIBCPP_INLINE_VISIBILITY
    ~__save_flags()
    {
        __stream_.flags(__fmtflags_);
        __stream_.fill(__fill_);
    }
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_IOSFWD
# 167 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iosfwd" 3
#endif /* iosfwd expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Tp, class _CharT = char,
          class _Traits = char_traits<_CharT>, class _Distance = ptrdiff_t>
class _LIBCPP_TEMPLATE_VIS istream_iterator
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
    : public iterator<input_iterator_tag, _Tp, _Distance, const _Tp*, const _Tp&>
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
{
_LIBCPP_SUPPRESS_DEPRECATED_POP
public:
    typedef input_iterator_tag iterator_category;
    typedef _Tp value_type;
    typedef _Distance difference_type;
    typedef const _Tp* pointer;
    typedef const _Tp& reference;
    typedef _CharT char_type;
    typedef _Traits traits_type;
    typedef basic_istream<_CharT,_Traits> istream_type;
private:
    istream_type* __in_stream_;
    _Tp __value_;
public:
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istream_iterator() : __in_stream_(nullptr), __value_() {}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
    _LIBCPP_HIDE_FROM_ABI constexpr istream_iterator(default_sentinel_t) : istream_iterator() {}
#endif // _LIBCPP_STD_VER >= 20
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
    _LIBCPP_INLINE_VISIBILITY istream_iterator(istream_type& __s) : __in_stream_(_VSTD::addressof(__s))
        {
            if (!(*__in_stream_ >> __value_))
                __in_stream_ = nullptr;
        }

    _LIBCPP_INLINE_VISIBILITY const _Tp& operator*() const {return __value_;}
    _LIBCPP_INLINE_VISIBILITY const _Tp* operator->() const {return _VSTD::addressof((operator*()));}
    _LIBCPP_INLINE_VISIBILITY istream_iterator& operator++()
        {
            if (!(*__in_stream_ >> __value_))
                __in_stream_ = nullptr;
            return *this;
        }
    _LIBCPP_INLINE_VISIBILITY istream_iterator  operator++(int)
        {istream_iterator __t(*this); ++(*this); return __t;}

    template <class _Up, class _CharU, class _TraitsU, class _DistanceU>
    friend _LIBCPP_INLINE_VISIBILITY
    bool
    operator==(const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __x,
               const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __y);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
    friend _LIBCPP_HIDE_FROM_ABI bool operator==(const istream_iterator& __i, default_sentinel_t) {
      return __i.__in_stream_ == nullptr;
    }
#endif // _LIBCPP_STD_VER >= 20
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
};

template <class _Tp, class _CharT, class _Traits, class _Distance>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __x,
           const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __y)
{
    return __x.__in_stream_ == __y.__in_stream_;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 93 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
template <class _Tp, class _CharT, class _Traits, class _Distance>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __x,
           const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __y)
{
    return !(__x == __y);
}
#endif // _LIBCPP_STD_VER <= 17
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_ISTREAM_ITERATOR_H
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istream_iterator.h" 3
#endif /* istream_iterator.h expanded by -frewrite-includes */
# 696 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* istreambuf_iterator.h expanded by -frewrite-includes */
#include <__iterator/istreambuf_iterator.h>
#else /* istreambuf_iterator.h expanded by -frewrite-includes */
# 696 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_ISTREAMBUF_ITERATOR_H
#define _LIBCPP___ITERATOR_ISTREAMBUF_ITERATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/default_sentinel.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd> // for forward declaration of basic_streambuf
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template<class _CharT, class _Traits>
class _LIBCPP_TEMPLATE_VIS istreambuf_iterator
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
    : public iterator<input_iterator_tag, _CharT,
                      typename _Traits::off_type, _CharT*,
                      _CharT>
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
{
_LIBCPP_SUPPRESS_DEPRECATED_POP
public:
    typedef input_iterator_tag              iterator_category;
    typedef _CharT                          value_type;
    typedef typename _Traits::off_type      difference_type;
    typedef _CharT*                         pointer;
    typedef _CharT                          reference;
    typedef _CharT                          char_type;
    typedef _Traits                         traits_type;
    typedef typename _Traits::int_type      int_type;
    typedef basic_streambuf<_CharT,_Traits> streambuf_type;
    typedef basic_istream<_CharT,_Traits>   istream_type;
private:
    mutable streambuf_type* __sbuf_;

    class __proxy
    {
        char_type __keep_;
        streambuf_type* __sbuf_;
        _LIBCPP_INLINE_VISIBILITY
        explicit __proxy(char_type __c, streambuf_type* __s)
            : __keep_(__c), __sbuf_(__s) {}
        friend class istreambuf_iterator;
    public:
        _LIBCPP_INLINE_VISIBILITY char_type operator*() const {return __keep_;}
    };

    _LIBCPP_INLINE_VISIBILITY
    bool __test_for_eof() const
    {
        if (__sbuf_ && traits_type::eq_int_type(__sbuf_->sgetc(), traits_type::eof()))
            __sbuf_ = nullptr;
        return __sbuf_ == nullptr;
    }
public:
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(nullptr) {}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
    _LIBCPP_INLINE_VISIBILITY constexpr istreambuf_iterator(default_sentinel_t) noexcept
        : istreambuf_iterator() {}
#endif // _LIBCPP_STD_VER >= 20
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(istream_type& __s) _NOEXCEPT
        : __sbuf_(__s.rdbuf()) {}
    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(streambuf_type* __s) _NOEXCEPT
        : __sbuf_(__s) {}
    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(const __proxy& __p) _NOEXCEPT
        : __sbuf_(__p.__sbuf_) {}

    _LIBCPP_INLINE_VISIBILITY char_type  operator*() const
        {return static_cast<char_type>(__sbuf_->sgetc());}
    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator& operator++()
        {
            __sbuf_->sbumpc();
            return *this;
        }
    _LIBCPP_INLINE_VISIBILITY __proxy              operator++(int)
        {
            return __proxy(__sbuf_->sbumpc(), __sbuf_);
        }

    _LIBCPP_INLINE_VISIBILITY bool equal(const istreambuf_iterator& __b) const
        {return __test_for_eof() == __b.__test_for_eof();}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
    friend _LIBCPP_HIDE_FROM_ABI bool operator==(const istreambuf_iterator& __i, default_sentinel_t) {
      return __i.__test_for_eof();
    }
#endif // _LIBCPP_STD_VER >= 20
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
};

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
bool operator==(const istreambuf_iterator<_CharT,_Traits>& __a,
                const istreambuf_iterator<_CharT,_Traits>& __b)
                {return __a.equal(__b);}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
bool operator!=(const istreambuf_iterator<_CharT,_Traits>& __a,
                const istreambuf_iterator<_CharT,_Traits>& __b)
                {return !__a.equal(__b);}
#endif // _LIBCPP_STD_VER <= 17
# 116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_ISTREAMBUF_ITERATOR_H
# 120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/istreambuf_iterator.h" 3
#endif /* istreambuf_iterator.h expanded by -frewrite-includes */
# 697 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 697 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 698 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 698 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 699 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator.h>
#endif /* expanded by -frewrite-includes */
# 699 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 700 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 700 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 701 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* mergeable.h expanded by -frewrite-includes */
#include <__iterator/mergeable.h>
#else /* mergeable.h expanded by -frewrite-includes */
# 701 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_MERGEABLE_H
#define _LIBCPP___ITERATOR_MERGEABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_operations.h expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#else /* ranges_operations.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_RANGES_OPERATIONS_H
#define _LIBCPP___FUNCTIONAL_RANGES_OPERATIONS_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/equality_comparable.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/totally_ordered.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/predicate_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3

namespace ranges {

struct equal_to {
  template <class _Tp, class _Up>
  requires equality_comparable_with<_Tp, _Up>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
      noexcept(noexcept(bool(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u)))) {
    return _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u);
  }

  using is_transparent = void;
};

struct not_equal_to {
  template <class _Tp, class _Up>
  requires equality_comparable_with<_Tp, _Up>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
      noexcept(noexcept(bool(!(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u))))) {
    return !(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u));
  }

  using is_transparent = void;
};

struct less {
  template <class _Tp, class _Up>
  requires totally_ordered_with<_Tp, _Up>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
      noexcept(noexcept(bool(_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u)))) {
    return _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u);
  }

  using is_transparent = void;
};

struct less_equal {
  template <class _Tp, class _Up>
  requires totally_ordered_with<_Tp, _Up>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
      noexcept(noexcept(bool(!(_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t))))) {
    return !(_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t));
  }

  using is_transparent = void;
};

struct greater {
  template <class _Tp, class _Up>
  requires totally_ordered_with<_Tp, _Up>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
      noexcept(noexcept(bool(_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t)))) {
    return _VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t);
  }

  using is_transparent = void;
};

struct greater_equal {
  template <class _Tp, class _Up>
  requires totally_ordered_with<_Tp, _Up>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
      noexcept(noexcept(bool(!(_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u))))) {
    return !(_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u));
  }

  using is_transparent = void;
};

} // namespace ranges

template <class _Lhs, class _Rhs>
struct __is_trivial_equality_predicate<ranges::equal_to, _Lhs, _Rhs> : true_type {};

#endif // _LIBCPP_STD_VER >= 20
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_RANGES_OPERATIONS_H
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/ranges_operations.h" 3
#endif /* ranges_operations.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 3

template <class _Input1, class _Input2, class _Output,
          class _Comp = ranges::less, class _Proj1 = identity, class _Proj2 = identity>
concept mergeable =
    input_iterator<_Input1> &&
    input_iterator<_Input2> &&
    weakly_incrementable<_Output> &&
    indirectly_copyable<_Input1, _Output> &&
    indirectly_copyable<_Input2, _Output> &&
    indirect_strict_weak_order<_Comp, projected<_Input1, _Proj1>, projected<_Input2, _Proj2>>;

#endif // _LIBCPP_STD_VER >= 20
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_MERGEABLE_H
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/mergeable.h" 3
#endif /* mergeable.h expanded by -frewrite-includes */
# 702 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* move_iterator.h expanded by -frewrite-includes */
#include <__iterator/move_iterator.h>
#else /* move_iterator.h expanded by -frewrite-includes */
# 702 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_MOVE_ITERATOR_H
#define _LIBCPP___ITERATOR_MOVE_ITERATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/compare_three_way_result.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/three_way_comparable.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/assignable.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/derived_from.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* move_sentinel.h expanded by -frewrite-includes */
#include <__iterator/move_sentinel.h>
#else /* move_sentinel.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_MOVE_SENTINEL_H
#define _LIBCPP___ITERATOR_MOVE_SENTINEL_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/assignable.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/semiregular.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3

template <semiregular _Sent>
class _LIBCPP_TEMPLATE_VIS move_sentinel
{
public:
  _LIBCPP_HIDE_FROM_ABI
  move_sentinel() = default;

  _LIBCPP_HIDE_FROM_ABI constexpr
  explicit move_sentinel(_Sent __s) : __last_(std::move(__s)) {}

  template <class _S2>
    requires convertible_to<const _S2&, _Sent>
  _LIBCPP_HIDE_FROM_ABI constexpr
  move_sentinel(const move_sentinel<_S2>& __s) : __last_(__s.base()) {}

  template <class _S2>
    requires assignable_from<_Sent&, const _S2&>
  _LIBCPP_HIDE_FROM_ABI constexpr
  move_sentinel& operator=(const move_sentinel<_S2>& __s)
    { __last_ = __s.base(); return *this; }

  _LIBCPP_HIDE_FROM_ABI constexpr _Sent base() const { return __last_; }

private:
    _Sent __last_ = _Sent();
};

_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(move_sentinel);

#endif // _LIBCPP_STD_VER >= 20
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ITERATOR_MOVE_SENTINEL_H
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_sentinel.h" 3
#endif /* move_sentinel.h expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_assignable.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
template<class _Iter, class = void>
struct __move_iter_category_base {};

template<class _Iter>
  requires requires { typename iterator_traits<_Iter>::iterator_category; }
struct __move_iter_category_base<_Iter> {
    using iterator_category = _If<
        derived_from<typename iterator_traits<_Iter>::iterator_category, random_access_iterator_tag>,
        random_access_iterator_tag,
        typename iterator_traits<_Iter>::iterator_category
    >;
};

template<class _Iter, class _Sent>
concept __move_iter_comparable = requires {
    { std::declval<const _Iter&>() == std::declval<_Sent>() } -> convertible_to<bool>;
};
#endif // _LIBCPP_STD_VER >= 20
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3

template <class _Iter>
class _LIBCPP_TEMPLATE_VIS move_iterator
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
    : public __move_iter_category_base<_Iter>
#endif
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
{
    
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
private:
    _LIBCPP_HIDE_FROM_ABI
    static constexpr auto __get_iter_concept() {
        if constexpr (random_access_iterator<_Iter>) {
            return random_access_iterator_tag{};
        } else if constexpr (bidirectional_iterator<_Iter>) {
            return bidirectional_iterator_tag{};
        } else if constexpr (forward_iterator<_Iter>) {
            return forward_iterator_tag{};
        } else {
            return input_iterator_tag{};
        }
    }
#endif // _LIBCPP_STD_VER >= 20
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
public:
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
    using iterator_type = _Iter;
    using iterator_concept = decltype(__get_iter_concept());
    // iterator_category is inherited and not always present
    using value_type = iter_value_t<_Iter>;
    using difference_type = iter_difference_t<_Iter>;
    using pointer = _Iter;
    using reference = iter_rvalue_reference_t<_Iter>;
#else
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
    typedef _Iter iterator_type;
    typedef _If<
        __has_random_access_iterator_category<_Iter>::value,
        random_access_iterator_tag,
        typename iterator_traits<_Iter>::iterator_category
    > iterator_category;
    typedef typename iterator_traits<iterator_type>::value_type value_type;
    typedef typename iterator_traits<iterator_type>::difference_type difference_type;
    typedef iterator_type pointer;

    typedef typename iterator_traits<iterator_type>::reference __reference;
    typedef typename conditional<
            is_reference<__reference>::value,
            __libcpp_remove_reference_t<__reference>&&,
            __reference
        >::type reference;
#endif // _LIBCPP_STD_VER >= 20
# 115 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    explicit move_iterator(_Iter __i) : __current_(std::move(__i)) {}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    move_iterator& operator++() { ++__current_; return *this; }

    _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    pointer operator->() const { return __current_; }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
    _LIBCPP_HIDE_FROM_ABI constexpr
    move_iterator() requires is_constructible_v<_Iter> : __current_() {}

    template <class _Up>
        requires (!_IsSame<_Up, _Iter>::value) && convertible_to<const _Up&, _Iter>
    _LIBCPP_HIDE_FROM_ABI constexpr
    move_iterator(const move_iterator<_Up>& __u) : __current_(__u.base()) {}

    template <class _Up>
        requires (!_IsSame<_Up, _Iter>::value) &&
                 convertible_to<const _Up&, _Iter> &&
                 assignable_from<_Iter&, const _Up&>
    _LIBCPP_HIDE_FROM_ABI constexpr
    move_iterator& operator=(const move_iterator<_Up>& __u) {
        __current_ = __u.base();
        return *this;
    }

    _LIBCPP_HIDE_FROM_ABI constexpr const _Iter& base() const & noexcept { return __current_; }
    _LIBCPP_HIDE_FROM_ABI constexpr _Iter base() && { return std::move(__current_); }

    _LIBCPP_HIDE_FROM_ABI constexpr
    reference operator*() const { return ranges::iter_move(__current_); }
    _LIBCPP_HIDE_FROM_ABI constexpr
    reference operator[](difference_type __n) const { return ranges::iter_move(__current_ + __n); }

    _LIBCPP_HIDE_FROM_ABI constexpr
    auto operator++(int)
        requires forward_iterator<_Iter>
    {
        move_iterator __tmp(*this); ++__current_; return __tmp;
    }

    _LIBCPP_HIDE_FROM_ABI constexpr
    void operator++(int) { ++__current_; }
#else
# 162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    move_iterator() : __current_() {}

    template <class _Up, class = __enable_if_t<
        !is_same<_Up, _Iter>::value && is_convertible<const _Up&, _Iter>::value
    > >
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    move_iterator(const move_iterator<_Up>& __u) : __current_(__u.base()) {}

    template <class _Up, class = __enable_if_t<
        !is_same<_Up, _Iter>::value &&
        is_convertible<const _Up&, _Iter>::value &&
        is_assignable<_Iter&, const _Up&>::value
    > >
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    move_iterator& operator=(const move_iterator<_Up>& __u) {
        __current_ = __u.base();
        return *this;
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    _Iter base() const { return __current_; }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    reference operator*() const { return static_cast<reference>(*__current_); }
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    reference operator[](difference_type __n) const { return static_cast<reference>(__current_[__n]); }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    move_iterator operator++(int) { move_iterator __tmp(*this); ++__current_; return __tmp; }
#endif // _LIBCPP_STD_VER >= 20
# 193 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    move_iterator& operator--() { --__current_; return *this; }
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    move_iterator operator--(int) { move_iterator __tmp(*this); --__current_; return __tmp; }
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    move_iterator operator+(difference_type __n) const { return move_iterator(__current_ + __n); }
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    move_iterator& operator+=(difference_type __n) { __current_ += __n; return *this; }
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    move_iterator operator-(difference_type __n) const { return move_iterator(__current_ - __n); }
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    move_iterator& operator-=(difference_type __n) { __current_ -= __n; return *this; }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
    template<sentinel_for<_Iter> _Sent>
    friend _LIBCPP_HIDE_FROM_ABI constexpr
    bool operator==(const move_iterator& __x, const move_sentinel<_Sent>& __y)
        requires __move_iter_comparable<_Iter, _Sent>
    {
        return __x.base() == __y.base();
    }

    template<sized_sentinel_for<_Iter> _Sent>
    friend _LIBCPP_HIDE_FROM_ABI constexpr
    iter_difference_t<_Iter> operator-(const move_sentinel<_Sent>& __x, const move_iterator& __y)
    {
        return __x.base() - __y.base();
    }

    template<sized_sentinel_for<_Iter> _Sent>
    friend _LIBCPP_HIDE_FROM_ABI constexpr
    iter_difference_t<_Iter> operator-(const move_iterator& __x, const move_sentinel<_Sent>& __y)
    {
        return __x.base() - __y.base();
    }

    friend _LIBCPP_HIDE_FROM_ABI constexpr
    iter_rvalue_reference_t<_Iter> iter_move(const move_iterator& __i)
        noexcept(noexcept(ranges::iter_move(__i.__current_)))
    {
        return ranges::iter_move(__i.__current_);
    }

    template<indirectly_swappable<_Iter> _It2>
    friend _LIBCPP_HIDE_FROM_ABI constexpr
    void iter_swap(const move_iterator& __x, const move_iterator<_It2>& __y)
        noexcept(noexcept(ranges::iter_swap(__x.__current_, __y.__current_)))
    {
        return ranges::iter_swap(__x.__current_, __y.__current_);
    }
#endif // _LIBCPP_STD_VER >= 20
# 245 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3

private:
    template<class _It2> friend class move_iterator;

    _Iter __current_;
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(move_iterator);

template <class _Iter1, class _Iter2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
bool operator==(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
{
    return __x.base() == __y.base();
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 261 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
template <class _Iter1, class _Iter2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
bool operator!=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
{
    return __x.base() != __y.base();
}
#endif // _LIBCPP_STD_VER <= 17
# 268 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3

template <class _Iter1, class _Iter2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
bool operator<(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
{
    return __x.base() < __y.base();
}

template <class _Iter1, class _Iter2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
bool operator>(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
{
    return __x.base() > __y.base();
}

template <class _Iter1, class _Iter2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
bool operator<=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
{
    return __x.base() <= __y.base();
}

template <class _Iter1, class _Iter2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
bool operator>=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
{
    return __x.base() >= __y.base();
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 298 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
template <class _Iter1, three_way_comparable_with<_Iter1> _Iter2>
inline _LIBCPP_HIDE_FROM_ABI constexpr
auto operator<=>(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
    -> compare_three_way_result_t<_Iter1, _Iter2>
{
    return __x.base() <=> __y.base();
}
#endif // _LIBCPP_STD_VER >= 20
# 306 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3

#ifndef _LIBCPP_CXX03_LANG
template <class _Iter1, class _Iter2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
auto operator-(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
    -> decltype(__x.base() - __y.base())
{
    return __x.base() - __y.base();
}
#else
# 316 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
template <class _Iter1, class _Iter2>
inline _LIBCPP_HIDE_FROM_ABI
typename move_iterator<_Iter1>::difference_type
operator-(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
{
    return __x.base() - __y.base();
}
#endif // !_LIBCPP_CXX03_LANG
# 324 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 326 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
template <class _Iter>
inline _LIBCPP_HIDE_FROM_ABI constexpr
move_iterator<_Iter> operator+(iter_difference_t<_Iter> __n, const move_iterator<_Iter>& __x)
    requires requires { { __x.base() + __n } -> same_as<_Iter>; }
{
    return __x + __n;
}
#else
# 334 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
template <class _Iter>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator<_Iter>
operator+(typename move_iterator<_Iter>::difference_type __n, const move_iterator<_Iter>& __x)
{
    return move_iterator<_Iter>(__x.base() + __n);
}
#endif // _LIBCPP_STD_VER >= 20
# 342 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3

template <class _Iter>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator<_Iter>
make_move_iterator(_Iter __i)
{
    return move_iterator<_Iter>(std::move(__i));
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ITERATOR_MOVE_ITERATOR_H
# 356 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/move_iterator.h" 3
#endif /* move_iterator.h expanded by -frewrite-includes */
# 703 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/move_sentinel.h>
#endif /* expanded by -frewrite-includes */
# 703 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 704 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* next.h expanded by -frewrite-includes */
#include <__iterator/next.h>
#else /* next.h expanded by -frewrite-includes */
# 704 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_NEXT_H
#define _LIBCPP___ITERATOR_NEXT_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIter, __enable_if_t<__has_input_iterator_category<_InputIter>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    _InputIter
    next(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) {
  _LIBCPP_ASSERT_UNCATEGORIZED(__n >= 0 || __has_bidirectional_iterator_category<_InputIter>::value,
                               "Attempt to next(it, n) with negative n on a non-bidirectional iterator");

  _VSTD::advance(__x, __n);
  return __x;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3

// [range.iter.op.next]

namespace ranges {
namespace __next {

struct __fn {
  template <input_or_output_iterator _Ip>
  _LIBCPP_HIDE_FROM_ABI
  constexpr _Ip operator()(_Ip __x) const {
    ++__x;
    return __x;
  }

  template <input_or_output_iterator _Ip>
  _LIBCPP_HIDE_FROM_ABI
  constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n) const {
    ranges::advance(__x, __n);
    return __x;
  }

  template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
  _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, _Sp __bound_sentinel) const {
    ranges::advance(__x, __bound_sentinel);
    return __x;
  }

  template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
  _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n, _Sp __bound_sentinel) const {
    ranges::advance(__x, __n, __bound_sentinel);
    return __x;
  }
};

} // namespace __next

inline namespace __cpo {
  inline constexpr auto next = __next::__fn{};
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_NEXT_H
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/next.h" 3
#endif /* next.h expanded by -frewrite-includes */
# 705 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ostream_iterator.h expanded by -frewrite-includes */
#include <__iterator/ostream_iterator.h>
#else /* ostream_iterator.h expanded by -frewrite-includes */
# 705 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_OSTREAM_ITERATOR_H
#define _LIBCPP___ITERATOR_OSTREAM_ITERATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd> // for forward declarations of char_traits and basic_ostream
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Tp, class _CharT = char, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS ostream_iterator
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
    : public iterator<output_iterator_tag, void, void, void, void>
#endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
{
_LIBCPP_SUPPRESS_DEPRECATED_POP
public:
    typedef output_iterator_tag             iterator_category;
    typedef void                            value_type;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
    typedef ptrdiff_t                       difference_type;
#else
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
    typedef void                            difference_type;
#endif
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
    typedef void                            pointer;
    typedef void                            reference;
    typedef _CharT                          char_type;
    typedef _Traits                         traits_type;
    typedef basic_ostream<_CharT, _Traits>  ostream_type;

private:
    ostream_type* __out_stream_;
    const char_type* __delim_;
public:
    _LIBCPP_INLINE_VISIBILITY ostream_iterator(ostream_type& __s) _NOEXCEPT
        : __out_stream_(_VSTD::addressof(__s)), __delim_(nullptr) {}
    _LIBCPP_INLINE_VISIBILITY ostream_iterator(ostream_type& __s, const _CharT* __delimiter) _NOEXCEPT
        : __out_stream_(_VSTD::addressof(__s)), __delim_(__delimiter) {}
    _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator=(const _Tp& __value)
        {
            *__out_stream_ << __value;
            if (__delim_)
                *__out_stream_ << __delim_;
            return *this;
        }

    _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator*()     {return *this;}
    _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator++()    {return *this;}
    _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator++(int) {return *this;}
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_OSTREAM_ITERATOR_H
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostream_iterator.h" 3
#endif /* ostream_iterator.h expanded by -frewrite-includes */
# 706 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ostreambuf_iterator.h expanded by -frewrite-includes */
#include <__iterator/ostreambuf_iterator.h>
#else /* ostreambuf_iterator.h expanded by -frewrite-includes */
# 706 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_OSTREAMBUF_ITERATOR_H
#define _LIBCPP___ITERATOR_OSTREAMBUF_ITERATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd> // for forward declaration of basic_streambuf
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _CharT, class _Traits>
class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
    : public iterator<output_iterator_tag, void, void, void, void>
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
{
_LIBCPP_SUPPRESS_DEPRECATED_POP
public:
    typedef output_iterator_tag                 iterator_category;
    typedef void                                value_type;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
    typedef ptrdiff_t                           difference_type;
#else
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
    typedef void                                difference_type;
#endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
    typedef void                                pointer;
    typedef void                                reference;
    typedef _CharT                              char_type;
    typedef _Traits                             traits_type;
    typedef basic_streambuf<_CharT, _Traits>    streambuf_type;
    typedef basic_ostream<_CharT, _Traits>      ostream_type;

private:
    streambuf_type* __sbuf_;
public:
    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator(ostream_type& __s) _NOEXCEPT
        : __sbuf_(__s.rdbuf()) {}
    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator(streambuf_type* __s) _NOEXCEPT
        : __sbuf_(__s) {}
    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator=(_CharT __c)
        {
            if (__sbuf_ && traits_type::eq_int_type(__sbuf_->sputc(__c), traits_type::eof()))
                __sbuf_ = nullptr;
            return *this;
        }
    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator*()     {return *this;}
    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator++()    {return *this;}
    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator++(int) {return *this;}
    _LIBCPP_INLINE_VISIBILITY bool failed() const _NOEXCEPT {return __sbuf_ == nullptr;}

    template <class _Ch, class _Tr>
    friend
    _LIBCPP_HIDE_FROM_ABI
    ostreambuf_iterator<_Ch, _Tr>
    __pad_and_output(ostreambuf_iterator<_Ch, _Tr> __s,
                     const _Ch* __ob, const _Ch* __op, const _Ch* __oe,
                     ios_base& __iob, _Ch __fl);
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_OSTREAMBUF_ITERATOR_H
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ostreambuf_iterator.h" 3
#endif /* ostreambuf_iterator.h expanded by -frewrite-includes */
# 707 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* permutable.h expanded by -frewrite-includes */
#include <__iterator/permutable.h>
#else /* permutable.h expanded by -frewrite-includes */
# 707 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/permutable.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_PERMUTABLE_H
#define _LIBCPP___ITERATOR_PERMUTABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/permutable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/permutable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/permutable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/permutable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/permutable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/permutable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/permutable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/permutable.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/permutable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/permutable.h" 3

template <class _Iterator>
concept permutable =
    forward_iterator<_Iterator> &&
    indirectly_movable_storable<_Iterator, _Iterator> &&
    indirectly_swappable<_Iterator, _Iterator>;

#endif // _LIBCPP_STD_VER >= 20
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/permutable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_PERMUTABLE_H
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/permutable.h" 3
#endif /* permutable.h expanded by -frewrite-includes */
# 708 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* prev.h expanded by -frewrite-includes */
#include <__iterator/prev.h>
#else /* prev.h expanded by -frewrite-includes */
# 708 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_PREV_H
#define _LIBCPP___ITERATOR_PREV_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIter, __enable_if_t<__has_input_iterator_category<_InputIter>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    _InputIter
    prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) {
  _LIBCPP_ASSERT_UNCATEGORIZED(__n <= 0 || __has_bidirectional_iterator_category<_InputIter>::value,
                               "Attempt to prev(it, n) with a positive n on a non-bidirectional iterator");
  _VSTD::advance(__x, -__n);
  return __x;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3

// [range.iter.op.prev]

namespace ranges {
namespace __prev {

struct __fn {
  template <bidirectional_iterator _Ip>
  _LIBCPP_HIDE_FROM_ABI
  constexpr _Ip operator()(_Ip __x) const {
    --__x;
    return __x;
  }

  template <bidirectional_iterator _Ip>
  _LIBCPP_HIDE_FROM_ABI
  constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n) const {
    ranges::advance(__x, -__n);
    return __x;
  }

  template <bidirectional_iterator _Ip>
  _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n, _Ip __bound_iter) const {
    ranges::advance(__x, -__n, __bound_iter);
    return __x;
  }
};

} // namespace __prev

inline namespace __cpo {
  inline constexpr auto prev = __prev::__fn{};
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_PREV_H
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/prev.h" 3
#endif /* prev.h expanded by -frewrite-includes */
# 709 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 709 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 710 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#endif /* expanded by -frewrite-includes */
# 710 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 711 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* reverse_access.h expanded by -frewrite-includes */
#include <__iterator/reverse_access.h>
#else /* reverse_access.h expanded by -frewrite-includes */
# 711 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_access.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_REVERSE_ACCESS_H
#define _LIBCPP___ITERATOR_REVERSE_ACCESS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_access.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_access.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* reverse_iterator.h expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#else /* reverse_iterator.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_access.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_REVERSE_ITERATOR_H
#define _LIBCPP___ITERATOR_REVERSE_ITERATOR_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* unwrap_iter.h expanded by -frewrite-includes */
#include <__algorithm/unwrap_iter.h>
#else /* unwrap_iter.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_UNWRAP_ITER_H
#define _LIBCPP___ALGORITHM_UNWRAP_ITER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

// TODO: Change the name of __unwrap_iter_impl to something more appropriate
// The job of __unwrap_iter is to remove iterator wrappers (like reverse_iterator or __wrap_iter),
// to reduce the number of template instantiations and to enable pointer-based optimizations e.g. in std::copy.
//
// Some algorithms (e.g. std::copy, but not std::sort) need to convert an
// "unwrapped" result back into the original iterator type. Doing that is the job of __rewrap_iter.

// Default case - we can't unwrap anything
template <class _Iter, bool = __libcpp_is_contiguous_iterator<_Iter>::value>
struct __unwrap_iter_impl {
  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap(_Iter, _Iter __iter) { return __iter; }
  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __unwrap(_Iter __i) _NOEXCEPT { return __i; }
};

// TODO(hardening): make sure that the following unwrapping doesn't unexpectedly turn hardened iterators into raw
// pointers.

// It's a contiguous iterator, so we can use a raw pointer instead
template <class _Iter>
struct __unwrap_iter_impl<_Iter, true> {
  using _ToAddressT = decltype(std::__to_address(std::declval<_Iter>()));

  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap(_Iter __orig_iter, _ToAddressT __unwrapped_iter) {
    return __orig_iter + (__unwrapped_iter - std::__to_address(__orig_iter));
  }

  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ToAddressT __unwrap(_Iter __i) _NOEXCEPT {
    return std::__to_address(__i);
  }
};

template<class _Iter,
         class _Impl = __unwrap_iter_impl<_Iter>,
         __enable_if_t<is_copy_constructible<_Iter>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
decltype(_Impl::__unwrap(std::declval<_Iter>())) __unwrap_iter(_Iter __i) _NOEXCEPT {
  return _Impl::__unwrap(__i);
}

// Allow input_iterators to be passed to __unwrap_iter (but not __rewrap_iter)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
template <class _Iter, __enable_if_t<!is_copy_constructible<_Iter>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI constexpr _Iter __unwrap_iter(_Iter __i) noexcept {
  return __i;
}
#endif
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3

template <class _OrigIter, class _Iter, class _Impl = __unwrap_iter_impl<_OrigIter> >
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _OrigIter __rewrap_iter(_OrigIter __orig_iter, _Iter __iter) _NOEXCEPT {
  return _Impl::__rewrap(std::move(__orig_iter), std::move(__iter));
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_PUSH_MACROS

#endif // _LIBCPP___ALGORITHM_UNWRAP_ITER_H
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_iter.h" 3
#endif /* unwrap_iter.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/compare_three_way_result.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/three_way_comparable.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/prev.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* segmented_iterator.h expanded by -frewrite-includes */
#include <__iterator/segmented_iterator.h>
#else /* segmented_iterator.h expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/segmented_iterator.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___SEGMENTED_ITERATOR_H
#define _LIBCPP___SEGMENTED_ITERATOR_H

// Segmented iterators are iterators over (not necessarily contiguous) sub-ranges.
//
// For example, std::deque stores its data into multiple blocks of contiguous memory,
// which are not stored contiguously themselves. The concept of segmented iterators
// allows algorithms to operate over these multi-level iterators natively, opening the
// door to various optimizations. See http://lafstern.org/matt/segmented.pdf for details.
//
// If __segmented_iterator_traits can be instantiated, the following functions and associated types must be provided:
// - Traits::__local_iterator
//   The type of iterators used to iterate inside a segment.
//
// - Traits::__segment_iterator
//   The type of iterators used to iterate over segments.
//   Segment iterators can be forward iterators or bidirectional iterators, depending on the
//   underlying data structure.
//
// - static __segment_iterator Traits::__segment(It __it)
//   Returns an iterator to the segment that the provided iterator is in.
//
// - static __local_iterator Traits::__local(It __it)
//   Returns the local iterator pointing to the element that the provided iterator points to.
//
// - static __local_iterator Traits::__begin(__segment_iterator __it)
//   Returns the local iterator to the beginning of the segment that the provided iterator is pointing into.
//
// - static __local_iterator Traits::__end(__segment_iterator __it)
//   Returns the one-past-the-end local iterator to the segment that the provided iterator is pointing into.
//
// - static It Traits::__compose(__segment_iterator, __local_iterator)
//   Returns the iterator composed of the segment iterator and local iterator.

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/segmented_iterator.h" 3
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/segmented_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/segmented_iterator.h" 3
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/segmented_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/segmented_iterator.h" 3
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/segmented_iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/segmented_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/segmented_iterator.h" 3
#endif
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/segmented_iterator.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Iterator>
struct __segmented_iterator_traits;
/* exposition-only:
{
  using __segment_iterator = ...;
  using __local_iterator   = ...;

  static __segment_iterator __segment(_Iterator);
  static __local_iterator __local(_Iterator);
  static __local_iterator __begin(__segment_iterator);
  static __local_iterator __end(__segment_iterator);
  static _Iterator __compose(__segment_iterator, __local_iterator);
};
*/

template <class _Tp, size_t = 0>
struct __has_specialization : false_type {};

template <class _Tp>
struct __has_specialization<_Tp, sizeof(_Tp) * 0> : true_type {};

template <class _Iterator>
using __is_segmented_iterator = __has_specialization<__segmented_iterator_traits<_Iterator> >;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___SEGMENTED_ITERATOR_H
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/segmented_iterator.h" 3
#endif /* segmented_iterator.h expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* subrange.h expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#else /* subrange.h expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_SUBRANGE_H
#define _LIBCPP___RANGES_SUBRANGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/derived_from.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/different_from.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/get.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/subrange.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* dangling.h expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#else /* dangling.h expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/dangling.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_DANGLING_H
#define _LIBCPP___RANGES_DANGLING_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/dangling.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/dangling.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/dangling.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/dangling.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/dangling.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/dangling.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/dangling.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/dangling.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/dangling.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/dangling.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/dangling.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/dangling.h" 3

namespace ranges {
struct dangling {
  dangling() = default;
  _LIBCPP_HIDE_FROM_ABI constexpr dangling(auto&&...) noexcept {}
};

template <range _Rp>
using borrowed_iterator_t = _If<borrowed_range<_Rp>, iterator_t<_Rp>, dangling>;

// borrowed_subrange_t defined in <__ranges/subrange.h>
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/dangling.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_DANGLING_H
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/dangling.h" 3
#endif /* dangling.h expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* view_interface.h expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#else /* view_interface.h expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_VIEW_INTERFACE_H
#define _LIBCPP___RANGES_VIEW_INTERFACE_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/derived_from.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/prev.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* empty.h expanded by -frewrite-includes */
#include <__ranges/empty.h>
#else /* empty.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_EMPTY_H
#define _LIBCPP___RANGES_EMPTY_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/class_or_enum.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3

// [range.prim.empty]

namespace ranges {
namespace __empty {
  template <class _Tp>
  concept __member_empty =
    __workaround_52970<_Tp> &&
    requires(_Tp&& __t) {
      bool(__t.empty());
    };

  template<class _Tp>
  concept __can_invoke_size =
    !__member_empty<_Tp> &&
    requires(_Tp&& __t) { ranges::size(__t); };

  template <class _Tp>
  concept __can_compare_begin_end =
    !__member_empty<_Tp> &&
    !__can_invoke_size<_Tp> &&
    requires(_Tp&& __t) {
      bool(ranges::begin(__t) == ranges::end(__t));
      { ranges::begin(__t) } -> forward_iterator;
    };

  struct __fn {
    template <__member_empty _Tp>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const
        noexcept(noexcept(bool(__t.empty()))) {
      return bool(__t.empty());
    }

    template <__can_invoke_size _Tp>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const
        noexcept(noexcept(ranges::size(__t))) {
      return ranges::size(__t) == 0;
    }

    template<__can_compare_begin_end _Tp>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const
        noexcept(noexcept(bool(ranges::begin(__t) == ranges::end(__t)))) {
      return ranges::begin(__t) == ranges::end(__t);
    }
  };
} // namespace __empty

inline namespace __cpo {
  inline constexpr auto empty = __empty::__fn{};
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_EMPTY_H
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty.h" 3
#endif /* empty.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_class.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3

namespace ranges {

template<class _Derived>
  requires is_class_v<_Derived> && same_as<_Derived, remove_cv_t<_Derived>>
class view_interface {
  _LIBCPP_HIDE_FROM_ABI
  constexpr _Derived& __derived() noexcept {
    static_assert(sizeof(_Derived) && derived_from<_Derived, view_interface> && view<_Derived>);
    return static_cast<_Derived&>(*this);
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr _Derived const& __derived() const noexcept {
    static_assert(sizeof(_Derived) && derived_from<_Derived, view_interface> && view<_Derived>);
    return static_cast<_Derived const&>(*this);
  }

public:
  template<class _D2 = _Derived>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool empty()
    requires forward_range<_D2>
  {
    return ranges::begin(__derived()) == ranges::end(__derived());
  }

  template<class _D2 = _Derived>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool empty() const
    requires forward_range<const _D2>
  {
    return ranges::begin(__derived()) == ranges::end(__derived());
  }

  template<class _D2 = _Derived>
  _LIBCPP_HIDE_FROM_ABI
  constexpr explicit operator bool()
    requires requires (_D2& __t) { ranges::empty(__t); }
  {
    return !ranges::empty(__derived());
  }

  template<class _D2 = _Derived>
  _LIBCPP_HIDE_FROM_ABI
  constexpr explicit operator bool() const
    requires requires (const _D2& __t) { ranges::empty(__t); }
  {
    return !ranges::empty(__derived());
  }

  template<class _D2 = _Derived>
  _LIBCPP_HIDE_FROM_ABI
  constexpr auto data()
    requires contiguous_iterator<iterator_t<_D2>>
  {
    return std::to_address(ranges::begin(__derived()));
  }

  template<class _D2 = _Derived>
  _LIBCPP_HIDE_FROM_ABI
  constexpr auto data() const
    requires range<const _D2> && contiguous_iterator<iterator_t<const _D2>>
  {
    return std::to_address(ranges::begin(__derived()));
  }

  template<class _D2 = _Derived>
  _LIBCPP_HIDE_FROM_ABI
  constexpr auto size()
    requires forward_range<_D2> && sized_sentinel_for<sentinel_t<_D2>, iterator_t<_D2>>
  {
    return std::__to_unsigned_like(ranges::end(__derived()) - ranges::begin(__derived()));
  }

  template<class _D2 = _Derived>
  _LIBCPP_HIDE_FROM_ABI
  constexpr auto size() const
    requires forward_range<const _D2> && sized_sentinel_for<sentinel_t<const _D2>, iterator_t<const _D2>>
  {
    return std::__to_unsigned_like(ranges::end(__derived()) - ranges::begin(__derived()));
  }

  template<class _D2 = _Derived>
  _LIBCPP_HIDE_FROM_ABI
  constexpr decltype(auto) front()
    requires forward_range<_D2>
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(!empty(),
        "Precondition `!empty()` not satisfied. `.front()` called on an empty view.");
    return *ranges::begin(__derived());
  }

  template<class _D2 = _Derived>
  _LIBCPP_HIDE_FROM_ABI
  constexpr decltype(auto) front() const
    requires forward_range<const _D2>
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(!empty(),
        "Precondition `!empty()` not satisfied. `.front()` called on an empty view.");
    return *ranges::begin(__derived());
  }

  template<class _D2 = _Derived>
  _LIBCPP_HIDE_FROM_ABI
  constexpr decltype(auto) back()
    requires bidirectional_range<_D2> && common_range<_D2>
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(!empty(),
        "Precondition `!empty()` not satisfied. `.back()` called on an empty view.");
    return *ranges::prev(ranges::end(__derived()));
  }

  template<class _D2 = _Derived>
  _LIBCPP_HIDE_FROM_ABI
  constexpr decltype(auto) back() const
    requires bidirectional_range<const _D2> && common_range<const _D2>
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(!empty(),
        "Precondition `!empty()` not satisfied. `.back()` called on an empty view.");
    return *ranges::prev(ranges::end(__derived()));
  }

  template<random_access_range _RARange = _Derived>
  _LIBCPP_HIDE_FROM_ABI
  constexpr decltype(auto) operator[](range_difference_t<_RARange> __index)
  {
    return ranges::begin(__derived())[__index];
  }

  template<random_access_range _RARange = const _Derived>
  _LIBCPP_HIDE_FROM_ABI
  constexpr decltype(auto) operator[](range_difference_t<_RARange> __index) const
  {
    return ranges::begin(__derived())[__index];
  }
};

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 174 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_VIEW_INTERFACE_H
# 178 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/view_interface.h" 3
#endif /* view_interface.h expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/pair_like.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_element.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_size.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_pointer.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_const.h>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_pointer.h>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#endif
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3

namespace ranges {
  template<class _From, class _To>
  concept __uses_nonqualification_pointer_conversion =
    is_pointer_v<_From> && is_pointer_v<_To> &&
    !convertible_to<remove_pointer_t<_From>(*)[], remove_pointer_t<_To>(*)[]>;

  template<class _From, class _To>
  concept __convertible_to_non_slicing =
    convertible_to<_From, _To> &&
    !__uses_nonqualification_pointer_conversion<decay_t<_From>, decay_t<_To>>;

  template<class _Pair, class _Iter, class _Sent>
  concept __pair_like_convertible_from =
    !range<_Pair> && __pair_like<_Pair> &&
    constructible_from<_Pair, _Iter, _Sent> &&
    __convertible_to_non_slicing<_Iter, tuple_element_t<0, _Pair>> &&
    convertible_to<_Sent, tuple_element_t<1, _Pair>>;

  template<input_or_output_iterator _Iter, sentinel_for<_Iter> _Sent = _Iter,
           subrange_kind _Kind = sized_sentinel_for<_Sent, _Iter>
             ? subrange_kind::sized
             : subrange_kind::unsized>
    requires (_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _Iter>)
  class _LIBCPP_TEMPLATE_VIS subrange
    : public view_interface<subrange<_Iter, _Sent, _Kind>>
  {
  public:
    // Note: this is an internal implementation detail that is public only for internal usage.
    static constexpr bool _StoreSize = (_Kind == subrange_kind::sized && !sized_sentinel_for<_Sent, _Iter>);

  private:
    static constexpr bool _MustProvideSizeAtConstruction = !_StoreSize; // just to improve compiler diagnostics
    struct _Empty { _LIBCPP_HIDE_FROM_ABI constexpr _Empty(auto) noexcept { } };
    using _Size = conditional_t<_StoreSize, make_unsigned_t<iter_difference_t<_Iter>>, _Empty>;
    _LIBCPP_NO_UNIQUE_ADDRESS _Iter __begin_ = _Iter();
    _LIBCPP_NO_UNIQUE_ADDRESS _Sent __end_ = _Sent();
    _LIBCPP_NO_UNIQUE_ADDRESS _Size __size_ = 0;

  public:
    _LIBCPP_HIDE_FROM_ABI
    subrange() requires default_initializable<_Iter> = default;

    _LIBCPP_HIDE_FROM_ABI
    constexpr subrange(__convertible_to_non_slicing<_Iter> auto __iter, _Sent __sent)
      requires _MustProvideSizeAtConstruction
      : __begin_(std::move(__iter)), __end_(std::move(__sent))
    { }

    _LIBCPP_HIDE_FROM_ABI
    constexpr subrange(__convertible_to_non_slicing<_Iter> auto __iter, _Sent __sent,
                       make_unsigned_t<iter_difference_t<_Iter>> __n)
      requires (_Kind == subrange_kind::sized)
      : __begin_(std::move(__iter)), __end_(std::move(__sent)), __size_(__n)
    {
      if constexpr (sized_sentinel_for<_Sent, _Iter>)
        _LIBCPP_ASSERT_UNCATEGORIZED((__end_ - __begin_) == static_cast<iter_difference_t<_Iter>>(__n),
          "std::ranges::subrange was passed an invalid size hint");
    }

    template<__different_from<subrange> _Range>
      requires borrowed_range<_Range> &&
               __convertible_to_non_slicing<iterator_t<_Range>, _Iter> &&
               convertible_to<sentinel_t<_Range>, _Sent>
    _LIBCPP_HIDE_FROM_ABI
    constexpr subrange(_Range&& __range)
      requires (!_StoreSize)
      : subrange(ranges::begin(__range), ranges::end(__range))
    { }

    template<__different_from<subrange> _Range>
      requires borrowed_range<_Range> &&
               __convertible_to_non_slicing<iterator_t<_Range>, _Iter> &&
               convertible_to<sentinel_t<_Range>, _Sent>
    _LIBCPP_HIDE_FROM_ABI
    constexpr subrange(_Range&& __range)
      requires _StoreSize && sized_range<_Range>
      : subrange(__range, ranges::size(__range))
    { }

    template<borrowed_range _Range>
      requires __convertible_to_non_slicing<iterator_t<_Range>, _Iter> &&
               convertible_to<sentinel_t<_Range>, _Sent>
    _LIBCPP_HIDE_FROM_ABI
    constexpr subrange(_Range&& __range, make_unsigned_t<iter_difference_t<_Iter>> __n)
      requires (_Kind == subrange_kind::sized)
      : subrange(ranges::begin(__range), ranges::end(__range), __n)
    { }

    template<__different_from<subrange> _Pair>
      requires __pair_like_convertible_from<_Pair, const _Iter&, const _Sent&>
    _LIBCPP_HIDE_FROM_ABI
    constexpr operator _Pair() const {
      return _Pair(__begin_, __end_);
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr _Iter begin() const requires copyable<_Iter> {
      return __begin_;
    }

    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Iter begin() requires (!copyable<_Iter>) {
      return std::move(__begin_);
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr _Sent end() const {
      return __end_;
    }

    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool empty() const {
      return __begin_ == __end_;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr make_unsigned_t<iter_difference_t<_Iter>> size() const
      requires (_Kind == subrange_kind::sized)
    {
      if constexpr (_StoreSize)
        return __size_;
      else
        return std::__to_unsigned_like(__end_ - __begin_);
    }

    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr subrange next(iter_difference_t<_Iter> __n = 1) const&
      requires forward_iterator<_Iter>
    {
      auto __tmp = *this;
      __tmp.advance(__n);
      return __tmp;
    }

    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr subrange next(iter_difference_t<_Iter> __n = 1) && {
      advance(__n);
      return std::move(*this);
    }

    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr subrange prev(iter_difference_t<_Iter> __n = 1) const
      requires bidirectional_iterator<_Iter>
    {
      auto __tmp = *this;
      __tmp.advance(-__n);
      return __tmp;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr subrange& advance(iter_difference_t<_Iter> __n) {
      if constexpr (bidirectional_iterator<_Iter>) {
        if (__n < 0) {
          ranges::advance(__begin_, __n);
          if constexpr (_StoreSize)
            __size_ += std::__to_unsigned_like(-__n);
          return *this;
        }
      }

      auto __d = __n - ranges::advance(__begin_, __n, __end_);
      if constexpr (_StoreSize)
        __size_ -= std::__to_unsigned_like(__d);
      return *this;
    }
  };

  template<input_or_output_iterator _Iter, sentinel_for<_Iter> _Sent>
  subrange(_Iter, _Sent) -> subrange<_Iter, _Sent>;

  template<input_or_output_iterator _Iter, sentinel_for<_Iter> _Sent>
  subrange(_Iter, _Sent, make_unsigned_t<iter_difference_t<_Iter>>)
    -> subrange<_Iter, _Sent, subrange_kind::sized>;

  template<borrowed_range _Range>
  subrange(_Range&&) -> subrange<iterator_t<_Range>, sentinel_t<_Range>,
                                 (sized_range<_Range> || sized_sentinel_for<sentinel_t<_Range>, iterator_t<_Range>>)
                                   ? subrange_kind::sized : subrange_kind::unsized>;

  template<borrowed_range _Range>
  subrange(_Range&&, make_unsigned_t<range_difference_t<_Range>>)
    -> subrange<iterator_t<_Range>, sentinel_t<_Range>, subrange_kind::sized>;

  template<size_t _Index, class _Iter, class _Sent, subrange_kind _Kind>
    requires ((_Index == 0 && copyable<_Iter>) || _Index == 1)
  _LIBCPP_HIDE_FROM_ABI
  constexpr auto get(const subrange<_Iter, _Sent, _Kind>& __subrange) {
    if constexpr (_Index == 0)
      return __subrange.begin();
    else
      return __subrange.end();
  }

  template<size_t _Index, class _Iter, class _Sent, subrange_kind _Kind>
    requires (_Index < 2)
  _LIBCPP_HIDE_FROM_ABI
  constexpr auto get(subrange<_Iter, _Sent, _Kind>&& __subrange) {
    if constexpr (_Index == 0)
      return __subrange.begin();
    else
      return __subrange.end();
  }

  template<class _Ip, class _Sp, subrange_kind _Kp>
  inline constexpr bool enable_borrowed_range<subrange<_Ip, _Sp, _Kp>> = true;

  template<range _Rp>
  using borrowed_subrange_t = _If<borrowed_range<_Rp>, subrange<iterator_t<_Rp>>, dangling>;
} // namespace ranges

// [range.subrange.general]

using ranges::get;

// [ranges.syn]

template<class _Ip, class _Sp, ranges::subrange_kind _Kp>
struct tuple_size<ranges::subrange<_Ip, _Sp, _Kp>> : integral_constant<size_t, 2> {};

template<class _Ip, class _Sp, ranges::subrange_kind _Kp>
struct tuple_element<0, ranges::subrange<_Ip, _Sp, _Kp>> {
  using type = _Ip;
};

template<class _Ip, class _Sp, ranges::subrange_kind _Kp>
struct tuple_element<1, ranges::subrange<_Ip, _Sp, _Kp>> {
  using type = _Sp;
};

template<class _Ip, class _Sp, ranges::subrange_kind _Kp>
struct tuple_element<0, const ranges::subrange<_Ip, _Sp, _Kp>> {
  using type = _Ip;
};

template<class _Ip, class _Sp, ranges::subrange_kind _Kp>
struct tuple_element<1, const ranges::subrange<_Ip, _Sp, _Kp>> {
  using type = _Sp;
};

#endif // _LIBCPP_STD_VER >= 20
# 291 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___RANGES_SUBRANGE_H
# 297 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/subrange.h" 3
#endif /* subrange.h expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_assignable.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_pointer.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#endif
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Iter>
class _LIBCPP_TEMPLATE_VIS reverse_iterator
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
    : public iterator<typename iterator_traits<_Iter>::iterator_category,
                      typename iterator_traits<_Iter>::value_type,
                      typename iterator_traits<_Iter>::difference_type,
                      typename iterator_traits<_Iter>::pointer,
                      typename iterator_traits<_Iter>::reference>
#endif
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
{
_LIBCPP_SUPPRESS_DEPRECATED_POP
private:
#ifndef _LIBCPP_ABI_NO_ITERATOR_BASES
    _Iter __t_; // no longer used as of LWG #2360, not removed due to ABI break
#endif
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
    static_assert(__has_bidirectional_iterator_category<_Iter>::value || bidirectional_iterator<_Iter>,
        "reverse_iterator<It> requires It to be a bidirectional iterator.");
#endif // _LIBCPP_STD_VER >= 20
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3

protected:
    _Iter current;
public:
    using iterator_type = _Iter;

    using iterator_category = _If<__has_random_access_iterator_category<_Iter>::value,
                                  random_access_iterator_tag,
                                  typename iterator_traits<_Iter>::iterator_category>;
    using pointer = typename iterator_traits<_Iter>::pointer;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
    using iterator_concept = _If<random_access_iterator<_Iter>, random_access_iterator_tag, bidirectional_iterator_tag>;
    using value_type = iter_value_t<_Iter>;
    using difference_type = iter_difference_t<_Iter>;
    using reference = iter_reference_t<_Iter>;
#else
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
    using value_type = typename iterator_traits<_Iter>::value_type;
    using difference_type = typename iterator_traits<_Iter>::difference_type;
    using reference = typename iterator_traits<_Iter>::reference;
#endif
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3

#ifndef _LIBCPP_ABI_NO_ITERATOR_BASES
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator() : __t_(), current() {}

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    explicit reverse_iterator(_Iter __x) : __t_(__x), current(__x) {}

    template <class _Up, class = __enable_if_t<
        !is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value
    > >
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator(const reverse_iterator<_Up>& __u)
        : __t_(__u.base()), current(__u.base())
    { }

    template <class _Up, class = __enable_if_t<
        !is_same<_Up, _Iter>::value &&
        is_convertible<_Up const&, _Iter>::value &&
        is_assignable<_Iter&, _Up const&>::value
    > >
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator& operator=(const reverse_iterator<_Up>& __u) {
        __t_ = current = __u.base();
        return *this;
    }
#else
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator() : current() {}

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    explicit reverse_iterator(_Iter __x) : current(__x) {}

    template <class _Up, class = __enable_if_t<
        !is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value
    > >
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator(const reverse_iterator<_Up>& __u)
        : current(__u.base())
    { }

    template <class _Up, class = __enable_if_t<
        !is_same<_Up, _Iter>::value &&
        is_convertible<_Up const&, _Iter>::value &&
        is_assignable<_Iter&, _Up const&>::value
    > >
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator& operator=(const reverse_iterator<_Up>& __u) {
        current = __u.base();
        return *this;
    }
#endif
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    _Iter base() const {return current;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reference operator*() const {_Iter __tmp = current; return *--__tmp;}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
    _LIBCPP_INLINE_VISIBILITY
    constexpr pointer operator->() const
      requires is_pointer_v<_Iter> || requires(const _Iter __i) { __i.operator->(); }
    {
      if constexpr (is_pointer_v<_Iter>) {
        return std::prev(current);
      } else {
        return std::prev(current).operator->();
      }
    }
#else
# 159 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    pointer operator->() const {
      return std::addressof(operator*());
    }
#endif // _LIBCPP_STD_VER >= 20
# 164 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator& operator++() {--current; return *this;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator operator++(int) {reverse_iterator __tmp(*this); --current; return __tmp;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator& operator--() {++current; return *this;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator operator--(int) {reverse_iterator __tmp(*this); ++current; return __tmp;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator operator+(difference_type __n) const {return reverse_iterator(current - __n);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator& operator+=(difference_type __n) {current -= __n; return *this;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator operator-(difference_type __n) const {return reverse_iterator(current + __n);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator& operator-=(difference_type __n) {current += __n; return *this;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reference operator[](difference_type __n) const {return *(*this + __n);}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
    _LIBCPP_HIDE_FROM_ABI friend constexpr
    iter_rvalue_reference_t<_Iter> iter_move(const reverse_iterator& __i)
      noexcept(is_nothrow_copy_constructible_v<_Iter> &&
          noexcept(ranges::iter_move(--std::declval<_Iter&>()))) {
      auto __tmp = __i.base();
      return ranges::iter_move(--__tmp);
    }

    template <indirectly_swappable<_Iter> _Iter2>
    _LIBCPP_HIDE_FROM_ABI friend constexpr
    void iter_swap(const reverse_iterator& __x, const reverse_iterator<_Iter2>& __y)
      noexcept(is_nothrow_copy_constructible_v<_Iter> &&
          is_nothrow_copy_constructible_v<_Iter2> &&
          noexcept(ranges::iter_swap(--std::declval<_Iter&>(), --std::declval<_Iter2&>()))) {
      auto __xtmp = __x.base();
      auto __ytmp = __y.base();
      ranges::iter_swap(--__xtmp, --__ytmp);
    }
#endif // _LIBCPP_STD_VER >= 20
# 204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
};

template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator==(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 211 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
    requires requires {
      { __x.base() == __y.base() } -> convertible_to<bool>;
    }
#endif // _LIBCPP_STD_VER >= 20
# 215 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
{
    return __x.base() == __y.base();
}

template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator<(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
    requires requires {
        { __x.base() > __y.base() } -> convertible_to<bool>;
      }
#endif // _LIBCPP_STD_VER >= 20
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
{
    return __x.base() > __y.base();
}

template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator!=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
    requires requires {
      { __x.base() != __y.base() } -> convertible_to<bool>;
    }
#endif // _LIBCPP_STD_VER >= 20
# 241 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
{
    return __x.base() != __y.base();
}

template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 250 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
    requires requires {
        { __x.base() < __y.base() } -> convertible_to<bool>;
      }
#endif // _LIBCPP_STD_VER >= 20
# 254 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
{
    return __x.base() < __y.base();
}

template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator>=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 263 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
    requires requires {
        { __x.base() <= __y.base() } -> convertible_to<bool>;
      }
#endif // _LIBCPP_STD_VER >= 20
# 267 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
{
    return __x.base() <= __y.base();
}

template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator<=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 276 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
    requires requires {
        { __x.base() >= __y.base() } -> convertible_to<bool>;
      }
#endif // _LIBCPP_STD_VER >= 20
# 280 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
{
    return __x.base() >= __y.base();
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 285 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
template <class _Iter1, three_way_comparable_with<_Iter1> _Iter2>
_LIBCPP_HIDE_FROM_ABI constexpr
compare_three_way_result_t<_Iter1, _Iter2>
operator<=>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
{
    return __y.base() <=> __x.base();
}
#endif // _LIBCPP_STD_VER >= 20
# 293 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3

#ifndef _LIBCPP_CXX03_LANG
template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto
operator-(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
-> decltype(__y.base() - __x.base())
{
    return __y.base() - __x.base();
}
#else
# 304 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY
typename reverse_iterator<_Iter1>::difference_type
operator-(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
{
    return __y.base() - __x.base();
}
#endif
# 312 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3

template <class _Iter>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator<_Iter>
operator+(typename reverse_iterator<_Iter>::difference_type __n, const reverse_iterator<_Iter>& __x)
{
    return reverse_iterator<_Iter>(__x.base() - __n);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 322 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
template <class _Iter1, class _Iter2>
  requires (!sized_sentinel_for<_Iter1, _Iter2>)
inline constexpr bool disable_sized_sentinel_for<reverse_iterator<_Iter1>, reverse_iterator<_Iter2>> = true;
#endif // _LIBCPP_STD_VER >= 20
# 326 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 328 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
template <class _Iter>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator<_Iter> make_reverse_iterator(_Iter __i)
{
    return reverse_iterator<_Iter>(__i);
}
#endif
# 335 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 337 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
template <class _Iter>
using __unconstrained_reverse_iterator = reverse_iterator<_Iter>;
#else
# 340 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3

// __unconstrained_reverse_iterator allows us to use reverse iterators in the implementation of algorithms by working
// around a language issue in C++20.
// In C++20, when a reverse iterator wraps certain C++20-hostile iterators, calling comparison operators on it will
// result in a compilation error. However, calling comparison operators on the pristine hostile iterator is not
// an error. Thus, we cannot use reverse_iterators in the implementation of an algorithm that accepts a
// C++20-hostile iterator. This class is an internal workaround -- it is a copy of reverse_iterator with
// tweaks to make it support hostile iterators.
//
// A C++20-hostile iterator is one that defines a comparison operator where one of the arguments is an exact match
// and the other requires an implicit conversion, for example:
//   friend bool operator==(const BaseIter&, const DerivedIter&);
//
// C++20 rules for rewriting equality operators create another overload of this function with parameters reversed:
//   friend bool operator==(const DerivedIter&, const BaseIter&);
//
// This creates an ambiguity in overload resolution.
//
// Clang treats this ambiguity differently in different contexts. When operator== is actually called in the function
// body, the code is accepted with a warning. When a concept requires operator== to be a valid expression, however,
// it evaluates to false. Thus, the implementation of reverse_iterator::operator== can actually call operator== on its
// base iterators, but the constraints on reverse_iterator::operator== prevent it from being considered during overload
// resolution. This class simply removes the problematic constraints from comparison functions.
template <class _Iter>
class __unconstrained_reverse_iterator {
  _Iter __iter_;

public:
  static_assert(__has_bidirectional_iterator_category<_Iter>::value || bidirectional_iterator<_Iter>);

  using iterator_type = _Iter;
  using iterator_category =
      _If<__has_random_access_iterator_category<_Iter>::value, random_access_iterator_tag, __iterator_category_type<_Iter>>;
  using pointer = __iterator_pointer_type<_Iter>;
  using value_type = iter_value_t<_Iter>;
  using difference_type = iter_difference_t<_Iter>;
  using reference = iter_reference_t<_Iter>;

  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator() = default;
  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator(const __unconstrained_reverse_iterator&) = default;
  _LIBCPP_HIDE_FROM_ABI constexpr explicit __unconstrained_reverse_iterator(_Iter __iter) : __iter_(__iter) {}

  _LIBCPP_HIDE_FROM_ABI constexpr _Iter base() const { return __iter_; }
  _LIBCPP_HIDE_FROM_ABI constexpr reference operator*() const {
    auto __tmp = __iter_;
    return *--__tmp;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr pointer operator->() const {
    if constexpr (is_pointer_v<_Iter>) {
      return std::prev(__iter_);
    } else {
      return std::prev(__iter_).operator->();
    }
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr
  iter_rvalue_reference_t<_Iter> iter_move(const __unconstrained_reverse_iterator& __i)
    noexcept(is_nothrow_copy_constructible_v<_Iter> &&
        noexcept(ranges::iter_move(--std::declval<_Iter&>()))) {
    auto __tmp = __i.base();
    return ranges::iter_move(--__tmp);
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator& operator++() {
    --__iter_;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator operator++(int) {
    auto __tmp = *this;
    --__iter_;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator& operator--() {
    ++__iter_;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator operator--(int) {
    auto __tmp = *this;
    ++__iter_;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator& operator+=(difference_type __n) {
    __iter_ -= __n;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator& operator-=(difference_type __n) {
    __iter_ += __n;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator operator+(difference_type __n) const {
    return __unconstrained_reverse_iterator(__iter_ - __n);
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator operator-(difference_type __n) const {
    return __unconstrained_reverse_iterator(__iter_ + __n);
  }

  _LIBCPP_HIDE_FROM_ABI constexpr difference_type operator-(const __unconstrained_reverse_iterator& __other) const {
    return __other.__iter_ - __iter_;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto operator[](difference_type __n) const { return *(*this + __n); }

  // Deliberately unconstrained unlike the comparison functions in `reverse_iterator` -- see the class comment for the
  // rationale.
  _LIBCPP_HIDE_FROM_ABI friend constexpr bool
  operator==(const __unconstrained_reverse_iterator& __lhs, const __unconstrained_reverse_iterator& __rhs) {
    return __lhs.base() == __rhs.base();
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool
  operator!=(const __unconstrained_reverse_iterator& __lhs, const __unconstrained_reverse_iterator& __rhs) {
    return __lhs.base() != __rhs.base();
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool
  operator<(const __unconstrained_reverse_iterator& __lhs, const __unconstrained_reverse_iterator& __rhs) {
    return __lhs.base() > __rhs.base();
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool
  operator>(const __unconstrained_reverse_iterator& __lhs, const __unconstrained_reverse_iterator& __rhs) {
    return __lhs.base() < __rhs.base();
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool
  operator<=(const __unconstrained_reverse_iterator& __lhs, const __unconstrained_reverse_iterator& __rhs) {
    return __lhs.base() >= __rhs.base();
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool
  operator>=(const __unconstrained_reverse_iterator& __lhs, const __unconstrained_reverse_iterator& __rhs) {
    return __lhs.base() <= __rhs.base();
  }
};

#endif // _LIBCPP_STD_VER <= 17
# 484 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3

template <template <class> class _RevIter1, template <class> class _RevIter2, class _Iter>
struct __unwrap_reverse_iter_impl {
  using _UnwrappedIter = decltype(__unwrap_iter_impl<_Iter>::__unwrap(std::declval<_Iter>()));
  using _ReverseWrapper = _RevIter1<_RevIter2<_Iter> >;

  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ReverseWrapper
  __rewrap(_ReverseWrapper __orig_iter, _UnwrappedIter __unwrapped_iter) {
    return _ReverseWrapper(
        _RevIter2<_Iter>(__unwrap_iter_impl<_Iter>::__rewrap(__orig_iter.base().base(), __unwrapped_iter)));
  }

  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _UnwrappedIter __unwrap(_ReverseWrapper __i) _NOEXCEPT {
    return __unwrap_iter_impl<_Iter>::__unwrap(__i.base().base());
  }
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 502 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
template <ranges::bidirectional_range _Range>
_LIBCPP_HIDE_FROM_ABI constexpr ranges::
    subrange<reverse_iterator<ranges::iterator_t<_Range>>, reverse_iterator<ranges::iterator_t<_Range>>>
    __reverse_range(_Range&& __range) {
  auto __first = ranges::begin(__range);
  return {std::make_reverse_iterator(ranges::next(__first, ranges::end(__range))), std::make_reverse_iterator(__first)};
}
#endif
# 510 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3

template <class _Iter, bool __b>
struct __unwrap_iter_impl<reverse_iterator<reverse_iterator<_Iter> >, __b>
    : __unwrap_reverse_iter_impl<reverse_iterator, reverse_iterator, _Iter> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 516 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3

template <class _Iter, bool __b>
struct __unwrap_iter_impl<reverse_iterator<__unconstrained_reverse_iterator<_Iter>>, __b>
    : __unwrap_reverse_iter_impl<reverse_iterator, __unconstrained_reverse_iterator, _Iter> {};

template <class _Iter, bool __b>
struct __unwrap_iter_impl<__unconstrained_reverse_iterator<reverse_iterator<_Iter>>, __b>
    : __unwrap_reverse_iter_impl<__unconstrained_reverse_iterator, reverse_iterator, _Iter> {};

template <class _Iter, bool __b>
struct __unwrap_iter_impl<__unconstrained_reverse_iterator<__unconstrained_reverse_iterator<_Iter>>, __b>
    : __unwrap_reverse_iter_impl<__unconstrained_reverse_iterator, __unconstrained_reverse_iterator, _Iter> {};

#endif // _LIBCPP_STD_VER >= 20
# 530 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_REVERSE_ITERATOR_H
# 534 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_iterator.h" 3
#endif /* reverse_iterator.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_access.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_access.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_access.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_access.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_access.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_access.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_access.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_access.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_access.h" 3

template <class _Tp, size_t _Np>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator<_Tp*> rbegin(_Tp (&__array)[_Np])
{
    return reverse_iterator<_Tp*>(__array + _Np);
}

template <class _Tp, size_t _Np>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator<_Tp*> rend(_Tp (&__array)[_Np])
{
    return reverse_iterator<_Tp*>(__array);
}

template <class _Ep>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator<const _Ep*> rbegin(initializer_list<_Ep> __il)
{
    return reverse_iterator<const _Ep*>(__il.end());
}

template <class _Ep>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator<const _Ep*> rend(initializer_list<_Ep> __il)
{
    return reverse_iterator<const _Ep*>(__il.begin());
}

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto rbegin(_Cp& __c) -> decltype(__c.rbegin())
{
    return __c.rbegin();
}

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto rbegin(const _Cp& __c) -> decltype(__c.rbegin())
{
    return __c.rbegin();
}

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto rend(_Cp& __c) -> decltype(__c.rend())
{
    return __c.rend();
}

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto rend(const _Cp& __c) -> decltype(__c.rend())
{
    return __c.rend();
}

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto crbegin(const _Cp& __c) -> decltype(_VSTD::rbegin(__c))
{
    return _VSTD::rbegin(__c);
}

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
auto crend(const _Cp& __c) -> decltype(_VSTD::rend(__c))
{
    return _VSTD::rend(__c);
}

#endif // _LIBCPP_STD_VER >= 14
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_access.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_REVERSE_ACCESS_H
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/reverse_access.h" 3
#endif /* reverse_access.h expanded by -frewrite-includes */
# 712 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 712 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 713 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* size.h expanded by -frewrite-includes */
#include <__iterator/size.h>
#else /* size.h expanded by -frewrite-includes */
# 713 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_SIZE_H
#define _LIBCPP___ITERATOR_SIZE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_signed.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3

template <class _Cont>
_LIBCPP_INLINE_VISIBILITY
constexpr auto size(const _Cont& __c)
_NOEXCEPT_(noexcept(__c.size()))
-> decltype        (__c.size())
{ return            __c.size(); }

template <class _Tp, size_t _Sz>
_LIBCPP_INLINE_VISIBILITY
constexpr size_t size(const _Tp (&)[_Sz]) noexcept { return _Sz; }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3
template <class _Cont>
_LIBCPP_INLINE_VISIBILITY
constexpr auto ssize(const _Cont& __c)
_NOEXCEPT_(noexcept(static_cast<common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>>(__c.size())))
->                              common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>
{ return            static_cast<common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>>(__c.size()); }

// GCC complains about the implicit conversion from ptrdiff_t to size_t in
// the array bound.
_LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wsign-conversion")
template <class _Tp, ptrdiff_t _Sz>
_LIBCPP_INLINE_VISIBILITY
constexpr ptrdiff_t ssize(const _Tp (&)[_Sz]) noexcept { return _Sz; }
_LIBCPP_DIAGNOSTIC_POP
#endif
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3

#endif // _LIBCPP_STD_VER >= 17
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_SIZE_H
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/size.h" 3
#endif /* size.h expanded by -frewrite-includes */
# 714 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* sortable.h expanded by -frewrite-includes */
#include <__iterator/sortable.h>
#else /* sortable.h expanded by -frewrite-includes */
# 714 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_SORTABLE_H
#define _LIBCPP___ITERATOR_SORTABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/permutable.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3

template <class _Iter, class _Comp = ranges::less, class _Proj = identity>
concept sortable =
  permutable<_Iter> &&
  indirect_strict_weak_order<_Comp, projected<_Iter, _Proj>>;

#endif // _LIBCPP_STD_VER >= 20
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_SORTABLE_H
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/sortable.h" 3
#endif /* sortable.h expanded by -frewrite-includes */
# 715 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* unreachable_sentinel.h expanded by -frewrite-includes */
#include <__iterator/unreachable_sentinel.h>
#else /* unreachable_sentinel.h expanded by -frewrite-includes */
# 715 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/unreachable_sentinel.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_UNREACHABLE_SENTINEL_H
#define _LIBCPP___ITERATOR_UNREACHABLE_SENTINEL_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/unreachable_sentinel.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/unreachable_sentinel.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/unreachable_sentinel.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/unreachable_sentinel.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/unreachable_sentinel.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/unreachable_sentinel.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/unreachable_sentinel.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/unreachable_sentinel.h" 3

struct unreachable_sentinel_t {
  template<weakly_incrementable _Iter>
  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(unreachable_sentinel_t, const _Iter&) noexcept {
    return false;
  }
};

inline constexpr unreachable_sentinel_t unreachable_sentinel{};

#endif // _LIBCPP_STD_VER >= 20
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/unreachable_sentinel.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_UNREACHABLE_SENTINEL_H
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/unreachable_sentinel.h" 3
#endif /* unreachable_sentinel.h expanded by -frewrite-includes */
# 716 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* wrap_iter.h expanded by -frewrite-includes */
#include <__iterator/wrap_iter.h>
#else /* wrap_iter.h expanded by -frewrite-includes */
# 716 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_WRAP_ITER_H
#define _LIBCPP___ITERATOR_WRAP_ITER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Iter>
class __wrap_iter
{
public:
    typedef _Iter                                                      iterator_type;
    typedef typename iterator_traits<iterator_type>::value_type        value_type;
    typedef typename iterator_traits<iterator_type>::difference_type   difference_type;
    typedef typename iterator_traits<iterator_type>::pointer           pointer;
    typedef typename iterator_traits<iterator_type>::reference         reference;
    typedef typename iterator_traits<iterator_type>::iterator_category iterator_category;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
    typedef contiguous_iterator_tag                                    iterator_concept;
#endif
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3

private:
    iterator_type __i_;
public:
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter() _NOEXCEPT
                : __i_()
    {
    }
    template <class _Up, __enable_if_t<is_convertible<_Up, iterator_type>::value, int> = 0>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter(const __wrap_iter<_Up>& __u) _NOEXCEPT
            : __i_(__u.base())
    {
    }
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator*() const _NOEXCEPT
    {
        return *__i_;
    }
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pointer operator->() const _NOEXCEPT
    {
        return _VSTD::__to_address(__i_);
    }
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator++() _NOEXCEPT
    {
        ++__i_;
        return *this;
    }
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter  operator++(int) _NOEXCEPT
        {__wrap_iter __tmp(*this); ++(*this); return __tmp;}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator--() _NOEXCEPT
    {
        --__i_;
        return *this;
    }
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter  operator--(int) _NOEXCEPT
        {__wrap_iter __tmp(*this); --(*this); return __tmp;}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter  operator+ (difference_type __n) const _NOEXCEPT
        {__wrap_iter __w(*this); __w += __n; return __w;}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator+=(difference_type __n) _NOEXCEPT
    {
        __i_ += __n;
        return *this;
    }
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter  operator- (difference_type __n) const _NOEXCEPT
        {return *this + (-__n);}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator-=(difference_type __n) _NOEXCEPT
        {*this += -__n; return *this;}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference    operator[](difference_type __n) const _NOEXCEPT
    {
        return __i_[__n];
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 iterator_type base() const _NOEXCEPT {return __i_;}

private:
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    explicit __wrap_iter(iterator_type __x) _NOEXCEPT : __i_(__x)
    {
    }

    template <class _Up> friend class __wrap_iter;
    template <class _CharT, class _Traits, class _Alloc> friend class basic_string;
    template <class _Tp, class _Alloc> friend class _LIBCPP_TEMPLATE_VIS vector;
    template <class _Tp, size_t> friend class _LIBCPP_TEMPLATE_VIS span;
};

template <class _Iter1>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
bool operator==(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
{
    return __x.base() == __y.base();
}

template <class _Iter1, class _Iter2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
bool operator==(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
    return __x.base() == __y.base();
}

template <class _Iter1>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
{
    return __x.base() < __y.base();
}

template <class _Iter1, class _Iter2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
bool operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
    return __x.base() < __y.base();
}

template <class _Iter1>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
bool operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
{
    return !(__x == __y);
}

template <class _Iter1, class _Iter2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
bool operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
    return !(__x == __y);
}

template <class _Iter1>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
bool operator>(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
{
    return __y < __x;
}

template <class _Iter1, class _Iter2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
bool operator>(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
    return __y < __x;
}

template <class _Iter1>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
bool operator>=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
{
    return !(__x < __y);
}

template <class _Iter1, class _Iter2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
bool operator>=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
    return !(__x < __y);
}

template <class _Iter1>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
bool operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
{
    return !(__y < __x);
}

template <class _Iter1, class _Iter2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
bool operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
    return !(__y < __x);
}

template <class _Iter1, class _Iter2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
#ifndef _LIBCPP_CXX03_LANG
auto operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
    -> decltype(__x.base() - __y.base())
#else
# 196 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
typename __wrap_iter<_Iter1>::difference_type
operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
#endif // C++03
# 199 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
{
    return __x.base() - __y.base();
}

template <class _Iter1>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
__wrap_iter<_Iter1> operator+(typename __wrap_iter<_Iter1>::difference_type __n, __wrap_iter<_Iter1> __x) _NOEXCEPT
{
    __x += __n;
    return __x;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
template <class _It>
struct __libcpp_is_contiguous_iterator<__wrap_iter<_It> > : true_type {};
#endif
# 215 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3

template <class _It>
struct _LIBCPP_TEMPLATE_VIS pointer_traits<__wrap_iter<_It> >
{
    typedef __wrap_iter<_It> pointer;
    typedef typename pointer_traits<_It>::element_type element_type;
    typedef typename pointer_traits<_It>::difference_type difference_type;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
    static element_type *to_address(pointer __w) _NOEXCEPT {
        return _VSTD::__to_address(__w.base());
    }
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_WRAP_ITER_H
# 232 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/wrap_iter.h" 3
#endif /* wrap_iter.h expanded by -frewrite-includes */
# 717 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 717 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 718 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 718 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 719 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 719 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 720 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 720 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 721 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 721 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 722 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3

// standard-mandated includes

// [iterator.synopsis]
#if 0 /* expanded by -frewrite-includes */
#include <compare>
#endif /* expanded by -frewrite-includes */
# 726 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 727 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* concepts expanded by -frewrite-includes */
#include <concepts>
#else /* concepts expanded by -frewrite-includes */
# 727 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CONCEPTS
#define _LIBCPP_CONCEPTS

/*
    concepts synopsis
namespace std {
  // [concepts.lang], language-related concepts
  // [concept.same], concept same_as
  template<class T, class U>
    concept same_as = see below;

  // [concept.derived], concept derived_from
  template<class Derived, class Base>
    concept derived_from = see below;

  // [concept.convertible], concept convertible_to
  template<class From, class To>
    concept convertible_to = see below;

  // [concept.commonref], concept common_reference_with
  template<class T, class U>
    concept common_reference_with = see below;

  // [concept.common], concept common_with
  template<class T, class U>
    concept common_with = see below;

  // [concepts.arithmetic], arithmetic concepts
  template<class T>
    concept integral = see below;
  template<class T>
    concept signed_integral = see below;
  template<class T>
    concept unsigned_integral = see below;
  template<class T>
    concept floating_point = see below;

  // [concept.assignable], concept assignable_from
  template<class LHS, class RHS>
    concept assignable_from = see below;

  // [concept.swappable], concept swappable
  namespace ranges {
    inline namespace unspecified {
      inline constexpr unspecified swap = unspecified;
    }
  }
  template<class T>
    concept swappable = see below;
  template<class T, class U>
    concept swappable_with = see below;

  // [concept.destructible], concept destructible
  template<class T>
    concept destructible = see below;

  // [concept.constructible], concept constructible_from
  template<class T, class... Args>
    concept constructible_from = see below;

  // [concept.default.init], concept default_initializable
  template<class T>
    concept default_initializable = see below;

  // [concept.moveconstructible], concept move_constructible
  template<class T>
    concept move_constructible = see below;

  // [concept.copyconstructible], concept copy_constructible
  template<class T>
    concept copy_constructible = see below;

  // [concept.equalitycomparable], concept equality_comparable
  template<class T>
    concept equality_comparable = see below;
  template<class T, class U>
    concept equality_comparable_with = see below;

  // [concept.totallyordered], concept totally_ordered
  template<class T>
    concept totally_ordered = see below;
  template<class T, class U>
    concept totally_ordered_with = see below;

  // [concepts.object], object concepts
  template<class T>
    concept movable = see below;
  template<class T>
    concept copyable = see below;
  template<class T>
    concept semiregular = see below;
  template<class T>
    concept regular = see below;

  // [concepts.callable], callable concepts
  // [concept.invocable], concept invocable
  template<class F, class... Args>
    concept invocable = see below;

  // [concept.regularinvocable], concept regular_invocable
  template<class F, class... Args>
    concept regular_invocable = see below;

  // [concept.predicate], concept predicate
  template<class F, class... Args>
    concept predicate = see below;

  // [concept.relation], concept relation
  template<class R, class T, class U>
    concept relation = see below;

  // [concept.equiv], concept equivalence_relation
  template<class R, class T, class U>
    concept equivalence_relation = see below;

  // [concept.strictweakorder], concept strict_weak_order
  template<class R, class T, class U>
    concept strict_weak_order = see below;
}

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/assignable.h>
#endif /* expanded by -frewrite-includes */
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/boolean_testable.h>
#endif /* expanded by -frewrite-includes */
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/class_or_enum.h>
#endif /* expanded by -frewrite-includes */
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 137 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/common_reference_with.h>
#endif /* expanded by -frewrite-includes */
# 137 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 138 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/common_with.h>
#endif /* expanded by -frewrite-includes */
# 138 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 140 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 140 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 141 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#endif /* expanded by -frewrite-includes */
# 141 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/derived_from.h>
#endif /* expanded by -frewrite-includes */
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 143 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/destructible.h>
#endif /* expanded by -frewrite-includes */
# 143 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 144 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/different_from.h>
#endif /* expanded by -frewrite-includes */
# 144 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/equality_comparable.h>
#endif /* expanded by -frewrite-includes */
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/invocable.h>
#endif /* expanded by -frewrite-includes */
# 146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 147 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/movable.h>
#endif /* expanded by -frewrite-includes */
# 147 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/predicate.h>
#endif /* expanded by -frewrite-includes */
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 149 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/regular.h>
#endif /* expanded by -frewrite-includes */
# 149 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 150 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/relation.h>
#endif /* expanded by -frewrite-includes */
# 150 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 151 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 151 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/semiregular.h>
#endif /* expanded by -frewrite-includes */
# 152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 153 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/swappable.h>
#endif /* expanded by -frewrite-includes */
# 153 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 154 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/totally_ordered.h>
#endif /* expanded by -frewrite-includes */
# 154 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 155 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 155 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 156 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 156 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 157 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 20 && !defined(_LIPCPP_REMOVE_TRANSITIVE_INCLUDES)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 159 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* type_traits expanded by -frewrite-includes */
#  include <type_traits>
#else /* type_traits expanded by -frewrite-includes */
# 159 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_TYPE_TRAITS
#define _LIBCPP_TYPE_TRAITS

/*
    type_traits synopsis

namespace std
{

    // helper class:
    template <class T, T v> struct integral_constant;
    typedef integral_constant<bool, true>  true_type;   // C++11
    typedef integral_constant<bool, false> false_type;  // C++11

    template <bool B>                                   // C++14
    using bool_constant = integral_constant<bool, B>;   // C++14
    typedef bool_constant<true> true_type;              // C++14
    typedef bool_constant<false> false_type;            // C++14

    // helper traits
    template <bool, class T = void> struct enable_if;
    template <bool, class T, class F> struct conditional;

    // Primary classification traits:
    template <class T> struct is_void;
    template <class T> struct is_null_pointer;  // C++14
    template <class T> struct is_integral;
    template <class T> struct is_floating_point;
    template <class T> struct is_array;
    template <class T> struct is_pointer;
    template <class T> struct is_lvalue_reference;
    template <class T> struct is_rvalue_reference;
    template <class T> struct is_member_object_pointer;
    template <class T> struct is_member_function_pointer;
    template <class T> struct is_enum;
    template <class T> struct is_union;
    template <class T> struct is_class;
    template <class T> struct is_function;

    // Secondary classification traits:
    template <class T> struct is_reference;
    template <class T> struct is_arithmetic;
    template <class T> struct is_fundamental;
    template <class T> struct is_member_pointer;
    template <class T> struct is_scoped_enum; // C++23
    template <class T> struct is_scalar;
    template <class T> struct is_object;
    template <class T> struct is_compound;

    // Const-volatile properties and transformations:
    template <class T> struct is_const;
    template <class T> struct is_volatile;
    template <class T> struct remove_const;
    template <class T> struct remove_volatile;
    template <class T> struct remove_cv;
    template <class T> struct add_const;
    template <class T> struct add_volatile;
    template <class T> struct add_cv;

    // Reference transformations:
    template <class T> struct remove_reference;
    template <class T> struct add_lvalue_reference;
    template <class T> struct add_rvalue_reference;

    // Pointer transformations:
    template <class T> struct remove_pointer;
    template <class T> struct add_pointer;

    template<class T> struct type_identity;                     // C++20
    template<class T>
      using type_identity_t = typename type_identity<T>::type;  // C++20

    // Integral properties:
    template <class T> struct is_signed;
    template <class T> struct is_unsigned;
    template <class T> struct make_signed;
    template <class T> struct make_unsigned;

    // Array properties and transformations:
    template <class T> struct rank;
    template <class T, unsigned I = 0> struct extent;
    template <class T> struct remove_extent;
    template <class T> struct remove_all_extents;

    template <class T> struct is_bounded_array;                 // C++20
    template <class T> struct is_unbounded_array;               // C++20

    // Member introspection:
    template <class T> struct is_pod;
    template <class T> struct is_trivial;
    template <class T> struct is_trivially_copyable;
    template <class T> struct is_standard_layout;
    template <class T> struct is_literal_type; // Deprecated in C++17; removed in C++20
    template <class T> struct is_empty;
    template <class T> struct is_polymorphic;
    template <class T> struct is_abstract;
    template <class T> struct is_final; // C++14
    template <class T> struct is_aggregate; // C++17

    template <class T, class... Args> struct is_constructible;
    template <class T>                struct is_default_constructible;
    template <class T>                struct is_copy_constructible;
    template <class T>                struct is_move_constructible;
    template <class T, class U>       struct is_assignable;
    template <class T>                struct is_copy_assignable;
    template <class T>                struct is_move_assignable;
    template <class T, class U>       struct is_swappable_with;       // C++17
    template <class T>                struct is_swappable;            // C++17
    template <class T>                struct is_destructible;

    template <class T, class... Args> struct is_trivially_constructible;
    template <class T>                struct is_trivially_default_constructible;
    template <class T>                struct is_trivially_copy_constructible;
    template <class T>                struct is_trivially_move_constructible;
    template <class T, class U>       struct is_trivially_assignable;
    template <class T>                struct is_trivially_copy_assignable;
    template <class T>                struct is_trivially_move_assignable;
    template <class T>                struct is_trivially_destructible;

    template <class T, class... Args> struct is_nothrow_constructible;
    template <class T>                struct is_nothrow_default_constructible;
    template <class T>                struct is_nothrow_copy_constructible;
    template <class T>                struct is_nothrow_move_constructible;
    template <class T, class U>       struct is_nothrow_assignable;
    template <class T>                struct is_nothrow_copy_assignable;
    template <class T>                struct is_nothrow_move_assignable;
    template <class T, class U>       struct is_nothrow_swappable_with; // C++17
    template <class T>                struct is_nothrow_swappable;      // C++17
    template <class T>                struct is_nothrow_destructible;

    template <class T> struct has_virtual_destructor;

    template<class T> struct has_unique_object_representations;         // C++17

    // Relationships between types:
    template <class T, class U> struct is_same;
    template <class Base, class Derived> struct is_base_of;

    template <class From, class To> struct is_convertible;
    template <typename From, typename To> struct is_nothrow_convertible;                  // C++20
    template <typename From, typename To> inline constexpr bool is_nothrow_convertible_v; // C++20

    template <class Fn, class... ArgTypes> struct is_invocable;
    template <class R, class Fn, class... ArgTypes> struct is_invocable_r;

    template <class Fn, class... ArgTypes> struct is_nothrow_invocable;
    template <class R, class Fn, class... ArgTypes> struct is_nothrow_invocable_r;

    // Alignment properties and transformations:
    template <class T> struct alignment_of;
    template <size_t Len, size_t Align = most_stringent_alignment_requirement>
        struct aligned_storage;                                 // deprecated in C++23
    template <size_t Len, class... Types> struct aligned_union; // deprecated in C++23
    template <class T> struct remove_cvref; // C++20

    template <class T> struct decay;
    template <class... T> struct common_type;
    template <class T> struct underlying_type;
    template <class> class result_of; // undefined; deprecated in C++17; removed in C++20
    template <class Fn, class... ArgTypes> class result_of<Fn(ArgTypes...)>; // deprecated in C++17; removed in C++20
    template <class Fn, class... ArgTypes> struct invoke_result;  // C++17

    // const-volatile modifications:
    template <class T>
      using remove_const_t    = typename remove_const<T>::type;  // C++14
    template <class T>
      using remove_volatile_t = typename remove_volatile<T>::type;  // C++14
    template <class T>
      using remove_cv_t       = typename remove_cv<T>::type;  // C++14
    template <class T>
      using add_const_t       = typename add_const<T>::type;  // C++14
    template <class T>
      using add_volatile_t    = typename add_volatile<T>::type;  // C++14
    template <class T>
      using add_cv_t          = typename add_cv<T>::type;  // C++14

    // reference modifications:
    template <class T>
      using remove_reference_t     = typename remove_reference<T>::type;  // C++14
    template <class T>
      using add_lvalue_reference_t = typename add_lvalue_reference<T>::type;  // C++14
    template <class T>
      using add_rvalue_reference_t = typename add_rvalue_reference<T>::type;  // C++14

    // sign modifications:
    template <class T>
      using make_signed_t   = typename make_signed<T>::type;  // C++14
    template <class T>
      using make_unsigned_t = typename make_unsigned<T>::type;  // C++14

    // array modifications:
    template <class T>
      using remove_extent_t      = typename remove_extent<T>::type;  // C++14
    template <class T>
      using remove_all_extents_t = typename remove_all_extents<T>::type;  // C++14

    template <class T>
      inline constexpr bool is_bounded_array_v
        = is_bounded_array<T>::value;                                     // C++20
      inline constexpr bool is_unbounded_array_v
        = is_unbounded_array<T>::value;                                   // C++20

    // pointer modifications:
    template <class T>
      using remove_pointer_t = typename remove_pointer<T>::type;  // C++14
    template <class T>
      using add_pointer_t    = typename add_pointer<T>::type;  // C++14

    // other transformations:
    template <size_t Len, size_t Align=default-alignment>
      using aligned_storage_t = typename aligned_storage<Len,Align>::type;  // C++14
    template <size_t Len, class... Types>
      using aligned_union_t   = typename aligned_union<Len,Types...>::type;  // C++14
    template <class T>
      using remove_cvref_t    = typename remove_cvref<T>::type;  // C++20
    template <class T>
      using decay_t           = typename decay<T>::type;  // C++14
    template <bool b, class T=void>
      using enable_if_t       = typename enable_if<b,T>::type;  // C++14
    template <bool b, class T, class F>
      using conditional_t     = typename conditional<b,T,F>::type;  // C++14
    template <class... T>
      using common_type_t     = typename common_type<T...>::type;  // C++14
    template <class T>
      using underlying_type_t = typename underlying_type<T>::type;  // C++14
    template <class T>
      using result_of_t       = typename result_of<T>::type;  // C++14; deprecated in C++17; removed in C++20
    template <class Fn, class... ArgTypes>
      using invoke_result_t   = typename invoke_result<Fn, ArgTypes...>::type;  // C++17

    template <class...>
      using void_t = void;   // C++17

      // See C++14 20.10.4.1, primary type categories
      template <class T> inline constexpr bool is_void_v
        = is_void<T>::value;                                             // C++17
      template <class T> inline constexpr bool is_null_pointer_v
        = is_null_pointer<T>::value;                                     // C++17
      template <class T> inline constexpr bool is_integral_v
        = is_integral<T>::value;                                         // C++17
      template <class T> inline constexpr bool is_floating_point_v
        = is_floating_point<T>::value;                                   // C++17
      template <class T> inline constexpr bool is_array_v
        = is_array<T>::value;                                            // C++17
      template <class T> inline constexpr bool is_pointer_v
        = is_pointer<T>::value;                                          // C++17
      template <class T> inline constexpr bool is_lvalue_reference_v
        = is_lvalue_reference<T>::value;                                 // C++17
      template <class T> inline constexpr bool is_rvalue_reference_v
        = is_rvalue_reference<T>::value;                                 // C++17
      template <class T> inline constexpr bool is_member_object_pointer_v
        = is_member_object_pointer<T>::value;                            // C++17
      template <class T> inline constexpr bool is_member_function_pointer_v
        = is_member_function_pointer<T>::value;                          // C++17
      template <class T> inline constexpr bool is_enum_v
        = is_enum<T>::value;                                             // C++17
      template <class T> inline constexpr bool is_union_v
        = is_union<T>::value;                                            // C++17
      template <class T> inline constexpr bool is_class_v
        = is_class<T>::value;                                            // C++17
      template <class T> inline constexpr bool is_function_v
        = is_function<T>::value;                                         // C++17

      // See C++14 20.10.4.2, composite type categories
      template <class T> inline constexpr bool is_reference_v
        = is_reference<T>::value;                                        // C++17
      template <class T> inline constexpr bool is_arithmetic_v
        = is_arithmetic<T>::value;                                       // C++17
      template <class T> inline constexpr bool is_fundamental_v
        = is_fundamental<T>::value;                                      // C++17
      template <class T> inline constexpr bool is_object_v
        = is_object<T>::value;                                           // C++17
      template <class T> inline constexpr bool is_scalar_v
        = is_scalar<T>::value;                                           // C++17
      template <class T> inline constexpr bool is_compound_v
        = is_compound<T>::value;                                         // C++17
      template <class T> inline constexpr bool is_member_pointer_v
        = is_member_pointer<T>::value;                                   // C++17
      template <class T> inline constexpr bool is_scoped_enum_v
        = is_scoped_enum<T>::value;                                      // C++23

      // See C++14 20.10.4.3, type properties
      template <class T> inline constexpr bool is_const_v
        = is_const<T>::value;                                            // C++17
      template <class T> inline constexpr bool is_volatile_v
        = is_volatile<T>::value;                                         // C++17
      template <class T> inline constexpr bool is_trivial_v
        = is_trivial<T>::value;                                          // C++17
      template <class T> inline constexpr bool is_trivially_copyable_v
        = is_trivially_copyable<T>::value;                               // C++17
      template <class T> inline constexpr bool is_standard_layout_v
        = is_standard_layout<T>::value;                                  // C++17
      template <class T> inline constexpr bool is_pod_v
        = is_pod<T>::value;                                              // C++17
      template <class T> inline constexpr bool is_literal_type_v
        = is_literal_type<T>::value;                                     // C++17; deprecated in C++17; removed in C++20
      template <class T> inline constexpr bool is_empty_v
        = is_empty<T>::value;                                            // C++17
      template <class T> inline constexpr bool is_polymorphic_v
        = is_polymorphic<T>::value;                                      // C++17
      template <class T> inline constexpr bool is_abstract_v
        = is_abstract<T>::value;                                         // C++17
      template <class T> inline constexpr bool is_final_v
        = is_final<T>::value;                                            // C++17
      template <class T> inline constexpr bool is_aggregate_v
        = is_aggregate<T>::value;                                        // C++17
      template <class T> inline constexpr bool is_signed_v
        = is_signed<T>::value;                                           // C++17
      template <class T> inline constexpr bool is_unsigned_v
        = is_unsigned<T>::value;                                         // C++17
      template <class T, class... Args> inline constexpr bool is_constructible_v
        = is_constructible<T, Args...>::value;                           // C++17
      template <class T> inline constexpr bool is_default_constructible_v
        = is_default_constructible<T>::value;                            // C++17
      template <class T> inline constexpr bool is_copy_constructible_v
        = is_copy_constructible<T>::value;                               // C++17
      template <class T> inline constexpr bool is_move_constructible_v
        = is_move_constructible<T>::value;                               // C++17
      template <class T, class U> inline constexpr bool is_assignable_v
        = is_assignable<T, U>::value;                                    // C++17
      template <class T> inline constexpr bool is_copy_assignable_v
        = is_copy_assignable<T>::value;                                  // C++17
      template <class T> inline constexpr bool is_move_assignable_v
        = is_move_assignable<T>::value;                                  // C++17
      template <class T, class U> inline constexpr bool is_swappable_with_v
        = is_swappable_with<T, U>::value;                                // C++17
      template <class T> inline constexpr bool is_swappable_v
        = is_swappable<T>::value;                                        // C++17
      template <class T> inline constexpr bool is_destructible_v
        = is_destructible<T>::value;                                     // C++17
      template <class T, class... Args> inline constexpr bool is_trivially_constructible_v
        = is_trivially_constructible<T, Args...>::value;                 // C++17
      template <class T> inline constexpr bool is_trivially_default_constructible_v
        = is_trivially_default_constructible<T>::value;                  // C++17
      template <class T> inline constexpr bool is_trivially_copy_constructible_v
        = is_trivially_copy_constructible<T>::value;                     // C++17
      template <class T> inline constexpr bool is_trivially_move_constructible_v
        = is_trivially_move_constructible<T>::value;                     // C++17
      template <class T, class U> inline constexpr bool is_trivially_assignable_v
        = is_trivially_assignable<T, U>::value;                          // C++17
      template <class T> inline constexpr bool is_trivially_copy_assignable_v
        = is_trivially_copy_assignable<T>::value;                        // C++17
      template <class T> inline constexpr bool is_trivially_move_assignable_v
        = is_trivially_move_assignable<T>::value;                        // C++17
      template <class T> inline constexpr bool is_trivially_destructible_v
        = is_trivially_destructible<T>::value;                           // C++17
      template <class T, class... Args> inline constexpr bool is_nothrow_constructible_v
        = is_nothrow_constructible<T, Args...>::value;                   // C++17
      template <class T> inline constexpr bool is_nothrow_default_constructible_v
        = is_nothrow_default_constructible<T>::value;                    // C++17
      template <class T> inline constexpr bool is_nothrow_copy_constructible_v
        = is_nothrow_copy_constructible<T>::value;                       // C++17
      template <class T> inline constexpr bool is_nothrow_move_constructible_v
        = is_nothrow_move_constructible<T>::value;                       // C++17
      template <class T, class U> inline constexpr bool is_nothrow_assignable_v
        = is_nothrow_assignable<T, U>::value;                            // C++17
      template <class T> inline constexpr bool is_nothrow_copy_assignable_v
        = is_nothrow_copy_assignable<T>::value;                          // C++17
      template <class T> inline constexpr bool is_nothrow_move_assignable_v
        = is_nothrow_move_assignable<T>::value;                          // C++17
      template <class T, class U> inline constexpr bool is_nothrow_swappable_with_v
        = is_nothrow_swappable_with<T, U>::value;                       // C++17
      template <class T> inline constexpr bool is_nothrow_swappable_v
        = is_nothrow_swappable<T>::value;                               // C++17
      template <class T> inline constexpr bool is_nothrow_destructible_v
        = is_nothrow_destructible<T>::value;                             // C++17
      template <class T> inline constexpr bool has_virtual_destructor_v
        = has_virtual_destructor<T>::value;                              // C++17
      template<class T> inline constexpr bool has_unique_object_representations_v // C++17
        = has_unique_object_representations<T>::value;

      // See C++14 20.10.5, type property queries
      template <class T> inline constexpr size_t alignment_of_v
        = alignment_of<T>::value;                                        // C++17
      template <class T> inline constexpr size_t rank_v
        = rank<T>::value;                                                // C++17
      template <class T, unsigned I = 0> inline constexpr size_t extent_v
        = extent<T, I>::value;                                           // C++17

      // See C++14 20.10.6, type relations
      template <class T, class U> inline constexpr bool is_same_v
        = is_same<T, U>::value;                                          // C++17
      template <class Base, class Derived> inline constexpr bool is_base_of_v
        = is_base_of<Base, Derived>::value;                              // C++17
      template <class From, class To> inline constexpr bool is_convertible_v
        = is_convertible<From, To>::value;                               // C++17
      template <class Fn, class... ArgTypes> inline constexpr bool is_invocable_v
        = is_invocable<Fn, ArgTypes...>::value;                          // C++17
      template <class R, class Fn, class... ArgTypes> inline constexpr bool is_invocable_r_v
        = is_invocable_r<R, Fn, ArgTypes...>::value;                     // C++17
      template <class Fn, class... ArgTypes> inline constexpr bool is_nothrow_invocable_v
        = is_nothrow_invocable<Fn, ArgTypes...>::value;                  // C++17
      template <class R, class Fn, class... ArgTypes> inline constexpr bool is_nothrow_invocable_r_v
        = is_nothrow_invocable_r<R, Fn, ArgTypes...>::value;             // C++17

      // [meta.logical], logical operator traits:
      template<class... B> struct conjunction;                           // C++17
      template<class... B>
        inline constexpr bool conjunction_v = conjunction<B...>::value;  // C++17
      template<class... B> struct disjunction;                           // C++17
      template<class... B>
        inline constexpr bool disjunction_v = disjunction<B...>::value;  // C++17
      template<class B> struct negation;                                 // C++17
      template<class B>
        inline constexpr bool negation_v = negation<B>::value;           // C++17

}

*/
#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 419 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 420 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 420 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 421 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/hash.h> // This is https://llvm.org/PR56938
#endif /* expanded by -frewrite-includes */
# 421 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 422 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_const.h>
#endif /* expanded by -frewrite-includes */
# 422 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 423 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_cv.h>
#endif /* expanded by -frewrite-includes */
# 423 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 424 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 424 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 425 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_pointer.h>
#endif /* expanded by -frewrite-includes */
# 425 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 426 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_rvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 426 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 427 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_volatile.h>
#endif /* expanded by -frewrite-includes */
# 427 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 428 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* aligned_storage.h expanded by -frewrite-includes */
#include <__type_traits/aligned_storage.h>
#else /* aligned_storage.h expanded by -frewrite-includes */
# 428 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_ALIGNED_STORAGE_H
#define _LIBCPP___TYPE_TRAITS_ALIGNED_STORAGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/nat.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/type_list.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct __align_type {
  static const size_t value = _LIBCPP_PREFERRED_ALIGNOF(_Tp);
  typedef _Tp type;
};

struct __struct_double {
  long double __lx;
};
struct __struct_double4 {
  double __lx[4];
};

// clang-format off
typedef __type_list<__align_type<unsigned char>,
        __type_list<__align_type<unsigned short>,
        __type_list<__align_type<unsigned int>,
        __type_list<__align_type<unsigned long>,
        __type_list<__align_type<unsigned long long>,
        __type_list<__align_type<double>,
        __type_list<__align_type<long double>,
        __type_list<__align_type<__struct_double>,
        __type_list<__align_type<__struct_double4>,
        __type_list<__align_type<int*>,
        __nat
        > > > > > > > > > > __all_types;
// clang-format on

template <size_t _Align>
struct _ALIGNAS(_Align) __fallback_overaligned {};

template <class _TL, size_t _Align>
struct __find_pod;

template <class _Hp, size_t _Align>
struct __find_pod<__type_list<_Hp, __nat>, _Align> {
  typedef __conditional_t<_Align == _Hp::value, typename _Hp::type, __fallback_overaligned<_Align> > type;
};

template <class _Hp, class _Tp, size_t _Align>
struct __find_pod<__type_list<_Hp, _Tp>, _Align> {
  typedef __conditional_t<_Align == _Hp::value, typename _Hp::type, typename __find_pod<_Tp, _Align>::type> type;
};

template <class _TL, size_t _Len>
struct __find_max_align;

template <class _Hp, size_t _Len>
struct __find_max_align<__type_list<_Hp, __nat>, _Len> : public integral_constant<size_t, _Hp::value> {};

template <size_t _Len, size_t _A1, size_t _A2>
struct __select_align {
private:
  static const size_t __min = _A2 < _A1 ? _A2 : _A1;
  static const size_t __max = _A1 < _A2 ? _A2 : _A1;

public:
  static const size_t value = _Len < __max ? __min : __max;
};

template <class _Hp, class _Tp, size_t _Len>
struct __find_max_align<__type_list<_Hp, _Tp>, _Len>
    : public integral_constant<size_t, __select_align<_Len, _Hp::value, __find_max_align<_Tp, _Len>::value>::value> {};

template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value>
struct _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_TEMPLATE_VIS aligned_storage {
  typedef typename __find_pod<__all_types, _Align>::type _Aligner;
  union type {
    _Aligner __align;
    unsigned char __data[(_Len + _Align - 1) / _Align * _Align];
  };
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value>
using aligned_storage_t _LIBCPP_DEPRECATED_IN_CXX23 = typename aligned_storage<_Len, _Align>::type;
_LIBCPP_SUPPRESS_DEPRECATED_POP

#endif
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3

#define _CREATE_ALIGNED_STORAGE_SPECIALIZATION(n)                                                                      \
  template <size_t _Len>                                                                                               \
  struct _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_TEMPLATE_VIS aligned_storage<_Len, n> {                                   \
    struct _ALIGNAS(n) type {                                                                                          \
      unsigned char __lx[(_Len + n - 1) / n * n];                                                                      \
    };                                                                                                                 \
  }

_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x1);
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x2);
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x4);
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x8);
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x10);
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x20);
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x40);
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x80);
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x100);
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x200);
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x400);
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x800);
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x1000);
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x2000);
// PE/COFF does not support alignment beyond 8192 (=0x2000)
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_OBJECT_FORMAT_COFF)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x4000);
#endif // !defined(_LIBCPP_OBJECT_FORMAT_COFF)
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3

#undef _CREATE_ALIGNED_STORAGE_SPECIALIZATION

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_ALIGNED_STORAGE_H
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_storage.h" 3
#endif /* aligned_storage.h expanded by -frewrite-includes */
# 429 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* aligned_union.h expanded by -frewrite-includes */
#include <__type_traits/aligned_union.h>
#else /* aligned_union.h expanded by -frewrite-includes */
# 429 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_union.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_ALIGNED_UNION_H
#define _LIBCPP___TYPE_TRAITS_ALIGNED_UNION_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_union.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/aligned_storage.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_union.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_union.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_union.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_union.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_union.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_union.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <size_t _I0, size_t... _In>
struct __static_max;

template <size_t _I0>
struct __static_max<_I0> {
  static const size_t value = _I0;
};

template <size_t _I0, size_t _I1, size_t... _In>
struct __static_max<_I0, _I1, _In...> {
  static const size_t value = _I0 >= _I1 ? __static_max<_I0, _In...>::value : __static_max<_I1, _In...>::value;
};

template <size_t _Len, class _Type0, class... _Types>
struct _LIBCPP_DEPRECATED_IN_CXX23 aligned_union {
  static const size_t alignment_value =
      __static_max<_LIBCPP_PREFERRED_ALIGNOF(_Type0), _LIBCPP_PREFERRED_ALIGNOF(_Types)...>::value;
  static const size_t __len = __static_max<_Len, sizeof(_Type0), sizeof(_Types)...>::value;
  typedef typename aligned_storage<__len, alignment_value>::type type;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_union.h" 3
template <size_t _Len, class... _Types>
using aligned_union_t _LIBCPP_DEPRECATED_IN_CXX23 = typename aligned_union<_Len, _Types...>::type;
#endif
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_union.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_ALIGNED_UNION_H
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/aligned_union.h" 3
#endif /* aligned_union.h expanded by -frewrite-includes */
# 430 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/alignment_of.h>
#endif /* expanded by -frewrite-includes */
# 430 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 431 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/apply_cv.h>
#endif /* expanded by -frewrite-includes */
# 431 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 432 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* can_extract_key.h expanded by -frewrite-includes */
#include <__type_traits/can_extract_key.h>
#else /* can_extract_key.h expanded by -frewrite-includes */
# 432 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_CAN_EXTRACT_KEY_H
#define _LIBCPP___TYPE_TRAITS_CAN_EXTRACT_KEY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/pair.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_const.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* remove_const_ref.h expanded by -frewrite-includes */
#include <__type_traits/remove_const_ref.h>
#else /* remove_const_ref.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const_ref.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_CONST_REF_H
#define _LIBCPP___TYPE_TRAITS_REMOVE_CONST_REF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const_ref.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const_ref.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_const.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const_ref.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const_ref.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const_ref.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const_ref.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const_ref.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const_ref.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const_ref.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
using __remove_const_ref_t = __remove_const_t<__libcpp_remove_reference_t<_Tp> >;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_REMOVE_CONST_REF_H
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/remove_const_ref.h" 3
#endif /* remove_const_ref.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// These traits are used in __tree and __hash_table
struct __extract_key_fail_tag {};
struct __extract_key_self_tag {};
struct __extract_key_first_tag {};

template <class _ValTy, class _Key, class _RawValTy = __remove_const_ref_t<_ValTy> >
struct __can_extract_key
    : __conditional_t<_IsSame<_RawValTy, _Key>::value, __extract_key_self_tag, __extract_key_fail_tag> {};

template <class _Pair, class _Key, class _First, class _Second>
struct __can_extract_key<_Pair, _Key, pair<_First, _Second> >
    : __conditional_t<_IsSame<__remove_const_t<_First>, _Key>::value, __extract_key_first_tag, __extract_key_fail_tag> {
};

// __can_extract_map_key uses true_type/false_type instead of the tags.
// It returns true if _Key != _ContainerValueTy (the container is a map not a set)
// and _ValTy == _Key.
template <class _ValTy, class _Key, class _ContainerValueTy, class _RawValTy = __remove_const_ref_t<_ValTy> >
struct __can_extract_map_key : integral_constant<bool, _IsSame<_RawValTy, _Key>::value> {};

// This specialization returns __extract_key_fail_tag for non-map containers
// because _Key == _ContainerValueTy
template <class _ValTy, class _Key, class _RawValTy>
struct __can_extract_map_key<_ValTy, _Key, _Key, _RawValTy> : false_type {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_CAN_EXTRACT_KEY_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/can_extract_key.h" 3
#endif /* can_extract_key.h expanded by -frewrite-includes */
# 433 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_reference.h>
#endif /* expanded by -frewrite-includes */
# 433 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 434 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 434 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 435 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 435 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 436 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conjunction.h>
#endif /* expanded by -frewrite-includes */
# 436 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 437 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 437 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 438 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/dependent_type.h>
#endif /* expanded by -frewrite-includes */
# 438 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 439 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/disjunction.h>
#endif /* expanded by -frewrite-includes */
# 439 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 440 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 440 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 441 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/extent.h>
#endif /* expanded by -frewrite-includes */
# 441 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 442 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* has_unique_object_representation.h expanded by -frewrite-includes */
#include <__type_traits/has_unique_object_representation.h>
#else /* has_unique_object_representation.h expanded by -frewrite-includes */
# 442 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_unique_object_representation.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_HAS_UNIQUE_OBJECT_REPRESENTATION_H
#define _LIBCPP___TYPE_TRAITS_HAS_UNIQUE_OBJECT_REPRESENTATION_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_unique_object_representation.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_unique_object_representation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_unique_object_representation.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_unique_object_representation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_all_extents.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_unique_object_representation.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_unique_object_representation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_unique_object_representation.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_unique_object_representation.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_unique_object_representation.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_unique_object_representation.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_unique_object_representation.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_unique_object_representation.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS has_unique_object_representations
    : public integral_constant<bool, __has_unique_object_representations(remove_cv_t<remove_all_extents_t<_Tp>>)> {};

template <class _Tp>
inline constexpr bool has_unique_object_representations_v = has_unique_object_representations<_Tp>::value;

#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_unique_object_representation.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_HAS_UNIQUE_OBJECT_REPRESENTATION_H
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_unique_object_representation.h" 3
#endif /* has_unique_object_representation.h expanded by -frewrite-includes */
# 443 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* has_virtual_destructor.h expanded by -frewrite-includes */
#include <__type_traits/has_virtual_destructor.h>
#else /* has_virtual_destructor.h expanded by -frewrite-includes */
# 443 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_virtual_destructor.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_HAS_VIRTUAL_DESTRUCTOR_H
#define _LIBCPP___TYPE_TRAITS_HAS_VIRTUAL_DESTRUCTOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_virtual_destructor.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_virtual_destructor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_virtual_destructor.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_virtual_destructor.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_virtual_destructor.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_virtual_destructor.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_virtual_destructor.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS has_virtual_destructor : public integral_constant<bool, __has_virtual_destructor(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_virtual_destructor.h" 3
template <class _Tp>
inline constexpr bool has_virtual_destructor_v = __has_virtual_destructor(_Tp);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_virtual_destructor.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_HAS_VIRTUAL_DESTRUCTOR_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/has_virtual_destructor.h" 3
#endif /* has_virtual_destructor.h expanded by -frewrite-includes */
# 444 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 444 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 445 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/invoke.h>
#endif /* expanded by -frewrite-includes */
# 445 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 446 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_abstract.h expanded by -frewrite-includes */
#include <__type_traits/is_abstract.h>
#else /* is_abstract.h expanded by -frewrite-includes */
# 446 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_abstract.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_ABSTRACT_H
#define _LIBCPP___TYPE_TRAITS_IS_ABSTRACT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_abstract.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_abstract.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_abstract.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_abstract.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_abstract.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_abstract.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_abstract.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_abstract : public integral_constant<bool, __is_abstract(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_abstract.h" 3
template <class _Tp>
inline constexpr bool is_abstract_v = __is_abstract(_Tp);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_abstract.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_ABSTRACT_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_abstract.h" 3
#endif /* is_abstract.h expanded by -frewrite-includes */
# 447 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_aggregate.h expanded by -frewrite-includes */
#include <__type_traits/is_aggregate.h>
#else /* is_aggregate.h expanded by -frewrite-includes */
# 447 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_aggregate.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_AGGREGATE_H
#define _LIBCPP___TYPE_TRAITS_IS_AGGREGATE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_aggregate.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_aggregate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_aggregate.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_aggregate.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_aggregate.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_aggregate.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_aggregate.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_aggregate.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_aggregate : public integral_constant<bool, __is_aggregate(_Tp)> {};

template <class _Tp>
inline constexpr bool is_aggregate_v = __is_aggregate(_Tp);

#endif // _LIBCPP_STD_VER >= 17
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_aggregate.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_AGGREGATE_H
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_aggregate.h" 3
#endif /* is_aggregate.h expanded by -frewrite-includes */
# 448 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 448 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 449 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_array.h>
#endif /* expanded by -frewrite-includes */
# 449 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 450 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_assignable.h>
#endif /* expanded by -frewrite-includes */
# 450 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 451 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_base_of.h>
#endif /* expanded by -frewrite-includes */
# 451 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 452 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_bounded_array.h expanded by -frewrite-includes */
#include <__type_traits/is_bounded_array.h>
#else /* is_bounded_array.h expanded by -frewrite-includes */
# 452 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_bounded_array.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_BOUNDED_ARRAY_H
#define _LIBCPP___TYPE_TRAITS_IS_BOUNDED_ARRAY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_bounded_array.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_bounded_array.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_bounded_array.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_bounded_array.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_bounded_array.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_bounded_array.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_bounded_array.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_bounded_array.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_bounded_array.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class>
struct _LIBCPP_TEMPLATE_VIS __libcpp_is_bounded_array : false_type {};
template <class _Tp, size_t _Np>
struct _LIBCPP_TEMPLATE_VIS __libcpp_is_bounded_array<_Tp[_Np]> : true_type {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_bounded_array.h" 3

template <class>
struct _LIBCPP_TEMPLATE_VIS is_bounded_array : false_type {};
template <class _Tp, size_t _Np>
struct _LIBCPP_TEMPLATE_VIS is_bounded_array<_Tp[_Np]> : true_type {};

template <class _Tp>
inline constexpr bool is_bounded_array_v = is_bounded_array<_Tp>::value;

#endif
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_bounded_array.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_BOUNDED_ARRAY_H
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_bounded_array.h" 3
#endif /* is_bounded_array.h expanded by -frewrite-includes */
# 453 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_callable.h expanded by -frewrite-includes */
#include <__type_traits/is_callable.h>
#else /* is_callable.h expanded by -frewrite-includes */
# 453 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_callable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_CALLABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_CALLABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_callable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_callable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_callable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_callable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_callable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_callable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_callable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_callable.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_callable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Func, class... _Args, class = decltype(std::declval<_Func>()(std::declval<_Args>()...))>
true_type __is_callable_helper(int);
template <class...>
false_type __is_callable_helper(...);

template <class _Func, class... _Args>
struct __is_callable : decltype(std::__is_callable_helper<_Func, _Args...>(0)) {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_CALLABLE_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_callable.h" 3
#endif /* is_callable.h expanded by -frewrite-includes */
# 454 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_char_like_type.h expanded by -frewrite-includes */
#include <__type_traits/is_char_like_type.h>
#else /* is_char_like_type.h expanded by -frewrite-includes */
# 454 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_char_like_type.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_CHAR_LIKE_TYPE_H
#define _LIBCPP___TYPE_TRAITS_IS_CHAR_LIKE_TYPE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_char_like_type.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_char_like_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conjunction.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_char_like_type.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_char_like_type.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_standard_layout.h expanded by -frewrite-includes */
#include <__type_traits/is_standard_layout.h>
#else /* is_standard_layout.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_char_like_type.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_standard_layout.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_STANDARD_LAYOUT_H
#define _LIBCPP___TYPE_TRAITS_IS_STANDARD_LAYOUT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_standard_layout.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_standard_layout.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_standard_layout.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_standard_layout.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_standard_layout.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_standard_layout.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_standard_layout.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_standard_layout : public integral_constant<bool, __is_standard_layout(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_standard_layout.h" 3
template <class _Tp>
inline constexpr bool is_standard_layout_v = __is_standard_layout(_Tp);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_standard_layout.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_STANDARD_LAYOUT_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_standard_layout.h" 3
#endif /* is_standard_layout.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_char_like_type.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_trivial.h expanded by -frewrite-includes */
#include <__type_traits/is_trivial.h>
#else /* is_trivial.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_char_like_type.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivial.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIAL_H
#define _LIBCPP___TYPE_TRAITS_IS_TRIVIAL_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivial.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivial.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivial.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivial.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivial.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivial.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivial.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_trivial : public integral_constant<bool, __is_trivial(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivial.h" 3
template <class _Tp>
inline constexpr bool is_trivial_v = __is_trivial(_Tp);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivial.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIAL_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivial.h" 3
#endif /* is_trivial.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_char_like_type.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_char_like_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_char_like_type.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_char_like_type.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _CharT>
using _IsCharLikeType = _And<is_standard_layout<_CharT>, is_trivial<_CharT> >;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_CHAR_LIKE_TYPE_H
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_char_like_type.h" 3
#endif /* is_char_like_type.h expanded by -frewrite-includes */
# 455 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_class.h>
#endif /* expanded by -frewrite-includes */
# 455 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 456 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_compound.h expanded by -frewrite-includes */
#include <__type_traits/is_compound.h>
#else /* is_compound.h expanded by -frewrite-includes */
# 456 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_COMPOUND_H
#define _LIBCPP___TYPE_TRAITS_IS_COMPOUND_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_fundamental.h expanded by -frewrite-includes */
#include <__type_traits/is_fundamental.h>
#else /* is_fundamental.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_FUNDAMENTAL_H
#define _LIBCPP___TYPE_TRAITS_IS_FUNDAMENTAL_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_null_pointer.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_void.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_fundamental)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_fundamental : _BoolConstant<__is_fundamental(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3
template <class _Tp>
inline constexpr bool is_fundamental_v = __is_fundamental(_Tp);
#  endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3

#else // __has_builtin(__is_fundamental)
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_fundamental
    : public integral_constant<bool, is_void<_Tp>::value || __is_nullptr_t<_Tp>::value || is_arithmetic<_Tp>::value> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3
template <class _Tp>
inline constexpr bool is_fundamental_v = is_fundamental<_Tp>::value;
#  endif
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3

#endif // __has_builtin(__is_fundamental)
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_FUNDAMENTAL_H
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_fundamental.h" 3
#endif /* is_fundamental.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_compound)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_compound : _BoolConstant<__is_compound(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3
template <class _Tp>
inline constexpr bool is_compound_v = __is_compound(_Tp);
#  endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3

#else // __has_builtin(__is_compound)
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_compound : public integral_constant<bool, !is_fundamental<_Tp>::value> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3
template <class _Tp>
inline constexpr bool is_compound_v = is_compound<_Tp>::value;
#  endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3

#endif // __has_builtin(__is_compound)
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_COMPOUND_H
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_compound.h" 3
#endif /* is_compound.h expanded by -frewrite-includes */
# 457 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_const.h>
#endif /* expanded by -frewrite-includes */
# 457 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 458 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 458 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 459 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 459 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 460 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 460 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 461 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_assignable.h>
#endif /* expanded by -frewrite-includes */
# 461 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 462 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 462 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 463 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 463 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 464 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_destructible.h>
#endif /* expanded by -frewrite-includes */
# 464 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 465 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_empty.h>
#endif /* expanded by -frewrite-includes */
# 465 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 466 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_enum.h>
#endif /* expanded by -frewrite-includes */
# 466 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 467 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_final.h>
#endif /* expanded by -frewrite-includes */
# 467 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 468 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_floating_point.h>
#endif /* expanded by -frewrite-includes */
# 468 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 469 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_function.h>
#endif /* expanded by -frewrite-includes */
# 469 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 470 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_fundamental.h>
#endif /* expanded by -frewrite-includes */
# 470 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 471 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_implicitly_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 471 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 472 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 472 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 473 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_literal_type.h expanded by -frewrite-includes */
#include <__type_traits/is_literal_type.h>
#else /* is_literal_type.h expanded by -frewrite-includes */
# 473 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_literal_type.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_LITERAL_TYPE
#define _LIBCPP___TYPE_TRAITS_IS_LITERAL_TYPE

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_literal_type.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_literal_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_literal_type.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_literal_type.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_literal_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_literal_type.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_literal_type.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_literal_type.h" 3
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 is_literal_type
    : public integral_constant<bool, __is_literal_type(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_literal_type.h" 3
template <class _Tp>
_LIBCPP_DEPRECATED_IN_CXX17 inline constexpr bool is_literal_type_v = __is_literal_type(_Tp);
#  endif // _LIBCPP_STD_VER >= 17
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_literal_type.h" 3
#endif   // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_literal_type.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_LITERAL_TYPE
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_literal_type.h" 3
#endif /* is_literal_type.h expanded by -frewrite-includes */
# 474 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_member_function_pointer.h>
#endif /* expanded by -frewrite-includes */
# 474 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 475 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_member_object_pointer.h>
#endif /* expanded by -frewrite-includes */
# 475 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 476 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_member_pointer.h>
#endif /* expanded by -frewrite-includes */
# 476 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 477 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 477 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 478 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 478 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 479 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_assignable.h>
#endif /* expanded by -frewrite-includes */
# 479 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 480 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 480 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 481 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_nothrow_convertible.h expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_convertible.h>
#else /* is_nothrow_convertible.h expanded by -frewrite-includes */
# 481 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_CONVERTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_CONVERTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conjunction.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/disjunction.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_void.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/lazy.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3

template <typename _Tp>
void __test_noexcept(_Tp) noexcept;

template <typename _Fm, typename _To>
bool_constant<noexcept(_VSTD::__test_noexcept<_To>(std::declval<_Fm>()))> __is_nothrow_convertible_test();

template <typename _Fm, typename _To>
struct __is_nothrow_convertible_helper : decltype(__is_nothrow_convertible_test<_Fm, _To>()) {};

template <typename _Fm, typename _To>
struct is_nothrow_convertible
    : _Or<_And<is_void<_To>, is_void<_Fm>>,
          _Lazy<_And, is_convertible<_Fm, _To>, __is_nothrow_convertible_helper<_Fm, _To> > >::type {};

template <typename _Fm, typename _To>
inline constexpr bool is_nothrow_convertible_v = is_nothrow_convertible<_Fm, _To>::value;

#endif // _LIBCPP_STD_VER >= 20
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_CONVERTIBLE_H
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_nothrow_convertible.h" 3
#endif /* is_nothrow_convertible.h expanded by -frewrite-includes */
# 482 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_copy_assignable.h>
#endif /* expanded by -frewrite-includes */
# 482 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 483 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 483 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 484 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 484 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 485 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_destructible.h>
#endif /* expanded by -frewrite-includes */
# 485 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 486 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 486 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 487 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 487 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 488 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_null_pointer.h>
#endif /* expanded by -frewrite-includes */
# 488 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 489 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 489 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 490 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_pod.h expanded by -frewrite-includes */
#include <__type_traits/is_pod.h>
#else /* is_pod.h expanded by -frewrite-includes */
# 490 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pod.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_POD_H
#define _LIBCPP___TYPE_TRAITS_IS_POD_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pod.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pod.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pod.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pod.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pod.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pod.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pod.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_pod : public integral_constant<bool, __is_pod(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pod.h" 3
template <class _Tp>
inline constexpr bool is_pod_v = __is_pod(_Tp);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pod.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_POD_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_pod.h" 3
#endif /* is_pod.h expanded by -frewrite-includes */
# 491 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_pointer.h>
#endif /* expanded by -frewrite-includes */
# 491 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 492 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_polymorphic.h expanded by -frewrite-includes */
#include <__type_traits/is_polymorphic.h>
#else /* is_polymorphic.h expanded by -frewrite-includes */
# 492 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_polymorphic.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_POLYMORPHIC_H
#define _LIBCPP___TYPE_TRAITS_IS_POLYMORPHIC_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_polymorphic.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_polymorphic.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_polymorphic.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_polymorphic.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_polymorphic.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_polymorphic.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_polymorphic.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_polymorphic : public integral_constant<bool, __is_polymorphic(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_polymorphic.h" 3
template <class _Tp>
inline constexpr bool is_polymorphic_v = __is_polymorphic(_Tp);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_polymorphic.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_POLYMORPHIC_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_polymorphic.h" 3
#endif /* is_polymorphic.h expanded by -frewrite-includes */
# 493 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 493 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 494 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference_wrapper.h>
#endif /* expanded by -frewrite-includes */
# 494 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 495 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_referenceable.h>
#endif /* expanded by -frewrite-includes */
# 495 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 496 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 496 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 497 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_scalar.h>
#endif /* expanded by -frewrite-includes */
# 497 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 498 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_scoped_enum.h expanded by -frewrite-includes */
#include <__type_traits/is_scoped_enum.h>
#else /* is_scoped_enum.h expanded by -frewrite-includes */
# 498 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H
#define _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_enum.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/underlying_type.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3
template <class _Tp, bool = is_enum_v<_Tp> >
struct __is_scoped_enum_helper : false_type {};

template <class _Tp>
struct __is_scoped_enum_helper<_Tp, true> : public bool_constant<!is_convertible_v<_Tp, underlying_type_t<_Tp> > > {};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : public __is_scoped_enum_helper<_Tp> {};

template <class _Tp>
inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value;
#endif
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_scoped_enum.h" 3
#endif /* is_scoped_enum.h expanded by -frewrite-includes */
# 499 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_signed.h>
#endif /* expanded by -frewrite-includes */
# 499 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 500 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_specialization.h expanded by -frewrite-includes */
#include <__type_traits/is_specialization.h>
#else /* is_specialization.h expanded by -frewrite-includes */
# 500 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_specialization.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_SPECIALIZATION
#define _LIBCPP___TYPE_TRAITS_IS_SPECIALIZATION

// This contains parts of P2098R1 but is based on MSVC STL's implementation.
//
// The paper has been rejected
//   We will not pursue P2098R0 (std::is_specialization_of) at this time; we'd
//   like to see a solution to this problem, but it requires language evolution
//   too.
//
// Since it is expected a real solution will be provided in the future only the
// minimal part is implemented.
//
// Note a cvref qualified _Tp is never considered a specialization.

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_specialization.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_specialization.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_specialization.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_specialization.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_specialization.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_specialization.h" 3

template <class _Tp, template <class...> class _Template>
inline constexpr bool __is_specialization_v = false; // true if and only if _Tp is a specialization of _Template

template <template <class...> class _Template, class... _Args>
inline constexpr bool __is_specialization_v<_Template<_Args...>, _Template> = true;

#endif // _LIBCPP_STD_VER >= 17
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_specialization.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_SPECIALIZATION
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_specialization.h" 3
#endif /* is_specialization.h expanded by -frewrite-includes */
# 501 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_standard_layout.h>
#endif /* expanded by -frewrite-includes */
# 501 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 502 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_swappable.h>
#endif /* expanded by -frewrite-includes */
# 502 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 503 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivial.h>
#endif /* expanded by -frewrite-includes */
# 503 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 504 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_trivially_assignable.h expanded by -frewrite-includes */
#include <__type_traits/is_trivially_assignable.h>
#else /* is_trivially_assignable.h expanded by -frewrite-includes */
# 504 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_assignable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_ASSIGNABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_ASSIGNABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_assignable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_assignable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_assignable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_assignable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_assignable.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_assignable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, class _Arg>
struct is_trivially_assignable : integral_constant<bool, __is_trivially_assignable(_Tp, _Arg)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_assignable.h" 3
template <class _Tp, class _Arg>
inline constexpr bool is_trivially_assignable_v = __is_trivially_assignable(_Tp, _Arg);
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_assignable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_ASSIGNABLE_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_assignable.h" 3
#endif /* is_trivially_assignable.h expanded by -frewrite-includes */
# 505 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_trivially_constructible.h expanded by -frewrite-includes */
#include <__type_traits/is_trivially_constructible.h>
#else /* is_trivially_constructible.h expanded by -frewrite-includes */
# 505 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_constructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_CONSTRUCTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_CONSTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_constructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_constructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_constructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_constructible.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_constructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, class... _Args>
struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible
    : integral_constant<bool, __is_trivially_constructible(_Tp, _Args...)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_constructible.h" 3
template <class _Tp, class... _Args>
inline constexpr bool is_trivially_constructible_v = __is_trivially_constructible(_Tp, _Args...);
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_constructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_CONSTRUCTIBLE_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_constructible.h" 3
#endif /* is_trivially_constructible.h expanded by -frewrite-includes */
# 506 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copy_assignable.h>
#endif /* expanded by -frewrite-includes */
# 506 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 507 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 507 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 508 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copyable.h>
#endif /* expanded by -frewrite-includes */
# 508 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 509 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_trivially_default_constructible.h expanded by -frewrite-includes */
#include <__type_traits/is_trivially_default_constructible.h>
#else /* is_trivially_default_constructible.h expanded by -frewrite-includes */
# 509 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_default_constructible.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_H
#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_default_constructible.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_default_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_default_constructible.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_default_constructible.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_default_constructible.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_default_constructible.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_default_constructible.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_trivially_default_constructible
    : public integral_constant<bool, __is_trivially_constructible(_Tp)> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_default_constructible.h" 3
template <class _Tp>
inline constexpr bool is_trivially_default_constructible_v = __is_trivially_constructible(_Tp);
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_default_constructible.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_default_constructible.h" 3
#endif /* is_trivially_default_constructible.h expanded by -frewrite-includes */
# 510 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_destructible.h>
#endif /* expanded by -frewrite-includes */
# 510 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 511 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 511 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 512 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 512 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 513 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_unbounded_array.h expanded by -frewrite-includes */
#include <__type_traits/is_unbounded_array.h>
#else /* is_unbounded_array.h expanded by -frewrite-includes */
# 513 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unbounded_array.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_UNBOUNDED_ARRAY_H
#define _LIBCPP___TYPE_TRAITS_IS_UNBOUNDED_ARRAY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unbounded_array.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unbounded_array.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unbounded_array.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unbounded_array.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unbounded_array.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unbounded_array.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unbounded_array.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class>
struct _LIBCPP_TEMPLATE_VIS __libcpp_is_unbounded_array : false_type {};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS __libcpp_is_unbounded_array<_Tp[]> : true_type {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unbounded_array.h" 3

template <class>
struct _LIBCPP_TEMPLATE_VIS is_unbounded_array : false_type {};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_unbounded_array<_Tp[]> : true_type {};

template <class _Tp>
inline constexpr bool is_unbounded_array_v = is_unbounded_array<_Tp>::value;

#endif
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unbounded_array.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_UNBOUNDED_ARRAY_H
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_unbounded_array.h" 3
#endif /* is_unbounded_array.h expanded by -frewrite-includes */
# 514 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_union.h>
#endif /* expanded by -frewrite-includes */
# 514 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 515 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 515 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 516 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_void.h>
#endif /* expanded by -frewrite-includes */
# 516 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 517 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_volatile.h>
#endif /* expanded by -frewrite-includes */
# 517 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 518 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_const_lvalue_ref.h>
#endif /* expanded by -frewrite-includes */
# 518 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 519 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_signed.h>
#endif /* expanded by -frewrite-includes */
# 519 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 520 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 520 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 521 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/maybe_const.h>
#endif /* expanded by -frewrite-includes */
# 521 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 522 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/negation.h>
#endif /* expanded by -frewrite-includes */
# 522 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 523 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* rank.h expanded by -frewrite-includes */
#include <__type_traits/rank.h>
#else /* rank.h expanded by -frewrite-includes */
# 523 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_RANK_H
#define _LIBCPP___TYPE_TRAITS_RANK_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// TODO: Enable using the builtin __array_rank when https://llvm.org/PR57133 is resolved
#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__array_rank) && 0
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 3

template <class _Tp>
struct rank : integral_constant<size_t, __array_rank(_Tp)> {};

#else
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 3

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS rank : public integral_constant<size_t, 0> {};
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS rank<_Tp[]> : public integral_constant<size_t, rank<_Tp>::value + 1> {};
template <class _Tp, size_t _Np>
struct _LIBCPP_TEMPLATE_VIS rank<_Tp[_Np]> : public integral_constant<size_t, rank<_Tp>::value + 1> {};

#endif // __has_builtin(__array_rank)
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 3
template <class _Tp>
inline constexpr size_t rank_v = rank<_Tp>::value;
#endif
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_RANK_H
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/rank.h" 3
#endif /* rank.h expanded by -frewrite-includes */
# 524 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_all_extents.h>
#endif /* expanded by -frewrite-includes */
# 524 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 525 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_const.h>
#endif /* expanded by -frewrite-includes */
# 525 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 526 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_const_ref.h>
#endif /* expanded by -frewrite-includes */
# 526 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 527 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 527 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 528 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_extent.h>
#endif /* expanded by -frewrite-includes */
# 528 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 529 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_pointer.h>
#endif /* expanded by -frewrite-includes */
# 529 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 530 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 530 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 531 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_volatile.h>
#endif /* expanded by -frewrite-includes */
# 531 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 532 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* result_of.h expanded by -frewrite-includes */
#include <__type_traits/result_of.h>
#else /* result_of.h expanded by -frewrite-includes */
# 532 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/result_of.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_RESULT_OF_H
#define _LIBCPP___TYPE_TRAITS_RESULT_OF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/result_of.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/result_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/result_of.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/result_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/result_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/result_of.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/result_of.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// result_of

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/result_of.h" 3
template <class _Callable>
class _LIBCPP_DEPRECATED_IN_CXX17 result_of;

template <class _Fp, class... _Args>
class _LIBCPP_TEMPLATE_VIS result_of<_Fp(_Args...)> : public __invoke_of<_Fp, _Args...> {};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/result_of.h" 3
template <class _Tp>
using result_of_t _LIBCPP_DEPRECATED_IN_CXX17 = typename result_of<_Tp>::type;
#  endif // _LIBCPP_STD_VER >= 14
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/result_of.h" 3
#endif   // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/result_of.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_RESULT_OF_H
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/result_of.h" 3
#endif /* result_of.h expanded by -frewrite-includes */
# 533 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/type_identity.h>
#endif /* expanded by -frewrite-includes */
# 533 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 534 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/underlying_type.h>
#endif /* expanded by -frewrite-includes */
# 534 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 535 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/unwrap_ref.h>
#endif /* expanded by -frewrite-includes */
# 535 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 536 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/void_t.h>
#endif /* expanded by -frewrite-includes */
# 536 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 537 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 537 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 538 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 538 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 539 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 539 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 540 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 540 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
# 541 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 543 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 544 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#endif
# 545 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3

#endif // _LIBCPP_TYPE_TRAITS
# 547 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/type_traits" 3
#endif /* type_traits expanded by -frewrite-includes */
# 160 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 2 3
#endif
# 161 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 163 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 164 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#endif
# 165 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3

#endif // _LIBCPP_CONCEPTS
# 167 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/concepts" 3
#endif /* concepts expanded by -frewrite-includes */
# 728 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 730 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 731 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#endif
# 732 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 734 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 734 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 735 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if 0 /* expanded by -frewrite-includes */
#  include <exception>
#endif /* expanded by -frewrite-includes */
# 735 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 736 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if 0 /* expanded by -frewrite-includes */
#  include <new>
#endif /* expanded by -frewrite-includes */
# 736 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 737 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 737 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 738 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if 0 /* expanded by -frewrite-includes */
#  include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 738 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 739 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#if 0 /* expanded by -frewrite-includes */
#  include <utility>
#endif /* expanded by -frewrite-includes */
# 739 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
# 740 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#endif
# 741 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3

#endif // _LIBCPP_ITERATOR
# 743 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iterator" 3
#endif /* iterator expanded by -frewrite-includes */
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/link-map-list.h" 2

#if defined(__CLANG_REWRITTEN_INCLUDES) /* layout.h expanded by -frewrite-includes */
#include "layout.h"
#else /* layout.h expanded by -frewrite-includes */
# 10 "../../src/lib/elfldltl/include/lib/elfldltl/link-map-list.h"
# 1 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h" 1
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_LAYOUT_H_
#define SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_LAYOUT_H_

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* array expanded by -frewrite-includes */
#include <array>
#else /* array expanded by -frewrite-includes */
# 8 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_ARRAY
#define _LIBCPP_ARRAY

/*
    array synopsis

namespace std
{
template <class T, size_t N >
struct array
{
    // types:
    typedef T & reference;
    typedef const T & const_reference;
    typedef implementation defined iterator;
    typedef implementation defined const_iterator;
    typedef size_t size_type;
    typedef ptrdiff_t difference_type;
    typedef T value_type;
    typedef T* pointer;
    typedef const T* const_pointer;
    typedef std::reverse_iterator<iterator> reverse_iterator;
    typedef std::reverse_iterator<const_iterator> const_reverse_iterator;

    // No explicit construct/copy/destroy for aggregate type
    void fill(const T& u);                                      // constexpr in C++20
    void swap(array& a) noexcept(is_nothrow_swappable_v<T>);    // constexpr in C++20

    // iterators:
    iterator begin() noexcept;                                  // constexpr in C++17
    const_iterator begin() const noexcept;                      // constexpr in C++17
    iterator end() noexcept;                                    // constexpr in C++17
    const_iterator end() const noexcept;                        // constexpr in C++17

    reverse_iterator rbegin() noexcept;                         // constexpr in C++17
    const_reverse_iterator rbegin() const noexcept;             // constexpr in C++17
    reverse_iterator rend() noexcept;                           // constexpr in C++17
    const_reverse_iterator rend() const noexcept;               // constexpr in C++17

    const_iterator cbegin() const noexcept;                     // constexpr in C++17
    const_iterator cend() const noexcept;                       // constexpr in C++17
    const_reverse_iterator crbegin() const noexcept;            // constexpr in C++17
    const_reverse_iterator crend() const noexcept;              // constexpr in C++17

    // capacity:
    constexpr size_type size() const noexcept;
    constexpr size_type max_size() const noexcept;
    constexpr bool empty() const noexcept;

    // element access:
    reference operator[](size_type n);                          // constexpr in C++17
    const_reference operator[](size_type n) const;              // constexpr in C++14
    reference at(size_type n);                                  // constexpr in C++17
    const_reference at(size_type n) const;                      // constexpr in C++14

    reference front();                                          // constexpr in C++17
    const_reference front() const;                              // constexpr in C++14
    reference back();                                           // constexpr in C++17
    const_reference back() const;                               // constexpr in C++14

    T* data() noexcept;                                         // constexpr in C++17
    const T* data() const noexcept;                             // constexpr in C++17
};

template <class T, class... U>
  array(T, U...) -> array<T, 1 + sizeof...(U)>;                 // C++17

template <class T, size_t N>
  bool operator==(const array<T,N>& x, const array<T,N>& y);    // constexpr in C++20
template <class T, size_t N>
  bool operator!=(const array<T,N>& x, const array<T,N>& y);    // removed in C++20
template <class T, size_t N>
  bool operator<(const array<T,N>& x, const array<T,N>& y);     // removed in C++20
template <class T, size_t N>
  bool operator>(const array<T,N>& x, const array<T,N>& y);     // removed in C++20
template <class T, size_t N>
  bool operator<=(const array<T,N>& x, const array<T,N>& y);    // removed in C++20
template <class T, size_t N>
  bool operator>=(const array<T,N>& x, const array<T,N>& y);    // removed in C++20
template<class T, size_t N>
  constexpr synth-three-way-result<T>
    operator<=>(const array<T, N>& x, const array<T, N>& y);    // since C++20

template <class T, size_t N >
  void swap(array<T,N>& x, array<T,N>& y) noexcept(noexcept(x.swap(y))); // constexpr in C++20

template <class T, size_t N>
  constexpr array<remove_cv_t<T>, N> to_array(T (&a)[N]);  // C++20
template <class T, size_t N>
  constexpr array<remove_cv_t<T>, N> to_array(T (&&a)[N]); // C++20

template <class T> struct tuple_size;
template <size_t I, class T> struct tuple_element;
template <class T, size_t N> struct tuple_size<array<T, N>>;
template <size_t I, class T, size_t N> struct tuple_element<I, array<T, N>>;
template <size_t I, class T, size_t N> T& get(array<T, N>&) noexcept;               // constexpr in C++14
template <size_t I, class T, size_t N> const T& get(const array<T, N>&) noexcept;   // constexpr in C++14
template <size_t I, class T, size_t N> T&& get(array<T, N>&&) noexcept;             // constexpr in C++14
template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexcept; // constexpr in C++14

}  // std

*/

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* equal.h expanded by -frewrite-includes */
#include <__algorithm/equal.h>
#else /* equal.h expanded by -frewrite-includes */
# 114 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_EQUAL_H
#define _LIBCPP___ALGORITHM_EQUAL_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* comp.h expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#else /* comp.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_COMP_H
#define _LIBCPP___ALGORITHM_COMP_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/predicate_traits.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

struct __equal_to {
  template <class _T1, class _T2>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _T1& __x, const _T2& __y) const {
    return __x == __y;
  }
};

template <class _Lhs, class _Rhs>
struct __is_trivial_equality_predicate<__equal_to, _Lhs, _Rhs> : true_type {};

// The definition is required because __less is part of the ABI, but it's empty
// because all comparisons should be transparent.
template <class _T1 = void, class _T2 = _T1>
struct __less {};

template <>
struct __less<void, void> {
  template <class _Tp, class _Up>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _Tp& __lhs, const _Up& __rhs) const {
    return __lhs < __rhs;
  }
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_COMP_H
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp.h" 3
#endif /* comp.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/unwrap_iter.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* constexpr_c_functions.h expanded by -frewrite-includes */
#include <__string/constexpr_c_functions.h>
#else /* constexpr_c_functions.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___STRING_CONSTEXPR_C_FUNCTIONS_H
#define _LIBCPP___STRING_CONSTEXPR_C_FUNCTIONS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* construct_at.h expanded by -frewrite-includes */
#include <__memory/construct_at.h>
#else /* construct_at.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_CONSTRUCT_AT_H
#define _LIBCPP___MEMORY_CONSTRUCT_AT_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/access.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* voidify.h expanded by -frewrite-includes */
#include <__memory/voidify.h>
#else /* voidify.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/voidify.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_VOIDIFY_H
#define _LIBCPP___MEMORY_VOIDIFY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/voidify.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/voidify.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/voidify.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/voidify.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/voidify.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/voidify.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/voidify.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <typename _Tp>
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void* __voidify(_Tp& __from) {
  // Cast away cv-qualifiers to allow modifying elements of a range through const iterators.
  return const_cast<void*>(static_cast<const volatile void*>(_VSTD::addressof(__from)));
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_VOIDIFY_H
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/voidify.h" 3
#endif /* voidify.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_array.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

// construct_at

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3

template <class _Tp, class... _Args, class = decltype(::new(std::declval<void*>()) _Tp(std::declval<_Args>()...))>
_LIBCPP_HIDE_FROM_ABI constexpr _Tp* construct_at(_Tp* __location, _Args&&... __args) {
  _LIBCPP_ASSERT_UNCATEGORIZED(__location != nullptr, "null pointer given to construct_at");
  return ::new (std::__voidify(*__location)) _Tp(std::forward<_Args>(__args)...);
}

#endif
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3

template <class _Tp, class... _Args, class = decltype(::new(std::declval<void*>()) _Tp(std::declval<_Args>()...))>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* __construct_at(_Tp* __location, _Args&&... __args) {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
  return std::construct_at(__location, std::forward<_Args>(__args)...);
#else
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
  return _LIBCPP_ASSERT_UNCATEGORIZED(__location != nullptr, "null pointer given to construct_at"),
         ::new (std::__voidify(*__location)) _Tp(std::forward<_Args>(__args)...);
#endif
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
}

// destroy_at

// The internal functions are available regardless of the language version (with the exception of the `__destroy_at`
// taking an array).

template <class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator __destroy(_ForwardIterator, _ForwardIterator);

template <class _Tp, __enable_if_t<!is_array<_Tp>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __destroy_at(_Tp* __loc) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__loc != nullptr, "null pointer given to destroy_at");
    __loc->~_Tp();
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
template <class _Tp, __enable_if_t<is_array<_Tp>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __destroy_at(_Tp* __loc) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__loc != nullptr, "null pointer given to destroy_at");
    std::__destroy(std::begin(*__loc), std::end(*__loc));
}
#endif
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3

template <class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator __destroy(_ForwardIterator __first, _ForwardIterator __last) {
    for (; __first != __last; ++__first)
        std::__destroy_at(std::addressof(*__first));
    return __first;
}

template <class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_BidirectionalIterator __reverse_destroy(_BidirectionalIterator __first, _BidirectionalIterator __last) {
    while (__last != __first) {
        --__last;
        std::__destroy_at(std::addressof(*__last));
    }
    return __last;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 100 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3

template <class _Tp, enable_if_t<!is_array_v<_Tp>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void destroy_at(_Tp* __loc) {
    std::__destroy_at(__loc);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
template <class _Tp, enable_if_t<is_array_v<_Tp>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void destroy_at(_Tp* __loc) {
  std::__destroy_at(__loc);
}
#endif
# 114 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3

template <class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void destroy(_ForwardIterator __first, _ForwardIterator __last) {
  (void)std::__destroy(std::move(__first), std::move(__last));
}

template <class _ForwardIterator, class _Size>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator destroy_n(_ForwardIterator __first, _Size __n) {
    for (; __n > 0; (void)++__first, --__n)
        std::__destroy_at(std::addressof(*__first));
    return __first;
}

#endif // _LIBCPP_STD_VER >= 17
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___MEMORY_CONSTRUCT_AT_H
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/construct_at.h" 3
#endif /* construct_at.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* datasizeof.h expanded by -frewrite-includes */
#include <__type_traits/datasizeof.h>
#else /* datasizeof.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_DATASIZEOF_H
#define _LIBCPP___TYPE_TRAITS_DATASIZEOF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_class.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_final.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 3

// This trait provides the size of a type excluding any tail padding.
//
// It is useful in contexts where performing an operation using the full size of the class (including padding) may
// have unintended side effects, such as overwriting a derived class' member when writing the tail padding of a class
// through a pointer-to-base.

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct __libcpp_datasizeof {
#if 0 /* disabled by -frewrite-includes */
#if __has_cpp_attribute(__no_unique_address__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 3
  template <class = char>
  struct _FirstPaddingByte {
    [[__no_unique_address__]] _Tp __v_;
    char __first_padding_byte_;
  };
#else
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 3
  template <bool = __libcpp_is_final<_Tp>::value || !is_class<_Tp>::value>
  struct _FirstPaddingByte : _Tp {
    char __first_padding_byte_;
  };

  template <>
  struct _FirstPaddingByte<true> {
    _Tp __v_;
    char __first_padding_byte_;
  };
#endif
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 3

  // _FirstPaddingByte<> is sometimes non-standard layout. Using `offsetof` is UB in that case, but GCC and Clang allow
  // the use as an extension.
  _LIBCPP_DIAGNOSTIC_PUSH
  _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Winvalid-offsetof")
  static const size_t value = offsetof(_FirstPaddingByte<>, __first_padding_byte_);
  _LIBCPP_DIAGNOSTIC_POP
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_DATASIZEOF_H
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/datasizeof.h" 3
#endif /* datasizeof.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_always_bitcastable.h expanded by -frewrite-includes */
#include <__type_traits/is_always_bitcastable.h>
#else /* is_always_bitcastable.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_ALWAYS_BITCASTABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_ALWAYS_BITCASTABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copyable.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Checks whether an object of type `From` can always be bit-cast to an object of type `To` and represent a valid value
// of type `To`. In other words, `From` and `To` have the same value representation and the set of values of `From` is
// a subset of the set of values of `To`.
//
// Note that types that cannot be assigned to each other using built-in assignment (e.g. arrays) might still be
// considered bit-castable.
template <class _From, class _To>
struct __is_always_bitcastable {
  using _UnqualFrom = __remove_cv_t<_From>;
  using _UnqualTo   = __remove_cv_t<_To>;

  // clang-format off
  static const bool value =
      // First, the simple case -- `From` and `To` are the same object type.
      (is_same<_UnqualFrom, _UnqualTo>::value && is_trivially_copyable<_UnqualFrom>::value) ||

      // Beyond the simple case, we say that one type is "always bit-castable" to another if:
      // - (1) `From` and `To` have the same value representation, and in addition every possible value of `From` has
      //   a corresponding value in the `To` type (in other words, the set of values of `To` is a superset of the set of
      //   values of `From`);
      // - (2) When the corresponding values are not the same value (as, for example, between an unsigned and a signed
      //   integer, where a large positive value of the unsigned integer corresponds to a negative value in the signed
      //   integer type), the value of `To` that results from a bitwise copy of `From` is the same what would be
      //   produced by the built-in assignment (if it were defined for the two types, to which there are minor
      //   exceptions, e.g. built-in arrays).
      //
      // In practice, that means:
      // - all integral types (except `bool`, see below) -- that is, character types and `int` types, both signed and
      //   unsigned...
      // - as well as arrays of such types...
      // - ...that have the same size.
      //
      // Other trivially-copyable types can't be validly bit-cast outside of their own type:
      // - floating-point types normally have different sizes and thus aren't bit-castable between each other (fails
      // #1);
      // - integral types and floating-point types use different representations, so for example bit-casting an integral
      //   `1` to `float` results in a very small less-than-one value, unlike built-in assignment that produces `1.0`
      //   (fails #2);
      // - booleans normally use only a single bit of their object representation; bit-casting an integer to a boolean
      //   will result in a boolean object with an incorrect representation, which is undefined behavior (fails #2).
      //   Bit-casting from a boolean into an integer, however, is valid;
      // - enumeration types may have different ranges of possible values (fails #1);
      // - for pointers, it is not guaranteed that pointers to different types use the same set of values to represent
      //   addresses, and the conversion results are explicitly unspecified for types with different alignments
      //   (fails #1);
      // - for structs and unions it is impossible to determine whether the set of values of one of them is a subset of
      //   the other (fails #1);
      // - there is no need to consider `nullptr_t` for practical purposes.
      (
        sizeof(_From) == sizeof(_To) &&
        is_integral<_From>::value &&
        is_integral<_To>::value &&
        !is_same<_UnqualTo, bool>::value
      );
  // clang-format on
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_ALWAYS_BITCASTABLE_H
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_always_bitcastable.h" 3
#endif /* is_always_bitcastable.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_assignable.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_equality_comparable.h expanded by -frewrite-includes */
#include <__type_traits/is_equality_comparable.h>
#else /* is_equality_comparable.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_EQUALITY_COMPARABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_EQUALITY_COMPARABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_void.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/void_t.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, class _Up, class = void>
struct __is_equality_comparable : false_type {};

template <class _Tp, class _Up>
struct __is_equality_comparable<_Tp, _Up, __void_t<decltype(std::declval<_Tp>() == std::declval<_Up>())> > : true_type {
};

// A type is_trivially_equality_comparable if the expression `a == b` is equivalent to `std::memcmp(&a, &b, sizeof(T))`
// (with `a` and `b` being of type `T`). For the case where we compare two object of the same type, we can use
// __is_trivially_equality_comparable. We have special-casing for pointers which point to the same type ignoring
// cv-qualifications and comparing to void-pointers.
//
// The following types are not trivially equality comparable:
// floating-point types: different bit-patterns can compare equal. (e.g 0.0 and -0.0)
// enums: The user is allowed to specialize operator== for enums
// pointers that don't have the same type (ignoring cv-qualifiers): pointers to virtual bases are equality comparable,
//   but don't have the same bit-pattern. An exception to this is comparing to a void-pointer. There the bit-pattern is
//   always compared.

template <class _Tp, class _Up>
struct __libcpp_is_trivially_equality_comparable_impl : false_type {};

template <class _Tp>
struct __libcpp_is_trivially_equality_comparable_impl<_Tp, _Tp>
#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__is_trivially_equality_comparable)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
    : integral_constant<bool, __is_trivially_equality_comparable(_Tp) && __is_equality_comparable<_Tp, _Tp>::value> {
};
#else
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
    : is_integral<_Tp> {
};
#endif // __has_builtin(__is_trivially_equality_comparable)
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3

template <class _Tp>
struct __libcpp_is_trivially_equality_comparable_impl<_Tp*, _Tp*> : true_type {};

// TODO: Use is_pointer_inverconvertible_base_of
template <class _Tp, class _Up>
struct __libcpp_is_trivially_equality_comparable_impl<_Tp*, _Up*>
    : integral_constant<
          bool,
          __is_equality_comparable<_Tp*, _Up*>::value &&
              (is_same<__remove_cv_t<_Tp>, __remove_cv_t<_Up> >::value || is_void<_Tp>::value || is_void<_Up>::value)> {
};

template <class _Tp, class _Up>
using __libcpp_is_trivially_equality_comparable =
    __libcpp_is_trivially_equality_comparable_impl<__remove_cv_t<_Tp>, __remove_cv_t<_Up> >;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_EQUALITY_COMPARABLE_H
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_equality_comparable.h" 3
#endif /* is_equality_comparable.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copyable.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_trivially_lexicographically_comparable.h expanded by -frewrite-includes */
#include <__type_traits/is_trivially_lexicographically_comparable.h>
#else /* is_trivially_lexicographically_comparable.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_LEXICOGRAPHICALLY_COMPARABLE_H
#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_LEXICOGRAPHICALLY_COMPARABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/void_t.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// A type is_trivially_lexicographically_comparable if the expression `a <=> b` (or their pre-C++20 equivalents) is
// equivalent to `std::memcmp(&a, &b, sizeof(T))` (with `a` and `b` being of type `T`). There is currently no builtin to
// tell us whether that's the case for arbitrary types, so we can only do this for known types. Specifically, these are
// currently unsigned integer types with a sizeof(T) == 1.
//
// bool is trivially lexicographically comparable, because e.g. false <=> true is valid code. Furthermore, the standard
// says that [basic.fundamental] "Type bool is a distinct type that has the same object representation, value
// representation, and alignment requirements as an implementation-defined unsigned integer type. The values of type
// bool are true and false."
// This means that bool has to be unsigned and has exactly two values. This means that having anything other than the
// `true` or `false` value representations in a bool is UB.
//
// The following types are not trivially lexicographically comparable:
// signed integer types: `char(-1) < char(1)`, but memcmp compares `unsigned char`s
// unsigned integer types with sizeof(T) > 1: depending on the endianness, the LSB might be the first byte to be
//                                            compared. This means that when comparing unsigned(129) and unsigned(2)
//                                            using memcmp(), the result would be that 2 > 129.
//                                            TODO: Do we want to enable this on big-endian systems?

template <class _Tp, class _Up>
struct __libcpp_is_trivially_lexicographically_comparable
    : integral_constant<bool,
                        is_same<__remove_cv_t<_Tp>, __remove_cv_t<_Up> >::value && sizeof(_Tp) == 1 &&
                            is_unsigned<_Tp>::value> {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_LEXICOGRAPHICALLY_COMPARABLE_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_trivially_lexicographically_comparable.h" 3
#endif /* is_trivially_lexicographically_comparable.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_pointer_in_range.h expanded by -frewrite-includes */
#include <__utility/is_pointer_in_range.h>
#else /* is_pointer_in_range.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_IS_POINTER_IN_RANGE_H
#define _LIBCPP___UTILITY_IS_POINTER_IN_RANGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/void_t.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, class _Up, class = void>
struct __is_less_than_comparable : false_type {};

template <class _Tp, class _Up>
struct __is_less_than_comparable<_Tp, _Up, __void_t<decltype(std::declval<_Tp>() < std::declval<_Up>())> > : true_type {
};

template <class _Tp, class _Up, __enable_if_t<__is_less_than_comparable<const _Tp*, const _Up*>::value, int> = 0>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_SANITIZE("address") bool __is_pointer_in_range(
    const _Tp* __begin, const _Tp* __end, const _Up* __ptr) {
  if (__libcpp_is_constant_evaluated()) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__builtin_constant_p(__begin <= __end), "__begin and __end do not form a range");

    // If this is not a constant during constant evaluation we know that __ptr is not part of the allocation where
    // [__begin, __end) is.
    if (!__builtin_constant_p(__begin <= __ptr && __ptr < __end))
      return false;
  }

  // Checking this for unrelated pointers is technically UB, but no compiler optimizes based on it (currently).
  return !__less<>()(__ptr, __begin) && __less<>()(__ptr, __end);
}

template <class _Tp, class _Up, __enable_if_t<!__is_less_than_comparable<const _Tp*, const _Up*>::value, int> = 0>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_SANITIZE("address") bool __is_pointer_in_range(
    const _Tp* __begin, const _Tp* __end, const _Up* __ptr) {
  if (__libcpp_is_constant_evaluated())
    return false;

  return reinterpret_cast<const char*>(__begin) <= reinterpret_cast<const char*>(__ptr) &&
         reinterpret_cast<const char*>(__ptr) < reinterpret_cast<const char*>(__end);
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___UTILITY_IS_POINTER_IN_RANGE_H
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/is_pointer_in_range.h" 3
#endif /* is_pointer_in_range.h expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Type used to encode that a function takes an integer that represents a number
// of elements as opposed to a number of bytes.
enum class __element_count : size_t {};

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 size_t __constexpr_strlen(const char* __str) {
  // GCC currently doesn't support __builtin_strlen for heap-allocated memory during constant evaluation.
  // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70816
#ifdef _LIBCPP_COMPILER_GCC
  if (__libcpp_is_constant_evaluated()) {
    size_t __i = 0;
    for (; __str[__i] != '\0'; ++__i)
      ;
    return __i;
  }
#endif
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
  return __builtin_strlen(__str);
}

// Because of __libcpp_is_trivially_lexicographically_comparable we know that comparing the object representations is
// equivalent to a std::memcmp. Since we have multiple objects contiguously in memory, we can call memcmp once instead
// of invoking it on every object individually.
template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 int
__constexpr_memcmp(const _Tp* __lhs, const _Up* __rhs, __element_count __n) {
  static_assert(__libcpp_is_trivially_lexicographically_comparable<_Tp, _Up>::value,
                "_Tp and _Up have to be trivially lexicographically comparable");

  auto __count = static_cast<size_t>(__n);

  if (__libcpp_is_constant_evaluated()) {
#ifdef _LIBCPP_COMPILER_CLANG_BASED
    if (sizeof(_Tp) == 1 && !is_same<_Tp, bool>::value)
      return __builtin_memcmp(__lhs, __rhs, __count * sizeof(_Tp));
#endif
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3

    while (__count != 0) {
      if (*__lhs < *__rhs)
        return -1;
      if (*__rhs < *__lhs)
        return 1;

      --__count;
      ++__lhs;
      ++__rhs;
    }
    return 0;
  } else {
    return __builtin_memcmp(__lhs, __rhs, __count * sizeof(_Tp));
  }
}

// Because of __libcpp_is_trivially_equality_comparable we know that comparing the object representations is equivalent
// to a std::memcmp(...) == 0. Since we have multiple objects contiguously in memory, we can call memcmp once instead
// of invoking it on every object individually.
template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
__constexpr_memcmp_equal(const _Tp* __lhs, const _Up* __rhs, __element_count __n) {
  static_assert(__libcpp_is_trivially_equality_comparable<_Tp, _Up>::value,
                "_Tp and _Up have to be trivially equality comparable");

  auto __count = static_cast<size_t>(__n);

  if (__libcpp_is_constant_evaluated()) {
#ifdef _LIBCPP_COMPILER_CLANG_BASED
    if (sizeof(_Tp) == 1 && is_integral<_Tp>::value && !is_same<_Tp, bool>::value)
      return __builtin_memcmp(__lhs, __rhs, __count * sizeof(_Tp)) == 0;
#endif
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
    while (__count != 0) {
      if (*__lhs != *__rhs)
        return false;

      --__count;
      ++__lhs;
      ++__rhs;
    }
    return true;
  } else {
    return __builtin_memcmp(__lhs, __rhs, __count * sizeof(_Tp)) == 0;
  }
}

template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __constexpr_memchr(_Tp* __str, _Up __value, size_t __count) {
  static_assert(sizeof(_Tp) == 1 && __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value,
                "Calling memchr on non-trivially equality comparable types is unsafe.");

  if (__libcpp_is_constant_evaluated()) {
// use __builtin_char_memchr to optimize constexpr evaluation if we can
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17 && __has_builtin(__builtin_char_memchr)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 123 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
    if constexpr (is_same_v<remove_cv_t<_Tp>, char> && is_same_v<remove_cv_t<_Up>, char>)
      return __builtin_char_memchr(__str, __value, __count);
#endif
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3

    for (; __count; --__count) {
      if (*__str == __value)
        return __str;
      ++__str;
    }
    return nullptr;
  } else {
    char __value_buffer = 0;
    __builtin_memcpy(&__value_buffer, &__value, sizeof(char));
    return static_cast<_Tp*>(__builtin_memchr(__str, __value_buffer, __count));
  }
}

// This function performs an assignment to an existing, already alive TriviallyCopyable object
// from another TriviallyCopyable object.
//
// It basically works around the fact that TriviallyCopyable objects are not required to be
// syntactically copy/move constructible or copy/move assignable. Technically, only one of the
// four operations is required to be syntactically valid -- but at least one definitely has to
// be valid.
//
// This is necessary in order to implement __constexpr_memmove below in a way that mirrors as
// closely as possible what the compiler's __builtin_memmove is able to do.
template <class _Tp, class _Up, __enable_if_t<is_assignable<_Tp&, _Up const&>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp& __assign_trivially_copyable(_Tp& __dest, _Up const& __src) {
  __dest = __src;
  return __dest;
}

// clang-format off
template <class _Tp, class _Up, __enable_if_t<!is_assignable<_Tp&, _Up const&>::value &&
                                               is_assignable<_Tp&, _Up&&>::value, int> = 0>
// clang-format on
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp& __assign_trivially_copyable(_Tp& __dest, _Up& __src) {
  __dest =
      static_cast<_Up&&>(__src); // this is safe, we're not actually moving anything since the assignment is trivial
  return __dest;
}

// clang-format off
template <class _Tp, class _Up, __enable_if_t<!is_assignable<_Tp&, _Up const&>::value &&
                                              !is_assignable<_Tp&, _Up&&>::value &&
                                               is_constructible<_Tp, _Up const&>::value, int> = 0>
// clang-format on
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp& __assign_trivially_copyable(_Tp& __dest, _Up const& __src) {
  // _Tp is trivially destructible, so we don't need to call its destructor to end the lifetime of the object
  // that was there previously
  std::__construct_at(std::addressof(__dest), __src);
  return __dest;
}

// clang-format off
template <class _Tp, class _Up, __enable_if_t<!is_assignable<_Tp&, _Up const&>::value &&
                                              !is_assignable<_Tp&, _Up&&>::value &&
                                              !is_constructible<_Tp, _Up const&>::value &&
                                               is_constructible<_Tp, _Up&&>::value, int> = 0>
// clang-format on
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp& __assign_trivially_copyable(_Tp& __dest, _Up& __src) {
  // _Tp is trivially destructible, so we don't need to call its destructor to end the lifetime of the object
  // that was there previously
  std::__construct_at(
      std::addressof(__dest),
      static_cast<_Up&&>(__src)); // this is safe, we're not actually moving anything since the constructor is trivial
  return __dest;
}

template <class _Tp, class _Up, __enable_if_t<__is_always_bitcastable<_Up, _Tp>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp*
__constexpr_memmove(_Tp* __dest, _Up* __src, __element_count __n) {
  size_t __count = static_cast<size_t>(__n);
  if (__libcpp_is_constant_evaluated()) {
#ifdef _LIBCPP_COMPILER_CLANG_BASED
    if (is_same<__remove_cv_t<_Tp>, __remove_cv_t<_Up> >::value) {
      ::__builtin_memmove(__dest, __src, __count * sizeof(_Tp));
      return __dest;
    }
#endif
# 204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
    if (std::__is_pointer_in_range(__src, __src + __count, __dest)) {
      for (; __count > 0; --__count)
        std::__assign_trivially_copyable(__dest[__count - 1], __src[__count - 1]);
    } else {
      for (size_t __i = 0; __i != __count; ++__i)
        std::__assign_trivially_copyable(__dest[__i], __src[__i]);
    }
  } else if (__count > 0) {
    ::__builtin_memmove(__dest, __src, (__count - 1) * sizeof(_Tp) + __libcpp_datasizeof<_Tp>::value);
  }
  return __dest;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___STRING_CONSTEXPR_C_FUNCTIONS_H
# 220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/constexpr_c_functions.h" 3
#endif /* constexpr_c_functions.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_equality_comparable.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_volatile.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/predicate_traits.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
#endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __equal_iter_impl(
    _InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate& __pred) {
  for (; __first1 != __last1; ++__first1, (void)++__first2)
    if (!__pred(*__first1, *__first2))
      return false;
  return true;
}

template <
    class _Tp,
    class _Up,
    class _BinaryPredicate,
    __enable_if_t<__is_trivial_equality_predicate<_BinaryPredicate, _Tp, _Up>::value && !is_volatile<_Tp>::value &&
                      !is_volatile<_Up>::value && __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value,
                  int> = 0>
_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__equal_iter_impl(_Tp* __first1, _Tp* __last1, _Up* __first2, _BinaryPredicate&) {
  return std::__constexpr_memcmp_equal(__first1, __first2, __element_count(__last1 - __first1));
}

template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __pred) {
  return std::__equal_iter_impl(
      std::__unwrap_iter(__first1), std::__unwrap_iter(__last1), std::__unwrap_iter(__first2), __pred);
}

template <class _InputIterator1, class _InputIterator2>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) {
  return std::equal(__first1, __last1, __first2, __equal_to());
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
template <class _BinaryPredicate, class _InputIterator1, class _InputIterator2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
        _BinaryPredicate __pred, input_iterator_tag, input_iterator_tag) {
  for (; __first1 != __last1 && __first2 != __last2; ++__first1, (void)++__first2)
    if (!__pred(*__first1, *__first2))
      return false;
  return __first1 == __last1 && __first2 == __last2;
}

template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Pred, class _Proj1, class _Proj2>
_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __equal_impl(
    _Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Pred& __comp, _Proj1& __proj1, _Proj2& __proj2) {
  while (__first1 != __last1 && __first2 != __last2) {
    if (!std::__invoke(__comp, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2)))
      return false;
    ++__first1;
    ++__first2;
  }
  return __first1 == __last1 && __first2 == __last2;
}

template <class _Tp,
          class _Up,
          class _Pred,
          class _Proj1,
          class _Proj2,
          __enable_if_t<__is_trivial_equality_predicate<_Pred, _Tp, _Up>::value && __is_identity<_Proj1>::value &&
                            __is_identity<_Proj2>::value && !is_volatile<_Tp>::value && !is_volatile<_Up>::value &&
                            __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value,
                        int> = 0>
_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __equal_impl(
    _Tp* __first1, _Tp* __last1, _Up* __first2, _Up*, _Pred&, _Proj1&, _Proj2&) {
  return std::__constexpr_memcmp_equal(__first1, __first2, __element_count(__last1 - __first1));
}

template <class _BinaryPredicate, class _RandomAccessIterator1, class _RandomAccessIterator2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__equal(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, _RandomAccessIterator2 __first2,
        _RandomAccessIterator2 __last2, _BinaryPredicate __pred, random_access_iterator_tag,
        random_access_iterator_tag) {
  if (_VSTD::distance(__first1, __last1) != _VSTD::distance(__first2, __last2))
    return false;
  __identity __proj;
  return std::__equal_impl(
      std::__unwrap_iter(__first1),
      std::__unwrap_iter(__last1),
      std::__unwrap_iter(__first2),
      std::__unwrap_iter(__last2),
      __pred,
      __proj,
      __proj);
}

template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
      _BinaryPredicate __pred) {
  return _VSTD::__equal<_BinaryPredicate&>(
      __first1, __last1, __first2, __last2, __pred, typename iterator_traits<_InputIterator1>::iterator_category(),
      typename iterator_traits<_InputIterator2>::iterator_category());
}

template <class _InputIterator1, class _InputIterator2>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
  return std::__equal(
      __first1,
      __last1,
      __first2,
      __last2,
      __equal_to(),
      typename iterator_traits<_InputIterator1>::iterator_category(),
      typename iterator_traits<_InputIterator2>::iterator_category());
}
#endif
# 146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_EQUAL_H
# 150 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal.h" 3
#endif /* equal.h expanded by -frewrite-includes */
# 115 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* fill_n.h expanded by -frewrite-includes */
#include <__algorithm/fill_n.h>
#else /* fill_n.h expanded by -frewrite-includes */
# 115 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill_n.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_FILL_N_H
#define _LIBCPP___ALGORITHM_FILL_N_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill_n.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill_n.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/convert_to_integral.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill_n.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill_n.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill_n.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill_n.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// fill_n isn't specialized for std::memset, because the compiler already optimizes the loop to a call to std::memset.

template <class _OutputIterator, class _Size, class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
__fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
{
    for (; __n > 0; ++__first, (void) --__n)
        *__first = __value;
    return __first;
}

template <class _OutputIterator, class _Size, class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
{
   return _VSTD::__fill_n(__first, _VSTD::__convert_to_integral(__n), __value);
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_FILL_N_H
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill_n.h" 3
#endif /* fill_n.h expanded by -frewrite-includes */
# 116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* lexicographical_compare.h expanded by -frewrite-includes */
#include <__algorithm/lexicographical_compare.h>
#else /* lexicographical_compare.h expanded by -frewrite-includes */
# 116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_LEXICOGRAPHICAL_COMPARE_H
#define _LIBCPP___ALGORITHM_LEXICOGRAPHICAL_COMPARE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* comp_ref_type.h expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#else /* comp_ref_type.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp_ref_type.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_COMP_REF_TYPE_H
#define _LIBCPP___ALGORITHM_COMP_REF_TYPE_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp_ref_type.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp_ref_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp_ref_type.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp_ref_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp_ref_type.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp_ref_type.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp_ref_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp_ref_type.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp_ref_type.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Compare>
struct __debug_less
{
    _Compare &__comp_;
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI __debug_less(_Compare& __c) : __comp_(__c) {}

    template <class _Tp, class _Up>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
    bool operator()(const _Tp& __x,  const _Up& __y)
    {
        bool __r = __comp_(__x, __y);
        if (__r)
            __do_compare_assert(0, __y, __x);
        return __r;
    }

    template <class _Tp, class _Up>
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
    bool operator()(_Tp& __x,  _Up& __y)
    {
        bool __r = __comp_(__x, __y);
        if (__r)
            __do_compare_assert(0, __y, __x);
        return __r;
    }

    template <class _LHS, class _RHS>
    _LIBCPP_CONSTEXPR_SINCE_CXX14
    inline _LIBCPP_INLINE_VISIBILITY
    decltype((void)std::declval<_Compare&>()(
        std::declval<_LHS &>(), std::declval<_RHS &>()))
    __do_compare_assert(int, _LHS & __l, _RHS & __r) {
        _LIBCPP_ASSERT_UNCATEGORIZED(!__comp_(__l, __r),
            "Comparator does not induce a strict weak ordering");
        (void)__l;
        (void)__r;
    }

    template <class _LHS, class _RHS>
    _LIBCPP_CONSTEXPR_SINCE_CXX14
    inline _LIBCPP_INLINE_VISIBILITY
    void __do_compare_assert(long, _LHS &, _RHS &) {}
};

// Pass the comparator by lvalue reference. Or in debug mode, using a
// debugging wrapper that stores a reference.
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_ENABLE_DEBUG_MODE
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp_ref_type.h" 3
template <class _Comp>
using __comp_ref_type = __debug_less<_Comp>;
#else
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp_ref_type.h" 3
template <class _Comp>
using __comp_ref_type = _Comp&;
#endif
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp_ref_type.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_COMP_REF_TYPE_H
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/comp_ref_type.h" 3
#endif /* comp_ref_type.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Compare, class _InputIterator1, class _InputIterator2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
                          _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
{
    for (; __first2 != __last2; ++__first1, (void) ++__first2)
    {
        if (__first1 == __last1 || __comp(*__first1, *__first2))
            return true;
        if (__comp(*__first2, *__first1))
            return false;
    }
    return false;
}

template <class _InputIterator1, class _InputIterator2, class _Compare>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
                        _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
{
    return _VSTD::__lexicographical_compare<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __comp);
}

template <class _InputIterator1, class _InputIterator2>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
                        _InputIterator2 __first2, _InputIterator2 __last2)
{
    return _VSTD::lexicographical_compare(__first1, __last1, __first2, __last2, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_LEXICOGRAPHICAL_COMPARE_H
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare.h" 3
#endif /* lexicographical_compare.h expanded by -frewrite-includes */
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* lexicographical_compare_three_way.h expanded by -frewrite-includes */
#include <__algorithm/lexicographical_compare_three_way.h>
#else /* lexicographical_compare_three_way.h expanded by -frewrite-includes */
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_LEXICOGRAPHICAL_COMPARE_THREE_WAY_H
#define _LIBCPP___ALGORITHM_LEXICOGRAPHICAL_COMPARE_THREE_WAY_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* min.h expanded by -frewrite-includes */
#include <__algorithm/min.h>
#else /* min.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_MIN_H
#define _LIBCPP___ALGORITHM_MIN_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* min_element.h expanded by -frewrite-includes */
#include <__algorithm/min_element.h>
#else /* min_element.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_MIN_ELEMENT_H
#define _LIBCPP___ALGORITHM_MIN_ELEMENT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_callable.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Comp, class _Iter, class _Sent, class _Proj>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
_Iter __min_element(_Iter __first, _Sent __last, _Comp __comp, _Proj& __proj) {
  if (__first == __last)
    return __first;

  _Iter __i = __first;
  while (++__i != __last)
    if (std::__invoke(__comp, std::__invoke(__proj, *__i), std::__invoke(__proj, *__first)))
      __first = __i;

  return __first;
}

template <class _Comp, class _Iter, class _Sent>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
_Iter __min_element(_Iter __first, _Sent __last, _Comp __comp) {
  auto __proj = __identity();
  return std::__min_element<_Comp>(std::move(__first), std::move(__last), __comp, __proj);
}

template <class _ForwardIterator, class _Compare>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
{
  static_assert(__has_forward_iterator_category<_ForwardIterator>::value,
      "std::min_element requires a ForwardIterator");
  static_assert(__is_callable<_Compare, decltype(*__first), decltype(*__first)>::value,
              "The comparator has to be callable");

  return std::__min_element<__comp_ref_type<_Compare> >(std::move(__first), std::move(__last), __comp);
}

template <class _ForwardIterator>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
min_element(_ForwardIterator __first, _ForwardIterator __last)
{
    return _VSTD::min_element(__first, __last, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_MIN_ELEMENT_H
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_element.h" 3
#endif /* min_element.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&
min(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b, _Compare __comp)
{
    return __comp(__b, __a) ? __b : __a;
}

template <class _Tp>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&
min(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b)
{
    return _VSTD::min(__a, __b, __less<>());
}

#ifndef _LIBCPP_CXX03_LANG

template<class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp
min(initializer_list<_Tp> __t, _Compare __comp)
{
    return *_VSTD::__min_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
}

template<class _Tp>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp
min(initializer_list<_Tp> __t)
{
    return *_VSTD::min_element(__t.begin(), __t.end(), __less<>());
}

#endif // _LIBCPP_CXX03_LANG
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_MIN_H
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min.h" 3
#endif /* min.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* three_way_comp_ref_type.h expanded by -frewrite-includes */
#include <__algorithm/three_way_comp_ref_type.h>
#else /* three_way_comp_ref_type.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_THREE_WAY_COMP_REF_TYPE_H
#define _LIBCPP___ALGORITHM_THREE_WAY_COMP_REF_TYPE_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3

template <class _Comp>
struct __debug_three_way_comp {
  _Comp& __comp_;
  _LIBCPP_HIDE_FROM_ABI constexpr __debug_three_way_comp(_Comp& __c) : __comp_(__c) {}

  template <class _Tp, class _Up>
  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(const _Tp& __x, const _Up& __y) {
    auto __r = __comp_(__x, __y);
    if constexpr (__comparison_category<decltype(__comp_(__x, __y))>)
      __do_compare_assert(__y, __x, __r);
    return __r;
  }

  template <class _Tp, class _Up>
  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp& __x, _Up& __y) {
    auto __r = __comp_(__x, __y);
    if constexpr (__comparison_category<decltype(__comp_(__x, __y))>)
      __do_compare_assert(__y, __x, __r);
    return __r;
  }

  template <class _LHS, class _RHS, class _Order>
  _LIBCPP_HIDE_FROM_ABI constexpr void __do_compare_assert(_LHS& __l, _RHS& __r, _Order __o) {
    _Order __expected = __o;
    if (__o == _Order::less)
      __expected = _Order::greater;
    if (__o == _Order::greater)
      __expected = _Order::less;
    _LIBCPP_ASSERT_UNCATEGORIZED(__comp_(__l, __r) == __expected, "Comparator does not induce a strict weak ordering");
    (void)__l;
    (void)__r;
  }
};

// Pass the comparator by lvalue reference. Or in debug mode, using a
// debugging wrapper that stores a reference.
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_ENABLE_DEBUG_MODE
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3
template <class _Comp>
using __three_way_comp_ref_type = __debug_three_way_comp<_Comp>;
#  else
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3
template <class _Comp>
using __three_way_comp_ref_type = _Comp&;
#  endif
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3

#endif // _LIBCPP_STD_VER >= 20
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_THREE_WAY_COMP_REF_TYPE_H
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/three_way_comp_ref_type.h" 3
#endif /* three_way_comp_ref_type.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/compare_three_way.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3

// Fast path for random access iterators which computes the number of loop iterations up-front and
// then skips the iterator comparisons inside the loop.
template <class _InputIterator1, class _InputIterator2, class _Cmp>
_LIBCPP_HIDE_FROM_ABI constexpr auto __lexicographical_compare_three_way_fast_path(
    _InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _Cmp& __comp)
    -> decltype(__comp(*__first1, *__first2)) {
  static_assert(
      signed_integral<__iter_diff_t<_InputIterator1>>, "Using a non-integral difference_type is undefined behavior.");
  static_assert(
      signed_integral<__iter_diff_t<_InputIterator2>>, "Using a non-integral difference_type is undefined behavior.");

  using _Len1   = __iter_diff_t<_InputIterator1>;
  using _Len2   = __iter_diff_t<_InputIterator2>;
  using _Common = common_type_t<_Len1, _Len2>;

  _Len1 __len1      = __last1 - __first1;
  _Len2 __len2      = __last2 - __first2;
  _Common __min_len = std::min<_Common>(__len1, __len2);

  for (_Common __i = 0; __i < __min_len; ++__i) {
    auto __c = __comp(*__first1, *__first2);
    if (__c != 0) {
      return __c;
    }
    ++__first1;
    ++__first2;
  }

  return __len1 <=> __len2;
}

// Unoptimized implementation which compares the iterators against the end in every loop iteration
template <class _InputIterator1, class _InputIterator2, class _Cmp>
_LIBCPP_HIDE_FROM_ABI constexpr auto __lexicographical_compare_three_way_slow_path(
    _InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _Cmp& __comp)
    -> decltype(__comp(*__first1, *__first2)) {
  while (true) {
    bool __exhausted1 = __first1 == __last1;
    bool __exhausted2 = __first2 == __last2;

    if (__exhausted1 || __exhausted2) {
      if (!__exhausted1)
        return strong_ordering::greater;
      if (!__exhausted2)
        return strong_ordering::less;
      return strong_ordering::equal;
    }

    auto __c = __comp(*__first1, *__first2);
    if (__c != 0) {
      return __c;
    }

    ++__first1;
    ++__first2;
  }
}

template <class _InputIterator1, class _InputIterator2, class _Cmp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto lexicographical_compare_three_way(
    _InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _Cmp __comp)
    -> decltype(__comp(*__first1, *__first2)) {
  static_assert(__comparison_category<decltype(__comp(*__first1, *__first2))>,
                "The comparator passed to lexicographical_compare_three_way must return a comparison category type.");
  static_assert(std::is_copy_constructible_v<_InputIterator1>, "Iterators must be copy constructible.");
  static_assert(std::is_copy_constructible_v<_InputIterator2>, "Iterators must be copy constructible.");
  __three_way_comp_ref_type<_Cmp> __wrapped_comp_ref(__comp);
  if constexpr (__has_random_access_iterator_category<_InputIterator1>::value &&
                __has_random_access_iterator_category<_InputIterator2>::value) {
    return std::__lexicographical_compare_three_way_fast_path(
        std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2), __wrapped_comp_ref);
  } else {
    // Unoptimized implementation which compares the iterators against the end in every loop iteration
    return std::__lexicographical_compare_three_way_slow_path(
        std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2), __wrapped_comp_ref);
  }
}

template <class _InputIterator1, class _InputIterator2>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto lexicographical_compare_three_way(
    _InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
  return std::lexicographical_compare_three_way(
      std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2), std::compare_three_way());
}

#endif // _LIBCPP_STD_VER >= 20
# 120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_LEXICOGRAPHICAL_COMPARE_THREE_WAY_H
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lexicographical_compare_three_way.h" 3
#endif /* lexicographical_compare_three_way.h expanded by -frewrite-includes */
# 118 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* swap_ranges.h expanded by -frewrite-includes */
#include <__algorithm/swap_ranges.h>
#else /* swap_ranges.h expanded by -frewrite-includes */
# 118 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/swap_ranges.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_SWAP_RANGES_H
#define _LIBCPP___ALGORITHM_SWAP_RANGES_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* iterator_operations.h expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#else /* iterator_operations.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/swap_ranges.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_ITERATOR_OPERATIONS_H
#define _LIBCPP___ALGORITHM_ITERATOR_OPERATIONS_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* iter_swap.h expanded by -frewrite-includes */
#include <__algorithm/iter_swap.h>
#else /* iter_swap.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iter_swap.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_ITER_SWAP_H
#define _LIBCPP___ALGORITHM_ITER_SWAP_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iter_swap.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iter_swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iter_swap.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iter_swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iter_swap.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iter_swap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iter_swap.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iter_swap.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iter_swap.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ForwardIterator1, class _ForwardIterator2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 void iter_swap(_ForwardIterator1 __a,
                                                                              _ForwardIterator2 __b)
    //                                  _NOEXCEPT_(_NOEXCEPT_(swap(*__a, *__b)))
    _NOEXCEPT_(_NOEXCEPT_(swap(*std::declval<_ForwardIterator1>(), *std::declval<_ForwardIterator2>()))) {
  swap(*__a, *__b);
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_ITER_SWAP_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iter_swap.h" 3
#endif /* iter_swap.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_iterator_concept.h expanded by -frewrite-includes */
#include <__algorithm/ranges_iterator_concept.h>
#else /* ranges_iterator_concept.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_ITERATOR_CONCEPT_H
#define _LIBCPP___ALGORITHM_RANGES_ITERATOR_CONCEPT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _IterMaybeQualified>
consteval auto __get_iterator_concept() {
  using _Iter = __remove_cvref_t<_IterMaybeQualified>;

  if constexpr (contiguous_iterator<_Iter>)
    return contiguous_iterator_tag();
  else if constexpr (random_access_iterator<_Iter>)
    return random_access_iterator_tag();
  else if constexpr (bidirectional_iterator<_Iter>)
    return bidirectional_iterator_tag();
  else if constexpr (forward_iterator<_Iter>)
    return forward_iterator_tag();
  else if constexpr (input_iterator<_Iter>)
    return input_iterator_tag();
}

template <class _Iter>
using __iterator_concept = decltype(__get_iterator_concept<_Iter>());

} // namespace ranges
_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_ITERATOR_CONCEPT_H
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_iterator_concept.h" 3
#endif /* ranges_iterator_concept.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/prev.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#endif
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy> struct _IterOps;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
struct _RangeAlgPolicy {};

template <>
struct _IterOps<_RangeAlgPolicy> {

  template <class _Iter>
  using __value_type = iter_value_t<_Iter>;

  template <class _Iter>
  using __iterator_category = ranges::__iterator_concept<_Iter>;

  template <class _Iter>
  using __difference_type = iter_difference_t<_Iter>;

  static constexpr auto advance = ranges::advance;
  static constexpr auto distance = ranges::distance;
  static constexpr auto __iter_move = ranges::iter_move;
  static constexpr auto iter_swap = ranges::iter_swap;
  static constexpr auto next = ranges::next;
  static constexpr auto prev = ranges::prev;
  static constexpr auto __advance_to = ranges::advance;
};

#endif
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3

struct _ClassicAlgPolicy {};

template <>
struct _IterOps<_ClassicAlgPolicy> {

  template <class _Iter>
  using __value_type = typename iterator_traits<_Iter>::value_type;

  template <class _Iter>
  using __iterator_category = typename iterator_traits<_Iter>::iterator_category;

  template <class _Iter>
  using __difference_type = typename iterator_traits<_Iter>::difference_type;

  // advance
  template <class _Iter, class _Distance>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
  static void advance(_Iter& __iter, _Distance __count) {
    std::advance(__iter, __count);
  }

  // distance
  template <class _Iter>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
  static typename iterator_traits<_Iter>::difference_type distance(_Iter __first, _Iter __last) {
    return std::distance(__first, __last);
  }

  template <class _Iter>
  using __deref_t = decltype(*std::declval<_Iter&>());

  template <class _Iter>
  using __move_t = decltype(std::move(*std::declval<_Iter&>()));

  template <class _Iter>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
  static void __validate_iter_reference() {
    static_assert(is_same<__deref_t<_Iter>, typename iterator_traits<__remove_cvref_t<_Iter> >::reference>::value,
        "It looks like your iterator's `iterator_traits<It>::reference` does not match the return type of "
        "dereferencing the iterator, i.e., calling `*it`. This is undefined behavior according to [input.iterators] "
        "and can lead to dangling reference issues at runtime, so we are flagging this.");
  }

  // iter_move
  template <class _Iter, __enable_if_t<is_reference<__deref_t<_Iter> >::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static
  // If the result of dereferencing `_Iter` is a reference type, deduce the result of calling `std::move` on it. Note
  // that the C++03 mode doesn't support `decltype(auto)` as the return type.
  __move_t<_Iter>
  __iter_move(_Iter&& __i) {
    __validate_iter_reference<_Iter>();

    return std::move(*std::forward<_Iter>(__i));
  }

  template <class _Iter, __enable_if_t<!is_reference<__deref_t<_Iter> >::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static
  // If the result of dereferencing `_Iter` is a value type, deduce the return value of this function to also be a
  // value -- otherwise, after `operator*` returns a temporary, this function would return a dangling reference to that
  // temporary. Note that the C++03 mode doesn't support `auto` as the return type.
  __deref_t<_Iter>
  __iter_move(_Iter&& __i) {
    __validate_iter_reference<_Iter>();

    return *std::forward<_Iter>(__i);
  }

  // iter_swap
  template <class _Iter1, class _Iter2>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
  static void iter_swap(_Iter1&& __a, _Iter2&& __b) {
    std::iter_swap(std::forward<_Iter1>(__a), std::forward<_Iter2>(__b));
  }

  // next
  template <class _Iterator>
  _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14
  _Iterator next(_Iterator, _Iterator __last) {
    return __last;
  }

  template <class _Iter>
  _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14
  __remove_cvref_t<_Iter> next(_Iter&& __it,
                          typename iterator_traits<__remove_cvref_t<_Iter> >::difference_type __n = 1) {
    return std::next(std::forward<_Iter>(__it), __n);
  }

  // prev
  template <class _Iter>
  _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14
  __remove_cvref_t<_Iter> prev(_Iter&& __iter,
                 typename iterator_traits<__remove_cvref_t<_Iter> >::difference_type __n = 1) {
    return std::prev(std::forward<_Iter>(__iter), __n);
  }

  template <class _Iter>
  _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14
  void __advance_to(_Iter& __first, _Iter __last) {
    __first = __last;
  }
};

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_ITERATOR_OPERATIONS_H
# 177 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/iterator_operations.h" 3
#endif /* iterator_operations.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/swap_ranges.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/swap_ranges.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/swap_ranges.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/swap_ranges.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/swap_ranges.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/swap_ranges.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/swap_ranges.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/swap_ranges.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/swap_ranges.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/swap_ranges.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// 2+2 iterators: the shorter size will be used.
template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2, class _Sentinel2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
pair<_ForwardIterator1, _ForwardIterator2>
__swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2, _Sentinel2 __last2) {
  while (__first1 != __last1 && __first2 != __last2) {
    _IterOps<_AlgPolicy>::iter_swap(__first1, __first2);
    ++__first1;
    ++__first2;
  }

  return pair<_ForwardIterator1, _ForwardIterator2>(std::move(__first1), std::move(__first2));
}

// 2+1 iterators: size2 >= size1.
template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
pair<_ForwardIterator1, _ForwardIterator2>
__swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2) {
  while (__first1 != __last1) {
    _IterOps<_AlgPolicy>::iter_swap(__first1, __first2);
    ++__first1;
    ++__first2;
  }

  return pair<_ForwardIterator1, _ForwardIterator2>(std::move(__first1), std::move(__first2));
}

template <class _ForwardIterator1, class _ForwardIterator2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator2
swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) {
  return std::__swap_ranges<_ClassicAlgPolicy>(
      std::move(__first1), std::move(__last1), std::move(__first2)).second;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_SWAP_RANGES_H
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/swap_ranges.h" 3
#endif /* swap_ranges.h expanded by -frewrite-includes */
# 119 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 119 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 121 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/array.h>
#endif /* expanded by -frewrite-includes */
# 121 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 123 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/sfinae_helpers.h>
#endif /* expanded by -frewrite-includes */
# 123 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_array.h>
#endif /* expanded by -frewrite-includes */
# 125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_const.h>
#endif /* expanded by -frewrite-includes */
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 127 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 127 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_swappable.h>
#endif /* expanded by -frewrite-includes */
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/integer_sequence.h>
#endif /* expanded by -frewrite-includes */
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/unreachable.h>
#endif /* expanded by -frewrite-includes */
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 137 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdexcept expanded by -frewrite-includes */
#include <stdexcept>
#else /* stdexcept expanded by -frewrite-includes */
# 137 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_STDEXCEPT
#define _LIBCPP_STDEXCEPT

/*
    stdexcept synopsis

namespace std
{

class logic_error;
    class domain_error;
    class invalid_argument;
    class length_error;
    class out_of_range;
class runtime_error;
    class range_error;
    class overflow_error;
    class underflow_error;

for each class xxx_error:

class xxx_error : public exception // at least indirectly
{
public:
    explicit xxx_error(const string& what_arg);
    explicit xxx_error(const char*   what_arg);

    virtual const char* what() const noexcept // returns what_arg
};

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
#if 0 /* expanded by -frewrite-includes */
#include <__exception/exception.h>
#endif /* expanded by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
#if 0 /* expanded by -frewrite-includes */
#include <__verbose_abort>
#endif /* expanded by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd>  // for string forward decl
#endif /* expanded by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
#endif
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#ifndef _LIBCPP_ABI_VCRUNTIME
class _LIBCPP_HIDDEN __libcpp_refstring
{
    const char* __imp_;

    bool __uses_refcount() const;
public:
    explicit __libcpp_refstring(const char* __msg);
    __libcpp_refstring(const __libcpp_refstring& __s) _NOEXCEPT;
    __libcpp_refstring& operator=(const __libcpp_refstring& __s) _NOEXCEPT;
    ~__libcpp_refstring();

    _LIBCPP_HIDE_FROM_ABI const char* c_str() const _NOEXCEPT {return __imp_;}
};
#endif // !_LIBCPP_ABI_VCRUNTIME
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3

_LIBCPP_END_NAMESPACE_STD

namespace std  // purposefully not using versioning namespace
{

class _LIBCPP_EXPORTED_FROM_ABI logic_error
    : public exception
{
#ifndef _LIBCPP_ABI_VCRUNTIME
private:
    _VSTD::__libcpp_refstring __imp_;
public:
    explicit logic_error(const string&);
    explicit logic_error(const char*);

    logic_error(const logic_error&) _NOEXCEPT;
    logic_error& operator=(const logic_error&) _NOEXCEPT;

    ~logic_error() _NOEXCEPT override;

    const char* what() const _NOEXCEPT override;
#else
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
public:
    explicit logic_error(const _VSTD::string&); // Symbol uses versioned std::string
    _LIBCPP_INLINE_VISIBILITY explicit logic_error(const char* __s) : exception(__s) {}
#endif
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
};

class _LIBCPP_EXPORTED_FROM_ABI runtime_error
    : public exception
{
#ifndef _LIBCPP_ABI_VCRUNTIME
private:
    _VSTD::__libcpp_refstring __imp_;
public:
    explicit runtime_error(const string&);
    explicit runtime_error(const char*);

    runtime_error(const runtime_error&) _NOEXCEPT;
    runtime_error& operator=(const runtime_error&) _NOEXCEPT;

    ~runtime_error() _NOEXCEPT override;

    const char* what() const _NOEXCEPT override;
#else
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
public:
   explicit runtime_error(const _VSTD::string&); // Symbol uses versioned std::string
   _LIBCPP_INLINE_VISIBILITY explicit runtime_error(const char* __s) : exception(__s) {}
#endif // _LIBCPP_ABI_VCRUNTIME
# 121 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
};

class _LIBCPP_EXPORTED_FROM_ABI domain_error
    : public logic_error
{
public:
    _LIBCPP_INLINE_VISIBILITY explicit domain_error(const string& __s) : logic_error(__s) {}
    _LIBCPP_INLINE_VISIBILITY explicit domain_error(const char* __s)   : logic_error(__s) {}

#ifndef _LIBCPP_ABI_VCRUNTIME
    _LIBCPP_HIDE_FROM_ABI domain_error(const domain_error&) _NOEXCEPT = default;
    _LIBCPP_HIDE_FROM_ABI domain_error& operator=(const domain_error&) _NOEXCEPT = default;
    ~domain_error() _NOEXCEPT override;
#endif
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
};

class _LIBCPP_EXPORTED_FROM_ABI invalid_argument
    : public logic_error
{
public:
    _LIBCPP_INLINE_VISIBILITY explicit invalid_argument(const string& __s) : logic_error(__s) {}
    _LIBCPP_INLINE_VISIBILITY explicit invalid_argument(const char* __s)   : logic_error(__s) {}

#ifndef _LIBCPP_ABI_VCRUNTIME
    _LIBCPP_HIDE_FROM_ABI invalid_argument(const invalid_argument&) _NOEXCEPT = default;
    _LIBCPP_HIDE_FROM_ABI invalid_argument& operator=(const invalid_argument&) _NOEXCEPT = default;
    ~invalid_argument() _NOEXCEPT override;
#endif
# 149 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
};

class _LIBCPP_EXPORTED_FROM_ABI length_error
    : public logic_error
{
public:
    _LIBCPP_INLINE_VISIBILITY explicit length_error(const string& __s) : logic_error(__s) {}
    _LIBCPP_INLINE_VISIBILITY explicit length_error(const char* __s)   : logic_error(__s) {}
#ifndef _LIBCPP_ABI_VCRUNTIME
    _LIBCPP_HIDE_FROM_ABI length_error(const length_error&) _NOEXCEPT = default;
    _LIBCPP_HIDE_FROM_ABI length_error& operator=(const length_error&) _NOEXCEPT = default;
    ~length_error() _NOEXCEPT override;
#endif
# 162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
};

class _LIBCPP_EXPORTED_FROM_ABI out_of_range
    : public logic_error
{
public:
    _LIBCPP_INLINE_VISIBILITY explicit out_of_range(const string& __s) : logic_error(__s) {}
    _LIBCPP_INLINE_VISIBILITY explicit out_of_range(const char* __s)   : logic_error(__s) {}

#ifndef _LIBCPP_ABI_VCRUNTIME
    _LIBCPP_HIDE_FROM_ABI out_of_range(const out_of_range&) _NOEXCEPT = default;
    _LIBCPP_HIDE_FROM_ABI out_of_range& operator=(const out_of_range&) _NOEXCEPT = default;
    ~out_of_range() _NOEXCEPT override;
#endif
# 176 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
};

class _LIBCPP_EXPORTED_FROM_ABI range_error
    : public runtime_error
{
public:
    _LIBCPP_INLINE_VISIBILITY explicit range_error(const string& __s) : runtime_error(__s) {}
    _LIBCPP_INLINE_VISIBILITY explicit range_error(const char* __s)   : runtime_error(__s) {}

#ifndef _LIBCPP_ABI_VCRUNTIME
    _LIBCPP_HIDE_FROM_ABI range_error(const range_error&) _NOEXCEPT = default;
    _LIBCPP_HIDE_FROM_ABI range_error& operator=(const range_error&) _NOEXCEPT = default;
    ~range_error() _NOEXCEPT override;
#endif
# 190 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
};

class _LIBCPP_EXPORTED_FROM_ABI overflow_error
    : public runtime_error
{
public:
    _LIBCPP_INLINE_VISIBILITY explicit overflow_error(const string& __s) : runtime_error(__s) {}
    _LIBCPP_INLINE_VISIBILITY explicit overflow_error(const char* __s)   : runtime_error(__s) {}

#ifndef _LIBCPP_ABI_VCRUNTIME
    _LIBCPP_HIDE_FROM_ABI overflow_error(const overflow_error&) _NOEXCEPT = default;
    _LIBCPP_HIDE_FROM_ABI overflow_error& operator=(const overflow_error&) _NOEXCEPT = default;
    ~overflow_error() _NOEXCEPT override;
#endif
# 204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
};

class _LIBCPP_EXPORTED_FROM_ABI underflow_error
    : public runtime_error
{
public:
    _LIBCPP_INLINE_VISIBILITY explicit underflow_error(const string& __s) : runtime_error(__s) {}
    _LIBCPP_INLINE_VISIBILITY explicit underflow_error(const char* __s)   : runtime_error(__s) {}

#ifndef _LIBCPP_ABI_VCRUNTIME
    _LIBCPP_HIDE_FROM_ABI underflow_error(const underflow_error&) _NOEXCEPT = default;
    _LIBCPP_HIDE_FROM_ABI underflow_error& operator=(const underflow_error&) _NOEXCEPT = default;
    ~underflow_error() _NOEXCEPT override;
#endif
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
};

} // namespace std

_LIBCPP_BEGIN_NAMESPACE_STD

// in the dylib
_LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_runtime_error(const char*);

_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_logic_error(const char*__msg)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    throw logic_error(__msg);
#else
# 233 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
    _LIBCPP_VERBOSE_ABORT("logic_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
# 235 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
}

_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_domain_error(const char*__msg)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    throw domain_error(__msg);
#else
# 243 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
    _LIBCPP_VERBOSE_ABORT("domain_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
# 245 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
}

_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_invalid_argument(const char*__msg)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    throw invalid_argument(__msg);
#else
# 253 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
    _LIBCPP_VERBOSE_ABORT("invalid_argument was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
# 255 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
}

_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_length_error(const char*__msg)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    throw length_error(__msg);
#else
# 263 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
    _LIBCPP_VERBOSE_ABORT("length_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
# 265 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
}

_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_out_of_range(const char*__msg)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    throw out_of_range(__msg);
#else
# 273 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
    _LIBCPP_VERBOSE_ABORT("out_of_range was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
# 275 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
}

_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_range_error(const char*__msg)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    throw range_error(__msg);
#else
# 283 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
    _LIBCPP_VERBOSE_ABORT("range_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
# 285 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
}

_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_overflow_error(const char*__msg)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    throw overflow_error(__msg);
#else
# 293 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
    _LIBCPP_VERBOSE_ABORT("overflow_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
# 295 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
}

_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_underflow_error(const char*__msg)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    throw underflow_error(__msg);
#else
# 303 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
    _LIBCPP_VERBOSE_ABORT("underflow_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
# 305 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
}

_LIBCPP_END_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 310 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 310 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
# 311 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
#if 0 /* expanded by -frewrite-includes */
#  include <exception>
#endif /* expanded by -frewrite-includes */
# 311 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
# 312 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
#endif
# 313 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3

#endif // _LIBCPP_STDEXCEPT
# 315 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdexcept" 3
#endif /* stdexcept expanded by -frewrite-includes */
# 138 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 138 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3

// standard-mandated includes

// [iterator.range]
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/access.h>
#endif /* expanded by -frewrite-includes */
# 143 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 144 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/data.h>
#endif /* expanded by -frewrite-includes */
# 144 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/empty.h>
#endif /* expanded by -frewrite-includes */
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_access.h>
#endif /* expanded by -frewrite-includes */
# 146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 147 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/size.h>
#endif /* expanded by -frewrite-includes */
# 147 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3

// [array.syn]
#if 0 /* expanded by -frewrite-includes */
#include <compare>
#endif /* expanded by -frewrite-includes */
# 150 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 151 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 151 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3

// [tuple.helper]
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_element.h>
#endif /* expanded by -frewrite-includes */
# 154 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 155 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_size.h>
#endif /* expanded by -frewrite-includes */
# 155 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 156 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 159 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#endif
# 160 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, size_t _Size>
struct _LIBCPP_TEMPLATE_VIS array
{
    // types:
    typedef array __self;
    typedef _Tp                                   value_type;
    typedef value_type&                           reference;
    typedef const value_type&                     const_reference;
    typedef value_type*                           iterator;
    typedef const value_type*                     const_iterator;
    typedef value_type*                           pointer;
    typedef const value_type*                     const_pointer;
    typedef size_t                                size_type;
    typedef ptrdiff_t                             difference_type;
    typedef _VSTD::reverse_iterator<iterator>       reverse_iterator;
    typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;

    _Tp __elems_[_Size];

    // No explicit construct/copy/destroy for aggregate type
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    void fill(const value_type& __u) {
        _VSTD::fill_n(data(), _Size, __u);
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    void swap(array& __a) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) {
        _VSTD::swap_ranges(data(), data() + _Size, __a.data());
    }

    // iterators:
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    iterator begin() _NOEXCEPT {return iterator(data());}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_iterator begin() const _NOEXCEPT {return const_iterator(data());}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    iterator end() _NOEXCEPT {return iterator(data() + _Size);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_iterator end() const _NOEXCEPT {return const_iterator(data() + _Size);}

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator rbegin() _NOEXCEPT {return reverse_iterator(end());}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_reverse_iterator rbegin() const _NOEXCEPT {return const_reverse_iterator(end());}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator rend() _NOEXCEPT {return reverse_iterator(begin());}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_reverse_iterator rend() const _NOEXCEPT {return const_reverse_iterator(begin());}

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_iterator cbegin() const _NOEXCEPT {return begin();}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_iterator cend() const _NOEXCEPT {return end();}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_reverse_iterator crend() const _NOEXCEPT {return rend();}

    // capacity:
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR size_type size() const _NOEXCEPT {return _Size;}
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR size_type max_size() const _NOEXCEPT {return _Size;}
    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR bool empty() const _NOEXCEPT {return _Size == 0;}

    // element access:
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reference operator[](size_type __n) _NOEXCEPT {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n < _Size, "out-of-bounds access in std::array<T, N>");
        return __elems_[__n];
    }
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    const_reference operator[](size_type __n) const _NOEXCEPT {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n < _Size, "out-of-bounds access in std::array<T, N>");
        return __elems_[__n];
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference at(size_type __n)
    {
        if (__n >= _Size)
            __throw_out_of_range("array::at");
        return __elems_[__n];
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference at(size_type __n) const
    {
        if (__n >= _Size)
            __throw_out_of_range("array::at");
        return __elems_[__n];
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 reference front()             _NOEXCEPT {return (*this)[0];}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference front() const _NOEXCEPT {return (*this)[0];}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 reference back()              _NOEXCEPT {return (*this)[_Size - 1];}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference back() const  _NOEXCEPT {return (*this)[_Size - 1];}

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    value_type* data() _NOEXCEPT {return __elems_;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const value_type* data() const _NOEXCEPT {return __elems_;}
};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0>
{
    // types:
    typedef array __self;
    typedef _Tp                                   value_type;
    typedef value_type&                           reference;
    typedef const value_type&                     const_reference;
    typedef value_type*                           iterator;
    typedef const value_type*                     const_iterator;
    typedef value_type*                           pointer;
    typedef const value_type*                     const_pointer;
    typedef size_t                                size_type;
    typedef ptrdiff_t                             difference_type;
    typedef _VSTD::reverse_iterator<iterator>       reverse_iterator;
    typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;

    typedef __conditional_t<is_const<_Tp>::value, const char, char> _CharType;

    struct  _ArrayInStructT { _Tp __data_[1]; };
    _ALIGNAS_TYPE(_ArrayInStructT) _CharType __elems_[sizeof(_ArrayInStructT)];

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    value_type* data() _NOEXCEPT {return nullptr;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const value_type* data() const _NOEXCEPT {return nullptr;}

    // No explicit construct/copy/destroy for aggregate type
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    void fill(const value_type&) {
      static_assert(!is_const<_Tp>::value,
                    "cannot fill zero-sized array of type 'const T'");
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    void swap(array&) _NOEXCEPT {
      static_assert(!is_const<_Tp>::value,
                    "cannot swap zero-sized array of type 'const T'");
    }

    // iterators:
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    iterator begin() _NOEXCEPT {return iterator(data());}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_iterator begin() const _NOEXCEPT {return const_iterator(data());}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    iterator end() _NOEXCEPT {return iterator(data());}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_iterator end() const _NOEXCEPT {return const_iterator(data());}

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator rbegin() _NOEXCEPT {return reverse_iterator(end());}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_reverse_iterator rbegin() const _NOEXCEPT {return const_reverse_iterator(end());}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reverse_iterator rend() _NOEXCEPT {return reverse_iterator(begin());}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_reverse_iterator rend() const _NOEXCEPT {return const_reverse_iterator(begin());}

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_iterator cbegin() const _NOEXCEPT {return begin();}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_iterator cend() const _NOEXCEPT {return end();}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    const_reverse_iterator crend() const _NOEXCEPT {return rend();}

    // capacity:
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR size_type size() const _NOEXCEPT {return 0; }
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR size_type max_size() const _NOEXCEPT {return 0;}
    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR bool empty() const _NOEXCEPT {return true;}

    // element access:
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reference operator[](size_type) _NOEXCEPT {
      _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
      __libcpp_unreachable();
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    const_reference operator[](size_type) const _NOEXCEPT {
      _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
      __libcpp_unreachable();
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reference at(size_type) {
      __throw_out_of_range("array<T, 0>::at");
      __libcpp_unreachable();
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    const_reference at(size_type) const {
      __throw_out_of_range("array<T, 0>::at");
      __libcpp_unreachable();
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reference front() _NOEXCEPT {
      _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(false, "cannot call array<T, 0>::front() on a zero-sized array");
      __libcpp_unreachable();
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    const_reference front() const _NOEXCEPT {
      _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(false, "cannot call array<T, 0>::front() on a zero-sized array");
      __libcpp_unreachable();
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
    reference back() _NOEXCEPT {
      _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(false, "cannot call array<T, 0>::back() on a zero-sized array");
      __libcpp_unreachable();
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    const_reference back() const _NOEXCEPT {
      _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(false, "cannot call array<T, 0>::back() on a zero-sized array");
      __libcpp_unreachable();
    }
};


#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 394 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
template<class _Tp, class... _Args,
         class = enable_if_t<__all<_IsSame<_Tp, _Args>::value...>::value>
         >
array(_Tp, _Args...)
  -> array<_Tp, 1 + sizeof...(_Args)>;
#endif
# 400 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3

template <class _Tp, size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR_SINCE_CXX20 bool
operator==(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
{
    return _VSTD::equal(__x.begin(), __x.end(), __y.begin());
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 410 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3

template <class _Tp, size_t _Size>
inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) {
    return !(__x == __y);
}

template <class _Tp, size_t _Size>
inline _LIBCPP_HIDE_FROM_ABI bool operator<(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) {
    return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
}

template <class _Tp, size_t _Size>
inline _LIBCPP_HIDE_FROM_ABI bool operator>(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) {
    return __y < __x;
}

template <class _Tp, size_t _Size>
inline _LIBCPP_HIDE_FROM_ABI bool operator<=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) {
    return !(__y < __x);
}

template <class _Tp, size_t _Size>
inline _LIBCPP_HIDE_FROM_ABI bool operator>=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) {
    return !(__x < __y);
}

#else // _LIBCPP_STD_VER <= 17
# 437 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3

template <class _Tp, size_t _Size>
_LIBCPP_HIDE_FROM_ABI constexpr __synth_three_way_result<_Tp>
operator<=>(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) {
    return std::lexicographical_compare_three_way(
        __x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way<_Tp, _Tp>);
}

#endif // _LIBCPP_STD_VER <= 17
# 446 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3

template <class _Tp, size_t _Size, __enable_if_t<_Size == 0 || __is_swappable<_Tp>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
swap(array<_Tp, _Size>& __x, array<_Tp, _Size>& __y)
                                  _NOEXCEPT_(noexcept(__x.swap(__y)))
{
    __x.swap(__y);
}

template <class _Tp, size_t _Size>
struct _LIBCPP_TEMPLATE_VIS tuple_size<array<_Tp, _Size> >
    : public integral_constant<size_t, _Size> {};

template <size_t _Ip, class _Tp, size_t _Size>
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, array<_Tp, _Size> >
{
    static_assert(_Ip < _Size, "Index out of bounds in std::tuple_element<> (std::array)");
    typedef _Tp type;
};

template <size_t _Ip, class _Tp, size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp&
get(array<_Tp, _Size>& __a) _NOEXCEPT
{
    static_assert(_Ip < _Size, "Index out of bounds in std::get<> (std::array)");
    return __a.__elems_[_Ip];
}

template <size_t _Ip, class _Tp, size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&
get(const array<_Tp, _Size>& __a) _NOEXCEPT
{
    static_assert(_Ip < _Size, "Index out of bounds in std::get<> (const std::array)");
    return __a.__elems_[_Ip];
}

template <size_t _Ip, class _Tp, size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp&&
get(array<_Tp, _Size>&& __a) _NOEXCEPT
{
    static_assert(_Ip < _Size, "Index out of bounds in std::get<> (std::array &&)");
    return _VSTD::move(__a.__elems_[_Ip]);
}

template <size_t _Ip, class _Tp, size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&&
get(const array<_Tp, _Size>&& __a) _NOEXCEPT
{
    static_assert(_Ip < _Size, "Index out of bounds in std::get<> (const std::array &&)");
    return _VSTD::move(__a.__elems_[_Ip]);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 504 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3

template <typename _Tp, size_t _Size, size_t... _Index>
_LIBCPP_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
__to_array_lvalue_impl(_Tp (&__arr)[_Size], index_sequence<_Index...>) {
  return {{__arr[_Index]...}};
}

template <typename _Tp, size_t _Size, size_t... _Index>
_LIBCPP_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
__to_array_rvalue_impl(_Tp(&&__arr)[_Size], index_sequence<_Index...>) {
  return {{_VSTD::move(__arr[_Index])...}};
}

template <typename _Tp, size_t _Size>
_LIBCPP_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
to_array(_Tp (&__arr)[_Size]) noexcept(is_nothrow_constructible_v<_Tp, _Tp&>) {
  static_assert(
      !is_array_v<_Tp>,
      "[array.creation]/1: to_array does not accept multidimensional arrays.");
  static_assert(
      is_constructible_v<_Tp, _Tp&>,
      "[array.creation]/1: to_array requires copy constructible elements.");
  return _VSTD::__to_array_lvalue_impl(__arr, make_index_sequence<_Size>());
}

template <typename _Tp, size_t _Size>
_LIBCPP_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
to_array(_Tp(&&__arr)[_Size]) noexcept(is_nothrow_move_constructible_v<_Tp>) {
  static_assert(
      !is_array_v<_Tp>,
      "[array.creation]/4: to_array does not accept multidimensional arrays.");
  static_assert(
      is_move_constructible_v<_Tp>,
      "[array.creation]/4: to_array requires move constructible elements.");
  return _VSTD::__to_array_rvalue_impl(_VSTD::move(__arr),
                                       make_index_sequence<_Size>());
}

#endif // _LIBCPP_STD_VER >= 20
# 543 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3

_LIBCPP_END_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 547 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#  include <algorithm>
#endif /* expanded by -frewrite-includes */
# 547 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 548 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 548 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 549 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 549 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 550 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iterator>
#endif /* expanded by -frewrite-includes */
# 550 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 551 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 551 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 552 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#if 0 /* expanded by -frewrite-includes */
#  include <utility>
#endif /* expanded by -frewrite-includes */
# 552 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
# 553 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#endif
# 554 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3

#endif // _LIBCPP_ARRAY
# 556 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/array" 3
#endif /* array expanded by -frewrite-includes */
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h"
# 10 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* optional expanded by -frewrite-includes */
#include <optional>
#else /* optional expanded by -frewrite-includes */
# 10 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_OPTIONAL
#define _LIBCPP_OPTIONAL

/*
    optional synopsis

// C++1z

namespace std {
  // [optional.optional], class template optional
  template <class T>
    class optional;

  template<class T>
    concept is-derived-from-optional = requires(const T& t) {       // exposition only
      []<class U>(const optional<U>&){ }(t);
    };

  // [optional.nullopt], no-value state indicator
  struct nullopt_t{see below };
  inline constexpr nullopt_t nullopt(unspecified );

  // [optional.bad.access], class bad_optional_access
  class bad_optional_access;

  // [optional.relops], relational operators
  template <class T, class U>
    constexpr bool operator==(const optional<T>&, const optional<U>&);
  template <class T, class U>
    constexpr bool operator!=(const optional<T>&, const optional<U>&);
  template <class T, class U>
    constexpr bool operator<(const optional<T>&, const optional<U>&);
  template <class T, class U>
    constexpr bool operator>(const optional<T>&, const optional<U>&);
  template <class T, class U>
    constexpr bool operator<=(const optional<T>&, const optional<U>&);
  template <class T, class U>
    constexpr bool operator>=(const optional<T>&, const optional<U>&);
  template<class T, three_way_comparable_with<T> U>
    constexpr compare_three_way_result_t<T, U>
      operator<=>(const optional<T>&, const optional<U>&); // since C++20

  // [optional.nullops], comparison with nullopt
  template<class T> constexpr bool operator==(const optional<T>&, nullopt_t) noexcept;
  template<class T> constexpr bool operator==(nullopt_t, const optional<T>&) noexcept; // until C++17
  template<class T> constexpr bool operator!=(const optional<T>&, nullopt_t) noexcept; // until C++17
  template<class T> constexpr bool operator!=(nullopt_t, const optional<T>&) noexcept; // until C++17
  template<class T> constexpr bool operator<(const optional<T>&, nullopt_t) noexcept;  // until C++17
  template<class T> constexpr bool operator<(nullopt_t, const optional<T>&) noexcept;  // until C++17
  template<class T> constexpr bool operator<=(const optional<T>&, nullopt_t) noexcept; // until C++17
  template<class T> constexpr bool operator<=(nullopt_t, const optional<T>&) noexcept; // until C++17
  template<class T> constexpr bool operator>(const optional<T>&, nullopt_t) noexcept;  // until C++17
  template<class T> constexpr bool operator>(nullopt_t, const optional<T>&) noexcept;  // until C++17
  template<class T> constexpr bool operator>=(const optional<T>&, nullopt_t) noexcept; // until C++17
  template<class T> constexpr bool operator>=(nullopt_t, const optional<T>&) noexcept; // until C++17
  template<class T>
    constexpr strong_ordering operator<=>(const optional<T>&, nullopt_t) noexcept;     // since C++20

  // [optional.comp.with.t], comparison with T
  template<class T, class U> constexpr bool operator==(const optional<T>&, const U&);
  template<class T, class U> constexpr bool operator==(const T&, const optional<U>&);
  template<class T, class U> constexpr bool operator!=(const optional<T>&, const U&);
  template<class T, class U> constexpr bool operator!=(const T&, const optional<U>&);
  template<class T, class U> constexpr bool operator<(const optional<T>&, const U&);
  template<class T, class U> constexpr bool operator<(const T&, const optional<U>&);
  template<class T, class U> constexpr bool operator<=(const optional<T>&, const U&);
  template<class T, class U> constexpr bool operator<=(const T&, const optional<U>&);
  template<class T, class U> constexpr bool operator>(const optional<T>&, const U&);
  template<class T, class U> constexpr bool operator>(const T&, const optional<U>&);
  template<class T, class U> constexpr bool operator>=(const optional<T>&, const U&);
  template<class T, class U> constexpr bool operator>=(const T&, const optional<U>&);
  template<class T, class U>
      requires (!is-derived-from-optional<U>) && three_way_comparable_with<T, U>
    constexpr compare_three_way_result_t<T, U>
      operator<=>(const optional<T>&, const U&);                                       // since C++20

  // [optional.specalg], specialized algorithms
  template<class T>
    void swap(optional<T>&, optional<T>&) noexcept(see below ); // constexpr in C++20

  template<class T>
    constexpr optional<see below > make_optional(T&&);
  template<class T, class... Args>
    constexpr optional<T> make_optional(Args&&... args);
  template<class T, class U, class... Args>
    constexpr optional<T> make_optional(initializer_list<U> il, Args&&... args);

  // [optional.hash], hash support
  template<class T> struct hash;
  template<class T> struct hash<optional<T>>;

  template<class T>
  class optional {
  public:
    using value_type = T;

    // [optional.ctor], constructors
    constexpr optional() noexcept;
    constexpr optional(nullopt_t) noexcept;
    constexpr optional(const optional &);
    constexpr optional(optional &&) noexcept(see below);
    template<class... Args>
      constexpr explicit optional(in_place_t, Args &&...);
    template<class U, class... Args>
      constexpr explicit optional(in_place_t, initializer_list<U>, Args &&...);
    template<class U = T>
      constexpr explicit(see-below) optional(U &&);
    template<class U>
      explicit(see-below) optional(const optional<U> &);                          // constexpr in C++20
    template<class U>
      explicit(see-below) optional(optional<U> &&);                               // constexpr in C++20

    // [optional.dtor], destructor
    ~optional(); // constexpr in C++20

    // [optional.assign], assignment
    optional &operator=(nullopt_t) noexcept;                                      // constexpr in C++20
    constexpr optional &operator=(const optional &);
    constexpr optional &operator=(optional &&) noexcept(see below);
    template<class U = T> optional &operator=(U &&);                              // constexpr in C++20
    template<class U> optional &operator=(const optional<U> &);                   // constexpr in C++20
    template<class U> optional &operator=(optional<U> &&);                        // constexpr in C++20
    template<class... Args> T& emplace(Args &&...);                               // constexpr in C++20
    template<class U, class... Args> T& emplace(initializer_list<U>, Args &&...); // constexpr in C++20

    // [optional.swap], swap
    void swap(optional &) noexcept(see below ); // constexpr in C++20

    // [optional.observe], observers
    constexpr T const *operator->() const;
    constexpr T *operator->();
    constexpr T const &operator*() const &;
    constexpr T &operator*() &;
    constexpr T &&operator*() &&;
    constexpr const T &&operator*() const &&;
    constexpr explicit operator bool() const noexcept;
    constexpr bool has_value() const noexcept;
    constexpr T const &value() const &;
    constexpr T &value() &;
    constexpr T &&value() &&;
    constexpr const T &&value() const &&;
    template<class U> constexpr T value_or(U &&) const &;
    template<class U> constexpr T value_or(U &&) &&;

    // [optional.monadic], monadic operations
    template<class F> constexpr auto and_then(F&& f) &;         // since C++23
    template<class F> constexpr auto and_then(F&& f) &&;        // since C++23
    template<class F> constexpr auto and_then(F&& f) const&;    // since C++23
    template<class F> constexpr auto and_then(F&& f) const&&;   // since C++23
    template<class F> constexpr auto transform(F&& f) &;        // since C++23
    template<class F> constexpr auto transform(F&& f) &&;       // since C++23
    template<class F> constexpr auto transform(F&& f) const&;   // since C++23
    template<class F> constexpr auto transform(F&& f) const&&;  // since C++23
    template<class F> constexpr optional or_else(F&& f) &&;     // since C++23
    template<class F> constexpr optional or_else(F&& f) const&; // since C++23

    // [optional.mod], modifiers
    void reset() noexcept;                                      // constexpr in C++20

  private:
    T *val;         // exposition only
  };

  template<class T>
    optional(T) -> optional<T>;

} // namespace std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 180 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 181 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 181 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 182 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/compare_three_way_result.h>
#endif /* expanded by -frewrite-includes */
# 182 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 183 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/three_way_comparable.h>
#endif /* expanded by -frewrite-includes */
# 183 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 184 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/invocable.h>
#endif /* expanded by -frewrite-includes */
# 184 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 185 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 185 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 186 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/hash.h>
#endif /* expanded by -frewrite-includes */
# 186 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 187 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 187 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 188 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* reference_wrapper.h expanded by -frewrite-includes */
#include <__functional/reference_wrapper.h>
#else /* reference_wrapper.h expanded by -frewrite-includes */
# 188 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_REFERENCE_WRAPPER_H
#define _LIBCPP___FUNCTIONAL_REFERENCE_WRAPPER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* weak_result_type.h expanded by -frewrite-includes */
#include <__functional/weak_result_type.h>
#else /* weak_result_type.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_WEAK_RESULT_TYPE_H
#define _LIBCPP___FUNCTIONAL_WEAK_RESULT_TYPE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/binary_function.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct __has_result_type
{
private:
    template <class _Up> static false_type __test(...);
    template <class _Up> static true_type __test(typename _Up::result_type* = 0);
public:
    static const bool value = decltype(__test<_Tp>(0))::value;
};

// __weak_result_type

template <class _Tp>
struct __derives_from_unary_function
{
private:
    struct __two {char __lx; char __lxx;};
    static __two __test(...);
    template <class _Ap, class _Rp>
        static __unary_function<_Ap, _Rp>
        __test(const volatile __unary_function<_Ap, _Rp>*);

public:
    static const bool value = !is_same<decltype(__test((_Tp*)0)), __two>::value;
    typedef decltype(__test((_Tp*)0)) type;
};

template <class _Tp>
struct __derives_from_binary_function
{
private:
    struct __two {char __lx; char __lxx;};
    static __two __test(...);
    template <class _A1, class _A2, class _Rp>
        static __binary_function<_A1, _A2, _Rp>
        __test(const volatile __binary_function<_A1, _A2, _Rp>*);

public:
    static const bool value = !is_same<decltype(__test((_Tp*)0)), __two>::value;
    typedef decltype(__test((_Tp*)0)) type;
};

template <class _Tp, bool = __derives_from_unary_function<_Tp>::value>
struct __maybe_derive_from_unary_function  // bool is true
    : public __derives_from_unary_function<_Tp>::type
{
};

template <class _Tp>
struct __maybe_derive_from_unary_function<_Tp, false>
{
};

template <class _Tp, bool = __derives_from_binary_function<_Tp>::value>
struct __maybe_derive_from_binary_function  // bool is true
    : public __derives_from_binary_function<_Tp>::type
{
};

template <class _Tp>
struct __maybe_derive_from_binary_function<_Tp, false>
{
};

template <class _Tp, bool = __has_result_type<_Tp>::value>
struct __weak_result_type_imp // bool is true
    : public __maybe_derive_from_unary_function<_Tp>,
      public __maybe_derive_from_binary_function<_Tp>
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = typename _Tp::result_type;
#endif
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
};

template <class _Tp>
struct __weak_result_type_imp<_Tp, false>
    : public __maybe_derive_from_unary_function<_Tp>,
      public __maybe_derive_from_binary_function<_Tp>
{
};

template <class _Tp>
struct __weak_result_type
    : public __weak_result_type_imp<_Tp>
{
};

// 0 argument case

template <class _Rp>
struct __weak_result_type<_Rp ()>
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
#endif
# 122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
};

template <class _Rp>
struct __weak_result_type<_Rp (&)()>
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
#endif
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
};

template <class _Rp>
struct __weak_result_type<_Rp (*)()>
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
#endif
# 138 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
};

// 1 argument case

template <class _Rp, class _A1>
struct __weak_result_type<_Rp (_A1)>
    : public __unary_function<_A1, _Rp>
{
};

template <class _Rp, class _A1>
struct __weak_result_type<_Rp (&)(_A1)>
    : public __unary_function<_A1, _Rp>
{
};

template <class _Rp, class _A1>
struct __weak_result_type<_Rp (*)(_A1)>
    : public __unary_function<_A1, _Rp>
{
};

template <class _Rp, class _Cp>
struct __weak_result_type<_Rp (_Cp::*)()>
    : public __unary_function<_Cp*, _Rp>
{
};

template <class _Rp, class _Cp>
struct __weak_result_type<_Rp (_Cp::*)() const>
    : public __unary_function<const _Cp*, _Rp>
{
};

template <class _Rp, class _Cp>
struct __weak_result_type<_Rp (_Cp::*)() volatile>
    : public __unary_function<volatile _Cp*, _Rp>
{
};

template <class _Rp, class _Cp>
struct __weak_result_type<_Rp (_Cp::*)() const volatile>
    : public __unary_function<const volatile _Cp*, _Rp>
{
};

// 2 argument case

template <class _Rp, class _A1, class _A2>
struct __weak_result_type<_Rp (_A1, _A2)>
    : public __binary_function<_A1, _A2, _Rp>
{
};

template <class _Rp, class _A1, class _A2>
struct __weak_result_type<_Rp (*)(_A1, _A2)>
    : public __binary_function<_A1, _A2, _Rp>
{
};

template <class _Rp, class _A1, class _A2>
struct __weak_result_type<_Rp (&)(_A1, _A2)>
    : public __binary_function<_A1, _A2, _Rp>
{
};

template <class _Rp, class _Cp, class _A1>
struct __weak_result_type<_Rp (_Cp::*)(_A1)>
    : public __binary_function<_Cp*, _A1, _Rp>
{
};

template <class _Rp, class _Cp, class _A1>
struct __weak_result_type<_Rp (_Cp::*)(_A1) const>
    : public __binary_function<const _Cp*, _A1, _Rp>
{
};

template <class _Rp, class _Cp, class _A1>
struct __weak_result_type<_Rp (_Cp::*)(_A1) volatile>
    : public __binary_function<volatile _Cp*, _A1, _Rp>
{
};

template <class _Rp, class _Cp, class _A1>
struct __weak_result_type<_Rp (_Cp::*)(_A1) const volatile>
    : public __binary_function<const volatile _Cp*, _A1, _Rp>
{
};

// 3 or more arguments

template <class _Rp, class _A1, class _A2, class _A3, class ..._A4>
struct __weak_result_type<_Rp (_A1, _A2, _A3, _A4...)>
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 234 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
#endif
# 236 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
};

template <class _Rp, class _A1, class _A2, class _A3, class ..._A4>
struct __weak_result_type<_Rp (&)(_A1, _A2, _A3, _A4...)>
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 242 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
#endif
# 244 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
};

template <class _Rp, class _A1, class _A2, class _A3, class ..._A4>
struct __weak_result_type<_Rp (*)(_A1, _A2, _A3, _A4...)>
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 250 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
#endif
# 252 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
};

template <class _Rp, class _Cp, class _A1, class _A2, class ..._A3>
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...)>
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 258 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
#endif
# 260 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
};

template <class _Rp, class _Cp, class _A1, class _A2, class ..._A3>
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) const>
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 266 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
#endif
# 268 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
};

template <class _Rp, class _Cp, class _A1, class _A2, class ..._A3>
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) volatile>
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 274 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
#endif
# 276 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
};

template <class _Rp, class _Cp, class _A1, class _A2, class ..._A3>
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) const volatile>
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 282 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
#endif
# 284 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
};

template <class _Tp, class ..._Args>
struct __invoke_return
{
    typedef decltype(_VSTD::__invoke(std::declval<_Tp>(), std::declval<_Args>()...)) type;
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_WEAK_RESULT_TYPE_H
# 295 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/weak_result_type.h" 3
#endif /* weak_result_type.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
class _LIBCPP_TEMPLATE_VIS reference_wrapper : public __weak_result_type<_Tp>
{
public:
    // types
    typedef _Tp type;
private:
    type* __f_;

    static void __fun(_Tp&) _NOEXCEPT;
    static void __fun(_Tp&&) = delete;

public:
    template <class _Up, class = __enable_if_t<!__is_same_uncvref<_Up, reference_wrapper>::value, decltype(__fun(std::declval<_Up>())) > >
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(std::declval<_Up>()))) {
        type& __f = static_cast<_Up&&>(__u);
        __f_ = _VSTD::addressof(__f);
    }

    // access
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    operator type&() const _NOEXCEPT {return *__f_;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    type& get() const _NOEXCEPT {return *__f_;}

    // invoke
    template <class... _ArgTypes>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    typename __invoke_of<type&, _ArgTypes...>::type
    operator() (_ArgTypes&&... __args) const
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
        // Since is_nothrow_invocable requires C++17 LWG3764 is not backported
        // to earlier versions.
        noexcept(is_nothrow_invocable_v<_Tp&, _ArgTypes...>)
#endif
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
    {
        return std::__invoke(get(), std::forward<_ArgTypes>(__args)...);
    }
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
template <class _Tp>
reference_wrapper(_Tp&) -> reference_wrapper<_Tp>;
#endif
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
reference_wrapper<_Tp>
ref(_Tp& __t) _NOEXCEPT
{
    return reference_wrapper<_Tp>(__t);
}

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
reference_wrapper<_Tp>
ref(reference_wrapper<_Tp> __t) _NOEXCEPT
{
    return __t;
}

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
reference_wrapper<const _Tp>
cref(const _Tp& __t) _NOEXCEPT
{
    return reference_wrapper<const _Tp>(__t);
}

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
reference_wrapper<const _Tp>
cref(reference_wrapper<_Tp> __t) _NOEXCEPT
{
    return __t;
}

template <class _Tp> void ref(const _Tp&&) = delete;
template <class _Tp> void cref(const _Tp&&) = delete;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_REFERENCE_WRAPPER_H
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/reference_wrapper.h" 3
#endif /* reference_wrapper.h expanded by -frewrite-includes */
# 189 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 189 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 190 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 190 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 191 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/construct_at.h>
#endif /* expanded by -frewrite-includes */
# 191 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 192 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/sfinae_helpers.h>
#endif /* expanded by -frewrite-includes */
# 192 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 193 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_pointer.h>
#endif /* expanded by -frewrite-includes */
# 193 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 194 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 194 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 195 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conjunction.h>
#endif /* expanded by -frewrite-includes */
# 195 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 196 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 196 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 197 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/disjunction.h>
#endif /* expanded by -frewrite-includes */
# 197 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 198 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_array.h>
#endif /* expanded by -frewrite-includes */
# 198 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 199 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_assignable.h>
#endif /* expanded by -frewrite-includes */
# 199 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 200 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 200 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 201 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 201 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_assignable.h>
#endif /* expanded by -frewrite-includes */
# 202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 203 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 203 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_destructible.h>
#endif /* expanded by -frewrite-includes */
# 204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 205 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 205 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 207 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 207 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 210 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 210 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 211 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_scalar.h>
#endif /* expanded by -frewrite-includes */
# 211 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_swappable.h>
#endif /* expanded by -frewrite-includes */
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copy_assignable.h>
#endif /* expanded by -frewrite-includes */
# 213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 215 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_destructible.h>
#endif /* expanded by -frewrite-includes */
# 215 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 217 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 217 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/negation.h>
#endif /* expanded by -frewrite-includes */
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 219 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_const.h>
#endif /* expanded by -frewrite-includes */
# 219 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 221 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 221 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 222 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 222 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 223 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 223 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/in_place.h>
#endif /* expanded by -frewrite-includes */
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 225 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 225 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 226 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 226 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__verbose_abort>
#endif /* expanded by -frewrite-includes */
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 231 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 231 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 232 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

// standard-mandated includes

// [optional.syn]
#if 0 /* expanded by -frewrite-includes */
#include <compare>
#endif /* expanded by -frewrite-includes */
# 236 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 237 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 239 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 240 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#endif
# 241 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 243 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 244 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 2 3

namespace std  // purposefully not using versioning namespace
{

class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
    : public exception
{
public:
    _LIBCPP_HIDE_FROM_ABI bad_optional_access() _NOEXCEPT = default;
    _LIBCPP_HIDE_FROM_ABI bad_optional_access(const bad_optional_access&) _NOEXCEPT = default;
    _LIBCPP_HIDE_FROM_ABI bad_optional_access& operator=(const bad_optional_access&) _NOEXCEPT = default;
    // Get the key function ~bad_optional_access() into the dylib
    ~bad_optional_access() _NOEXCEPT override;
    const char* what() const _NOEXCEPT override;
};

} // namespace std

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 263 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

_LIBCPP_BEGIN_NAMESPACE_STD

_LIBCPP_NORETURN
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
void __throw_bad_optional_access() {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        throw bad_optional_access();
#else
# 273 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
    _LIBCPP_VERBOSE_ABORT("bad_optional_access was thrown in -fno-exceptions mode");
#endif
# 275 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
}

struct nullopt_t
{
    struct __secret_tag { explicit __secret_tag() = default; };
    _LIBCPP_INLINE_VISIBILITY constexpr explicit nullopt_t(__secret_tag, __secret_tag) noexcept {}
};

inline constexpr nullopt_t nullopt{nullopt_t::__secret_tag{}, nullopt_t::__secret_tag{}};

struct __optional_construct_from_invoke_tag {};

template <class _Tp, bool = is_trivially_destructible<_Tp>::value>
struct __optional_destruct_base;

template <class _Tp>
struct __optional_destruct_base<_Tp, false>
{
    typedef _Tp value_type;
    static_assert(is_object_v<value_type>,
        "instantiation of optional with a non-object type is undefined behavior");
    union
    {
        char __null_state_;
        value_type __val_;
    };
    bool __engaged_;

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 ~__optional_destruct_base()
    {
        if (__engaged_)
            __val_.~value_type();
    }

    _LIBCPP_INLINE_VISIBILITY
    constexpr __optional_destruct_base() noexcept
        :  __null_state_(),
           __engaged_(false) {}

    template <class... _Args>
    _LIBCPP_INLINE_VISIBILITY
    constexpr explicit __optional_destruct_base(in_place_t, _Args&&... __args)
        :  __val_(_VSTD::forward<_Args>(__args)...),
           __engaged_(true) {}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 322 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
  template <class _Fp, class... _Args>
  _LIBCPP_HIDE_FROM_ABI
  constexpr __optional_destruct_base(__optional_construct_from_invoke_tag, _Fp&& __f, _Args&&... __args)
      : __val_(_VSTD::invoke(_VSTD::forward<_Fp>(__f), _VSTD::forward<_Args>(__args)...)), __engaged_(true) {}
#endif
# 327 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 void reset() noexcept
    {
        if (__engaged_)
        {
            __val_.~value_type();
            __engaged_ = false;
        }
    }
};

template <class _Tp>
struct __optional_destruct_base<_Tp, true>
{
    typedef _Tp value_type;
    static_assert(is_object_v<value_type>,
        "instantiation of optional with a non-object type is undefined behavior");
    union
    {
        char __null_state_;
        value_type __val_;
    };
    bool __engaged_;

    _LIBCPP_INLINE_VISIBILITY
    constexpr __optional_destruct_base() noexcept
        :  __null_state_(),
           __engaged_(false) {}

    template <class... _Args>
    _LIBCPP_INLINE_VISIBILITY
    constexpr explicit __optional_destruct_base(in_place_t, _Args&&... __args)
        :  __val_(_VSTD::forward<_Args>(__args)...),
           __engaged_(true) {}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 364 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
  template <class _Fp, class... _Args>
  _LIBCPP_HIDE_FROM_ABI
  constexpr __optional_destruct_base(__optional_construct_from_invoke_tag, _Fp&& __f, _Args&&... __args)
      : __val_(_VSTD::invoke(_VSTD::forward<_Fp>(__f), _VSTD::forward<_Args>(__args)...)), __engaged_(true) {}
#endif
# 369 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 void reset() noexcept
    {
        if (__engaged_)
        {
            __engaged_ = false;
        }
    }
};

template <class _Tp, bool = is_reference<_Tp>::value>
struct __optional_storage_base : __optional_destruct_base<_Tp>
{
    using __base = __optional_destruct_base<_Tp>;
    using value_type = _Tp;
    using __base::__base;

    _LIBCPP_INLINE_VISIBILITY
    constexpr bool has_value() const noexcept
    {
        return this->__engaged_;
    }

    _LIBCPP_INLINE_VISIBILITY
    constexpr value_type& __get() & noexcept
    {
        return this->__val_;
    }
    _LIBCPP_INLINE_VISIBILITY
    constexpr const value_type& __get() const& noexcept
    {
        return this->__val_;
    }
    _LIBCPP_INLINE_VISIBILITY
    constexpr value_type&& __get() && noexcept
    {
        return _VSTD::move(this->__val_);
    }
    _LIBCPP_INLINE_VISIBILITY
    constexpr const value_type&& __get() const&& noexcept
    {
        return _VSTD::move(this->__val_);
    }

    template <class... _Args>
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 void __construct(_Args&&... __args)
    {
        _LIBCPP_ASSERT_INTERNAL(!has_value(), "__construct called for engaged __optional_storage");
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 420 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
        _VSTD::construct_at(_VSTD::addressof(this->__val_), _VSTD::forward<_Args>(__args)...);
#else
# 422 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
        ::new ((void*)_VSTD::addressof(this->__val_)) value_type(_VSTD::forward<_Args>(__args)...);
#endif
# 424 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
        this->__engaged_ = true;
    }

    template <class _That>
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 void __construct_from(_That&& __opt)
    {
        if (__opt.has_value())
            __construct(_VSTD::forward<_That>(__opt).__get());
    }

    template <class _That>
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 void __assign_from(_That&& __opt)
    {
        if (this->__engaged_ == __opt.has_value())
        {
            if (this->__engaged_)
                this->__val_ = _VSTD::forward<_That>(__opt).__get();
        }
        else
        {
            if (this->__engaged_)
                this->reset();
            else
                __construct(_VSTD::forward<_That>(__opt).__get());
        }
    }
};

// optional<T&> is currently required to be ill-formed. However, it may
// be allowed in the future. For this reason, it has already been implemented
// to ensure we can make the change in an ABI-compatible manner.
template <class _Tp>
struct __optional_storage_base<_Tp, true>
{
    using value_type = _Tp;
    using __raw_type = remove_reference_t<_Tp>;
    __raw_type* __value_;

    template <class _Up>
    static _LIBCPP_HIDE_FROM_ABI constexpr bool __can_bind_reference() {
        using _RawUp = __libcpp_remove_reference_t<_Up>;
        using _UpPtr = _RawUp*;
        using _RawTp = __libcpp_remove_reference_t<_Tp>;
        using _TpPtr = _RawTp*;
        using _CheckLValueArg = integral_constant<bool,
            (is_lvalue_reference<_Up>::value && is_convertible<_UpPtr, _TpPtr>::value)
        ||  is_same<_RawUp, reference_wrapper<_RawTp>>::value
        ||  is_same<_RawUp, reference_wrapper<__remove_const_t<_RawTp>>>::value
        >;
        return (is_lvalue_reference<_Tp>::value && _CheckLValueArg::value)
            || (is_rvalue_reference<_Tp>::value && !is_lvalue_reference<_Up>::value &&
                is_convertible<_UpPtr, _TpPtr>::value);
    }

    _LIBCPP_INLINE_VISIBILITY
    constexpr __optional_storage_base() noexcept
        :  __value_(nullptr) {}

    template <class _UArg>
    _LIBCPP_INLINE_VISIBILITY
    constexpr explicit __optional_storage_base(in_place_t, _UArg&& __uarg)
        :  __value_(_VSTD::addressof(__uarg))
    {
      static_assert(__can_bind_reference<_UArg>(),
        "Attempted to construct a reference element in tuple from a "
        "possible temporary");
    }

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 void reset() noexcept { __value_ = nullptr; }

    _LIBCPP_INLINE_VISIBILITY
    constexpr bool has_value() const noexcept
      { return __value_ != nullptr; }

    _LIBCPP_INLINE_VISIBILITY
    constexpr value_type& __get() const& noexcept
      { return *__value_; }

    _LIBCPP_INLINE_VISIBILITY
    constexpr value_type&& __get() const&& noexcept
      { return _VSTD::forward<value_type>(*__value_); }

    template <class _UArg>
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 void __construct(_UArg&& __val)
    {
        _LIBCPP_ASSERT_INTERNAL(!has_value(), "__construct called for engaged __optional_storage");
        static_assert(__can_bind_reference<_UArg>(),
            "Attempted to construct a reference element in tuple from a "
            "possible temporary");
        __value_ = _VSTD::addressof(__val);
    }

    template <class _That>
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 void __construct_from(_That&& __opt)
    {
        if (__opt.has_value())
            __construct(_VSTD::forward<_That>(__opt).__get());
    }

    template <class _That>
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 void __assign_from(_That&& __opt)
    {
        if (has_value() == __opt.has_value())
        {
            if (has_value())
                *__value_ = _VSTD::forward<_That>(__opt).__get();
        }
        else
        {
            if (has_value())
                reset();
            else
                __construct(_VSTD::forward<_That>(__opt).__get());
        }
    }
};

template <class _Tp, bool = is_trivially_copy_constructible<_Tp>::value>
struct __optional_copy_base : __optional_storage_base<_Tp>
{
    using __optional_storage_base<_Tp>::__optional_storage_base;
};

template <class _Tp>
struct __optional_copy_base<_Tp, false> : __optional_storage_base<_Tp>
{
    using __optional_storage_base<_Tp>::__optional_storage_base;

    _LIBCPP_INLINE_VISIBILITY
    __optional_copy_base() = default;

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 __optional_copy_base(const __optional_copy_base& __opt)
    {
        this->__construct_from(__opt);
    }

    _LIBCPP_INLINE_VISIBILITY
    __optional_copy_base(__optional_copy_base&&) = default;
    _LIBCPP_INLINE_VISIBILITY
    __optional_copy_base& operator=(const __optional_copy_base&) = default;
    _LIBCPP_INLINE_VISIBILITY
    __optional_copy_base& operator=(__optional_copy_base&&) = default;
};

template <class _Tp, bool = is_trivially_move_constructible<_Tp>::value>
struct __optional_move_base : __optional_copy_base<_Tp>
{
    using __optional_copy_base<_Tp>::__optional_copy_base;
};

template <class _Tp>
struct __optional_move_base<_Tp, false> : __optional_copy_base<_Tp>
{
    using value_type = _Tp;
    using __optional_copy_base<_Tp>::__optional_copy_base;

    _LIBCPP_INLINE_VISIBILITY
    __optional_move_base() = default;
    _LIBCPP_INLINE_VISIBILITY
    __optional_move_base(const __optional_move_base&) = default;

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 __optional_move_base(__optional_move_base&& __opt)
        noexcept(is_nothrow_move_constructible_v<value_type>)
    {
        this->__construct_from(_VSTD::move(__opt));
    }

    _LIBCPP_INLINE_VISIBILITY
    __optional_move_base& operator=(const __optional_move_base&) = default;
    _LIBCPP_INLINE_VISIBILITY
    __optional_move_base& operator=(__optional_move_base&&) = default;
};

template <class _Tp, bool =
    is_trivially_destructible<_Tp>::value &&
    is_trivially_copy_constructible<_Tp>::value &&
    is_trivially_copy_assignable<_Tp>::value>
struct __optional_copy_assign_base : __optional_move_base<_Tp>
{
    using __optional_move_base<_Tp>::__optional_move_base;
};

template <class _Tp>
struct __optional_copy_assign_base<_Tp, false> : __optional_move_base<_Tp>
{
    using __optional_move_base<_Tp>::__optional_move_base;

    _LIBCPP_INLINE_VISIBILITY
    __optional_copy_assign_base() = default;
    _LIBCPP_INLINE_VISIBILITY
    __optional_copy_assign_base(const __optional_copy_assign_base&) = default;
    _LIBCPP_INLINE_VISIBILITY
    __optional_copy_assign_base(__optional_copy_assign_base&&) = default;

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 __optional_copy_assign_base& operator=(const __optional_copy_assign_base& __opt)
    {
        this->__assign_from(__opt);
        return *this;
    }

    _LIBCPP_INLINE_VISIBILITY
    __optional_copy_assign_base& operator=(__optional_copy_assign_base&&) = default;
};

template <class _Tp, bool =
    is_trivially_destructible<_Tp>::value &&
    is_trivially_move_constructible<_Tp>::value &&
    is_trivially_move_assignable<_Tp>::value>
struct __optional_move_assign_base : __optional_copy_assign_base<_Tp>
{
    using __optional_copy_assign_base<_Tp>::__optional_copy_assign_base;
};

template <class _Tp>
struct __optional_move_assign_base<_Tp, false> : __optional_copy_assign_base<_Tp>
{
    using value_type = _Tp;
    using __optional_copy_assign_base<_Tp>::__optional_copy_assign_base;

    _LIBCPP_INLINE_VISIBILITY
    __optional_move_assign_base() = default;
    _LIBCPP_INLINE_VISIBILITY
    __optional_move_assign_base(const __optional_move_assign_base& __opt) = default;
    _LIBCPP_INLINE_VISIBILITY
    __optional_move_assign_base(__optional_move_assign_base&&) = default;
    _LIBCPP_INLINE_VISIBILITY
    __optional_move_assign_base& operator=(const __optional_move_assign_base&) = default;

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 __optional_move_assign_base& operator=(__optional_move_assign_base&& __opt)
        noexcept(is_nothrow_move_assignable_v<value_type> &&
                 is_nothrow_move_constructible_v<value_type>)
    {
        this->__assign_from(_VSTD::move(__opt));
        return *this;
    }
};

template <class _Tp>
using __optional_sfinae_ctor_base_t = __sfinae_ctor_base<
    is_copy_constructible<_Tp>::value,
    is_move_constructible<_Tp>::value
>;

template <class _Tp>
using __optional_sfinae_assign_base_t = __sfinae_assign_base<
    (is_copy_constructible<_Tp>::value && is_copy_assignable<_Tp>::value),
    (is_move_constructible<_Tp>::value && is_move_assignable<_Tp>::value)
>;

template<class _Tp>
class optional;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 687 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

template <class _Tp>
concept __is_derived_from_optional = requires(const _Tp& __t) { []<class _Up>(const optional<_Up>&) {}(__t); };

#  endif // _LIBCPP_STD_VER >= 20
# 692 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

template <class _Tp>
struct __is_std_optional : false_type {};
template <class _Tp> struct __is_std_optional<optional<_Tp>> : true_type {};

template <class _Tp>
class _LIBCPP_DECLSPEC_EMPTY_BASES optional
    : private __optional_move_assign_base<_Tp>
    , private __optional_sfinae_ctor_base_t<_Tp>
    , private __optional_sfinae_assign_base_t<_Tp>
{
    using __base = __optional_move_assign_base<_Tp>;
public:
    using value_type = _Tp;

private:
     // Disable the reference extension using this static assert.
    static_assert(!is_same_v<__remove_cvref_t<value_type>, in_place_t>,
        "instantiation of optional with in_place_t is ill-formed");
    static_assert(!is_same_v<__remove_cvref_t<value_type>, nullopt_t>,
        "instantiation of optional with nullopt_t is ill-formed");
    static_assert(!is_reference_v<value_type>,
        "instantiation of optional with a reference type is ill-formed");
    static_assert(is_destructible_v<value_type>,
        "instantiation of optional with a non-destructible type is ill-formed");
    static_assert(!is_array_v<value_type>,
        "instantiation of optional with an array type is ill-formed");

    // LWG2756: conditionally explicit conversion from _Up
    struct _CheckOptionalArgsConstructor {
      template <class _Up>
      _LIBCPP_HIDE_FROM_ABI static constexpr bool __enable_implicit() {
          return is_constructible_v<_Tp, _Up&&> &&
                 is_convertible_v<_Up&&, _Tp>;
      }

      template <class _Up>
      _LIBCPP_HIDE_FROM_ABI static constexpr bool __enable_explicit() {
          return is_constructible_v<_Tp, _Up&&> &&
                 !is_convertible_v<_Up&&, _Tp>;
      }
    };
    template <class _Up>
    using _CheckOptionalArgsCtor = _If<
        _IsNotSame<__remove_cvref_t<_Up>, in_place_t>::value &&
        _IsNotSame<__remove_cvref_t<_Up>, optional>::value &&
        (!is_same_v<remove_cv_t<_Tp>, bool> || !__is_std_optional<__remove_cvref_t<_Up>>::value),
        _CheckOptionalArgsConstructor,
        __check_tuple_constructor_fail
    >;
    template <class _QualUp>
    struct _CheckOptionalLikeConstructor {
      template <class _Up, class _Opt = optional<_Up>>
      using __check_constructible_from_opt = _Or<
          is_constructible<_Tp, _Opt&>,
          is_constructible<_Tp, _Opt const&>,
          is_constructible<_Tp, _Opt&&>,
          is_constructible<_Tp, _Opt const&&>,
          is_convertible<_Opt&, _Tp>,
          is_convertible<_Opt const&, _Tp>,
          is_convertible<_Opt&&, _Tp>,
          is_convertible<_Opt const&&, _Tp>
      >;
      template <class _Up, class _Opt = optional<_Up>>
      using __check_assignable_from_opt = _Or<
          is_assignable<_Tp&, _Opt&>,
          is_assignable<_Tp&, _Opt const&>,
          is_assignable<_Tp&, _Opt&&>,
          is_assignable<_Tp&, _Opt const&&>
      >;
      template <class _Up, class _QUp = _QualUp>
      _LIBCPP_HIDE_FROM_ABI static constexpr bool __enable_implicit() {
          return is_convertible<_QUp, _Tp>::value &&
                 (is_same_v<remove_cv_t<_Tp>, bool> || !__check_constructible_from_opt<_Up>::value);
      }
      template <class _Up, class _QUp = _QualUp>
      _LIBCPP_HIDE_FROM_ABI static constexpr bool __enable_explicit() {
          return !is_convertible<_QUp, _Tp>::value &&
                 (is_same_v<remove_cv_t<_Tp>, bool> || !__check_constructible_from_opt<_Up>::value);
      }
      template <class _Up, class _QUp = _QualUp>
      _LIBCPP_HIDE_FROM_ABI static constexpr bool __enable_assign() {
          // Construction and assignability of _QUp to _Tp has already been
          // checked.
          return !__check_constructible_from_opt<_Up>::value &&
              !__check_assignable_from_opt<_Up>::value;
      }
    };

    template <class _Up, class _QualUp>
    using _CheckOptionalLikeCtor = _If<
      _And<
         _IsNotSame<_Up, _Tp>,
          is_constructible<_Tp, _QualUp>
      >::value,
      _CheckOptionalLikeConstructor<_QualUp>,
      __check_tuple_constructor_fail
    >;
    template <class _Up, class _QualUp>
    using _CheckOptionalLikeAssign = _If<
      _And<
          _IsNotSame<_Up, _Tp>,
          is_constructible<_Tp, _QualUp>,
          is_assignable<_Tp&, _QualUp>
      >::value,
      _CheckOptionalLikeConstructor<_QualUp>,
      __check_tuple_constructor_fail
    >;

public:

    _LIBCPP_INLINE_VISIBILITY constexpr optional() noexcept {}
    _LIBCPP_INLINE_VISIBILITY constexpr optional(const optional&) = default;
    _LIBCPP_INLINE_VISIBILITY constexpr optional(optional&&) = default;
    _LIBCPP_INLINE_VISIBILITY constexpr optional(nullopt_t) noexcept {}

    template <class _InPlaceT, class... _Args, class = enable_if_t<
          _And<
              _IsSame<_InPlaceT, in_place_t>,
              is_constructible<value_type, _Args...>
            >::value
        >
    >
    _LIBCPP_INLINE_VISIBILITY
    constexpr explicit optional(_InPlaceT, _Args&&... __args)
        : __base(in_place, _VSTD::forward<_Args>(__args)...) {}

    template <class _Up, class... _Args, class = enable_if_t<
        is_constructible_v<value_type, initializer_list<_Up>&, _Args...>>
    >
    _LIBCPP_INLINE_VISIBILITY
    constexpr explicit optional(in_place_t, initializer_list<_Up> __il, _Args&&... __args)
        : __base(in_place, __il, _VSTD::forward<_Args>(__args)...) {}

    template <class _Up = value_type, enable_if_t<
        _CheckOptionalArgsCtor<_Up>::template __enable_implicit<_Up>()
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    constexpr optional(_Up&& __v)
        : __base(in_place, _VSTD::forward<_Up>(__v)) {}

    template <class _Up, enable_if_t<
        _CheckOptionalArgsCtor<_Up>::template __enable_explicit<_Up>()
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    constexpr explicit optional(_Up&& __v)
        : __base(in_place, _VSTD::forward<_Up>(__v)) {}

    // LWG2756: conditionally explicit conversion from const optional<_Up>&
    template <class _Up, enable_if_t<
        _CheckOptionalLikeCtor<_Up, _Up const&>::template __enable_implicit<_Up>()
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 optional(const optional<_Up>& __v)
    {
        this->__construct_from(__v);
    }
    template <class _Up, enable_if_t<
        _CheckOptionalLikeCtor<_Up, _Up const&>::template __enable_explicit<_Up>()
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit optional(const optional<_Up>& __v)
    {
        this->__construct_from(__v);
    }

    // LWG2756: conditionally explicit conversion from optional<_Up>&&
    template <class _Up, enable_if_t<
        _CheckOptionalLikeCtor<_Up, _Up &&>::template __enable_implicit<_Up>()
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 optional(optional<_Up>&& __v)
    {
        this->__construct_from(_VSTD::move(__v));
    }
    template <class _Up, enable_if_t<
        _CheckOptionalLikeCtor<_Up, _Up &&>::template __enable_explicit<_Up>()
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit optional(optional<_Up>&& __v)
    {
        this->__construct_from(_VSTD::move(__v));
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 877 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
  template<class _Fp, class... _Args>
  _LIBCPP_HIDE_FROM_ABI
  constexpr explicit optional(__optional_construct_from_invoke_tag, _Fp&& __f, _Args&&... __args)
      : __base(__optional_construct_from_invoke_tag{}, _VSTD::forward<_Fp>(__f), _VSTD::forward<_Args>(__args)...) {
  }
#endif
# 883 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 optional& operator=(nullopt_t) noexcept
    {
        reset();
        return *this;
    }

    _LIBCPP_HIDE_FROM_ABI constexpr optional& operator=(const optional&) = default;
    _LIBCPP_HIDE_FROM_ABI constexpr optional& operator=(optional&&) = default;

    // LWG2756
    template <class _Up = value_type,
              class = enable_if_t<
                      _And<
                          _IsNotSame<__remove_cvref_t<_Up>, optional>,
                          _Or<
                              _IsNotSame<__remove_cvref_t<_Up>, value_type>,
                              _Not<is_scalar<value_type>>
                          >,
                          is_constructible<value_type, _Up>,
                          is_assignable<value_type&, _Up>
                      >::value>
             >
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 optional&
    operator=(_Up&& __v)
    {
        if (this->has_value())
            this->__get() = _VSTD::forward<_Up>(__v);
        else
            this->__construct(_VSTD::forward<_Up>(__v));
        return *this;
    }

    // LWG2756
    template <class _Up, enable_if_t<
        _CheckOptionalLikeAssign<_Up, _Up const&>::template __enable_assign<_Up>()
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 optional&
    operator=(const optional<_Up>& __v)
    {
        this->__assign_from(__v);
        return *this;
    }

    // LWG2756
    template <class _Up, enable_if_t<
        _CheckOptionalLikeCtor<_Up, _Up &&>::template __enable_assign<_Up>()
    , int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 optional&
    operator=(optional<_Up>&& __v)
    {
        this->__assign_from(_VSTD::move(__v));
        return *this;
    }

    template <class... _Args,
              class = enable_if_t
                      <
                          is_constructible_v<value_type, _Args...>
                      >
             >
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp &
    emplace(_Args&&... __args)
    {
        reset();
        this->__construct(_VSTD::forward<_Args>(__args)...);
        return this->__get();
    }

    template <class _Up, class... _Args,
              class = enable_if_t
                      <
                          is_constructible_v<value_type, initializer_list<_Up>&, _Args...>
                      >
             >
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp &
    emplace(initializer_list<_Up> __il, _Args&&... __args)
    {
        reset();
        this->__construct(__il, _VSTD::forward<_Args>(__args)...);
        return this->__get();
    }

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(optional& __opt)
        noexcept(is_nothrow_move_constructible_v<value_type> &&
                 is_nothrow_swappable_v<value_type>)
    {
        if (this->has_value() == __opt.has_value())
        {
            using _VSTD::swap;
            if (this->has_value())
                swap(this->__get(), __opt.__get());
        }
        else
        {
            if (this->has_value())
            {
                __opt.__construct(_VSTD::move(this->__get()));
                reset();
            }
            else
            {
                this->__construct(_VSTD::move(__opt.__get()));
                __opt.reset();
            }
        }
    }

    _LIBCPP_INLINE_VISIBILITY
    constexpr
    add_pointer_t<value_type const>
    operator->() const
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(this->has_value(), "optional operator-> called on a disengaged value");
        return _VSTD::addressof(this->__get());
    }

    _LIBCPP_INLINE_VISIBILITY
    constexpr
    add_pointer_t<value_type>
    operator->()
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(this->has_value(), "optional operator-> called on a disengaged value");
        return _VSTD::addressof(this->__get());
    }

    _LIBCPP_INLINE_VISIBILITY
    constexpr
    const value_type&
    operator*() const& noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(this->has_value(), "optional operator* called on a disengaged value");
        return this->__get();
    }

    _LIBCPP_INLINE_VISIBILITY
    constexpr
    value_type&
    operator*() & noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(this->has_value(), "optional operator* called on a disengaged value");
        return this->__get();
    }

    _LIBCPP_INLINE_VISIBILITY
    constexpr
    value_type&&
    operator*() && noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(this->has_value(), "optional operator* called on a disengaged value");
        return _VSTD::move(this->__get());
    }

    _LIBCPP_INLINE_VISIBILITY
    constexpr
    const value_type&&
    operator*() const&& noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(this->has_value(), "optional operator* called on a disengaged value");
        return _VSTD::move(this->__get());
    }

    _LIBCPP_INLINE_VISIBILITY
    constexpr explicit operator bool() const noexcept { return has_value(); }

    using __base::has_value;
    using __base::__get;

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
    constexpr value_type const& value() const&
    {
        if (!this->has_value())
            __throw_bad_optional_access();
        return this->__get();
    }

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
    constexpr value_type& value() &
    {
        if (!this->has_value())
            __throw_bad_optional_access();
        return this->__get();
    }

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
    constexpr value_type&& value() &&
    {
        if (!this->has_value())
            __throw_bad_optional_access();
        return _VSTD::move(this->__get());
    }

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
    constexpr value_type const&& value() const&&
    {
        if (!this->has_value())
            __throw_bad_optional_access();
        return _VSTD::move(this->__get());
    }

    template <class _Up>
    _LIBCPP_INLINE_VISIBILITY
    constexpr value_type value_or(_Up&& __v) const&
    {
        static_assert(is_copy_constructible_v<value_type>,
                      "optional<T>::value_or: T must be copy constructible");
        static_assert(is_convertible_v<_Up, value_type>,
                      "optional<T>::value_or: U must be convertible to T");
        return this->has_value() ? this->__get() :
                                  static_cast<value_type>(_VSTD::forward<_Up>(__v));
    }

    template <class _Up>
    _LIBCPP_INLINE_VISIBILITY
    constexpr value_type value_or(_Up&& __v) &&
    {
        static_assert(is_move_constructible_v<value_type>,
                      "optional<T>::value_or: T must be move constructible");
        static_assert(is_convertible_v<_Up, value_type>,
                      "optional<T>::value_or: U must be convertible to T");
        return this->has_value() ? _VSTD::move(this->__get()) :
                                  static_cast<value_type>(_VSTD::forward<_Up>(__v));
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1119 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
  template<class _Func>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
  constexpr auto and_then(_Func&& __f) & {
    using _Up = invoke_result_t<_Func, value_type&>;
    static_assert(__is_std_optional<remove_cvref_t<_Up>>::value,
                  "Result of f(value()) must be a specialization of std::optional");
    if (*this)
      return _VSTD::invoke(_VSTD::forward<_Func>(__f), value());
    return remove_cvref_t<_Up>();
  }

  template<class _Func>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
  constexpr auto and_then(_Func&& __f) const& {
    using _Up = invoke_result_t<_Func, const value_type&>;
    static_assert(__is_std_optional<remove_cvref_t<_Up>>::value,
                  "Result of f(value()) must be a specialization of std::optional");
    if (*this)
      return _VSTD::invoke(_VSTD::forward<_Func>(__f), value());
    return remove_cvref_t<_Up>();
  }

  template<class _Func>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
  constexpr auto and_then(_Func&& __f) && {
    using _Up = invoke_result_t<_Func, value_type&&>;
    static_assert(__is_std_optional<remove_cvref_t<_Up>>::value,
                  "Result of f(std::move(value())) must be a specialization of std::optional");
    if (*this)
      return _VSTD::invoke(_VSTD::forward<_Func>(__f), _VSTD::move(value()));
    return remove_cvref_t<_Up>();
  }

  template<class _Func>
  _LIBCPP_HIDE_FROM_ABI
  constexpr auto and_then(_Func&& __f) const&& {
    using _Up = invoke_result_t<_Func, const value_type&&>;
    static_assert(__is_std_optional<remove_cvref_t<_Up>>::value,
                  "Result of f(std::move(value())) must be a specialization of std::optional");
    if (*this)
      return _VSTD::invoke(_VSTD::forward<_Func>(__f), _VSTD::move(value()));
    return remove_cvref_t<_Up>();
  }

  template<class _Func>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
  constexpr auto transform(_Func&& __f) & {
    using _Up = remove_cv_t<invoke_result_t<_Func, value_type&>>;
    static_assert(!is_array_v<_Up>, "Result of f(value()) should not be an Array");
    static_assert(!is_same_v<_Up, in_place_t>,
                  "Result of f(value()) should not be std::in_place_t");
    static_assert(!is_same_v<_Up, nullopt_t>,
                  "Result of f(value()) should not be std::nullopt_t");
    static_assert(is_object_v<_Up>, "Result of f(value()) should be an object type");
    if (*this)
      return optional<_Up>(__optional_construct_from_invoke_tag{}, _VSTD::forward<_Func>(__f), value());
    return optional<_Up>();
  }

  template<class _Func>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
  constexpr auto transform(_Func&& __f) const& {
    using _Up = remove_cv_t<invoke_result_t<_Func, const value_type&>>;
    static_assert(!is_array_v<_Up>, "Result of f(value()) should not be an Array");
    static_assert(!is_same_v<_Up, in_place_t>,
                  "Result of f(value()) should not be std::in_place_t");
    static_assert(!is_same_v<_Up, nullopt_t>,
                  "Result of f(value()) should not be std::nullopt_t");
    static_assert(is_object_v<_Up>, "Result of f(value()) should be an object type");
    if (*this)
      return optional<_Up>(__optional_construct_from_invoke_tag{}, _VSTD::forward<_Func>(__f), value());
    return optional<_Up>();
  }

  template<class _Func>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
  constexpr auto transform(_Func&& __f) && {
    using _Up = remove_cv_t<invoke_result_t<_Func, value_type&&>>;
    static_assert(!is_array_v<_Up>, "Result of f(std::move(value())) should not be an Array");
    static_assert(!is_same_v<_Up, in_place_t>,
                  "Result of f(std::move(value())) should not be std::in_place_t");
    static_assert(!is_same_v<_Up, nullopt_t>,
                  "Result of f(std::move(value())) should not be std::nullopt_t");
    static_assert(is_object_v<_Up>, "Result of f(std::move(value())) should be an object type");
    if (*this)
      return optional<_Up>(__optional_construct_from_invoke_tag{}, _VSTD::forward<_Func>(__f), _VSTD::move(value()));
    return optional<_Up>();
  }

  template<class _Func>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
  constexpr auto transform(_Func&& __f) const&& {
    using _Up = remove_cvref_t<invoke_result_t<_Func, const value_type&&>>;
    static_assert(!is_array_v<_Up>, "Result of f(std::move(value())) should not be an Array");
    static_assert(!is_same_v<_Up, in_place_t>,
                  "Result of f(std::move(value())) should not be std::in_place_t");
    static_assert(!is_same_v<_Up, nullopt_t>,
                  "Result of f(std::move(value())) should not be std::nullopt_t");
    static_assert(is_object_v<_Up>, "Result of f(std::move(value())) should be an object type");
    if (*this)
      return optional<_Up>(__optional_construct_from_invoke_tag{}, _VSTD::forward<_Func>(__f), _VSTD::move(value()));
    return optional<_Up>();
  }

  template<invocable _Func>
  _LIBCPP_HIDE_FROM_ABI
  constexpr optional or_else(_Func&& __f) const& requires is_copy_constructible_v<value_type> {
    static_assert(is_same_v<remove_cvref_t<invoke_result_t<_Func>>, optional>,
                  "Result of f() should be the same type as this optional");
    if (*this)
      return *this;
    return _VSTD::forward<_Func>(__f)();
  }

  template<invocable _Func>
  _LIBCPP_HIDE_FROM_ABI
  constexpr optional or_else(_Func&& __f) && requires is_move_constructible_v<value_type> {
    static_assert(is_same_v<remove_cvref_t<invoke_result_t<_Func>>, optional>,
                  "Result of f() should be the same type as this optional");
    if (*this)
      return _VSTD::move(*this);
    return _VSTD::forward<_Func>(__f)();
  }
#endif // _LIBCPP_STD_VER >= 23
# 1243 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

    using __base::reset;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1248 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
template<class _Tp>
    optional(_Tp) -> optional<_Tp>;
#endif
# 1251 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

// Comparisons between optionals
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() ==
        std::declval<const _Up&>()), bool>,
    bool
>
operator==(const optional<_Tp>& __x, const optional<_Up>& __y)
{
    if (static_cast<bool>(__x) != static_cast<bool>(__y))
        return false;
    if (!static_cast<bool>(__x))
        return true;
    return *__x == *__y;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() !=
        std::declval<const _Up&>()), bool>,
    bool
>
operator!=(const optional<_Tp>& __x, const optional<_Up>& __y)
{
    if (static_cast<bool>(__x) != static_cast<bool>(__y))
        return true;
    if (!static_cast<bool>(__x))
        return false;
    return *__x != *__y;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() <
        std::declval<const _Up&>()), bool>,
    bool
>
operator<(const optional<_Tp>& __x, const optional<_Up>& __y)
{
    if (!static_cast<bool>(__y))
        return false;
    if (!static_cast<bool>(__x))
        return true;
    return *__x < *__y;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() >
        std::declval<const _Up&>()), bool>,
    bool
>
operator>(const optional<_Tp>& __x, const optional<_Up>& __y)
{
    if (!static_cast<bool>(__x))
        return false;
    if (!static_cast<bool>(__y))
        return true;
    return *__x > *__y;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() <=
        std::declval<const _Up&>()), bool>,
    bool
>
operator<=(const optional<_Tp>& __x, const optional<_Up>& __y)
{
    if (!static_cast<bool>(__x))
        return true;
    if (!static_cast<bool>(__y))
        return false;
    return *__x <= *__y;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() >=
        std::declval<const _Up&>()), bool>,
    bool
>
operator>=(const optional<_Tp>& __x, const optional<_Up>& __y)
{
    if (!static_cast<bool>(__y))
        return true;
    if (!static_cast<bool>(__x))
        return false;
    return *__x >= *__y;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1350 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

template <class _Tp, three_way_comparable_with<_Tp> _Up>
_LIBCPP_HIDE_FROM_ABI constexpr compare_three_way_result_t<_Tp, _Up>
operator<=>(const optional<_Tp>& __x, const optional<_Up>& __y) {
    if (__x && __y)
        return *__x <=> *__y;
    return __x.has_value() <=> __y.has_value();
}

#endif // _LIBCPP_STD_VER >= 20
# 1360 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

// Comparisons with nullopt
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
bool
operator==(const optional<_Tp>& __x, nullopt_t) noexcept
{
    return !static_cast<bool>(__x);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1371 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
bool
operator==(nullopt_t, const optional<_Tp>& __x) noexcept
{
    return !static_cast<bool>(__x);
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
bool
operator!=(const optional<_Tp>& __x, nullopt_t) noexcept
{
    return static_cast<bool>(__x);
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
bool
operator!=(nullopt_t, const optional<_Tp>& __x) noexcept
{
    return static_cast<bool>(__x);
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
bool
operator<(const optional<_Tp>&, nullopt_t) noexcept
{
    return false;
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
bool
operator<(nullopt_t, const optional<_Tp>& __x) noexcept
{
    return static_cast<bool>(__x);
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
bool
operator<=(const optional<_Tp>& __x, nullopt_t) noexcept
{
    return !static_cast<bool>(__x);
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
bool
operator<=(nullopt_t, const optional<_Tp>&) noexcept
{
    return true;
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
bool
operator>(const optional<_Tp>& __x, nullopt_t) noexcept
{
    return static_cast<bool>(__x);
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
bool
operator>(nullopt_t, const optional<_Tp>&) noexcept
{
    return false;
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
bool
operator>=(const optional<_Tp>&, nullopt_t) noexcept
{
    return true;
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
bool
operator>=(nullopt_t, const optional<_Tp>& __x) noexcept
{
    return !static_cast<bool>(__x);
}

#else // _LIBCPP_STD_VER <= 17
# 1461 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI constexpr strong_ordering operator<=>(const optional<_Tp>& __x, nullopt_t) noexcept {
    return __x.has_value() <=> false;
}

#endif // _LIBCPP_STD_VER <= 17
# 1468 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

// Comparisons with T
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() ==
        std::declval<const _Up&>()), bool>,
    bool
>
operator==(const optional<_Tp>& __x, const _Up& __v)
{
    return static_cast<bool>(__x) ? *__x == __v : false;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() ==
        std::declval<const _Up&>()), bool>,
    bool
>
operator==(const _Tp& __v, const optional<_Up>& __x)
{
    return static_cast<bool>(__x) ? __v == *__x : false;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() !=
        std::declval<const _Up&>()), bool>,
    bool
>
operator!=(const optional<_Tp>& __x, const _Up& __v)
{
    return static_cast<bool>(__x) ? *__x != __v : true;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() !=
        std::declval<const _Up&>()), bool>,
    bool
>
operator!=(const _Tp& __v, const optional<_Up>& __x)
{
    return static_cast<bool>(__x) ? __v != *__x : true;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() <
        std::declval<const _Up&>()), bool>,
    bool
>
operator<(const optional<_Tp>& __x, const _Up& __v)
{
    return static_cast<bool>(__x) ? *__x < __v : true;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() <
        std::declval<const _Up&>()), bool>,
    bool
>
operator<(const _Tp& __v, const optional<_Up>& __x)
{
    return static_cast<bool>(__x) ? __v < *__x : false;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() <=
        std::declval<const _Up&>()), bool>,
    bool
>
operator<=(const optional<_Tp>& __x, const _Up& __v)
{
    return static_cast<bool>(__x) ? *__x <= __v : true;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() <=
        std::declval<const _Up&>()), bool>,
    bool
>
operator<=(const _Tp& __v, const optional<_Up>& __x)
{
    return static_cast<bool>(__x) ? __v <= *__x : false;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() >
        std::declval<const _Up&>()), bool>,
    bool
>
operator>(const optional<_Tp>& __x, const _Up& __v)
{
    return static_cast<bool>(__x) ? *__x > __v : false;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() >
        std::declval<const _Up&>()), bool>,
    bool
>
operator>(const _Tp& __v, const optional<_Up>& __x)
{
    return static_cast<bool>(__x) ? __v > *__x : true;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() >=
        std::declval<const _Up&>()), bool>,
    bool
>
operator>=(const optional<_Tp>& __x, const _Up& __v)
{
    return static_cast<bool>(__x) ? *__x >= __v : false;
}

template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<
    is_convertible_v<decltype(std::declval<const _Tp&>() >=
        std::declval<const _Up&>()), bool>,
    bool
>
operator>=(const _Tp& __v, const optional<_Up>& __x)
{
    return static_cast<bool>(__x) ? __v >= *__x : true;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1615 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

template <class _Tp, class _Up>
  requires(!__is_derived_from_optional<_Up>) && three_way_comparable_with<_Tp, _Up>
_LIBCPP_HIDE_FROM_ABI constexpr compare_three_way_result_t<_Tp, _Up>
operator<=>(const optional<_Tp>& __x, const _Up& __v) {
    return __x.has_value() ? *__x <=> __v : strong_ordering::less;
}

#endif // _LIBCPP_STD_VER >= 20
# 1624 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3


template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
enable_if_t<
    is_move_constructible_v<_Tp> && is_swappable_v<_Tp>,
    void
>
swap(optional<_Tp>& __x, optional<_Tp>& __y) noexcept(noexcept(__x.swap(__y)))
{
    __x.swap(__y);
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
optional<decay_t<_Tp>> make_optional(_Tp&& __v)
{
    return optional<decay_t<_Tp>>(_VSTD::forward<_Tp>(__v));
}

template <class _Tp, class... _Args>
_LIBCPP_INLINE_VISIBILITY constexpr
optional<_Tp> make_optional(_Args&&... __args)
{
    return optional<_Tp>(in_place, _VSTD::forward<_Args>(__args)...);
}

template <class _Tp, class _Up, class... _Args>
_LIBCPP_INLINE_VISIBILITY constexpr
optional<_Tp> make_optional(initializer_list<_Up> __il,  _Args&&... __args)
{
    return optional<_Tp>(in_place, __il, _VSTD::forward<_Args>(__args)...);
}

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS hash<
    __enable_hash_helper<optional<_Tp>, remove_const_t<_Tp>>
>
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1664 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
    _LIBCPP_DEPRECATED_IN_CXX17 typedef optional<_Tp> argument_type;
    _LIBCPP_DEPRECATED_IN_CXX17 typedef size_t        result_type;
#endif
# 1667 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

    _LIBCPP_INLINE_VISIBILITY
    size_t operator()(const optional<_Tp>& __opt) const
    {
        return static_cast<bool>(__opt) ? hash<remove_const_t<_Tp>>()(*__opt) : 0;
    }
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 17
# 1678 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

_LIBCPP_POP_MACROS

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1682 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <atomic>
#endif /* expanded by -frewrite-includes */
# 1682 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 1683 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <climits>
#endif /* expanded by -frewrite-includes */
# 1683 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 1684 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 1684 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 1685 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <ctime>
#endif /* expanded by -frewrite-includes */
# 1685 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 1686 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iterator>
#endif /* expanded by -frewrite-includes */
# 1686 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 1687 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <memory>
#endif /* expanded by -frewrite-includes */
# 1687 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 1688 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <ratio>
#endif /* expanded by -frewrite-includes */
# 1688 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 1689 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <tuple>
#endif /* expanded by -frewrite-includes */
# 1689 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 1690 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 1690 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 1691 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 1691 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 1692 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <utility>
#endif /* expanded by -frewrite-includes */
# 1692 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 1693 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <variant>
#endif /* expanded by -frewrite-includes */
# 1693 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
# 1694 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#endif
# 1695 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3

#endif // _LIBCPP_OPTIONAL
# 1697 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/optional" 3
#endif /* optional expanded by -frewrite-includes */
# 11 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* string_view expanded by -frewrite-includes */
#include <string_view>
#else /* string_view expanded by -frewrite-includes */
# 11 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_STRING_VIEW
#define _LIBCPP_STRING_VIEW

/*

    string_view synopsis

#include <compare>

namespace std {

    // 7.2, Class template basic_string_view
    template<class charT, class traits = char_traits<charT>>
        class basic_string_view;

    template<class charT, class traits>
    inline constexpr bool ranges::enable_view<basic_string_view<charT, traits>> = true;

    template<class charT, class traits>
    inline constexpr bool ranges::enable_borrowed_range<basic_string_view<charT, traits>> = true;  // C++20

    // 7.9, basic_string_view non-member comparison functions
    template<class charT, class traits>
    constexpr bool operator==(basic_string_view<charT, traits> x,
                              basic_string_view<charT, traits> y) noexcept;
    template<class charT, class traits>                                                            // Removed in C++20
    constexpr bool operator!=(basic_string_view<charT, traits> x,
                              basic_string_view<charT, traits> y) noexcept;
    template<class charT, class traits>                                                            // Removed in C++20
    constexpr bool operator< (basic_string_view<charT, traits> x,
                                 basic_string_view<charT, traits> y) noexcept;
    template<class charT, class traits>                                                            // Removed in C++20
    constexpr bool operator> (basic_string_view<charT, traits> x,
                              basic_string_view<charT, traits> y) noexcept;
    template<class charT, class traits>                                                            // Removed in C++20
    constexpr bool operator<=(basic_string_view<charT, traits> x,
                                 basic_string_view<charT, traits> y) noexcept;
    template<class charT, class traits>                                                            // Removed in C++20
    constexpr bool operator>=(basic_string_view<charT, traits> x,
                              basic_string_view<charT, traits> y) noexcept;
    template<class charT, class traits>                                                            // Since C++20
    constexpr see below operator<=>(basic_string_view<charT, traits> x,
                                    basic_string_view<charT, traits> y) noexcept;

    // see below, sufficient additional overloads of comparison functions

    // 7.10, Inserters and extractors
    template<class charT, class traits>
      basic_ostream<charT, traits>&
        operator<<(basic_ostream<charT, traits>& os,
                   basic_string_view<charT, traits> str);

    // basic_string_view typedef names
    typedef basic_string_view<char> string_view;
    typedef basic_string_view<char8_t> u8string_view; // C++20
    typedef basic_string_view<char16_t> u16string_view;
    typedef basic_string_view<char32_t> u32string_view;
    typedef basic_string_view<wchar_t> wstring_view;

    template<class charT, class traits = char_traits<charT>>
    class basic_string_view {
      public:
      // types
      typedef traits traits_type;
      typedef charT value_type;
      typedef charT* pointer;
      typedef const charT* const_pointer;
      typedef charT& reference;
      typedef const charT& const_reference;
      typedef implementation-defined const_iterator;
      typedef const_iterator iterator;
      typedef reverse_iterator<const_iterator> const_reverse_iterator;
      typedef const_reverse_iterator reverse_iterator;
      typedef size_t size_type;
      typedef ptrdiff_t difference_type;
      static constexpr size_type npos = size_type(-1);

      // 7.3, basic_string_view constructors and assignment operators
      constexpr basic_string_view() noexcept;
      constexpr basic_string_view(const basic_string_view&) noexcept = default;
      basic_string_view& operator=(const basic_string_view&) noexcept = default;
      template<class Allocator>
      constexpr basic_string_view(const charT* str);
      basic_string_view(nullptr_t) = delete; // C++23
      constexpr basic_string_view(const charT* str, size_type len);
      template <class It, class End>
      constexpr basic_string_view(It begin, End end); // C++20
      template <class Range>
      constexpr basic_string_view(Range&& r); // C++23

      // 7.4, basic_string_view iterator support
      constexpr const_iterator begin() const noexcept;
      constexpr const_iterator end() const noexcept;
      constexpr const_iterator cbegin() const noexcept;
      constexpr const_iterator cend() const noexcept;
      const_reverse_iterator rbegin() const noexcept;
      const_reverse_iterator rend() const noexcept;
      const_reverse_iterator crbegin() const noexcept;
      const_reverse_iterator crend() const noexcept;

      // 7.5, basic_string_view capacity
      constexpr size_type size() const noexcept;
      constexpr size_type length() const noexcept;
      constexpr size_type max_size() const noexcept;
      constexpr bool empty() const noexcept;

      // 7.6, basic_string_view element access
      constexpr const_reference operator[](size_type pos) const;
      constexpr const_reference at(size_type pos) const;
      constexpr const_reference front() const;
      constexpr const_reference back() const;
      constexpr const_pointer data() const noexcept;

      // 7.7, basic_string_view modifiers
      constexpr void remove_prefix(size_type n);
      constexpr void remove_suffix(size_type n);
      constexpr void swap(basic_string_view& s) noexcept;

      size_type copy(charT* s, size_type n, size_type pos = 0) const;  // constexpr in C++20

      constexpr basic_string_view substr(size_type pos = 0, size_type n = npos) const;
      constexpr int compare(basic_string_view s) const noexcept;
      constexpr int compare(size_type pos1, size_type n1, basic_string_view s) const;
      constexpr int compare(size_type pos1, size_type n1,
                            basic_string_view s, size_type pos2, size_type n2) const;
      constexpr int compare(const charT* s) const;
      constexpr int compare(size_type pos1, size_type n1, const charT* s) const;
      constexpr int compare(size_type pos1, size_type n1,
                            const charT* s, size_type n2) const;
      constexpr size_type find(basic_string_view s, size_type pos = 0) const noexcept;
      constexpr size_type find(charT c, size_type pos = 0) const noexcept;
      constexpr size_type find(const charT* s, size_type pos, size_type n) const noexcept; // noexcept as an extension
      constexpr size_type find(const charT* s, size_type pos = 0) const noexcept; // noexcept as an extension
      constexpr size_type rfind(basic_string_view s, size_type pos = npos) const noexcept;
      constexpr size_type rfind(charT c, size_type pos = npos) const noexcept;
      constexpr size_type rfind(const charT* s, size_type pos, size_type n) const noexcept; // noexcept as an extension
      constexpr size_type rfind(const charT* s, size_type pos = npos) const noexcept; // noexcept as an extension
      constexpr size_type find_first_of(basic_string_view s, size_type pos = 0) const noexcept;
      constexpr size_type find_first_of(charT c, size_type pos = 0) const noexcept;
      constexpr size_type find_first_of(const charT* s, size_type pos, size_type n) const noexcept; // noexcept as an extension
      constexpr size_type find_first_of(const charT* s, size_type pos = 0) const noexcept; // noexcept as an extension
      constexpr size_type find_last_of(basic_string_view s, size_type pos = npos) const noexcept;
      constexpr size_type find_last_of(charT c, size_type pos = npos) const noexcept;
      constexpr size_type find_last_of(const charT* s, size_type pos, size_type n) const noexcept; // noexcept as an extension
      constexpr size_type find_last_of(const charT* s, size_type pos = npos) const noexcept; // noexcept as an extension
      constexpr size_type find_first_not_of(basic_string_view s, size_type pos = 0) const noexcept;
      constexpr size_type find_first_not_of(charT c, size_type pos = 0) const noexcept;
      constexpr size_type find_first_not_of(const charT* s, size_type pos, size_type n) const noexcept; // noexcept as an extension
      constexpr size_type find_first_not_of(const charT* s, size_type pos = 0) const noexcept; // noexcept as an extension
      constexpr size_type find_last_not_of(basic_string_view s, size_type pos = npos) const noexcept;
      constexpr size_type find_last_not_of(charT c, size_type pos = npos) const noexcept;
      constexpr size_type find_last_not_of(const charT* s, size_type pos, size_type n) const noexcept; // noexcept as an extension
      constexpr size_type find_last_not_of(const charT* s, size_type pos = npos) const noexcept; // noexcept as an extension

      constexpr bool starts_with(basic_string_view s) const noexcept; // C++20
      constexpr bool starts_with(charT c) const noexcept;             // C++20
      constexpr bool starts_with(const charT* s) const;               // C++20
      constexpr bool ends_with(basic_string_view s) const noexcept;   // C++20
      constexpr bool ends_with(charT c) const noexcept;               // C++20
      constexpr bool ends_with(const charT* s) const;                 // C++20

      constexpr bool contains(basic_string_view s) const noexcept; // C++23
      constexpr bool contains(charT c) const noexcept;             // C++23
      constexpr bool contains(const charT* s) const;               // C++23

     private:
      const_pointer data_;  // exposition only
      size_type     size_;  // exposition only
    };

  // basic_string_view deduction guides
  template<class It, class End>
    basic_string_view(It, End) -> basic_string_view<iter_value_t<It>>; // C++20
  template<class Range>
    basic_string_view(Range&&) -> basic_string_view<ranges::range_value_t<Range>>; // C++23

  // 7.11, Hash support
  template <class T> struct hash;
  template <> struct hash<string_view>;
  template <> struct hash<u8string_view>; // C++20
  template <> struct hash<u16string_view>;
  template <> struct hash<u32string_view>;
  template <> struct hash<wstring_view>;

  constexpr basic_string_view<char>     operator""sv(const char *str,     size_t len) noexcept;
  constexpr basic_string_view<wchar_t>  operator""sv(const wchar_t *str,  size_t len) noexcept;
  constexpr basic_string_view<char8_t>  operator""sv(const char8_t *str,  size_t len) noexcept; // C++20
  constexpr basic_string_view<char16_t> operator""sv(const char16_t *str, size_t len) noexcept;
  constexpr basic_string_view<char32_t> operator""sv(const char32_t *str, size_t len) noexcept;

}  // namespace std


*/

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 205 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 207 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 207 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/hash.h>
#endif /* expanded by -frewrite-includes */
# 208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 210 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* string_view.h expanded by -frewrite-includes */
#include <__fwd/string_view.h>
#else /* string_view.h expanded by -frewrite-includes */
# 210 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string_view.h" 1 3
// -*- C++ -*-
//===---------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_STRING_VIEW_H
#define _LIBCPP___FWD_STRING_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd> // char_traits
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string_view.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template<class _CharT, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_string_view;

typedef basic_string_view<char>     string_view;
#ifndef _LIBCPP_HAS_NO_CHAR8_T
typedef basic_string_view<char8_t>  u8string_view;
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string_view.h" 3
typedef basic_string_view<char16_t> u16string_view;
typedef basic_string_view<char32_t> u32string_view;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
typedef basic_string_view<wchar_t>  wstring_view;
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string_view.h" 3

// clang-format off
template <class _CharT, class _Traits>
class _LIBCPP_PREFERRED_NAME(string_view)
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
      _LIBCPP_PREFERRED_NAME(wstring_view)
#endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string_view.h" 3
#ifndef _LIBCPP_HAS_NO_CHAR8_T
      _LIBCPP_PREFERRED_NAME(u8string_view)
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string_view.h" 3
      _LIBCPP_PREFERRED_NAME(u16string_view)
      _LIBCPP_PREFERRED_NAME(u32string_view)
      basic_string_view;
// clang-format on
_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FWD_STRING_VIEW_H
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/string_view.h" 3
#endif /* string_view.h expanded by -frewrite-includes */
# 211 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/bounded_iter.h>
#endif /* expanded by -frewrite-includes */
# 211 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 215 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 215 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 217 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/data.h>
#endif /* expanded by -frewrite-includes */
# 217 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 219 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_view.h>
#endif /* expanded by -frewrite-includes */
# 219 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 221 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* char_traits.h expanded by -frewrite-includes */
#include <__string/char_traits.h>
#else /* char_traits.h expanded by -frewrite-includes */
# 221 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___STRING_CHAR_TRAITS_H
#define _LIBCPP___STRING_CHAR_TRAITS_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* copy_n.h expanded by -frewrite-includes */
#include <__algorithm/copy_n.h>
#else /* copy_n.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_n.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_COPY_N_H
#define _LIBCPP___ALGORITHM_COPY_N_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* copy.h expanded by -frewrite-includes */
#include <__algorithm/copy.h>
#else /* copy.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_n.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_COPY_H
#define _LIBCPP___ALGORITHM_COPY_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* copy_move_common.h expanded by -frewrite-includes */
#include <__algorithm/copy_move_common.h>
#else /* copy_move_common.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_COPY_MOVE_COMMON_H
#define _LIBCPP___ALGORITHM_COPY_MOVE_COMMON_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/unwrap_iter.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* unwrap_range.h expanded by -frewrite-includes */
#include <__algorithm/unwrap_range.h>
#else /* unwrap_range.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_UNWRAP_RANGE_H
#define _LIBCPP___ALGORITHM_UNWRAP_RANGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/unwrap_iter.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// __unwrap_range and __rewrap_range are used to unwrap ranges which may have different iterator and sentinel types.
// __unwrap_iter and __rewrap_iter don't work for this, because they assume that the iterator and sentinel have
// the same type. __unwrap_range tries to get two iterators and then forward to __unwrap_iter.

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
template <class _Iter, class _Sent>
struct __unwrap_range_impl {
  _LIBCPP_HIDE_FROM_ABI static constexpr auto __unwrap(_Iter __first, _Sent __sent)
    requires random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>
  {
    auto __last = ranges::next(__first, __sent);
    return pair{std::__unwrap_iter(std::move(__first)), std::__unwrap_iter(std::move(__last))};
  }

  _LIBCPP_HIDE_FROM_ABI static constexpr auto __unwrap(_Iter __first, _Sent __last) {
    return pair{std::move(__first), std::move(__last)};
  }

  _LIBCPP_HIDE_FROM_ABI static constexpr auto
  __rewrap(_Iter __orig_iter, decltype(std::__unwrap_iter(std::move(__orig_iter))) __iter)
    requires random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>
  {
    return std::__rewrap_iter(std::move(__orig_iter), std::move(__iter));
  }

  _LIBCPP_HIDE_FROM_ABI static constexpr auto __rewrap(const _Iter&, _Iter __iter)
    requires(!(random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>))
  {
    return __iter;
  }
};

template <class _Iter>
struct __unwrap_range_impl<_Iter, _Iter> {
  _LIBCPP_HIDE_FROM_ABI static constexpr auto __unwrap(_Iter __first, _Iter __last) {
    return pair{std::__unwrap_iter(std::move(__first)), std::__unwrap_iter(std::move(__last))};
  }

  _LIBCPP_HIDE_FROM_ABI static constexpr auto
  __rewrap(_Iter __orig_iter, decltype(std::__unwrap_iter(__orig_iter)) __iter) {
    return std::__rewrap_iter(std::move(__orig_iter), std::move(__iter));
  }
};

template <class _Iter, class _Sent>
_LIBCPP_HIDE_FROM_ABI constexpr auto __unwrap_range(_Iter __first, _Sent __last) {
  return __unwrap_range_impl<_Iter, _Sent>::__unwrap(std::move(__first), std::move(__last));
}

template < class _Sent, class _Iter, class _Unwrapped>
_LIBCPP_HIDE_FROM_ABI constexpr _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) {
  return __unwrap_range_impl<_Iter, _Sent>::__rewrap(std::move(__orig_iter), std::move(__iter));
}
#else  // _LIBCPP_STD_VER >= 20
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
template <class _Iter, class _Unwrapped = decltype(std::__unwrap_iter(std::declval<_Iter>()))>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR pair<_Unwrapped, _Unwrapped> __unwrap_range(_Iter __first, _Iter __last) {
  return std::make_pair(std::__unwrap_iter(std::move(__first)), std::__unwrap_iter(std::move(__last)));
}

template <class _Iter, class _Unwrapped>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) {
  return std::__rewrap_iter(std::move(__orig_iter), std::move(__iter));
}
#endif // _LIBCPP_STD_VER >= 20
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_UNWRAP_RANGE_H
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unwrap_range.h" 3
#endif /* unwrap_range.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__string/constexpr_c_functions.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_always_bitcastable.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_assignable.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copyable.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_volatile.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Type traits.

template <class _From, class _To>
struct __can_lower_copy_assignment_to_memmove {
  static const bool value =
    // If the types are always bitcastable, it's valid to do a bitwise copy between them.
    __is_always_bitcastable<_From, _To>::value &&
    // Reject conversions that wouldn't be performed by the regular built-in assignment (e.g. between arrays).
    is_trivially_assignable<_To&, const _From&>::value &&
    // `memmove` doesn't accept `volatile` pointers, make sure the optimization SFINAEs away in that case.
    !is_volatile<_From>::value &&
    !is_volatile<_To>::value;
};

template <class _From, class _To>
struct __can_lower_move_assignment_to_memmove {
  static const bool value =
    __is_always_bitcastable<_From, _To>::value &&
    is_trivially_assignable<_To&, _From&&>::value &&
    !is_volatile<_From>::value &&
    !is_volatile<_To>::value;
};

// `memmove` algorithms implementation.

template <class _In, class _Out>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
__copy_trivial_impl(_In* __first, _In* __last, _Out* __result) {
  const size_t __n = static_cast<size_t>(__last - __first);

  std::__constexpr_memmove(__result, __first, __element_count(__n));

  return std::make_pair(__last, __result + __n);
}

template <class _In, class _Out>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
__copy_backward_trivial_impl(_In* __first, _In* __last, _Out* __result) {
  const size_t __n = static_cast<size_t>(__last - __first);
  __result -= __n;

  std::__constexpr_memmove(__result, __first, __element_count(__n));

  return std::make_pair(__last, __result);
}

// Iterator unwrapping and dispatching to the correct overload.

template <class _F1, class _F2>
struct __overload : _F1, _F2 {
  using _F1::operator();
  using _F2::operator();
};

template <class _InIter, class _Sent, class _OutIter, class = void>
struct __can_rewrap : false_type {};

template <class _InIter, class _Sent, class _OutIter>
struct __can_rewrap<_InIter,
                    _Sent,
                    _OutIter,
                    // Note that sentinels are always copy-constructible.
                    __enable_if_t< is_copy_constructible<_InIter>::value &&
                                   is_copy_constructible<_OutIter>::value > > : true_type {};

template <class _Algorithm,
          class _InIter,
          class _Sent,
          class _OutIter,
          __enable_if_t<__can_rewrap<_InIter, _Sent, _OutIter>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pair<_InIter, _OutIter>
__unwrap_and_dispatch(_InIter __first, _Sent __last, _OutIter __out_first) {
  auto __range  = std::__unwrap_range(__first, std::move(__last));
  auto __result = _Algorithm()(std::move(__range.first), std::move(__range.second), std::__unwrap_iter(__out_first));
  return std::make_pair(std::__rewrap_range<_Sent>(std::move(__first), std::move(__result.first)),
                                 std::__rewrap_iter(std::move(__out_first), std::move(__result.second)));
}

template <class _Algorithm,
          class _InIter,
          class _Sent,
          class _OutIter,
          __enable_if_t<!__can_rewrap<_InIter, _Sent, _OutIter>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pair<_InIter, _OutIter>
__unwrap_and_dispatch(_InIter __first, _Sent __last, _OutIter __out_first) {
  return _Algorithm()(std::move(__first), std::move(__last), std::move(__out_first));
}

template <class _AlgPolicy,
          class _NaiveAlgorithm,
          class _OptimizedAlgorithm,
          class _InIter,
          class _Sent,
          class _OutIter>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pair<_InIter, _OutIter>
__dispatch_copy_or_move(_InIter __first, _Sent __last, _OutIter __out_first) {
  using _Algorithm = __overload<_NaiveAlgorithm, _OptimizedAlgorithm>;
  return std::__unwrap_and_dispatch<_Algorithm>(std::move(__first), std::move(__last), std::move(__out_first));
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_COPY_MOVE_COMMON_H
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_move_common.h" 3
#endif /* copy_move_common.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* for_each_segment.h expanded by -frewrite-includes */
#include <__algorithm/for_each_segment.h>
#else /* for_each_segment.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_segment.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_FOR_EACH_SEGMENT_H
#define _LIBCPP___ALGORITHM_FOR_EACH_SEGMENT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_segment.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_segment.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/segmented_iterator.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_segment.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_segment.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_segment.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_segment.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_segment.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// __for_each_segment is a utility function for optimizing iterating over segmented iterators linearly.
// __first and __last are expected to be a segmented range. __func is expected to take a range of local iterators.
// Anything that is returned from __func is ignored.

template <class _SegmentedIterator, class _Functor>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
__for_each_segment(_SegmentedIterator __first, _SegmentedIterator __last, _Functor __func) {
  using _Traits = __segmented_iterator_traits<_SegmentedIterator>;

  auto __sfirst = _Traits::__segment(__first);
  auto __slast  = _Traits::__segment(__last);

  // We are in a single segment, so we might not be at the beginning or end
  if (__sfirst == __slast) {
    __func(_Traits::__local(__first), _Traits::__local(__last));
    return;
  }

  // We have more than one segment. Iterate over the first segment, since we might not start at the beginning
  __func(_Traits::__local(__first), _Traits::__end(__sfirst));
  ++__sfirst;
  // iterate over the segments which are guaranteed to be completely in the range
  while (__sfirst != __slast) {
    __func(_Traits::__begin(__sfirst), _Traits::__end(__sfirst));
    ++__sfirst;
  }
  // iterate over the last segment
  __func(_Traits::__begin(__sfirst), _Traits::__local(__last));
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_FOR_EACH_SEGMENT_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_segment.h" 3
#endif /* for_each_segment.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/segmented_iterator.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class, class _InIter, class _Sent, class _OutIter>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter> __copy(_InIter, _Sent, _OutIter);

template <class _AlgPolicy>
struct __copy_loop {
  template <class _InIter, class _Sent, class _OutIter>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
  operator()(_InIter __first, _Sent __last, _OutIter __result) const {
    while (__first != __last) {
      *__result = *__first;
      ++__first;
      ++__result;
    }

    return std::make_pair(std::move(__first), std::move(__result));
  }

  template <class _InIter, class _OutIter>
  struct _CopySegment {
    using _Traits = __segmented_iterator_traits<_InIter>;

    _OutIter& __result_;

    _LIBCPP_HIDE_FROM_ABI _CopySegment(_OutIter& __result) : __result_(__result) {}

    _LIBCPP_HIDE_FROM_ABI void
    operator()(typename _Traits::__local_iterator __lfirst, typename _Traits::__local_iterator __llast) {
      __result_ = std::__copy<_AlgPolicy>(__lfirst, __llast, std::move(__result_)).second;
    }
  };

  template <class _InIter, class _OutIter, __enable_if_t<__is_segmented_iterator<_InIter>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
  operator()(_InIter __first, _InIter __last, _OutIter __result) const {
    std::__for_each_segment(__first, __last, _CopySegment<_InIter, _OutIter>(__result));
    return std::make_pair(__last, std::move(__result));
  }

  template <class _InIter,
            class _OutIter,
            __enable_if_t<__has_random_access_iterator_category<_InIter>::value &&
                              !__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
                          int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
  operator()(_InIter __first, _InIter __last, _OutIter __result) const {
    using _Traits = __segmented_iterator_traits<_OutIter>;
    using _DiffT  = typename common_type<__iter_diff_t<_InIter>, __iter_diff_t<_OutIter> >::type;

    if (__first == __last)
      return std::make_pair(std::move(__first), std::move(__result));

    auto __local_first      = _Traits::__local(__result);
    auto __segment_iterator = _Traits::__segment(__result);
    while (true) {
      auto __local_last = _Traits::__end(__segment_iterator);
      auto __size       = std::min<_DiffT>(__local_last - __local_first, __last - __first);
      auto __iters      = std::__copy<_AlgPolicy>(__first, __first + __size, __local_first);
      __first           = std::move(__iters.first);

      if (__first == __last)
        return std::make_pair(std::move(__first), _Traits::__compose(__segment_iterator, std::move(__iters.second)));

      __local_first = _Traits::__begin(++__segment_iterator);
    }
  }
};

struct __copy_trivial {
  // At this point, the iterators have been unwrapped so any `contiguous_iterator` has been unwrapped to a pointer.
  template <class _In, class _Out, __enable_if_t<__can_lower_copy_assignment_to_memmove<_In, _Out>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
  operator()(_In* __first, _In* __last, _Out* __result) const {
    return std::__copy_trivial_impl(__first, __last, __result);
  }
};

template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
pair<_InIter, _OutIter> inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
__copy(_InIter __first, _Sent __last, _OutIter __result) {
  return std::__dispatch_copy_or_move<_AlgPolicy, __copy_loop<_AlgPolicy>, __copy_trivial>(
      std::move(__first), std::move(__last), std::move(__result));
}

template <class _InputIterator, class _OutputIterator>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
  return std::__copy<_ClassicAlgPolicy>(__first, __last, __result).second;
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_COPY_H
# 125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy.h" 3
#endif /* copy.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_n.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_n.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_n.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_n.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/convert_to_integral.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_n.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_n.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_n.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_n.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template<class _InputIterator, class _Size, class _OutputIterator,
         __enable_if_t<__has_input_iterator_category<_InputIterator>::value &&
                       !__has_random_access_iterator_category<_InputIterator>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result)
{
    typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
    _IntegralSize __n = __orig_n;
    if (__n > 0)
    {
        *__result = *__first;
        ++__result;
        for (--__n; __n > 0; --__n)
        {
            ++__first;
            *__result = *__first;
            ++__result;
        }
    }
    return __result;
}

template<class _InputIterator, class _Size, class _OutputIterator,
         __enable_if_t<__has_random_access_iterator_category<_InputIterator>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result)
{
    typedef typename iterator_traits<_InputIterator>::difference_type difference_type;
    typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
    _IntegralSize __n = __orig_n;
    return _VSTD::copy(__first, __first + difference_type(__n), __result);
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_COPY_N_H
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_n.h" 3
#endif /* copy_n.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/fill_n.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* find_end.h expanded by -frewrite-includes */
#include <__algorithm/find_end.h>
#else /* find_end.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_FIND_END_OF_H
#define _LIBCPP___ALGORITHM_FIND_END_OF_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* search.h expanded by -frewrite-includes */
#include <__algorithm/search.h>
#else /* search.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_SEARCH_H
#define _LIBCPP___ALGORITHM_SEARCH_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_callable.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy,
          class _Iter1, class _Sent1,
          class _Iter2, class _Sent2,
          class _Pred,
          class _Proj1,
          class _Proj2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter1, _Iter1> __search_forward_impl(_Iter1 __first1, _Sent1 __last1,
                                           _Iter2 __first2, _Sent2 __last2,
                                           _Pred& __pred,
                                           _Proj1& __proj1,
                                           _Proj2& __proj2) {
  if (__first2 == __last2)
    return std::make_pair(__first1, __first1); // Everything matches an empty sequence
  while (true) {
    // Find first element in sequence 1 that matchs *__first2, with a mininum of loop checks
    while (true) {
      if (__first1 == __last1) { // return __last1 if no element matches *__first2
        _IterOps<_AlgPolicy>::__advance_to(__first1, __last1);
        return std::make_pair(__first1, __first1);
      }
      if (std::__invoke(__pred, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2)))
        break;
      ++__first1;
    }
    // *__first1 matches *__first2, now match elements after here
    _Iter1 __m1 = __first1;
    _Iter2 __m2 = __first2;
    while (true) {
      if (++__m2 == __last2) // If pattern exhausted, __first1 is the answer (works for 1 element pattern)
        return std::make_pair(__first1, ++__m1);
      if (++__m1 == __last1) { // Otherwise if source exhaused, pattern not found
        return std::make_pair(__m1, __m1);
      }

      // if there is a mismatch, restart with a new __first1
      if (!std::__invoke(__pred, std::__invoke(__proj1, *__m1), std::__invoke(__proj2, *__m2)))
      {
        ++__first1;
        break;
      } // else there is a match, check next elements
    }
  }
}

template <class _AlgPolicy,
          class _Iter1, class _Sent1,
          class _Iter2, class _Sent2,
          class _Pred,
          class _Proj1,
          class _Proj2,
          class _DiffT1,
          class _DiffT2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter1, _Iter1> __search_random_access_impl(_Iter1 __first1, _Sent1 __last1,
                                                 _Iter2 __first2, _Sent2 __last2,
                                                 _Pred& __pred,
                                                 _Proj1& __proj1,
                                                 _Proj2& __proj2,
                                                 _DiffT1 __size1,
                                                 _DiffT2 __size2) {
  const _Iter1 __s = __first1 + __size1 - _DiffT1(__size2 - 1); // Start of pattern match can't go beyond here

  while (true) {
    while (true) {
      if (__first1 == __s) {
        _IterOps<_AlgPolicy>::__advance_to(__first1, __last1);
        return std::make_pair(__first1, __first1);
      }
      if (std::__invoke(__pred, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2)))
        break;
      ++__first1;
    }

    _Iter1 __m1 = __first1;
    _Iter2 __m2 = __first2;
    while (true) {
      if (++__m2 == __last2)
        return std::make_pair(__first1, __first1 + _DiffT1(__size2));
      ++__m1; // no need to check range on __m1 because __s guarantees we have enough source
      if (!std::__invoke(__pred, std::__invoke(__proj1, *__m1), std::__invoke(__proj2, *__m2))) {
        ++__first1;
        break;
      }
    }
  }
}

template <class _Iter1, class _Sent1,
          class _Iter2, class _Sent2,
          class _Pred,
          class _Proj1,
          class _Proj2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter1, _Iter1> __search_impl(_Iter1 __first1, _Sent1 __last1,
                                   _Iter2 __first2, _Sent2 __last2,
                                   _Pred& __pred,
                                   _Proj1& __proj1,
                                   _Proj2& __proj2,
                                   __enable_if_t<__has_random_access_iterator_category<_Iter1>::value
                                              && __has_random_access_iterator_category<_Iter2>::value>* = nullptr) {

  auto __size2 = __last2 - __first2;
  if (__size2 == 0)
    return std::make_pair(__first1, __first1);

  auto __size1 = __last1 - __first1;
  if (__size1 < __size2) {
    return std::make_pair(__last1, __last1);
  }

  return std::__search_random_access_impl<_ClassicAlgPolicy>(__first1, __last1,
                                                             __first2, __last2,
                                                             __pred,
                                                             __proj1,
                                                             __proj2,
                                                             __size1,
                                                             __size2);
}

template <class _Iter1, class _Sent1,
          class _Iter2, class _Sent2,
          class _Pred,
          class _Proj1,
          class _Proj2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter1, _Iter1> __search_impl(_Iter1 __first1, _Sent1 __last1,
                                   _Iter2 __first2, _Sent2 __last2,
                                   _Pred& __pred,
                                   _Proj1& __proj1,
                                   _Proj2& __proj2,
                                   __enable_if_t<__has_forward_iterator_category<_Iter1>::value
                                              && __has_forward_iterator_category<_Iter2>::value
                                              && !(__has_random_access_iterator_category<_Iter1>::value
                                                && __has_random_access_iterator_category<_Iter2>::value)>* = nullptr) {
  return std::__search_forward_impl<_ClassicAlgPolicy>(__first1, __last1,
                                                       __first2, __last2,
                                                       __pred,
                                                       __proj1,
                                                       __proj2);
}

template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
                         _ForwardIterator2 __first2, _ForwardIterator2 __last2,
                         _BinaryPredicate __pred) {
  static_assert(__is_callable<_BinaryPredicate, decltype(*__first1), decltype(*__first2)>::value,
                "BinaryPredicate has to be callable");
  auto __proj = __identity();
  return std::__search_impl(__first1, __last1, __first2, __last2, __pred, __proj, __proj).first;
}

template <class _ForwardIterator1, class _ForwardIterator2>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
                         _ForwardIterator2 __first2, _ForwardIterator2 __last2) {
  return std::search(__first1, __last1, __first2, __last2, __equal_to());
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 192 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
template <class _ForwardIterator, class _Searcher>
_LIBCPP_NODISCARD_EXT _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher& __s) {
  return __s(__f, __l).first;
}

#endif
# 199 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_SEARCH_H
# 203 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search.h" 3
#endif /* search.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <
    class _AlgPolicy,
    class _Iter1,
    class _Sent1,
    class _Iter2,
    class _Sent2,
    class _Pred,
    class _Proj1,
    class _Proj2>
_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __find_end_impl(
    _Iter1 __first1,
    _Sent1 __last1,
    _Iter2 __first2,
    _Sent2 __last2,
    _Pred& __pred,
    _Proj1& __proj1,
    _Proj2& __proj2,
    forward_iterator_tag,
    forward_iterator_tag) {
  // modeled after search algorithm
  _Iter1 __match_first = _IterOps<_AlgPolicy>::next(__first1, __last1); // __last1 is the "default" answer
  _Iter1 __match_last = __match_first;
  if (__first2 == __last2)
    return pair<_Iter1, _Iter1>(__match_last, __match_last);
  while (true) {
    while (true) {
      if (__first1 == __last1) // if source exhausted return last correct answer (or __last1 if never found)
        return pair<_Iter1, _Iter1>(__match_first, __match_last);
      if (std::__invoke(__pred, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2)))
        break;
      ++__first1;
    }
    // *__first1 matches *__first2, now match elements after here
    _Iter1 __m1 = __first1;
    _Iter2 __m2 = __first2;
    while (true) {
      if (++__m2 == __last2) { // Pattern exhaused, record answer and search for another one
        __match_first = __first1;
        __match_last = ++__m1;
        ++__first1;
        break;
      }
      if (++__m1 == __last1) // Source exhausted, return last answer
        return pair<_Iter1, _Iter1>(__match_first, __match_last);
       // mismatch, restart with a new __first
      if (!std::__invoke(__pred, std::__invoke(__proj1, *__m1), std::__invoke(__proj2, *__m2)))
      {
        ++__first1;
        break;
      } // else there is a match, check next elements
    }
  }
}

template <
    class _IterOps,
    class _Pred,
    class _Iter1,
    class _Sent1,
    class _Iter2,
    class _Sent2,
    class _Proj1,
    class _Proj2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter1 __find_end(
    _Iter1 __first1,
    _Sent1 __sent1,
    _Iter2 __first2,
    _Sent2 __sent2,
    _Pred& __pred,
    _Proj1& __proj1,
    _Proj2& __proj2,
    bidirectional_iterator_tag,
    bidirectional_iterator_tag) {
  auto __last1 = _IterOps::next(__first1, __sent1);
  auto __last2 = _IterOps::next(__first2, __sent2);
  // modeled after search algorithm (in reverse)
  if (__first2 == __last2)
    return __last1; // Everything matches an empty sequence
  _Iter1 __l1 = __last1;
  _Iter2 __l2 = __last2;
  --__l2;
  while (true) {
    // Find last element in sequence 1 that matchs *(__last2-1), with a mininum of loop checks
    while (true) {
      if (__first1 == __l1) // return __last1 if no element matches *__first2
        return __last1;
      if (std::__invoke(__pred, std::__invoke(__proj1, *--__l1), std::__invoke(__proj2, *__l2)))
        break;
    }
    // *__l1 matches *__l2, now match elements before here
    _Iter1 __m1 = __l1;
    _Iter2 __m2 = __l2;
    while (true) {
      if (__m2 == __first2) // If pattern exhausted, __m1 is the answer (works for 1 element pattern)
        return __m1;
      if (__m1 == __first1) // Otherwise if source exhaused, pattern not found
        return __last1;

      // if there is a mismatch, restart with a new __l1
      if (!std::__invoke(__pred, std::__invoke(__proj1, *--__m1), std::__invoke(__proj2, *--__m2)))
      {
        break;
      } // else there is a match, check next elements
    }
  }
}

template <
    class _AlgPolicy,
    class _Pred,
    class _Iter1,
    class _Sent1,
    class _Iter2,
    class _Sent2,
    class _Proj1,
    class _Proj2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iter1 __find_end(
    _Iter1 __first1,
    _Sent1 __sent1,
    _Iter2 __first2,
    _Sent2 __sent2,
    _Pred& __pred,
    _Proj1& __proj1,
    _Proj2& __proj2,
    random_access_iterator_tag,
    random_access_iterator_tag) {
  typedef typename iterator_traits<_Iter1>::difference_type _D1;
  auto __last1 = _IterOps<_AlgPolicy>::next(__first1, __sent1);
  auto __last2 = _IterOps<_AlgPolicy>::next(__first2, __sent2);
  // Take advantage of knowing source and pattern lengths.  Stop short when source is smaller than pattern
  auto __len2 = __last2 - __first2;
  if (__len2 == 0)
    return __last1;
  auto __len1 = __last1 - __first1;
  if (__len1 < __len2)
    return __last1;
  const _Iter1 __s = __first1 + _D1(__len2 - 1); // End of pattern match can't go before here
  _Iter1 __l1 = __last1;
  _Iter2 __l2 = __last2;
  --__l2;
  while (true) {
    while (true) {
      if (__s == __l1)
        return __last1;
      if (std::__invoke(__pred, std::__invoke(__proj1, *--__l1), std::__invoke(__proj2, *__l2)))
        break;
    }
    _Iter1 __m1 = __l1;
    _Iter2 __m2 = __l2;
    while (true) {
      if (__m2 == __first2)
        return __m1;
      // no need to check range on __m1 because __s guarantees we have enough source
      if (!std::__invoke(__pred, std::__invoke(__proj1, *--__m1), std::__invoke(*--__m2))) {
        break;
      }
    }
  }
}

template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
_ForwardIterator1 __find_end_classic(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
                                     _ForwardIterator2 __first2, _ForwardIterator2 __last2,
                                     _BinaryPredicate& __pred) {
  auto __proj = __identity();
  return std::__find_end_impl<_ClassicAlgPolicy>(
             __first1,
             __last1,
             __first2,
             __last2,
             __pred,
             __proj,
             __proj,
             typename iterator_traits<_ForwardIterator1>::iterator_category(),
             typename iterator_traits<_ForwardIterator2>::iterator_category())
      .first;
}

template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
                           _ForwardIterator2 __first2, _ForwardIterator2 __last2,
                           _BinaryPredicate __pred) {
  return std::__find_end_classic(__first1, __last1, __first2, __last2, __pred);
}

template <class _ForwardIterator1, class _ForwardIterator2>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
                           _ForwardIterator2 __first2, _ForwardIterator2 __last2) {
  return std::find_end(__first1, __last1, __first2, __last2, __equal_to());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_FIND_END_OF_H
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_end.h" 3
#endif /* find_end.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* find_first_of.h expanded by -frewrite-includes */
#include <__algorithm/find_first_of.h>
#else /* find_first_of.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_first_of.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_FIND_FIRST_OF_H
#define _LIBCPP___ALGORITHM_FIND_FIRST_OF_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_first_of.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_first_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_first_of.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_first_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_first_of.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_first_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_first_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_first_of.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_first_of.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator1 __find_first_of_ce(_ForwardIterator1 __first1,
                                                                   _ForwardIterator1 __last1,
                                                                   _ForwardIterator2 __first2,
                                                                   _ForwardIterator2 __last2,
                                                                   _BinaryPredicate&& __pred) {
  for (; __first1 != __last1; ++__first1)
    for (_ForwardIterator2 __j = __first2; __j != __last2; ++__j)
      if (__pred(*__first1, *__j))
        return __first1;
  return __last1;
}

template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1
find_first_of(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
              _ForwardIterator2 __last2, _BinaryPredicate __pred) {
  return _VSTD::__find_first_of_ce(__first1, __last1, __first2, __last2, __pred);
}

template <class _ForwardIterator1, class _ForwardIterator2>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1 find_first_of(
    _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) {
  return std::__find_first_of_ce(__first1, __last1, __first2, __last2, __equal_to());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_FIND_FIRST_OF_H
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_first_of.h" 3
#endif /* find_first_of.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/hash.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__string/constexpr_c_functions.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cstdio expanded by -frewrite-includes */
#include <cstdio>
#else /* cstdio expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CSTDIO
#define _LIBCPP_CSTDIO

/*
    cstdio synopsis

Macros:

    BUFSIZ
    EOF
    FILENAME_MAX
    FOPEN_MAX
    L_tmpnam
    NULL
    SEEK_CUR
    SEEK_END
    SEEK_SET
    TMP_MAX
    _IOFBF
    _IOLBF
    _IONBF
    stderr
    stdin
    stdout

namespace std
{

Types:

FILE
fpos_t
size_t

int remove(const char* filename);
int rename(const char* old, const char* new);
FILE* tmpfile(void);
char* tmpnam(char* s);
int fclose(FILE* stream);
int fflush(FILE* stream);
FILE* fopen(const char* restrict filename, const char* restrict mode);
FILE* freopen(const char* restrict filename, const char * restrict mode,
              FILE * restrict stream);
void setbuf(FILE* restrict stream, char* restrict buf);
int setvbuf(FILE* restrict stream, char* restrict buf, int mode, size_t size);
int fprintf(FILE* restrict stream, const char* restrict format, ...);
int fscanf(FILE* restrict stream, const char * restrict format, ...);
int printf(const char* restrict format, ...);
int scanf(const char* restrict format, ...);
int snprintf(char* restrict s, size_t n, const char* restrict format, ...);    // C99
int sprintf(char* restrict s, const char* restrict format, ...);
int sscanf(const char* restrict s, const char* restrict format, ...);
int vfprintf(FILE* restrict stream, const char* restrict format, va_list arg);
int vfscanf(FILE* restrict stream, const char* restrict format, va_list arg);  // C99
int vprintf(const char* restrict format, va_list arg);
int vscanf(const char* restrict format, va_list arg);                          // C99
int vsnprintf(char* restrict s, size_t n, const char* restrict format,         // C99
              va_list arg);
int vsprintf(char* restrict s, const char* restrict format, va_list arg);
int vsscanf(const char* restrict s, const char* restrict format, va_list arg); // C99
int fgetc(FILE* stream);
char* fgets(char* restrict s, int n, FILE* restrict stream);
int fputc(int c, FILE* stream);
int fputs(const char* restrict s, FILE* restrict stream);
int getc(FILE* stream);
int getchar(void);
char* gets(char* s);  // removed in C++14
int putc(int c, FILE* stream);
int putchar(int c);
int puts(const char* s);
int ungetc(int c, FILE* stream);
size_t fread(void* restrict ptr, size_t size, size_t nmemb,
             FILE* restrict stream);
size_t fwrite(const void* restrict ptr, size_t size, size_t nmemb,
              FILE* restrict stream);
int fgetpos(FILE* restrict stream, fpos_t* restrict pos);
int fseek(FILE* stream, long offset, int whence);
int fsetpos(FILE*stream, const fpos_t* pos);
long ftell(FILE* stream);
void rewind(FILE* stream);
void clearerr(FILE* stream);
int feof(FILE* stream);
int ferror(FILE* stream);
void perror(const char* s);

}  // std
*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 3
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 3
# 100 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdio.h expanded by -frewrite-includes */
#include <stdio.h>
#else /* stdio.h expanded by -frewrite-includes */
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_FILE) || defined(__need___FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 11 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#endif
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#if 0 /* expanded by -frewrite-includes */
#include_next <stdio.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_STDIO_H)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#define _LIBCPP_STDIO_H

/*
    stdio.h synopsis

Macros:

    BUFSIZ
    EOF
    FILENAME_MAX
    FOPEN_MAX
    L_tmpnam
    NULL
    SEEK_CUR
    SEEK_END
    SEEK_SET
    TMP_MAX
    _IOFBF
    _IOLBF
    _IONBF
    stderr
    stdin
    stdout

Types:

FILE
fpos_t
size_t

int remove(const char* filename);
int rename(const char* old, const char* new);
FILE* tmpfile(void);
char* tmpnam(char* s);
int fclose(FILE* stream);
int fflush(FILE* stream);
FILE* fopen(const char* restrict filename, const char* restrict mode);
FILE* freopen(const char* restrict filename, const char * restrict mode,
              FILE * restrict stream);
void setbuf(FILE* restrict stream, char* restrict buf);
int setvbuf(FILE* restrict stream, char* restrict buf, int mode, size_t size);
int fprintf(FILE* restrict stream, const char* restrict format, ...);
int fscanf(FILE* restrict stream, const char * restrict format, ...);
int printf(const char* restrict format, ...);
int scanf(const char* restrict format, ...);
int snprintf(char* restrict s, size_t n, const char* restrict format, ...);    // C99
int sprintf(char* restrict s, const char* restrict format, ...);
int sscanf(const char* restrict s, const char* restrict format, ...);
int vfprintf(FILE* restrict stream, const char* restrict format, va_list arg);
int vfscanf(FILE* restrict stream, const char* restrict format, va_list arg);  // C99
int vprintf(const char* restrict format, va_list arg);
int vscanf(const char* restrict format, va_list arg);                          // C99
int vsnprintf(char* restrict s, size_t n, const char* restrict format,         // C99
              va_list arg);
int vsprintf(char* restrict s, const char* restrict format, va_list arg);
int vsscanf(const char* restrict s, const char* restrict format, va_list arg); // C99
int fgetc(FILE* stream);
char* fgets(char* restrict s, int n, FILE* restrict stream);
int fputc(int c, FILE* stream);
int fputs(const char* restrict s, FILE* restrict stream);
int getc(FILE* stream);
int getchar(void);
char* gets(char* s);  // removed in C++14
int putc(int c, FILE* stream);
int putchar(int c);
int puts(const char* s);
int ungetc(int c, FILE* stream);
size_t fread(void* restrict ptr, size_t size, size_t nmemb,
             FILE* restrict stream);
size_t fwrite(const void* restrict ptr, size_t size, size_t nmemb,
              FILE* restrict stream);
int fgetpos(FILE* restrict stream, fpos_t* restrict pos);
int fseek(FILE* stream, long offset, int whence);
int fsetpos(FILE*stream, const fpos_t* pos);
long ftell(FILE* stream);
void rewind(FILE* stream);
void clearerr(FILE* stream);
int feof(FILE* stream);
int ferror(FILE* stream);
void perror(const char* s);
*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#endif
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<stdio.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdio.h expanded by -frewrite-includes */
#    include_next <stdio.h>
#else /* stdio.h expanded by -frewrite-includes */
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
# 1 "gen/zircon/public/sysroot/cpp/include/stdio.h" 1 3 4
#ifndef SYSROOT_STDIO_H_
#define SYSROOT_STDIO_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4

#define __printflike(__fmt, __varargs) __attribute__((__format__(__printf__, __fmt, __varargs)))
#define __scanflike(__fmt, __varargs) __attribute__((__format__(__scanf__, __fmt, __varargs)))

#define __NEED_FILE
#define __NEED___isoc_va_list
#define __NEED_size_t

#if 0 /* disabled by -frewrite-includes */
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
    defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4
#define __NEED_ssize_t
#define __NEED_off_t
#define __NEED_va_list
#endif
# 23 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 24 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 25 "gen/zircon/public/sysroot/cpp/include/stdio.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <bits/null.h>
#endif /* expanded by -frewrite-includes */
# 25 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4
# 26 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4

#undef EOF
#define EOF (-1)

#undef SEEK_SET
#undef SEEK_CUR
#undef SEEK_END
#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2

#define _IOFBF 0
#define _IOLBF 1
#define _IONBF 2

#define BUFSIZ 1024
#define FILENAME_MAX 4096
#define FOPEN_MAX 1000
#define TMP_MAX 10000
#define L_tmpnam 20

typedef union _G_fpos64_t {
  char __opaque[16];
  double __align;
} fpos_t;

extern FILE* const stdin;
extern FILE* const stdout;
extern FILE* const stderr;

#define stdin (stdin)
#define stdout (stdout)
#define stderr (stderr)

FILE* fopen(const char* __restrict, const char* __restrict);
FILE* freopen(const char* __restrict, const char* __restrict, FILE* __restrict);
int fclose(FILE*);

int remove(const char*);
int rename(const char*, const char*);

int feof(FILE*);
int ferror(FILE*);
int fflush(FILE*);
void clearerr(FILE*);

int fseek(FILE*, long, int);
long ftell(FILE*);
void rewind(FILE*);

int fgetpos(FILE* __restrict, fpos_t* __restrict);
int fsetpos(FILE*, const fpos_t*);

size_t fread(void* __restrict, size_t, size_t, FILE* __restrict);
size_t fwrite(const void* __restrict, size_t, size_t, FILE* __restrict);

int fgetc(FILE*);
int getc(FILE*);
int getchar(void);
int ungetc(int, FILE*);

int fputc(int, FILE*);
int putc(int, FILE*);
int putchar(int);

char* fgets(char* __restrict, int, FILE* __restrict);
#if 0 /* disabled by -frewrite-includes */
#if __STDC_VERSION__ < 201112L
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4
char* gets(char*);
#endif
# 95 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4

int fputs(const char* __restrict, FILE* __restrict);
int puts(const char*);

int printf(const char* __restrict, ...) __printflike(1, 2);
int fprintf(FILE* __restrict, const char* __restrict, ...) __printflike(2, 3);
int sprintf(char* __restrict, const char* __restrict, ...) __printflike(2, 3);
int snprintf(char* __restrict, size_t, const char* __restrict, ...) __printflike(3, 4);

int vprintf(const char* __restrict, __isoc_va_list) __printflike(1, 0);
int vfprintf(FILE* __restrict, const char* __restrict, __isoc_va_list) __printflike(2, 0);
int vsprintf(char* __restrict, const char* __restrict, __isoc_va_list) __printflike(2, 0);
int vsnprintf(char* __restrict, size_t, const char* __restrict, __isoc_va_list) __printflike(3, 0);

int scanf(const char* __restrict, ...) __scanflike(1, 2);
int fscanf(FILE* __restrict, const char* __restrict, ...) __scanflike(2, 3);
int sscanf(const char* __restrict, const char* __restrict, ...) __scanflike(2, 3);
int vscanf(const char* __restrict, __isoc_va_list) __scanflike(1, 0);
int vfscanf(FILE* __restrict, const char* __restrict, __isoc_va_list) __scanflike(2, 0);
int vsscanf(const char* __restrict, const char* __restrict, __isoc_va_list) __scanflike(2, 0);

void perror(const char*);

int setvbuf(FILE* __restrict, char* __restrict, int, size_t);
void setbuf(FILE* __restrict, char* __restrict);

char* tmpnam(char*);
FILE* tmpfile(void);

#if 0 /* disabled by -frewrite-includes */
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
    defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 126 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4
FILE* fmemopen(void* __restrict, size_t, const char* __restrict);
FILE* open_memstream(char**, size_t*);
FILE* fdopen(int, const char*);
FILE* popen(const char*, const char*);
int pclose(FILE*);
int fileno(FILE*);
int fseeko(FILE*, off_t, int);
off_t ftello(FILE*);
int dprintf(int, const char* __restrict, ...) __printflike(2, 3);
int vdprintf(int, const char* __restrict, __isoc_va_list) __printflike(2, 0);
void flockfile(FILE*);
int ftrylockfile(FILE*);
void funlockfile(FILE*);
int getc_unlocked(FILE*);
int getchar_unlocked(void);
int putc_unlocked(int, FILE*);
int putchar_unlocked(int);
ssize_t getdelim(char** __restrict, size_t* __restrict, int, FILE* __restrict);
ssize_t getline(char** __restrict, size_t* __restrict, FILE* __restrict);
int renameat(int, const char*, int, const char*);
char* ctermid(char*);
#define L_ctermid 20
#endif
# 149 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 151 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4
#define P_tmpdir "/tmp"
char* tempnam(const char*, const char*);
#endif
# 154 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 156 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4
#define L_cuserid 20
char* cuserid(char*);
void setlinebuf(FILE*);
void setbuffer(FILE*, char*, size_t);
int fgetc_unlocked(FILE*);
int fputc_unlocked(int, FILE*);
int fflush_unlocked(FILE*);
size_t fread_unlocked(void*, size_t, size_t, FILE*);
size_t fwrite_unlocked(const void*, size_t, size_t, FILE*);
void clearerr_unlocked(FILE*);
int feof_unlocked(FILE*);
int ferror_unlocked(FILE*);
int fileno_unlocked(FILE*);
int getw(FILE*);
int putw(int, FILE*);
char* fgetln(FILE*, size_t*);
int asprintf(char**, const char*, ...) __printflike(2, 3);
int vasprintf(char**, const char*, __isoc_va_list) __printflike(2, 0);
#endif
# 175 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4

#ifdef _GNU_SOURCE
char* fgets_unlocked(char*, int, FILE*);
int fputs_unlocked(const char*, FILE*);
#endif
# 180 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4

#ifdef __cplusplus
}
#endif
# 184 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4

#endif  // SYSROOT_STDIO_H_
# 186 "gen/zircon/public/sysroot/cpp/include/stdio.h" 3 4
#endif /* stdio.h expanded by -frewrite-includes */
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 2 3
#  endif
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#ifdef __cplusplus

#undef getc
#undef putc
#undef clearerr
#undef feof
#undef ferror
#undef putchar
#undef getchar

#endif
# 122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#endif // _LIBCPP_STDIO_H
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#endif /* stdio.h expanded by -frewrite-includes */
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 2 3

#ifndef _LIBCPP_STDIO_H
#   error <cstdio> tried including <stdio.h> but didn't find libc++'s <stdio.h> header. \
          This usually means that your header search paths are not configured properly. \
          The header search paths should contain the C++ Standard Library headers before \
          any C Standard Library, and you are probably using compiler flags that make that \
          not be the case.
#endif
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 3
#endif
# 114 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 3

_LIBCPP_BEGIN_NAMESPACE_STD

using ::FILE _LIBCPP_USING_IF_EXISTS;
using ::fpos_t _LIBCPP_USING_IF_EXISTS;
using ::size_t _LIBCPP_USING_IF_EXISTS;

using ::fclose _LIBCPP_USING_IF_EXISTS;
using ::fflush _LIBCPP_USING_IF_EXISTS;
using ::setbuf _LIBCPP_USING_IF_EXISTS;
using ::setvbuf _LIBCPP_USING_IF_EXISTS;
using ::fprintf _LIBCPP_USING_IF_EXISTS;
using ::fscanf _LIBCPP_USING_IF_EXISTS;
using ::snprintf _LIBCPP_USING_IF_EXISTS;
using ::sprintf _LIBCPP_USING_IF_EXISTS;
using ::sscanf _LIBCPP_USING_IF_EXISTS;
using ::vfprintf _LIBCPP_USING_IF_EXISTS;
using ::vfscanf _LIBCPP_USING_IF_EXISTS;
using ::vsscanf _LIBCPP_USING_IF_EXISTS;
using ::vsnprintf _LIBCPP_USING_IF_EXISTS;
using ::vsprintf _LIBCPP_USING_IF_EXISTS;
using ::fgetc _LIBCPP_USING_IF_EXISTS;
using ::fgets _LIBCPP_USING_IF_EXISTS;
using ::fputc _LIBCPP_USING_IF_EXISTS;
using ::fputs _LIBCPP_USING_IF_EXISTS;
using ::getc _LIBCPP_USING_IF_EXISTS;
using ::putc _LIBCPP_USING_IF_EXISTS;
using ::ungetc _LIBCPP_USING_IF_EXISTS;
using ::fread _LIBCPP_USING_IF_EXISTS;
using ::fwrite _LIBCPP_USING_IF_EXISTS;
#ifndef _LIBCPP_HAS_NO_FGETPOS_FSETPOS
using ::fgetpos _LIBCPP_USING_IF_EXISTS;
#endif
# 147 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 3
using ::fseek _LIBCPP_USING_IF_EXISTS;
#ifndef _LIBCPP_HAS_NO_FGETPOS_FSETPOS
using ::fsetpos _LIBCPP_USING_IF_EXISTS;
#endif
# 151 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 3
using ::ftell _LIBCPP_USING_IF_EXISTS;
using ::rewind _LIBCPP_USING_IF_EXISTS;
using ::clearerr _LIBCPP_USING_IF_EXISTS;
using ::feof _LIBCPP_USING_IF_EXISTS;
using ::ferror _LIBCPP_USING_IF_EXISTS;
using ::perror _LIBCPP_USING_IF_EXISTS;

using ::fopen _LIBCPP_USING_IF_EXISTS;
using ::freopen _LIBCPP_USING_IF_EXISTS;
using ::remove _LIBCPP_USING_IF_EXISTS;
using ::rename _LIBCPP_USING_IF_EXISTS;
using ::tmpfile _LIBCPP_USING_IF_EXISTS;
using ::tmpnam _LIBCPP_USING_IF_EXISTS;

using ::getchar _LIBCPP_USING_IF_EXISTS;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 11 && !defined(_LIBCPP_C_HAS_NO_GETS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 167 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 3
using ::gets _LIBCPP_USING_IF_EXISTS;
#endif
# 169 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 3
using ::scanf _LIBCPP_USING_IF_EXISTS;
using ::vscanf _LIBCPP_USING_IF_EXISTS;

using ::printf _LIBCPP_USING_IF_EXISTS;
using ::putchar _LIBCPP_USING_IF_EXISTS;
using ::puts _LIBCPP_USING_IF_EXISTS;
using ::vprintf _LIBCPP_USING_IF_EXISTS;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_CSTDIO
# 180 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cstdio" 3
#endif /* cstdio expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cwchar expanded by -frewrite-includes */
#   include <cwchar> // for wmemcpy
#else /* cwchar expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CWCHAR
#define _LIBCPP_CWCHAR

/*
    cwchar synopsis

Macros:

    NULL
    WCHAR_MAX
    WCHAR_MIN
    WEOF

namespace std
{

Types:

    mbstate_t
    size_t
    tm
    wint_t

int fwprintf(FILE* restrict stream, const wchar_t* restrict format, ...);
int fwscanf(FILE* restrict stream, const wchar_t* restrict format, ...);
int swprintf(wchar_t* restrict s, size_t n, const wchar_t* restrict format, ...);
int swscanf(const wchar_t* restrict s, const wchar_t* restrict format, ...);
int vfwprintf(FILE* restrict stream, const wchar_t* restrict format, va_list arg);
int vfwscanf(FILE* restrict stream, const wchar_t* restrict format, va_list arg);  // C99
int vswprintf(wchar_t* restrict s, size_t n, const wchar_t* restrict format, va_list arg);
int vswscanf(const wchar_t* restrict s, const wchar_t* restrict format, va_list arg);  // C99
int vwprintf(const wchar_t* restrict format, va_list arg);
int vwscanf(const wchar_t* restrict format, va_list arg);  // C99
int wprintf(const wchar_t* restrict format, ...);
int wscanf(const wchar_t* restrict format, ...);
wint_t fgetwc(FILE* stream);
wchar_t* fgetws(wchar_t* restrict s, int n, FILE* restrict stream);
wint_t fputwc(wchar_t c, FILE* stream);
int fputws(const wchar_t* restrict s, FILE* restrict stream);
int fwide(FILE* stream, int mode);
wint_t getwc(FILE* stream);
wint_t getwchar();
wint_t putwc(wchar_t c, FILE* stream);
wint_t putwchar(wchar_t c);
wint_t ungetwc(wint_t c, FILE* stream);
double wcstod(const wchar_t* restrict nptr, wchar_t** restrict endptr);
float wcstof(const wchar_t* restrict nptr, wchar_t** restrict endptr);         // C99
long double wcstold(const wchar_t* restrict nptr, wchar_t** restrict endptr);  // C99
long wcstol(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
long long wcstoll(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);  // C99
unsigned long wcstoul(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
unsigned long long wcstoull(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);  // C99
wchar_t* wcscpy(wchar_t* restrict s1, const wchar_t* restrict s2);
wchar_t* wcsncpy(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
wchar_t* wcscat(wchar_t* restrict s1, const wchar_t* restrict s2);
wchar_t* wcsncat(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
int wcscmp(const wchar_t* s1, const wchar_t* s2);
int wcscoll(const wchar_t* s1, const wchar_t* s2);
int wcsncmp(const wchar_t* s1, const wchar_t* s2, size_t n);
size_t wcsxfrm(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
const wchar_t* wcschr(const wchar_t* s, wchar_t c);
      wchar_t* wcschr(      wchar_t* s, wchar_t c);
size_t wcscspn(const wchar_t* s1, const wchar_t* s2);
size_t wcslen(const wchar_t* s);
const wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2);
      wchar_t* wcspbrk(      wchar_t* s1, const wchar_t* s2);
const wchar_t* wcsrchr(const wchar_t* s, wchar_t c);
      wchar_t* wcsrchr(      wchar_t* s, wchar_t c);
size_t wcsspn(const wchar_t* s1, const wchar_t* s2);
const wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2);
      wchar_t* wcsstr(      wchar_t* s1, const wchar_t* s2);
wchar_t* wcstok(wchar_t* restrict s1, const wchar_t* restrict s2, wchar_t** restrict ptr);
const wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);
      wchar_t* wmemchr(      wchar_t* s, wchar_t c, size_t n);
int wmemcmp(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
wchar_t* wmemcpy(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
wchar_t* wmemmove(wchar_t* s1, const wchar_t* s2, size_t n);
wchar_t* wmemset(wchar_t* s, wchar_t c, size_t n);
size_t wcsftime(wchar_t* restrict s, size_t maxsize, const wchar_t* restrict format,
                const tm* restrict timeptr);
wint_t btowc(int c);
int wctob(wint_t c);
int mbsinit(const mbstate_t* ps);
size_t mbrlen(const char* restrict s, size_t n, mbstate_t* restrict ps);
size_t mbrtowc(wchar_t* restrict pwc, const char* restrict s, size_t n, mbstate_t* restrict ps);
size_t wcrtomb(char* restrict s, wchar_t wc, mbstate_t* restrict ps);
size_t mbsrtowcs(wchar_t* restrict dst, const char** restrict src, size_t len,
                 mbstate_t* restrict ps);
size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
                 mbstate_t* restrict ps);

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/apply_cv.h>
#endif /* expanded by -frewrite-includes */
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_equality_comparable.h>
#endif /* expanded by -frewrite-includes */
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cwctype expanded by -frewrite-includes */
#include <cwctype>
#else /* cwctype expanded by -frewrite-includes */
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CWCTYPE
#define _LIBCPP_CWCTYPE

/*
    cwctype synopsis

Macros:

    WEOF

namespace std
{

Types:

    wint_t
    wctrans_t
    wctype_t

int iswalnum(wint_t wc);
int iswalpha(wint_t wc);
int iswblank(wint_t wc);  // C99
int iswcntrl(wint_t wc);
int iswdigit(wint_t wc);
int iswgraph(wint_t wc);
int iswlower(wint_t wc);
int iswprint(wint_t wc);
int iswpunct(wint_t wc);
int iswspace(wint_t wc);
int iswupper(wint_t wc);
int iswxdigit(wint_t wc);
int iswctype(wint_t wc, wctype_t desc);
wctype_t wctype(const char* property);
wint_t towlower(wint_t wc);
wint_t towupper(wint_t wc);
wint_t towctrans(wint_t wc, wctrans_t desc);
wctrans_t wctrans(const char* property);

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 3
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 3
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cctype expanded by -frewrite-includes */
#include <cctype>
#else /* cctype expanded by -frewrite-includes */
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CCTYPE
#define _LIBCPP_CCTYPE

/*
    cctype synopsis

namespace std
{

int isalnum(int c);
int isalpha(int c);
int isblank(int c);  // C99
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int tolower(int c);
int toupper(int c);

}  // std
*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ctype.h expanded by -frewrite-includes */
#include <ctype.h>
#else /* ctype.h expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctype.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CTYPE_H
#define _LIBCPP_CTYPE_H

/*
    ctype.h synopsis

int isalnum(int c);
int isalpha(int c);
int isblank(int c);  // C99
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int tolower(int c);
int toupper(int c);
*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctype.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctype.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctype.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctype.h" 3
#endif
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctype.h" 3

#if 0 /* disabled by -frewrite-includes */
#if __has_include_next(<ctype.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctype.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ctype.h expanded by -frewrite-includes */
#  include_next <ctype.h>
#else /* ctype.h expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctype.h" 3
# 1 "gen/zircon/public/sysroot/cpp/include/ctype.h" 1 3 4
#ifndef SYSROOT_CTYPE_H_
#define SYSROOT_CTYPE_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/ctype.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/ctype.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/ctype.h" 3 4

int isalnum(int);
int isalpha(int);
int isblank(int);
int iscntrl(int);
int isdigit(int);
int isgraph(int);
int islower(int);
int isprint(int);
int ispunct(int);
int isspace(int);
int isupper(int);
int isxdigit(int);
int tolower(int);
int toupper(int);

#ifndef __cplusplus
static __inline int __isspace(int _c) { return _c == ' ' || (unsigned)_c - '\t' < 5; }

#define isalpha(a) (0 ? isalpha(a) : (((unsigned)(a) | 32) - 'a') < 26)
#define isdigit(a) (0 ? isdigit(a) : ((unsigned)(a) - '0') < 10)
#define islower(a) (0 ? islower(a) : ((unsigned)(a) - 'a') < 26)
#define isupper(a) (0 ? isupper(a) : ((unsigned)(a) - 'A') < 26)
#define isprint(a) (0 ? isprint(a) : ((unsigned)(a)-0x20) < 0x5f)
#define isgraph(a) (0 ? isgraph(a) : ((unsigned)(a)-0x21) < 0x5e)
#define isspace(a) __isspace(a)
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/ctype.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
    defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 39 "gen/zircon/public/sysroot/cpp/include/ctype.h" 3 4

int isascii(int);
int toascii(int);
#define _tolower(a) ((a) | 0x20)
#define _toupper(a) ((a)&0x5f)
#define isascii(a) (0 ? isascii(a) : (unsigned)(a) < 128)

#endif
# 47 "gen/zircon/public/sysroot/cpp/include/ctype.h" 3 4

#ifdef __cplusplus
}
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/ctype.h" 3 4

#endif  // SYSROOT_CTYPE_H_
# 53 "gen/zircon/public/sysroot/cpp/include/ctype.h" 3 4
#endif /* ctype.h expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctype.h" 2 3
#endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctype.h" 3

#ifdef __cplusplus

#undef isalnum
#undef isalpha
#undef isblank
#undef iscntrl
#undef isdigit
#undef isgraph
#undef islower
#undef isprint
#undef ispunct
#undef isspace
#undef isupper
#undef isxdigit
#undef tolower
#undef toupper

#endif
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctype.h" 3

#endif // _LIBCPP_CTYPE_H
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctype.h" 3
#endif /* ctype.h expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 2 3

#ifndef _LIBCPP_CTYPE_H
#   error <cctype> tried including <ctype.h> but didn't find libc++'s <ctype.h> header. \
          This usually means that your header search paths are not configured properly.  \
          The header search paths should contain the C++ Standard Library headers before \
          any C Standard Library.
#endif
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3
#endif
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#ifdef isalnum
#undef isalnum
#endif
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

#ifdef isalpha
#undef isalpha
#endif
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

#ifdef isblank
#undef isblank
#endif
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

#ifdef iscntrl
#undef iscntrl
#endif
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

#ifdef isdigit
#undef isdigit
#endif
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

#ifdef isgraph
#undef isgraph
#endif
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

#ifdef islower
#undef islower
#endif
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

#ifdef isprint
#undef isprint
#endif
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

#ifdef ispunct
#undef ispunct
#endif
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

#ifdef isspace
#undef isspace
#endif
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

#ifdef isupper
#undef isupper
#endif
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

#ifdef isxdigit
#undef isxdigit
#endif
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

#ifdef tolower
#undef tolower
#endif
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3

#ifdef toupper
#undef toupper
#endif
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3


using ::isalnum _LIBCPP_USING_IF_EXISTS;
using ::isalpha _LIBCPP_USING_IF_EXISTS;
using ::isblank _LIBCPP_USING_IF_EXISTS;
using ::iscntrl _LIBCPP_USING_IF_EXISTS;
using ::isdigit _LIBCPP_USING_IF_EXISTS;
using ::isgraph _LIBCPP_USING_IF_EXISTS;
using ::islower _LIBCPP_USING_IF_EXISTS;
using ::isprint _LIBCPP_USING_IF_EXISTS;
using ::ispunct _LIBCPP_USING_IF_EXISTS;
using ::isspace _LIBCPP_USING_IF_EXISTS;
using ::isupper _LIBCPP_USING_IF_EXISTS;
using ::isxdigit _LIBCPP_USING_IF_EXISTS;
using ::tolower _LIBCPP_USING_IF_EXISTS;
using ::toupper _LIBCPP_USING_IF_EXISTS;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_CCTYPE
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cctype" 3
#endif /* cctype expanded by -frewrite-includes */
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 2 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* wctype.h expanded by -frewrite-includes */
#include <wctype.h>
#else /* wctype.h expanded by -frewrite-includes */
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wctype.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_WCTYPE_H
#define _LIBCPP_WCTYPE_H

/*
    wctype.h synopsis

Macros:

    WEOF

Types:

    wint_t
    wctrans_t
    wctype_t

int iswalnum(wint_t wc);
int iswalpha(wint_t wc);
int iswblank(wint_t wc);  // C99
int iswcntrl(wint_t wc);
int iswdigit(wint_t wc);
int iswgraph(wint_t wc);
int iswlower(wint_t wc);
int iswprint(wint_t wc);
int iswpunct(wint_t wc);
int iswspace(wint_t wc);
int iswupper(wint_t wc);
int iswxdigit(wint_t wc);
int iswctype(wint_t wc, wctype_t desc);
wctype_t wctype(const char* property);
wint_t towlower(wint_t wc);
wint_t towupper(wint_t wc);
wint_t towctrans(wint_t wc, wctrans_t desc);
wctrans_t wctrans(const char* property);

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wctype.h" 3
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wctype.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wctype.h" 3
#   error "The <wctype.h> header is not supported since libc++ has been configured with LIBCXX_ENABLE_WIDE_CHARACTERS disabled"
#endif
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wctype.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wctype.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wctype.h" 3
#endif
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wctype.h" 3

// TODO:
// In the future, we should unconditionally include_next <wctype.h> here and instead
// have a mode under which the library does not need libc++'s <wctype.h> or <cwctype>
// at all (i.e. a mode without wchar_t). As it stands, we need to do that to completely
// bypass the using declarations in <cwctype> when we did not include <wctype.h>.
// Otherwise, a using declaration like `using ::wint_t` in <cwctype> will refer to
// nothing (with using_if_exists), and if we include another header that defines one
// of these declarations (e.g. <wchar.h>), the second `using ::wint_t` with using_if_exists
// will fail because it does not refer to the same declaration.
#if 0 /* disabled by -frewrite-includes */
#if __has_include_next(<wctype.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wctype.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* wctype.h expanded by -frewrite-includes */
#   include_next <wctype.h>
#else /* wctype.h expanded by -frewrite-includes */
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wctype.h" 3
# 1 "gen/zircon/public/sysroot/cpp/include/wctype.h" 1 3 4
#ifndef SYSROOT_WCTYPE_H_
#define SYSROOT_WCTYPE_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/wctype.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/wctype.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/wctype.h" 3 4

#define __NEED_wint_t
#define __NEED_wctype_t

#if 0 /* disabled by -frewrite-includes */
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
    defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "gen/zircon/public/sysroot/cpp/include/wctype.h" 3 4
#define __NEED_locale_t
#endif
# 17 "gen/zircon/public/sysroot/cpp/include/wctype.h" 3 4

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/wctype.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 19 "gen/zircon/public/sysroot/cpp/include/wctype.h" 2 3 4

typedef const int* wctrans_t;

#undef WEOF
#define WEOF 0xffffffffU

#undef iswdigit

int iswalnum(wint_t);
int iswalpha(wint_t);
int iswblank(wint_t);
int iswcntrl(wint_t);
int iswdigit(wint_t);
int iswgraph(wint_t);
int iswlower(wint_t);
int iswprint(wint_t);
int iswpunct(wint_t);
int iswspace(wint_t);
int iswupper(wint_t);
int iswxdigit(wint_t);
int iswctype(wint_t, wctype_t);
wint_t towctrans(wint_t, wctrans_t);
wint_t towlower(wint_t);
wint_t towupper(wint_t);
wctrans_t wctrans(const char*);
wctype_t wctype(const char*);

#ifndef __cplusplus
#undef iswdigit
#define iswdigit(a) (0 ? iswdigit(a) : ((unsigned)(a) - '0') < 10)
#endif
# 50 "gen/zircon/public/sysroot/cpp/include/wctype.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
    defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/wctype.h" 3 4

#endif
# 55 "gen/zircon/public/sysroot/cpp/include/wctype.h" 3 4

#ifdef __cplusplus
}
#endif
# 59 "gen/zircon/public/sysroot/cpp/include/wctype.h" 3 4

#endif  // SYSROOT_WCTYPE_H_
# 61 "gen/zircon/public/sysroot/cpp/include/wctype.h" 3 4
#endif /* wctype.h expanded by -frewrite-includes */
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wctype.h" 2 3
#   define _LIBCPP_INCLUDED_C_LIBRARY_WCTYPE_H
#endif
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wctype.h" 3

#ifdef __cplusplus

#undef iswalnum
#undef iswalpha
#undef iswblank
#undef iswcntrl
#undef iswdigit
#undef iswgraph
#undef iswlower
#undef iswprint
#undef iswpunct
#undef iswspace
#undef iswupper
#undef iswxdigit
#undef iswctype
#undef wctype
#undef towlower
#undef towupper
#undef towctrans
#undef wctrans

#endif // __cplusplus
# 93 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wctype.h" 3

#endif // _LIBCPP_WCTYPE_H
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wctype.h" 3
#endif /* wctype.h expanded by -frewrite-includes */
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 2 3

#ifndef _LIBCPP_WCTYPE_H
#   error <cwctype> tried including <wctype.h> but didn't find libc++'s <wctype.h> header. \
          This usually means that your header search paths are not configured properly. \
          The header search paths should contain the C++ Standard Library headers before \
          any C Standard Library, and you are probably using compiler flags that make that \
          not be the case.
#endif
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 3
#endif
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_INCLUDED_C_LIBRARY_WCTYPE_H)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 3
using ::wint_t _LIBCPP_USING_IF_EXISTS;
using ::wctrans_t _LIBCPP_USING_IF_EXISTS;
using ::wctype_t _LIBCPP_USING_IF_EXISTS;
using ::iswalnum _LIBCPP_USING_IF_EXISTS;
using ::iswalpha _LIBCPP_USING_IF_EXISTS;
using ::iswblank _LIBCPP_USING_IF_EXISTS;
using ::iswcntrl _LIBCPP_USING_IF_EXISTS;
using ::iswdigit _LIBCPP_USING_IF_EXISTS;
using ::iswgraph _LIBCPP_USING_IF_EXISTS;
using ::iswlower _LIBCPP_USING_IF_EXISTS;
using ::iswprint _LIBCPP_USING_IF_EXISTS;
using ::iswpunct _LIBCPP_USING_IF_EXISTS;
using ::iswspace _LIBCPP_USING_IF_EXISTS;
using ::iswupper _LIBCPP_USING_IF_EXISTS;
using ::iswxdigit _LIBCPP_USING_IF_EXISTS;
using ::iswctype _LIBCPP_USING_IF_EXISTS;
using ::wctype _LIBCPP_USING_IF_EXISTS;
using ::towlower _LIBCPP_USING_IF_EXISTS;
using ::towupper _LIBCPP_USING_IF_EXISTS;
using ::towctrans _LIBCPP_USING_IF_EXISTS;
using ::wctrans _LIBCPP_USING_IF_EXISTS;
#endif // _LIBCPP_INCLUDED_C_LIBRARY_WCTYPE_H
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_CWCTYPE
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwctype" 3
#endif /* cwctype expanded by -frewrite-includes */
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 2 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* wchar.h expanded by -frewrite-includes */
#include <wchar.h>
#else /* wchar.h expanded by -frewrite-includes */
# 114 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_wint_t) || defined(__need_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 11 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#endif
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#if 0 /* expanded by -frewrite-includes */
#include_next <wchar.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_WCHAR_H)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#define _LIBCPP_WCHAR_H

/*
    wchar.h synopsis

Macros:

    NULL
    WCHAR_MAX
    WCHAR_MIN
    WEOF

Types:

    mbstate_t
    size_t
    tm
    wint_t

int fwprintf(FILE* restrict stream, const wchar_t* restrict format, ...);
int fwscanf(FILE* restrict stream, const wchar_t* restrict format, ...);
int swprintf(wchar_t* restrict s, size_t n, const wchar_t* restrict format, ...);
int swscanf(const wchar_t* restrict s, const wchar_t* restrict format, ...);
int vfwprintf(FILE* restrict stream, const wchar_t* restrict format, va_list arg);
int vfwscanf(FILE* restrict stream, const wchar_t* restrict format, va_list arg);  // C99
int vswprintf(wchar_t* restrict s, size_t n, const wchar_t* restrict format, va_list arg);
int vswscanf(const wchar_t* restrict s, const wchar_t* restrict format, va_list arg);  // C99
int vwprintf(const wchar_t* restrict format, va_list arg);
int vwscanf(const wchar_t* restrict format, va_list arg);  // C99
int wprintf(const wchar_t* restrict format, ...);
int wscanf(const wchar_t* restrict format, ...);
wint_t fgetwc(FILE* stream);
wchar_t* fgetws(wchar_t* restrict s, int n, FILE* restrict stream);
wint_t fputwc(wchar_t c, FILE* stream);
int fputws(const wchar_t* restrict s, FILE* restrict stream);
int fwide(FILE* stream, int mode);
wint_t getwc(FILE* stream);
wint_t getwchar();
wint_t putwc(wchar_t c, FILE* stream);
wint_t putwchar(wchar_t c);
wint_t ungetwc(wint_t c, FILE* stream);
double wcstod(const wchar_t* restrict nptr, wchar_t** restrict endptr);
float wcstof(const wchar_t* restrict nptr, wchar_t** restrict endptr);         // C99
long double wcstold(const wchar_t* restrict nptr, wchar_t** restrict endptr);  // C99
long wcstol(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
long long wcstoll(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);  // C99
unsigned long wcstoul(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
unsigned long long wcstoull(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);  // C99
wchar_t* wcscpy(wchar_t* restrict s1, const wchar_t* restrict s2);
wchar_t* wcsncpy(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
wchar_t* wcscat(wchar_t* restrict s1, const wchar_t* restrict s2);
wchar_t* wcsncat(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
int wcscmp(const wchar_t* s1, const wchar_t* s2);
int wcscoll(const wchar_t* s1, const wchar_t* s2);
int wcsncmp(const wchar_t* s1, const wchar_t* s2, size_t n);
size_t wcsxfrm(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
const wchar_t* wcschr(const wchar_t* s, wchar_t c);
      wchar_t* wcschr(      wchar_t* s, wchar_t c);
size_t wcscspn(const wchar_t* s1, const wchar_t* s2);
size_t wcslen(const wchar_t* s);
const wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2);
      wchar_t* wcspbrk(      wchar_t* s1, const wchar_t* s2);
const wchar_t* wcsrchr(const wchar_t* s, wchar_t c);
      wchar_t* wcsrchr(      wchar_t* s, wchar_t c);
size_t wcsspn(const wchar_t* s1, const wchar_t* s2);
const wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2);
      wchar_t* wcsstr(      wchar_t* s1, const wchar_t* s2);
wchar_t* wcstok(wchar_t* restrict s1, const wchar_t* restrict s2, wchar_t** restrict ptr);
const wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);
      wchar_t* wmemchr(      wchar_t* s, wchar_t c, size_t n);
int wmemcmp(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
wchar_t* wmemcpy(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
wchar_t* wmemmove(wchar_t* s1, const wchar_t* s2, size_t n);
wchar_t* wmemset(wchar_t* s, wchar_t c, size_t n);
size_t wcsftime(wchar_t* restrict s, size_t maxsize, const wchar_t* restrict format,
                const tm* restrict timeptr);
wint_t btowc(int c);
int wctob(wint_t c);
int mbsinit(const mbstate_t* ps);
size_t mbrlen(const char* restrict s, size_t n, mbstate_t* restrict ps);
size_t mbrtowc(wchar_t* restrict pwc, const char* restrict s, size_t n, mbstate_t* restrict ps);
size_t wcrtomb(char* restrict s, wchar_t wc, mbstate_t* restrict ps);
size_t mbsrtowcs(wchar_t* restrict dst, const char** restrict src, size_t len,
                 mbstate_t* restrict ps);
size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
                 mbstate_t* restrict ps);

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stddef.h expanded by -frewrite-includes */
#include <stddef.h>
#else /* stddef.h expanded by -frewrite-includes */
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_ptrdiff_t) || defined(__need_size_t) || \
    defined(__need_wchar_t) || defined(__need_NULL) || defined(__need_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#endif
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* expanded by -frewrite-includes */
#include_next <stddef.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_STDDEF_H)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#define _LIBCPP_STDDEF_H

/*
    stddef.h synopsis

Macros:

    offsetof(type,member-designator)
    NULL

Types:

    ptrdiff_t
    size_t
    max_align_t // C++11
    nullptr_t

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<stddef.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#    include_next <stddef.h>
#endif /* expanded by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#  endif
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#ifdef __cplusplus
    typedef decltype(nullptr) nullptr_t;
#endif
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#endif // _LIBCPP_STDDEF_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#endif /* stddef.h expanded by -frewrite-includes */
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#   error "The <wchar.h> header is not supported since libc++ has been configured with LIBCXX_ENABLE_WIDE_CHARACTERS disabled"
#endif
# 114 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#endif
# 118 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

// We define this here to support older versions of glibc <wchar.h> that do
// not define this for clang.
#ifdef __cplusplus
#define __CORRECT_ISO_CPP_WCHAR_H_PROTO
#endif
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<wchar.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if 0 /* expanded by -frewrite-includes */
#    include_next <wchar.h>
#endif /* expanded by -frewrite-includes */
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
# 127 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#  else
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if 0 /* expanded by -frewrite-includes */
#    include <__mbstate_t.h> // make sure we have mbstate_t regardless of the existence of <wchar.h>
#endif /* expanded by -frewrite-includes */
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
# 129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#  endif
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

// Determine whether we have const-correct overloads for wcschr and friends.
#if 0 /* disabled by -frewrite-includes */
#if defined(_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#  define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__GLIBC_PREREQ)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if 0 /* disabled by -frewrite-includes */
#  if __GLIBC_PREREQ(2, 10)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#    define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
#  endif
# 138 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_LIBCPP_MSVCRT)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if 0 /* disabled by -frewrite-includes */
#  if defined(_CRT_CONST_CORRECT_OVERLOADS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 140 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#    define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
#  endif
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#endif
# 143 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(_LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS) && defined(_LIBCPP_PREFERRED_OVERLOAD)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
extern "C++" {
inline _LIBCPP_INLINE_VISIBILITY
wchar_t* __libcpp_wcschr(const wchar_t* __s, wchar_t __c) {return (wchar_t*)wcschr(__s, __c);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
const wchar_t* wcschr(const wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
      wchar_t* wcschr(      wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);}

inline _LIBCPP_INLINE_VISIBILITY
wchar_t* __libcpp_wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcspbrk(__s1, __s2);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
const wchar_t* wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcspbrk(__s1, __s2);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
      wchar_t* wcspbrk(      wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcspbrk(__s1, __s2);}

inline _LIBCPP_INLINE_VISIBILITY
wchar_t* __libcpp_wcsrchr(const wchar_t* __s, wchar_t __c) {return (wchar_t*)wcsrchr(__s, __c);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
const wchar_t* wcsrchr(const wchar_t* __s, wchar_t __c) {return __libcpp_wcsrchr(__s, __c);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
      wchar_t* wcsrchr(      wchar_t* __s, wchar_t __c) {return __libcpp_wcsrchr(__s, __c);}

inline _LIBCPP_INLINE_VISIBILITY
wchar_t* __libcpp_wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcsstr(__s1, __s2);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
const wchar_t* wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcsstr(__s1, __s2);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
      wchar_t* wcsstr(      wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcsstr(__s1, __s2);}

inline _LIBCPP_INLINE_VISIBILITY
wchar_t* __libcpp_wmemchr(const wchar_t* __s, wchar_t __c, size_t __n) {return (wchar_t*)wmemchr(__s, __c, __n);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
const wchar_t* wmemchr(const wchar_t* __s, wchar_t __c, size_t __n) {return __libcpp_wmemchr(__s, __c, __n);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
      wchar_t* wmemchr(      wchar_t* __s, wchar_t __c, size_t __n) {return __libcpp_wmemchr(__s, __c, __n);}
}
#endif
# 182 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && (defined(_LIBCPP_MSVCRT_LIKE) || defined(__MVS__))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 184 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
extern "C" {
size_t mbsnrtowcs(wchar_t *__restrict __dst, const char **__restrict __src,
                  size_t __nmc, size_t __len, mbstate_t *__restrict __ps);
size_t wcsnrtombs(char *__restrict __dst, const wchar_t **__restrict __src,
                  size_t __nwc, size_t __len, mbstate_t *__restrict __ps);
} // extern "C"
#endif  // __cplusplus && (_LIBCPP_MSVCRT || __MVS__)
# 191 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#endif // _LIBCPP_WCHAR_H
# 193 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#endif /* wchar.h expanded by -frewrite-includes */
# 115 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 2 3

#ifndef _LIBCPP_WCHAR_H
#   error <cwchar> tried including <wchar.h> but didn't find libc++'s <wchar.h> header. \
          This usually means that your header search paths are not configured properly. \
          The header search paths should contain the C++ Standard Library headers before \
          any C Standard Library, and you are probably using compiler flags that make that \
          not be the case.
#endif
# 123 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
#endif
# 127 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3

_LIBCPP_BEGIN_NAMESPACE_STD

using ::mbstate_t _LIBCPP_USING_IF_EXISTS;
using ::size_t _LIBCPP_USING_IF_EXISTS;
using ::tm _LIBCPP_USING_IF_EXISTS;
using ::wint_t _LIBCPP_USING_IF_EXISTS;
using ::FILE _LIBCPP_USING_IF_EXISTS;
using ::fwprintf _LIBCPP_USING_IF_EXISTS;
using ::fwscanf _LIBCPP_USING_IF_EXISTS;
using ::swprintf _LIBCPP_USING_IF_EXISTS;
using ::vfwprintf _LIBCPP_USING_IF_EXISTS;
using ::vswprintf _LIBCPP_USING_IF_EXISTS;
using ::swscanf _LIBCPP_USING_IF_EXISTS;
using ::vfwscanf _LIBCPP_USING_IF_EXISTS;
using ::vswscanf _LIBCPP_USING_IF_EXISTS;
using ::fgetwc _LIBCPP_USING_IF_EXISTS;
using ::fgetws _LIBCPP_USING_IF_EXISTS;
using ::fputwc _LIBCPP_USING_IF_EXISTS;
using ::fputws _LIBCPP_USING_IF_EXISTS;
using ::fwide _LIBCPP_USING_IF_EXISTS;
using ::getwc _LIBCPP_USING_IF_EXISTS;
using ::putwc _LIBCPP_USING_IF_EXISTS;
using ::ungetwc _LIBCPP_USING_IF_EXISTS;
using ::wcstod _LIBCPP_USING_IF_EXISTS;
using ::wcstof _LIBCPP_USING_IF_EXISTS;
using ::wcstold _LIBCPP_USING_IF_EXISTS;
using ::wcstol _LIBCPP_USING_IF_EXISTS;
using ::wcstoll _LIBCPP_USING_IF_EXISTS;
using ::wcstoul _LIBCPP_USING_IF_EXISTS;
using ::wcstoull _LIBCPP_USING_IF_EXISTS;
using ::wcscpy _LIBCPP_USING_IF_EXISTS;
using ::wcsncpy _LIBCPP_USING_IF_EXISTS;
using ::wcscat _LIBCPP_USING_IF_EXISTS;
using ::wcsncat _LIBCPP_USING_IF_EXISTS;
using ::wcscmp _LIBCPP_USING_IF_EXISTS;
using ::wcscoll _LIBCPP_USING_IF_EXISTS;
using ::wcsncmp _LIBCPP_USING_IF_EXISTS;
using ::wcsxfrm _LIBCPP_USING_IF_EXISTS;
using ::wcschr _LIBCPP_USING_IF_EXISTS;
using ::wcspbrk _LIBCPP_USING_IF_EXISTS;
using ::wcsrchr _LIBCPP_USING_IF_EXISTS;
using ::wcsstr _LIBCPP_USING_IF_EXISTS;
using ::wmemchr _LIBCPP_USING_IF_EXISTS;
using ::wcscspn _LIBCPP_USING_IF_EXISTS;
using ::wcslen _LIBCPP_USING_IF_EXISTS;
using ::wcsspn _LIBCPP_USING_IF_EXISTS;
using ::wcstok _LIBCPP_USING_IF_EXISTS;
using ::wmemcmp _LIBCPP_USING_IF_EXISTS;
using ::wmemcpy _LIBCPP_USING_IF_EXISTS;
using ::wmemmove _LIBCPP_USING_IF_EXISTS;
using ::wmemset _LIBCPP_USING_IF_EXISTS;
using ::wcsftime _LIBCPP_USING_IF_EXISTS;
using ::btowc _LIBCPP_USING_IF_EXISTS;
using ::wctob _LIBCPP_USING_IF_EXISTS;
using ::mbsinit _LIBCPP_USING_IF_EXISTS;
using ::mbrlen _LIBCPP_USING_IF_EXISTS;
using ::mbrtowc _LIBCPP_USING_IF_EXISTS;
using ::wcrtomb _LIBCPP_USING_IF_EXISTS;
using ::mbsrtowcs _LIBCPP_USING_IF_EXISTS;
using ::wcsrtombs _LIBCPP_USING_IF_EXISTS;

using ::getwchar _LIBCPP_USING_IF_EXISTS;
using ::vwscanf _LIBCPP_USING_IF_EXISTS;
using ::wscanf _LIBCPP_USING_IF_EXISTS;

using ::putwchar _LIBCPP_USING_IF_EXISTS;
using ::vwprintf _LIBCPP_USING_IF_EXISTS;
using ::wprintf _LIBCPP_USING_IF_EXISTS;

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 size_t __constexpr_wcslen(const wchar_t* __str) {
#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__builtin_wcslen)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 199 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
  return __builtin_wcslen(__str);
#else
# 201 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
  if (!__libcpp_is_constant_evaluated())
    return std::wcslen(__str);

  size_t __len = 0;
  for (; *__str != L'\0'; ++__str)
    ++__len;
  return __len;
#endif
# 209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 int
__constexpr_wmemcmp(const wchar_t* __lhs, const wchar_t* __rhs, size_t __count) {
#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__builtin_wmemcmp)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
  return __builtin_wmemcmp(__lhs, __rhs, __count);
#else
# 216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
  if (!__libcpp_is_constant_evaluated())
    return std::wmemcmp(__lhs, __rhs, __count);

  for (; __count; --__count, ++__lhs, ++__rhs) {
    if (*__lhs < *__rhs)
      return -1;
    if (*__rhs < *__lhs)
      return 1;
  }
  return 0;
#endif
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
}

template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __constexpr_wmemchr(_Tp* __str, _Up __value, size_t __count) {
  static_assert(sizeof(_Tp) == sizeof(wchar_t)&& _LIBCPP_ALIGNOF(_Tp) >= _LIBCPP_ALIGNOF(wchar_t) &&
                    __libcpp_is_trivially_equality_comparable<_Tp, _Tp>::value,
                "Calling wmemchr on non-trivially equality comparable types is unsafe.");

#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__builtin_wmemchr)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 236 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
  if (!__libcpp_is_constant_evaluated()) {
    wchar_t __value_buffer = 0;
    __builtin_memcpy(&__value_buffer, &__value, sizeof(wchar_t));
    return reinterpret_cast<_Tp*>(
        __builtin_wmemchr(reinterpret_cast<__apply_cv_t<_Tp, wchar_t>*>(__str), __value_buffer, __count));
  }
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 243 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
  else if constexpr (is_same_v<remove_cv_t<_Tp>, wchar_t>)
    return __builtin_wmemchr(__str, __value, __count);
#  endif
# 246 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
#endif // __has_builtin(__builtin_wmemchr)
# 247 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3

  for (; __count; --__count) {
    if (*__str == __value)
      return __str;
    ++__str;
  }
  return nullptr;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_CWCHAR
# 259 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cwchar" 3
#endif /* cwchar expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 2 3
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
#endif
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _CharT>
struct char_traits;
/*
The Standard does not define the base template for char_traits because it is impossible to provide
a correct definition for arbitrary character types. Instead, it requires implementations to provide
specializations for predefined character types like `char`, `wchar_t` and others. We provide this as
exposition-only to document what members a char_traits specialization should provide:
{
    using char_type  = _CharT;
    using int_type   = ...;
    using off_type   = ...;
    using pos_type   = ...;
    using state_type = ...;

    static void assign(char_type&, const char_type&);
    static bool eq(char_type, char_type);
    static bool lt(char_type, char_type);

    static int              compare(const char_type*, const char_type*, size_t);
    static size_t           length(const char_type*);
    static const char_type* find(const char_type*, size_t, const char_type&);
    static char_type*       move(char_type*, const char_type*, size_t);
    static char_type*       copy(char_type*, const char_type*, size_t);
    static char_type*       assign(char_type*, size_t, char_type);

    static int_type  not_eof(int_type);
    static char_type to_char_type(int_type);
    static int_type  to_int_type(char_type);
    static bool      eq_int_type(int_type, int_type);
    static int_type  eof();
};
*/

//
// Temporary extension to provide a base template for std::char_traits.
// TODO(LLVM-19): Remove this class.
//
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_CHAR_TRAITS_REMOVE_BASE_SPECIALIZATION)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
template <class _CharT>
struct _LIBCPP_DEPRECATED_("char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 18, so please migrate off of it.")
    char_traits
{
    using char_type  = _CharT;
    using int_type   = int;
    using off_type   = streamoff;
    using pos_type   = streampos;
    using state_type = mbstate_t;

    static inline void _LIBCPP_CONSTEXPR_SINCE_CXX17 _LIBCPP_HIDE_FROM_ABI
        assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
        {return __c1 == __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
        {return __c1 < __c2;}

    static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    int compare(const char_type* __s1, const char_type* __s2, size_t __n) {
        for (; __n; --__n, ++__s1, ++__s2)
        {
            if (lt(*__s1, *__s2))
                return -1;
            if (lt(*__s2, *__s1))
                return 1;
        }
        return 0;
    }
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
    size_t length(const char_type* __s) {
        size_t __len = 0;
        for (; !eq(*__s, char_type(0)); ++__s)
            ++__len;
        return __len;
    }
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
    const char_type* find(const char_type* __s, size_t __n, const char_type& __a) {
        for (; __n; --__n)
        {
            if (eq(*__s, __a))
                return __s;
            ++__s;
        }
        return nullptr;
    }
    static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    char_type*       move(char_type* __s1, const char_type* __s2, size_t __n) {
        if (__n == 0) return __s1;
        char_type* __r = __s1;
        if (__s1 < __s2)
        {
            for (; __n; --__n, ++__s1, ++__s2)
                assign(*__s1, *__s2);
        }
        else if (__s2 < __s1)
        {
            __s1 += __n;
            __s2 += __n;
            for (; __n; --__n)
                assign(*--__s1, *--__s2);
        }
        return __r;
    }
    _LIBCPP_INLINE_VISIBILITY
    static _LIBCPP_CONSTEXPR_SINCE_CXX20
    char_type*       copy(char_type* __s1, const char_type* __s2, size_t __n) {
        if (!__libcpp_is_constant_evaluated()) {
            _LIBCPP_ASSERT_NON_OVERLAPPING_RANGES(
                __s2 < __s1 || __s2 >= __s1 + __n, "char_traits::copy overlapped range");
        }
        char_type* __r = __s1;
        for (; __n; --__n, ++__s1, ++__s2)
            assign(*__s1, *__s2);
        return __r;
    }
    _LIBCPP_INLINE_VISIBILITY
    static _LIBCPP_CONSTEXPR_SINCE_CXX20
    char_type*       assign(char_type* __s, size_t __n, char_type __a) {
        char_type* __r = __s;
        for (; __n; --__n, ++__s)
            assign(*__s, __a);
        return __r;
    }

    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
        {return eq_int_type(__c, eof()) ? ~eof() : __c;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
        {return char_type(__c);}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type  to_int_type(char_type __c) _NOEXCEPT
        {return int_type(__c);}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool      eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
        {return __c1 == __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type  eof() _NOEXCEPT
        {return int_type(EOF);}
};
#endif // !defined(_LIBCPP_CHAR_TRAITS_REMOVE_BASE_SPECIALIZATION)
# 175 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3

// char_traits<char>

template <>
struct _LIBCPP_TEMPLATE_VIS char_traits<char>
{
    using char_type           = char;
    using int_type            = int;
    using off_type            = streamoff;
    using pos_type            = streampos;
    using state_type          = mbstate_t;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 187 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
    using comparison_category = strong_ordering;
#endif
# 189 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3

    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;}

    // TODO: Make this _LIBCPP_HIDE_FROM_ABI
    static inline _LIBCPP_HIDDEN _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
            {return __c1 == __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
        {return (unsigned char)__c1 < (unsigned char)__c2;}

    // __constexpr_memcmp requires a trivially lexicographically comparable type, but char is not when char is a signed type
    static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 int
    compare(const char_type* __lhs, const char_type* __rhs, size_t __count) _NOEXCEPT {
      if (__libcpp_is_constant_evaluated()) {
#ifdef _LIBCPP_COMPILER_CLANG_BASED
        return __builtin_memcmp(__lhs, __rhs, __count);
#else
# 206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
        while (__count != 0) {
          if (lt(*__lhs, *__rhs))
            return -1;
          if (lt(*__rhs, *__lhs))
            return 1;

          __count -= sizeof(char_type);
          ++__lhs;
          ++__rhs;
        }
        return 0;
#endif // _LIBCPP_COMPILER_CLANG_BASED
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
      } else {
        return __builtin_memcmp(__lhs, __rhs, __count);
      }
    }

    static inline _LIBCPP_HIDE_FROM_ABI size_t _LIBCPP_CONSTEXPR_SINCE_CXX17 length(const char_type* __s)  _NOEXCEPT {
      return std::__constexpr_strlen(__s);
    }

    static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT {
      if (__n == 0)
          return nullptr;
      return std::__constexpr_memchr(__s, __a, __n);
    }

    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
        return std::__constexpr_memmove(__s1, __s2, __element_count(__n));
    }

    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
        if (!__libcpp_is_constant_evaluated())
            _LIBCPP_ASSERT_NON_OVERLAPPING_RANGES(
                __s2 < __s1 || __s2 >= __s1 + __n, "char_traits::copy overlapped range");
        std::copy_n(__s2, __n, __s1);
        return __s1;
    }

    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
        std::fill_n(__s, __n, __a);
        return __s;
    }

    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
        {return eq_int_type(__c, eof()) ? ~eof() : __c;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
        {return char_type(__c);}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
        {return int_type((unsigned char)__c);}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
        {return __c1 == __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type  eof() _NOEXCEPT
        {return int_type(EOF);}
};

// char_traits<wchar_t>

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
struct _LIBCPP_TEMPLATE_VIS char_traits<wchar_t>
{
    using char_type           = wchar_t;
    using int_type            = wint_t;
    using off_type            = streamoff;
    using pos_type            = streampos;
    using state_type          = mbstate_t;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 278 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
    using comparison_category = strong_ordering;
#endif
# 280 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3

    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
        {return __c1 == __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
        {return __c1 < __c2;}

  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 int
  compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
    if (__n == 0)
      return 0;
    return std::__constexpr_wmemcmp(__s1, __s2, __n);
  }

  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 size_t length(const char_type* __s) _NOEXCEPT {
    return std::__constexpr_wcslen(__s);
  }

  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
  const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT {
    if (__n == 0)
        return nullptr;
    return std::__constexpr_wmemchr(__s, __a, __n);
  }

    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
        return std::__constexpr_memmove(__s1, __s2, __element_count(__n));
    }

    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
        if (!__libcpp_is_constant_evaluated())
            _LIBCPP_ASSERT_NON_OVERLAPPING_RANGES(
                __s2 < __s1 || __s2 >= __s1 + __n, "char_traits::copy overlapped range");
        std::copy_n(__s2, __n, __s1);
        return __s1;
    }

    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
        std::fill_n(__s, __n, __a);
        return __s;
    }

    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
        {return eq_int_type(__c, eof()) ? ~eof() : __c;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
        {return char_type(__c);}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
        {return int_type(__c);}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
        {return __c1 == __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT
        {return int_type(WEOF);}
};
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 338 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3

#ifndef _LIBCPP_HAS_NO_CHAR8_T

template <>
struct _LIBCPP_TEMPLATE_VIS char_traits<char8_t>
{
    using char_type           = char8_t;
    using int_type            = unsigned int;
    using off_type            = streamoff;
    using pos_type            = u8streampos;
    using state_type          = mbstate_t;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 350 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
    using comparison_category = strong_ordering;
#endif
# 352 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3

    static inline _LIBCPP_HIDE_FROM_ABI constexpr void assign(char_type& __c1, const char_type& __c2) noexcept
        {__c1 = __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI constexpr bool eq(char_type __c1, char_type __c2) noexcept
        {return __c1 == __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI constexpr bool lt(char_type __c1, char_type __c2) noexcept
        {return __c1 < __c2;}

  static _LIBCPP_HIDE_FROM_ABI constexpr int
  compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
      return std::__constexpr_memcmp(__s1, __s2, __element_count(__n));
  }

    static _LIBCPP_HIDE_FROM_ABI constexpr
    size_t           length(const char_type* __s) _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY static constexpr
    const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;

    static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    char_type*       move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
        return std::__constexpr_memmove(__s1, __s2, __element_count(__n));
    }

    static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    char_type*       copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
        if (!__libcpp_is_constant_evaluated())
            _LIBCPP_ASSERT_NON_OVERLAPPING_RANGES(
                __s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
        std::copy_n(__s2, __n, __s1);
        return __s1;
    }

    static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    char_type*       assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
        std::fill_n(__s, __n, __a);
        return __s;
    }

    static inline _LIBCPP_HIDE_FROM_ABI constexpr int_type  not_eof(int_type __c) noexcept
        {return eq_int_type(__c, eof()) ? ~eof() : __c;}
    static inline _LIBCPP_HIDE_FROM_ABI constexpr char_type to_char_type(int_type __c) noexcept
        {return char_type(__c);}
    static inline _LIBCPP_HIDE_FROM_ABI constexpr int_type to_int_type(char_type __c) noexcept
        {return int_type(__c);}
    static inline _LIBCPP_HIDE_FROM_ABI constexpr bool eq_int_type(int_type __c1, int_type __c2) noexcept
        {return __c1 == __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI constexpr int_type eof() noexcept
        {return int_type(EOF);}
};

// TODO use '__builtin_strlen' if it ever supports char8_t ??
inline constexpr
size_t
char_traits<char8_t>::length(const char_type* __s) _NOEXCEPT
{
    size_t __len = 0;
    for (; !eq(*__s, char_type(0)); ++__s)
        ++__len;
    return __len;
}

// TODO use '__builtin_char_memchr' if it ever supports char8_t ??
inline constexpr
const char8_t*
char_traits<char8_t>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
{
    for (; __n; --__n)
    {
        if (eq(*__s, __a))
            return __s;
        ++__s;
    }
    return nullptr;
}

#endif // _LIBCPP_HAS_NO_CHAR8_T
# 429 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3

template <>
struct _LIBCPP_TEMPLATE_VIS char_traits<char16_t>
{
    using char_type           = char16_t;
    using int_type            = uint_least16_t;
    using off_type            = streamoff;
    using pos_type            = u16streampos;
    using state_type          = mbstate_t;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 439 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
    using comparison_category = strong_ordering;
#endif
# 441 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3

    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
        {return __c1 == __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
        {return __c1 < __c2;}

    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
    int              compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
    size_t           length(const char_type* __s) _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
    const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static char_type*       move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
        return std::__constexpr_memmove(__s1, __s2, __element_count(__n));
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static char_type*       copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
        if (!__libcpp_is_constant_evaluated())
            _LIBCPP_ASSERT_NON_OVERLAPPING_RANGES(
                __s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
        std::copy_n(__s2, __n, __s1);
        return __s1;
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static char_type*       assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
        std::fill_n(__s, __n, __a);
        return __s;
    }

    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
        {return eq_int_type(__c, eof()) ? ~eof() : __c;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
        {return char_type(__c);}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
        {return int_type(__c);}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
        {return __c1 == __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT
        {return int_type(0xFFFF);}
};

inline _LIBCPP_CONSTEXPR_SINCE_CXX17
int
char_traits<char16_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
{
    for (; __n; --__n, ++__s1, ++__s2)
    {
        if (lt(*__s1, *__s2))
            return -1;
        if (lt(*__s2, *__s1))
            return 1;
    }
    return 0;
}

inline _LIBCPP_CONSTEXPR_SINCE_CXX17
size_t
char_traits<char16_t>::length(const char_type* __s) _NOEXCEPT
{
    size_t __len = 0;
    for (; !eq(*__s, char_type(0)); ++__s)
        ++__len;
    return __len;
}

inline _LIBCPP_CONSTEXPR_SINCE_CXX17
const char16_t*
char_traits<char16_t>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
{
    for (; __n; --__n)
    {
        if (eq(*__s, __a))
            return __s;
        ++__s;
    }
    return nullptr;
}

template <>
struct _LIBCPP_TEMPLATE_VIS char_traits<char32_t>
{
    using char_type           = char32_t;
    using int_type            = uint_least32_t;
    using off_type            = streamoff;
    using pos_type            = u32streampos;
    using state_type          = mbstate_t;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 534 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
    using comparison_category = strong_ordering;
#endif
# 536 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3

    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
    void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
        {return __c1 == __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
        {return __c1 < __c2;}

    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
    int              compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
    size_t           length(const char_type* __s) _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_SINCE_CXX17
    const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static char_type*       move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
        return std::__constexpr_memmove(__s1, __s2, __element_count(__n));
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static char_type*       copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
        std::copy_n(__s2, __n, __s1);
        return __s1;
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static char_type*       assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
        std::fill_n(__s, __n, __a);
        return __s;
    }

    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
        {return eq_int_type(__c, eof()) ? ~eof() : __c;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
        {return char_type(__c);}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
        {return int_type(__c);}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
        {return __c1 == __c2;}
    static inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT
        {return int_type(0xFFFFFFFF);}
};

inline _LIBCPP_CONSTEXPR_SINCE_CXX17
int
char_traits<char32_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
{
    for (; __n; --__n, ++__s1, ++__s2)
    {
        if (lt(*__s1, *__s2))
            return -1;
        if (lt(*__s2, *__s1))
            return 1;
    }
    return 0;
}

inline _LIBCPP_CONSTEXPR_SINCE_CXX17
size_t
char_traits<char32_t>::length(const char_type* __s) _NOEXCEPT
{
    size_t __len = 0;
    for (; !eq(*__s, char_type(0)); ++__s)
        ++__len;
    return __len;
}

inline _LIBCPP_CONSTEXPR_SINCE_CXX17
const char32_t*
char_traits<char32_t>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
{
    for (; __n; --__n)
    {
        if (eq(*__s, __a))
            return __s;
        ++__s;
    }
    return nullptr;
}

// helper fns for basic_string and string_view

// __str_find
template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find(const _CharT *__p, _SizeT __sz,
             _CharT __c, _SizeT __pos) _NOEXCEPT
{
    if (__pos >= __sz)
        return __npos;
    const _CharT* __r = _Traits::find(__p + __pos, __sz - __pos, __c);
    if (__r == nullptr)
        return __npos;
    return static_cast<_SizeT>(__r - __p);
}

template <class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR_SINCE_CXX14 const _CharT *
__search_substring(const _CharT *__first1, const _CharT *__last1,
                   const _CharT *__first2, const _CharT *__last2) _NOEXCEPT {
  // Take advantage of knowing source and pattern lengths.
  // Stop short when source is smaller than pattern.
  const ptrdiff_t __len2 = __last2 - __first2;
  if (__len2 == 0)
    return __first1;

  ptrdiff_t __len1 = __last1 - __first1;
  if (__len1 < __len2)
    return __last1;

  // First element of __first2 is loop invariant.
  _CharT __f2 = *__first2;
  while (true) {
    __len1 = __last1 - __first1;
    // Check whether __first1 still has at least __len2 bytes.
    if (__len1 < __len2)
      return __last1;

    // Find __f2 the first byte matching in __first1.
    __first1 = _Traits::find(__first1, __len1 - __len2 + 1, __f2);
    if (__first1 == nullptr)
      return __last1;

    // It is faster to compare from the first byte of __first1 even if we
    // already know that it matches the first byte of __first2: this is because
    // __first2 is most likely aligned, as it is user's "pattern" string, and
    // __first1 + 1 is most likely not aligned, as the match is in the middle of
    // the string.
    if (_Traits::compare(__first1, __first2, __len2) == 0)
      return __first1;

    ++__first1;
  }
}

template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find(const _CharT *__p, _SizeT __sz,
       const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
{
    if (__pos > __sz)
        return __npos;

    if (__n == 0) // There is nothing to search, just return __pos.
        return __pos;

    const _CharT *__r = std::__search_substring<_CharT, _Traits>(
        __p + __pos, __p + __sz, __s, __s + __n);

    if (__r == __p + __sz)
        return __npos;
    return static_cast<_SizeT>(__r - __p);
}


// __str_rfind

template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_rfind(const _CharT *__p, _SizeT __sz,
              _CharT __c, _SizeT __pos) _NOEXCEPT
{
    if (__sz < 1)
        return __npos;
    if (__pos < __sz)
        ++__pos;
    else
        __pos = __sz;
    for (const _CharT* __ps = __p + __pos; __ps != __p;)
    {
        if (_Traits::eq(*--__ps, __c))
            return static_cast<_SizeT>(__ps - __p);
    }
    return __npos;
}

template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_rfind(const _CharT *__p, _SizeT __sz,
        const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
{
    __pos = _VSTD::min(__pos, __sz);
    if (__n < __sz - __pos)
        __pos += __n;
    else
        __pos = __sz;
    const _CharT* __r = std::__find_end_classic(__p, __p + __pos, __s, __s + __n, _Traits::eq);
    if (__n > 0 && __r == __p + __pos)
        return __npos;
    return static_cast<_SizeT>(__r - __p);
}

// __str_find_first_of
template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find_first_of(const _CharT *__p, _SizeT __sz,
                const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
{
    if (__pos >= __sz || __n == 0)
        return __npos;
    const _CharT* __r = _VSTD::__find_first_of_ce
        (__p + __pos, __p + __sz, __s, __s + __n, _Traits::eq );
    if (__r == __p + __sz)
        return __npos;
    return static_cast<_SizeT>(__r - __p);
}


// __str_find_last_of
template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find_last_of(const _CharT *__p, _SizeT __sz,
               const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
    {
    if (__n != 0)
    {
        if (__pos < __sz)
            ++__pos;
        else
            __pos = __sz;
        for (const _CharT* __ps = __p + __pos; __ps != __p;)
        {
            const _CharT* __r = _Traits::find(__s, __n, *--__ps);
            if (__r)
                return static_cast<_SizeT>(__ps - __p);
        }
    }
    return __npos;
}


// __str_find_first_not_of
template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find_first_not_of(const _CharT *__p, _SizeT __sz,
                    const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
{
    if (__pos < __sz)
    {
        const _CharT* __pe = __p + __sz;
        for (const _CharT* __ps = __p + __pos; __ps != __pe; ++__ps)
            if (_Traits::find(__s, __n, *__ps) == nullptr)
                return static_cast<_SizeT>(__ps - __p);
    }
    return __npos;
}


template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find_first_not_of(const _CharT *__p, _SizeT __sz,
                          _CharT __c, _SizeT __pos) _NOEXCEPT
{
    if (__pos < __sz)
    {
        const _CharT* __pe = __p + __sz;
        for (const _CharT* __ps = __p + __pos; __ps != __pe; ++__ps)
            if (!_Traits::eq(*__ps, __c))
                return static_cast<_SizeT>(__ps - __p);
    }
    return __npos;
}


// __str_find_last_not_of
template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find_last_not_of(const _CharT *__p, _SizeT __sz,
                   const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
{
    if (__pos < __sz)
        ++__pos;
    else
        __pos = __sz;
    for (const _CharT* __ps = __p + __pos; __ps != __p;)
        if (_Traits::find(__s, __n, *--__ps) == nullptr)
            return static_cast<_SizeT>(__ps - __p);
    return __npos;
}


template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
__str_find_last_not_of(const _CharT *__p, _SizeT __sz,
                         _CharT __c, _SizeT __pos) _NOEXCEPT
{
    if (__pos < __sz)
        ++__pos;
    else
        __pos = __sz;
    for (const _CharT* __ps = __p + __pos; __ps != __p;)
        if (!_Traits::eq(*--__ps, __c))
            return static_cast<_SizeT>(__ps - __p);
    return __npos;
}

template<class _Ptr>
inline _LIBCPP_INLINE_VISIBILITY
size_t __do_string_hash(_Ptr __p, _Ptr __e)
{
    typedef typename iterator_traits<_Ptr>::value_type value_type;
    return __murmur2_or_cityhash<size_t>()(__p, (__e-__p)*sizeof(value_type));
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___STRING_CHAR_TRAITS_H
# 846 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/char_traits.h" 3
#endif /* char_traits.h expanded by -frewrite-includes */
# 222 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_array.h>
#endif /* expanded by -frewrite-includes */
# 222 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 223 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 223 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 225 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_standard_layout.h>
#endif /* expanded by -frewrite-includes */
# 225 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 226 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivial.h>
#endif /* expanded by -frewrite-includes */
# 226 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/type_identity.h>
#endif /* expanded by -frewrite-includes */
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 231 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 231 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 232 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 232 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 233 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 233 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 234 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 234 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 235 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

// standard-mandated includes

// [iterator.range]
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/access.h>
#endif /* expanded by -frewrite-includes */
# 239 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 240 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/data.h>
#endif /* expanded by -frewrite-includes */
# 240 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 241 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/empty.h>
#endif /* expanded by -frewrite-includes */
# 241 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 242 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_access.h>
#endif /* expanded by -frewrite-includes */
# 242 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 243 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/size.h>
#endif /* expanded by -frewrite-includes */
# 243 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 244 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

// [string.view.synop]
#if 0 /* expanded by -frewrite-includes */
#include <compare>
#endif /* expanded by -frewrite-includes */
# 246 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 247 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 249 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 250 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#endif
# 251 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 253 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 254 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 2 3


_LIBCPP_BEGIN_NAMESPACE_STD

// TODO: This is a workaround for some vendors to carry a downstream diff to accept `nullptr` in
//       string_view constructors. This can be refactored when this exact form isn't needed anymore.
template <class _Traits>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
inline size_t __char_traits_length_checked(const typename _Traits::char_type* __s) _NOEXCEPT {
  // This needs to be a single statement for C++11 constexpr
  return _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr,
                                      "null pointer passed to non-null argument of char_traits<...>::length"),
      _Traits::length(__s);
}

template<class _CharT, class _Traits>
class basic_string_view {
public:
    // types
    using traits_type            = _Traits;
    using value_type             = _CharT;
    using pointer                = _CharT*;
    using const_pointer          = const _CharT*;
    using reference              = _CharT&;
    using const_reference        = const _CharT&;
#ifdef _LIBCPP_ABI_BOUNDED_ITERATORS
    using const_iterator         = __bounded_iter<const_pointer>;
#else
# 282 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
    using const_iterator         = const_pointer; // See [string.view.iterators]
#endif
# 284 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
    using iterator               = const_iterator;
    using const_reverse_iterator = _VSTD::reverse_iterator<const_iterator>;
    using reverse_iterator       = const_reverse_iterator;
    using size_type              = size_t;
    using difference_type        = ptrdiff_t;
    static _LIBCPP_CONSTEXPR const size_type npos = -1; // size_type(-1);

    static_assert((!is_array<value_type>::value), "Character type of basic_string_view must not be an array");
    static_assert(( is_standard_layout<value_type>::value), "Character type of basic_string_view must be standard-layout");
    static_assert(( is_trivial<value_type>::value), "Character type of basic_string_view must be trivial");
    static_assert((is_same<_CharT, typename traits_type::char_type>::value),
                  "traits_type::char_type must be the same type as CharT");

    // [string.view.cons], construct/copy
    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    basic_string_view() _NOEXCEPT : __data_(nullptr), __size_(0) {}

    _LIBCPP_INLINE_VISIBILITY
    basic_string_view(const basic_string_view&) _NOEXCEPT = default;

    _LIBCPP_INLINE_VISIBILITY
    basic_string_view& operator=(const basic_string_view&) _NOEXCEPT = default;

    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    basic_string_view(const _CharT* __s, size_type __len) _NOEXCEPT
        : __data_(__s), __size_(__len)
    {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 312 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
    _LIBCPP_ASSERT_UNCATEGORIZED(
        __len <= static_cast<size_type>(numeric_limits<difference_type>::max()),
        "string_view::string_view(_CharT *, size_t): length does not fit in difference_type");
    _LIBCPP_ASSERT_UNCATEGORIZED(__len == 0 || __s != nullptr,
                                 "string_view::string_view(_CharT *, size_t): received nullptr");
#endif
# 318 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 321 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
    template <contiguous_iterator _It, sized_sentinel_for<_It> _End>
      requires (is_same_v<iter_value_t<_It>, _CharT> && !is_convertible_v<_End, size_type>)
    constexpr _LIBCPP_HIDE_FROM_ABI basic_string_view(_It __begin, _End __end)
       : __data_(_VSTD::to_address(__begin)), __size_(__end - __begin)
    {
      _LIBCPP_ASSERT_VALID_INPUT_RANGE((__end - __begin) >= 0,
                                       "std::string_view::string_view(iterator, sentinel) received invalid range");
    }
#endif // _LIBCPP_STD_VER >= 20
# 330 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 332 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
    template <class _Range>
      requires (
        !is_same_v<remove_cvref_t<_Range>, basic_string_view> &&
        ranges::contiguous_range<_Range> &&
        ranges::sized_range<_Range> &&
        is_same_v<ranges::range_value_t<_Range>, _CharT> &&
        !is_convertible_v<_Range, const _CharT*> &&
        (!requires(remove_cvref_t<_Range>& __d) {
          __d.operator _VSTD::basic_string_view<_CharT, _Traits>();
        })
      )
    constexpr explicit _LIBCPP_HIDE_FROM_ABI
    basic_string_view(_Range&& __r) : __data_(ranges::data(__r)), __size_(ranges::size(__r)) {}
#endif // _LIBCPP_STD_VER >= 23
# 346 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    basic_string_view(const _CharT* __s)
        : __data_(__s), __size_(_VSTD::__char_traits_length_checked<_Traits>(__s)) {}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 352 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
    basic_string_view(nullptr_t) = delete;
#endif
# 354 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

    // [string.view.iterators], iterators
    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    const_iterator begin()  const _NOEXCEPT { return cbegin(); }

    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    const_iterator end()    const _NOEXCEPT { return cend(); }

    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    const_iterator cbegin() const _NOEXCEPT {
#ifdef _LIBCPP_ABI_BOUNDED_ITERATORS
        return std::__make_bounded_iter(data(), data(), data() + size());
#else
# 367 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
        return __data_;
#endif
# 369 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
    }

    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    const_iterator cend()   const _NOEXCEPT {
#ifdef _LIBCPP_ABI_BOUNDED_ITERATORS
        return std::__make_bounded_iter(data() + size(), data(), data() + size());
#else
# 376 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
        return __data_ + __size_;
#endif
# 378 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX17 _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator rbegin()   const _NOEXCEPT { return const_reverse_iterator(cend()); }

    _LIBCPP_CONSTEXPR_SINCE_CXX17 _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator rend()     const _NOEXCEPT { return const_reverse_iterator(cbegin()); }

    _LIBCPP_CONSTEXPR_SINCE_CXX17 _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator crbegin()  const _NOEXCEPT { return const_reverse_iterator(cend()); }

    _LIBCPP_CONSTEXPR_SINCE_CXX17 _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator crend()    const _NOEXCEPT { return const_reverse_iterator(cbegin()); }

    // [string.view.capacity], capacity
    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    size_type size()     const _NOEXCEPT { return __size_; }

    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    size_type length()   const _NOEXCEPT { return __size_; }

    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    size_type max_size() const _NOEXCEPT { return numeric_limits<size_type>::max() / sizeof(value_type); }

    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    bool empty()         const _NOEXCEPT { return __size_ == 0; }

    // [string.view.access], element access
    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    const_reference operator[](size_type __pos) const _NOEXCEPT {
      return _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__pos < size(), "string_view[] index out of bounds"), __data_[__pos];
    }

    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    const_reference at(size_type __pos) const
    {
        return __pos >= size()
            ? (__throw_out_of_range("string_view::at"), __data_[0])
            : __data_[__pos];
    }

    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    const_reference front() const _NOEXCEPT
    {
        return _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "string_view::front(): string is empty"), __data_[0];
    }

    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    const_reference back() const _NOEXCEPT
    {
        return _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "string_view::back(): string is empty"),
               __data_[__size_ - 1];
    }

    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    const_pointer data() const _NOEXCEPT { return __data_; }

    // [string.view.modifiers], modifiers:
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    void remove_prefix(size_type __n) _NOEXCEPT
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n <= size(), "remove_prefix() can't remove more than size()");
        __data_ += __n;
        __size_ -= __n;
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    void remove_suffix(size_type __n) _NOEXCEPT
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n <= size(), "remove_suffix() can't remove more than size()");
        __size_ -= __n;
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    void swap(basic_string_view& __other) _NOEXCEPT
    {
        const value_type *__p = __data_;
        __data_ = __other.__data_;
        __other.__data_ = __p;

        size_type __sz = __size_;
        __size_ = __other.__size_;
        __other.__size_ = __sz;
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const
    {
        if (__pos > size())
            __throw_out_of_range("string_view::copy");
        size_type __rlen = _VSTD::min(__n, size() - __pos);
        _Traits::copy(__s, data() + __pos, __rlen);
        return __rlen;
    }

    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    basic_string_view substr(size_type __pos = 0, size_type __n = npos) const
    {
        return __pos > size()
            ? (__throw_out_of_range("string_view::substr"), basic_string_view())
            : basic_string_view(data() + __pos, _VSTD::min(__n, size() - __pos));
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 int compare(basic_string_view __sv) const _NOEXCEPT
    {
        size_type __rlen = _VSTD::min(size(), __sv.size());
        int __retval = _Traits::compare(data(), __sv.data(), __rlen);
        if (__retval == 0) // first __rlen chars matched
            __retval = size() == __sv.size() ? 0 : (size() < __sv.size() ? -1 : 1);
        return __retval;
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    int compare(size_type __pos1, size_type __n1, basic_string_view __sv) const
    {
        return substr(__pos1, __n1).compare(__sv);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    int compare(                       size_type __pos1, size_type __n1,
                basic_string_view __sv, size_type __pos2, size_type __n2) const
    {
        return substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2));
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    int compare(const _CharT* __s) const _NOEXCEPT
    {
        return compare(basic_string_view(__s));
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    int compare(size_type __pos1, size_type __n1, const _CharT* __s) const
    {
        return substr(__pos1, __n1).compare(basic_string_view(__s));
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    int compare(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) const
    {
        return substr(__pos1, __n1).compare(basic_string_view(__s, __n2));
    }

    // find
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received nullptr");
        return std::__str_find<value_type, size_type, traits_type, npos>
            (data(), size(), __s.data(), __pos, __s.size());
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find(_CharT __c, size_type __pos = 0) const _NOEXCEPT
    {
        return std::__str_find<value_type, size_type, traits_type, npos>
            (data(), size(), __c, __pos);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "string_view::find(): received nullptr");
        return std::__str_find<value_type, size_type, traits_type, npos>
            (data(), size(), __s, __pos, __n);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string_view::find(): received nullptr");
        return std::__str_find<value_type, size_type, traits_type, npos>
            (data(), size(), __s, __pos, traits_type::length(__s));
    }

    // rfind
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type rfind(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received nullptr");
        return std::__str_rfind<value_type, size_type, traits_type, npos>
            (data(), size(), __s.data(), __pos, __s.size());
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type rfind(_CharT __c, size_type __pos = npos) const _NOEXCEPT
    {
        return std::__str_rfind<value_type, size_type, traits_type, npos>
            (data(), size(), __c, __pos);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "string_view::rfind(): received nullptr");
        return std::__str_rfind<value_type, size_type, traits_type, npos>
            (data(), size(), __s, __pos, __n);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type rfind(const _CharT* __s, size_type __pos=npos) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string_view::rfind(): received nullptr");
        return std::__str_rfind<value_type, size_type, traits_type, npos>
            (data(), size(), __s, __pos, traits_type::length(__s));
    }

    // find_first_of
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_first_of(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__s.size() == 0 || __s.data() != nullptr,
                                     "string_view::find_first_of(): received nullptr");
        return std::__str_find_first_of<value_type, size_type, traits_type, npos>
            (data(), size(), __s.data(), __pos, __s.size());
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_first_of(_CharT __c, size_type __pos = 0) const _NOEXCEPT
    { return find(__c, __pos); }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "string_view::find_first_of(): received nullptr");
        return std::__str_find_first_of<value_type, size_type, traits_type, npos>
            (data(), size(), __s, __pos, __n);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_first_of(const _CharT* __s, size_type __pos=0) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string_view::find_first_of(): received nullptr");
        return std::__str_find_first_of<value_type, size_type, traits_type, npos>
            (data(), size(), __s, __pos, traits_type::length(__s));
    }

    // find_last_of
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_last_of(basic_string_view __s, size_type __pos=npos) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__s.size() == 0 || __s.data() != nullptr,
                                     "string_view::find_last_of(): received nullptr");
        return std::__str_find_last_of<value_type, size_type, traits_type, npos>
            (data(), size(), __s.data(), __pos, __s.size());
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_last_of(_CharT __c, size_type __pos = npos) const _NOEXCEPT
    { return rfind(__c, __pos); }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "string_view::find_last_of(): received nullptr");
        return std::__str_find_last_of<value_type, size_type, traits_type, npos>
            (data(), size(), __s, __pos, __n);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_last_of(const _CharT* __s, size_type __pos=npos) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string_view::find_last_of(): received nullptr");
        return std::__str_find_last_of<value_type, size_type, traits_type, npos>
            (data(), size(), __s, __pos, traits_type::length(__s));
    }

    // find_first_not_of
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_first_not_of(basic_string_view __s, size_type __pos=0) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__s.size() == 0 || __s.data() != nullptr,
                                     "string_view::find_first_not_of(): received nullptr");
        return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>
            (data(), size(), __s.data(), __pos, __s.size());
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_first_not_of(_CharT __c, size_type __pos=0) const _NOEXCEPT
    {
        return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>
            (data(), size(), __c, __pos);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "string_view::find_first_not_of(): received nullptr");
        return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>
            (data(), size(), __s, __pos, __n);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_first_not_of(const _CharT* __s, size_type __pos=0) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string_view::find_first_not_of(): received nullptr");
        return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>
            (data(), size(), __s, __pos, traits_type::length(__s));
    }

    // find_last_not_of
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_last_not_of(basic_string_view __s, size_type __pos=npos) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__s.size() == 0 || __s.data() != nullptr,
                                     "string_view::find_last_not_of(): received nullptr");
        return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>
            (data(), size(), __s.data(), __pos, __s.size());
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_last_not_of(_CharT __c, size_type __pos=npos) const _NOEXCEPT
    {
        return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>
            (data(), size(), __c, __pos);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "string_view::find_last_not_of(): received nullptr");
        return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>
            (data(), size(), __s, __pos, __n);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    size_type find_last_not_of(const _CharT* __s, size_type __pos=npos) const _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string_view::find_last_not_of(): received nullptr");
        return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>
            (data(), size(), __s, __pos, traits_type::length(__s));
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 712 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
    constexpr _LIBCPP_INLINE_VISIBILITY
    bool starts_with(basic_string_view __s) const noexcept
    { return size() >= __s.size() && compare(0, __s.size(), __s) == 0; }

    constexpr _LIBCPP_INLINE_VISIBILITY
    bool starts_with(value_type __c) const noexcept
    { return !empty() && _Traits::eq(front(), __c); }

    constexpr _LIBCPP_INLINE_VISIBILITY
    bool starts_with(const value_type* __s) const noexcept
    { return starts_with(basic_string_view(__s)); }

    constexpr _LIBCPP_INLINE_VISIBILITY
    bool ends_with(basic_string_view __s) const noexcept
    { return size() >= __s.size() && compare(size() - __s.size(), npos, __s) == 0; }

    constexpr _LIBCPP_INLINE_VISIBILITY
    bool ends_with(value_type __c) const noexcept
    { return !empty() && _Traits::eq(back(), __c); }

    constexpr _LIBCPP_INLINE_VISIBILITY
    bool ends_with(const value_type* __s) const noexcept
    { return ends_with(basic_string_view(__s)); }
#endif
# 736 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 738 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
    constexpr _LIBCPP_INLINE_VISIBILITY
    bool contains(basic_string_view __sv) const noexcept
    { return find(__sv) != npos; }

    constexpr _LIBCPP_INLINE_VISIBILITY
    bool contains(value_type __c) const noexcept
    { return find(__c) != npos; }

    constexpr _LIBCPP_INLINE_VISIBILITY
    bool contains(const value_type* __s) const
    { return find(__s) != npos; }
#endif
# 750 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

private:
    const   value_type* __data_;
    size_type           __size_;
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(basic_string_view);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 758 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
template <class _CharT, class _Traits>
inline constexpr bool ranges::enable_view<basic_string_view<_CharT, _Traits>> = true;

template <class _CharT, class _Traits>
inline constexpr bool ranges::enable_borrowed_range<basic_string_view<_CharT, _Traits> > = true;
#endif // _LIBCPP_STD_VER >= 20
# 764 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

// [string.view.deduct]

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 768 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
template <contiguous_iterator _It, sized_sentinel_for<_It> _End>
  basic_string_view(_It, _End) -> basic_string_view<iter_value_t<_It>>;
#endif // _LIBCPP_STD_VER >= 20
# 771 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3


#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 774 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
template <ranges::contiguous_range _Range>
  basic_string_view(_Range) -> basic_string_view<ranges::range_value_t<_Range>>;
#endif
# 777 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

// [string.view.comparison]

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 781 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

template<class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI constexpr
bool operator==(basic_string_view<_CharT, _Traits> __lhs,
                type_identity_t<basic_string_view<_CharT, _Traits>> __rhs) noexcept {
    if (__lhs.size() != __rhs.size()) return false;
    return __lhs.compare(__rhs) == 0;
}

template <class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI constexpr auto operator<=>(
    basic_string_view<_CharT, _Traits> __lhs, type_identity_t<basic_string_view<_CharT, _Traits>> __rhs) noexcept {
    if constexpr (requires { typename _Traits::comparison_category; }) {
        // [string.view]/4
        static_assert(
            __comparison_category<typename _Traits::comparison_category>,
            "return type is not a comparison category type");
        return static_cast<typename _Traits::comparison_category>(__lhs.compare(__rhs) <=> 0);
    } else {
        return static_cast<weak_ordering>(__lhs.compare(__rhs) <=> 0);
    }
}

#else
# 805 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

// operator ==

template<class _CharT, class _Traits>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator==(basic_string_view<_CharT, _Traits> __lhs,
                basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
    if (__lhs.size() != __rhs.size()) return false;
    return __lhs.compare(__rhs) == 0;
}

// The dummy default template parameters are used to work around a MSVC issue with mangling, see VSO-409326 for details.
// This applies to the other sufficient overloads below for the other comparison operators.
template<class _CharT, class _Traits, int = 1>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator==(basic_string_view<_CharT, _Traits> __lhs,
                __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT
{
    if (__lhs.size() != __rhs.size()) return false;
    return __lhs.compare(__rhs) == 0;
}

template<class _CharT, class _Traits, int = 2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator==(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
                basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
    if (__lhs.size() != __rhs.size()) return false;
    return __lhs.compare(__rhs) == 0;
}

// operator !=
template<class _CharT, class _Traits>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator!=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
    if (__lhs.size() != __rhs.size())
        return true;
    return __lhs.compare(__rhs) != 0;
}

template<class _CharT, class _Traits, int = 1>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator!=(basic_string_view<_CharT, _Traits> __lhs,
                __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT
{
    if (__lhs.size() != __rhs.size())
        return true;
    return __lhs.compare(__rhs) != 0;
}

template<class _CharT, class _Traits, int = 2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator!=(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
                basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
    if (__lhs.size() != __rhs.size())
        return true;
    return __lhs.compare(__rhs) != 0;
}


// operator <
template<class _CharT, class _Traits>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator<(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
    return __lhs.compare(__rhs) < 0;
}

template<class _CharT, class _Traits, int = 1>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator<(basic_string_view<_CharT, _Traits> __lhs,
                __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT
{
    return __lhs.compare(__rhs) < 0;
}

template<class _CharT, class _Traits, int = 2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator<(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
                basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
    return __lhs.compare(__rhs) < 0;
}


// operator >
template<class _CharT, class _Traits>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator> (basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
    return __lhs.compare(__rhs) > 0;
}

template<class _CharT, class _Traits, int = 1>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator>(basic_string_view<_CharT, _Traits> __lhs,
                __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT
{
    return __lhs.compare(__rhs) > 0;
}

template<class _CharT, class _Traits, int = 2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator>(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
                basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
    return __lhs.compare(__rhs) > 0;
}


// operator <=
template<class _CharT, class _Traits>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator<=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
    return __lhs.compare(__rhs) <= 0;
}

template<class _CharT, class _Traits, int = 1>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator<=(basic_string_view<_CharT, _Traits> __lhs,
                __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT
{
    return __lhs.compare(__rhs) <= 0;
}

template<class _CharT, class _Traits, int = 2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator<=(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
                basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
    return __lhs.compare(__rhs) <= 0;
}


// operator >=
template<class _CharT, class _Traits>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator>=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
    return __lhs.compare(__rhs) >= 0;
}


template<class _CharT, class _Traits, int = 1>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator>=(basic_string_view<_CharT, _Traits> __lhs,
                __type_identity_t<basic_string_view<_CharT, _Traits> > __rhs) _NOEXCEPT
{
    return __lhs.compare(__rhs) >= 0;
}

template<class _CharT, class _Traits, int = 2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator>=(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
                basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
{
    return __lhs.compare(__rhs) >= 0;
}

#endif //  _LIBCPP_STD_VER >= 20
# 969 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

template<class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
           basic_string_view<_CharT, _Traits> __str);

// [string.view.hash]
template<class _CharT>
struct __string_view_hash : public __unary_function<basic_string_view<_CharT, char_traits<_CharT> >, size_t>
{
    _LIBCPP_INLINE_VISIBILITY
    size_t operator()(const basic_string_view<_CharT, char_traits<_CharT> > __val) const _NOEXCEPT {
        return std::__do_string_hash(__val.data(), __val.data() + __val.size());
    }
};

template <>
struct hash<basic_string_view<char, char_traits<char> > > : __string_view_hash<char> {};

#ifndef _LIBCPP_HAS_NO_CHAR8_T
template <>
struct hash<basic_string_view<char8_t, char_traits<char8_t> > > : __string_view_hash<char8_t> {};
#endif
# 992 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

template <>
struct hash<basic_string_view<char16_t, char_traits<char16_t> > > : __string_view_hash<char16_t> {};

template <>
struct hash<basic_string_view<char32_t, char_traits<char32_t> > > : __string_view_hash<char32_t> {};

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
struct hash<basic_string_view<wchar_t, char_traits<wchar_t> > > : __string_view_hash<wchar_t> {};
#endif
# 1003 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1005 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
inline namespace literals
{
  inline namespace string_view_literals
  {
    inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    basic_string_view<char> operator""sv(const char *__str, size_t __len) _NOEXCEPT
    {
        return basic_string_view<char> (__str, __len);
    }

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
    inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    basic_string_view<wchar_t> operator""sv(const wchar_t *__str, size_t __len) _NOEXCEPT
    {
        return basic_string_view<wchar_t> (__str, __len);
    }
#endif
# 1022 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

#ifndef _LIBCPP_HAS_NO_CHAR8_T
    inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    basic_string_view<char8_t> operator""sv(const char8_t *__str, size_t __len) _NOEXCEPT
    {
        return basic_string_view<char8_t> (__str, __len);
    }
#endif
# 1030 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

    inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    basic_string_view<char16_t> operator""sv(const char16_t *__str, size_t __len) _NOEXCEPT
    {
        return basic_string_view<char16_t> (__str, __len);
    }

    inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    basic_string_view<char32_t> operator""sv(const char32_t *__str, size_t __len) _NOEXCEPT
    {
        return basic_string_view<char32_t> (__str, __len);
    }
  } // namespace string_view_literals
} // namespace literals
#endif
# 1045 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1050 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#  include <algorithm>
#endif /* expanded by -frewrite-includes */
# 1050 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 1051 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 1051 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 1052 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 1052 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 1053 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iterator>
#endif /* expanded by -frewrite-includes */
# 1053 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 1054 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 1054 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
# 1055 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#endif
# 1056 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3

#endif // _LIBCPP_STRING_VIEW
# 1058 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string_view" 3
#endif /* string_view expanded by -frewrite-includes */
# 12 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <variant>
#endif /* expanded by -frewrite-includes */
# 12 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h"
# 13 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) /* constants.h expanded by -frewrite-includes */
#include "constants.h"
#else /* constants.h expanded by -frewrite-includes */
# 14 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h"
# 1 "../../src/lib/elfldltl/include/lib/elfldltl/constants.h" 1
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_CONSTANTS_H_
#define SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_CONSTANTS_H_

#if defined(__CLANG_REWRITTEN_INCLUDES) /* bit.h expanded by -frewrite-includes */
#include <lib/stdcompat/bit.h>
#else /* bit.h expanded by -frewrite-includes */
# 8 "../../src/lib/elfldltl/include/lib/elfldltl/constants.h"
# 1 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h" 1
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIB_STDCOMPAT_BIT_H_
#define LIB_STDCOMPAT_BIT_H_

#if 0 /* expanded by -frewrite-includes */
#include <cstring>
#endif /* expanded by -frewrite-includes */
# 8 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"
# 10 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) /* bit.h expanded by -frewrite-includes */
#include "internal/bit.h"
#else /* bit.h expanded by -frewrite-includes */
# 11 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"
# 1 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/bit.h" 1
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIB_STDCOMPAT_INTERNAL_BIT_H_
#define LIB_STDCOMPAT_INTERNAL_BIT_H_

#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 8 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/bit.h"
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/bit.h"
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/bit.h"
# 10 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/bit.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) /* type_traits.h expanded by -frewrite-includes */
#include "../type_traits.h"
#else /* type_traits.h expanded by -frewrite-includes */
# 11 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/bit.h"
# 1 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h" 1
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIB_STDCOMPAT_TYPE_TRAITS_H_
#define LIB_STDCOMPAT_TYPE_TRAITS_H_

#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 8 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"
# 10 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 10 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"
# 11 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) /* type_traits.h expanded by -frewrite-includes */
#include "internal/type_traits.h"
#else /* type_traits.h expanded by -frewrite-includes */
# 12 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"
# 1 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../internal/type_traits.h" 1
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIB_STDCOMPAT_INTERNAL_TYPE_TRAITS_H_
#define LIB_STDCOMPAT_INTERNAL_TYPE_TRAITS_H_

#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 8 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../internal/type_traits.h"
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../internal/type_traits.h"

namespace cpp17 {
namespace internal {

template <typename T>
static constexpr bool is_reference_wrapper = false;
template <typename T>
static constexpr bool is_reference_wrapper<std::reference_wrapper<T>> = true;

// These are from [func.require] ¶ 1.1-7
template <typename MemFn, typename Class, typename T>
static constexpr bool invoke_pmf_base = std::is_member_function_pointer<MemFn Class::*>::value &&
                                        std::is_base_of<Class, std::remove_reference_t<T>>::value;

template <typename MemFn, typename Class, typename T>
static constexpr bool invoke_pmf_refwrap =
    std::is_member_function_pointer<MemFn Class::*>::value &&
    is_reference_wrapper<std::remove_cv_t<std::remove_reference_t<T>>>;

template <typename MemFn, typename Class, typename T>
static constexpr bool invoke_pmf_other =
    std::is_member_function_pointer<MemFn Class::*>::value && !invoke_pmf_base<MemFn, Class, T> &&
    !invoke_pmf_refwrap<MemFn, Class, T>;

template <typename MemObj, typename Class, typename T>
static constexpr bool invoke_pmd_base = std::is_member_object_pointer<MemObj Class::*>::value &&
                                        std::is_base_of<Class, std::remove_reference_t<T>>::value;

template <typename MemObj, typename Class, typename T>
static constexpr bool invoke_pmd_refwrap =
    std::is_member_object_pointer<MemObj Class::*>::value &&
    is_reference_wrapper<std::remove_cv_t<std::remove_reference_t<T>>>;

template <typename MemObj, typename Class, typename T>
static constexpr bool invoke_pmd_other =
    std::is_member_object_pointer<MemObj Class::*>::value && !invoke_pmd_base<MemObj, Class, T> &&
    !invoke_pmd_refwrap<MemObj, Class, T>;

// ¶ 1.7 says to just return f(t1, t2, ..., tn) in all other cases

// Just internal forward declarations for SFINAE; cpp20::invoke is defined in
// lib/stdcompat/functional.h
template <typename MemFn, typename Class, typename T, typename... Args>
constexpr auto invoke(MemFn Class::*f, T&& obj, Args&&... args)
    -> std::enable_if_t<invoke_pmf_base<MemFn, Class, T>,
                        decltype((std::forward<T>(obj).*f)(std::forward<Args>(args)...))>;

template <typename MemFn, typename Class, typename T, typename... Args>
constexpr auto invoke(MemFn Class::*f, T&& obj, Args&&... args)
    -> std::enable_if_t<invoke_pmf_refwrap<MemFn, Class, T>,
                        decltype((obj.get().*f)(std::forward<Args>(args)...))>;

template <typename MemFn, typename Class, typename T, typename... Args>
constexpr auto invoke(MemFn Class::*f, T&& obj, Args&&... args)
    -> std::enable_if_t<invoke_pmf_other<MemFn, Class, T>,
                        decltype(((*std::forward<T>(obj)).*f)(std::forward<Args>(args)...))>;

template <typename MemObj, typename Class, typename T>
constexpr auto invoke(MemObj Class::*f, T&& obj)
    -> std::enable_if_t<invoke_pmd_base<MemObj, Class, T>, decltype(std::forward<T>(obj).*f)>;

template <typename MemObj, typename Class, typename T>
constexpr auto invoke(MemObj Class::*f, T&& obj)
    -> std::enable_if_t<invoke_pmd_refwrap<MemObj, Class, T>, decltype(obj.get().*f)>;

template <typename MemObj, typename Class, typename T>
constexpr auto invoke(MemObj Class::*f, T&& obj)
    -> std::enable_if_t<invoke_pmd_other<MemObj, Class, T>, decltype((*std::forward<T>(obj)).*f)>;

template <typename F, typename... Args>
constexpr auto invoke(F&& f, Args&&... args)
    -> decltype(std::forward<F>(f)(std::forward<Args>(args)...));

template <typename R, typename F, typename... Args,
          typename = std::enable_if_t<std::is_void<R>::value>>
constexpr auto invoke_r(F&& f, Args&&... args)
    -> decltype(static_cast<void>(::cpp17::internal::invoke(std::forward<F>(f),
                                                            std::forward<Args>(args)...)));

template <typename R, typename F, typename... Args,
          typename = std::enable_if_t<!std::is_void<R>::value>>
constexpr auto invoke_r(F&& f, Args&&... args)
    -> std::enable_if_t<std::is_convertible<decltype(::cpp17::internal::invoke(
                                                std::forward<F>(f), std::forward<Args>(args)...)),
                                            R>::value,
                        R>;

template <typename R, typename F, typename... Args>
constexpr auto is_valid_invoke(std::nullptr_t)
    -> decltype(invoke_r<R>(std::declval<F>(), std::declval<Args>()...), std::true_type());

template <typename R, typename F, typename... Args>
constexpr std::false_type is_valid_invoke(...);

template <bool Enable, typename F, typename... Args>
struct invoke_result {};

template <typename F, typename... Args>
struct invoke_result<true, F, Args...> {
  using type = decltype(::cpp17::internal::invoke(std::declval<F>(), std::declval<Args>()...));
};

}  // namespace internal
}  // namespace cpp17

#endif  // LIB_STDCOMPAT_INTERNAL_TYPE_TRAITS_H_
# 115 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../internal/type_traits.h"
#endif /* type_traits.h expanded by -frewrite-includes */
# 13 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) /* version.h expanded by -frewrite-includes */
#include "version.h"
#else /* version.h expanded by -frewrite-includes */
# 13 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"
# 1 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h" 1
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIB_STDCOMPAT_VERSION_H_
#define LIB_STDCOMPAT_VERSION_H_

// This <version> polyfills is meant to provide the feature testing macros for the rest of
// the stdcompat library. It is not meant to be a full polyfill of <version>.

#if 0 /* disabled by -frewrite-includes */
#if __has_include(<version>) && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 12 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 12 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
# 13 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif __cplusplus > 201703L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 14 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#error "cpp=std20 must provide a '<version>' header."
#else
# 16 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#if 0 /* disabled by -frewrite-includes */
#if __has_include(<optional>) && !defined(__cpp_lib_optional) && __cplusplus >= 201606L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#define __cpp_lib_optional 201606L
#endif
# 20 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#if 0 /* disabled by -frewrite-includes */
#if __has_include(<string_view>) && !defined(__cpp_lib_string_view) && __cplusplus >= 201606L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 22 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#define __cpp_lib_string_view 201606L
#endif
# 24 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#if 0 /* disabled by -frewrite-includes */
#if __has_include(<variant>) && !defined(__cpp_lib_variant) && __cplusplus >= 201606L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#define __cpp_lib_variant 201606L
#endif
# 28 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#if 0 /* disabled by -frewrite-includes */
#if !defined(__cpp_lib_void_t) && __cplusplus >= 201411L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#define __cpp_lib_void_t 201411L
#endif
# 32 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#if 0 /* disabled by -frewrite-includes */
#if !defined(__cpp_lib_logical_traits) && __cplusplus >= 201510L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 34 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#define __cpp_lib_logical_traits 201510L
#endif
# 36 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#if 0 /* disabled by -frewrite-includes */
#if !defined(__cpp_lib_addressof_constexpr) && __cplusplus >= 201603L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#define __cpp_lib_addressof_constexpr 201603L
#endif
# 40 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#if 0 /* disabled by -frewrite-includes */
#if !defined(__cpp_lib_nonmember_container_access) && __cplusplus >= 201411L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 42 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#define __cpp_lib_nonmember_container_access 201411L
#endif
# 44 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#if 0 /* disabled by -frewrite-includes */
#if !defined(__cpp_lib_byte) && __cplusplus >= 201603L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 46 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#define __cpp_lib_byte 201603L
#endif
# 48 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#if 0 /* disabled by -frewrite-includes */
#if !defined(__cpp_lib_bool_constant) && __cplusplus >= 201505L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 50 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#define __cpp_lib_bool_constant 201505L
#endif
# 52 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#if 0 /* disabled by -frewrite-includes */
#if !defined(__cpp_lib_type_trait_variable_templates) && __cplusplus >= 201510L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 54 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#define __cpp_lib_type_trait_variable_templates 201510L
#endif
# 56 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#if 0 /* disabled by -frewrite-includes */
#if !defined(__cpp_lib_is_aggregate) && __cplusplus >= 201703L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#define __cpp_lib_is_aggregate 201703L
#endif
# 60 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#if 0 /* disabled by -frewrite-includes */
#if !defined(__cpp_lib_is_invocable) && __cplusplus >= 201703L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 62 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#define __cpp_lib_is_invocable 201703L
#endif
# 64 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#if 0 /* disabled by -frewrite-includes */
#if !defined(__cpp_lib_invoke) && __cplusplus >= 201411L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 66 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#define __cpp_lib_invoke 201411L
#endif
# 68 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#if 0 /* disabled by -frewrite-includes */
#if !defined(__cpp_lib_apply) && __cplusplus >= 201603L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 70 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#define __cpp_lib_apply 201603L
#endif
# 72 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#if 0 /* disabled by -frewrite-includes */
#if !defined(__cpp_lib_as_const) && __cplusplus >= 201510L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 74 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#define __cpp_lib_as_const 201510L
#endif
# 76 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#endif  // __has_include(<version>) && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 78 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"

#endif  // LIB_STDCOMPAT_VERSION_H_
# 80 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../version.h"
#endif /* version.h expanded by -frewrite-includes */
# 14 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h" 2

namespace cpp17 {

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_void_t) && __cpp_lib_void_t >= 201411L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"
using std::void_t;
#else   // Provide std::void_t polyfill.
# 21 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"
template <typename... T>
using void_t = void;
#endif  // __cpp_lib_void_t >= 201411L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 24 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_logical_traits) && __cpp_lib_logical_traits >= 201510L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

using std::conjunction;
using std::conjunction_v;
using std::disjunction;
using std::disjunction_v;
using std::negation;
using std::negation_v;

#else  // Provide polyfills for std::{negation, conjunction, disjunction} and the *_v helpers.
# 36 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

template <typename... Ts>
struct conjunction : std::true_type {};
template <typename T>
struct conjunction<T> : T {};
template <typename First, typename... Rest>
struct conjunction<First, Rest...>
    : std::conditional_t<bool(First::value), conjunction<Rest...>, First> {};

template <typename... Ts>
static constexpr bool conjunction_v = conjunction<Ts...>::value;

template <typename... Ts>
struct disjunction : std::false_type {};
template <typename T>
struct disjunction<T> : T {};
template <typename First, typename... Rest>
struct disjunction<First, Rest...>
    : std::conditional_t<bool(First::value), First, disjunction<Rest...>> {};

template <typename... Ts>
static constexpr bool disjunction_v = disjunction<Ts...>::value;

// Utility type that negates its truth-like parameter type.
template <typename T>
struct negation : std::integral_constant<bool, !bool(T::value)> {};

template <typename T>
static constexpr bool negation_v = negation<T>::value;

#endif  // __cpp_lib_logical_traits >= 201510L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 67 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_bool_constant) && __cpp_lib_bool_constant >= 201505L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 70 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

using std::bool_constant;

#else  // Provide polyfill for std::bool_constant
# 74 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

template <bool B>
using bool_constant = std::integral_constant<bool, B>;

#endif  // __cpp_lib_bool_constant >= 201505L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 79 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_type_trait_variable_templates) && \
    __cpp_lib_type_trait_variable_templates >= 201510L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 82 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

using std::is_array_v;
using std::is_class_v;
using std::is_enum_v;
using std::is_floating_point_v;
using std::is_function_v;
using std::is_integral_v;
using std::is_lvalue_reference_v;
using std::is_member_function_pointer_v;
using std::is_member_object_pointer_v;
using std::is_null_pointer_v;
using std::is_pointer_v;
using std::is_rvalue_reference_v;
using std::is_union_v;
using std::is_void_v;

using std::is_arithmetic_v;
using std::is_compound_v;
using std::is_fundamental_v;
using std::is_member_pointer_v;
using std::is_object_v;
using std::is_reference_v;
using std::is_scalar_v;

using std::is_abstract_v;
using std::is_const_v;
using std::is_empty_v;
using std::is_final_v;
using std::is_pod_v;
using std::is_polymorphic_v;
using std::is_signed_v;
using std::is_standard_layout_v;
using std::is_trivial_v;
using std::is_trivially_copyable_v;
using std::is_unsigned_v;
using std::is_volatile_v;

using std::is_constructible_v;
using std::is_nothrow_constructible_v;
using std::is_trivially_constructible_v;

using std::is_default_constructible_v;
using std::is_nothrow_default_constructible_v;
using std::is_trivially_default_constructible_v;

using std::is_copy_constructible_v;
using std::is_nothrow_copy_constructible_v;
using std::is_trivially_copy_constructible_v;

using std::is_move_constructible_v;
using std::is_nothrow_move_constructible_v;
using std::is_trivially_move_constructible_v;

using std::is_assignable_v;
using std::is_nothrow_assignable_v;
using std::is_trivially_assignable_v;

using std::is_copy_assignable_v;
using std::is_nothrow_copy_assignable_v;
using std::is_trivially_copy_assignable_v;

using std::is_move_assignable_v;
using std::is_nothrow_move_assignable_v;
using std::is_trivially_move_assignable_v;

using std::is_destructible_v;
using std::is_nothrow_destructible_v;
using std::is_trivially_destructible_v;

using std::has_virtual_destructor_v;

using std::alignment_of_v;
using std::extent_v;
using std::rank_v;

using std::is_base_of_v;
using std::is_convertible_v;
using std::is_same_v;

#else  // Provide polyfills for the bulk of the *_v helpers
# 162 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

template <typename T>
static constexpr bool is_void_v = std::is_void<T>::value;
template <typename T>
static constexpr bool is_null_pointer_v = std::is_null_pointer<T>::value;
template <typename T>
static constexpr bool is_integral_v = std::is_integral<T>::value;
template <typename T>
static constexpr bool is_floating_point_v = std::is_floating_point<T>::value;
template <typename T>
static constexpr bool is_array_v = std::is_array<T>::value;
template <typename T>
static constexpr bool is_enum_v = std::is_enum<T>::value;
template <typename T>
static constexpr bool is_union_v = std::is_union<T>::value;
template <typename T>
static constexpr bool is_class_v = std::is_class<T>::value;
template <typename T>
static constexpr bool is_function_v = std::is_function<T>::value;
template <typename T>
static constexpr bool is_pointer_v = std::is_pointer<T>::value;
template <typename T>
static constexpr bool is_lvalue_reference_v = std::is_lvalue_reference<T>::value;
template <typename T>
static constexpr bool is_rvalue_reference_v = std::is_rvalue_reference<T>::value;
template <typename T>
static constexpr bool is_member_object_pointer_v = std::is_member_object_pointer<T>::value;
template <typename T>
static constexpr bool is_member_function_pointer_v = std::is_member_function_pointer<T>::value;

template <typename T>
static constexpr bool is_fundamental_v = std::is_fundamental<T>::value;
template <typename T>
static constexpr bool is_arithmetic_v = std::is_arithmetic<T>::value;
template <typename T>
static constexpr bool is_scalar_v = std::is_scalar<T>::value;
template <typename T>
static constexpr bool is_object_v = std::is_object<T>::value;
template <typename T>
static constexpr bool is_compound_v = std::is_compound<T>::value;
template <typename T>
static constexpr bool is_reference_v = std::is_reference<T>::value;
template <typename T>
static constexpr bool is_member_pointer_v = std::is_member_pointer<T>::value;

template <typename T>
static constexpr bool is_const_v = std::is_const<T>::value;
template <typename T>
static constexpr bool is_volatile_v = std::is_volatile<T>::value;
template <typename T>
static constexpr bool is_trivial_v = std::is_trivial<T>::value;
template <typename T>
static constexpr bool is_trivially_copyable_v = std::is_trivially_copyable<T>::value;
template <typename T>
static constexpr bool is_standard_layout_v = std::is_standard_layout<T>::value;
template <typename T>
[[deprecated]] static constexpr bool is_pod_v = std::is_pod<T>::value;
template <typename T>
static constexpr bool is_empty_v = std::is_empty<T>::value;
template <typename T>
static constexpr bool is_polymorphic_v = std::is_polymorphic<T>::value;
template <typename T>
static constexpr bool is_abstract_v = std::is_abstract<T>::value;
template <typename T>
static constexpr bool is_final_v = std::is_final<T>::value;
template <typename T>
static constexpr bool is_signed_v = std::is_signed<T>::value;
template <typename T>
static constexpr bool is_unsigned_v = std::is_unsigned<T>::value;

template <typename T, typename... Args>
static constexpr bool is_constructible_v = std::is_constructible<T, Args...>::value;
template <typename T, typename... Args>
static constexpr bool is_trivially_constructible_v =
    std::is_trivially_constructible<T, Args...>::value;
template <typename T, typename... Args>
static constexpr bool is_nothrow_constructible_v = std::is_nothrow_constructible<T, Args...>::value;

template <typename T>
static constexpr bool is_default_constructible_v = std::is_default_constructible<T>::value;
template <typename T>
static constexpr bool is_trivially_default_constructible_v =
    std::is_trivially_default_constructible<T>::value;
template <typename T>
static constexpr bool is_nothrow_default_constructible_v =
    std::is_nothrow_default_constructible<T>::value;

template <typename T>
static constexpr bool is_copy_constructible_v = std::is_copy_constructible<T>::value;
template <typename T>
static constexpr bool is_trivially_copy_constructible_v =
    std::is_trivially_copy_constructible<T>::value;
template <typename T>
static constexpr bool is_nothrow_copy_constructible_v =
    std::is_nothrow_copy_constructible<T>::value;

template <typename T>
static constexpr bool is_move_constructible_v = std::is_move_constructible<T>::value;
template <typename T>
static constexpr bool is_trivially_move_constructible_v =
    std::is_trivially_move_constructible<T>::value;
template <typename T>
static constexpr bool is_nothrow_move_constructible_v =
    std::is_nothrow_move_constructible<T>::value;

template <typename T, typename U>
static constexpr bool is_assignable_v = std::is_assignable<T, U>::value;
template <typename T, typename U>
static constexpr bool is_trivially_assignable_v = std::is_trivially_assignable<T, U>::value;
template <typename T, typename U>
static constexpr bool is_nothrow_assignable_v = std::is_nothrow_assignable<T, U>::value;

template <typename T>
static constexpr bool is_copy_assignable_v = std::is_copy_assignable<T>::value;
template <typename T>
static constexpr bool is_trivially_copy_assignable_v = std::is_trivially_copy_assignable<T>::value;
template <typename T>
static constexpr bool is_nothrow_copy_assignable_v = std::is_nothrow_copy_assignable<T>::value;

template <typename T>
static constexpr bool is_move_assignable_v = std::is_move_assignable<T>::value;
template <typename T>
static constexpr bool is_trivially_move_assignable_v = std::is_trivially_move_assignable<T>::value;
template <typename T>
static constexpr bool is_nothrow_move_assignable_v = std::is_nothrow_move_assignable<T>::value;

template <typename T>
static constexpr bool is_destructible_v = std::is_destructible<T>::value;
template <typename T>
static constexpr bool is_trivially_destructible_v = std::is_trivially_destructible<T>::value;
template <typename T>
static constexpr bool is_nothrow_destructible_v = std::is_nothrow_destructible<T>::value;

template <typename T>
static constexpr bool has_virtual_destructor_v = std::has_virtual_destructor<T>::value;

template <typename T>
static constexpr bool alignment_of_v = std::alignment_of<T>::value;
template <typename T>
static constexpr bool rank_v = std::rank<T>::value;
template <typename T, unsigned N = 0>
static constexpr bool extent_v = std::extent<T, N>::value;

template <typename T, typename U>
static constexpr bool is_same_v = std::is_same<T, U>::value;
template <typename T, typename U>
static constexpr bool is_base_of_v = std::is_base_of<T, U>::value;
template <typename T, typename U>
static constexpr bool is_convertible_v = std::is_convertible<T, U>::value;

#endif  // __cpp_lib_type_trait_variable_templates >= 201510L &&
# 313 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"
        // !defined(LIB_STDCOMPAT_USE_POLYFILLS)

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_is_aggregate) && __cpp_lib_is_aggregate >= 201703L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 317 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

using std::is_aggregate;
using std::is_aggregate_v;

#else  // Provide std::is_aggregate polyfill
# 322 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

template <typename T>
struct is_aggregate : bool_constant<__is_aggregate(T)> {};

template <typename T>
static constexpr bool is_aggregate_v = is_aggregate<T>::value;

#endif  // __cpp_lib_is_aggregate >= 201703L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 330 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_is_invocable) && __cpp_lib_is_invocable >= 201703L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 333 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

using std::is_invocable;
using std::is_invocable_r;
using std::is_nothrow_invocable;
using std::is_nothrow_invocable_r;

using std::is_invocable_r_v;
using std::is_invocable_v;
using std::is_nothrow_invocable_r_v;
using std::is_nothrow_invocable_v;

using std::invoke_result;
using std::invoke_result_t;

#else
# 348 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

template <typename R, typename F, typename... Args>
struct is_invocable_r : decltype(::cpp17::internal::is_valid_invoke<R, F, Args...>(nullptr)) {};

template <typename R, typename F, typename... Args>
static constexpr bool is_invocable_r_v = is_invocable_r<R, F, Args...>::value;

// INVOKE() is a subexpression of INVOKE<R>()
// INVOKE<void>(f, t1, t2, ..., tn) results in a call to
// static_cast<void>(INVOKE(f, t1, t2, ..., tn)) per [func.require] ¶ 2
template <typename F, typename... Args>
struct is_invocable : is_invocable_r<void, F, Args...> {};

template <typename F, typename... Args>
static constexpr bool is_invocable_v = is_invocable<F, Args...>::value;

template <typename F, typename... Args>
struct is_nothrow_invocable : bool_constant<is_invocable_v<F, Args...> &&
                                            noexcept(::cpp17::internal::invoke(
                                                std::declval<F>(), std::declval<Args>()...))> {};

template <typename F, typename... Args>
static constexpr bool is_nothrow_invocable_v = is_nothrow_invocable<F, Args...>::value;

template <typename R, typename F, typename... Args>
struct is_nothrow_invocable_r : bool_constant<is_invocable_r_v<R, F, Args...> &&
                                              noexcept(::cpp17::internal::invoke_r<R>(
                                                  std::declval<F>(), std::declval<Args>()...))> {};

template <typename R, typename F, typename... Args>
static constexpr bool is_nothrow_invocable_r_v = is_nothrow_invocable_r<R, F, Args...>::value;

template <typename F, typename... Args>
struct invoke_result : ::cpp17::internal::invoke_result<is_invocable_v<F, Args...>, F, Args...> {};

template <typename F, typename... Args>
using invoke_result_t = typename invoke_result<F, Args...>::type;

#endif  // __cpp_lib_is_invocable >= 201703L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 387 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

}  // namespace cpp17

namespace cpp20 {

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_bounded_array_traits) && __cpp_lib_bounded_array_traits >= 201902L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 394 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

using std::is_bounded_array;
using std::is_bounded_array_v;

using std::is_unbounded_array;
using std::is_unbounded_array_v;

#else  // Provide polyfills for std::is_{,un}bounded_array{,_v}
# 402 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

template <typename T>
struct is_bounded_array : std::false_type {};
template <typename T, std::size_t N>
struct is_bounded_array<T[N]> : std::true_type {};

template <typename T>
static constexpr bool is_bounded_array_v = is_bounded_array<T>::value;

template <typename T>
struct is_unbounded_array : std::false_type {};
template <typename T>
struct is_unbounded_array<T[]> : std::true_type {};

template <typename T>
static constexpr bool is_unbounded_array_v = is_unbounded_array<T>::value;

#endif  // __cpp_lib_bounded_array_traits >= 201902L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 420 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_remove_cvref) && __cpp_lib_remove_cvref >= 201711L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 423 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

using std::remove_cvref;
using std::remove_cvref_t;

#else  // Provide polyfill for std::remove_cvref{,_t}
# 428 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

template <typename T>
struct remove_cvref {
  using type = std::remove_cv_t<std::remove_reference_t<T>>;
};

template <typename T>
using remove_cvref_t = typename remove_cvref<T>::type;

#endif  // __cpp_lib_remove_cvref >= 201711L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 438 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_type_identity) && __cpp_lib_type_identity >= 201806L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 441 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

using std::type_identity;
using std::type_identity_t;

#else  // Provide polyfill for std::type_identity{,_t}
# 446 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

template <typename T>
struct type_identity {
  using type = T;
};

template <typename T>
using type_identity_t = typename type_identity<T>::type;

#endif  // __cpp_lib_type_identity >= 201806L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 456 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_is_constant_evaluated) && __cpp_lib_is_constant_evaluated >= 201811L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 459 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

#define LIB_STDCOMPAT_CONSTEVAL_SUPPORT 1
using std::is_constant_evaluated;

#else  // Provide polyfill for std::is_constant_evaluated
# 464 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

#ifdef __has_builtin
#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__builtin_is_constant_evaluated)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 467 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

#define LIB_STDCOMPAT_CONSTEVAL_SUPPORT 1
inline constexpr bool is_constant_evaluated() noexcept { return __builtin_is_constant_evaluated(); }

#endif  // __has_builtin(__builtin_is_constant_evaluated)
# 472 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"
#endif  // __has_builtin
# 473 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

#ifndef LIB_STDCOMPAT_CONSTEVAL_SUPPORT

#define LIB_STDCOMPAT_CONSTEVAL_SUPPORT 0
inline constexpr bool is_constant_evaluated() noexcept { return false; }

#endif  // LIB_STDCOMPAT_CONSTEVAL_SUPPORT
# 480 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

#endif  // __cpp_lib_is_constant_evaluated >= 201811L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 482 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

}  // namespace cpp20

namespace cpp23 {

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_is_scoped_enum) && __cpp_lib_is_scoped_enum >= 202011L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 489 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

using std::is_scoped_enum;
using std::is_scoped_enum_v;

#else  // Provide polyfill for std::is_scoped_enum{,_v}
# 494 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

template <typename T, typename = void>
struct is_scoped_enum : std::false_type {};

template <typename T>
struct is_scoped_enum<T, std::enable_if_t<cpp17::is_enum_v<T>>>
    : cpp17::bool_constant<!cpp17::is_convertible_v<T, std::underlying_type_t<T>>> {};

template <typename T>
static constexpr bool is_scoped_enum_v = is_scoped_enum<T>::value;

#endif  // __cpp_lib_is_scoped_enum >= 202011L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 506 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"

}  // namespace cpp23

#endif  // LIB_STDCOMPAT_TYPE_TRAITS_H_
# 510 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/../type_traits.h"
#endif /* type_traits.h expanded by -frewrite-includes */
# 12 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/bit.h" 2

namespace cpp20 {
namespace internal {

// Helper for exclusing specific char types when char is considered unsigned by the compiler.
template <typename T>
struct is_bit_type
    : std::integral_constant<
          bool, std::is_unsigned<T>::value && !std::is_same<bool, T>::value &&
                    !std::is_same<T, char>::value && !std::is_same<T, char16_t>::value &&
                    !std::is_same<T, char32_t>::value && !std::is_same<T, wchar_t>::value> {};

// Rotation implementation.
// Only internal for usage in implementation of certain methods.
template <class T>
[[gnu::warn_unused_result]] constexpr std::enable_if_t<is_bit_type<T>::value, T> rotl(
    T x, int s) noexcept {
  const auto digits = std::numeric_limits<T>::digits;
  const auto rotate_by = s % digits;

  if (rotate_by > 0) {
    return static_cast<T>((x << rotate_by) | (x >> (digits - rotate_by)));
  }

  if (rotate_by < 0) {
    return static_cast<T>((x >> -rotate_by) | (x << (digits + rotate_by)));
  }

  return x;
}

template <class T>
[[gnu::warn_unused_result]] constexpr std::enable_if_t<is_bit_type<T>::value, T> rotr(
    T x, int s) noexcept {
  int digits = std::numeric_limits<T>::digits;
  int rotate_by = s % digits;

  if (rotate_by > 0) {
    return static_cast<T>((x >> rotate_by) | (x << (digits - rotate_by)));
  }

  if (rotate_by < 0) {
    return rotl(x, -rotate_by);
  }

  return x;
}

// Overloads for intrinsics.
// Precondition: |value| != 0.
template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value && sizeof(T) <= sizeof(unsigned), int>
count_zeros_from_right(T value) noexcept {
  return __builtin_ctz(static_cast<unsigned>(value));
}

template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value && sizeof(unsigned) < sizeof(T) &&
                               sizeof(T) <= sizeof(unsigned long),
                           int>
count_zeros_from_right(T value) noexcept {
  return __builtin_ctzl(static_cast<unsigned long>(value));
}

template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value && sizeof(unsigned long) < sizeof(T) &&
                               sizeof(T) <= sizeof(unsigned long long),
                           int>
count_zeros_from_right(T value) noexcept {
  return __builtin_ctzll(static_cast<unsigned long long>(value));
}

template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value && sizeof(unsigned long long) < sizeof(T), int>
count_zeros_from_right(T value) noexcept {
  int count = 0;
  int iter_count = 0;
  const unsigned long long max_digits = std::numeric_limits<unsigned long long>::digits;

  for (int slot = 0; slot * max_digits < std::numeric_limits<T>::digits; ++slot) {
    const unsigned long long chunk =
        static_cast<unsigned long long>(internal::rotr(value, (slot)*max_digits));
    iter_count = (chunk == 0) ? static_cast<int>(max_digits) : count_zeros_from_right(chunk);
    count += iter_count;
    if (iter_count != max_digits) {
      break;
    }
  }
  return count - static_cast<int>(std::numeric_limits<T>::digits % max_digits);
}

template <typename T, typename U,
          typename std::enable_if<sizeof(T) >= sizeof(U), bool>::type = true>
struct digit_diff
    : std::integral_constant<T, std::numeric_limits<T>::digits - std::numeric_limits<U>::digits> {};

template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value && sizeof(T) <= sizeof(unsigned), int>
count_zeros_from_left(T value) noexcept {
  return __builtin_clz(static_cast<unsigned>(value)) -
         static_cast<int>(digit_diff<unsigned, T>::value);
}

template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value && sizeof(unsigned) < sizeof(T) &&
                               sizeof(T) <= sizeof(unsigned long),
                           int>
count_zeros_from_left(T value) noexcept {
  return __builtin_clzl(static_cast<unsigned long>(value)) -
         static_cast<int>(digit_diff<unsigned long, T>::value);
}

template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value && sizeof(unsigned long) < sizeof(T) &&
                               sizeof(T) <= sizeof(unsigned long long),
                           int>
count_zeros_from_left(T value) noexcept {
  return __builtin_clzll(static_cast<unsigned long long>(value)) -
         static_cast<int>(digit_diff<unsigned long long, T>::value);
}

template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value && sizeof(unsigned long long) < sizeof(T), int>
count_zeros_from_left(T value) noexcept {
  int count = 0;
  int iter_count = 0;
  const unsigned int max_digits = std::numeric_limits<unsigned long long>::digits;

  for (int slot = 0; slot * max_digits < std::numeric_limits<T>::digits; ++slot) {
    const unsigned long long chunk =
        static_cast<unsigned long long>(internal::rotl(value, (slot + 1) * max_digits));
    iter_count = (chunk == 0) ? static_cast<int>(max_digits) : count_zeros_from_left(chunk);
    count += iter_count;
    if (iter_count != max_digits) {
      break;
    }
  }
  return count - static_cast<int>(std::numeric_limits<T>::digits % max_digits);
}

template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value && sizeof(T) <= sizeof(unsigned), int> popcount(
    T value) noexcept {
  return __builtin_popcount(static_cast<unsigned>(value));
}

template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value && sizeof(unsigned) < sizeof(T) &&
                               sizeof(T) <= sizeof(unsigned long),
                           int>
popcount(T value) noexcept {
  return __builtin_popcountl(static_cast<unsigned long>(value));
}

template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value && sizeof(unsigned long) < sizeof(T) &&
                               sizeof(T) <= sizeof(unsigned long long),
                           int>
popcount(T value) noexcept {
  return __builtin_popcountll(static_cast<unsigned long long>(value));
}

template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value && sizeof(unsigned long long) < sizeof(T), int>
popcount(T value) noexcept {
  int accumulated_count = 0;
  while (value != 0) {
    accumulated_count += popcount(static_cast<unsigned long long>(value));
    value >>= std::numeric_limits<unsigned long long>::digits;
  }
  return accumulated_count;
}

template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value, int> bit_width(T value) {
  const int zeros_left = (value == 0) ? std::numeric_limits<T>::digits
                                      : static_cast<int>(count_zeros_from_left(value));
  return std::numeric_limits<T>::digits - zeros_left;
}

template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value && !std::is_same<T, decltype(+T())>::value, T>
bit_ceil(T value) {
  unsigned ub_offset = std::numeric_limits<unsigned>::digits - std::numeric_limits<T>::digits;
  return static_cast<T>(1 << (bit_width(static_cast<T>(value - 1)) + ub_offset) >> ub_offset);
}

// When there is no integer promotion.
template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value && std::is_same<T, decltype(+T())>::value, T>
bit_ceil(T value) {
  auto width = bit_width(value - 1);
  if (!cpp20::is_constant_evaluated() && width == std::numeric_limits<T>::digits) {
    __builtin_abort();
  }
  return static_cast<T>(1) << width;
}

template <typename T>
constexpr std::enable_if_t<is_bit_type<T>::value, T> bit_floor(T value) {
  return value == 0 ? 0 : static_cast<T>(T(1) << (static_cast<T>(bit_width(value)) - T(1)));
}

template <unsigned little, unsigned big>
constexpr unsigned native_endianess() {
  auto curr = __BYTE_ORDER__;
  if (curr == __ORDER_LITTLE_ENDIAN__) {
    return little;
  }
  if (curr == __ORDER_BIG_ENDIAN__) {
    return big;
  }
  return 0x404;
}

}  // namespace internal
}  // namespace cpp20

#endif  // LIB_STDCOMPAT_INTERNAL_BIT_H_
# 231 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/bit.h"
#endif /* bit.h expanded by -frewrite-includes */
# 12 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) /* memory.h expanded by -frewrite-includes */
#include "memory.h"
#else /* memory.h expanded by -frewrite-includes */
# 12 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"
# 1 "../../sdk/lib/stdcompat/include/lib/stdcompat/memory.h" 1
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIB_STDCOMPAT_MEMORY_H_
#define LIB_STDCOMPAT_MEMORY_H_

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* memory expanded by -frewrite-includes */
#include <memory>
#else /* memory expanded by -frewrite-includes */
# 8 "../../sdk/lib/stdcompat/include/lib/stdcompat/memory.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_MEMORY
#define _LIBCPP_MEMORY

/*
    memory synopsis

namespace std
{

struct allocator_arg_t { };
inline constexpr allocator_arg_t allocator_arg = allocator_arg_t();

template <class T, class Alloc> struct uses_allocator;

template <class Ptr>
struct pointer_traits
{
    typedef Ptr pointer;
    typedef <details> element_type;
    typedef <details> difference_type;

    template <class U> using rebind = <details>;

    static pointer pointer_to(<details>);
};

template <class T>
struct pointer_traits<T*>
{
    typedef T* pointer;
    typedef T element_type;
    typedef ptrdiff_t difference_type;

    template <class U> using rebind = U*;

    static pointer pointer_to(<details>) noexcept; // constexpr in C++20
};

template <class T> constexpr T* to_address(T* p) noexcept; // C++20
template <class Ptr> constexpr auto to_address(const Ptr& p) noexcept; // C++20

template <class Alloc>
struct allocator_traits
{
    typedef Alloc                        allocator_type;
    typedef typename allocator_type::value_type
                                         value_type;

    typedef Alloc::pointer | value_type* pointer;
    typedef Alloc::const_pointer
          | pointer_traits<pointer>::rebind<const value_type>
                                         const_pointer;
    typedef Alloc::void_pointer
          | pointer_traits<pointer>::rebind<void>
                                         void_pointer;
    typedef Alloc::const_void_pointer
          | pointer_traits<pointer>::rebind<const void>
                                         const_void_pointer;
    typedef Alloc::difference_type
          | pointer_traits<pointer>::difference_type
                                         difference_type;
    typedef Alloc::size_type
          | make_unsigned<difference_type>::type
                                         size_type;
    typedef Alloc::propagate_on_container_copy_assignment
          | false_type                   propagate_on_container_copy_assignment;
    typedef Alloc::propagate_on_container_move_assignment
          | false_type                   propagate_on_container_move_assignment;
    typedef Alloc::propagate_on_container_swap
          | false_type                   propagate_on_container_swap;
    typedef Alloc::is_always_equal
          | is_empty                     is_always_equal;

    template <class T> using rebind_alloc  = Alloc::rebind<T>::other | Alloc<T, Args...>;
    template <class T> using rebind_traits = allocator_traits<rebind_alloc<T>>;

    static pointer allocate(allocator_type& a, size_type n);                          // constexpr and [[nodiscard]] in C++20
    static pointer allocate(allocator_type& a, size_type n, const_void_pointer hint); // constexpr and [[nodiscard]] in C++20

    static void deallocate(allocator_type& a, pointer p, size_type n) noexcept; // constexpr in C++20

    template <class T, class... Args>
    static void construct(allocator_type& a, T* p, Args&&... args); // constexpr in C++20

    template <class T>
    static void destroy(allocator_type& a, T* p); // constexpr in C++20

    static size_type max_size(const allocator_type& a); // noexcept in C++14, constexpr in C++20
    static allocator_type select_on_container_copy_construction(const allocator_type& a); // constexpr in C++20
};

template<class Pointer>
struct allocation_result {
    Pointer ptr;
    size_t count;
}; // since C++23

template<class Allocator>
[[nodiscard]] constexpr allocation_result<typename allocator_traits<Allocator>::pointer>
    allocate_at_least(Allocator& a, size_t n); // since C++23

template <>
class allocator<void> // removed in C++20
{
public:
    typedef void*                                 pointer;
    typedef const void*                           const_pointer;
    typedef void                                  value_type;

    template <class _Up> struct rebind {typedef allocator<_Up> other;};
};

template <class T>
class allocator
{
public:
    typedef size_t    size_type;
    typedef ptrdiff_t difference_type;
    typedef T*        pointer;                           // deprecated in C++17, removed in C++20
    typedef const T*  const_pointer;                     // deprecated in C++17, removed in C++20
    typedef typename add_lvalue_reference<T>::type
                      reference;                         // deprecated in C++17, removed in C++20
    typedef typename add_lvalue_reference<const T>::type
                      const_reference;                   // deprecated in C++17, removed in C++20

    typedef T         value_type;

    template <class U> struct rebind {typedef allocator<U> other;}; // deprecated in C++17, removed in C++20

    typedef true_type propagate_on_container_move_assignment;
    typedef true_type is_always_equal;

    constexpr allocator() noexcept;                      // constexpr in C++20
    constexpr allocator(const allocator&) noexcept;      // constexpr in C++20
    template <class U>
      constexpr allocator(const allocator<U>&) noexcept; // constexpr in C++20
    ~allocator();                                        // constexpr in C++20
    pointer address(reference x) const noexcept;             // deprecated in C++17, removed in C++20
    const_pointer address(const_reference x) const noexcept; // deprecated in C++17, removed in C++20
    T* allocate(size_t n, const void* hint);          // deprecated in C++17, removed in C++20
    T* allocate(size_t n);                              // constexpr in C++20
    void deallocate(T* p, size_t n) noexcept;           // constexpr in C++20
    size_type max_size() const noexcept;              // deprecated in C++17, removed in C++20
    template<class U, class... Args>
        void construct(U* p, Args&&... args);         // deprecated in C++17, removed in C++20
    template <class U>
        void destroy(U* p);                           // deprecated in C++17, removed in C++20
};

template <class T, class U>
bool operator==(const allocator<T>&, const allocator<U>&) noexcept; // constexpr in C++20

template <class T, class U>
bool operator!=(const allocator<T>&, const allocator<U>&) noexcept; // removed in C++20

template <class OutputIterator, class T>
class raw_storage_iterator // deprecated in C++17, removed in C++20
    : public iterator<output_iterator_tag, void, void, void, void> // until C++17
{
public:
    typedef output_iterator_tag iterator_category;
    typedef void                value_type;
    typedef void                difference_type; // until C++20
    typedef ptrdiff_t           difference_type; // since C++20
    typedef void                pointer;
    typedef void                reference;

    explicit raw_storage_iterator(OutputIterator x);
    raw_storage_iterator& operator*();
    raw_storage_iterator& operator=(const T& element);
    raw_storage_iterator& operator++();
    raw_storage_iterator  operator++(int);
};

template <class T> pair<T*,ptrdiff_t> get_temporary_buffer(ptrdiff_t n) noexcept;
template <class T> void               return_temporary_buffer(T* p) noexcept;

template <class T> T* addressof(T& r) noexcept;
template <class T> T* addressof(const T&& r) noexcept = delete;

template <class InputIterator, class ForwardIterator>
ForwardIterator
uninitialized_copy(InputIterator first, InputIterator last, ForwardIterator result);

namespace ranges {

template<class InputIterator, class OutputIterator>
using uninitialized_copy_result = in_out_result<InputIterator, OutputIterator>; // since C++20

template<input_iterator InputIterator, sentinel-for<InputIterator> Sentinel1, nothrow-forward-iterator OutputIterator, nothrow-sentinel-for<OutputIterator> Sentinel2>
  requires constructible_from<iter_value_t<OutputIterator>, iter_reference_t<InputIterator>>
uninitialized_copy_result<InputIterator, OutputIterator>
uninitialized_copy(InputIterator ifirst, Sentinel1 ilast, OutputIterator ofirst, Sentinel2 olast); // since C++20

template<input_range InputRange, nothrow-forward-range OutputRange>
  requires constructible_from<range_value_t<OutputRange>, range_reference_t<InputRange>>
uninitialized_copy_result<borrowed_iterator_t<InputRange>, borrowed_iterator_t<OutputRange>>
uninitialized_copy(InputRange&& in_range, OutputRange&& out_range); // since C++20

}

template <class InputIterator, class Size, class ForwardIterator>
ForwardIterator
uninitialized_copy_n(InputIterator first, Size n, ForwardIterator result);

namespace ranges {

template<class InputIterator, class OutputIterator>
using uninitialized_copy_n_result = in_out_result<InputIterator, OutputIterator>; // since C++20

template<input_iterator InputIterator, nothrow-forward-iterator OutputIterator, nothrow-sentinel-for<OutputIterator> Sentinel>
  requires constructible_from<iter_value_t<OutputIterator>, iter_reference_t<InputIterator>>
uninitialized_copy_n_result<InputIterator, OutputIterator>
uninitialized_copy_n(InputIterator ifirst, iter_difference_t<InputIterator> n, OutputIterator ofirst, Sentinel olast); // since C++20

}

template <class ForwardIterator, class T>
void uninitialized_fill(ForwardIterator first, ForwardIterator last, const T& x);

namespace ranges {

template <nothrow-forward-iterator ForwardIterator, nothrow-sentinel-for<ForwardIterator> Sentinel, class T>
  requires constructible_from<iter_value_t<ForwardIterator>, const T&>
ForwardIterator uninitialized_fill(ForwardIterator first, Sentinel last, const T& x); // since C++20

template <nothrow-forward-range ForwardRange, class T>
  requires constructible_from<range_value_t<ForwardRange>, const T&>
borrowed_iterator_t<ForwardRange> uninitialized_fill(ForwardRange&& range, const T& x); // since C++20

}

template <class ForwardIterator, class Size, class T>
ForwardIterator
uninitialized_fill_n(ForwardIterator first, Size n, const T& x);

namespace ranges {

template <nothrow-forward-iterator ForwardIterator, class T>
  requires constructible_from<iter_value_t<ForwardIterator>, const T&>
ForwardIterator uninitialized_fill_n(ForwardIterator first, iter_difference_t<ForwardIterator> n); // since C++20

}

template <class T, class ...Args>
constexpr T* construct_at(T* location, Args&& ...args); // since C++20

namespace ranges {
  template<class T, class... Args>
    constexpr T* construct_at(T* location, Args&&... args); // since C++20
}

template <class T>
void destroy_at(T* location); // constexpr in C++20

namespace ranges {
  template<destructible T>
    constexpr void destroy_at(T* location) noexcept; // since C++20
}

template <class ForwardIterator>
void destroy(ForwardIterator first, ForwardIterator last); // constexpr in C++20

namespace ranges {
  template<nothrow-input-iterator InputIterator, nothrow-sentinel-for<InputIterator> Sentinel>
    requires destructible<iter_value_t<InputIterator>>
    constexpr InputIterator destroy(InputIterator first, Sentinel last) noexcept; // since C++20
  template<nothrow-input-range InputRange>
    requires destructible<range_value_t<InputRange>>
    constexpr borrowed_iterator_t<InputRange> destroy(InputRange&& range) noexcept; // since C++20
}

template <class ForwardIterator, class Size>
ForwardIterator destroy_n(ForwardIterator first, Size n); // constexpr in C++20

namespace ranges {
  template<nothrow-input-iterator InputIterator>
    requires destructible<iter_value_t<InputIterator>>
    constexpr InputIterator destroy_n(InputIterator first, iter_difference_t<InputIterator> n) noexcept; // since C++20
}

template <class InputIterator, class ForwardIterator>
 ForwardIterator uninitialized_move(InputIterator first, InputIterator last, ForwardIterator result);

namespace ranges {

template<class InputIterator, class OutputIterator>
using uninitialized_move_result = in_out_result<InputIterator, OutputIterator>; // since C++20

template <input_iterator InputIterator, sentinel_for<InputIterator> Sentinel1, nothrow-forward-iterator OutputIterator, nothrow-sentinel-for<O> Sentinel2>
  requires constructible_from<iter_value_t<OutputIterator>, iter_rvalue_reference_t<InputIterator>>
uninitialized_move_result<InputIterator, OutputIterator>
uninitialized_move(InputIterator ifirst, Sentinel1 ilast, OutputIterator ofirst, Sentinel2 olast); // since C++20

template<input_range InputRange, nothrow-forward-range OutputRange>
  requires constructible_from<range_value_t<OutputRange>, range_rvalue_reference_t<InputRange>>
uninitialized_move_result<borrowed_iterator_t<InputRange>, borrowed_iterator_t<OutputRange>>
uninitialized_move(InputRange&& in_range, OutputRange&& out_range); // since C++20

}

template <class InputIterator, class Size, class ForwardIterator>
 pair<InputIterator,ForwardIterator> uninitialized_move_n(InputIterator first, Size n, ForwardIterator result);

namespace ranges {

template<class InputIterator, class OutputIterator>
using uninitialized_move_n_result = in_out_result<InputIterator, OutputIterator>; // since C++20

template<input_iterator InputIterator, nothrow-forward-iterator OutputIterator, nothrow-sentinel-for<OutputIterator> Sentinel>
  requires constructible_from<iter_value_t<OutputIterator>, iter_rvalue_reference_t<InputIterator>>
uninitialized_move_n_result<InputIterator, OutputIterator>
uninitialized_move_n(InputIterator ifirst, iter_difference_t<InputIterator> n, OutputIterator ofirst, Sentinel olast); // since C++20

}

template <class ForwardIterator>
 void uninitialized_value_construct(ForwardIterator first, ForwardIterator last);

namespace ranges {

template <nothrow-forward-iterator ForwardIterator, nothrow-sentinel-for<ForwardIterator> Sentinel>
  requires default_initializable<iter_value_t<ForwardIterator>>
 ForwardIterator uninitialized_value_construct(ForwardIterator first, Sentinel last); // since C++20

template <nothrow-forward-range ForwardRange>
  requires default_initializable<range_value_t<ForwardRange>>
 borrowed_iterator_t<ForwardRange> uninitialized_value_construct(ForwardRange&& r); // since C++20

}

template <class ForwardIterator, class Size>
 ForwardIterator uninitialized_value_construct_n(ForwardIterator first, Size n);

namespace ranges {

template <nothrow-forward-iterator ForwardIterator>
  requires default_initializable<iter_value_t<ForwardIterator>>
 ForwardIterator uninitialized_value_construct_n(ForwardIterator first, iter_difference_t<ForwardIterator> n); // since C++20

}

template <class ForwardIterator>
 void uninitialized_default_construct(ForwardIterator first, ForwardIterator last);

namespace ranges {

template <nothrow-forward-iterator ForwardIterator, nothrow-sentinel-for<ForwardIterator> Sentinel>
  requires default_initializable<iter_value_t<ForwardIterator>>
 ForwardIterator uninitialized_default_construct(ForwardIterator first, Sentinel last); // since C++20

template <nothrow-forward-range ForwardRange>
  requires default_initializable<range_value_t<ForwardRange>>
 borrowed_iterator_t<ForwardRange> uninitialized_default_construct(ForwardRange&& r); // since C++20

}

template <class ForwardIterator, class Size>
 ForwardIterator uninitialized_default_construct_n(ForwardIterator first, Size n);

namespace ranges {

template <nothrow-forward-iterator ForwardIterator>
  requires default_initializable<iter_value_t<ForwardIterator>>
 ForwardIterator uninitialized_default_construct_n(ForwardIterator first, iter_difference_t<ForwardIterator> n); // since C++20

}

template <class Y> struct auto_ptr_ref {};      // deprecated in C++11, removed in C++17

template<class X>
class auto_ptr                                  // deprecated in C++11, removed in C++17
{
public:
    typedef X element_type;

    explicit auto_ptr(X* p =0) throw();
    auto_ptr(auto_ptr&) throw();
    template<class Y> auto_ptr(auto_ptr<Y>&) throw();
    auto_ptr& operator=(auto_ptr&) throw();
    template<class Y> auto_ptr& operator=(auto_ptr<Y>&) throw();
    auto_ptr& operator=(auto_ptr_ref<X> r) throw();
    ~auto_ptr() throw();

    typename add_lvalue_reference<X>::type operator*() const throw();
    X* operator->() const throw();
    X* get() const throw();
    X* release() throw();
    void reset(X* p =0) throw();

    auto_ptr(auto_ptr_ref<X>) throw();
    template<class Y> operator auto_ptr_ref<Y>() throw();
    template<class Y> operator auto_ptr<Y>() throw();
};

template <class T>
struct default_delete
{
    constexpr default_delete() noexcept = default;
    template <class U> constexpr default_delete(const default_delete<U>&) noexcept; // constexpr since C++23

    constexpr void operator()(T*) const noexcept;                                   // constexpr since C++23
};

template <class T>
struct default_delete<T[]>
{
    constexpr default_delete() noexcept = default;
    template <class U> constexpr default_delete(const default_delete <U[]>&) noexcept; // constexpr since C++23
    constexpr void operator()(T*) const noexcept;                                      // constexpr since C++23
    template <class U> void operator()(U*) const = delete;
};

template <class T, class D = default_delete<T>>
class unique_ptr
{
public:
    typedef see below pointer;
    typedef T element_type;
    typedef D deleter_type;

    // constructors
    constexpr unique_ptr() noexcept;
    constexpr explicit unique_ptr(pointer p) noexcept;           // constexpr since C++23
    constexpr unique_ptr(pointer p, see below d1) noexcept;      // constexpr since C++23
    constexpr unique_ptr(pointer p, see below d2) noexcept;      // constexpr since C++23
    constexpr unique_ptr(unique_ptr&& u) noexcept;               // constexpr since C++23
    constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { }
    template <class U, class E>
        constexpr unique_ptr(unique_ptr<U, E>&& u) noexcept;     // constexpr since C++23
    template <class U>
        unique_ptr(auto_ptr<U>&& u) noexcept;                    // removed in C++17

    // destructor
    constexpr ~unique_ptr();                                     // constexpr since C++23

    // assignment
    constexpr unique_ptr& operator=(unique_ptr&& u) noexcept;                         // constexpr since C++23
    template <class U, class E>
    constexpr unique_ptr& operator=(unique_ptr<U, E>&& u) noexcept;                   // constexpr since C++23
    constexpr unique_ptr& operator=(nullptr_t) noexcept;                              // constexpr since C++23

    // observers
    typename constexpr add_lvalue_reference<T>::type operator*() const;               // constexpr since C++23
    constexpr pointer operator->() const noexcept;                                    // constexpr since C++23
    constexpr pointer get() const noexcept;                                           // constexpr since C++23
    constexpr deleter_type& get_deleter() noexcept;                                   // constexpr since C++23
    constexpr const deleter_type& get_deleter() const noexcept;                       // constexpr since C++23
    constexpr explicit operator bool() const noexcept;                                // constexpr since C++23

    // modifiers
    constexpr pointer release() noexcept;                                             // constexpr since C++23
    constexpr void reset(pointer p = pointer()) noexcept;                             // constexpr since C++23
    constexpr void swap(unique_ptr& u) noexcept;                                      // constexpr since C++23
};

template <class T, class D>
class unique_ptr<T[], D>
{
public:
    typedef implementation-defined pointer;
    typedef T element_type;
    typedef D deleter_type;

    // constructors
    constexpr unique_ptr() noexcept;
    constexpr explicit unique_ptr(pointer p) noexcept;          // constexpr since C++23
    constexpr unique_ptr(pointer p, see below d) noexcept;      // constexpr since C++23
    constexpr unique_ptr(pointer p, see below d) noexcept;      // constexpr since C++23
    constexpr unique_ptr(unique_ptr&& u) noexcept;              // constexpr since C++23
    template <class U, class E>
    constexpr unique_ptr(unique_ptr <U, E>&& u) noexcept;       // constexpr since C++23
    constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { }

    // destructor
    constexpr ~unique_ptr();                                    // constexpr since C++23

    // assignment
    constexpr unique_ptr& operator=(unique_ptr&& u) noexcept;        // constexpr since C++23
    template <class U, class E>
    constexpr unique_ptr& operator=(unique_ptr <U, E>&& u) noexcept; // constexpr since C++23
    constexpr unique_ptr& operator=(nullptr_t) noexcept;             // constexpr since C++23

    // observers
    constexpr T& operator[](size_t i) const;                    // constexpr since C++23
    constexpr pointer get() const noexcept;                     // constexpr since C++23
    constexpr deleter_type& get_deleter() noexcept;             // constexpr since C++23
    constexpr const deleter_type& get_deleter() const noexcept; // constexpr since C++23
    constexpr explicit operator bool() const noexcept;          // constexpr since C++23

    // modifiers
    constexpr pointer release() noexcept;                       // constexpr since C++23
    constexpr void reset(pointer p = pointer()) noexcept;       // constexpr since C++23
    constexpr void reset(nullptr_t) noexcept;                   // constexpr since C++23
  template <class U> void reset(U) = delete;
    constexpr void swap(unique_ptr& u) noexcept;                // constexpr since C++23
};

template <class T, class D>
    constexpr void swap(unique_ptr<T, D>& x, unique_ptr<T, D>& y) noexcept;                 // constexpr since C++23

template <class T1, class D1, class T2, class D2>
    constexpr bool operator==(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);    // constexpr since C++23
template <class T1, class D1, class T2, class D2>
    bool operator!=(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);              // removed in C++20
template <class T1, class D1, class T2, class D2>
    bool operator<(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
template <class T1, class D1, class T2, class D2>
    bool operator<=(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
template <class T1, class D1, class T2, class D2>
    bool operator>(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
template <class T1, class D1, class T2, class D2>
    bool operator>=(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
template<class T1, class D1, class T2, class D2>
  requires three_way_comparable_with<typename unique_ptr<T1, D1>::pointer,
                                     typename unique_ptr<T2, D2>::pointer>
  compare_three_way_result_t<typename unique_ptr<T1, D1>::pointer,
                             typename unique_ptr<T2, D2>::pointer>
    operator<=>(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);      // C++20

template <class T, class D>
    constexpr bool operator==(const unique_ptr<T, D>& x, nullptr_t) noexcept;   // constexpr since C++23
template <class T, class D>
    bool operator==(nullptr_t, const unique_ptr<T, D>& y) noexcept;             // removed in C++20
template <class T, class D>
    bool operator!=(const unique_ptr<T, D>& x, nullptr_t) noexcept;             // removed in C++20
template <class T, class D>
    bool operator!=(nullptr_t, const unique_ptr<T, D>& y) noexcept;             // removed in C++20

template <class T, class D>
    constexpr bool operator<(const unique_ptr<T, D>& x, nullptr_t);     // constexpr since C++23
template <class T, class D>
    constexpr bool operator<(nullptr_t, const unique_ptr<T, D>& y);     // constexpr since C++23
template <class T, class D>
    constexpr bool operator<=(const unique_ptr<T, D>& x, nullptr_t);    // constexpr since C++23
template <class T, class D>
    constexpr bool operator<=(nullptr_t, const unique_ptr<T, D>& y);    // constexpr since C++23
template <class T, class D>
    constexpr bool operator>(const unique_ptr<T, D>& x, nullptr_t);     // constexpr since C++23
template <class T, class D>
    constexpr bool operator>(nullptr_t, const unique_ptr<T, D>& y);     // constexpr since C++23
template <class T, class D>
    constexpr bool operator>=(const unique_ptr<T, D>& x, nullptr_t);    // constexpr since C++23
template <class T, class D>
    constexpr bool operator>=(nullptr_t, const unique_ptr<T, D>& y);    // constexpr since C++23
template<class T, class D>
  requires three_way_comparable<typename unique_ptr<T, D>::pointer>
  compare_three_way_result_t<typename unique_ptr<T, D>::pointer>
    constexpr operator<=>(const unique_ptr<T, D>& x, nullptr_t);        // C++20, constexpr since C++23

class bad_weak_ptr
    : public std::exception
{
    bad_weak_ptr() noexcept;
};

template<class T, class... Args>
constexpr unique_ptr<T> make_unique(Args&&... args);                            // C++14, constexpr since C++23
template<class T>
constexpr unique_ptr<T> make_unique(size_t n);                                  // C++14, constexpr since C++23
template<class T, class... Args> unspecified   make_unique(Args&&...) = delete; // C++14, T == U[N]

template<class T>
  constexpr unique_ptr<T> make_unique_for_overwrite();                        // T is not array, C++20, constexpr since C++23
template<class T>
  constexpr unique_ptr<T> make_unique_for_overwrite(size_t n);                // T is U[], C++20, constexpr since C++23
template<class T, class... Args>
  unspecified make_unique_for_overwrite(Args&&...) = delete;                  // T is U[N], C++20

template<class E, class T, class Y, class D>
    basic_ostream<E, T>& operator<< (basic_ostream<E, T>& os, unique_ptr<Y, D> const& p);

template<class T>
class shared_ptr
{
public:
    typedef T element_type; // until C++17
    typedef remove_extent_t<T> element_type; // since C++17
    typedef weak_ptr<T> weak_type; // C++17

    // constructors:
    constexpr shared_ptr() noexcept;
    template<class Y> explicit shared_ptr(Y* p);
    template<class Y, class D> shared_ptr(Y* p, D d);
    template<class Y, class D, class A> shared_ptr(Y* p, D d, A a);
    template <class D> shared_ptr(nullptr_t p, D d);
    template <class D, class A> shared_ptr(nullptr_t p, D d, A a);
    template<class Y> shared_ptr(const shared_ptr<Y>& r, T *p) noexcept;
    shared_ptr(const shared_ptr& r) noexcept;
    template<class Y> shared_ptr(const shared_ptr<Y>& r) noexcept;
    shared_ptr(shared_ptr&& r) noexcept;
    template<class Y> shared_ptr(shared_ptr<Y>&& r) noexcept;
    template<class Y> explicit shared_ptr(const weak_ptr<Y>& r);
    template<class Y> shared_ptr(auto_ptr<Y>&& r);          // removed in C++17
    template <class Y, class D> shared_ptr(unique_ptr<Y, D>&& r);
    shared_ptr(nullptr_t) : shared_ptr() { }

    // destructor:
    ~shared_ptr();

    // assignment:
    shared_ptr& operator=(const shared_ptr& r) noexcept;
    template<class Y> shared_ptr& operator=(const shared_ptr<Y>& r) noexcept;
    shared_ptr& operator=(shared_ptr&& r) noexcept;
    template<class Y> shared_ptr& operator=(shared_ptr<Y>&& r);
    template<class Y> shared_ptr& operator=(auto_ptr<Y>&& r); // removed in C++17
    template <class Y, class D> shared_ptr& operator=(unique_ptr<Y, D>&& r);

    // modifiers:
    void swap(shared_ptr& r) noexcept;
    void reset() noexcept;
    template<class Y> void reset(Y* p);
    template<class Y, class D> void reset(Y* p, D d);
    template<class Y, class D, class A> void reset(Y* p, D d, A a);

    // observers:
    T* get() const noexcept;
    T& operator*() const noexcept;
    T* operator->() const noexcept;
    long use_count() const noexcept;
    bool unique() const noexcept;
    explicit operator bool() const noexcept;
    template<class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
    template<class U> bool owner_before(weak_ptr<U> const& b) const noexcept;
};

template<class T>
shared_ptr(weak_ptr<T>) -> shared_ptr<T>;
template<class T, class D>
shared_ptr(unique_ptr<T, D>) -> shared_ptr<T>;

// shared_ptr comparisons:
template<class T, class U>
    bool operator==(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;
template<class T, class U>
    bool operator!=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;               // removed in C++20
template<class T, class U>
    bool operator<(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;                // removed in C++20
template<class T, class U>
    bool operator>(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;                // removed in C++20
template<class T, class U>
    bool operator<=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;               // removed in C++20
template<class T, class U>
    bool operator>=(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;               // removed in C++20
template<class T, class U>
    strong_ordering operator<=>(shared_ptr<T> const& a, shared_ptr<U> const& b) noexcept;   // C++20

template <class T>
    bool operator==(const shared_ptr<T>& x, nullptr_t) noexcept;
template <class T>
    bool operator==(nullptr_t, const shared_ptr<T>& y) noexcept;               // removed in C++20
template <class T>
    bool operator!=(const shared_ptr<T>& x, nullptr_t) noexcept;               // removed in C++20
template <class T>
    bool operator!=(nullptr_t, const shared_ptr<T>& y) noexcept;               // removed in C++20
template <class T>
    bool operator<(const shared_ptr<T>& x, nullptr_t) noexcept;                // removed in C++20
template <class T>
    bool operator<(nullptr_t, const shared_ptr<T>& y) noexcept;                // removed in C++20
template <class T>
    bool operator<=(const shared_ptr<T>& x, nullptr_t) noexcept;               // removed in C++20
template <class T>
    bool operator<=(nullptr_t, const shared_ptr<T>& y) noexcept;               // removed in C++20
template <class T>
    bool operator>(const shared_ptr<T>& x, nullptr_t) noexcept;                // removed in C++20
template <class T>
    bool operator>(nullptr_t, const shared_ptr<T>& y) noexcept;                // removed in C++20
template <class T>
    bool operator>=(const shared_ptr<T>& x, nullptr_t) noexcept;               // removed in C++20
template <class T>
    bool operator>=(nullptr_t, const shared_ptr<T>& y) noexcept;               // removed in C++20
template<class T>
    strong_ordering operator<=>(shared_ptr<T> const& x, nullptr_t) noexcept;   // C++20

// shared_ptr specialized algorithms:
template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b) noexcept;

// shared_ptr casts:
template<class T, class U>
    shared_ptr<T> static_pointer_cast(shared_ptr<U> const& r) noexcept;
template<class T, class U>
    shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const& r) noexcept;
template<class T, class U>
    shared_ptr<T> const_pointer_cast(shared_ptr<U> const& r) noexcept;

// shared_ptr I/O:
template<class E, class T, class Y>
    basic_ostream<E, T>& operator<< (basic_ostream<E, T>& os, shared_ptr<Y> const& p);

// shared_ptr get_deleter:
template<class D, class T> D* get_deleter(shared_ptr<T> const& p) noexcept;

template<class T, class... Args>
    shared_ptr<T> make_shared(Args&&... args); // T is not an array
template<class T, class A, class... Args>
    shared_ptr<T> allocate_shared(const A& a, Args&&... args); // T is not an array

template<class T>
    shared_ptr<T> make_shared(size_t N); // T is U[] (since C++20)
template<class T, class A>
    shared_ptr<T> allocate_shared(const A& a, size_t N); // T is U[] (since C++20)

template<class T>
    shared_ptr<T> make_shared(); // T is U[N] (since C++20)
template<class T, class A>
    shared_ptr<T> allocate_shared(const A& a); // T is U[N] (since C++20)

template<class T>
    shared_ptr<T> make_shared(size_t N, const remove_extent_t<T>& u); // T is U[] (since C++20)
template<class T, class A>
    shared_ptr<T> allocate_shared(const A& a, size_t N, const remove_extent_t<T>& u); // T is U[] (since C++20)

template<class T> shared_ptr<T>
    make_shared(const remove_extent_t<T>& u); // T is U[N] (since C++20)
template<class T, class A>
    shared_ptr<T> allocate_shared(const A& a, const remove_extent_t<T>& u); // T is U[N] (since C++20)

template<class T>
  shared_ptr<T> make_shared_for_overwrite();                                  // T is not U[], C++20
template<class T, class A>
  shared_ptr<T> allocate_shared_for_overwrite(const A& a);                    // T is not U[], C++20

template<class T>
  shared_ptr<T> make_shared_for_overwrite(size_t N);                          // T is U[], C++20
template<class T, class A>
  shared_ptr<T> allocate_shared_for_overwrite(const A& a, size_t N);          // T is U[], C++20

template<class T>
class weak_ptr
{
public:
    typedef T element_type; // until C++17
    typedef remove_extent_t<T> element_type; // since C++17

    // constructors
    constexpr weak_ptr() noexcept;
    template<class Y> weak_ptr(shared_ptr<Y> const& r) noexcept;
    weak_ptr(weak_ptr const& r) noexcept;
    template<class Y> weak_ptr(weak_ptr<Y> const& r) noexcept;
    weak_ptr(weak_ptr&& r) noexcept;                      // C++14
    template<class Y> weak_ptr(weak_ptr<Y>&& r) noexcept; // C++14

    // destructor
    ~weak_ptr();

    // assignment
    weak_ptr& operator=(weak_ptr const& r) noexcept;
    template<class Y> weak_ptr& operator=(weak_ptr<Y> const& r) noexcept;
    template<class Y> weak_ptr& operator=(shared_ptr<Y> const& r) noexcept;
    weak_ptr& operator=(weak_ptr&& r) noexcept;                      // C++14
    template<class Y> weak_ptr& operator=(weak_ptr<Y>&& r) noexcept; // C++14

    // modifiers
    void swap(weak_ptr& r) noexcept;
    void reset() noexcept;

    // observers
    long use_count() const noexcept;
    bool expired() const noexcept;
    shared_ptr<T> lock() const noexcept;
    template<class U> bool owner_before(shared_ptr<U> const& b) const noexcept;
    template<class U> bool owner_before(weak_ptr<U> const& b) const noexcept;
};

template<class T>
weak_ptr(shared_ptr<T>) -> weak_ptr<T>;

// weak_ptr specialized algorithms:
template<class T> void swap(weak_ptr<T>& a, weak_ptr<T>& b) noexcept;

// class owner_less:
template<class T> struct owner_less;

template<class T>
struct owner_less<shared_ptr<T> >
    : binary_function<shared_ptr<T>, shared_ptr<T>, bool>
{
    typedef bool result_type;
    bool operator()(shared_ptr<T> const&, shared_ptr<T> const&) const noexcept;
    bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
    bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
};

template<class T>
struct owner_less<weak_ptr<T> >
    : binary_function<weak_ptr<T>, weak_ptr<T>, bool>
{
    typedef bool result_type;
    bool operator()(weak_ptr<T> const&, weak_ptr<T> const&) const noexcept;
    bool operator()(shared_ptr<T> const&, weak_ptr<T> const&) const noexcept;
    bool operator()(weak_ptr<T> const&, shared_ptr<T> const&) const noexcept;
};

template <>  // Added in C++14
struct owner_less<void>
{
    template <class _Tp, class _Up>
    bool operator()( shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept;
    template <class _Tp, class _Up>
    bool operator()( shared_ptr<_Tp> const& __x,   weak_ptr<_Up> const& __y) const noexcept;
    template <class _Tp, class _Up>
    bool operator()(   weak_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const noexcept;
    template <class _Tp, class _Up>
    bool operator()(   weak_ptr<_Tp> const& __x,   weak_ptr<_Up> const& __y) const noexcept;

    typedef void is_transparent;
};

template<class T>
class enable_shared_from_this
{
protected:
    constexpr enable_shared_from_this() noexcept;
    enable_shared_from_this(enable_shared_from_this const&) noexcept;
    enable_shared_from_this& operator=(enable_shared_from_this const&) noexcept;
    ~enable_shared_from_this();
public:
    shared_ptr<T> shared_from_this();
    shared_ptr<T const> shared_from_this() const;
};

template<class T>
    bool atomic_is_lock_free(const shared_ptr<T>* p);
template<class T>
    shared_ptr<T> atomic_load(const shared_ptr<T>* p);
template<class T>
    shared_ptr<T> atomic_load_explicit(const shared_ptr<T>* p, memory_order mo);
template<class T>
    void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
template<class T>
    void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
template<class T>
    shared_ptr<T> atomic_exchange(shared_ptr<T>* p, shared_ptr<T> r);
template<class T>
    shared_ptr<T>
    atomic_exchange_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
template<class T>
    bool
    atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
template<class T>
    bool
    atomic_compare_exchange_strong( shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
template<class T>
    bool
    atomic_compare_exchange_weak_explicit(shared_ptr<T>* p, shared_ptr<T>* v,
                                          shared_ptr<T> w, memory_order success,
                                          memory_order failure);
template<class T>
    bool
    atomic_compare_exchange_strong_explicit(shared_ptr<T>* p, shared_ptr<T>* v,
                                            shared_ptr<T> w, memory_order success,
                                            memory_order failure);
// Hash support
template <class T> struct hash;
template <class T, class D> struct hash<unique_ptr<T, D> >;
template <class T> struct hash<shared_ptr<T> >;

template <class T, class Alloc>
  inline constexpr bool uses_allocator_v = uses_allocator<T, Alloc>::value;

// [allocator.uses.construction], uses-allocator construction
template<class T, class Alloc, class... Args>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc,             // since C++20
                                                  Args&&... args) noexcept;
template<class T, class Alloc, class Tuple1, class Tuple2>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc,             // since C++20
                                                  piecewise_construct_t,
                                                  Tuple1&& x, Tuple2&& y) noexcept;
template<class T, class Alloc>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc) noexcept;   // since C++20
template<class T, class Alloc, class U, class V>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc,             // since C++20
                                                  U&& u, V&& v) noexcept;
template<class T, class Alloc, class U, class V>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc,             // since C++23
                                                  pair<U, V>& pr) noexcept;
template<class T, class Alloc, class U, class V>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc,             // since C++20
                                                  const pair<U, V>& pr) noexcept;
template<class T, class Alloc, class U, class V>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc,             // since C++20
                                                  pair<U, V>&& pr) noexcept;
template<class T, class Alloc, class U, class V>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc,             // since C++23
                                                  const pair<U, V>&& pr) noexcept;
template<class T, class Alloc, pair-like P>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc,             // since C++20
                                                  P&& p) noexcept;
template<class T, class Alloc, class U>
  constexpr auto uses_allocator_construction_args(const Alloc& alloc,             // since C++20
                                                  U&& u) noexcept;
template<class T, class Alloc, class... Args>
  constexpr T make_obj_using_allocator(const Alloc& alloc, Args&&... args);       // since C++20
template<class T, class Alloc, class... Args>
  constexpr T* uninitialized_construct_using_allocator(T* p,                      // since C++20
                                                         const Alloc& alloc, Args&&... args);

// [ptr.align]
void* align(size_t alignment, size_t size, void*& ptr, size_t& space);

template<size_t N, class T>
[[nodiscard]] constexpr T* assume_aligned(T* ptr); // since C++20

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 917 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 918 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 918 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 919 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 919 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 920 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* align.h expanded by -frewrite-includes */
#include <__memory/align.h>
#else /* align.h expanded by -frewrite-includes */
# 920 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/align.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_ALIGN_H
#define _LIBCPP___MEMORY_ALIGN_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/align.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/align.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/align.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/align.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/align.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/align.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/align.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

_LIBCPP_EXPORTED_FROM_ABI void* align(size_t __align, size_t __sz, void*& __ptr, size_t& __space);

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_ALIGN_H
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/align.h" 3
#endif /* align.h expanded by -frewrite-includes */
# 921 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* allocate_at_least.h expanded by -frewrite-includes */
#include <__memory/allocate_at_least.h>
#else /* allocate_at_least.h expanded by -frewrite-includes */
# 921 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocate_at_least.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_ALLOCATE_AT_LEAST_H
#define _LIBCPP___MEMORY_ALLOCATE_AT_LEAST_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocate_at_least.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocate_at_least.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* allocator_traits.h expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#else /* allocator_traits.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocate_at_least.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_ALLOCATOR_TRAITS_H
#define _LIBCPP___MEMORY_ALLOCATOR_TRAITS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/construct_at.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_empty.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/void_t.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#define _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(NAME, PROPERTY)                \
    template <class _Tp, class = void> struct NAME : false_type { };    \
    template <class _Tp>               struct NAME<_Tp, __void_t<typename _Tp:: PROPERTY > > : true_type { }

// __pointer
_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_pointer, pointer);
template <class _Tp, class _Alloc,
          class _RawAlloc = __libcpp_remove_reference_t<_Alloc>,
          bool = __has_pointer<_RawAlloc>::value>
struct __pointer {
    using type _LIBCPP_NODEBUG = typename _RawAlloc::pointer;
};
template <class _Tp, class _Alloc, class _RawAlloc>
struct __pointer<_Tp, _Alloc, _RawAlloc, false> {
    using type _LIBCPP_NODEBUG = _Tp*;
};

// __const_pointer
_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_const_pointer, const_pointer);
template <class _Tp, class _Ptr, class _Alloc,
          bool = __has_const_pointer<_Alloc>::value>
struct __const_pointer {
    using type _LIBCPP_NODEBUG = typename _Alloc::const_pointer;
};
template <class _Tp, class _Ptr, class _Alloc>
struct __const_pointer<_Tp, _Ptr, _Alloc, false> {
#ifdef _LIBCPP_CXX03_LANG
    using type = typename pointer_traits<_Ptr>::template rebind<const _Tp>::other;
#else
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
    using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind<const _Tp>;
#endif
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
};

// __void_pointer
_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_void_pointer, void_pointer);
template <class _Ptr, class _Alloc,
          bool = __has_void_pointer<_Alloc>::value>
struct __void_pointer {
    using type _LIBCPP_NODEBUG = typename _Alloc::void_pointer;
};
template <class _Ptr, class _Alloc>
struct __void_pointer<_Ptr, _Alloc, false> {
#ifdef _LIBCPP_CXX03_LANG
    using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind<void>::other;
#else
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
    using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind<void>;
#endif
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
};

// __const_void_pointer
_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_const_void_pointer, const_void_pointer);
template <class _Ptr, class _Alloc,
          bool = __has_const_void_pointer<_Alloc>::value>
struct __const_void_pointer {
    using type _LIBCPP_NODEBUG = typename _Alloc::const_void_pointer;
};
template <class _Ptr, class _Alloc>
struct __const_void_pointer<_Ptr, _Alloc, false> {
#ifdef _LIBCPP_CXX03_LANG
    using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind<const void>::other;
#else
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
    using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind<const void>;
#endif
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
};

// __size_type
_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_size_type, size_type);
template <class _Alloc, class _DiffType, bool = __has_size_type<_Alloc>::value>
struct __size_type : make_unsigned<_DiffType> { };
template <class _Alloc, class _DiffType>
struct __size_type<_Alloc, _DiffType, true> {
    using type _LIBCPP_NODEBUG = typename _Alloc::size_type;
};

// __alloc_traits_difference_type
_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_alloc_traits_difference_type, difference_type);
template <class _Alloc, class _Ptr, bool = __has_alloc_traits_difference_type<_Alloc>::value>
struct __alloc_traits_difference_type {
    using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::difference_type;
};
template <class _Alloc, class _Ptr>
struct __alloc_traits_difference_type<_Alloc, _Ptr, true> {
    using type _LIBCPP_NODEBUG = typename _Alloc::difference_type;
};

// __propagate_on_container_copy_assignment
_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_propagate_on_container_copy_assignment, propagate_on_container_copy_assignment);
template <class _Alloc, bool = __has_propagate_on_container_copy_assignment<_Alloc>::value>
struct __propagate_on_container_copy_assignment : false_type { };
template <class _Alloc>
struct __propagate_on_container_copy_assignment<_Alloc, true> {
    using type _LIBCPP_NODEBUG = typename _Alloc::propagate_on_container_copy_assignment;
};

// __propagate_on_container_move_assignment
_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_propagate_on_container_move_assignment, propagate_on_container_move_assignment);
template <class _Alloc, bool = __has_propagate_on_container_move_assignment<_Alloc>::value>
struct __propagate_on_container_move_assignment : false_type { };
template <class _Alloc>
struct __propagate_on_container_move_assignment<_Alloc, true> {
    using type _LIBCPP_NODEBUG = typename _Alloc::propagate_on_container_move_assignment;
};

// __propagate_on_container_swap
_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_propagate_on_container_swap, propagate_on_container_swap);
template <class _Alloc, bool = __has_propagate_on_container_swap<_Alloc>::value>
struct __propagate_on_container_swap : false_type { };
template <class _Alloc>
struct __propagate_on_container_swap<_Alloc, true> {
    using type _LIBCPP_NODEBUG = typename _Alloc::propagate_on_container_swap;
};

// __is_always_equal
_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_is_always_equal, is_always_equal);
template <class _Alloc, bool = __has_is_always_equal<_Alloc>::value>
struct __is_always_equal : is_empty<_Alloc> { };
template <class _Alloc>
struct __is_always_equal<_Alloc, true> {
    using type _LIBCPP_NODEBUG = typename _Alloc::is_always_equal;
};

// __allocator_traits_rebind
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Tp, class _Up, class = void>
struct __has_rebind_other : false_type { };
template <class _Tp, class _Up>
struct __has_rebind_other<_Tp, _Up, __void_t<typename _Tp::template rebind<_Up>::other> > : true_type { };

template <class _Tp, class _Up, bool = __has_rebind_other<_Tp, _Up>::value>
struct __allocator_traits_rebind {
  static_assert(__has_rebind_other<_Tp, _Up>::value, "This allocator has to implement rebind");
  using type _LIBCPP_NODEBUG = typename _Tp::template rebind<_Up>::other;
};
template <template <class, class...> class _Alloc, class _Tp, class ..._Args, class _Up>
struct __allocator_traits_rebind<_Alloc<_Tp, _Args...>, _Up, true> {
    using type _LIBCPP_NODEBUG = typename _Alloc<_Tp, _Args...>::template rebind<_Up>::other;
};
template <template <class, class...> class _Alloc, class _Tp, class ..._Args, class _Up>
struct __allocator_traits_rebind<_Alloc<_Tp, _Args...>, _Up, false> {
    using type _LIBCPP_NODEBUG = _Alloc<_Up, _Args...>;
};
_LIBCPP_SUPPRESS_DEPRECATED_POP

template<class _Alloc, class _Tp>
using __allocator_traits_rebind_t = typename __allocator_traits_rebind<_Alloc, _Tp>::type;

_LIBCPP_SUPPRESS_DEPRECATED_PUSH

// __has_allocate_hint
template <class _Alloc, class _SizeType, class _ConstVoidPtr, class = void>
struct __has_allocate_hint : false_type { };

template <class _Alloc, class _SizeType, class _ConstVoidPtr>
struct __has_allocate_hint<_Alloc, _SizeType, _ConstVoidPtr, decltype(
    (void)std::declval<_Alloc>().allocate(std::declval<_SizeType>(), std::declval<_ConstVoidPtr>())
)> : true_type { };

// __has_construct
template <class, class _Alloc, class ..._Args>
struct __has_construct_impl : false_type { };

template <class _Alloc, class ..._Args>
struct __has_construct_impl<decltype(
    (void)std::declval<_Alloc>().construct(std::declval<_Args>()...)
), _Alloc, _Args...> : true_type { };

template <class _Alloc, class ..._Args>
struct __has_construct : __has_construct_impl<void, _Alloc, _Args...> { };

// __has_destroy
template <class _Alloc, class _Pointer, class = void>
struct __has_destroy : false_type { };

template <class _Alloc, class _Pointer>
struct __has_destroy<_Alloc, _Pointer, decltype(
    (void)std::declval<_Alloc>().destroy(std::declval<_Pointer>())
)> : true_type { };

// __has_max_size
template <class _Alloc, class = void>
struct __has_max_size : false_type { };

template <class _Alloc>
struct __has_max_size<_Alloc, decltype(
    (void)std::declval<_Alloc&>().max_size()
)> : true_type { };

// __has_select_on_container_copy_construction
template <class _Alloc, class = void>
struct __has_select_on_container_copy_construction : false_type { };

template <class _Alloc>
struct __has_select_on_container_copy_construction<_Alloc, decltype(
    (void)std::declval<_Alloc>().select_on_container_copy_construction()
)> : true_type { };

_LIBCPP_SUPPRESS_DEPRECATED_POP

template <class _Alloc>
struct _LIBCPP_TEMPLATE_VIS allocator_traits
{
    using allocator_type = _Alloc;
    using value_type = typename allocator_type::value_type;
    using pointer = typename __pointer<value_type, allocator_type>::type;
    using const_pointer = typename __const_pointer<value_type, pointer, allocator_type>::type;
    using void_pointer = typename __void_pointer<pointer, allocator_type>::type;
    using const_void_pointer = typename __const_void_pointer<pointer, allocator_type>::type;
    using difference_type = typename __alloc_traits_difference_type<allocator_type, pointer>::type;
    using size_type = typename __size_type<allocator_type, difference_type>::type;
    using propagate_on_container_copy_assignment = typename __propagate_on_container_copy_assignment<allocator_type>::type;
    using propagate_on_container_move_assignment = typename __propagate_on_container_move_assignment<allocator_type>::type;
    using propagate_on_container_swap = typename __propagate_on_container_swap<allocator_type>::type;
    using is_always_equal = typename __is_always_equal<allocator_type>::type;

#ifndef _LIBCPP_CXX03_LANG
    template <class _Tp>
    using rebind_alloc = __allocator_traits_rebind_t<allocator_type, _Tp>;
    template <class _Tp>
    using rebind_traits = allocator_traits<rebind_alloc<_Tp> >;
#else  // _LIBCPP_CXX03_LANG
# 256 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
    template <class _Tp>
    struct rebind_alloc {
        using other = __allocator_traits_rebind_t<allocator_type, _Tp>;
    };
    template <class _Tp>
    struct rebind_traits {
        using other = allocator_traits<typename rebind_alloc<_Tp>::other>;
    };
#endif // _LIBCPP_CXX03_LANG
# 265 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3

    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static pointer allocate(allocator_type& __a, size_type __n) {
        return __a.allocate(__n);
    }

    template <class _Ap = _Alloc, class =
        __enable_if_t<__has_allocate_hint<_Ap, size_type, const_void_pointer>::value> >
    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) {
        _LIBCPP_SUPPRESS_DEPRECATED_PUSH
        return __a.allocate(__n, __hint);
        _LIBCPP_SUPPRESS_DEPRECATED_POP
    }
    template <class _Ap = _Alloc, class = void, class =
        __enable_if_t<!__has_allocate_hint<_Ap, size_type, const_void_pointer>::value> >
    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer) {
        return __a.allocate(__n);
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static void deallocate(allocator_type& __a, pointer __p, size_type __n) _NOEXCEPT {
        __a.deallocate(__p, __n);
    }

    template <class _Tp, class... _Args, class =
        __enable_if_t<__has_construct<allocator_type, _Tp*, _Args...>::value> >
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static void construct(allocator_type& __a, _Tp* __p, _Args&&... __args) {
        _LIBCPP_SUPPRESS_DEPRECATED_PUSH
        __a.construct(__p, _VSTD::forward<_Args>(__args)...);
        _LIBCPP_SUPPRESS_DEPRECATED_POP
    }
    template <class _Tp, class... _Args, class = void, class =
        __enable_if_t<!__has_construct<allocator_type, _Tp*, _Args...>::value> >
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static void construct(allocator_type&, _Tp* __p, _Args&&... __args) {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 304 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
        _VSTD::construct_at(__p, _VSTD::forward<_Args>(__args)...);
#else
# 306 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
        ::new ((void*)__p) _Tp(_VSTD::forward<_Args>(__args)...);
#endif
# 308 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
    }

    template <class _Tp, class =
        __enable_if_t<__has_destroy<allocator_type, _Tp*>::value> >
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static void destroy(allocator_type& __a, _Tp* __p) {
        _LIBCPP_SUPPRESS_DEPRECATED_PUSH
        __a.destroy(__p);
        _LIBCPP_SUPPRESS_DEPRECATED_POP
    }
    template <class _Tp, class = void, class =
        __enable_if_t<!__has_destroy<allocator_type, _Tp*>::value> >
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static void destroy(allocator_type&, _Tp* __p) {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 323 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
        _VSTD::destroy_at(__p);
#else
# 325 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
        __p->~_Tp();
#endif
# 327 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
    }

    template <class _Ap = _Alloc, class =
        __enable_if_t<__has_max_size<const _Ap>::value> >
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static size_type max_size(const allocator_type& __a) _NOEXCEPT {
        _LIBCPP_SUPPRESS_DEPRECATED_PUSH
        return __a.max_size();
        _LIBCPP_SUPPRESS_DEPRECATED_POP
    }
    template <class _Ap = _Alloc, class = void, class =
        __enable_if_t<!__has_max_size<const _Ap>::value> >
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static size_type max_size(const allocator_type&) _NOEXCEPT {
        return numeric_limits<size_type>::max() / sizeof(value_type);
    }

    template <class _Ap = _Alloc, class =
        __enable_if_t<__has_select_on_container_copy_construction<const _Ap>::value> >
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static allocator_type select_on_container_copy_construction(const allocator_type& __a) {
        return __a.select_on_container_copy_construction();
    }
    template <class _Ap = _Alloc, class = void, class =
        __enable_if_t<!__has_select_on_container_copy_construction<const _Ap>::value> >
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    static allocator_type select_on_container_copy_construction(const allocator_type& __a) {
        return __a;
    }
};

#ifndef _LIBCPP_CXX03_LANG
template <class _Traits, class _Tp>
using __rebind_alloc _LIBCPP_NODEBUG = typename _Traits::template rebind_alloc<_Tp>;
#else
# 362 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
template <class _Traits, class _Tp>
using __rebind_alloc = typename _Traits::template rebind_alloc<_Tp>::other;
#endif
# 365 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3

// __is_default_allocator
template <class _Tp>
struct __is_default_allocator : false_type { };

template <class> class allocator;

template <class _Tp>
struct __is_default_allocator<allocator<_Tp> > : true_type { };

// __is_cpp17_move_insertable
template <class _Alloc, class = void>
struct __is_cpp17_move_insertable
    : is_move_constructible<typename _Alloc::value_type>
{ };

template <class _Alloc>
struct __is_cpp17_move_insertable<_Alloc, __enable_if_t<
    !__is_default_allocator<_Alloc>::value &&
    __has_construct<_Alloc, typename _Alloc::value_type*, typename _Alloc::value_type&&>::value
> > : true_type { };

// __is_cpp17_copy_insertable
template <class _Alloc, class = void>
struct __is_cpp17_copy_insertable
    : integral_constant<bool,
        is_copy_constructible<typename _Alloc::value_type>::value &&
        __is_cpp17_move_insertable<_Alloc>::value
    >
{ };

template <class _Alloc>
struct __is_cpp17_copy_insertable<_Alloc, __enable_if_t<
    !__is_default_allocator<_Alloc>::value &&
    __has_construct<_Alloc, typename _Alloc::value_type*, const typename _Alloc::value_type&>::value
> >
    : __is_cpp17_move_insertable<_Alloc>
{ };

// ASan choices
#ifndef _LIBCPP_HAS_NO_ASAN
#   define _LIBCPP_HAS_ASAN_CONTAINER_ANNOTATIONS_FOR_ALL_ALLOCATORS 1
#endif
# 408 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3

#ifdef _LIBCPP_HAS_ASAN_CONTAINER_ANNOTATIONS_FOR_ALL_ALLOCATORS
template <class _Alloc>
struct __asan_annotate_container_with_allocator
#if 0 /* disabled by -frewrite-includes */
#   if defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER >= 1600
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 413 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
      : true_type {};
#   else
# 415 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
      // TODO(LLVM-18): Remove the special-casing
      : false_type {};
#   endif
# 418 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3

template <class _Tp>
struct __asan_annotate_container_with_allocator<allocator<_Tp> > : true_type {};
#endif
# 422 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3

#undef _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___MEMORY_ALLOCATOR_TRAITS_H
# 430 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_traits.h" 3
#endif /* allocator_traits.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocate_at_least.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocate_at_least.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocate_at_least.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocate_at_least.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocate_at_least.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocate_at_least.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocate_at_least.h" 3
template <class _Pointer>
struct allocation_result {
  _Pointer ptr;
  size_t count;
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(allocation_result);

template <class _Alloc>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr
allocation_result<typename allocator_traits<_Alloc>::pointer> allocate_at_least(_Alloc& __alloc, size_t __n) {
  if constexpr (requires { __alloc.allocate_at_least(__n); }) {
    return __alloc.allocate_at_least(__n);
  } else {
    return {__alloc.allocate(__n), __n};
  }
}

template <class _Alloc>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr
auto __allocate_at_least(_Alloc& __alloc, size_t __n) {
  return std::allocate_at_least(__alloc, __n);
}
#else
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocate_at_least.h" 3
template <class _Pointer>
struct __allocation_result {
  _Pointer ptr;
  size_t count;
};

template <class _Alloc>
_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
__allocation_result<typename allocator_traits<_Alloc>::pointer> __allocate_at_least(_Alloc& __alloc, size_t __n) {
  return {__alloc.allocate(__n), __n};
}

#endif // _LIBCPP_STD_VER >= 23
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocate_at_least.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_ALLOCATE_AT_LEAST_H
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocate_at_least.h" 3
#endif /* allocate_at_least.h expanded by -frewrite-includes */
# 922 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* allocation_guard.h expanded by -frewrite-includes */
#include <__memory/allocation_guard.h>
#else /* allocation_guard.h expanded by -frewrite-includes */
# 922 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_ALLOCATION_GUARD_H
#define _LIBCPP___MEMORY_ALLOCATION_GUARD_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Helper class to allocate memory using an Allocator in an exception safe
// manner.
//
// The intended usage of this class is as follows:
//
// 0
// 1     __allocation_guard<SomeAllocator> guard(alloc, 10);
// 2     do_some_initialization_that_may_throw(guard.__get());
// 3     save_allocated_pointer_in_a_noexcept_operation(guard.__release_ptr());
// 4
//
// If line (2) throws an exception during initialization of the memory, the
// guard's destructor will be called, and the memory will be released using
// Allocator deallocation. Otherwise, we release the memory from the guard on
// line (3) in an operation that can't throw -- after that, the guard is not
// responsible for the memory anymore.
//
// This is similar to a unique_ptr, except it's easier to use with a
// custom allocator.
template<class _Alloc>
struct __allocation_guard {
    using _Pointer = typename allocator_traits<_Alloc>::pointer;
    using _Size = typename allocator_traits<_Alloc>::size_type;

    template<class _AllocT> // we perform the allocator conversion inside the constructor
    _LIBCPP_HIDE_FROM_ABI
    explicit __allocation_guard(_AllocT __alloc, _Size __n)
        : __alloc_(_VSTD::move(__alloc))
        , __n_(__n)
        , __ptr_(allocator_traits<_Alloc>::allocate(__alloc_, __n_)) // initialization order is important
    { }

    _LIBCPP_HIDE_FROM_ABI
    ~__allocation_guard() _NOEXCEPT {
        __destroy();
    }

    _LIBCPP_HIDE_FROM_ABI __allocation_guard(const __allocation_guard&) = delete;
    _LIBCPP_HIDE_FROM_ABI __allocation_guard(__allocation_guard&& __other) _NOEXCEPT
        : __alloc_(std::move(__other.__alloc_))
        , __n_(__other.__n_)
        , __ptr_(__other.__ptr_) {
      __other.__ptr_ = nullptr;
    }

    _LIBCPP_HIDE_FROM_ABI __allocation_guard& operator=(const __allocation_guard& __other) = delete;
    _LIBCPP_HIDE_FROM_ABI __allocation_guard& operator=(__allocation_guard&& __other) _NOEXCEPT {
        if (std::addressof(__other) != this) {
            __destroy();

            __alloc_ = std::move(__other.__alloc_);
            __n_ = __other.__n_;
            __ptr_ = __other.__ptr_;
            __other.__ptr_ = nullptr;
        }

        return *this;
    }

    _LIBCPP_HIDE_FROM_ABI
    _Pointer __release_ptr() _NOEXCEPT { // not called __release() because it's a keyword in objective-c++
        _Pointer __tmp = __ptr_;
        __ptr_ = nullptr;
        return __tmp;
    }

    _LIBCPP_HIDE_FROM_ABI
    _Pointer __get() const _NOEXCEPT {
        return __ptr_;
    }

private:
    _LIBCPP_HIDE_FROM_ABI
    void __destroy() _NOEXCEPT {
        if (__ptr_ != nullptr) {
            allocator_traits<_Alloc>::deallocate(__alloc_, __ptr_, __n_);
        }
    }

    _Alloc __alloc_;
    _Size __n_;
    _Pointer __ptr_;
};

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___MEMORY_ALLOCATION_GUARD_H
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocation_guard.h" 3
#endif /* allocation_guard.h expanded by -frewrite-includes */
# 923 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* allocator.h expanded by -frewrite-includes */
#include <__memory/allocator.h>
#else /* allocator.h expanded by -frewrite-includes */
# 923 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_ALLOCATOR_H
#define _LIBCPP___MEMORY_ALLOCATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocate_at_least.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_void.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_volatile.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp> class allocator;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
// These specializations shouldn't be marked _LIBCPP_DEPRECATED_IN_CXX17.
// Specializing allocator<void> is deprecated, but not using it.
template <>
class _LIBCPP_TEMPLATE_VIS allocator<void>
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
public:
    _LIBCPP_DEPRECATED_IN_CXX17 typedef void*             pointer;
    _LIBCPP_DEPRECATED_IN_CXX17 typedef const void*       const_pointer;
    _LIBCPP_DEPRECATED_IN_CXX17 typedef void              value_type;

    template <class _Up> struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {typedef allocator<_Up> other;};
#endif
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
};

template <>
class _LIBCPP_TEMPLATE_VIS allocator<const void>
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
public:
    _LIBCPP_DEPRECATED_IN_CXX17 typedef const void*       pointer;
    _LIBCPP_DEPRECATED_IN_CXX17 typedef const void*       const_pointer;
    _LIBCPP_DEPRECATED_IN_CXX17 typedef const void        value_type;

    template <class _Up> struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {typedef allocator<_Up> other;};
#endif
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
};
#endif
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3

// This class provides a non-trivial default constructor to the class that derives from it
// if the condition is satisfied.
//
// The second template parameter exists to allow giving a unique type to __non_trivial_if,
// which makes it possible to avoid breaking the ABI when making this a base class of an
// existing class. Without that, imagine we have classes D1 and D2, both of which used to
// have no base classes, but which now derive from __non_trivial_if. The layout of a class
// that inherits from both D1 and D2 will change because the two __non_trivial_if base
// classes are not allowed to share the same address.
//
// By making those __non_trivial_if base classes unique, we work around this problem and
// it is safe to start deriving from __non_trivial_if in existing classes.
template <bool _Cond, class _Unique>
struct __non_trivial_if { };

template <class _Unique>
struct __non_trivial_if<true, _Unique> {
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR __non_trivial_if() _NOEXCEPT { }
};

// allocator
//
// Note: For ABI compatibility between C++20 and previous standards, we make
//       allocator<void> trivial in C++20.

template <class _Tp>
class _LIBCPP_TEMPLATE_VIS allocator
    : private __non_trivial_if<!is_void<_Tp>::value, allocator<_Tp> >
{
    static_assert(!is_volatile<_Tp>::value, "std::allocator does not support volatile types");
public:
    typedef size_t      size_type;
    typedef ptrdiff_t   difference_type;
    typedef _Tp         value_type;
    typedef true_type   propagate_on_container_move_assignment;
    typedef true_type   is_always_equal;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 allocator() _NOEXCEPT = default;

    template <class _Up>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    allocator(const allocator<_Up>&) _NOEXCEPT { }

    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    _Tp* allocate(size_t __n) {
        if (__n > allocator_traits<allocator>::max_size(*this))
            __throw_bad_array_new_length();
        if (__libcpp_is_constant_evaluated()) {
            return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
        } else {
            return static_cast<_Tp*>(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)));
        }
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 119 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr
    allocation_result<_Tp*> allocate_at_least(size_t __n) {
        return {allocate(__n), __n};
    }
#endif
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    void deallocate(_Tp* __p, size_t __n) _NOEXCEPT {
        if (__libcpp_is_constant_evaluated()) {
            ::operator delete(__p);
        } else {
            _VSTD::__libcpp_deallocate((void*)__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
        }
    }

    // C++20 Removed members
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
    _LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp*       pointer;
    _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp* const_pointer;
    _LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp&       reference;
    _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp& const_reference;

    template <class _Up>
    struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {
        typedef allocator<_Up> other;
    };

    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY
    pointer address(reference __x) const _NOEXCEPT {
        return _VSTD::addressof(__x);
    }
    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY
    const_pointer address(const_reference __x) const _NOEXCEPT {
        return _VSTD::addressof(__x);
    }

    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_IN_CXX17
    _Tp* allocate(size_t __n, const void*) {
        return allocate(__n);
    }

    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT {
        return size_type(~0) / sizeof(_Tp);
    }

    template <class _Up, class... _Args>
    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY
    void construct(_Up* __p, _Args&&... __args) {
        ::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
    }

    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY
    void destroy(pointer __p) {
        __p->~_Tp();
    }
#endif
# 175 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
};

template <class _Tp>
class _LIBCPP_TEMPLATE_VIS allocator<const _Tp>
    : private __non_trivial_if<!is_void<_Tp>::value, allocator<const _Tp> >
{
    static_assert(!is_volatile<_Tp>::value, "std::allocator does not support volatile types");
public:
    typedef size_t      size_type;
    typedef ptrdiff_t   difference_type;
    typedef const _Tp   value_type;
    typedef true_type   propagate_on_container_move_assignment;
    typedef true_type   is_always_equal;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 allocator() _NOEXCEPT = default;

    template <class _Up>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    allocator(const allocator<_Up>&) _NOEXCEPT { }

    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    const _Tp* allocate(size_t __n) {
        if (__n > allocator_traits<allocator>::max_size(*this))
            __throw_bad_array_new_length();
        if (__libcpp_is_constant_evaluated()) {
            return static_cast<const _Tp*>(::operator new(__n * sizeof(_Tp)));
        } else {
            return static_cast<const _Tp*>(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)));
        }
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 207 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr
    allocation_result<const _Tp*> allocate_at_least(size_t __n) {
        return {allocate(__n), __n};
    }
#endif
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    void deallocate(const _Tp* __p, size_t __n) {
        if (__libcpp_is_constant_evaluated()) {
            ::operator delete(const_cast<_Tp*>(__p));
        } else {
            _VSTD::__libcpp_deallocate((void*) const_cast<_Tp *>(__p), __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
        }
    }

    // C++20 Removed members
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
    _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp* pointer;
    _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp* const_pointer;
    _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp& reference;
    _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp& const_reference;

    template <class _Up>
    struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {
        typedef allocator<_Up> other;
    };

    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY
    const_pointer address(const_reference __x) const _NOEXCEPT {
        return _VSTD::addressof(__x);
    }

    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_IN_CXX17
    const _Tp* allocate(size_t __n, const void*) {
        return allocate(__n);
    }

    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT {
        return size_type(~0) / sizeof(_Tp);
    }

    template <class _Up, class... _Args>
    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY
    void construct(_Up* __p, _Args&&... __args) {
        ::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
    }

    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY
    void destroy(pointer __p) {
        __p->~_Tp();
    }
#endif
# 259 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
};

template <class _Tp, class _Up>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool operator==(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {return true;}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 266 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3

template <class _Tp, class _Up>
inline _LIBCPP_INLINE_VISIBILITY
bool operator!=(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {return false;}

#endif
# 272 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_ALLOCATOR_H
# 276 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator.h" 3
#endif /* allocator.h expanded by -frewrite-includes */
# 924 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_arg_t.h>
#endif /* expanded by -frewrite-includes */
# 924 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 925 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 925 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 926 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* assume_aligned.h expanded by -frewrite-includes */
#include <__memory/assume_aligned.h>
#else /* assume_aligned.h expanded by -frewrite-includes */
# 926 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_ASSUME_ALIGNED_H
#define _LIBCPP___MEMORY_ASSUME_ALIGNED_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <size_t _Np, class _Tp>
_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __assume_aligned(_Tp* __ptr) {
  static_assert(_Np != 0 && (_Np & (_Np - 1)) == 0,
    "std::assume_aligned<N>(p) requires N to be a power of two");

  if (__libcpp_is_constant_evaluated()) {
    return __ptr;
  } else {
    _LIBCPP_ASSERT_UNCATEGORIZED(reinterpret_cast<uintptr_t>(__ptr) % _Np == 0, "Alignment assumption is violated");
    return static_cast<_Tp*>(__builtin_assume_aligned(__ptr, _Np));
  }
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3

template <size_t _Np, class _Tp>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Tp* assume_aligned(_Tp* __ptr) {
  return std::__assume_aligned<_Np>(__ptr);
}

#endif // _LIBCPP_STD_VER >= 20
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_ASSUME_ALIGNED_H
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/assume_aligned.h" 3
#endif /* assume_aligned.h expanded by -frewrite-includes */
# 927 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* auto_ptr.h expanded by -frewrite-includes */
#include <__memory/auto_ptr.h>
#else /* auto_ptr.h expanded by -frewrite-includes */
# 927 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/auto_ptr.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_AUTO_PTR_H
#define _LIBCPP___MEMORY_AUTO_PTR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/auto_ptr.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/auto_ptr.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/auto_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/auto_ptr.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/auto_ptr.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/auto_ptr.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr_ref
{
    _Tp* __ptr_;
};

template<class _Tp>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
{
private:
    _Tp* __ptr_;
public:
    typedef _Tp element_type;

    _LIBCPP_INLINE_VISIBILITY explicit auto_ptr(_Tp* __p = 0) _NOEXCEPT : __ptr_(__p) {}
    _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr& __p) _NOEXCEPT : __ptr_(__p.release()) {}
    template<class _Up> _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr<_Up>& __p) _NOEXCEPT
        : __ptr_(__p.release()) {}
    _LIBCPP_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr& __p) _NOEXCEPT
        {reset(__p.release()); return *this;}
    template<class _Up> _LIBCPP_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr<_Up>& __p) _NOEXCEPT
        {reset(__p.release()); return *this;}
    _LIBCPP_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr_ref<_Tp> __p) _NOEXCEPT
        {reset(__p.__ptr_); return *this;}
    _LIBCPP_INLINE_VISIBILITY ~auto_ptr() _NOEXCEPT {delete __ptr_;}

    _LIBCPP_INLINE_VISIBILITY _Tp& operator*() const _NOEXCEPT
        {return *__ptr_;}
    _LIBCPP_INLINE_VISIBILITY _Tp* operator->() const _NOEXCEPT {return __ptr_;}
    _LIBCPP_INLINE_VISIBILITY _Tp* get() const _NOEXCEPT {return __ptr_;}
    _LIBCPP_INLINE_VISIBILITY _Tp* release() _NOEXCEPT
    {
        _Tp* __t = __ptr_;
        __ptr_ = nullptr;
        return __t;
    }
    _LIBCPP_INLINE_VISIBILITY void reset(_Tp* __p = 0) _NOEXCEPT
    {
        if (__ptr_ != __p)
            delete __ptr_;
        __ptr_ = __p;
    }

    _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr_ref<_Tp> __p) _NOEXCEPT : __ptr_(__p.__ptr_) {}
    template<class _Up> _LIBCPP_INLINE_VISIBILITY operator auto_ptr_ref<_Up>() _NOEXCEPT
        {auto_ptr_ref<_Up> __t; __t.__ptr_ = release(); return __t;}
    template<class _Up> _LIBCPP_INLINE_VISIBILITY operator auto_ptr<_Up>() _NOEXCEPT
        {return auto_ptr<_Up>(release());}
};

template <>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr<void>
{
public:
    typedef void element_type;
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/auto_ptr.h" 3

#endif // _LIBCPP___MEMORY_AUTO_PTR_H
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/auto_ptr.h" 3
#endif /* auto_ptr.h expanded by -frewrite-includes */
# 928 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* compressed_pair.h expanded by -frewrite-includes */
#include <__memory/compressed_pair.h>
#else /* compressed_pair.h expanded by -frewrite-includes */
# 928 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_COMPRESSED_PAIR_H
#define _LIBCPP___MEMORY_COMPRESSED_PAIR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/get.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/tuple.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_indices.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/dependent_type.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_empty.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_final.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_swappable.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/piecewise_construct.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Tag used to default initialize one or both of the pair's elements.
struct __default_init_tag {};
struct __value_init_tag {};

template <class _Tp, int _Idx, bool _CanBeEmptyBase = is_empty<_Tp>::value && !__libcpp_is_final<_Tp>::value>
struct __compressed_pair_elem {
  using _ParamT = _Tp;
  using reference = _Tp&;
  using const_reference = const _Tp&;

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__default_init_tag) {}
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__value_init_tag) : __value_() {}

  template <class _Up, class = __enable_if_t<!is_same<__compressed_pair_elem, __decay_t<_Up> >::value> >
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
  explicit __compressed_pair_elem(_Up&& __u) : __value_(std::forward<_Up>(__u)) {}

#ifndef _LIBCPP_CXX03_LANG
  template <class... _Args, size_t... _Indices>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
  explicit __compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args, __tuple_indices<_Indices...>)
      : __value_(std::forward<_Args>(std::get<_Indices>(__args))...) {}
#endif
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference __get() _NOEXCEPT { return __value_; }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference __get() const _NOEXCEPT { return __value_; }

private:
  _Tp __value_;
};

template <class _Tp, int _Idx>
struct __compressed_pair_elem<_Tp, _Idx, true> : private _Tp {
  using _ParamT = _Tp;
  using reference = _Tp&;
  using const_reference = const _Tp&;
  using __value_type = _Tp;

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem() = default;
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__default_init_tag) {}
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__value_init_tag) : __value_type() {}

  template <class _Up, class = __enable_if_t<!is_same<__compressed_pair_elem, __decay_t<_Up> >::value> >
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
  explicit __compressed_pair_elem(_Up&& __u) : __value_type(std::forward<_Up>(__u)) {}

#ifndef _LIBCPP_CXX03_LANG
  template <class... _Args, size_t... _Indices>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
  __compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args, __tuple_indices<_Indices...>)
      : __value_type(std::forward<_Args>(std::get<_Indices>(__args))...) {}
#endif
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference __get() _NOEXCEPT { return *this; }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference __get() const _NOEXCEPT { return *this; }
};

template <class _T1, class _T2>
class __compressed_pair : private __compressed_pair_elem<_T1, 0>,
                          private __compressed_pair_elem<_T2, 1> {
public:
  // NOTE: This static assert should never fire because __compressed_pair
  // is *almost never* used in a scenario where it's possible for T1 == T2.
  // (The exception is std::function where it is possible that the function
  //  object and the allocator have the same type).
  static_assert((!is_same<_T1, _T2>::value),
    "__compressed_pair cannot be instantiated when T1 and T2 are the same type; "
    "The current implementation is NOT ABI-compatible with the previous implementation for this configuration");

  using _Base1 _LIBCPP_NODEBUG = __compressed_pair_elem<_T1, 0>;
  using _Base2 _LIBCPP_NODEBUG = __compressed_pair_elem<_T2, 1>;

  template <bool _Dummy = true,
    class = __enable_if_t<
        __dependent_type<is_default_constructible<_T1>, _Dummy>::value &&
        __dependent_type<is_default_constructible<_T2>, _Dummy>::value
    >
  >
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
  explicit __compressed_pair() : _Base1(__value_init_tag()), _Base2(__value_init_tag()) {}

  template <class _U1, class _U2>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
  explicit __compressed_pair(_U1&& __t1, _U2&& __t2) : _Base1(std::forward<_U1>(__t1)), _Base2(std::forward<_U2>(__t2)) {}

#ifndef _LIBCPP_CXX03_LANG
  template <class... _Args1, class... _Args2>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
  explicit __compressed_pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args,
                             tuple<_Args2...> __second_args)
      : _Base1(__pc, std::move(__first_args), typename __make_tuple_indices<sizeof...(_Args1)>::type()),
        _Base2(__pc, std::move(__second_args), typename __make_tuple_indices<sizeof...(_Args2)>::type()) {}
#endif
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
  typename _Base1::reference first() _NOEXCEPT {
    return static_cast<_Base1&>(*this).__get();
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
  typename _Base1::const_reference first() const _NOEXCEPT {
    return static_cast<_Base1 const&>(*this).__get();
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
  typename _Base2::reference second() _NOEXCEPT {
    return static_cast<_Base2&>(*this).__get();
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
  typename _Base2::const_reference second() const _NOEXCEPT {
    return static_cast<_Base2 const&>(*this).__get();
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static
  _Base1* __get_first_base(__compressed_pair* __pair) _NOEXCEPT {
    return static_cast<_Base1*>(__pair);
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static
  _Base2* __get_second_base(__compressed_pair* __pair) _NOEXCEPT {
    return static_cast<_Base2*>(__pair);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
  void swap(__compressed_pair& __x)
      _NOEXCEPT_(__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value) {
    using std::swap;
    swap(first(), __x.first());
    swap(second(), __x.second());
  }
};

template <class _T1, class _T2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void swap(__compressed_pair<_T1, _T2>& __x, __compressed_pair<_T1, _T2>& __y)
    _NOEXCEPT_(__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value) {
  __x.swap(__y);
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___MEMORY_COMPRESSED_PAIR_H
# 183 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/compressed_pair.h" 3
#endif /* compressed_pair.h expanded by -frewrite-includes */
# 929 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* concepts.h expanded by -frewrite-includes */
#include <__memory/concepts.h>
#else /* concepts.h expanded by -frewrite-includes */
# 929 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_CONCEPTS_H
#define _LIBCPP___MEMORY_CONCEPTS_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h> // TODO(modules): This should not be required
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3

namespace ranges {

// [special.mem.concepts]

// This concept ensures that uninitialized algorithms can construct an object
// at the address pointed-to by the iterator, which requires an lvalue.
template <class _Ip>
concept __nothrow_input_iterator =
    input_iterator<_Ip> &&
    is_lvalue_reference_v<iter_reference_t<_Ip>> &&
    same_as<remove_cvref_t<iter_reference_t<_Ip>>, iter_value_t<_Ip>>;

template <class _Sp, class _Ip>
concept __nothrow_sentinel_for = sentinel_for<_Sp, _Ip>;

template <class _Rp>
concept __nothrow_input_range =
    range<_Rp> &&
    __nothrow_input_iterator<iterator_t<_Rp>> &&
    __nothrow_sentinel_for<sentinel_t<_Rp>, iterator_t<_Rp>>;

template <class _Ip>
concept __nothrow_forward_iterator =
    __nothrow_input_iterator<_Ip> &&
    forward_iterator<_Ip> &&
    __nothrow_sentinel_for<_Ip, _Ip>;

template <class _Rp>
concept __nothrow_forward_range =
    __nothrow_input_range<_Rp> &&
    __nothrow_forward_iterator<iterator_t<_Rp>>;

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_CONCEPTS_H
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/concepts.h" 3
#endif /* concepts.h expanded by -frewrite-includes */
# 930 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/construct_at.h>
#endif /* expanded by -frewrite-includes */
# 930 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 931 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 931 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 932 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_construct_at.h expanded by -frewrite-includes */
#include <__memory/ranges_construct_at.h>
#else /* ranges_construct_at.h expanded by -frewrite-includes */
# 932 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_RANGES_CONSTRUCT_AT_H
#define _LIBCPP___MEMORY_RANGES_CONSTRUCT_AT_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/destructible.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/construct_at.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
namespace ranges {

// construct_at

namespace __construct_at {

struct __fn {
  template<class _Tp, class... _Args, class = decltype(
    ::new (std::declval<void*>()) _Tp(std::declval<_Args>()...)
  )>
  _LIBCPP_HIDE_FROM_ABI
  constexpr _Tp* operator()(_Tp* __location, _Args&& ...__args) const {
    return _VSTD::construct_at(__location, _VSTD::forward<_Args>(__args)...);
  }
};

} // namespace __construct_at

inline namespace __cpo {
  inline constexpr auto construct_at = __construct_at::__fn{};
} // namespace __cpo

// destroy_at

namespace __destroy_at {

struct __fn {
  template <destructible _Tp>
  _LIBCPP_HIDE_FROM_ABI
  constexpr void operator()(_Tp* __location) const noexcept {
    _VSTD::destroy_at(__location);
  }
};

} // namespace __destroy_at

inline namespace __cpo {
  inline constexpr auto destroy_at = __destroy_at::__fn{};
} // namespace __cpo

// destroy

namespace __destroy {

struct __fn {
  template <__nothrow_input_iterator _InputIterator, __nothrow_sentinel_for<_InputIterator> _Sentinel>
    requires destructible<iter_value_t<_InputIterator>>
  _LIBCPP_HIDE_FROM_ABI
  constexpr _InputIterator operator()(_InputIterator __first, _Sentinel __last) const noexcept {
    return _VSTD::__destroy(_VSTD::move(__first), _VSTD::move(__last));
  }

  template <__nothrow_input_range _InputRange>
    requires destructible<range_value_t<_InputRange>>
  _LIBCPP_HIDE_FROM_ABI
  constexpr borrowed_iterator_t<_InputRange> operator()(_InputRange&& __range) const noexcept {
    return (*this)(ranges::begin(__range), ranges::end(__range));
  }
};

} // namespace __destroy

inline namespace __cpo {
  inline constexpr auto destroy = __destroy::__fn{};
} // namespace __cpo

// destroy_n

namespace __destroy_n {

struct __fn {
  template <__nothrow_input_iterator _InputIterator>
    requires destructible<iter_value_t<_InputIterator>>
  _LIBCPP_HIDE_FROM_ABI
  constexpr _InputIterator operator()(_InputIterator __first, iter_difference_t<_InputIterator> __n) const noexcept {
    return _VSTD::destroy_n(_VSTD::move(__first), __n);
  }
};

} // namespace __destroy_n

inline namespace __cpo {
  inline constexpr auto destroy_n = __destroy_n::__fn{};
} // namespace __cpo

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___MEMORY_RANGES_CONSTRUCT_AT_H
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_construct_at.h" 3
#endif /* ranges_construct_at.h expanded by -frewrite-includes */
# 933 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_uninitialized_algorithms.h expanded by -frewrite-includes */
#include <__memory/ranges_uninitialized_algorithms.h>
#else /* ranges_uninitialized_algorithms.h expanded by -frewrite-includes */
# 933 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_RANGES_UNINITIALIZED_ALGORITHMS_H
#define _LIBCPP___MEMORY_RANGES_UNINITIALIZED_ALGORITHMS_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* in_out_result.h expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#else /* in_out_result.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_result.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_IN_OUT_RESULT_H
#define _LIBCPP___ALGORITHM_IN_OUT_RESULT_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_result.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_result.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_result.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_result.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_result.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_result.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_result.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_result.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_result.h" 3

namespace ranges {

template<class _InIter1, class _OutIter1>
struct in_out_result {
  _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
  _LIBCPP_NO_UNIQUE_ADDRESS _OutIter1 out;

  template <class _InIter2, class _OutIter2>
    requires convertible_to<const _InIter1&, _InIter2> && convertible_to<const _OutIter1&, _OutIter2>
  _LIBCPP_HIDE_FROM_ABI
  constexpr operator in_out_result<_InIter2, _OutIter2>() const & {
    return {in, out};
  }

  template <class _InIter2, class _OutIter2>
    requires convertible_to<_InIter1, _InIter2> && convertible_to<_OutIter1, _OutIter2>
  _LIBCPP_HIDE_FROM_ABI
  constexpr operator in_out_result<_InIter2, _OutIter2>() && {
    return {std::move(in), std::move(out)};
  }
};

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_result.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_IN_OUT_RESULT_H
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_result.h" 3
#endif /* in_out_result.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* uninitialized_algorithms.h expanded by -frewrite-includes */
#include <__memory/uninitialized_algorithms.h>
#else /* uninitialized_algorithms.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_UNINITIALIZED_ALGORITHMS_H
#define _LIBCPP___MEMORY_UNINITIALIZED_ALGORITHMS_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* move.h expanded by -frewrite-includes */
#include <__algorithm/move.h>
#else /* move.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_MOVE_H
#define _LIBCPP___ALGORITHM_MOVE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy_move_common.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/for_each_segment.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/segmented_iterator.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
__move(_InIter __first, _Sent __last, _OutIter __result);

template <class _AlgPolicy>
struct __move_loop {
  template <class _InIter, class _Sent, class _OutIter>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
  operator()(_InIter __first, _Sent __last, _OutIter __result) const {
    while (__first != __last) {
      *__result = _IterOps<_AlgPolicy>::__iter_move(__first);
      ++__first;
      ++__result;
    }
    return std::make_pair(std::move(__first), std::move(__result));
  }

  template <class _InIter, class _OutIter>
  struct _MoveSegment {
    using _Traits = __segmented_iterator_traits<_InIter>;

    _OutIter& __result_;

    _LIBCPP_HIDE_FROM_ABI _MoveSegment(_OutIter& __result) : __result_(__result) {}

    _LIBCPP_HIDE_FROM_ABI void
    operator()(typename _Traits::__local_iterator __lfirst, typename _Traits::__local_iterator __llast) {
      __result_ = std::__move<_AlgPolicy>(__lfirst, __llast, std::move(__result_)).second;
    }
  };

  template <class _InIter, class _OutIter, __enable_if_t<__is_segmented_iterator<_InIter>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
  operator()(_InIter __first, _InIter __last, _OutIter __result) const {
    std::__for_each_segment(__first, __last, _MoveSegment<_InIter, _OutIter>(__result));
    return std::make_pair(__last, std::move(__result));
  }

  template <class _InIter,
            class _OutIter,
            __enable_if_t<__has_random_access_iterator_category<_InIter>::value &&
                              !__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
                          int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
  operator()(_InIter __first, _InIter __last, _OutIter __result) const {
    using _Traits = __segmented_iterator_traits<_OutIter>;
    using _DiffT  = typename common_type<__iter_diff_t<_InIter>, __iter_diff_t<_OutIter> >::type;

    if (__first == __last)
      return std::make_pair(std::move(__first), std::move(__result));

    auto __local_first      = _Traits::__local(__result);
    auto __segment_iterator = _Traits::__segment(__result);
    while (true) {
      auto __local_last = _Traits::__end(__segment_iterator);
      auto __size       = std::min<_DiffT>(__local_last - __local_first, __last - __first);
      auto __iters      = std::__move<_AlgPolicy>(__first, __first + __size, __local_first);
      __first           = std::move(__iters.first);

      if (__first == __last)
        return std::make_pair(std::move(__first), _Traits::__compose(__segment_iterator, std::move(__iters.second)));

      __local_first = _Traits::__begin(++__segment_iterator);
    }
  }
};

struct __move_trivial {
  // At this point, the iterators have been unwrapped so any `contiguous_iterator` has been unwrapped to a pointer.
  template <class _In, class _Out,
            __enable_if_t<__can_lower_move_assignment_to_memmove<_In, _Out>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
  operator()(_In* __first, _In* __last, _Out* __result) const {
    return std::__copy_trivial_impl(__first, __last, __result);
  }
};

template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
__move(_InIter __first, _Sent __last, _OutIter __result) {
  return std::__dispatch_copy_or_move<_AlgPolicy, __move_loop<_AlgPolicy>, __move_trivial>(
      std::move(__first), std::move(__last), std::move(__result));
}

template <class _InputIterator, class _OutputIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
move(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
  static_assert(is_copy_constructible<_InputIterator>::value, "Iterators has to be copy constructible.");
  static_assert(is_copy_constructible<_OutputIterator>::value, "The output iterator has to be copy constructible.");

  return std::__move<_ClassicAlgPolicy>(std::move(__first), std::move(__last), std::move(__result)).second;
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_MOVE_H
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move.h" 3
#endif /* move.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/unwrap_iter.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/unwrap_range.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/construct_at.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/voidify.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/extent.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_array.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copy_assignable.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_unbounded_array.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/negation.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_const.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_extent.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* exception_guard.h expanded by -frewrite-includes */
#include <__utility/exception_guard.h>
#else /* exception_guard.h expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_TRANSACTION_H
#define _LIBCPP___UTILITY_TRANSACTION_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/exchange.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

// __exception_guard is a helper class for writing code with the strong exception guarantee.
//
// When writing code that can throw an exception, one can store rollback instructions in an
// exception guard so that if an exception is thrown at any point during the lifetime of the
// exception guard, it will be rolled back automatically. When the exception guard is done, one
// must mark it as being complete so it isn't rolled back when the exception guard is destroyed.
//
// Exception guards are not default constructible, they can't be copied or assigned to, but
// they can be moved around for convenience.
//
// __exception_guard is a no-op in -fno-exceptions mode to produce better code-gen. This means
// that we don't provide the strong exception guarantees. However, Clang doesn't generate cleanup
// code with exceptions disabled, so even if we wanted to provide the strong exception guarantees
// we couldn't. This is also only relevant for constructs with a stack of
// -fexceptions > -fno-exceptions > -fexceptions code, since the exception can't be caught where
// exceptions are disabled. While -fexceptions > -fno-exceptions is quite common
// (e.g. libc++.dylib > -fno-exceptions), having another layer with exceptions enabled seems a lot
// less common, especially one that tries to catch an exception through -fno-exceptions code.
//
// __exception_guard can help greatly simplify code that would normally be cluttered by
// `#if _LIBCPP_HAS_NO_EXCEPTIONS`. For example:
//
//    template <class Iterator, class Size, class OutputIterator>
//    Iterator uninitialized_copy_n(Iterator iter, Size n, OutputIterator out) {
//        typedef typename iterator_traits<Iterator>::value_type value_type;
//        __exception_guard guard([start=out, &out] {
//            std::destroy(start, out);
//        });
//
//        for (; n > 0; ++iter, ++out, --n) {
//            ::new ((void*)std::addressof(*out)) value_type(*iter);
//        }
//        guard.__complete();
//        return out;
//    }
//

template <class _Rollback>
struct __exception_guard_exceptions {
  __exception_guard_exceptions() = delete;

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __exception_guard_exceptions(_Rollback __rollback)
      : __rollback_(std::move(__rollback)), __completed_(false) {}

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
  __exception_guard_exceptions(__exception_guard_exceptions&& __other)
      _NOEXCEPT_(is_nothrow_move_constructible<_Rollback>::value)
      : __rollback_(std::move(__other.__rollback_)), __completed_(__other.__completed_) {
    __other.__completed_ = true;
  }

  __exception_guard_exceptions(__exception_guard_exceptions const&)            = delete;
  __exception_guard_exceptions& operator=(__exception_guard_exceptions const&) = delete;
  __exception_guard_exceptions& operator=(__exception_guard_exceptions&&)      = delete;

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __complete() _NOEXCEPT { __completed_ = true; }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 ~__exception_guard_exceptions() {
    if (!__completed_)
      __rollback_();
  }

private:
  _Rollback __rollback_;
  bool __completed_;
};

_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(__exception_guard_exceptions);

template <class _Rollback>
struct __exception_guard_noexceptions {
  __exception_guard_noexceptions() = delete;
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
      _LIBCPP_NODEBUG explicit __exception_guard_noexceptions(_Rollback) {}

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NODEBUG
  __exception_guard_noexceptions(__exception_guard_noexceptions&& __other)
      _NOEXCEPT_(is_nothrow_move_constructible<_Rollback>::value)
      : __completed_(__other.__completed_) {
    __other.__completed_ = true;
  }

  __exception_guard_noexceptions(__exception_guard_noexceptions const&)            = delete;
  __exception_guard_noexceptions& operator=(__exception_guard_noexceptions const&) = delete;
  __exception_guard_noexceptions& operator=(__exception_guard_noexceptions&&)      = delete;

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NODEBUG void __complete() _NOEXCEPT {
    __completed_ = true;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NODEBUG ~__exception_guard_noexceptions() {
    _LIBCPP_ASSERT_UNCATEGORIZED(__completed_, "__exception_guard not completed with exceptions disabled");
  }

private:
  bool __completed_ = false;
};

_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(__exception_guard_noexceptions);

#ifdef _LIBCPP_HAS_NO_EXCEPTIONS
template <class _Rollback>
using __exception_guard = __exception_guard_noexceptions<_Rollback>;
#else
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3
template <class _Rollback>
using __exception_guard = __exception_guard_exceptions<_Rollback>;
#endif
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3

template <class _Rollback>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __exception_guard<_Rollback> __make_exception_guard(_Rollback __rollback) {
  return __exception_guard<_Rollback>(std::move(__rollback));
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___UTILITY_TRANSACTION_H
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/exception_guard.h" 3
#endif /* exception_guard.h expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// This is a simplified version of C++20 `unreachable_sentinel` that doesn't use concepts and thus can be used in any
// language mode.
struct __unreachable_sentinel {
  template <class _Iter>
  _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool operator!=(const _Iter&, __unreachable_sentinel) _NOEXCEPT {
    return true;
  }
};

// uninitialized_copy

template <class _ValueType, class _InputIterator, class _Sentinel1, class _ForwardIterator, class _Sentinel2>
inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator>
__uninitialized_copy(_InputIterator __ifirst, _Sentinel1 __ilast,
                     _ForwardIterator __ofirst, _Sentinel2 __olast) {
  _ForwardIterator __idx = __ofirst;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
  try {
#endif
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
    for (; __ifirst != __ilast && __idx != __olast; ++__ifirst, (void)++__idx)
      ::new (_VSTD::__voidify(*__idx)) _ValueType(*__ifirst);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
  } catch (...) {
    _VSTD::__destroy(__ofirst, __idx);
    throw;
  }
#endif
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3

  return pair<_InputIterator, _ForwardIterator>(_VSTD::move(__ifirst), _VSTD::move(__idx));
}

template <class _InputIterator, class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI
_ForwardIterator uninitialized_copy(_InputIterator __ifirst, _InputIterator __ilast,
                                    _ForwardIterator __ofirst) {
  typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
  auto __result = _VSTD::__uninitialized_copy<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast),
                                                          _VSTD::move(__ofirst), __unreachable_sentinel());
  return _VSTD::move(__result.second);
}

// uninitialized_copy_n

template <class _ValueType, class _InputIterator, class _Size, class _ForwardIterator, class _Sentinel>
inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator>
__uninitialized_copy_n(_InputIterator __ifirst, _Size __n,
                       _ForwardIterator __ofirst, _Sentinel __olast) {
  _ForwardIterator __idx = __ofirst;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
  try {
#endif
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
    for (; __n > 0 && __idx != __olast; ++__ifirst, (void)++__idx, (void)--__n)
      ::new (_VSTD::__voidify(*__idx)) _ValueType(*__ifirst);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
  } catch (...) {
    _VSTD::__destroy(__ofirst, __idx);
    throw;
  }
#endif
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3

  return pair<_InputIterator, _ForwardIterator>(_VSTD::move(__ifirst), _VSTD::move(__idx));
}

template <class _InputIterator, class _Size, class _ForwardIterator>
inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator uninitialized_copy_n(_InputIterator __ifirst, _Size __n,
                                                                   _ForwardIterator __ofirst) {
  typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
  auto __result = _VSTD::__uninitialized_copy_n<_ValueType>(_VSTD::move(__ifirst), __n, _VSTD::move(__ofirst),
                                                            __unreachable_sentinel());
  return _VSTD::move(__result.second);
}

// uninitialized_fill

template <class _ValueType, class _ForwardIterator, class _Sentinel, class _Tp>
inline _LIBCPP_HIDE_FROM_ABI
_ForwardIterator __uninitialized_fill(_ForwardIterator __first, _Sentinel __last, const _Tp& __x)
{
    _ForwardIterator __idx = __first;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
        for (; __idx != __last; ++__idx)
            ::new (_VSTD::__voidify(*__idx)) _ValueType(__x);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        _VSTD::__destroy(__first, __idx);
        throw;
    }
#endif
# 140 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3

    return __idx;
}

template <class _ForwardIterator, class _Tp>
inline _LIBCPP_HIDE_FROM_ABI
void uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x)
{
    typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
    (void)_VSTD::__uninitialized_fill<_ValueType>(__first, __last, __x);
}

// uninitialized_fill_n

template <class _ValueType, class _ForwardIterator, class _Size, class _Tp>
inline _LIBCPP_HIDE_FROM_ABI
_ForwardIterator __uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x)
{
    _ForwardIterator __idx = __first;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif
# 163 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
        for (; __n > 0; ++__idx, (void) --__n)
            ::new (_VSTD::__voidify(*__idx)) _ValueType(__x);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        _VSTD::__destroy(__first, __idx);
        throw;
    }
#endif
# 173 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3

    return __idx;
}

template <class _ForwardIterator, class _Size, class _Tp>
inline _LIBCPP_HIDE_FROM_ABI
_ForwardIterator uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x)
{
    typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
    return _VSTD::__uninitialized_fill_n<_ValueType>(__first, __n, __x);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 186 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3

// uninitialized_default_construct

template <class _ValueType, class _ForwardIterator, class _Sentinel>
inline _LIBCPP_HIDE_FROM_ABI
_ForwardIterator __uninitialized_default_construct(_ForwardIterator __first, _Sentinel __last) {
    auto __idx = __first;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try {
#endif
# 196 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
    for (; __idx != __last; ++__idx)
        ::new (_VSTD::__voidify(*__idx)) _ValueType;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    } catch (...) {
        _VSTD::__destroy(__first, __idx);
        throw;
    }
#endif
# 204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3

    return __idx;
}

template <class _ForwardIterator>
inline _LIBCPP_HIDE_FROM_ABI
void uninitialized_default_construct(_ForwardIterator __first, _ForwardIterator __last) {
    using _ValueType = typename iterator_traits<_ForwardIterator>::value_type;
    (void)_VSTD::__uninitialized_default_construct<_ValueType>(
        _VSTD::move(__first), _VSTD::move(__last));
}

// uninitialized_default_construct_n

template <class _ValueType, class _ForwardIterator, class _Size>
inline _LIBCPP_HIDE_FROM_ABI
_ForwardIterator __uninitialized_default_construct_n(_ForwardIterator __first, _Size __n) {
    auto __idx = __first;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try {
#endif
# 225 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
    for (; __n > 0; ++__idx, (void) --__n)
        ::new (_VSTD::__voidify(*__idx)) _ValueType;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    } catch (...) {
        _VSTD::__destroy(__first, __idx);
        throw;
    }
#endif
# 233 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3

    return __idx;
}

template <class _ForwardIterator, class _Size>
inline _LIBCPP_HIDE_FROM_ABI
_ForwardIterator uninitialized_default_construct_n(_ForwardIterator __first, _Size __n) {
    using _ValueType = typename iterator_traits<_ForwardIterator>::value_type;
    return _VSTD::__uninitialized_default_construct_n<_ValueType>(_VSTD::move(__first), __n);
}

// uninitialized_value_construct

template <class _ValueType, class _ForwardIterator, class _Sentinel>
inline _LIBCPP_HIDE_FROM_ABI
_ForwardIterator __uninitialized_value_construct(_ForwardIterator __first, _Sentinel __last) {
    auto __idx = __first;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try {
#endif
# 253 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
    for (; __idx != __last; ++__idx)
        ::new (_VSTD::__voidify(*__idx)) _ValueType();
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    } catch (...) {
        _VSTD::__destroy(__first, __idx);
        throw;
    }
#endif
# 261 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3

    return __idx;
}

template <class _ForwardIterator>
inline _LIBCPP_HIDE_FROM_ABI
void uninitialized_value_construct(_ForwardIterator __first, _ForwardIterator __last) {
    using _ValueType = typename iterator_traits<_ForwardIterator>::value_type;
    (void)_VSTD::__uninitialized_value_construct<_ValueType>(
        _VSTD::move(__first), _VSTD::move(__last));
}

// uninitialized_value_construct_n

template <class _ValueType, class _ForwardIterator, class _Size>
inline _LIBCPP_HIDE_FROM_ABI
_ForwardIterator __uninitialized_value_construct_n(_ForwardIterator __first, _Size __n) {
    auto __idx = __first;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try {
#endif
# 282 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
    for (; __n > 0; ++__idx, (void) --__n)
        ::new (_VSTD::__voidify(*__idx)) _ValueType();
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    } catch (...) {
        _VSTD::__destroy(__first, __idx);
        throw;
    }
#endif
# 290 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3

    return __idx;
}

template <class _ForwardIterator, class _Size>
inline _LIBCPP_HIDE_FROM_ABI
_ForwardIterator uninitialized_value_construct_n(_ForwardIterator __first, _Size __n) {
    using _ValueType = typename iterator_traits<_ForwardIterator>::value_type;
    return std::__uninitialized_value_construct_n<_ValueType>(_VSTD::move(__first), __n);
}

// uninitialized_move

template <class _ValueType, class _InputIterator, class _Sentinel1, class _ForwardIterator, class _Sentinel2,
          class _IterMove>
inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator>
__uninitialized_move(_InputIterator __ifirst, _Sentinel1 __ilast,
                     _ForwardIterator __ofirst, _Sentinel2 __olast, _IterMove __iter_move) {
  auto __idx = __ofirst;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
  try {
#endif
# 312 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
    for (; __ifirst != __ilast && __idx != __olast; ++__idx, (void)++__ifirst) {
      ::new (_VSTD::__voidify(*__idx)) _ValueType(__iter_move(__ifirst));
    }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
  } catch (...) {
    _VSTD::__destroy(__ofirst, __idx);
    throw;
  }
#endif
# 321 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3

  return {_VSTD::move(__ifirst), _VSTD::move(__idx)};
}

template <class _InputIterator, class _ForwardIterator>
inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator uninitialized_move(_InputIterator __ifirst, _InputIterator __ilast,
                                                                 _ForwardIterator __ofirst) {
  using _ValueType = typename iterator_traits<_ForwardIterator>::value_type;
  auto __iter_move = [](auto&& __iter) -> decltype(auto) { return _VSTD::move(*__iter); };

  auto __result = _VSTD::__uninitialized_move<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast),
                                                          _VSTD::move(__ofirst), __unreachable_sentinel(), __iter_move);
  return _VSTD::move(__result.second);
}

// uninitialized_move_n

template <class _ValueType, class _InputIterator, class _Size, class _ForwardIterator, class _Sentinel, class _IterMove>
inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator>
__uninitialized_move_n(_InputIterator __ifirst, _Size __n,
                       _ForwardIterator __ofirst, _Sentinel __olast, _IterMove __iter_move) {
  auto __idx = __ofirst;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
  try {
#endif
# 346 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
    for (; __n > 0 && __idx != __olast; ++__idx, (void)++__ifirst, --__n)
      ::new (_VSTD::__voidify(*__idx)) _ValueType(__iter_move(__ifirst));
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
  } catch (...) {
    _VSTD::__destroy(__ofirst, __idx);
    throw;
  }
#endif
# 354 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3

  return {_VSTD::move(__ifirst), _VSTD::move(__idx)};
}

template <class _InputIterator, class _Size, class _ForwardIterator>
inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator>
uninitialized_move_n(_InputIterator __ifirst, _Size __n, _ForwardIterator __ofirst) {
  using _ValueType = typename iterator_traits<_ForwardIterator>::value_type;
  auto __iter_move = [](auto&& __iter) -> decltype(auto) { return _VSTD::move(*__iter); };

  return _VSTD::__uninitialized_move_n<_ValueType>(_VSTD::move(__ifirst), __n, _VSTD::move(__ofirst),
                                                   __unreachable_sentinel(), __iter_move);
}

// TODO: Rewrite this to iterate left to right and use reverse_iterators when calling
// Destroys every element in the range [first, last) FROM RIGHT TO LEFT using allocator
// destruction. If elements are themselves C-style arrays, they are recursively destroyed
// in the same manner.
//
// This function assumes that destructors do not throw, and that the allocator is bound to
// the correct type.
template<class _Alloc, class _BidirIter, class = __enable_if_t<
    __has_bidirectional_iterator_category<_BidirIter>::value
>>
_LIBCPP_HIDE_FROM_ABI
constexpr void __allocator_destroy_multidimensional(_Alloc& __alloc, _BidirIter __first, _BidirIter __last) noexcept {
    using _ValueType = typename iterator_traits<_BidirIter>::value_type;
    static_assert(is_same_v<typename allocator_traits<_Alloc>::value_type, _ValueType>,
        "The allocator should already be rebound to the correct type");

    if (__first == __last)
        return;

    if constexpr (is_array_v<_ValueType>) {
        static_assert(!__libcpp_is_unbounded_array<_ValueType>::value,
            "arrays of unbounded arrays don't exist, but if they did we would mess up here");

        using _Element = remove_extent_t<_ValueType>;
        __allocator_traits_rebind_t<_Alloc, _Element> __elem_alloc(__alloc);
        do {
            --__last;
            decltype(auto) __array = *__last;
            std::__allocator_destroy_multidimensional(__elem_alloc, __array, __array + extent_v<_ValueType>);
        } while (__last != __first);
    } else {
        do {
            --__last;
            allocator_traits<_Alloc>::destroy(__alloc, std::addressof(*__last));
        } while (__last != __first);
    }
}

// Constructs the object at the given location using the allocator's construct method.
//
// If the object being constructed is an array, each element of the array is allocator-constructed,
// recursively. If an exception is thrown during the construction of an array, the initialized
// elements are destroyed in reverse order of initialization using allocator destruction.
//
// This function assumes that the allocator is bound to the correct type.
template<class _Alloc, class _Tp>
_LIBCPP_HIDE_FROM_ABI
constexpr void __allocator_construct_at_multidimensional(_Alloc& __alloc, _Tp* __loc) {
    static_assert(is_same_v<typename allocator_traits<_Alloc>::value_type, _Tp>,
        "The allocator should already be rebound to the correct type");

    if constexpr (is_array_v<_Tp>) {
        using _Element = remove_extent_t<_Tp>;
        __allocator_traits_rebind_t<_Alloc, _Element> __elem_alloc(__alloc);
        size_t __i = 0;
        _Tp& __array = *__loc;

        // If an exception is thrown, destroy what we have constructed so far in reverse order.
        auto __guard = std::__make_exception_guard([&]() {
          std::__allocator_destroy_multidimensional(__elem_alloc, __array, __array + __i);
        });

        for (; __i != extent_v<_Tp>; ++__i) {
            std::__allocator_construct_at_multidimensional(__elem_alloc, std::addressof(__array[__i]));
        }
        __guard.__complete();
    } else {
        allocator_traits<_Alloc>::construct(__alloc, __loc);
    }
}

// Constructs the object at the given location using the allocator's construct method, passing along
// the provided argument.
//
// If the object being constructed is an array, the argument is also assumed to be an array. Each
// each element of the array being constructed is allocator-constructed from the corresponding
// element of the argument array. If an exception is thrown during the construction of an array,
// the initialized elements are destroyed in reverse order of initialization using allocator
// destruction.
//
// This function assumes that the allocator is bound to the correct type.
template<class _Alloc, class _Tp, class _Arg>
_LIBCPP_HIDE_FROM_ABI
constexpr void __allocator_construct_at_multidimensional(_Alloc& __alloc, _Tp* __loc, _Arg const& __arg) {
    static_assert(is_same_v<typename allocator_traits<_Alloc>::value_type, _Tp>,
        "The allocator should already be rebound to the correct type");

    if constexpr (is_array_v<_Tp>) {
        static_assert(is_array_v<_Arg>,
            "Provided non-array initialization argument to __allocator_construct_at_multidimensional when "
            "trying to construct an array.");

        using _Element = remove_extent_t<_Tp>;
        __allocator_traits_rebind_t<_Alloc, _Element> __elem_alloc(__alloc);
        size_t __i = 0;
        _Tp& __array = *__loc;

        // If an exception is thrown, destroy what we have constructed so far in reverse order.
        auto __guard = std::__make_exception_guard([&]() {
          std::__allocator_destroy_multidimensional(__elem_alloc, __array, __array + __i);
        });
        for (; __i != extent_v<_Tp>; ++__i) {
            std::__allocator_construct_at_multidimensional(__elem_alloc, std::addressof(__array[__i]), __arg[__i]);
        }
        __guard.__complete();
    } else {
        allocator_traits<_Alloc>::construct(__alloc, __loc, __arg);
    }
}

// Given a range starting at it and containing n elements, initializes each element in the
// range from left to right using the construct method of the allocator (rebound to the
// correct type).
//
// If an exception is thrown, the initialized elements are destroyed in reverse order of
// initialization using allocator_traits destruction. If the elements in the range are C-style
// arrays, they are initialized element-wise using allocator construction, and recursively so.
template<class _Alloc, class _BidirIter, class _Tp, class _Size = typename iterator_traits<_BidirIter>::difference_type>
_LIBCPP_HIDE_FROM_ABI constexpr void
__uninitialized_allocator_fill_n_multidimensional(_Alloc& __alloc, _BidirIter __it, _Size __n, _Tp const& __value) {
    using _ValueType = typename iterator_traits<_BidirIter>::value_type;
    __allocator_traits_rebind_t<_Alloc, _ValueType> __value_alloc(__alloc);
    _BidirIter __begin = __it;

    // If an exception is thrown, destroy what we have constructed so far in reverse order.
    auto __guard = std::__make_exception_guard([&]() { std::__allocator_destroy_multidimensional(__value_alloc, __begin, __it); });
    for (; __n != 0; --__n, ++__it) {
        std::__allocator_construct_at_multidimensional(__value_alloc, std::addressof(*__it), __value);
    }
    __guard.__complete();
}

// Same as __uninitialized_allocator_fill_n_multidimensional, but doesn't pass any initialization argument
// to the allocator's construct method, which results in value initialization.
template <class _Alloc, class _BidirIter, class _Size = typename iterator_traits<_BidirIter>::difference_type>
_LIBCPP_HIDE_FROM_ABI constexpr void
__uninitialized_allocator_value_construct_n_multidimensional(_Alloc& __alloc, _BidirIter __it, _Size __n) {
    using _ValueType = typename iterator_traits<_BidirIter>::value_type;
    __allocator_traits_rebind_t<_Alloc, _ValueType> __value_alloc(__alloc);
    _BidirIter __begin = __it;

    // If an exception is thrown, destroy what we have constructed so far in reverse order.
    auto __guard = std::__make_exception_guard([&]() { std::__allocator_destroy_multidimensional(__value_alloc, __begin, __it); });
    for (; __n != 0; --__n, ++__it) {
        std::__allocator_construct_at_multidimensional(__value_alloc, std::addressof(*__it));
    }
    __guard.__complete();
}

#endif // _LIBCPP_STD_VER >= 17
# 518 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3

// Destroy all elements in [__first, __last) from left to right using allocator destruction.
template <class _Alloc, class _Iter, class _Sent>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
__allocator_destroy(_Alloc& __alloc, _Iter __first, _Sent __last) {
  for (; __first != __last; ++__first)
     allocator_traits<_Alloc>::destroy(__alloc, std::__to_address(__first));
}

template <class _Alloc, class _Iter>
class _AllocatorDestroyRangeReverse {
public:
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
  _AllocatorDestroyRangeReverse(_Alloc& __alloc, _Iter& __first, _Iter& __last)
      : __alloc_(__alloc), __first_(__first), __last_(__last) {}

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void operator()() const {
    std::__allocator_destroy(__alloc_, std::reverse_iterator<_Iter>(__last_), std::reverse_iterator<_Iter>(__first_));
  }

private:
  _Alloc& __alloc_;
  _Iter& __first_;
  _Iter& __last_;
};

// Copy-construct [__first1, __last1) in [__first2, __first2 + N), where N is distance(__first1, __last1).
//
// The caller has to ensure that __first2 can hold at least N uninitialized elements. If an exception is thrown the
// already copied elements are destroyed in reverse order of their construction.
template <class _Alloc, class _Iter1, class _Sent1, class _Iter2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter2
__uninitialized_allocator_copy_impl(_Alloc& __alloc, _Iter1 __first1, _Sent1 __last1, _Iter2 __first2) {
  auto __destruct_first = __first2;
  auto __guard =
      std::__make_exception_guard(_AllocatorDestroyRangeReverse<_Alloc, _Iter2>(__alloc, __destruct_first, __first2));
  while (__first1 != __last1) {
    allocator_traits<_Alloc>::construct(__alloc, std::__to_address(__first2), *__first1);
    ++__first1;
    ++__first2;
  }
  __guard.__complete();
  return __first2;
}

template <class _Alloc, class _Type>
struct __allocator_has_trivial_copy_construct : _Not<__has_construct<_Alloc, _Type*, const _Type&> > {};

template <class _Type>
struct __allocator_has_trivial_copy_construct<allocator<_Type>, _Type> : true_type {};

template <class _Alloc,
          class _In,
          class _RawTypeIn = __remove_const_t<_In>,
          class _Out,
          __enable_if_t<
              // using _RawTypeIn because of the allocator<T const> extension
              is_trivially_copy_constructible<_RawTypeIn>::value && is_trivially_copy_assignable<_RawTypeIn>::value &&
              is_same<__remove_const_t<_In>, __remove_const_t<_Out> >::value &&
              __allocator_has_trivial_copy_construct<_Alloc, _RawTypeIn>::value>* = nullptr>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Out*
__uninitialized_allocator_copy_impl(_Alloc&, _In* __first1, _In* __last1, _Out* __first2) {
  // TODO: Remove the const_cast once we drop support for std::allocator<T const>
  if (__libcpp_is_constant_evaluated()) {
    while (__first1 != __last1) {
      std::__construct_at(std::__to_address(__first2), *__first1);
      ++__first1;
      ++__first2;
    }
    return __first2;
  } else {
    return std::copy(__first1, __last1, const_cast<_RawTypeIn*>(__first2));
  }
}

template <class _Alloc, class _Iter1, class _Sent1, class _Iter2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter2 __uninitialized_allocator_copy(_Alloc& __alloc, _Iter1 __first1, _Sent1 __last1, _Iter2 __first2) {
    auto __unwrapped_range = std::__unwrap_range(__first1, __last1);
    auto __result = std::__uninitialized_allocator_copy_impl(__alloc, __unwrapped_range.first, __unwrapped_range.second, std::__unwrap_iter(__first2));
    return std::__rewrap_iter(__first2, __result);
}

// Move-construct the elements [__first1, __last1) into [__first2, __first2 + N)
// if the move constructor is noexcept, where N is distance(__first1, __last1).
//
// Otherwise try to copy all elements. If an exception is thrown the already copied
// elements are destroyed in reverse order of their construction.
template <class _Alloc, class _Iter1, class _Sent1, class _Iter2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter2 __uninitialized_allocator_move_if_noexcept(
    _Alloc& __alloc, _Iter1 __first1, _Sent1 __last1, _Iter2 __first2) {
  static_assert(__is_cpp17_move_insertable<_Alloc>::value,
                "The specified type does not meet the requirements of Cpp17MoveInsertable");
  auto __destruct_first = __first2;
  auto __guard =
      std::__make_exception_guard(_AllocatorDestroyRangeReverse<_Alloc, _Iter2>(__alloc, __destruct_first, __first2));
  while (__first1 != __last1) {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    allocator_traits<_Alloc>::construct(__alloc, std::__to_address(__first2), std::move_if_noexcept(*__first1));
#else
# 617 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
    allocator_traits<_Alloc>::construct(__alloc, std::__to_address(__first2), std::move(*__first1));
#endif
# 619 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
    ++__first1;
    ++__first2;
  }
  __guard.__complete();
  return __first2;
}

template <class _Alloc, class _Type>
struct __allocator_has_trivial_move_construct : _Not<__has_construct<_Alloc, _Type*, _Type&&> > {};

template <class _Type>
struct __allocator_has_trivial_move_construct<allocator<_Type>, _Type> : true_type {};

#ifndef _LIBCPP_COMPILER_GCC
template <
    class _Alloc,
    class _Iter1,
    class _Iter2,
    class _Type = typename iterator_traits<_Iter1>::value_type,
    class = __enable_if_t<is_trivially_move_constructible<_Type>::value && is_trivially_move_assignable<_Type>::value &&
                          __allocator_has_trivial_move_construct<_Alloc, _Type>::value> >
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter2
__uninitialized_allocator_move_if_noexcept(_Alloc&, _Iter1 __first1, _Iter1 __last1, _Iter2 __first2) {
  if (__libcpp_is_constant_evaluated()) {
    while (__first1 != __last1) {
      std::__construct_at(std::__to_address(__first2), std::move(*__first1));
      ++__first1;
      ++__first2;
    }
    return __first2;
  } else {
    return std::move(__first1, __last1, __first2);
  }
}
#endif // _LIBCPP_COMPILER_GCC
# 654 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_UNINITIALIZED_ALGORITHMS_H
# 658 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uninitialized_algorithms.h" 3
#endif /* uninitialized_algorithms.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3

namespace ranges {

// uninitialized_default_construct

namespace __uninitialized_default_construct {

struct __fn {
  template <__nothrow_forward_iterator _ForwardIterator,
            __nothrow_sentinel_for<_ForwardIterator> _Sentinel>
    requires default_initializable<iter_value_t<_ForwardIterator>>
  _LIBCPP_HIDE_FROM_ABI _ForwardIterator operator()(_ForwardIterator __first, _Sentinel __last) const {
    using _ValueType = remove_reference_t<iter_reference_t<_ForwardIterator>>;
    return _VSTD::__uninitialized_default_construct<_ValueType>(
        _VSTD::move(__first), _VSTD::move(__last));
  }

  template <__nothrow_forward_range _ForwardRange>
    requires default_initializable<range_value_t<_ForwardRange>>
  _LIBCPP_HIDE_FROM_ABI borrowed_iterator_t<_ForwardRange> operator()(_ForwardRange&& __range) const {
    return (*this)(ranges::begin(__range), ranges::end(__range));
  }
};

} // namespace __uninitialized_default_construct

inline namespace __cpo {
  inline constexpr auto uninitialized_default_construct = __uninitialized_default_construct::__fn{};
} // namespace __cpo

// uninitialized_default_construct_n

namespace __uninitialized_default_construct_n {

struct __fn {
  template <__nothrow_forward_iterator _ForwardIterator>
    requires default_initializable<iter_value_t<_ForwardIterator>>
  _LIBCPP_HIDE_FROM_ABI _ForwardIterator operator()(_ForwardIterator __first,
                              iter_difference_t<_ForwardIterator> __n) const {
    using _ValueType = remove_reference_t<iter_reference_t<_ForwardIterator>>;
    return _VSTD::__uninitialized_default_construct_n<_ValueType>(_VSTD::move(__first), __n);
  }
};

} // namespace __uninitialized_default_construct_n

inline namespace __cpo {
  inline constexpr auto uninitialized_default_construct_n = __uninitialized_default_construct_n::__fn{};
} // namespace __cpo

// uninitialized_value_construct

namespace __uninitialized_value_construct {

struct __fn {
  template <__nothrow_forward_iterator _ForwardIterator,
            __nothrow_sentinel_for<_ForwardIterator> _Sentinel>
    requires default_initializable<iter_value_t<_ForwardIterator>>
  _LIBCPP_HIDE_FROM_ABI _ForwardIterator operator()(_ForwardIterator __first, _Sentinel __last) const {
    using _ValueType = remove_reference_t<iter_reference_t<_ForwardIterator>>;
    return _VSTD::__uninitialized_value_construct<_ValueType>(
        _VSTD::move(__first), _VSTD::move(__last));
  }

  template <__nothrow_forward_range _ForwardRange>
    requires default_initializable<range_value_t<_ForwardRange>>
  _LIBCPP_HIDE_FROM_ABI borrowed_iterator_t<_ForwardRange> operator()(_ForwardRange&& __range) const {
    return (*this)(ranges::begin(__range), ranges::end(__range));
  }
};

} // namespace __uninitialized_value_construct

inline namespace __cpo {
  inline constexpr auto uninitialized_value_construct = __uninitialized_value_construct::__fn{};
} // namespace __cpo

// uninitialized_value_construct_n

namespace __uninitialized_value_construct_n {

struct __fn {
  template <__nothrow_forward_iterator _ForwardIterator>
    requires default_initializable<iter_value_t<_ForwardIterator>>
  _LIBCPP_HIDE_FROM_ABI _ForwardIterator operator()(_ForwardIterator __first,
                              iter_difference_t<_ForwardIterator> __n) const {
    using _ValueType = remove_reference_t<iter_reference_t<_ForwardIterator>>;
    return _VSTD::__uninitialized_value_construct_n<_ValueType>(_VSTD::move(__first), __n);
  }
};

} // namespace __uninitialized_value_construct_n

inline namespace __cpo {
  inline constexpr auto uninitialized_value_construct_n = __uninitialized_value_construct_n::__fn{};
} // namespace __cpo

// uninitialized_fill

namespace __uninitialized_fill {

struct __fn {
  template <__nothrow_forward_iterator _ForwardIterator,
            __nothrow_sentinel_for<_ForwardIterator> _Sentinel,
            class _Tp>
    requires constructible_from<iter_value_t<_ForwardIterator>, const _Tp&>
  _LIBCPP_HIDE_FROM_ABI _ForwardIterator operator()(_ForwardIterator __first, _Sentinel __last, const _Tp& __x) const {
    using _ValueType = remove_reference_t<iter_reference_t<_ForwardIterator>>;
    return _VSTD::__uninitialized_fill<_ValueType>(_VSTD::move(__first), _VSTD::move(__last), __x);
  }

  template <__nothrow_forward_range _ForwardRange, class _Tp>
    requires constructible_from<range_value_t<_ForwardRange>, const _Tp&>
  _LIBCPP_HIDE_FROM_ABI borrowed_iterator_t<_ForwardRange> operator()(_ForwardRange&& __range, const _Tp& __x) const {
    return (*this)(ranges::begin(__range), ranges::end(__range), __x);
  }
};

} // namespace __uninitialized_fill

inline namespace __cpo {
  inline constexpr auto uninitialized_fill = __uninitialized_fill::__fn{};
} // namespace __cpo

// uninitialized_fill_n

namespace __uninitialized_fill_n {

struct __fn {
  template <__nothrow_forward_iterator _ForwardIterator, class _Tp>
    requires constructible_from<iter_value_t<_ForwardIterator>, const _Tp&>
  _LIBCPP_HIDE_FROM_ABI _ForwardIterator operator()(_ForwardIterator __first,
                              iter_difference_t<_ForwardIterator> __n,
                              const _Tp& __x) const {
    using _ValueType = remove_reference_t<iter_reference_t<_ForwardIterator>>;
    return _VSTD::__uninitialized_fill_n<_ValueType>(_VSTD::move(__first), __n, __x);
  }
};

} // namespace __uninitialized_fill_n

inline namespace __cpo {
  inline constexpr auto uninitialized_fill_n = __uninitialized_fill_n::__fn{};
} // namespace __cpo

// uninitialized_copy

template <class _InputIterator, class _OutputIterator>
using uninitialized_copy_result = in_out_result<_InputIterator, _OutputIterator>;

namespace __uninitialized_copy {

struct __fn {
  template <input_iterator _InputIterator,
            sentinel_for<_InputIterator> _Sentinel1,
            __nothrow_forward_iterator _OutputIterator,
            __nothrow_sentinel_for<_OutputIterator> _Sentinel2>
    requires constructible_from<iter_value_t<_OutputIterator>, iter_reference_t<_InputIterator>>
  _LIBCPP_HIDE_FROM_ABI uninitialized_copy_result<_InputIterator, _OutputIterator>
  operator()(_InputIterator __ifirst, _Sentinel1 __ilast, _OutputIterator __ofirst, _Sentinel2 __olast) const {
    using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>;

    auto __result = _VSTD::__uninitialized_copy<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast),
                                                            _VSTD::move(__ofirst), _VSTD::move(__olast));
    return {_VSTD::move(__result.first), _VSTD::move(__result.second)};
  }

  template <input_range _InputRange, __nothrow_forward_range _OutputRange>
    requires constructible_from<range_value_t<_OutputRange>, range_reference_t<_InputRange>>
  _LIBCPP_HIDE_FROM_ABI uninitialized_copy_result<borrowed_iterator_t<_InputRange>, borrowed_iterator_t<_OutputRange>>
  operator()( _InputRange&& __in_range, _OutputRange&& __out_range) const {
    return (*this)(ranges::begin(__in_range), ranges::end(__in_range),
                   ranges::begin(__out_range), ranges::end(__out_range));
  }
};

} // namespace __uninitialized_copy

inline namespace __cpo {
  inline constexpr auto uninitialized_copy = __uninitialized_copy::__fn{};
} // namespace __cpo

// uninitialized_copy_n

template <class _InputIterator, class _OutputIterator>
using uninitialized_copy_n_result = in_out_result<_InputIterator, _OutputIterator>;

namespace __uninitialized_copy_n {

struct __fn {
  template <input_iterator _InputIterator,
           __nothrow_forward_iterator _OutputIterator,
           __nothrow_sentinel_for<_OutputIterator> _Sentinel>
    requires constructible_from<iter_value_t<_OutputIterator>, iter_reference_t<_InputIterator>>
  _LIBCPP_HIDE_FROM_ABI uninitialized_copy_n_result<_InputIterator, _OutputIterator>
  operator()(_InputIterator __ifirst, iter_difference_t<_InputIterator> __n,
             _OutputIterator __ofirst, _Sentinel __olast) const {
    using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>;
    auto __result = _VSTD::__uninitialized_copy_n<_ValueType>(_VSTD::move(__ifirst), __n,
                                                              _VSTD::move(__ofirst), _VSTD::move(__olast));
    return {_VSTD::move(__result.first), _VSTD::move(__result.second)};
  }
};

} // namespace __uninitialized_copy_n

inline namespace __cpo {
  inline constexpr auto uninitialized_copy_n = __uninitialized_copy_n::__fn{};
} // namespace __cpo

// uninitialized_move

template <class _InputIterator, class _OutputIterator>
using uninitialized_move_result = in_out_result<_InputIterator, _OutputIterator>;

namespace __uninitialized_move {

struct __fn {
  template <input_iterator _InputIterator,
            sentinel_for<_InputIterator> _Sentinel1,
            __nothrow_forward_iterator _OutputIterator,
            __nothrow_sentinel_for<_OutputIterator> _Sentinel2>
    requires constructible_from<iter_value_t<_OutputIterator>, iter_rvalue_reference_t<_InputIterator>>
  _LIBCPP_HIDE_FROM_ABI uninitialized_move_result<_InputIterator, _OutputIterator>
  operator()(_InputIterator __ifirst, _Sentinel1 __ilast, _OutputIterator __ofirst, _Sentinel2 __olast) const {
    using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>;
    auto __iter_move = [](auto&& __iter) -> decltype(auto) { return ranges::iter_move(__iter); };
    auto __result = _VSTD::__uninitialized_move<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast),
                                                            _VSTD::move(__ofirst), _VSTD::move(__olast), __iter_move);
    return {_VSTD::move(__result.first), _VSTD::move(__result.second)};
  }

  template <input_range _InputRange, __nothrow_forward_range _OutputRange>
    requires constructible_from<range_value_t<_OutputRange>, range_rvalue_reference_t<_InputRange>>
  _LIBCPP_HIDE_FROM_ABI uninitialized_move_result<borrowed_iterator_t<_InputRange>, borrowed_iterator_t<_OutputRange>>
  operator()(_InputRange&& __in_range, _OutputRange&& __out_range) const {
    return (*this)(ranges::begin(__in_range), ranges::end(__in_range),
                   ranges::begin(__out_range), ranges::end(__out_range));
  }
};

} // namespace __uninitialized_move

inline namespace __cpo {
  inline constexpr auto uninitialized_move = __uninitialized_move::__fn{};
} // namespace __cpo

// uninitialized_move_n

template <class _InputIterator, class _OutputIterator>
using uninitialized_move_n_result = in_out_result<_InputIterator, _OutputIterator>;

namespace __uninitialized_move_n {

struct __fn {
  template <input_iterator _InputIterator,
           __nothrow_forward_iterator _OutputIterator,
           __nothrow_sentinel_for<_OutputIterator> _Sentinel>
    requires constructible_from<iter_value_t<_OutputIterator>, iter_rvalue_reference_t<_InputIterator>>
  _LIBCPP_HIDE_FROM_ABI uninitialized_move_n_result<_InputIterator, _OutputIterator>
  operator()(_InputIterator __ifirst, iter_difference_t<_InputIterator> __n,
             _OutputIterator __ofirst, _Sentinel __olast) const {
    using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>;
    auto __iter_move = [](auto&& __iter) -> decltype(auto) { return ranges::iter_move(__iter); };
    auto __result = _VSTD::__uninitialized_move_n<_ValueType>(_VSTD::move(__ifirst), __n,
                                                              _VSTD::move(__ofirst), _VSTD::move(__olast), __iter_move);
    return {_VSTD::move(__result.first), _VSTD::move(__result.second)};
  }
};

} // namespace __uninitialized_move_n

inline namespace __cpo {
  inline constexpr auto uninitialized_move_n = __uninitialized_move_n::__fn{};
} // namespace __cpo

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 316 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_RANGES_UNINITIALIZED_ALGORITHMS_H
# 320 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/ranges_uninitialized_algorithms.h" 3
#endif /* ranges_uninitialized_algorithms.h expanded by -frewrite-includes */
# 934 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* raw_storage_iterator.h expanded by -frewrite-includes */
#include <__memory/raw_storage_iterator.h>
#else /* raw_storage_iterator.h expanded by -frewrite-includes */
# 934 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_RAW_STORAGE_ITERATOR_H
#define _LIBCPP___MEMORY_RAW_STORAGE_ITERATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _OutputIterator, class _Tp>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 raw_storage_iterator
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
    : public iterator<output_iterator_tag, void, void, void, void>
#endif
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
{
_LIBCPP_SUPPRESS_DEPRECATED_POP
private:
    _OutputIterator __x_;
public:
    typedef output_iterator_tag iterator_category;
    typedef void                value_type;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
    typedef ptrdiff_t           difference_type;
#else
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
    typedef void                difference_type;
#endif
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
    typedef void                pointer;
    typedef void                reference;

    _LIBCPP_INLINE_VISIBILITY explicit raw_storage_iterator(_OutputIterator __x) : __x_(__x) {}
    _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator*() {return *this;}
    _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator=(const _Tp& __element)
        {::new ((void*)_VSTD::addressof(*__x_)) _Tp(__element); return *this;}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
    _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator=(_Tp&& __element)
        {::new ((void*)_VSTD::addressof(*__x_)) _Tp(_VSTD::move(__element)); return *this;}
#endif
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
    _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator++() {++__x_; return *this;}
    _LIBCPP_INLINE_VISIBILITY raw_storage_iterator  operator++(int)
        {raw_storage_iterator __t(*this); ++__x_; return __t;}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
    _LIBCPP_INLINE_VISIBILITY _OutputIterator base() const { return __x_; }
#endif
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
};

#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR)
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_RAW_STORAGE_ITERATOR_H
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/raw_storage_iterator.h" 3
#endif /* raw_storage_iterator.h expanded by -frewrite-includes */
# 935 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* shared_ptr.h expanded by -frewrite-includes */
#include <__memory/shared_ptr.h>
#else /* shared_ptr.h expanded by -frewrite-includes */
# 935 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_SHARED_PTR_H
#define _LIBCPP___MEMORY_SHARED_PTR_H

#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/compare_three_way.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/binary_function.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/reference_wrapper.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/access.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocation_guard.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* allocator_destructor.h expanded by -frewrite-includes */
#include <__memory/allocator_destructor.h>
#else /* allocator_destructor.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_destructor.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_ALLOCATOR_DESTRUCTOR_H
#define _LIBCPP___MEMORY_ALLOCATOR_DESTRUCTOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_destructor.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_destructor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_destructor.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_destructor.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_destructor.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_destructor.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_destructor.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Alloc>
class __allocator_destructor
{
    typedef _LIBCPP_NODEBUG allocator_traits<_Alloc> __alloc_traits;
public:
    typedef _LIBCPP_NODEBUG typename __alloc_traits::pointer pointer;
    typedef _LIBCPP_NODEBUG typename __alloc_traits::size_type size_type;
private:
    _Alloc& __alloc_;
    size_type __s_;
public:
    _LIBCPP_INLINE_VISIBILITY __allocator_destructor(_Alloc& __a, size_type __s)
             _NOEXCEPT
        : __alloc_(__a), __s_(__s) {}
    _LIBCPP_INLINE_VISIBILITY
    void operator()(pointer __p) _NOEXCEPT
        {__alloc_traits::deallocate(__alloc_, __p, __s_);}
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_ALLOCATOR_DESTRUCTOR_H
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/allocator_destructor.h" 3
#endif /* allocator_destructor.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/auto_ptr.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/compressed_pair.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/construct_at.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/uninitialized_algorithms.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* unique_ptr.h expanded by -frewrite-includes */
#include <__memory/unique_ptr.h>
#else /* unique_ptr.h expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_UNIQUE_PTR_H
#define _LIBCPP___MEMORY_UNIQUE_PTR_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/compare_three_way.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/compare_three_way_result.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/three_way_comparable.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/hash.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h> // __pointer
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/auto_ptr.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/compressed_pair.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/dependent_type.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_array.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_assignable.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_function.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_pointer.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_swappable.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_void.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_extent.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/type_identity.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#endif
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS default_delete {
    static_assert(!is_function<_Tp>::value,
                  "default_delete cannot be instantiated for function types");
#ifndef _LIBCPP_CXX03_LANG
  _LIBCPP_INLINE_VISIBILITY constexpr default_delete() _NOEXCEPT = default;
#else
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
  _LIBCPP_INLINE_VISIBILITY default_delete() {}
#endif
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
  template <class _Up, __enable_if_t<is_convertible<_Up*, _Tp*>::value, int> = 0>
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 default_delete(
      const default_delete<_Up>&) _NOEXCEPT {}

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator()(_Tp* __ptr) const _NOEXCEPT {
    static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
    static_assert(!is_void<_Tp>::value, "cannot delete an incomplete type");
    delete __ptr;
  }
};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS default_delete<_Tp[]> {
private:
  template <class _Up>
  struct _EnableIfConvertible
      : enable_if<is_convertible<_Up(*)[], _Tp(*)[]>::value> {};

public:
#ifndef _LIBCPP_CXX03_LANG
  _LIBCPP_INLINE_VISIBILITY constexpr default_delete() _NOEXCEPT = default;
#else
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
  _LIBCPP_INLINE_VISIBILITY default_delete() {}
#endif
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

  template <class _Up>
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
  default_delete(const default_delete<_Up[]>&, typename _EnableIfConvertible<_Up>::type* = 0) _NOEXCEPT {}

  template <class _Up>
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 typename _EnableIfConvertible<_Up>::type
  operator()(_Up* __ptr) const _NOEXCEPT {
    static_assert(sizeof(_Up) >= 0, "cannot delete an incomplete type");
    delete[] __ptr;
  }
};

template <class _Deleter>
struct __unique_ptr_deleter_sfinae {
  static_assert(!is_reference<_Deleter>::value, "incorrect specialization");
  typedef const _Deleter& __lval_ref_type;
  typedef _Deleter&& __good_rval_ref_type;
  typedef true_type __enable_rval_overload;
};

template <class _Deleter>
struct __unique_ptr_deleter_sfinae<_Deleter const&> {
  typedef const _Deleter& __lval_ref_type;
  typedef const _Deleter&& __bad_rval_ref_type;
  typedef false_type __enable_rval_overload;
};

template <class _Deleter>
struct __unique_ptr_deleter_sfinae<_Deleter&> {
  typedef _Deleter& __lval_ref_type;
  typedef _Deleter&& __bad_rval_ref_type;
  typedef false_type __enable_rval_overload;
};

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 121 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#  define _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI __attribute__((__trivial_abi__))
#else
# 123 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#  define _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI
#endif
# 125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

template <class _Tp, class _Dp = default_delete<_Tp> >
class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
public:
  typedef _Tp element_type;
  typedef _Dp deleter_type;
  typedef _LIBCPP_NODEBUG typename __pointer<_Tp, deleter_type>::type pointer;

  static_assert(!is_rvalue_reference<deleter_type>::value,
                "the specified deleter type cannot be an rvalue reference");

private:
  __compressed_pair<pointer, deleter_type> __ptr_;

  struct __nat { int __for_bool_; };

  typedef _LIBCPP_NODEBUG __unique_ptr_deleter_sfinae<_Dp> _DeleterSFINAE;

  template <bool _Dummy>
  using _LValRefType _LIBCPP_NODEBUG =
      typename __dependent_type<_DeleterSFINAE, _Dummy>::__lval_ref_type;

  template <bool _Dummy>
  using _GoodRValRefType _LIBCPP_NODEBUG =
      typename __dependent_type<_DeleterSFINAE, _Dummy>::__good_rval_ref_type;

  template <bool _Dummy>
  using _BadRValRefType _LIBCPP_NODEBUG =
      typename __dependent_type<_DeleterSFINAE, _Dummy>::__bad_rval_ref_type;

  template <bool _Dummy, class _Deleter = typename __dependent_type<
                             __type_identity<deleter_type>, _Dummy>::type>
  using _EnableIfDeleterDefaultConstructible _LIBCPP_NODEBUG =
      __enable_if_t<is_default_constructible<_Deleter>::value &&
                         !is_pointer<_Deleter>::value>;

  template <class _ArgType>
  using _EnableIfDeleterConstructible _LIBCPP_NODEBUG =
      __enable_if_t<is_constructible<deleter_type, _ArgType>::value>;

  template <class _UPtr, class _Up>
  using _EnableIfMoveConvertible _LIBCPP_NODEBUG = __enable_if_t<
      is_convertible<typename _UPtr::pointer, pointer>::value &&
      !is_array<_Up>::value
  >;

  template <class _UDel>
  using _EnableIfDeleterConvertible _LIBCPP_NODEBUG = __enable_if_t<
      (is_reference<_Dp>::value && is_same<_Dp, _UDel>::value) ||
      (!is_reference<_Dp>::value && is_convertible<_UDel, _Dp>::value)
    >;

  template <class _UDel>
  using _EnableIfDeleterAssignable = __enable_if_t<
      is_assignable<_Dp&, _UDel&&>::value
    >;

public:
  template <bool _Dummy = true,
            class = _EnableIfDeleterDefaultConstructible<_Dummy> >
  _LIBCPP_INLINE_VISIBILITY
  _LIBCPP_CONSTEXPR unique_ptr() _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}

  template <bool _Dummy = true,
            class = _EnableIfDeleterDefaultConstructible<_Dummy> >
  _LIBCPP_INLINE_VISIBILITY
  _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}

  template <bool _Dummy = true, class = _EnableIfDeleterDefaultConstructible<_Dummy> >
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit unique_ptr(pointer __p) _NOEXCEPT
      : __ptr_(__p, __value_init_tag()) {}

  template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_LValRefType<_Dummy> > >
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(pointer __p, _LValRefType<_Dummy> __d) _NOEXCEPT
      : __ptr_(__p, __d) {}

  template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> > >
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
  unique_ptr(pointer __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT : __ptr_(__p, _VSTD::move(__d)) {
    static_assert(!is_reference<deleter_type>::value,
                  "rvalue deleter bound to reference");
  }

  template <bool _Dummy = true,
            class = _EnableIfDeleterConstructible<_BadRValRefType<_Dummy> > >
  _LIBCPP_INLINE_VISIBILITY
  unique_ptr(pointer __p, _BadRValRefType<_Dummy> __d) = delete;

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(unique_ptr&& __u) _NOEXCEPT
      : __ptr_(__u.release(), _VSTD::forward<deleter_type>(__u.get_deleter())) {}

  template <class _Up,
            class _Ep,
            class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
            class = _EnableIfDeleterConvertible<_Ep> >
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
      : __ptr_(__u.release(), _VSTD::forward<_Ep>(__u.get_deleter())) {}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
  template <class _Up, __enable_if_t<is_convertible<_Up*, _Tp*>::value &&
                                     is_same<_Dp, default_delete<_Tp> >::value, int> = 0>
  _LIBCPP_INLINE_VISIBILITY
  unique_ptr(auto_ptr<_Up>&& __p) _NOEXCEPT
      : __ptr_(__p.release(), __value_init_tag()) {}
#endif
# 230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
    reset(__u.release());
    __ptr_.second() = _VSTD::forward<deleter_type>(__u.get_deleter());
    return *this;
  }

  template <class _Up,
            class _Ep,
            class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
            class = _EnableIfDeleterAssignable<_Ep> >
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
    reset(__u.release());
    __ptr_.second() = _VSTD::forward<_Ep>(__u.get_deleter());
    return *this;
  }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 248 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
  template <class _Up, __enable_if_t<is_convertible<_Up*, _Tp*>::value &&
                                     is_same<_Dp, default_delete<_Tp> >::value, int> = 0>
  _LIBCPP_INLINE_VISIBILITY
  unique_ptr&
      operator=(auto_ptr<_Up> __p) {
    reset(__p.release());
    return *this;
  }
#endif
# 257 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

#ifdef _LIBCPP_CXX03_LANG
  unique_ptr(unique_ptr const&) = delete;
  unique_ptr& operator=(unique_ptr const&) = delete;
#endif
# 262 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(nullptr_t) _NOEXCEPT {
    reset();
    return *this;
  }

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 __add_lvalue_reference_t<_Tp> operator*() const {
    return *__ptr_.first();
  }
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 pointer operator->() const _NOEXCEPT {
    return __ptr_.first();
  }
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 pointer get() const _NOEXCEPT { return __ptr_.first(); }
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 deleter_type& get_deleter() _NOEXCEPT {
    return __ptr_.second();
  }
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 const deleter_type& get_deleter() const _NOEXCEPT {
    return __ptr_.second();
  }
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit operator bool() const _NOEXCEPT {
    return __ptr_.first() != nullptr;
  }

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 pointer release() _NOEXCEPT {
    pointer __t = __ptr_.first();
    __ptr_.first() = pointer();
    return __t;
  }

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void reset(pointer __p = pointer()) _NOEXCEPT {
    pointer __tmp = __ptr_.first();
    __ptr_.first() = __p;
    if (__tmp)
      __ptr_.second()(__tmp);
  }

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void swap(unique_ptr& __u) _NOEXCEPT {
    __ptr_.swap(__u.__ptr_);
  }
};


template <class _Tp, class _Dp>
class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp> {
public:
  typedef _Tp element_type;
  typedef _Dp deleter_type;
  typedef typename __pointer<_Tp, deleter_type>::type pointer;

private:
  __compressed_pair<pointer, deleter_type> __ptr_;

  template <class _From>
  struct _CheckArrayPointerConversion : is_same<_From, pointer> {};

  template <class _FromElem>
  struct _CheckArrayPointerConversion<_FromElem*>
      : integral_constant<bool,
          is_same<_FromElem*, pointer>::value ||
            (is_same<pointer, element_type*>::value &&
             is_convertible<_FromElem(*)[], element_type(*)[]>::value)
      >
  {};

  typedef __unique_ptr_deleter_sfinae<_Dp> _DeleterSFINAE;

  template <bool _Dummy>
  using _LValRefType _LIBCPP_NODEBUG =
      typename __dependent_type<_DeleterSFINAE, _Dummy>::__lval_ref_type;

  template <bool _Dummy>
  using _GoodRValRefType _LIBCPP_NODEBUG =
      typename __dependent_type<_DeleterSFINAE, _Dummy>::__good_rval_ref_type;

  template <bool _Dummy>
  using _BadRValRefType _LIBCPP_NODEBUG =
      typename __dependent_type<_DeleterSFINAE, _Dummy>::__bad_rval_ref_type;

  template <bool _Dummy, class _Deleter = typename __dependent_type<
                             __type_identity<deleter_type>, _Dummy>::type>
  using _EnableIfDeleterDefaultConstructible _LIBCPP_NODEBUG =
      __enable_if_t<is_default_constructible<_Deleter>::value &&
                         !is_pointer<_Deleter>::value>;

  template <class _ArgType>
  using _EnableIfDeleterConstructible _LIBCPP_NODEBUG =
      __enable_if_t<is_constructible<deleter_type, _ArgType>::value>;

  template <class _Pp>
  using _EnableIfPointerConvertible _LIBCPP_NODEBUG = __enable_if_t<
      _CheckArrayPointerConversion<_Pp>::value
  >;

  template <class _UPtr, class _Up,
        class _ElemT = typename _UPtr::element_type>
  using _EnableIfMoveConvertible _LIBCPP_NODEBUG = __enable_if_t<
      is_array<_Up>::value &&
      is_same<pointer, element_type*>::value &&
      is_same<typename _UPtr::pointer, _ElemT*>::value &&
      is_convertible<_ElemT(*)[], element_type(*)[]>::value
    >;

  template <class _UDel>
  using _EnableIfDeleterConvertible _LIBCPP_NODEBUG = __enable_if_t<
      (is_reference<_Dp>::value && is_same<_Dp, _UDel>::value) ||
      (!is_reference<_Dp>::value && is_convertible<_UDel, _Dp>::value)
    >;

  template <class _UDel>
  using _EnableIfDeleterAssignable _LIBCPP_NODEBUG = __enable_if_t<
      is_assignable<_Dp&, _UDel&&>::value
    >;

public:
  template <bool _Dummy = true,
            class = _EnableIfDeleterDefaultConstructible<_Dummy> >
  _LIBCPP_INLINE_VISIBILITY
  _LIBCPP_CONSTEXPR unique_ptr() _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}

  template <bool _Dummy = true,
            class = _EnableIfDeleterDefaultConstructible<_Dummy> >
  _LIBCPP_INLINE_VISIBILITY
  _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}

  template <class _Pp,
            bool _Dummy = true,
            class       = _EnableIfDeleterDefaultConstructible<_Dummy>,
            class       = _EnableIfPointerConvertible<_Pp> >
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit unique_ptr(_Pp __p) _NOEXCEPT
      : __ptr_(__p, __value_init_tag()) {}

  template <class _Pp,
            bool _Dummy = true,
            class       = _EnableIfDeleterConstructible<_LValRefType<_Dummy> >,
            class       = _EnableIfPointerConvertible<_Pp> >
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(_Pp __p, _LValRefType<_Dummy> __d) _NOEXCEPT
      : __ptr_(__p, __d) {}

  template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_LValRefType<_Dummy> > >
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(nullptr_t, _LValRefType<_Dummy> __d) _NOEXCEPT
      : __ptr_(nullptr, __d) {}

  template <class _Pp,
            bool _Dummy = true,
            class       = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> >,
            class       = _EnableIfPointerConvertible<_Pp> >
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(_Pp __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT
      : __ptr_(__p, _VSTD::move(__d)) {
    static_assert(!is_reference<deleter_type>::value,
                  "rvalue deleter bound to reference");
  }

  template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> > >
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(nullptr_t, _GoodRValRefType<_Dummy> __d) _NOEXCEPT
      : __ptr_(nullptr, _VSTD::move(__d)) {
    static_assert(!is_reference<deleter_type>::value,
                  "rvalue deleter bound to reference");
  }

  template <class _Pp, bool _Dummy = true,
            class = _EnableIfDeleterConstructible<_BadRValRefType<_Dummy> >,
            class = _EnableIfPointerConvertible<_Pp> >
  _LIBCPP_INLINE_VISIBILITY
  unique_ptr(_Pp __p, _BadRValRefType<_Dummy> __d) = delete;

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(unique_ptr&& __u) _NOEXCEPT
      : __ptr_(__u.release(), _VSTD::forward<deleter_type>(__u.get_deleter())) {}

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
    reset(__u.release());
    __ptr_.second() = _VSTD::forward<deleter_type>(__u.get_deleter());
    return *this;
  }

  template <class _Up,
            class _Ep,
            class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
            class = _EnableIfDeleterConvertible<_Ep> >
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
      : __ptr_(__u.release(), _VSTD::forward<_Ep>(__u.get_deleter())) {}

  template <class _Up,
            class _Ep,
            class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
            class = _EnableIfDeleterAssignable<_Ep> >
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
    reset(__u.release());
    __ptr_.second() = _VSTD::forward<_Ep>(__u.get_deleter());
    return *this;
  }

#ifdef _LIBCPP_CXX03_LANG
  unique_ptr(unique_ptr const&) = delete;
  unique_ptr& operator=(unique_ptr const&) = delete;
#endif
# 459 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
public:
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(nullptr_t) _NOEXCEPT {
    reset();
    return *this;
  }

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 __add_lvalue_reference_t<_Tp>
  operator[](size_t __i) const {
    return __ptr_.first()[__i];
  }
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 pointer get() const _NOEXCEPT { return __ptr_.first(); }

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 deleter_type& get_deleter() _NOEXCEPT {
    return __ptr_.second();
  }

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 const deleter_type& get_deleter() const _NOEXCEPT {
    return __ptr_.second();
  }
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit operator bool() const _NOEXCEPT {
    return __ptr_.first() != nullptr;
  }

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 pointer release() _NOEXCEPT {
    pointer __t = __ptr_.first();
    __ptr_.first() = pointer();
    return __t;
  }

  template <class _Pp, __enable_if_t<_CheckArrayPointerConversion<_Pp>::value, int> = 0>
  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
  void reset(_Pp __p) _NOEXCEPT {
    pointer __tmp = __ptr_.first();
    __ptr_.first() = __p;
    if (__tmp)
      __ptr_.second()(__tmp);
  }

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void reset(nullptr_t = nullptr) _NOEXCEPT {
    pointer __tmp = __ptr_.first();
    __ptr_.first() = nullptr;
    if (__tmp)
      __ptr_.second()(__tmp);
  }

  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void swap(unique_ptr& __u) _NOEXCEPT {
    __ptr_.swap(__u.__ptr_);
  }
};

template <class _Tp, class _Dp, __enable_if_t<__is_swappable<_Dp>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    void
    swap(unique_ptr<_Tp, _Dp>& __x, unique_ptr<_Tp, _Dp>& __y) _NOEXCEPT {
  __x.swap(__y);
}

template <class _T1, class _D1, class _T2, class _D2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
operator==(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {
  return __x.get() == __y.get();
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 525 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
template <class _T1, class _D1, class _T2, class _D2>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return !(__x == __y);}
#endif
# 530 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

template <class _T1, class _D1, class _T2, class _D2>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator< (const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y)
{
    typedef typename unique_ptr<_T1, _D1>::pointer _P1;
    typedef typename unique_ptr<_T2, _D2>::pointer _P2;
    typedef typename common_type<_P1, _P2>::type _Vp;
    return less<_Vp>()(__x.get(), __y.get());
}

template <class _T1, class _D1, class _T2, class _D2>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator> (const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return __y < __x;}

template <class _T1, class _D1, class _T2, class _D2>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<=(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return !(__y < __x);}

template <class _T1, class _D1, class _T2, class _D2>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator>=(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return !(__x < __y);}


#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 559 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
template <class _T1, class _D1, class _T2, class _D2>
requires three_way_comparable_with<typename unique_ptr<_T1, _D1>::pointer,
                                   typename unique_ptr<_T2, _D2>::pointer>
_LIBCPP_HIDE_FROM_ABI
compare_three_way_result_t<typename unique_ptr<_T1, _D1>::pointer,
                           typename unique_ptr<_T2, _D2>::pointer>
operator<=>(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {
   return compare_three_way()(__x.get(), __y.get());
}
#endif
# 569 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

template <class _T1, class _D1>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
operator==(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT {
  return !__x;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 577 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
template <class _T1, class _D1>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(nullptr_t, const unique_ptr<_T1, _D1>& __x) _NOEXCEPT
{
    return !__x;
}

template <class _T1, class _D1>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT
{
    return static_cast<bool>(__x);
}

template <class _T1, class _D1>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(nullptr_t, const unique_ptr<_T1, _D1>& __x) _NOEXCEPT
{
    return static_cast<bool>(__x);
}
#endif // _LIBCPP_STD_VER <= 17
# 601 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

template <class _T1, class _D1>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
operator<(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
  typedef typename unique_ptr<_T1, _D1>::pointer _P1;
  return less<_P1>()(__x.get(), nullptr);
}

template <class _T1, class _D1>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
operator<(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
  typedef typename unique_ptr<_T1, _D1>::pointer _P1;
  return less<_P1>()(nullptr, __x.get());
}

template <class _T1, class _D1>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
operator>(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
  return nullptr < __x;
}

template <class _T1, class _D1>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
operator>(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
  return __x < nullptr;
}

template <class _T1, class _D1>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
operator<=(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
  return !(nullptr < __x);
}

template <class _T1, class _D1>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
operator<=(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
  return !(__x < nullptr);
}

template <class _T1, class _D1>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
operator>=(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
  return !(__x < nullptr);
}

template <class _T1, class _D1>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
operator>=(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
  return !(nullptr < __x);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 653 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
template <class _T1, class _D1>
  requires three_way_comparable<
      typename unique_ptr<_T1, _D1>::pointer> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
      compare_three_way_result_t<typename unique_ptr<_T1, _D1>::pointer>
operator<=>(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
   return compare_three_way()(__x.get(), static_cast<typename unique_ptr<_T1, _D1>::pointer>(nullptr));
}
#endif
# 661 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 663 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

template<class _Tp>
struct __unique_if
{
    typedef unique_ptr<_Tp> __unique_single;
};

template<class _Tp>
struct __unique_if<_Tp[]>
{
    typedef unique_ptr<_Tp[]> __unique_array_unknown_bound;
};

template<class _Tp, size_t _Np>
struct __unique_if<_Tp[_Np]>
{
    typedef void __unique_array_known_bound;
};

template <class _Tp, class... _Args>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 typename __unique_if<_Tp>::__unique_single
make_unique(_Args&&... __args) {
  return unique_ptr<_Tp>(new _Tp(_VSTD::forward<_Args>(__args)...));
}

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 typename __unique_if<_Tp>::__unique_array_unknown_bound
make_unique(size_t __n) {
  typedef __remove_extent_t<_Tp> _Up;
  return unique_ptr<_Tp>(new _Up[__n]());
}

template<class _Tp, class... _Args>
    typename __unique_if<_Tp>::__unique_array_known_bound
    make_unique(_Args&&...) = delete;

#endif // _LIBCPP_STD_VER >= 14
# 700 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 702 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 typename __unique_if<_Tp>::__unique_single
make_unique_for_overwrite() {
  return unique_ptr<_Tp>(new _Tp);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 typename __unique_if<_Tp>::__unique_array_unknown_bound
make_unique_for_overwrite(size_t __n) {
  return unique_ptr<_Tp>(new __remove_extent_t<_Tp>[__n]);
}

template<class _Tp, class... _Args>
typename __unique_if<_Tp>::__unique_array_known_bound make_unique_for_overwrite(_Args&&...) = delete;

#endif // _LIBCPP_STD_VER >= 20
# 719 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash;

template <class _Tp, class _Dp>
#ifdef _LIBCPP_CXX03_LANG
struct _LIBCPP_TEMPLATE_VIS hash<unique_ptr<_Tp, _Dp> >
#else
# 726 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
struct _LIBCPP_TEMPLATE_VIS hash<__enable_hash_helper<
    unique_ptr<_Tp, _Dp>, typename unique_ptr<_Tp, _Dp>::pointer> >
#endif
# 729 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 731 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
    _LIBCPP_DEPRECATED_IN_CXX17 typedef unique_ptr<_Tp, _Dp> argument_type;
    _LIBCPP_DEPRECATED_IN_CXX17 typedef size_t               result_type;
#endif
# 734 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3

    _LIBCPP_INLINE_VISIBILITY
    size_t operator()(const unique_ptr<_Tp, _Dp>& __ptr) const
    {
        typedef typename unique_ptr<_Tp, _Dp>::pointer pointer;
        return hash<pointer>()(__ptr.get());
    }
};

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___MEMORY_UNIQUE_PTR_H
# 748 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/unique_ptr.h" 3
#endif /* unique_ptr.h expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conjunction.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/disjunction.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_array.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_bounded_array.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_unbounded_array.h>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/nat.h>
#endif /* expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/negation.h>
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_extent.h>
#endif /* expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__verbose_abort>
#endif /* expanded by -frewrite-includes */
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* typeinfo expanded by -frewrite-includes */
#include <typeinfo>
#else /* typeinfo expanded by -frewrite-includes */
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_TYPEINFO
#define _LIBCPP_TYPEINFO

/*

    typeinfo synopsis

namespace std {

class type_info
{
public:
    virtual ~type_info();

    bool operator==(const type_info& rhs) const noexcept; // constexpr since C++23
    bool operator!=(const type_info& rhs) const noexcept; // removed in C++20

    bool before(const type_info& rhs) const noexcept;
    size_t hash_code() const noexcept;
    const char* name() const noexcept;

    type_info(const type_info& rhs) = delete;
    type_info& operator=(const type_info& rhs) = delete;
};

class bad_cast
    : public exception
{
public:
    bad_cast() noexcept;
    bad_cast(const bad_cast&) noexcept;
    bad_cast& operator=(const bad_cast&) noexcept;
    virtual const char* what() const noexcept;
};

class bad_typeid
    : public exception
{
public:
    bad_typeid() noexcept;
    bad_typeid(const bad_typeid&) noexcept;
    bad_typeid& operator=(const bad_typeid&) noexcept;
    virtual const char* what() const noexcept;
};

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#if 0 /* expanded by -frewrite-includes */
#include <__exception/exception.h>
#endif /* expanded by -frewrite-includes */
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#if 0 /* expanded by -frewrite-includes */
#include <__verbose_abort>
#endif /* expanded by -frewrite-includes */
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#endif
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_ABI_VCRUNTIME)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#if 0 /* expanded by -frewrite-includes */
#include <vcruntime_typeinfo.h>
#endif /* expanded by -frewrite-includes */
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#else
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3

namespace std  // purposefully not using versioning namespace
{


#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_ABI_MICROSOFT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3

class _LIBCPP_EXPORTED_FROM_ABI type_info
{
    type_info& operator=(const type_info&);
    type_info(const type_info&);

    mutable struct {
      const char *__undecorated_name;
      const char __decorated_name[1];
    } __data;

    int __compare(const type_info &__rhs) const _NOEXCEPT;

public:
    _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE
    virtual ~type_info();

    const char *name() const _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY
    bool before(const type_info& __arg) const _NOEXCEPT {
      return __compare(__arg) < 0;
    }

    size_t hash_code() const _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bool operator==(const type_info& __arg) const _NOEXCEPT {
      // When evaluated in a constant expression, both type infos simply can't come
      // from different translation units, so it is sufficient to compare their addresses.
      if (__libcpp_is_constant_evaluated()) {
        return this == &__arg;
      }
      return __compare(__arg) == 0;
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
    _LIBCPP_INLINE_VISIBILITY
    bool operator!=(const type_info& __arg) const _NOEXCEPT
    { return !operator==(__arg); }
#endif
# 122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
};

#else // !defined(_LIBCPP_ABI_MICROSOFT)
# 125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3

// ========================================================================== //
//                           Implementations
// ========================================================================== //
// ------------------------------------------------------------------------- //
//                               Unique
//               (_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION = 1)
// ------------------------------------------------------------------------- //
// This implementation of type_info assumes a unique copy of the RTTI for a
// given type inside a program. This is a valid assumption when abiding to the
// Itanium ABI (http://itanium-cxx-abi.github.io/cxx-abi/abi.html#vtable-components).
// Under this assumption, we can always compare the addresses of the type names
// to implement equality-comparison of type_infos instead of having to perform
// a deep string comparison.
// -------------------------------------------------------------------------- //
//                             NonUnique
//               (_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION = 2)
// -------------------------------------------------------------------------- //
// This implementation of type_info does not assume there is always a unique
// copy of the RTTI for a given type inside a program. For various reasons
// the linker may have failed to merge every copy of a types RTTI
// (For example: -Bsymbolic or llvm.org/PR37398). Under this assumption, two
// type_infos are equal if their addresses are equal or if a deep string
// comparison is equal.
// -------------------------------------------------------------------------- //
//                          NonUniqueARMRTTIBit
//               (_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION = 3)
// -------------------------------------------------------------------------- //
// This implementation is specific to ARM64 on Apple platforms.
//
// This implementation of type_info does not assume always a unique copy of
// the RTTI for a given type inside a program. When constructing the type_info,
// the compiler packs the pointer to the type name into a uintptr_t and reserves
// the high bit of that pointer, which is assumed to be free for use under that
// ABI. If that high bit is set, that specific copy of the RTTI can't be assumed
// to be unique within the program. If the high bit is unset, then the RTTI can
// be assumed to be unique within the program.
//
// When comparing type_infos, if both RTTIs can be assumed to be unique, it
// suffices to compare their addresses. If both the RTTIs can't be assumed to
// be unique, we must perform a deep string comparison of the type names.
// However, if one of the RTTIs is guaranteed unique and the other one isn't,
// then both RTTIs are necessarily not to be considered equal.
//
// The intent of this design is to remove the need for weak symbols. Specifically,
// if a type would normally have a default-visibility RTTI emitted as a weak
// symbol, it is given hidden visibility instead and the non-unique bit is set.
// Otherwise, types declared with hidden visibility are always considered to have
// a unique RTTI: the RTTI is emitted with linkonce_odr linkage and is assumed
// to be deduplicated by the linker within the linked image. Across linked image
// boundaries, such types are thus considered different types.

// This value can be overriden in the __config_site. When it's not overriden,
// we pick a default implementation based on the platform here.
#ifndef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION

  // Windows and AIX binaries can't merge typeinfos, so use the NonUnique implementation.
#if 0 /* disabled by -frewrite-includes */
# if defined(_LIBCPP_OBJECT_FORMAT_COFF) || defined(_LIBCPP_OBJECT_FORMAT_XCOFF)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 183 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#   define _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION 2

  // On arm64 on Apple platforms, use the special NonUniqueARMRTTIBit implementation.
#if 0 /* disabled by -frewrite-includes */
#if 0
# elif defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 187 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#   define _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION 3

  // On all other platforms, assume the Itanium C++ ABI and use the Unique implementation.
# else
# 191 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#   define _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION 1
# endif
# 193 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#endif
# 194 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3

struct __type_info_implementations {
  struct __string_impl_base {
    typedef const char* __type_name_t;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
    _LIBCPP_CONSTEXPR static const char* __type_name_to_string(__type_name_t __v) _NOEXCEPT {
      return __v;
    }
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
    _LIBCPP_CONSTEXPR static __type_name_t __string_to_type_name(const char* __v) _NOEXCEPT {
      return __v;
    }
  };

  struct __unique_impl : __string_impl_base {
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
    static size_t __hash(__type_name_t __v) _NOEXCEPT {
      return reinterpret_cast<size_t>(__v);
    }
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
    static bool __eq(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
      return __lhs == __rhs;
    }
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
    static bool __lt(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
      return __lhs < __rhs;
    }
  };

  struct __non_unique_impl : __string_impl_base {
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
    static size_t __hash(__type_name_t __ptr) _NOEXCEPT {
      size_t __hash = 5381;
      while (unsigned char __c = static_cast<unsigned char>(*__ptr++))
        __hash = (__hash * 33) ^ __c;
      return __hash;
    }
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
    static bool __eq(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
      return __lhs == __rhs || __builtin_strcmp(__lhs, __rhs) == 0;
    }
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
    static bool __lt(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
      return __builtin_strcmp(__lhs, __rhs) < 0;
    }
  };

  struct __non_unique_arm_rtti_bit_impl {
    typedef uintptr_t __type_name_t;

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
    static const char* __type_name_to_string(__type_name_t __v) _NOEXCEPT {
      return reinterpret_cast<const char*>(__v &
          ~__non_unique_rtti_bit::value);
    }
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
    static __type_name_t __string_to_type_name(const char* __v) _NOEXCEPT {
      return reinterpret_cast<__type_name_t>(__v);
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
    static size_t __hash(__type_name_t __v) _NOEXCEPT {
      if (__is_type_name_unique(__v))
        return __v;
      return __non_unique_impl::__hash(__type_name_to_string(__v));
    }
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
    static bool __eq(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
      if (__lhs == __rhs)
        return true;
      if (__is_type_name_unique(__lhs) || __is_type_name_unique(__rhs))
        // Either both are unique and have a different address, or one of them
        // is unique and the other one isn't. In both cases they are unequal.
        return false;
      return __builtin_strcmp(__type_name_to_string(__lhs), __type_name_to_string(__rhs)) == 0;
    }
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
    static bool __lt(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
      if (__is_type_name_unique(__lhs) || __is_type_name_unique(__rhs))
        return __lhs < __rhs;
      return __builtin_strcmp(__type_name_to_string(__lhs), __type_name_to_string(__rhs)) < 0;
    }

   private:
    // The unique bit is the top bit. It is expected that __type_name_t is 64 bits when
    // this implementation is actually used.
    typedef integral_constant<__type_name_t,
      (1ULL << ((__CHAR_BIT__ * sizeof(__type_name_t)) - 1))> __non_unique_rtti_bit;

    _LIBCPP_INLINE_VISIBILITY
    static bool __is_type_name_unique(__type_name_t __lhs) _NOEXCEPT {
      return !(__lhs & __non_unique_rtti_bit::value);
    }
  };

  typedef
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION == 1
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 291 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
    __unique_impl
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION == 2
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 293 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
    __non_unique_impl
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION == 3
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 295 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
    __non_unique_arm_rtti_bit_impl
#else
# 297 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#   error invalid configuration for _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION
#endif
# 299 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
     __impl;
};

class _LIBCPP_EXPORTED_FROM_ABI type_info
{
  type_info& operator=(const type_info&);
  type_info(const type_info&);

 protected:
    typedef __type_info_implementations::__impl __impl;

    __impl::__type_name_t __type_name;

    _LIBCPP_INLINE_VISIBILITY
    explicit type_info(const char* __n)
      : __type_name(__impl::__string_to_type_name(__n)) {}

public:
    _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE
    virtual ~type_info();

    _LIBCPP_INLINE_VISIBILITY
    const char* name() const _NOEXCEPT
    {
      return __impl::__type_name_to_string(__type_name);
    }

    _LIBCPP_INLINE_VISIBILITY
    bool before(const type_info& __arg) const _NOEXCEPT
    {
      return __impl::__lt(__type_name, __arg.__type_name);
    }

    _LIBCPP_INLINE_VISIBILITY
    size_t hash_code() const _NOEXCEPT
    {
      return __impl::__hash(__type_name);
    }

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bool operator==(const type_info& __arg) const _NOEXCEPT
    {
      // When evaluated in a constant expression, both type infos simply can't come
      // from different translation units, so it is sufficient to compare their addresses.
      if (__libcpp_is_constant_evaluated()) {
        return this == &__arg;
      }
      return __impl::__eq(__type_name, __arg.__type_name);
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 350 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
    _LIBCPP_INLINE_VISIBILITY
    bool operator!=(const type_info& __arg) const _NOEXCEPT
    { return !operator==(__arg); }
#endif
# 354 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
};
#endif // defined(_LIBCPP_ABI_MICROSOFT)
# 356 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3

class _LIBCPP_EXPORTED_FROM_ABI bad_cast
    : public exception
{
 public:
  bad_cast() _NOEXCEPT;
  _LIBCPP_HIDE_FROM_ABI bad_cast(const bad_cast&) _NOEXCEPT = default;
  _LIBCPP_HIDE_FROM_ABI bad_cast& operator=(const bad_cast&) _NOEXCEPT = default;
  ~bad_cast() _NOEXCEPT override;
  const char* what() const _NOEXCEPT override;
};

class _LIBCPP_EXPORTED_FROM_ABI bad_typeid
    : public exception
{
 public:
  bad_typeid() _NOEXCEPT;
  _LIBCPP_HIDE_FROM_ABI bad_typeid(const bad_typeid&) _NOEXCEPT = default;
  _LIBCPP_HIDE_FROM_ABI bad_typeid& operator=(const bad_typeid&) _NOEXCEPT = default;
  ~bad_typeid() _NOEXCEPT override;
  const char* what() const _NOEXCEPT override;
};

} // namespace std

#endif // defined(_LIBCPP_ABI_VCRUNTIME)
# 382 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_ABI_VCRUNTIME) && _HAS_EXCEPTIONS == 0
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 384 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3

namespace std {

class bad_cast : public exception {
public:
  bad_cast() _NOEXCEPT : exception("bad cast") {}

private:
  bad_cast(const char* const __message) _NOEXCEPT : exception(__message) {}
};

class bad_typeid : public exception {
public:
  bad_typeid() _NOEXCEPT : exception("bad typeid") {}

private:
  bad_typeid(const char* const __message) _NOEXCEPT : exception(__message) {}
};

} // namespace std

#endif // defined(_LIBCPP_ABI_VCRUNTIME) && _HAS_EXCEPTIONS == 0
# 406 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3

_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_bad_cast()
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    throw bad_cast();
#else
# 414 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
    _LIBCPP_VERBOSE_ABORT("bad_cast was thrown in -fno-exceptions mode");
#endif
# 416 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
}
_LIBCPP_END_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 420 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 420 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
# 421 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#if 0 /* expanded by -frewrite-includes */
#  include <exception>
#endif /* expanded by -frewrite-includes */
# 421 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
# 422 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 422 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
# 423 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#endif
# 424 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3

#endif // _LIBCPP_TYPEINFO
# 426 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/typeinfo" 3
#endif /* typeinfo expanded by -frewrite-includes */
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 2 3
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* memory_order.h expanded by -frewrite-includes */
#  include <__atomic/memory_order.h>
#else /* memory_order.h expanded by -frewrite-includes */
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/memory_order.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ATOMIC_MEMORY_ORDER_H
#define _LIBCPP___ATOMIC_MEMORY_ORDER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/memory_order.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/memory_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/memory_order.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/memory_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/underlying_type.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/memory_order.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/memory_order.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/memory_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/memory_order.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/memory_order.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Figure out what the underlying type for `memory_order` would be if it were
// declared as an unscoped enum (accounting for -fshort-enums). Use this result
// to pin the underlying type in C++20.
enum __legacy_memory_order {
    __mo_relaxed,
    __mo_consume,
    __mo_acquire,
    __mo_release,
    __mo_acq_rel,
    __mo_seq_cst
};

using __memory_order_underlying_t = underlying_type<__legacy_memory_order>::type;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/memory_order.h" 3

enum class memory_order : __memory_order_underlying_t {
  relaxed = __mo_relaxed,
  consume = __mo_consume,
  acquire = __mo_acquire,
  release = __mo_release,
  acq_rel = __mo_acq_rel,
  seq_cst = __mo_seq_cst
};

static_assert((is_same<underlying_type<memory_order>::type, __memory_order_underlying_t>::value),
  "unexpected underlying type for std::memory_order");

inline constexpr auto memory_order_relaxed = memory_order::relaxed;
inline constexpr auto memory_order_consume = memory_order::consume;
inline constexpr auto memory_order_acquire = memory_order::acquire;
inline constexpr auto memory_order_release = memory_order::release;
inline constexpr auto memory_order_acq_rel = memory_order::acq_rel;
inline constexpr auto memory_order_seq_cst = memory_order::seq_cst;

#else
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/memory_order.h" 3

enum memory_order {
  memory_order_relaxed = __mo_relaxed,
  memory_order_consume = __mo_consume,
  memory_order_acquire = __mo_acquire,
  memory_order_release = __mo_release,
  memory_order_acq_rel = __mo_acq_rel,
  memory_order_seq_cst = __mo_seq_cst,
};

#endif // _LIBCPP_STD_VER >= 20
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/memory_order.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ATOMIC_MEMORY_ORDER_H
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/memory_order.h" 3
#endif /* memory_order.h expanded by -frewrite-includes */
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 2 3
#endif
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#endif
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// NOTE: Relaxed and acq/rel atomics (for increment and decrement respectively)
// should be sufficient for thread safety.
// See https://llvm.org/PR22803
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__) && __has_builtin(__atomic_add_fetch)          \
                       && defined(__ATOMIC_RELAXED)                  \
                       && defined(__ATOMIC_ACQ_REL)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#   define _LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_LIBCPP_COMPILER_GCC)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#   define _LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT
#endif
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template <class _ValueType>
inline _LIBCPP_INLINE_VISIBILITY
_ValueType __libcpp_relaxed_load(_ValueType const* __value) {
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_THREADS) && \
    defined(__ATOMIC_RELAXED) &&        \
    (__has_builtin(__atomic_load_n) || defined(_LIBCPP_COMPILER_GCC))
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    return __atomic_load_n(__value, __ATOMIC_RELAXED);
#else
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    return *__value;
#endif
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
}

template <class _ValueType>
inline _LIBCPP_INLINE_VISIBILITY
_ValueType __libcpp_acquire_load(_ValueType const* __value) {
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_THREADS) && \
    defined(__ATOMIC_ACQUIRE) &&        \
    (__has_builtin(__atomic_load_n) || defined(_LIBCPP_COMPILER_GCC))
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    return __atomic_load_n(__value, __ATOMIC_ACQUIRE);
#else
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    return *__value;
#endif
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
}

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _Tp
__libcpp_atomic_refcount_increment(_Tp& __t) _NOEXCEPT
{
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT) && !defined(_LIBCPP_HAS_NO_THREADS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    return __atomic_add_fetch(&__t, 1, __ATOMIC_RELAXED);
#else
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    return __t += 1;
#endif
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
}

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _Tp
__libcpp_atomic_refcount_decrement(_Tp& __t) _NOEXCEPT
{
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT) && !defined(_LIBCPP_HAS_NO_THREADS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    return __atomic_add_fetch(&__t, -1, __ATOMIC_ACQ_REL);
#else
# 119 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    return __t -= 1;
#endif
# 121 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
}

class _LIBCPP_EXPORTED_FROM_ABI bad_weak_ptr
    : public std::exception
{
public:
    _LIBCPP_HIDE_FROM_ABI bad_weak_ptr() _NOEXCEPT = default;
    _LIBCPP_HIDE_FROM_ABI bad_weak_ptr(const bad_weak_ptr&) _NOEXCEPT = default;
    _LIBCPP_HIDE_FROM_ABI bad_weak_ptr& operator=(const bad_weak_ptr&) _NOEXCEPT = default;
    ~bad_weak_ptr() _NOEXCEPT override;
    const char* what() const  _NOEXCEPT override;
};

_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_bad_weak_ptr()
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    throw bad_weak_ptr();
#else
# 140 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    _LIBCPP_VERBOSE_ABORT("bad_weak_ptr was thrown in -fno-exceptions mode");
#endif
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
}

template<class _Tp> class _LIBCPP_TEMPLATE_VIS weak_ptr;

class _LIBCPP_EXPORTED_FROM_ABI __shared_count
{
    __shared_count(const __shared_count&);
    __shared_count& operator=(const __shared_count&);

protected:
    long __shared_owners_;
    virtual ~__shared_count();
private:
    virtual void __on_zero_shared() _NOEXCEPT = 0;

public:
    _LIBCPP_INLINE_VISIBILITY
    explicit __shared_count(long __refs = 0) _NOEXCEPT
        : __shared_owners_(__refs) {}

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_SHARED_PTR_DEFINE_LEGACY_INLINE_FUNCTIONS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 163 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    void __add_shared() noexcept;
    bool __release_shared() noexcept;
#else
# 166 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    _LIBCPP_INLINE_VISIBILITY
    void __add_shared() _NOEXCEPT {
      __libcpp_atomic_refcount_increment(__shared_owners_);
    }
    _LIBCPP_INLINE_VISIBILITY
    bool __release_shared() _NOEXCEPT {
      if (__libcpp_atomic_refcount_decrement(__shared_owners_) == -1) {
        __on_zero_shared();
        return true;
      }
      return false;
    }
#endif
# 179 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    _LIBCPP_INLINE_VISIBILITY
    long use_count() const _NOEXCEPT {
        return __libcpp_relaxed_load(&__shared_owners_) + 1;
    }
};

class _LIBCPP_EXPORTED_FROM_ABI __shared_weak_count
    : private __shared_count
{
    long __shared_weak_owners_;

public:
    _LIBCPP_INLINE_VISIBILITY
    explicit __shared_weak_count(long __refs = 0) _NOEXCEPT
        : __shared_count(__refs),
          __shared_weak_owners_(__refs) {}
protected:
    ~__shared_weak_count() override;

public:
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_SHARED_PTR_DEFINE_LEGACY_INLINE_FUNCTIONS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 200 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    void __add_shared() noexcept;
    void __add_weak() noexcept;
    void __release_shared() noexcept;
#else
# 204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    _LIBCPP_INLINE_VISIBILITY
    void __add_shared() _NOEXCEPT {
      __shared_count::__add_shared();
    }
    _LIBCPP_INLINE_VISIBILITY
    void __add_weak() _NOEXCEPT {
      __libcpp_atomic_refcount_increment(__shared_weak_owners_);
    }
    _LIBCPP_INLINE_VISIBILITY
    void __release_shared() _NOEXCEPT {
      if (__shared_count::__release_shared())
        __release_weak();
    }
#endif
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    void __release_weak() _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY
    long use_count() const _NOEXCEPT {return __shared_count::use_count();}
    __shared_weak_count* lock() _NOEXCEPT;

    virtual const void* __get_deleter(const type_info&) const _NOEXCEPT;
private:
    virtual void __on_zero_shared_weak() _NOEXCEPT = 0;
};

template <class _Tp, class _Dp, class _Alloc>
class __shared_ptr_pointer
    : public __shared_weak_count
{
    __compressed_pair<__compressed_pair<_Tp, _Dp>, _Alloc> __data_;
public:
    _LIBCPP_INLINE_VISIBILITY
    __shared_ptr_pointer(_Tp __p, _Dp __d, _Alloc __a)
        :  __data_(__compressed_pair<_Tp, _Dp>(__p, _VSTD::move(__d)), _VSTD::move(__a)) {}

#ifndef _LIBCPP_HAS_NO_RTTI
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL const void* __get_deleter(const type_info&) const _NOEXCEPT override;
#endif
# 241 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

private:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL void __on_zero_shared() _NOEXCEPT override;
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL void __on_zero_shared_weak() _NOEXCEPT override;
};

#ifndef _LIBCPP_HAS_NO_RTTI

template <class _Tp, class _Dp, class _Alloc>
const void*
__shared_ptr_pointer<_Tp, _Dp, _Alloc>::__get_deleter(const type_info& __t) const _NOEXCEPT
{
    return __t == typeid(_Dp) ? _VSTD::addressof(__data_.first().second()) : nullptr;
}

#endif // _LIBCPP_HAS_NO_RTTI
# 257 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template <class _Tp, class _Dp, class _Alloc>
void
__shared_ptr_pointer<_Tp, _Dp, _Alloc>::__on_zero_shared() _NOEXCEPT
{
    __data_.first().second()(__data_.first().first());
    __data_.first().second().~_Dp();
}

template <class _Tp, class _Dp, class _Alloc>
void
__shared_ptr_pointer<_Tp, _Dp, _Alloc>::__on_zero_shared_weak() _NOEXCEPT
{
    typedef typename __allocator_traits_rebind<_Alloc, __shared_ptr_pointer>::type _Al;
    typedef allocator_traits<_Al> _ATraits;
    typedef pointer_traits<typename _ATraits::pointer> _PTraits;

    _Al __a(__data_.second());
    __data_.second().~_Alloc();
    __a.deallocate(_PTraits::pointer_to(*this), 1);
}

// This tag is used to instantiate an allocator type. The various shared_ptr control blocks
// detect that the allocator has been instantiated for this type and perform alternative
// initialization/destruction based on that.
struct __for_overwrite_tag {};

template <class _Tp, class _Alloc>
struct __shared_ptr_emplace
    : __shared_weak_count
{
    template <class... _Args, class _Allocator = _Alloc, __enable_if_t<is_same<typename _Allocator::value_type, __for_overwrite_tag>::value, int> = 0>
    _LIBCPP_HIDE_FROM_ABI
    explicit __shared_ptr_emplace(_Alloc __a, _Args&& ...)
        : __storage_(_VSTD::move(__a))
    {
        static_assert(sizeof...(_Args) == 0, "No argument should be provided to the control block when using _for_overwrite");
        ::new ((void*)__get_elem()) _Tp;
    }

    template <class... _Args, class _Allocator = _Alloc, __enable_if_t<!is_same<typename _Allocator::value_type, __for_overwrite_tag>::value, int> = 0>
    _LIBCPP_HIDE_FROM_ABI
    explicit __shared_ptr_emplace(_Alloc __a, _Args&& ...__args)
        : __storage_(_VSTD::move(__a))
    {
        using _TpAlloc = typename __allocator_traits_rebind<_Alloc, _Tp>::type;
        _TpAlloc __tmp(*__get_alloc());
        allocator_traits<_TpAlloc>::construct(__tmp, __get_elem(), _VSTD::forward<_Args>(__args)...);
    }

    _LIBCPP_HIDE_FROM_ABI
    _Alloc* __get_alloc() _NOEXCEPT { return __storage_.__get_alloc(); }

    _LIBCPP_HIDE_FROM_ABI
    _Tp* __get_elem() _NOEXCEPT { return __storage_.__get_elem(); }

private:
    template <class _Allocator = _Alloc, __enable_if_t<is_same<typename _Allocator::value_type, __for_overwrite_tag>::value, int> = 0>
    _LIBCPP_HIDE_FROM_ABI void __on_zero_shared_impl() _NOEXCEPT {
        __get_elem()->~_Tp();
    }

    template <class _Allocator = _Alloc, __enable_if_t<!is_same<typename _Allocator::value_type, __for_overwrite_tag>::value, int> = 0>
    _LIBCPP_HIDE_FROM_ABI void __on_zero_shared_impl() _NOEXCEPT {
        using _TpAlloc = typename __allocator_traits_rebind<_Allocator, _Tp>::type;
        _TpAlloc __tmp(*__get_alloc());
        allocator_traits<_TpAlloc>::destroy(__tmp, __get_elem());
    }

    _LIBCPP_HIDE_FROM_ABI_VIRTUAL void __on_zero_shared() _NOEXCEPT override {
        __on_zero_shared_impl();
    }

    _LIBCPP_HIDE_FROM_ABI_VIRTUAL void __on_zero_shared_weak() _NOEXCEPT override {
        using _ControlBlockAlloc = typename __allocator_traits_rebind<_Alloc, __shared_ptr_emplace>::type;
        using _ControlBlockPointer = typename allocator_traits<_ControlBlockAlloc>::pointer;
        _ControlBlockAlloc __tmp(*__get_alloc());
        __storage_.~_Storage();
        allocator_traits<_ControlBlockAlloc>::deallocate(__tmp,
            pointer_traits<_ControlBlockPointer>::pointer_to(*this), 1);
    }

    // This class implements the control block for non-array shared pointers created
    // through `std::allocate_shared` and `std::make_shared`.
    //
    // In previous versions of the library, we used a compressed pair to store
    // both the _Alloc and the _Tp. This implies using EBO, which is incompatible
    // with Allocator construction for _Tp. To allow implementing P0674 in C++20,
    // we now use a properly aligned char buffer while making sure that we maintain
    // the same layout that we had when we used a compressed pair.
    using _CompressedPair = __compressed_pair<_Alloc, _Tp>;
    struct _ALIGNAS_TYPE(_CompressedPair) _Storage {
        char __blob_[sizeof(_CompressedPair)];

        _LIBCPP_HIDE_FROM_ABI explicit _Storage(_Alloc&& __a) {
            ::new ((void*)__get_alloc()) _Alloc(_VSTD::move(__a));
        }
        _LIBCPP_HIDE_FROM_ABI ~_Storage() {
            __get_alloc()->~_Alloc();
        }
        _LIBCPP_HIDE_FROM_ABI _Alloc* __get_alloc() _NOEXCEPT {
            _CompressedPair *__as_pair = reinterpret_cast<_CompressedPair*>(__blob_);
            typename _CompressedPair::_Base1* __first = _CompressedPair::__get_first_base(__as_pair);
            _Alloc *__alloc = reinterpret_cast<_Alloc*>(__first);
            return __alloc;
        }
        _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI _Tp* __get_elem() _NOEXCEPT {
            _CompressedPair *__as_pair = reinterpret_cast<_CompressedPair*>(__blob_);
            typename _CompressedPair::_Base2* __second = _CompressedPair::__get_second_base(__as_pair);
            _Tp *__elem = reinterpret_cast<_Tp*>(__second);
            return __elem;
        }
    };

    static_assert(_LIBCPP_ALIGNOF(_Storage) == _LIBCPP_ALIGNOF(_CompressedPair), "");
    static_assert(sizeof(_Storage) == sizeof(_CompressedPair), "");
    _Storage __storage_;
};

struct __shared_ptr_dummy_rebind_allocator_type;
template <>
class _LIBCPP_TEMPLATE_VIS allocator<__shared_ptr_dummy_rebind_allocator_type>
{
public:
    template <class _Other>
    struct rebind
    {
        typedef allocator<_Other> other;
    };
};

template<class _Tp> class _LIBCPP_TEMPLATE_VIS enable_shared_from_this;

// http://eel.is/c++draft/util.sharedptr#util.smartptr.shared.general-6
// A pointer type Y* is said to be compatible with a pointer type T*
// when either Y* is convertible to T* or Y is U[N] and T is cv U[].
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 394 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
template <class _Yp, class _Tp>
struct __bounded_convertible_to_unbounded : false_type {};

template <class _Up, std::size_t _Np, class _Tp>
struct __bounded_convertible_to_unbounded<_Up[_Np], _Tp>
        : is_same<__remove_cv_t<_Tp>, _Up[]> {};

template <class _Yp, class _Tp>
struct __compatible_with
    : _Or<
        is_convertible<_Yp*, _Tp*>,
        __bounded_convertible_to_unbounded<_Yp, _Tp>
    > {};
#else
# 408 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
template <class _Yp, class _Tp>
struct __compatible_with
    : is_convertible<_Yp*, _Tp*> {};
#endif // _LIBCPP_STD_VER >= 17
# 412 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

// Constructors that take raw pointers have a different set of "compatible" constraints
// http://eel.is/c++draft/util.sharedptr#util.smartptr.shared.const-9.1
// - If T is an array type, then either T is U[N] and Y(*)[N] is convertible to T*,
//   or T is U[] and Y(*)[] is convertible to T*.
// - If T is not an array type, then Y* is convertible to T*.
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 419 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
template <class _Yp, class _Tp, class = void>
struct __raw_pointer_compatible_with : _And<
        _Not<is_array<_Tp>>,
        is_convertible<_Yp*, _Tp*>
        > {};

template <class _Yp, class _Up, std::size_t _Np>
struct __raw_pointer_compatible_with<_Yp, _Up[_Np], __enable_if_t<
            is_convertible<_Yp(*)[_Np], _Up(*)[_Np]>::value> >
        : true_type {};

template <class _Yp, class _Up>
struct __raw_pointer_compatible_with<_Yp, _Up[], __enable_if_t<
            is_convertible<_Yp(*)[], _Up(*)[]>::value> >
        : true_type {};

#else
# 436 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
template <class _Yp, class _Tp>
struct __raw_pointer_compatible_with
    : is_convertible<_Yp*, _Tp*> {};
#endif // _LIBCPP_STD_VER >= 17
# 440 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3


template <class _Ptr, class = void>
struct __is_deletable : false_type { };
template <class _Ptr>
struct __is_deletable<_Ptr, decltype(delete std::declval<_Ptr>())> : true_type { };

template <class _Ptr, class = void>
struct __is_array_deletable : false_type { };
template <class _Ptr>
struct __is_array_deletable<_Ptr, decltype(delete[] std::declval<_Ptr>())> : true_type { };

template <class _Dp, class _Pt,
    class = decltype(std::declval<_Dp>()(std::declval<_Pt>()))>
true_type __well_formed_deleter_test(int);

template <class, class>
false_type __well_formed_deleter_test(...);

template <class _Dp, class _Pt>
struct __well_formed_deleter : decltype(std::__well_formed_deleter_test<_Dp, _Pt>(0)) {};

template<class _Dp, class _Yp, class _Tp>
struct __shared_ptr_deleter_ctor_reqs
{
    static const bool value = __raw_pointer_compatible_with<_Yp, _Tp>::value &&
                              is_move_constructible<_Dp>::value &&
                              __well_formed_deleter<_Dp, _Yp*>::value;
};

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 471 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#  define _LIBCPP_SHARED_PTR_TRIVIAL_ABI __attribute__((__trivial_abi__))
#else
# 473 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#  define _LIBCPP_SHARED_PTR_TRIVIAL_ABI
#endif
# 475 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template<class _Tp>
class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
{
public:
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 481 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    typedef weak_ptr<_Tp> weak_type;
    typedef remove_extent_t<_Tp> element_type;
#else
# 484 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    typedef _Tp element_type;
#endif
# 486 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

private:
    element_type*      __ptr_;
    __shared_weak_count* __cntrl_;

public:
    _LIBCPP_HIDE_FROM_ABI
    _LIBCPP_CONSTEXPR shared_ptr() _NOEXCEPT
        : __ptr_(nullptr),
          __cntrl_(nullptr)
    { }

    _LIBCPP_HIDE_FROM_ABI
    _LIBCPP_CONSTEXPR shared_ptr(nullptr_t) _NOEXCEPT
        : __ptr_(nullptr),
          __cntrl_(nullptr)
    { }

    template<class _Yp, class = __enable_if_t<
        _And<
            __raw_pointer_compatible_with<_Yp, _Tp>
            // In C++03 we get errors when trying to do SFINAE with the
            // delete operator, so we always pretend that it's deletable.
            // The same happens on GCC.
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_COMPILER_GCC)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 511 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
            , _If<is_array<_Tp>::value, __is_array_deletable<_Yp*>, __is_deletable<_Yp*> >
#endif
# 513 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
        >::value
    > >
    _LIBCPP_HIDE_FROM_ABI explicit shared_ptr(_Yp* __p) : __ptr_(__p) {
        unique_ptr<_Yp> __hold(__p);
        typedef typename __shared_ptr_default_allocator<_Yp>::type _AllocT;
        typedef __shared_ptr_pointer<_Yp*, __shared_ptr_default_delete<_Tp, _Yp>, _AllocT> _CntrlBlk;
        __cntrl_ = new _CntrlBlk(__p, __shared_ptr_default_delete<_Tp, _Yp>(), _AllocT());
        __hold.release();
        __enable_weak_this(__p, __p);
    }

    template<class _Yp, class _Dp, class = __enable_if_t<__shared_ptr_deleter_ctor_reqs<_Dp, _Yp, _Tp>::value> >
    _LIBCPP_HIDE_FROM_ABI
    shared_ptr(_Yp* __p, _Dp __d)
        : __ptr_(__p)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 533 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
            typedef typename __shared_ptr_default_allocator<_Yp>::type _AllocT;
            typedef __shared_ptr_pointer<_Yp*, _Dp, _AllocT> _CntrlBlk;
#ifndef _LIBCPP_CXX03_LANG
            __cntrl_ = new _CntrlBlk(__p, _VSTD::move(__d), _AllocT());
#else
# 538 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
            __cntrl_ = new _CntrlBlk(__p, __d, _AllocT());
#endif // not _LIBCPP_CXX03_LANG
# 540 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
            __enable_weak_this(__p, __p);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __d(__p);
            throw;
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 549 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    }

    template<class _Yp, class _Dp, class _Alloc, class = __enable_if_t<__shared_ptr_deleter_ctor_reqs<_Dp, _Yp, _Tp>::value> >
    _LIBCPP_HIDE_FROM_ABI
    shared_ptr(_Yp* __p, _Dp __d, _Alloc __a)
        : __ptr_(__p)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 560 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
            typedef __shared_ptr_pointer<_Yp*, _Dp, _Alloc> _CntrlBlk;
            typedef typename __allocator_traits_rebind<_Alloc, _CntrlBlk>::type _A2;
            typedef __allocator_destructor<_A2> _D2;
            _A2 __a2(__a);
            unique_ptr<_CntrlBlk, _D2> __hold2(__a2.allocate(1), _D2(__a2, 1));
            ::new ((void*)_VSTD::addressof(*__hold2.get()))
#ifndef _LIBCPP_CXX03_LANG
                _CntrlBlk(__p, _VSTD::move(__d), __a);
#else
# 569 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
                _CntrlBlk(__p, __d, __a);
#endif // not _LIBCPP_CXX03_LANG
# 571 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
            __cntrl_ = _VSTD::addressof(*__hold2.release());
            __enable_weak_this(__p, __p);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __d(__p);
            throw;
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 581 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    }

    template<class _Dp>
    _LIBCPP_HIDE_FROM_ABI
    shared_ptr(nullptr_t __p, _Dp __d)
        : __ptr_(nullptr)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 592 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
            typedef typename __shared_ptr_default_allocator<_Tp>::type _AllocT;
            typedef __shared_ptr_pointer<nullptr_t, _Dp, _AllocT> _CntrlBlk;
#ifndef _LIBCPP_CXX03_LANG
            __cntrl_ = new _CntrlBlk(__p, _VSTD::move(__d), _AllocT());
#else
# 597 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
            __cntrl_ = new _CntrlBlk(__p, __d, _AllocT());
#endif // not _LIBCPP_CXX03_LANG
# 599 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __d(__p);
            throw;
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 607 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    }

    template<class _Dp, class _Alloc>
    _LIBCPP_HIDE_FROM_ABI
    shared_ptr(nullptr_t __p, _Dp __d, _Alloc __a)
        : __ptr_(nullptr)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 618 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
            typedef __shared_ptr_pointer<nullptr_t, _Dp, _Alloc> _CntrlBlk;
            typedef typename __allocator_traits_rebind<_Alloc, _CntrlBlk>::type _A2;
            typedef __allocator_destructor<_A2> _D2;
            _A2 __a2(__a);
            unique_ptr<_CntrlBlk, _D2> __hold2(__a2.allocate(1), _D2(__a2, 1));
            ::new ((void*)_VSTD::addressof(*__hold2.get()))
#ifndef _LIBCPP_CXX03_LANG
                _CntrlBlk(__p, _VSTD::move(__d), __a);
#else
# 627 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
                _CntrlBlk(__p, __d, __a);
#endif // not _LIBCPP_CXX03_LANG
# 629 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
            __cntrl_ = _VSTD::addressof(*__hold2.release());
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __d(__p);
            throw;
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 638 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    }

    template<class _Yp>
    _LIBCPP_HIDE_FROM_ABI
    shared_ptr(const shared_ptr<_Yp>& __r, element_type *__p) _NOEXCEPT
        : __ptr_(__p),
          __cntrl_(__r.__cntrl_)
    {
        if (__cntrl_)
            __cntrl_->__add_shared();
    }

// LWG-2996
// We don't backport because it is an evolutionary change.
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 653 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    template <class _Yp>
    _LIBCPP_HIDE_FROM_ABI shared_ptr(shared_ptr<_Yp>&& __r, element_type* __p) noexcept
        : __ptr_(__p),
          __cntrl_(__r.__cntrl_) {
      __r.__ptr_   = nullptr;
      __r.__cntrl_ = nullptr;
    }
#endif
# 661 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

    _LIBCPP_HIDE_FROM_ABI
    shared_ptr(const shared_ptr& __r) _NOEXCEPT
        : __ptr_(__r.__ptr_),
          __cntrl_(__r.__cntrl_)
    {
        if (__cntrl_)
            __cntrl_->__add_shared();
    }

    template<class _Yp, class = __enable_if_t<__compatible_with<_Yp, _Tp>::value> >
    _LIBCPP_HIDE_FROM_ABI
    shared_ptr(const shared_ptr<_Yp>& __r) _NOEXCEPT
        : __ptr_(__r.__ptr_),
          __cntrl_(__r.__cntrl_)
    {
        if (__cntrl_)
            __cntrl_->__add_shared();
    }

    _LIBCPP_HIDE_FROM_ABI
    shared_ptr(shared_ptr&& __r) _NOEXCEPT
        : __ptr_(__r.__ptr_),
          __cntrl_(__r.__cntrl_)
    {
        __r.__ptr_ = nullptr;
        __r.__cntrl_ = nullptr;
    }

    template<class _Yp, class = __enable_if_t<__compatible_with<_Yp, _Tp>::value> >
    _LIBCPP_HIDE_FROM_ABI
    shared_ptr(shared_ptr<_Yp>&& __r) _NOEXCEPT
        : __ptr_(__r.__ptr_),
          __cntrl_(__r.__cntrl_)
    {
        __r.__ptr_ = nullptr;
        __r.__cntrl_ = nullptr;
    }

    template<class _Yp, class = __enable_if_t<__compatible_with<_Yp, _Tp>::value> >
    _LIBCPP_HIDE_FROM_ABI
    explicit shared_ptr(const weak_ptr<_Yp>& __r)
        : __ptr_(__r.__ptr_),
          __cntrl_(__r.__cntrl_ ? __r.__cntrl_->lock() : __r.__cntrl_)
    {
        if (__cntrl_ == nullptr)
            __throw_bad_weak_ptr();
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 711 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    template<class _Yp, class = __enable_if_t<is_convertible<_Yp*, element_type*>::value> >
    _LIBCPP_HIDE_FROM_ABI
    shared_ptr(auto_ptr<_Yp>&& __r)
        : __ptr_(__r.get())
    {
        typedef __shared_ptr_pointer<_Yp*, default_delete<_Yp>, allocator<_Yp> > _CntrlBlk;
        __cntrl_ = new _CntrlBlk(__r.get(), default_delete<_Yp>(), allocator<_Yp>());
        __enable_weak_this(__r.get(), __r.get());
        __r.release();
    }
#endif
# 722 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

    template <class _Yp, class _Dp, class = __enable_if_t<
        !is_lvalue_reference<_Dp>::value &&
         __compatible_with<_Yp, _Tp>::value &&
         is_convertible<typename unique_ptr<_Yp, _Dp>::pointer, element_type*>::value
    > >
    _LIBCPP_HIDE_FROM_ABI
    shared_ptr(unique_ptr<_Yp, _Dp>&& __r)
        : __ptr_(__r.get())
    {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 733 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
        if (__ptr_ == nullptr)
            __cntrl_ = nullptr;
        else
#endif
# 737 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
        {
            typedef typename __shared_ptr_default_allocator<_Yp>::type _AllocT;
            typedef __shared_ptr_pointer<typename unique_ptr<_Yp, _Dp>::pointer, _Dp, _AllocT> _CntrlBlk;
            __cntrl_ = new _CntrlBlk(__r.get(), std::move(__r.get_deleter()), _AllocT());
            __enable_weak_this(__r.get(), __r.get());
        }
        __r.release();
    }

    template <class _Yp, class _Dp, class = void, class = __enable_if_t<
        is_lvalue_reference<_Dp>::value &&
         __compatible_with<_Yp, _Tp>::value &&
        is_convertible<typename unique_ptr<_Yp, _Dp>::pointer, element_type*>::value
    > >
    _LIBCPP_HIDE_FROM_ABI
    shared_ptr(unique_ptr<_Yp, _Dp>&& __r)
        : __ptr_(__r.get())
    {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 756 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
        if (__ptr_ == nullptr)
            __cntrl_ = nullptr;
        else
#endif
# 760 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
        {
            typedef typename __shared_ptr_default_allocator<_Yp>::type _AllocT;
            typedef __shared_ptr_pointer<typename unique_ptr<_Yp, _Dp>::pointer,
                                        reference_wrapper<__libcpp_remove_reference_t<_Dp> >,
                                        _AllocT> _CntrlBlk;
            __cntrl_ = new _CntrlBlk(__r.get(), _VSTD::ref(__r.get_deleter()), _AllocT());
            __enable_weak_this(__r.get(), __r.get());
        }
        __r.release();
    }

    _LIBCPP_HIDE_FROM_ABI
    ~shared_ptr()
    {
        if (__cntrl_)
            __cntrl_->__release_shared();
    }

    _LIBCPP_HIDE_FROM_ABI
    shared_ptr<_Tp>& operator=(const shared_ptr& __r) _NOEXCEPT
    {
        shared_ptr(__r).swap(*this);
        return *this;
    }

    template<class _Yp, class = __enable_if_t<__compatible_with<_Yp, _Tp>::value> >
    _LIBCPP_HIDE_FROM_ABI
    shared_ptr<_Tp>& operator=(const shared_ptr<_Yp>& __r) _NOEXCEPT
    {
        shared_ptr(__r).swap(*this);
        return *this;
    }

    _LIBCPP_HIDE_FROM_ABI
    shared_ptr<_Tp>& operator=(shared_ptr&& __r) _NOEXCEPT
    {
        shared_ptr(_VSTD::move(__r)).swap(*this);
        return *this;
    }

    template<class _Yp, class = __enable_if_t<__compatible_with<_Yp, _Tp>::value> >
    _LIBCPP_HIDE_FROM_ABI
    shared_ptr<_Tp>& operator=(shared_ptr<_Yp>&& __r)
    {
        shared_ptr(_VSTD::move(__r)).swap(*this);
        return *this;
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 809 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    template<class _Yp, class = __enable_if_t<
        !is_array<_Yp>::value &&
        is_convertible<_Yp*, typename shared_ptr<_Tp>::element_type*>::value
    > >
    _LIBCPP_HIDE_FROM_ABI
    shared_ptr<_Tp>& operator=(auto_ptr<_Yp>&& __r)
    {
        shared_ptr(_VSTD::move(__r)).swap(*this);
        return *this;
    }
#endif
# 820 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

    template <class _Yp, class _Dp, class = __enable_if_t<_And<
        __compatible_with<_Yp, _Tp>,
        is_convertible<typename unique_ptr<_Yp, _Dp>::pointer, element_type*>
    >::value> >
    _LIBCPP_HIDE_FROM_ABI
    shared_ptr<_Tp>& operator=(unique_ptr<_Yp, _Dp>&& __r)
    {
        shared_ptr(_VSTD::move(__r)).swap(*this);
        return *this;
    }

    _LIBCPP_HIDE_FROM_ABI
    void swap(shared_ptr& __r) _NOEXCEPT
    {
        _VSTD::swap(__ptr_, __r.__ptr_);
        _VSTD::swap(__cntrl_, __r.__cntrl_);
    }

    _LIBCPP_HIDE_FROM_ABI
    void reset() _NOEXCEPT
    {
        shared_ptr().swap(*this);
    }

    template<class _Yp, class = __enable_if_t<
        __raw_pointer_compatible_with<_Yp, _Tp>::value
    > >
    _LIBCPP_HIDE_FROM_ABI
    void reset(_Yp* __p)
    {
        shared_ptr(__p).swap(*this);
    }

    template<class _Yp, class _Dp, class = __enable_if_t<
        __shared_ptr_deleter_ctor_reqs<_Dp, _Yp, _Tp>::value> >
    _LIBCPP_HIDE_FROM_ABI
    void reset(_Yp* __p, _Dp __d)
    {
        shared_ptr(__p, __d).swap(*this);
    }

    template<class _Yp, class _Dp, class _Alloc, class = __enable_if_t<
        __shared_ptr_deleter_ctor_reqs<_Dp, _Yp, _Tp>::value> >
    _LIBCPP_HIDE_FROM_ABI
    void reset(_Yp* __p, _Dp __d, _Alloc __a)
    {
        shared_ptr(__p, __d, __a).swap(*this);
    }

    _LIBCPP_HIDE_FROM_ABI
    element_type* get() const _NOEXCEPT
    {
        return __ptr_;
    }

    _LIBCPP_HIDE_FROM_ABI
    __add_lvalue_reference_t<element_type> operator*() const _NOEXCEPT
    {
        return *__ptr_;
    }

    _LIBCPP_HIDE_FROM_ABI
    element_type* operator->() const _NOEXCEPT
    {
        static_assert(!is_array<_Tp>::value,
                      "std::shared_ptr<T>::operator-> is only valid when T is not an array type.");
        return __ptr_;
    }

    _LIBCPP_HIDE_FROM_ABI
    long use_count() const _NOEXCEPT
    {
        return __cntrl_ ? __cntrl_->use_count() : 0;
    }

    _LIBCPP_HIDE_FROM_ABI
    bool unique() const _NOEXCEPT
    {
        return use_count() == 1;
    }

    _LIBCPP_HIDE_FROM_ABI
    explicit operator bool() const _NOEXCEPT
    {
        return get() != nullptr;
    }

    template <class _Up>
    _LIBCPP_HIDE_FROM_ABI
    bool owner_before(shared_ptr<_Up> const& __p) const _NOEXCEPT
    {
        return __cntrl_ < __p.__cntrl_;
    }

    template <class _Up>
    _LIBCPP_HIDE_FROM_ABI
    bool owner_before(weak_ptr<_Up> const& __p) const _NOEXCEPT
    {
        return __cntrl_ < __p.__cntrl_;
    }

    _LIBCPP_HIDE_FROM_ABI
    bool __owner_equivalent(const shared_ptr& __p) const
    {
        return __cntrl_ == __p.__cntrl_;
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 929 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    _LIBCPP_HIDE_FROM_ABI
    __add_lvalue_reference_t<element_type> operator[](ptrdiff_t __i) const
    {
            static_assert(is_array<_Tp>::value,
                          "std::shared_ptr<T>::operator[] is only valid when T is an array type.");
            return __ptr_[__i];
    }
#endif
# 937 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

#ifndef _LIBCPP_HAS_NO_RTTI
    template <class _Dp>
    _LIBCPP_HIDE_FROM_ABI
    _Dp* __get_deleter() const _NOEXCEPT
    {
        return static_cast<_Dp*>(__cntrl_
                    ? const_cast<void *>(__cntrl_->__get_deleter(typeid(_Dp)))
                      : nullptr);
    }
#endif // _LIBCPP_HAS_NO_RTTI
# 948 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

    template<class _Yp, class _CntrlBlk>
    _LIBCPP_HIDE_FROM_ABI
    static shared_ptr<_Tp> __create_with_control_block(_Yp* __p, _CntrlBlk* __cntrl) _NOEXCEPT
    {
        shared_ptr<_Tp> __r;
        __r.__ptr_ = __p;
        __r.__cntrl_ = __cntrl;
        __r.__enable_weak_this(__r.__ptr_, __r.__ptr_);
        return __r;
    }

private:
    template <class _Yp, bool = is_function<_Yp>::value>
    struct __shared_ptr_default_allocator
    {
        typedef allocator<_Yp> type;
    };

    template <class _Yp>
    struct __shared_ptr_default_allocator<_Yp, true>
    {
        typedef allocator<__shared_ptr_dummy_rebind_allocator_type> type;
    };

    template <class _Yp, class _OrigPtr, class = __enable_if_t<
        is_convertible<_OrigPtr*, const enable_shared_from_this<_Yp>*>::value
    > >
    _LIBCPP_HIDE_FROM_ABI
    void __enable_weak_this(const enable_shared_from_this<_Yp>* __e, _OrigPtr* __ptr) _NOEXCEPT
    {
        typedef __remove_cv_t<_Yp> _RawYp;
        if (__e && __e->__weak_this_.expired())
        {
            __e->__weak_this_ = shared_ptr<_RawYp>(*this,
                const_cast<_RawYp*>(static_cast<const _Yp*>(__ptr)));
        }
    }

    _LIBCPP_HIDE_FROM_ABI void __enable_weak_this(...) _NOEXCEPT { }

    template <class, class _Yp>
    struct __shared_ptr_default_delete
        : default_delete<_Yp>
    { };

    template <class _Yp, class _Un, size_t _Sz>
    struct __shared_ptr_default_delete<_Yp[_Sz], _Un>
        : default_delete<_Yp[]>
    { };

    template <class _Yp, class _Un>
    struct __shared_ptr_default_delete<_Yp[], _Un>
        : default_delete<_Yp[]>
    { };

    template <class _Up> friend class _LIBCPP_TEMPLATE_VIS shared_ptr;
    template <class _Up> friend class _LIBCPP_TEMPLATE_VIS weak_ptr;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1009 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
template<class _Tp>
shared_ptr(weak_ptr<_Tp>) -> shared_ptr<_Tp>;
template<class _Tp, class _Dp>
shared_ptr(unique_ptr<_Tp, _Dp>) -> shared_ptr<_Tp>;
#endif
# 1014 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

//
// std::allocate_shared and std::make_shared
//
template<class _Tp, class _Alloc, class ..._Args, class = __enable_if_t<!is_array<_Tp>::value> >
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> allocate_shared(const _Alloc& __a, _Args&& ...__args)
{
    using _ControlBlock = __shared_ptr_emplace<_Tp, _Alloc>;
    using _ControlBlockAllocator = typename __allocator_traits_rebind<_Alloc, _ControlBlock>::type;
    __allocation_guard<_ControlBlockAllocator> __guard(__a, 1);
    ::new ((void*)_VSTD::addressof(*__guard.__get())) _ControlBlock(__a, _VSTD::forward<_Args>(__args)...);
    auto __control_block = __guard.__release_ptr();
    return shared_ptr<_Tp>::__create_with_control_block((*__control_block).__get_elem(), _VSTD::addressof(*__control_block));
}

template<class _Tp, class ..._Args, class = __enable_if_t<!is_array<_Tp>::value> >
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> make_shared(_Args&& ...__args)
{
    return _VSTD::allocate_shared<_Tp>(allocator<_Tp>(), _VSTD::forward<_Args>(__args)...);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1038 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template<class _Tp, class _Alloc, __enable_if_t<!is_array<_Tp>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> allocate_shared_for_overwrite(const _Alloc& __a)
{
    using _ForOverwriteAllocator = __allocator_traits_rebind_t<_Alloc, __for_overwrite_tag>;
    _ForOverwriteAllocator __alloc(__a);
    return std::allocate_shared<_Tp>(__alloc);
}

template<class _Tp, __enable_if_t<!is_array<_Tp>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> make_shared_for_overwrite()
{
    return std::allocate_shared_for_overwrite<_Tp>(allocator<_Tp>());
}

#endif // _LIBCPP_STD_VER >= 20
# 1056 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1058 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template <size_t _Alignment>
struct __sp_aligned_storage {
    alignas(_Alignment) char __storage[_Alignment];
};

template <class _Tp, class _Alloc>
struct __unbounded_array_control_block;

template <class _Tp, class _Alloc>
struct __unbounded_array_control_block<_Tp[], _Alloc> : __shared_weak_count
{
    _LIBCPP_HIDE_FROM_ABI constexpr
    _Tp* __get_data() noexcept { return __data_; }

    _LIBCPP_HIDE_FROM_ABI
    explicit __unbounded_array_control_block(_Alloc const& __alloc, size_t __count, _Tp const& __arg)
        : __alloc_(__alloc), __count_(__count)
    {
        std::__uninitialized_allocator_fill_n_multidimensional(__alloc_, std::begin(__data_), __count_, __arg);
    }

    _LIBCPP_HIDE_FROM_ABI
    explicit __unbounded_array_control_block(_Alloc const& __alloc, size_t __count)
        : __alloc_(__alloc), __count_(__count)
    {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1085 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
        if constexpr (is_same_v<typename _Alloc::value_type, __for_overwrite_tag>) {
            // We are purposefully not using an allocator-aware default construction because the spec says so.
            // There's currently no way of expressing default initialization in an allocator-aware manner anyway.
            std::uninitialized_default_construct_n(std::begin(__data_), __count_);
        } else {
            std::__uninitialized_allocator_value_construct_n_multidimensional(__alloc_, std::begin(__data_), __count_);
        }
#else
# 1093 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
        std::__uninitialized_allocator_value_construct_n_multidimensional(__alloc_, std::begin(__data_), __count_);
#endif
# 1095 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    }

    // Returns the number of bytes required to store a control block followed by the given number
    // of elements of _Tp, with the whole storage being aligned to a multiple of _Tp's alignment.
    _LIBCPP_HIDE_FROM_ABI
    static constexpr size_t __bytes_for(size_t __elements) {
        // When there's 0 elements, the control block alone is enough since it holds one element.
        // Otherwise, we allocate one fewer element than requested because the control block already
        // holds one. Also, we use the bitwise formula below to ensure that we allocate enough bytes
        // for the whole allocation to be a multiple of _Tp's alignment. That formula is taken from [1].
        //
        // [1]: https://en.wikipedia.org/wiki/Data_structure_alignment#Computing_padding
        size_t __bytes = __elements == 0 ? sizeof(__unbounded_array_control_block)
                                         : (__elements - 1) * sizeof(_Tp) + sizeof(__unbounded_array_control_block);
        constexpr size_t __align = alignof(_Tp);
        return (__bytes + __align - 1) & ~(__align - 1);
    }

    _LIBCPP_HIDE_FROM_ABI_VIRTUAL
    ~__unbounded_array_control_block() override { } // can't be `= default` because of the sometimes-non-trivial union member __data_

private:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL void __on_zero_shared() _NOEXCEPT override {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1119 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
        if constexpr (is_same_v<typename _Alloc::value_type, __for_overwrite_tag>) {
            std::__reverse_destroy(__data_, __data_ + __count_);
        } else {
            __allocator_traits_rebind_t<_Alloc, _Tp> __value_alloc(__alloc_);
            std::__allocator_destroy_multidimensional(__value_alloc, __data_, __data_ + __count_);
        }
#else
# 1126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
        __allocator_traits_rebind_t<_Alloc, _Tp> __value_alloc(__alloc_);
        std::__allocator_destroy_multidimensional(__value_alloc, __data_, __data_ + __count_);
#endif
# 1129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    }

    _LIBCPP_HIDE_FROM_ABI_VIRTUAL void __on_zero_shared_weak() _NOEXCEPT override {
        using _AlignedStorage = __sp_aligned_storage<alignof(__unbounded_array_control_block)>;
        using _StorageAlloc = __allocator_traits_rebind_t<_Alloc, _AlignedStorage>;
        using _PointerTraits = pointer_traits<typename allocator_traits<_StorageAlloc>::pointer>;

        _StorageAlloc __tmp(__alloc_);
        __alloc_.~_Alloc();
        size_t __size = __unbounded_array_control_block::__bytes_for(__count_);
        _AlignedStorage* __storage = reinterpret_cast<_AlignedStorage*>(this);
        allocator_traits<_StorageAlloc>::deallocate(
            __tmp, _PointerTraits::pointer_to(*__storage), __size / sizeof(_AlignedStorage));
    }

    _LIBCPP_NO_UNIQUE_ADDRESS _Alloc __alloc_;
    size_t __count_;
    union {
        _Tp __data_[1];
    };
};

template<class _Array, class _Alloc, class... _Arg>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Array> __allocate_shared_unbounded_array(const _Alloc& __a, size_t __n, _Arg&& ...__arg)
{
    static_assert(__libcpp_is_unbounded_array<_Array>::value);
    // We compute the number of bytes necessary to hold the control block and the
    // array elements. Then, we allocate an array of properly-aligned dummy structs
    // large enough to hold the control block and array. This allows shifting the
    // burden of aligning memory properly from us to the allocator.
    using _ControlBlock = __unbounded_array_control_block<_Array, _Alloc>;
    using _AlignedStorage = __sp_aligned_storage<alignof(_ControlBlock)>;
    using _StorageAlloc = __allocator_traits_rebind_t<_Alloc, _AlignedStorage>;
    __allocation_guard<_StorageAlloc> __guard(__a, _ControlBlock::__bytes_for(__n) / sizeof(_AlignedStorage));
    _ControlBlock* __control_block = reinterpret_cast<_ControlBlock*>(std::addressof(*__guard.__get()));
    std::__construct_at(__control_block, __a, __n, std::forward<_Arg>(__arg)...);
    __guard.__release_ptr();
    return shared_ptr<_Array>::__create_with_control_block(__control_block->__get_data(), __control_block);
}

template <class _Tp, class _Alloc>
struct __bounded_array_control_block;

template <class _Tp, size_t _Count, class _Alloc>
struct __bounded_array_control_block<_Tp[_Count], _Alloc>
    : __shared_weak_count
{
    _LIBCPP_HIDE_FROM_ABI constexpr
    _Tp* __get_data() noexcept { return __data_; }

    _LIBCPP_HIDE_FROM_ABI
    explicit __bounded_array_control_block(_Alloc const& __alloc, _Tp const& __arg) : __alloc_(__alloc) {
        std::__uninitialized_allocator_fill_n_multidimensional(__alloc_, std::addressof(__data_[0]), _Count, __arg);
    }

    _LIBCPP_HIDE_FROM_ABI
    explicit __bounded_array_control_block(_Alloc const& __alloc) : __alloc_(__alloc) {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1188 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
        if constexpr (is_same_v<typename _Alloc::value_type, __for_overwrite_tag>) {
            // We are purposefully not using an allocator-aware default construction because the spec says so.
            // There's currently no way of expressing default initialization in an allocator-aware manner anyway.
            std::uninitialized_default_construct_n(std::addressof(__data_[0]), _Count);
        } else {
            std::__uninitialized_allocator_value_construct_n_multidimensional(__alloc_, std::addressof(__data_[0]), _Count);
        }
#else
# 1196 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
        std::__uninitialized_allocator_value_construct_n_multidimensional(__alloc_, std::addressof(__data_[0]), _Count);
#endif
# 1198 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    }

    _LIBCPP_HIDE_FROM_ABI_VIRTUAL
    ~__bounded_array_control_block() override { } // can't be `= default` because of the sometimes-non-trivial union member __data_

private:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL void __on_zero_shared() _NOEXCEPT override {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
        if constexpr (is_same_v<typename _Alloc::value_type, __for_overwrite_tag>) {
            std::__reverse_destroy(__data_, __data_ + _Count);
        } else {
            __allocator_traits_rebind_t<_Alloc, _Tp> __value_alloc(__alloc_);
            std::__allocator_destroy_multidimensional(__value_alloc, __data_, __data_ + _Count);
        }
#else
# 1213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
        __allocator_traits_rebind_t<_Alloc, _Tp> __value_alloc(__alloc_);
        std::__allocator_destroy_multidimensional(__value_alloc, __data_, __data_ + _Count);
#endif
# 1216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    }

    _LIBCPP_HIDE_FROM_ABI_VIRTUAL void __on_zero_shared_weak() _NOEXCEPT override {
        using _ControlBlockAlloc = __allocator_traits_rebind_t<_Alloc, __bounded_array_control_block>;
        using _PointerTraits = pointer_traits<typename allocator_traits<_ControlBlockAlloc>::pointer>;

        _ControlBlockAlloc __tmp(__alloc_);
        __alloc_.~_Alloc();
        allocator_traits<_ControlBlockAlloc>::deallocate(__tmp, _PointerTraits::pointer_to(*this), 1);
    }

    _LIBCPP_NO_UNIQUE_ADDRESS _Alloc __alloc_;
    union {
        _Tp __data_[_Count];
    };
};

template<class _Array, class _Alloc, class... _Arg>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Array> __allocate_shared_bounded_array(const _Alloc& __a, _Arg&& ...__arg)
{
    static_assert(__libcpp_is_bounded_array<_Array>::value);
    using _ControlBlock = __bounded_array_control_block<_Array, _Alloc>;
    using _ControlBlockAlloc = __allocator_traits_rebind_t<_Alloc, _ControlBlock>;

    __allocation_guard<_ControlBlockAlloc> __guard(__a, 1);
    _ControlBlock* __control_block = reinterpret_cast<_ControlBlock*>(std::addressof(*__guard.__get()));
    std::__construct_at(__control_block, __a, std::forward<_Arg>(__arg)...);
    __guard.__release_ptr();
    return shared_ptr<_Array>::__create_with_control_block(__control_block->__get_data(), __control_block);
}

#endif // _LIBCPP_STD_VER >= 17
# 1249 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1251 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

// bounded array variants
template<class _Tp, class _Alloc, class = __enable_if_t<is_bounded_array<_Tp>::value>>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> allocate_shared(const _Alloc& __a)
{
    return std::__allocate_shared_bounded_array<_Tp>(__a);
}

template<class _Tp, class _Alloc, class = __enable_if_t<is_bounded_array<_Tp>::value>>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> allocate_shared(const _Alloc& __a, const remove_extent_t<_Tp>& __u)
{
    return std::__allocate_shared_bounded_array<_Tp>(__a, __u);
}

template<class _Tp, class _Alloc, __enable_if_t<is_bounded_array<_Tp>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> allocate_shared_for_overwrite(const _Alloc& __a)
{
    using _ForOverwriteAllocator = __allocator_traits_rebind_t<_Alloc, __for_overwrite_tag>;
    _ForOverwriteAllocator __alloc(__a);
    return std::__allocate_shared_bounded_array<_Tp>(__alloc);
}

template<class _Tp, class = __enable_if_t<is_bounded_array<_Tp>::value>>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> make_shared()
{
    return std::__allocate_shared_bounded_array<_Tp>(allocator<_Tp>());
}

template<class _Tp, class = __enable_if_t<is_bounded_array<_Tp>::value>>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> make_shared(const remove_extent_t<_Tp>& __u)
{
    return std::__allocate_shared_bounded_array<_Tp>(allocator<_Tp>(), __u);
}

template<class _Tp, __enable_if_t<is_bounded_array<_Tp>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> make_shared_for_overwrite()
{
    return std::__allocate_shared_bounded_array<_Tp>(allocator<__for_overwrite_tag>());
}

// unbounded array variants
template<class _Tp, class _Alloc, class = __enable_if_t<is_unbounded_array<_Tp>::value>>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> allocate_shared(const _Alloc& __a, size_t __n)
{
    return std::__allocate_shared_unbounded_array<_Tp>(__a, __n);
}

template<class _Tp, class _Alloc, class = __enable_if_t<is_unbounded_array<_Tp>::value>>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> allocate_shared(const _Alloc& __a, size_t __n, const remove_extent_t<_Tp>& __u)
{
    return std::__allocate_shared_unbounded_array<_Tp>(__a, __n, __u);
}

template<class _Tp, class _Alloc, __enable_if_t<is_unbounded_array<_Tp>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> allocate_shared_for_overwrite(const _Alloc& __a, size_t __n)
{
    using _ForOverwriteAllocator = __allocator_traits_rebind_t<_Alloc, __for_overwrite_tag>;
    _ForOverwriteAllocator __alloc(__a);
    return std::__allocate_shared_unbounded_array<_Tp>(__alloc, __n);
}

template<class _Tp, class = __enable_if_t<is_unbounded_array<_Tp>::value>>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> make_shared(size_t __n)
{
    return std::__allocate_shared_unbounded_array<_Tp>(allocator<_Tp>(), __n);
}

template<class _Tp, class = __enable_if_t<is_unbounded_array<_Tp>::value>>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> make_shared(size_t __n, const remove_extent_t<_Tp>& __u)
{
    return std::__allocate_shared_unbounded_array<_Tp>(allocator<_Tp>(), __n, __u);
}

template<class _Tp, __enable_if_t<is_unbounded_array<_Tp>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
shared_ptr<_Tp> make_shared_for_overwrite(size_t __n)
{
    return std::__allocate_shared_unbounded_array<_Tp>(allocator<__for_overwrite_tag>(), __n);
}

#endif // _LIBCPP_STD_VER >= 20
# 1343 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template<class _Tp, class _Up>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
{
    return __x.get() == __y.get();
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1353 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template<class _Tp, class _Up>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
{
    return !(__x == __y);
}

template<class _Tp, class _Up>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 11
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1368 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    typedef typename common_type<_Tp*, _Up*>::type _Vp;
    return less<_Vp>()(__x.get(), __y.get());
#else
# 1371 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    return less<>()(__x.get(), __y.get());
#endif
# 1373 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

}

template<class _Tp, class _Up>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator>(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
{
    return __y < __x;
}

template<class _Tp, class _Up>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
{
    return !(__y < __x);
}

template<class _Tp, class _Up>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator>=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
{
    return !(__x < __y);
}

#endif // _LIBCPP_STD_VER <= 17
# 1401 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1403 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
template<class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI strong_ordering
operator<=>(shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) noexcept
{
    return compare_three_way()(__x.get(), __y.get());
}
#endif
# 1410 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
{
    return !__x;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1420 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
{
    return !__x;
}

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
{
    return static_cast<bool>(__x);
}

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
{
    return static_cast<bool>(__x);
}

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
{
    return less<_Tp*>()(__x.get(), nullptr);
}

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
{
    return less<_Tp*>()(nullptr, __x.get());
}

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator>(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
{
    return nullptr < __x;
}

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator>(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
{
    return __x < nullptr;
}

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
{
    return !(nullptr < __x);
}

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
{
    return !(__x < nullptr);
}

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator>=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
{
    return !(__x < nullptr);
}

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator>=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
{
    return !(nullptr < __x);
}

#endif // _LIBCPP_STD_VER <= 17
# 1510 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1512 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI strong_ordering
operator<=>(shared_ptr<_Tp> const& __x, nullptr_t) noexcept
{
    return compare_three_way()(__x.get(), static_cast<typename shared_ptr<_Tp>::element_type*>(nullptr));
}
#endif
# 1519 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(shared_ptr<_Tp>& __x, shared_ptr<_Tp>& __y) _NOEXCEPT
{
    __x.swap(__y);
}

template<class _Tp, class _Up>
inline _LIBCPP_INLINE_VISIBILITY
shared_ptr<_Tp>
static_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
{
    return shared_ptr<_Tp>(__r,
                           static_cast<
                               typename shared_ptr<_Tp>::element_type*>(__r.get()));
}

// LWG-2996
// We don't backport because it is an evolutionary change.
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1541 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp> static_pointer_cast(shared_ptr<_Up>&& __r) noexcept {
  return shared_ptr<_Tp>(std::move(__r), static_cast<typename shared_ptr<_Tp>::element_type*>(__r.get()));
}
#endif
# 1546 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template<class _Tp, class _Up>
inline _LIBCPP_INLINE_VISIBILITY
shared_ptr<_Tp>
dynamic_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
{
    typedef typename shared_ptr<_Tp>::element_type _ET;
    _ET* __p = dynamic_cast<_ET*>(__r.get());
    return __p ? shared_ptr<_Tp>(__r, __p) : shared_ptr<_Tp>();
}

// LWG-2996
// We don't backport because it is an evolutionary change.
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1560 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp> dynamic_pointer_cast(shared_ptr<_Up>&& __r) noexcept {
  auto* __p = dynamic_cast<typename shared_ptr<_Tp>::element_type*>(__r.get());
  return __p ? shared_ptr<_Tp>(std::move(__r), __p) : shared_ptr<_Tp>();
}
#endif
# 1566 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template<class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
const_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
{
    typedef typename shared_ptr<_Tp>::element_type _RTp;
    return shared_ptr<_Tp>(__r, const_cast<_RTp*>(__r.get()));
}

// LWG-2996
// We don't backport because it is an evolutionary change.
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1578 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp> const_pointer_cast(shared_ptr<_Up>&& __r) noexcept {
  return shared_ptr<_Tp>(std::move(__r), const_cast<typename shared_ptr<_Tp>::element_type*>(__r.get()));
}
#endif
# 1583 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template<class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
reinterpret_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
{
    return shared_ptr<_Tp>(__r,
                           reinterpret_cast<
                               typename shared_ptr<_Tp>::element_type*>(__r.get()));
}

// LWG-2996
// We don't backport because it is an evolutionary change.
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1596 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp> reinterpret_pointer_cast(shared_ptr<_Up>&& __r) noexcept {
  return shared_ptr<_Tp>(std::move(__r), reinterpret_cast<typename shared_ptr<_Tp>::element_type*>(__r.get()));
}
#endif
# 1601 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

#ifndef _LIBCPP_HAS_NO_RTTI

template<class _Dp, class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
_Dp*
get_deleter(const shared_ptr<_Tp>& __p) _NOEXCEPT
{
    return __p.template __get_deleter<_Dp>();
}

#endif // _LIBCPP_HAS_NO_RTTI
# 1613 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template<class _Tp>
class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr
{
public:
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1619 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    typedef remove_extent_t<_Tp> element_type;
#else
# 1621 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    typedef _Tp element_type;
#endif
# 1623 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

private:
    element_type*        __ptr_;
    __shared_weak_count* __cntrl_;

public:
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR weak_ptr() _NOEXCEPT;

    template<class _Yp, __enable_if_t<__compatible_with<_Yp, _Tp>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY weak_ptr(shared_ptr<_Yp> const& __r) _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY
    weak_ptr(weak_ptr const& __r) _NOEXCEPT;

    template<class _Yp, __enable_if_t<__compatible_with<_Yp, _Tp>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr<_Yp> const& __r) _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY
    weak_ptr(weak_ptr&& __r) _NOEXCEPT;

    template<class _Yp, __enable_if_t<__compatible_with<_Yp, _Tp>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr<_Yp>&& __r) _NOEXCEPT;

    _LIBCPP_HIDE_FROM_ABI ~weak_ptr();

    _LIBCPP_INLINE_VISIBILITY
    weak_ptr& operator=(weak_ptr const& __r) _NOEXCEPT;
    template<class _Yp, __enable_if_t<__compatible_with<_Yp, _Tp>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY weak_ptr&
        operator=(weak_ptr<_Yp> const& __r) _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY
    weak_ptr& operator=(weak_ptr&& __r) _NOEXCEPT;
    template<class _Yp, __enable_if_t<__compatible_with<_Yp, _Tp>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY weak_ptr&
        operator=(weak_ptr<_Yp>&& __r) _NOEXCEPT;

    template<class _Yp, __enable_if_t<__compatible_with<_Yp, _Tp>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY weak_ptr&
        operator=(shared_ptr<_Yp> const& __r) _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY
    void swap(weak_ptr& __r) _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY
    void reset() _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY
    long use_count() const _NOEXCEPT
        {return __cntrl_ ? __cntrl_->use_count() : 0;}
    _LIBCPP_INLINE_VISIBILITY
    bool expired() const _NOEXCEPT
        {return __cntrl_ == nullptr || __cntrl_->use_count() == 0;}
    _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp> lock() const _NOEXCEPT;
    template<class _Up>
        _LIBCPP_INLINE_VISIBILITY
        bool owner_before(const shared_ptr<_Up>& __r) const _NOEXCEPT
        {return __cntrl_ < __r.__cntrl_;}
    template<class _Up>
        _LIBCPP_INLINE_VISIBILITY
        bool owner_before(const weak_ptr<_Up>& __r) const _NOEXCEPT
        {return __cntrl_ < __r.__cntrl_;}

    template <class _Up> friend class _LIBCPP_TEMPLATE_VIS weak_ptr;
    template <class _Up> friend class _LIBCPP_TEMPLATE_VIS shared_ptr;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1691 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
template<class _Tp>
weak_ptr(shared_ptr<_Tp>) -> weak_ptr<_Tp>;
#endif
# 1694 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template<class _Tp>
inline
_LIBCPP_CONSTEXPR
weak_ptr<_Tp>::weak_ptr() _NOEXCEPT
    : __ptr_(nullptr),
      __cntrl_(nullptr)
{
}

template<class _Tp>
inline
weak_ptr<_Tp>::weak_ptr(weak_ptr const& __r) _NOEXCEPT
    : __ptr_(__r.__ptr_),
      __cntrl_(__r.__cntrl_)
{
    if (__cntrl_)
        __cntrl_->__add_weak();
}

template<class _Tp>
template<class _Yp, __enable_if_t<__compatible_with<_Yp, _Tp>::value, int> >
inline
weak_ptr<_Tp>::weak_ptr(shared_ptr<_Yp> const& __r)
                         _NOEXCEPT
    : __ptr_(__r.__ptr_),
      __cntrl_(__r.__cntrl_)
{
    if (__cntrl_)
        __cntrl_->__add_weak();
}

template<class _Tp>
template<class _Yp, __enable_if_t<__compatible_with<_Yp, _Tp>::value, int> >
inline
weak_ptr<_Tp>::weak_ptr(weak_ptr<_Yp> const& __r)
         _NOEXCEPT
    : __ptr_(nullptr),
      __cntrl_(nullptr)
{
    shared_ptr<_Yp> __s = __r.lock();
    *this = weak_ptr<_Tp>(__s);
}

template<class _Tp>
inline
weak_ptr<_Tp>::weak_ptr(weak_ptr&& __r) _NOEXCEPT
    : __ptr_(__r.__ptr_),
      __cntrl_(__r.__cntrl_)
{
    __r.__ptr_ = nullptr;
    __r.__cntrl_ = nullptr;
}

template<class _Tp>
template<class _Yp, __enable_if_t<__compatible_with<_Yp, _Tp>::value, int> >
inline
weak_ptr<_Tp>::weak_ptr(weak_ptr<_Yp>&& __r)
         _NOEXCEPT
    : __ptr_(nullptr),
      __cntrl_(nullptr)
{
    shared_ptr<_Yp> __s = __r.lock();
    *this = weak_ptr<_Tp>(__s);
    __r.reset();
}

template<class _Tp>
weak_ptr<_Tp>::~weak_ptr()
{
    if (__cntrl_)
        __cntrl_->__release_weak();
}

template<class _Tp>
inline
weak_ptr<_Tp>&
weak_ptr<_Tp>::operator=(weak_ptr const& __r) _NOEXCEPT
{
    weak_ptr(__r).swap(*this);
    return *this;
}

template<class _Tp>
template<class _Yp, __enable_if_t<__compatible_with<_Yp, _Tp>::value, int> >
inline
weak_ptr<_Tp>&
weak_ptr<_Tp>::operator=(weak_ptr<_Yp> const& __r) _NOEXCEPT
{
    weak_ptr(__r).swap(*this);
    return *this;
}

template<class _Tp>
inline
weak_ptr<_Tp>&
weak_ptr<_Tp>::operator=(weak_ptr&& __r) _NOEXCEPT
{
    weak_ptr(_VSTD::move(__r)).swap(*this);
    return *this;
}

template<class _Tp>
template<class _Yp, __enable_if_t<__compatible_with<_Yp, _Tp>::value, int> >
inline
weak_ptr<_Tp>&
weak_ptr<_Tp>::operator=(weak_ptr<_Yp>&& __r) _NOEXCEPT
{
    weak_ptr(_VSTD::move(__r)).swap(*this);
    return *this;
}

template<class _Tp>
template<class _Yp, __enable_if_t<__compatible_with<_Yp, _Tp>::value, int> >
inline
weak_ptr<_Tp>&
weak_ptr<_Tp>::operator=(shared_ptr<_Yp> const& __r) _NOEXCEPT
{
    weak_ptr(__r).swap(*this);
    return *this;
}

template<class _Tp>
inline
void
weak_ptr<_Tp>::swap(weak_ptr& __r) _NOEXCEPT
{
    _VSTD::swap(__ptr_, __r.__ptr_);
    _VSTD::swap(__cntrl_, __r.__cntrl_);
}

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(weak_ptr<_Tp>& __x, weak_ptr<_Tp>& __y) _NOEXCEPT
{
    __x.swap(__y);
}

template<class _Tp>
inline
void
weak_ptr<_Tp>::reset() _NOEXCEPT
{
    weak_ptr().swap(*this);
}

template<class _Tp>
shared_ptr<_Tp>
weak_ptr<_Tp>::lock() const _NOEXCEPT
{
    shared_ptr<_Tp> __r;
    __r.__cntrl_ = __cntrl_ ? __cntrl_->lock() : __cntrl_;
    if (__r.__cntrl_)
        __r.__ptr_ = __ptr_;
    return __r;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1853 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
template <class _Tp = void> struct owner_less;
#else
# 1855 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
template <class _Tp> struct owner_less;
#endif
# 1857 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3


template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS owner_less<shared_ptr<_Tp> >
    : __binary_function<shared_ptr<_Tp>, shared_ptr<_Tp>, bool>
{
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(shared_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const _NOEXCEPT
        {return __x.owner_before(__y);}
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(shared_ptr<_Tp> const& __x,   weak_ptr<_Tp> const& __y) const _NOEXCEPT
        {return __x.owner_before(__y);}
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(  weak_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const _NOEXCEPT
        {return __x.owner_before(__y);}
};

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS owner_less<weak_ptr<_Tp> >
    : __binary_function<weak_ptr<_Tp>, weak_ptr<_Tp>, bool>
{
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(  weak_ptr<_Tp> const& __x,   weak_ptr<_Tp> const& __y) const _NOEXCEPT
        {return __x.owner_before(__y);}
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(shared_ptr<_Tp> const& __x,   weak_ptr<_Tp> const& __y) const _NOEXCEPT
        {return __x.owner_before(__y);}
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(  weak_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const _NOEXCEPT
        {return __x.owner_before(__y);}
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1890 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
template <>
struct _LIBCPP_TEMPLATE_VIS owner_less<void>
{
    template <class _Tp, class _Up>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()( shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const _NOEXCEPT
        {return __x.owner_before(__y);}
    template <class _Tp, class _Up>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()( shared_ptr<_Tp> const& __x,   weak_ptr<_Up> const& __y) const _NOEXCEPT
        {return __x.owner_before(__y);}
    template <class _Tp, class _Up>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(   weak_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const _NOEXCEPT
        {return __x.owner_before(__y);}
    template <class _Tp, class _Up>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(   weak_ptr<_Tp> const& __x,   weak_ptr<_Up> const& __y) const _NOEXCEPT
        {return __x.owner_before(__y);}
    typedef void is_transparent;
};
#endif
# 1912 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

template<class _Tp>
class _LIBCPP_TEMPLATE_VIS enable_shared_from_this
{
    mutable weak_ptr<_Tp> __weak_this_;
protected:
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    enable_shared_from_this() _NOEXCEPT {}
    _LIBCPP_INLINE_VISIBILITY
    enable_shared_from_this(enable_shared_from_this const&) _NOEXCEPT {}
    _LIBCPP_INLINE_VISIBILITY
    enable_shared_from_this& operator=(enable_shared_from_this const&) _NOEXCEPT
        {return *this;}
    _LIBCPP_INLINE_VISIBILITY
    ~enable_shared_from_this() {}
public:
    _LIBCPP_INLINE_VISIBILITY
    shared_ptr<_Tp> shared_from_this()
        {return shared_ptr<_Tp>(__weak_this_);}
    _LIBCPP_INLINE_VISIBILITY
    shared_ptr<_Tp const> shared_from_this() const
        {return shared_ptr<const _Tp>(__weak_this_);}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1936 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    _LIBCPP_INLINE_VISIBILITY
    weak_ptr<_Tp> weak_from_this() _NOEXCEPT
       { return __weak_this_; }

    _LIBCPP_INLINE_VISIBILITY
    weak_ptr<const _Tp> weak_from_this() const _NOEXCEPT
        { return __weak_this_; }
#endif // _LIBCPP_STD_VER >= 17
# 1944 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

    template <class _Up> friend class shared_ptr;
};

template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash;

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS hash<shared_ptr<_Tp> >
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1954 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
    _LIBCPP_DEPRECATED_IN_CXX17 typedef shared_ptr<_Tp> argument_type;
    _LIBCPP_DEPRECATED_IN_CXX17 typedef size_t          result_type;
#endif
# 1957 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

    _LIBCPP_INLINE_VISIBILITY
    size_t operator()(const shared_ptr<_Tp>& __ptr) const _NOEXCEPT
    {
        return hash<typename shared_ptr<_Tp>::element_type*>()(__ptr.get());
    }
};

template<class _CharT, class _Traits, class _Yp>
inline _LIBCPP_INLINE_VISIBILITY
basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p);


#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_THREADS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1972 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

class _LIBCPP_EXPORTED_FROM_ABI __sp_mut
{
    void* __lx_;
public:
    void lock() _NOEXCEPT;
    void unlock() _NOEXCEPT;

private:
    _LIBCPP_CONSTEXPR __sp_mut(void*) _NOEXCEPT;
    __sp_mut(const __sp_mut&);
    __sp_mut& operator=(const __sp_mut&);

    friend _LIBCPP_EXPORTED_FROM_ABI __sp_mut& __get_sp_mut(const void*);
};

_LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
__sp_mut& __get_sp_mut(const void*);

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
atomic_is_lock_free(const shared_ptr<_Tp>*)
{
    return false;
}

template <class _Tp>
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
atomic_load(const shared_ptr<_Tp>* __p)
{
    __sp_mut& __m = std::__get_sp_mut(__p);
    __m.lock();
    shared_ptr<_Tp> __q = *__p;
    __m.unlock();
    return __q;
}

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
shared_ptr<_Tp>
atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order)
{
    return std::atomic_load(__p);
}

template <class _Tp>
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
_LIBCPP_HIDE_FROM_ABI void
atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
{
    __sp_mut& __m = std::__get_sp_mut(__p);
    __m.lock();
    __p->swap(__r);
    __m.unlock();
}

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
void
atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order)
{
    std::atomic_store(__p, __r);
}

template <class _Tp>
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
{
    __sp_mut& __m = std::__get_sp_mut(__p);
    __m.lock();
    __p->swap(__r);
    __m.unlock();
    return __r;
}

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
shared_ptr<_Tp>
atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order)
{
    return std::atomic_exchange(__p, __r);
}

template <class _Tp>
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
_LIBCPP_HIDE_FROM_ABI bool
atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w)
{
    shared_ptr<_Tp> __temp;
    __sp_mut& __m = std::__get_sp_mut(__p);
    __m.lock();
    if (__p->__owner_equivalent(*__v))
    {
        _VSTD::swap(__temp, *__p);
        *__p = __w;
        __m.unlock();
        return true;
    }
    _VSTD::swap(__temp, *__v);
    *__v = *__p;
    __m.unlock();
    return false;
}

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
bool
atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w)
{
    return std::atomic_compare_exchange_strong(__p, __v, __w);
}

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
bool
atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
                                        shared_ptr<_Tp> __w, memory_order, memory_order)
{
    return std::atomic_compare_exchange_strong(__p, __v, __w);
}

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
bool
atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
                                      shared_ptr<_Tp> __w, memory_order, memory_order)
{
    return std::atomic_compare_exchange_weak(__p, __v, __w);
}

#endif // !defined(_LIBCPP_HAS_NO_THREADS)
# 2112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_SHARED_PTR_H
# 2116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/shared_ptr.h" 3
#endif /* shared_ptr.h expanded by -frewrite-includes */
# 936 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* temporary_buffer.h expanded by -frewrite-includes */
#include <__memory/temporary_buffer.h>
#else /* temporary_buffer.h expanded by -frewrite-includes */
# 936 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_TEMPORARY_BUFFER_H
#define _LIBCPP___MEMORY_TEMPORARY_BUFFER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/alignment_of.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI _LIBCPP_DEPRECATED_IN_CXX17
pair<_Tp*, ptrdiff_t>
get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT
{
    pair<_Tp*, ptrdiff_t> __r(0, 0);
    const ptrdiff_t __m = (~ptrdiff_t(0) ^
                           ptrdiff_t(ptrdiff_t(1) << (sizeof(ptrdiff_t) * __CHAR_BIT__ - 1)))
                           / sizeof(_Tp);
    if (__n > __m)
        __n = __m;
    while (__n > 0)
    {
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3
    if (__is_overaligned_for_new(_LIBCPP_ALIGNOF(_Tp)))
        {
            align_val_t __al =
                align_val_t(alignment_of<_Tp>::value);
            __r.first = static_cast<_Tp*>(::operator new(
                __n * sizeof(_Tp), __al, nothrow));
        } else {
            __r.first = static_cast<_Tp*>(::operator new(
                __n * sizeof(_Tp), nothrow));
        }
#else
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3
    if (__is_overaligned_for_new(_LIBCPP_ALIGNOF(_Tp)))
        {
            // Since aligned operator new is unavailable, return an empty
            // buffer rather than one with invalid alignment.
            return __r;
        }

        __r.first = static_cast<_Tp*>(::operator new(__n * sizeof(_Tp), nothrow));
#endif
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3

        if (__r.first)
        {
            __r.second = __n;
            break;
        }
        __n /= 2;
    }
    return __r;
}

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_IN_CXX17
void return_temporary_buffer(_Tp* __p) _NOEXCEPT
{
  _VSTD::__libcpp_deallocate_unsized((void*)__p, _LIBCPP_ALIGNOF(_Tp));
}

struct __return_temporary_buffer
{
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
    template <class _Tp>
    _LIBCPP_INLINE_VISIBILITY void operator()(_Tp* __p) const {_VSTD::return_temporary_buffer(__p);}
_LIBCPP_SUPPRESS_DEPRECATED_POP
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_TEMPORARY_BUFFER_H
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temporary_buffer.h" 3
#endif /* temporary_buffer.h expanded by -frewrite-includes */
# 937 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/uninitialized_algorithms.h>
#endif /* expanded by -frewrite-includes */
# 937 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 938 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/unique_ptr.h>
#endif /* expanded by -frewrite-includes */
# 938 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 939 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/uses_allocator.h>
#endif /* expanded by -frewrite-includes */
# 939 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 940 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* uses_allocator_construction.h expanded by -frewrite-includes */
#include <__memory/uses_allocator_construction.h>
#else /* uses_allocator_construction.h expanded by -frewrite-includes */
# 940 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_USES_ALLOCATOR_CONSTRUCTION_H
#define _LIBCPP___MEMORY_USES_ALLOCATOR_CONSTRUCTION_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/construct_at.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/uses_allocator.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/pair_like.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3

template <class _Type>
inline constexpr bool __is_std_pair = false;

template <class _Type1, class _Type2>
inline constexpr bool __is_std_pair<pair<_Type1, _Type2>> = true;

template <class _Tp>
inline constexpr bool __is_cv_std_pair = __is_std_pair<remove_cv_t<_Tp>>;

template <class _Type, class _Alloc, class... _Args, __enable_if_t<!__is_cv_std_pair<_Type>, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr auto
__uses_allocator_construction_args(const _Alloc& __alloc, _Args&&... __args) noexcept {
  if constexpr (!uses_allocator_v<remove_cv_t<_Type>, _Alloc> && is_constructible_v<_Type, _Args...>) {
    return std::forward_as_tuple(std::forward<_Args>(__args)...);
  } else if constexpr (uses_allocator_v<remove_cv_t<_Type>, _Alloc> &&
                       is_constructible_v<_Type, allocator_arg_t, const _Alloc&, _Args...>) {
    return tuple<allocator_arg_t, const _Alloc&, _Args&&...>(allocator_arg, __alloc, std::forward<_Args>(__args)...);
  } else if constexpr (uses_allocator_v<remove_cv_t<_Type>, _Alloc> &&
                       is_constructible_v<_Type, _Args..., const _Alloc&>) {
    return std::forward_as_tuple(std::forward<_Args>(__args)..., __alloc);
  } else {
    static_assert(
        sizeof(_Type) + 1 == 0, "If uses_allocator_v<Type> is true, the type has to be allocator-constructible");
  }
}

template <class _Pair, class _Alloc, class _Tuple1, class _Tuple2, __enable_if_t<__is_cv_std_pair<_Pair>, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr auto __uses_allocator_construction_args(
    const _Alloc& __alloc, piecewise_construct_t, _Tuple1&& __x, _Tuple2&& __y) noexcept {
  return std::make_tuple(
      piecewise_construct,
      std::apply(
          [&__alloc](auto&&... __args1) {
            return std::__uses_allocator_construction_args<typename _Pair::first_type>(
                __alloc, std::forward<decltype(__args1)>(__args1)...);
          },
          std::forward<_Tuple1>(__x)),
      std::apply(
          [&__alloc](auto&&... __args2) {
            return std::__uses_allocator_construction_args<typename _Pair::second_type>(
                __alloc, std::forward<decltype(__args2)>(__args2)...);
          },
          std::forward<_Tuple2>(__y)));
}

template <class _Pair, class _Alloc, __enable_if_t<__is_cv_std_pair<_Pair>, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr auto __uses_allocator_construction_args(const _Alloc& __alloc) noexcept {
  return std::__uses_allocator_construction_args<_Pair>(__alloc, piecewise_construct, tuple<>{}, tuple<>{});
}

template <class _Pair, class _Alloc, class _Up, class _Vp, __enable_if_t<__is_cv_std_pair<_Pair>, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr auto
__uses_allocator_construction_args(const _Alloc& __alloc, _Up&& __u, _Vp&& __v) noexcept {
  return std::__uses_allocator_construction_args<_Pair>(
      __alloc,
      piecewise_construct,
      std::forward_as_tuple(std::forward<_Up>(__u)),
      std::forward_as_tuple(std::forward<_Vp>(__v)));
}

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
template <class _Pair, class _Alloc, class _Up, class _Vp, __enable_if_t<__is_cv_std_pair<_Pair>, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr auto
__uses_allocator_construction_args(const _Alloc& __alloc, pair<_Up, _Vp>& __pair) noexcept {
  return std::__uses_allocator_construction_args<_Pair>(
      __alloc, piecewise_construct, std::forward_as_tuple(__pair.first), std::forward_as_tuple(__pair.second));
}
#  endif
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3

template <class _Pair, class _Alloc, class _Up, class _Vp, __enable_if_t<__is_cv_std_pair<_Pair>, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr auto
__uses_allocator_construction_args(const _Alloc& __alloc, const pair<_Up, _Vp>& __pair) noexcept {
  return std::__uses_allocator_construction_args<_Pair>(
      __alloc, piecewise_construct, std::forward_as_tuple(__pair.first), std::forward_as_tuple(__pair.second));
}

template <class _Pair, class _Alloc, class _Up, class _Vp, __enable_if_t<__is_cv_std_pair<_Pair>, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr auto
__uses_allocator_construction_args(const _Alloc& __alloc, pair<_Up, _Vp>&& __pair) noexcept {
  return std::__uses_allocator_construction_args<_Pair>(
      __alloc,
      piecewise_construct,
      std::forward_as_tuple(std::get<0>(std::move(__pair))),
      std::forward_as_tuple(std::get<1>(std::move(__pair))));
}

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 121 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
template <class _Pair, class _Alloc, class _Up, class _Vp, __enable_if_t<__is_cv_std_pair<_Pair>, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr auto
__uses_allocator_construction_args(const _Alloc& __alloc, const pair<_Up, _Vp>&& __pair) noexcept {
  return std::__uses_allocator_construction_args<_Pair>(
      __alloc,
      piecewise_construct,
      std::forward_as_tuple(std::get<0>(std::move(__pair))),
      std::forward_as_tuple(std::get<1>(std::move(__pair))));
}

template < class _Pair,
           class _Alloc,
           __pair_like _PairLike,
           __enable_if_t<__is_cv_std_pair<_Pair> && !__is_specialization_of_subrange<remove_cvref_t<_PairLike>>::value,
                         int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr auto
__uses_allocator_construction_args(const _Alloc& __alloc, _PairLike&& __p) noexcept {
  return std::__uses_allocator_construction_args<_Pair>(
      __alloc,
      piecewise_construct,
      std::forward_as_tuple(std::get<0>(std::forward<_PairLike>(__p))),
      std::forward_as_tuple(std::get<1>(std::forward<_PairLike>(__p))));
}
#  endif
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3

namespace __uses_allocator_detail {

template <class _Ap, class _Bp>
void __fun(const pair<_Ap, _Bp>&);

template <class _Tp>
decltype(__uses_allocator_detail::__fun(std::declval<_Tp>()), true_type()) __convertible_to_const_pair_ref_impl(int);

template <class>
false_type __convertible_to_const_pair_ref_impl(...);

template <class _Tp>
inline constexpr bool __convertible_to_const_pair_ref =
    decltype(__uses_allocator_detail::__convertible_to_const_pair_ref_impl<_Tp>(0))::value;

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
template <class _Tp, class _Up>
inline constexpr bool __uses_allocator_constraints =
    __is_cv_std_pair<_Tp> &&
    (__is_specialization_of_subrange<remove_cvref_t<_Up>>::value ||
     (!__pair_like<_Up> && !__convertible_to_const_pair_ref<_Up>));
#  else
# 168 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
template <class _Tp, class _Up>
inline constexpr bool __uses_allocator_constraints = __is_cv_std_pair<_Tp> && !__convertible_to_const_pair_ref<_Up>;
#  endif
# 171 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3

} // namespace __uses_allocator_detail

template < class _Pair,
           class _Alloc,
           class _Type,
           __enable_if_t<__uses_allocator_detail::__uses_allocator_constraints<_Pair, _Type>, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr auto
__uses_allocator_construction_args(const _Alloc& __alloc, _Type&& __value) noexcept;

template <class _Type, class _Alloc, class... _Args>
_LIBCPP_HIDE_FROM_ABI constexpr _Type __make_obj_using_allocator(const _Alloc& __alloc, _Args&&... __args);

template < class _Pair,
           class _Alloc,
           class _Type,
           __enable_if_t< __uses_allocator_detail::__uses_allocator_constraints<_Pair, _Type>, int>>
_LIBCPP_HIDE_FROM_ABI constexpr auto
__uses_allocator_construction_args(const _Alloc& __alloc, _Type&& __value) noexcept {
  struct __pair_constructor {
    using _PairMutable = remove_cv_t<_Pair>;

    _LIBCPP_HIDE_FROM_ABI constexpr auto __do_construct(const _PairMutable& __pair) const {
      return std::__make_obj_using_allocator<_PairMutable>(__alloc_, __pair);
    }

    _LIBCPP_HIDE_FROM_ABI constexpr auto __do_construct(_PairMutable&& __pair) const {
      return std::__make_obj_using_allocator<_PairMutable>(__alloc_, std::move(__pair));
    }

    const _Alloc& __alloc_;
    _Type& __value_;

    _LIBCPP_HIDE_FROM_ABI constexpr operator _PairMutable() const {
      return __do_construct(std::forward<_Type>(this->__value_));
    }
  };

  return std::make_tuple(__pair_constructor{__alloc, __value});
}

template <class _Type, class _Alloc, class... _Args>
_LIBCPP_HIDE_FROM_ABI constexpr _Type __make_obj_using_allocator(const _Alloc& __alloc, _Args&&... __args) {
  return std::make_from_tuple<_Type>(
      std::__uses_allocator_construction_args<_Type>(__alloc, std::forward<_Args>(__args)...));
}

template <class _Type, class _Alloc, class... _Args>
_LIBCPP_HIDE_FROM_ABI constexpr _Type*
__uninitialized_construct_using_allocator(_Type* __ptr, const _Alloc& __alloc, _Args&&... __args) {
  return std::apply(
      [&__ptr](auto&&... __xs) { return std::__construct_at(__ptr, std::forward<decltype(__xs)>(__xs)...); },
      std::__uses_allocator_construction_args<_Type>(__alloc, std::forward<_Args>(__args)...));
}

#endif // _LIBCPP_STD_VER >= 17
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3

template <class _Type, class _Alloc, class... _Args>
_LIBCPP_HIDE_FROM_ABI constexpr auto uses_allocator_construction_args(const _Alloc& __alloc, _Args&&... __args) noexcept
    -> decltype(std::__uses_allocator_construction_args<_Type>(__alloc, std::forward<_Args>(__args)...)) {
  return /*--*/ std::__uses_allocator_construction_args<_Type>(__alloc, std::forward<_Args>(__args)...);
}

template <class _Type, class _Alloc, class... _Args>
_LIBCPP_HIDE_FROM_ABI constexpr auto make_obj_using_allocator(const _Alloc& __alloc, _Args&&... __args)
    -> decltype(std::__make_obj_using_allocator<_Type>(__alloc, std::forward<_Args>(__args)...)) {
  return /*--*/ std::__make_obj_using_allocator<_Type>(__alloc, std::forward<_Args>(__args)...);
}

template <class _Type, class _Alloc, class... _Args>
_LIBCPP_HIDE_FROM_ABI constexpr auto
uninitialized_construct_using_allocator(_Type* __ptr, const _Alloc& __alloc, _Args&&... __args)
    -> decltype(std::__uninitialized_construct_using_allocator(__ptr, __alloc, std::forward<_Args>(__args)...)) {
  return /*--*/ std::__uninitialized_construct_using_allocator(__ptr, __alloc, std::forward<_Args>(__args)...);
}

#endif // _LIBCPP_STD_VER >= 20
# 250 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___MEMORY_USES_ALLOCATOR_CONSTRUCTION_H
# 256 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/uses_allocator_construction.h" 3
#endif /* uses_allocator_construction.h expanded by -frewrite-includes */
# 941 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 941 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 942 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3

// standard-mandated includes

// [memory.syn]
#if 0 /* expanded by -frewrite-includes */
#include <compare>
#endif /* expanded by -frewrite-includes */
# 946 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 947 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 949 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 950 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#endif
# 951 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 953 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#  include <atomic>
#endif /* expanded by -frewrite-includes */
# 953 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 954 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 954 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 955 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstddef>
#endif /* expanded by -frewrite-includes */
# 955 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 956 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdint>
#endif /* expanded by -frewrite-includes */
# 956 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 957 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 957 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 958 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstring>
#endif /* expanded by -frewrite-includes */
# 958 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 959 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 959 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 960 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iterator>
#endif /* expanded by -frewrite-includes */
# 960 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 961 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#  include <new>
#endif /* expanded by -frewrite-includes */
# 961 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 962 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#  include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 962 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 963 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#  include <tuple>
#endif /* expanded by -frewrite-includes */
# 963 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 964 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 964 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 965 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#  include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 965 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 966 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#if 0 /* expanded by -frewrite-includes */
#  include <utility>
#endif /* expanded by -frewrite-includes */
# 966 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
# 967 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#endif
# 968 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3

#endif // _LIBCPP_MEMORY
# 970 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/memory" 3
#endif /* memory expanded by -frewrite-includes */
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/memory.h" 2

#if 0 /* expanded by -frewrite-includes */
#include "version.h"
#endif /* expanded by -frewrite-includes */
# 10 "../../sdk/lib/stdcompat/include/lib/stdcompat/memory.h"
# 11 "../../sdk/lib/stdcompat/include/lib/stdcompat/memory.h"

namespace cpp17 {

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_addressof_constexpr) && __cpp_lib_addressof_constexpr >= 201603L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../sdk/lib/stdcompat/include/lib/stdcompat/memory.h"

using std::addressof;

#else  // Provide constexpr polyfill for addressof.
# 20 "../../sdk/lib/stdcompat/include/lib/stdcompat/memory.h"

template <typename T>
constexpr T* addressof(T& arg) noexcept {
  return __builtin_addressof(arg);
}

template <typename T>
const T* addressof(const T&&) = delete;

#endif  // __cpp_lib_addressof_constexpr >= 201603L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 30 "../../sdk/lib/stdcompat/include/lib/stdcompat/memory.h"

}  // namespace cpp17

namespace cpp20 {

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_to_address) && __cpp_lib_to_address >= 201711L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 37 "../../sdk/lib/stdcompat/include/lib/stdcompat/memory.h"

using std::to_address;

#else  // Provide to_address polyfill.
# 41 "../../sdk/lib/stdcompat/include/lib/stdcompat/memory.h"

template <typename T>
constexpr T* to_address(T* pointer) noexcept {
  static_assert(!std::is_function<T>::value, "Cannot pass function pointers to std::to_address()");
  return pointer;
}

// TODO(fxbug.dev/70523): This std::pointer_traits stuff is only to be bug-compatible with the
// standard library implementations; switch back to auto when the linked bug is resolved.
template <typename T>
constexpr typename std::pointer_traits<T>::element_type* to_address(const T& pointer) noexcept {
  static_assert(
      std::is_same<decltype(pointer.operator->()),
                   typename std::pointer_traits<T>::element_type*>::value,
      "For compatibility with libc++ and libstdc++, operator->() must return "
      "typename std::pointer_traits<T>::element_type*. 'Chaining' operator->() in "
      "cpp20::to_address() will not be permitted until https://fxbug.dev/70523 is resolved.");

  return to_address(pointer.operator->());
}

#endif  // __cpp_lib_to_address >= 201711L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 63 "../../sdk/lib/stdcompat/include/lib/stdcompat/memory.h"

}  // namespace cpp20

#endif  // LIB_STDCOMPAT_MEMORY_H_
# 67 "../../sdk/lib/stdcompat/include/lib/stdcompat/memory.h"
#endif /* memory.h expanded by -frewrite-includes */
# 13 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "version.h"
#endif /* expanded by -frewrite-includes */
# 13 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"
# 14 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

#if 0 /* disabled by -frewrite-includes */
#if __has_include(<bit>) && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* bit expanded by -frewrite-includes */
#include <bit>
#else /* bit expanded by -frewrite-includes */
# 17 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#ifndef _LIBCPP_BIT
#define _LIBCPP_BIT

/*
    bit synopsis

namespace std {
  // [bit.cast], bit_cast
  template<class To, class From>
    constexpr To bit_cast(const From& from) noexcept; // C++20

  // [bit.byteswap], byteswap
  template<class T>
    constexpr T byteswap(T value) noexcept;      // C++23

  // [bit.pow.two], integral powers of 2
  template <class T>
    constexpr bool has_single_bit(T x) noexcept; // C++20
  template <class T>
    constexpr T bit_ceil(T x);                   // C++20
  template <class T>
    constexpr T bit_floor(T x) noexcept;         // C++20
  template <class T>
    constexpr int bit_width(T x) noexcept;       // C++20

  // [bit.rotate], rotating
  template<class T>
    constexpr T rotl(T x, int s) noexcept; // C++20
  template<class T>
    constexpr T rotr(T x, int s) noexcept; // C++20

  // [bit.count], counting
  template<class T>
    constexpr int countl_zero(T x) noexcept;  // C++20
  template<class T>
    constexpr int countl_one(T x) noexcept;   // C++20
  template<class T>
    constexpr int countr_zero(T x) noexcept;  // C++20
  template<class T>
    constexpr int countr_one(T x) noexcept;   // C++20
  template<class T>
    constexpr int popcount(T x) noexcept;     // C++20

  // [bit.endian], endian
  enum class endian {
    little = see below,        // C++20
    big = see below,           // C++20
    native = see below         // C++20
  };

} // namespace std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/bit_cast.h>
#endif /* expanded by -frewrite-includes */
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* bit_ceil.h expanded by -frewrite-includes */
#include <__bit/bit_ceil.h>
#else /* bit_ceil.h expanded by -frewrite-includes */
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___BIT_BIT_CEIL_H
#define _LIBCPP___BIT_BIT_CEIL_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* countl.h expanded by -frewrite-includes */
#include <__bit/countl.h>
#else /* countl.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___BIT_COUNTL_H
#define _LIBCPP___BIT_COUNTL_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* rotate.h expanded by -frewrite-includes */
#include <__bit/rotate.h>
#else /* rotate.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/rotate.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___BIT_ROTATE_H
#define _LIBCPP___BIT_ROTATE_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/rotate.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/rotate.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_unsigned_integer.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/rotate.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/rotate.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/rotate.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/rotate.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/rotate.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp __rotr(_Tp __t, int __cnt) _NOEXCEPT {
  static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__rotr requires an unsigned integer type");
  const unsigned int __dig = numeric_limits<_Tp>::digits;
  if ((__cnt % __dig) == 0)
    return __t;

  if (__cnt < 0) {
    __cnt *= -1;
    return (__t << (__cnt % __dig)) | (__t >> (__dig - (__cnt % __dig))); // rotr with negative __cnt is similar to rotl
  }

  return (__t >> (__cnt % __dig)) | (__t << (__dig - (__cnt % __dig)));
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp __rotl(_Tp __t, int __cnt) _NOEXCEPT {
  return std::__rotr(__t, -__cnt);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/rotate.h" 3

template <__libcpp_unsigned_integer _Tp>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Tp rotl(_Tp __t, int __cnt) noexcept {
  return std::__rotl(__t, __cnt);
}

template <__libcpp_unsigned_integer _Tp>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Tp rotr(_Tp __t, int __cnt) noexcept {
  return std::__rotr(__t, __cnt);
}

#endif // _LIBCPP_STD_VER >= 20
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/rotate.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___BIT_ROTATE_H
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/rotate.h" 3
#endif /* rotate.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_unsigned_integer.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
int __libcpp_clz(unsigned __x)           _NOEXCEPT { return __builtin_clz(__x); }

_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
int __libcpp_clz(unsigned long __x)      _NOEXCEPT { return __builtin_clzl(__x); }

_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
int __libcpp_clz(unsigned long long __x) _NOEXCEPT { return __builtin_clzll(__x); }

#  ifndef _LIBCPP_HAS_NO_INT128
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
int __libcpp_clz(__uint128_t __x) _NOEXCEPT {
  // The function is written in this form due to C++ constexpr limitations.
  // The algorithm:
  // - Test whether any bit in the high 64-bits is set
  // - No bits set:
  //   - The high 64-bits contain 64 leading zeros,
  //   - Add the result of the low 64-bits.
  // - Any bits set:
  //   - The number of leading zeros of the input is the number of leading
  //     zeros in the high 64-bits.
  return ((__x >> 64) == 0)
           ? (64 + __builtin_clzll(static_cast<unsigned long long>(__x)))
           : __builtin_clzll(static_cast<unsigned long long>(__x >> 64));
}
#  endif // _LIBCPP_HAS_NO_INT128
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3

template<class _Tp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
int __countl_zero(_Tp __t) _NOEXCEPT
{
    static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__countl_zero requires an unsigned integer type");
    if (__t == 0)
        return numeric_limits<_Tp>::digits;

    if      (sizeof(_Tp) <= sizeof(unsigned int))
        return std::__libcpp_clz(static_cast<unsigned int>(__t))
              - (numeric_limits<unsigned int>::digits - numeric_limits<_Tp>::digits);
    else if (sizeof(_Tp) <= sizeof(unsigned long))
        return std::__libcpp_clz(static_cast<unsigned long>(__t))
              - (numeric_limits<unsigned long>::digits - numeric_limits<_Tp>::digits);
    else if (sizeof(_Tp) <= sizeof(unsigned long long))
        return std::__libcpp_clz(static_cast<unsigned long long>(__t))
              - (numeric_limits<unsigned long long>::digits - numeric_limits<_Tp>::digits);
    else
    {
        int __ret = 0;
        int __iter = 0;
        const unsigned int __ulldigits = numeric_limits<unsigned long long>::digits;
        while (true) {
            __t = std::__rotl(__t, __ulldigits);
            if ((__iter = std::__countl_zero(static_cast<unsigned long long>(__t))) != __ulldigits)
                break;
            __ret += __iter;
            }
        return __ret + __iter;
    }
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3

template <__libcpp_unsigned_integer _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr int countl_zero(_Tp __t) noexcept {
  return std::__countl_zero(__t);
}

template <__libcpp_unsigned_integer _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr int countl_one(_Tp __t) noexcept {
  return __t != numeric_limits<_Tp>::max() ? std::countl_zero(static_cast<_Tp>(~__t)) : numeric_limits<_Tp>::digits;
}

#endif // _LIBCPP_STD_VER >= 20
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___BIT_COUNTL_H
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countl.h" 3
#endif /* countl.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3

template <class _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Tp __bit_ceil(_Tp __t) noexcept {
  if (__t < 2)
    return 1;
  const unsigned __n = numeric_limits<_Tp>::digits - std::__countl_zero((_Tp)(__t - 1u));
  _LIBCPP_ASSERT_UNCATEGORIZED(__n != numeric_limits<_Tp>::digits, "Bad input to bit_ceil");

  if constexpr (sizeof(_Tp) >= sizeof(unsigned))
    return _Tp{1} << __n;
  else {
    const unsigned __extra = numeric_limits<unsigned>::digits - numeric_limits<_Tp>::digits;
    const unsigned __ret_val = 1u << (__n + __extra);
    return (_Tp)(__ret_val >> __extra);
  }
}

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3

template <__libcpp_unsigned_integer _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Tp bit_ceil(_Tp __t) noexcept {
  return std::__bit_ceil(__t);
}

#  endif // _LIBCPP_STD_VER >= 20
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3
#endif   // _LIBCPP_STD_VER >= 17
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___BIT_BIT_CEIL_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_ceil.h" 3
#endif /* bit_ceil.h expanded by -frewrite-includes */
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* bit_floor.h expanded by -frewrite-includes */
#include <__bit/bit_floor.h>
#else /* bit_floor.h expanded by -frewrite-includes */
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_floor.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___BIT_BIT_FLOOR_H
#define _LIBCPP___BIT_BIT_FLOOR_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* bit_log2.h expanded by -frewrite-includes */
#include <__bit/bit_log2.h>
#else /* bit_log2.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_floor.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_log2.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___BIT_BIT_LOG2_H
#define _LIBCPP___BIT_BIT_LOG2_H

#if 0 /* expanded by -frewrite-includes */
#include <__bit/countl.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_log2.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_log2.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_log2.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_log2.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_log2.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_log2.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_log2.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_log2.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_log2.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_log2.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_log2.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_log2.h" 3

template <__libcpp_unsigned_integer _Tp>
_LIBCPP_HIDE_FROM_ABI constexpr _Tp __bit_log2(_Tp __t) noexcept {
  return numeric_limits<_Tp>::digits - 1 - std::countl_zero(__t);
}

#endif // _LIBCPP_STD_VER >= 20
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_log2.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___BIT_BIT_LOG2_H
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_log2.h" 3
#endif /* bit_log2.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_floor.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_floor.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_floor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_floor.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_floor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_floor.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_floor.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_floor.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_floor.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_floor.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_floor.h" 3

template <__libcpp_unsigned_integer _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Tp bit_floor(_Tp __t) noexcept {
  return __t == 0 ? 0 : _Tp{1} << std::__bit_log2(__t);
}

#endif // _LIBCPP_STD_VER >= 20
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_floor.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___BIT_BIT_FLOOR_H
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_floor.h" 3
#endif /* bit_floor.h expanded by -frewrite-includes */
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/bit_log2.h>
#endif /* expanded by -frewrite-includes */
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* bit_width.h expanded by -frewrite-includes */
#include <__bit/bit_width.h>
#else /* bit_width.h expanded by -frewrite-includes */
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_width.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___BIT_BIT_WIDTH_H
#define _LIBCPP___BIT_BIT_WIDTH_H

#if 0 /* expanded by -frewrite-includes */
#include <__bit/bit_log2.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_width.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_width.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_width.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_width.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_width.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_width.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_width.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_width.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_width.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_width.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <__libcpp_unsigned_integer _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr int bit_width(_Tp __t) noexcept {
  return __t == 0 ? 0 : std::__bit_log2(__t) + 1;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_width.h" 3

#endif // _LIBCPP___BIT_BIT_WIDTH_H
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/bit_width.h" 3
#endif /* bit_width.h expanded by -frewrite-includes */
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* blsr.h expanded by -frewrite-includes */
#include <__bit/blsr.h>
#else /* blsr.h expanded by -frewrite-includes */
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/blsr.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___BIT_BLSR_H
#define _LIBCPP___BIT_BLSR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/blsr.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/blsr.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/blsr.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/blsr.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/blsr.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR unsigned __libcpp_blsr(unsigned __x) _NOEXCEPT {
  return __x ^ (__x & -__x);
}

inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR unsigned long __libcpp_blsr(unsigned long __x) _NOEXCEPT {
  return __x ^ (__x & -__x);
}

inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR unsigned long long __libcpp_blsr(unsigned long long __x) _NOEXCEPT {
  return __x ^ (__x & -__x);
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___BIT_BLSR_H
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/blsr.h" 3
#endif /* blsr.h expanded by -frewrite-includes */
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* byteswap.h expanded by -frewrite-includes */
#include <__bit/byteswap.h>
#else /* byteswap.h expanded by -frewrite-includes */
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___BIT_BYTESWAP_H
#define _LIBCPP___BIT_BYTESWAP_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3

template <integral _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Tp byteswap(_Tp __val) noexcept {

  if constexpr (sizeof(_Tp) == 1) {
    return __val;
  } else if constexpr (sizeof(_Tp) == 2) {
    return __builtin_bswap16(__val);
  } else if constexpr (sizeof(_Tp) == 4) {
    return __builtin_bswap32(__val);
  } else if constexpr (sizeof(_Tp) == 8) {
    return __builtin_bswap64(__val);
#ifndef _LIBCPP_HAS_NO_INT128
  } else if constexpr (sizeof(_Tp) == 16) {
#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__builtin_bswap128)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3
    return __builtin_bswap128(__val);
#else
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3
    return static_cast<_Tp>(byteswap(static_cast<uint64_t>(__val))) << 64 |
           static_cast<_Tp>(byteswap(static_cast<uint64_t>(__val >> 64)));
#endif // __has_builtin(__builtin_bswap128)
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3
#endif // _LIBCPP_HAS_NO_INT128
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3
  } else {
    static_assert(sizeof(_Tp) == 0, "byteswap is unimplemented for integral types of this size");
  }
}

#endif // _LIBCPP_STD_VER >= 23
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___BIT_BYTESWAP_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/byteswap.h" 3
#endif /* byteswap.h expanded by -frewrite-includes */
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/countl.h>
#endif /* expanded by -frewrite-includes */
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* countr.h expanded by -frewrite-includes */
#include <__bit/countr.h>
#else /* countr.h expanded by -frewrite-includes */
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___BIT_COUNTR_H
#define _LIBCPP___BIT_COUNTR_H

#if 0 /* expanded by -frewrite-includes */
#include <__bit/rotate.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
int __libcpp_ctz(unsigned __x)           _NOEXCEPT { return __builtin_ctz(__x); }

_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
int __libcpp_ctz(unsigned long __x)      _NOEXCEPT { return __builtin_ctzl(__x); }

_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
int __libcpp_ctz(unsigned long long __x) _NOEXCEPT { return __builtin_ctzll(__x); }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 3

template <__libcpp_unsigned_integer _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr int countr_zero(_Tp __t) noexcept {
  if (__t == 0)
    return numeric_limits<_Tp>::digits;

  if (sizeof(_Tp) <= sizeof(unsigned int))
    return std::__libcpp_ctz(static_cast<unsigned int>(__t));
  else if (sizeof(_Tp) <= sizeof(unsigned long))
    return std::__libcpp_ctz(static_cast<unsigned long>(__t));
  else if (sizeof(_Tp) <= sizeof(unsigned long long))
    return std::__libcpp_ctz(static_cast<unsigned long long>(__t));
  else {
    int __ret = 0;
    const unsigned int __ulldigits = numeric_limits<unsigned long long>::digits;
    while (static_cast<unsigned long long>(__t) == 0uLL) {
      __ret += __ulldigits;
      __t >>= __ulldigits;
    }
    return __ret + std::__libcpp_ctz(static_cast<unsigned long long>(__t));
  }
}

template <__libcpp_unsigned_integer _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr int countr_one(_Tp __t) noexcept {
  return __t != numeric_limits<_Tp>::max() ? std::countr_zero(static_cast<_Tp>(~__t)) : numeric_limits<_Tp>::digits;
}

#endif // _LIBCPP_STD_VER >= 20
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___BIT_COUNTR_H
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/countr.h" 3
#endif /* countr.h expanded by -frewrite-includes */
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* endian.h expanded by -frewrite-includes */
#include <__bit/endian.h>
#else /* endian.h expanded by -frewrite-includes */
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/endian.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___BIT_ENDIAN_H
#define _LIBCPP___BIT_ENDIAN_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/endian.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/endian.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/endian.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/endian.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/endian.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/endian.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

enum class endian {
  little = 0xDEAD,
  big = 0xFACE,
#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_LITTLE_ENDIAN)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/endian.h" 3
  native = little
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif defined(_LIBCPP_BIG_ENDIAN)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/endian.h" 3
  native = big
#  else
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/endian.h" 3
  native = 0xCAFE
#  endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/endian.h" 3
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/endian.h" 3

#endif // _LIBCPP___BIT_ENDIAN_H
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/endian.h" 3
#endif /* endian.h expanded by -frewrite-includes */
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* has_single_bit.h expanded by -frewrite-includes */
#include <__bit/has_single_bit.h>
#else /* has_single_bit.h expanded by -frewrite-includes */
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/has_single_bit.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___BIT_HAS_SINGLE_BIT_H
#define _LIBCPP___BIT_HAS_SINGLE_BIT_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/has_single_bit.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/has_single_bit.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/has_single_bit.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/has_single_bit.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/has_single_bit.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/has_single_bit.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/has_single_bit.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/has_single_bit.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/has_single_bit.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/has_single_bit.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <__libcpp_unsigned_integer _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool has_single_bit(_Tp __t) noexcept {
  return __t != 0 && (((__t & (__t - 1)) == 0));
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/has_single_bit.h" 3

_LIBCPP_POP_MACROS

#endif // _LIBCPP___BIT_HAS_SINGLE_BIT_H
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/has_single_bit.h" 3
#endif /* has_single_bit.h expanded by -frewrite-includes */
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* popcount.h expanded by -frewrite-includes */
#include <__bit/popcount.h>
#else /* popcount.h expanded by -frewrite-includes */
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___BIT_POPCOUNT_H
#define _LIBCPP___BIT_POPCOUNT_H

#if 0 /* expanded by -frewrite-includes */
#include <__bit/rotate.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
int __libcpp_popcount(unsigned __x)           _NOEXCEPT { return __builtin_popcount(__x); }

inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
int __libcpp_popcount(unsigned long __x)      _NOEXCEPT { return __builtin_popcountl(__x); }

inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
int __libcpp_popcount(unsigned long long __x) _NOEXCEPT { return __builtin_popcountll(__x); }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 3

template <__libcpp_unsigned_integer _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr int popcount(_Tp __t) noexcept {
  if (sizeof(_Tp) <= sizeof(unsigned int))
    return std::__libcpp_popcount(static_cast<unsigned int>(__t));
  else if (sizeof(_Tp) <= sizeof(unsigned long))
    return std::__libcpp_popcount(static_cast<unsigned long>(__t));
  else if (sizeof(_Tp) <= sizeof(unsigned long long))
    return std::__libcpp_popcount(static_cast<unsigned long long>(__t));
  else {
    int __ret = 0;
    while (__t != 0) {
      __ret += std::__libcpp_popcount(static_cast<unsigned long long>(__t));
      __t >>= numeric_limits<unsigned long long>::digits;
    }
    return __ret;
  }
}

#endif // _LIBCPP_STD_VER >= 20
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___BIT_POPCOUNT_H
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/popcount.h" 3
#endif /* popcount.h expanded by -frewrite-includes */
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/rotate.h>
#endif /* expanded by -frewrite-includes */
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
#endif
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
#if 0 /* expanded by -frewrite-includes */
#  include <limits>
#endif /* expanded by -frewrite-includes */
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
#endif
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3

#endif // _LIBCPP_BIT
# 93 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bit" 3
#endif /* bit expanded by -frewrite-includes */
# 18 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h" 2

#endif  //__has_include(<bit>) && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 20 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

namespace cpp20 {

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

using std::bit_cast;

#else  // Use builtin to provide constexpr bit_cast.
# 29 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

#if 0 /* disabled by -frewrite-includes */
#if defined(__has_builtin) && !defined(LIB_STDCOMPAT_NO_BUILTIN_BITCAST)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"
#if 0 /* disabled by -frewrite-includes */
#if __has_builtin(__builtin_bit_cast)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

template <typename To, typename From>
constexpr std::enable_if_t<sizeof(To) == sizeof(From) && std::is_trivially_copyable<To>::value &&
                               std::is_trivially_copyable<From>::value,
                           To>
bit_cast(const From& from) {
  return __builtin_bit_cast(To, from);
}

// Since there are two #if checks, using #else would require code duplication.
// Define a temporary internal macro to indicate that bit_cast was defined.
#define LIB_STDCOMPAT_BIT_CAST_DEFINED_

#endif  // __has_builtin(__builtin_bit_cast)
# 46 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"
#endif  // defined(__has_builtin) && !defined(LIB_STDCOMPAT_NO_BUILTIN_BITCAST)
# 47 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

// Use memcpy instead, not constexpr though.
#ifndef LIB_STDCOMPAT_BIT_CAST_DEFINED_

#define LIB_STDCOMPAT_NONCONSTEXPR_BITCAST 1

template <typename To, typename From>
std::enable_if_t<sizeof(To) == sizeof(From) && std::is_trivially_copyable<To>::value &&
                     std::is_trivially_copyable<From>::value,
                 To>
bit_cast(const From& from) {
  std::aligned_storage_t<sizeof(To)> uninitialized_to;
  std::memcpy(static_cast<void*>(&uninitialized_to),
              static_cast<const void*>(cpp17::addressof(from)), sizeof(To));
  return *reinterpret_cast<const To*>(&uninitialized_to);
}

#endif  // LIB_STDCOMPAT_BIT_CAST_DEFINED_
# 65 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

#undef LIB_STDCOMPAT_BIT_CAST_DEFINED_

#endif  //  __cpp_lib_bit_cast >= 201806L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 69 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_bitops) && __cpp_lib_bitops >= 201907L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 72 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

using std::countl_one;
using std::countl_zero;
using std::countr_one;
using std::countr_zero;
using std::popcount;
using std::rotl;
using std::rotr;

#else
# 82 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

template <class T>
constexpr std::enable_if_t<std::is_unsigned<T>::value, int> countr_zero(T x) noexcept {
  if (x == 0) {
    return std::numeric_limits<T>::digits;
  }

  return internal::count_zeros_from_right(x);
}

template <class T>
constexpr std::enable_if_t<std::is_unsigned<T>::value, int> countl_zero(T x) noexcept {
  if (x == 0) {
    return std::numeric_limits<T>::digits;
  }

  return internal::count_zeros_from_left(x);
}

template <class T>
constexpr std::enable_if_t<std::is_unsigned<T>::value, int> countl_one(T x) noexcept {
  return countl_zero(static_cast<T>(~x));
}

template <class T>
constexpr std::enable_if_t<std::is_unsigned<T>::value, int> countr_one(T x) noexcept {
  return countr_zero(static_cast<T>(~x));
}

template <class T>
[[gnu::warn_unused_result]] constexpr std::enable_if_t<std::is_unsigned<T>::value, T> rotl(
    T x, int s) noexcept {
  return internal::rotl(x, s);
}

template <class T>
[[gnu::warn_unused_result]] constexpr std::enable_if_t<std::is_unsigned<T>::value, T> rotr(
    T x, int s) noexcept {
  return internal::rotr(x, s);
}

template <class T>
constexpr int popcount(T x) noexcept {
  return internal::popcount(x);
}

#endif
# 129 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 202002L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 132 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

using std::bit_ceil;
using std::bit_floor;
using std::bit_width;
using std::has_single_bit;

#else  // Provide polyfills for power of two bit functions.
# 139 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

template <typename T>
constexpr std::enable_if_t<std::is_unsigned<T>::value, bool> has_single_bit(T value) {
  return popcount(value) == static_cast<T>(1);
}

template <typename T>
constexpr std::enable_if_t<std::is_unsigned<T>::value, int> bit_width(T value) {
  return internal::bit_width(value);
}

template <typename T>
constexpr std::enable_if_t<std::is_unsigned<T>::value, T> bit_ceil(T value) {
  if (value <= 1) {
    return T(1);
  }
  return internal::bit_ceil<T>(value);
}

template <typename T>
constexpr std::enable_if_t<std::is_unsigned<T>::value, T> bit_floor(T value) {
  if (value == 0) {
    return 0;
  }
  return internal::bit_floor(value);
}

#endif  // __cpp_lib_int_pow2 >= 202002L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 167 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_endian) && __cpp_lib_endian >= 201907L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

using std::endian;

#else  // Provide polyfill for endian enum.
# 174 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

enum class endian {
  little = 0x11771E,
  big = 0xB16,
  native = internal::native_endianess<little, big>(),
};

#endif
# 182 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"

}  // namespace cpp20

#endif  // LIB_STDCOMPAT_BIT_H_
# 186 "../../sdk/lib/stdcompat/include/lib/stdcompat/bit.h"
#endif /* bit.h expanded by -frewrite-includes */
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/constants.h" 2

#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 10 "../../src/lib/elfldltl/include/lib/elfldltl/constants.h"
# 11 "../../src/lib/elfldltl/include/lib/elfldltl/constants.h"

namespace elfldltl {

// Some header fields have uniform bit values across all kinds of ELF files.
// These are declared here at top level.

// The bit width (32-bit vs 64-bit) is called the "ELF class".
enum class ElfClass : uint8_t {
  k32 = 1,
  k64 = 2,
  kNative =
      []() {
        if constexpr (sizeof(uintptr_t) == sizeof(uint64_t)) {
          return k64;
        } else if constexpr (sizeof(uintptr_t) == sizeof(uint32_t)) {
          return k32;
        }
      }()
};

// The byte order (Least Significant Byte first, aka little-endian, vs
// Most Significant Byte first, aka big-endian) used in ELF metadata.
// All fields are stored as two's complement integers, hence the names.
enum class ElfData : uint8_t {
  k2Lsb = 1,
  k2Msb = 2,
  kNative =
      []() {
        if constexpr (cpp20::endian::native == cpp20::endian::little) {
          return k2Lsb;
        } else if constexpr (cpp20::endian::native == cpp20::endian::big) {
          return k2Msb;
        }
      }()
};

// This is just a fixed constant that cannot vary.
enum class ElfVersion : uint8_t { kCurrent = 1 };

// This indicates the type of ELF file, found in Elf::Ehdr::type().  Only
// ET_DYN is handled at runtime but the others are provided for the convenience
// of other tools.
enum class ElfType : uint16_t {
  kNone = 0,
  kRel = 1,
  kExec = 2,
  kDyn = 3,
  kCore = 4,
};

// These are the types of program headers, found in Elf::Phdr::type().
// This lists only the types used at runtime.
enum class ElfPhdrType : uint32_t {
  kNull = 0,
  kLoad = 1,
  kDynamic = 2,
  kInterp = 3,
  kNote = 4,
  kPhdr = 6,
  kTls = 7,
  kEhFrameHdr = 0x6474e550,  // PT_GNU_EH_FRAME
  kStack = 0x6474e551,       // PT_GNU_STACK
  kRelro = 0x6474e552,       // PT_GNU_RELRO
};

// These are the types of section headers, found in Elf::Shdr::type().
enum class ElfShdrType : uint32_t {
  kNull = 0,
  kProgbits = 1,
  kSymtab = 2,
  kStrtab = 3,
  kRela = 4,
  kHash = 5,
  kDynamic = 6,
  kNote = 7,
  kNobits = 8,
  kRel = 9,
  kShlib = 10,
  kDynsym = 11,
  kInitArray = 14,
  kFiniArray = 15,
  kPreinitArray = 16,
  kGroup = 17,
  kSymtabShndx = 18,
  kGnuAttributes = 0x6ffffff5,
  kGnuHash = 0x6ffffff6,
  kGnuLiblist = 0x6ffffff7,
  kChecksum = 0x6ffffff8,
  kSunwMove = 0x6ffffffa,
  kSunwComdat = 0x6ffffffb,
  kSunwSyminfo = 0x6ffffffc,
  kGnuVerdef = 0x6ffffffd,
  kGnuVerneed = 0x6ffffffe,
  kGnuVersym = 0x6fffffff,
};

// These are the PT_DYNAMIC entry tags, found in Elf::Dyn::tag().
enum class ElfDynTag : uint32_t {
  kNull = 0,
  kNeeded = 1,
  kPltRelSz = 2,
  kPltGot = 3,
  kHash = 4,
  kStrTab = 5,
  kSymTab = 6,
  kRela = 7,
  kRelaSz = 8,
  kRelaEnt = 9,
  kStrSz = 10,
  kSymEnt = 11,
  kInit = 12,
  kFini = 13,
  kSoname = 14,
  kRpath = 15,
  kSymbolic = 16,
  kRel = 17,
  kRelSz = 18,
  kRelEnt = 19,
  kPltRel = 20,
  kDebug = 21,
  kTextRel = 22,
  kJmpRel = 23,
  kBindNow = 24,
  kInitArray = 25,
  kFiniArray = 26,
  kInitArraySz = 27,
  kFiniArraySz = 28,
  kRunPath = 29,
  kFlags = 30,
  kPreinitArray = 32,
  kPreinitArraySz = 33,
  kSymTabShndx = 34,
  kRelrSz = 35,
  kRelr = 36,
  kRelrEnt = 37,
  kFeature1 = 0x6ffffdfc,
  kGnuHash = 0x6ffffef5,
  kTlsDescPlt = 0x6ffffef6,
  kTlsDescGot = 0x6ffffef7,
  kRelaCount = 0x6ffffff9,
  kRelCount = 0x6ffffffa,
  kFlags1 = 0x6ffffffb,
};

// These are the "binding" classes of symbols, found in Elf::Sym::bind().
enum class ElfSymBind : uint8_t {
  kLocal = 0,
  kGlobal = 1,
  kWeak = 2,
  kUnique = 10,  // STB_GNU_UNIQUE is a GNU extension not widely supported.
};

// These are the types of symbols, found in Elf::Sym::type().
enum class ElfSymType : uint8_t {
  kNoType = 0,
  kObject = 1,
  kFunc = 2,
  kSection = 3,
  kFile = 4,
  kCommon = 5,
  kTls = 6,
  kIfunc = 10,  // STT_GNU_IFUNC is a GNU extension not widely supported.
};

// This indicates the machine architecture the ELF file is for, as found in
// Elf::Ehdr::machine().  There are many more EM_* constants specified by ELF.
// This lists only those for which the library provides some degree of support.
enum class ElfMachine : uint16_t {
  kNone = 0,
  k386 = 3,
  kX86_64 = 62,
  kAarch64 = 183,
  kRiscv = 243,

  kNative =
      []() {
#ifdef __aarch64__
        return kAarch64;
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__i386__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 190 "../../src/lib/elfldltl/include/lib/elfldltl/constants.h"
        return k386;
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__x86_64__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 192 "../../src/lib/elfldltl/include/lib/elfldltl/constants.h"
        return kX86_64;
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__riscv)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 194 "../../src/lib/elfldltl/include/lib/elfldltl/constants.h"
        return kRiscv;
#endif
# 196 "../../src/lib/elfldltl/include/lib/elfldltl/constants.h"
        return kNone;
      }()
};

// These are types used in notes.  Other types might appear in note headers.
// Only those used by the library are listed here.
enum class ElfNoteType : uint32_t {
  // These use name "GNU".
  kGnuBuildId = 3,
  kGnuPropertyType0 = 5,
};

}  // namespace elfldltl

#endif  // SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_CONSTANTS_H_
# 211 "../../src/lib/elfldltl/include/lib/elfldltl/constants.h"
#endif /* constants.h expanded by -frewrite-includes */
# 15 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) /* field.h expanded by -frewrite-includes */
#include "field.h"
#else /* field.h expanded by -frewrite-includes */
# 15 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h"
# 1 "../../src/lib/elfldltl/include/lib/elfldltl/field.h" 1
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_FIELD_H_
#define SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_FIELD_H_

#if 0 /* expanded by -frewrite-includes */
#include <lib/stdcompat/bit.h>
#endif /* expanded by -frewrite-includes */
# 8 "../../src/lib/elfldltl/include/lib/elfldltl/field.h"
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/field.h"
#if 0 /* expanded by -frewrite-includes */
#include <lib/stdcompat/type_traits.h>
#endif /* expanded by -frewrite-includes */
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/field.h"
# 10 "../../src/lib/elfldltl/include/lib/elfldltl/field.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) /* utility.h expanded by -frewrite-includes */
#include <lib/stdcompat/utility.h>
#else /* utility.h expanded by -frewrite-includes */
# 10 "../../src/lib/elfldltl/include/lib/elfldltl/field.h"
# 1 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h" 1
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIB_STDCOMPAT_UTILITY_H_
#define LIB_STDCOMPAT_UTILITY_H_

#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 8 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"
# 10 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* utility expanded by -frewrite-includes */
#include <utility>
#else /* utility expanded by -frewrite-includes */
# 10 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_UTILITY
#define _LIBCPP_UTILITY

/*
    utility synopsis

#include <initializer_list>

namespace std
{

template <class T>
    void
    swap(T& a, T& b);

namespace rel_ops
{
    template<class T> bool operator!=(const T&, const T&);
    template<class T> bool operator> (const T&, const T&);
    template<class T> bool operator<=(const T&, const T&);
    template<class T> bool operator>=(const T&, const T&);
}

template<class T>
void
swap(T& a, T& b) noexcept(is_nothrow_move_constructible<T>::value &&
                          is_nothrow_move_assignable<T>::value);

template <class T, size_t N>
void
swap(T (&a)[N], T (&b)[N]) noexcept(noexcept(swap(*a, *b)));

template <class T> T&& forward(typename remove_reference<T>::type& t) noexcept;  // constexpr in C++14
template <class T> T&& forward(typename remove_reference<T>::type&& t) noexcept; // constexpr in C++14

template <typename T>
[[nodiscard]] constexpr
auto forward_like(auto&& x) noexcept -> see below;                               // since C++23

template <class T> typename remove_reference<T>::type&& move(T&&) noexcept;      // constexpr in C++14

template <class T>
    typename conditional
    <
        !is_nothrow_move_constructible<T>::value && is_copy_constructible<T>::value,
        const T&,
        T&&
    >::type
    move_if_noexcept(T& x) noexcept; // constexpr in C++14

template <class T> constexpr add_const_t<T>& as_const(T& t) noexcept;      // C++17
template <class T>                      void as_const(const T&&) = delete; // C++17

template <class T> typename add_rvalue_reference<T>::type declval() noexcept;

template<class T, class U> constexpr bool cmp_equal(T t, U u) noexcept;         // C++20
template<class T, class U> constexpr bool cmp_not_equal(T t, U u) noexcept;     // C++20
template<class T, class U> constexpr bool cmp_less(T t, U u) noexcept;          // C++20
template<class T, class U> constexpr bool cmp_greater(T t, U u) noexcept;       // C++20
template<class T, class U> constexpr bool cmp_less_equal(T t, U u) noexcept;    // C++20
template<class T, class U> constexpr bool cmp_greater_equal(T t, U u) noexcept; // C++20
template<class R, class T> constexpr bool in_range(T t) noexcept;               // C++20

template <class T1, class T2>
struct pair
{
    typedef T1 first_type;
    typedef T2 second_type;

    T1 first;
    T2 second;

    pair(const pair&) = default;
    pair(pair&&) = default;
    explicit(see-below) constexpr pair();
    explicit(see-below) pair(const T1& x, const T2& y);                          // constexpr in C++14
    template <class U = T1, class V = T2> explicit(see-below) pair(U&&, V&&);    // constexpr in C++14
    template <class U, class V> constexpr explicit(see-below) pair(pair<U, V>&); // since C++23
    template <class U, class V> explicit(see-below) pair(const pair<U, V>& p);   // constexpr in C++14
    template <class U, class V> explicit(see-below) pair(pair<U, V>&& p);        // constexpr in C++14
    template <class U, class V>
    constexpr explicit(see-below) pair(const pair<U, V>&&);                      // since C++23
    template <pair-like P> constexpr explicit(see-below) pair(P&&);              // since C++23
    template <class... Args1, class... Args2>
        pair(piecewise_construct_t, tuple<Args1...> first_args,                  // constexpr in C++20
                                    tuple<Args2...> second_args);

    constexpr const pair& operator=(const pair& p) const;                        // since C++23
    template <class U, class V> pair& operator=(const pair<U, V>& p);            // constexpr in C++20
    template <class U, class V>
    constexpr const pair& operator=(const pair<U, V>& p) const;                  // since C++23
    pair& operator=(pair&& p) noexcept(is_nothrow_move_assignable<T1>::value &&
                                       is_nothrow_move_assignable<T2>::value);   // constexpr in C++20
    constexpr const pair& operator=(pair&& p) const;                             // since C++23
    template <class U, class V> pair& operator=(pair<U, V>&& p);                 // constexpr in C++20
    template <class U, class V>
    constexpr const pair& operator=(pair<U, V>&& p) const;                       // since C++23
    template <pair-like P> constexpr pair& operator=(P&&);                       // since C++23
    template <pair-like P> constexpr const pair& operator=(P&&) const;           // since C++23

    void swap(pair& p) noexcept(is_nothrow_swappable_v<T1> &&
                                is_nothrow_swappable_v<T2>);                     // constexpr in C++20
    constexpr void swap(const pair& p) const noexcept(see below);                // since C++23
};

template<class T1, class T2, class U1, class U2, template<class> class TQual, template<class> class UQual>
struct basic_common_reference<pair<T1, T2>, pair<U1, U2>, TQual, UQual>;         // since C++23

template<class T1, class T2, class U1, class U2>
struct common_type<pair<T1, T2>, pair<U1, U2>>;                                  // since C++23

template<class T1, class T2> pair(T1, T2) -> pair<T1, T2>;

template <class T1, class T2, class U1, class U2>
bool operator==(const pair<T1,T2>&, const pair<U1,U2>&);                         // constexpr in C++14
template <class T1, class T2, class U1, class U2>
bool operator!=(const pair<T1,T2>&, const pair<U1,U2>&);                         // constexpr in C++14, removed in C++20
template <class T1, class T2, class U1, class U2>
bool operator< (const pair<T1,T2>&, const pair<U1,U2>&);                         // constexpr in C++14, removed in C++20
template <class T1, class T2, class U1, class U2>
bool operator> (const pair<T1,T2>&, const pair<U1,U2>&);                         // constexpr in C++14, removed in C++20
template <class T1, class T2, class U1, class U2>
bool operator>=(const pair<T1,T2>&, const pair<U1,U2>&);                         // constexpr in C++14, removed in C++20
template <class T1, class T2, class U1, class U2>
bool operator<=(const pair<T1,T2>&, const pair<U1,U2>&);                         // constexpr in C++14, removed in C++20
template <class T1, class T2, class U1, class U2>
  constexpr common_comparison_type_t<synth-three-way-result<T1,U1>,
                                     synth-three-way-result<T2,U2>>
    operator<=>(const pair<T1,T2>&, const pair<U1,U2>&);                         // C++20

template <class T1, class T2> pair<V1, V2> make_pair(T1&&, T2&&);                // constexpr in C++14
template <class T1, class T2>
void
swap(pair<T1, T2>& x, pair<T1, T2>& y) noexcept(noexcept(x.swap(y)));            // constexpr in C++20

template<class T1, class T2>                                                     // since C++23
constexpr void swap(const pair<T1, T2>& x, const pair<T1, T2>& y) noexcept(noexcept(x.swap(y)));

struct piecewise_construct_t { explicit piecewise_construct_t() = default; };
inline constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();

template <class T> struct tuple_size;
template <size_t I, class T> struct tuple_element;

template <class T1, class T2> struct tuple_size<pair<T1, T2> >;
template <class T1, class T2> struct tuple_element<0, pair<T1, T2> >;
template <class T1, class T2> struct tuple_element<1, pair<T1, T2> >;

template<size_t I, class T1, class T2>
    typename tuple_element<I, pair<T1, T2> >::type&
    get(pair<T1, T2>&) noexcept; // constexpr in C++14

template<size_t I, class T1, class T2>
    const typename tuple_element<I, pair<T1, T2> >::type&
    get(const pair<T1, T2>&) noexcept; // constexpr in C++14

template<size_t I, class T1, class T2>
    typename tuple_element<I, pair<T1, T2> >::type&&
    get(pair<T1, T2>&&) noexcept; // constexpr in C++14

template<size_t I, class T1, class T2>
    const typename tuple_element<I, pair<T1, T2> >::type&&
    get(const pair<T1, T2>&&) noexcept; // constexpr in C++14

template<class T1, class T2>
    constexpr T1& get(pair<T1, T2>&) noexcept; // C++14

template<class T1, class T2>
    constexpr const T1& get(const pair<T1, T2>&) noexcept; // C++14

template<class T1, class T2>
    constexpr T1&& get(pair<T1, T2>&&) noexcept; // C++14

template<class T1, class T2>
    constexpr const T1&& get(const pair<T1, T2>&&) noexcept; // C++14

template<class T1, class T2>
    constexpr T1& get(pair<T2, T1>&) noexcept; // C++14

template<class T1, class T2>
    constexpr const T1& get(const pair<T2, T1>&) noexcept; // C++14

template<class T1, class T2>
    constexpr T1&& get(pair<T2, T1>&&) noexcept; // C++14

template<class T1, class T2>
    constexpr const T1&& get(const pair<T2, T1>&&) noexcept; // C++14

// C++14

template<class T, T... I>
struct integer_sequence
{
    typedef T value_type;

    static constexpr size_t size() noexcept;
};

template<size_t... I>
  using index_sequence = integer_sequence<size_t, I...>;

template<class T, T N>
  using make_integer_sequence = integer_sequence<T, 0, 1, ..., N-1>;
template<size_t N>
  using make_index_sequence = make_integer_sequence<size_t, N>;

template<class... T>
  using index_sequence_for = make_index_sequence<sizeof...(T)>;

template<class T, class U=T>
    constexpr T exchange(T& obj, U&& new_value)                                 // constexpr in C++17, noexcept in C++23
      noexcept(is_nothrow_move_constructible<T>::value && is_nothrow_assignable<T&, U>::value);

// 20.2.7, in-place construction // C++17
struct in_place_t {
  explicit in_place_t() = default;
};
inline constexpr in_place_t in_place{};
template <class T>
  struct in_place_type_t {
    explicit in_place_type_t() = default;
  };
template <class T>
  inline constexpr in_place_type_t<T> in_place_type{};
template <size_t I>
  struct in_place_index_t {
    explicit in_place_index_t() = default;
  };
template <size_t I>
  inline constexpr in_place_index_t<I> in_place_index{};

// [utility.underlying], to_underlying
template <class T>
    constexpr underlying_type_t<T> to_underlying( T value ) noexcept; // C++23

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 249 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 250 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 250 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 251 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* as_const.h expanded by -frewrite-includes */
#include <__utility/as_const.h>
#else /* as_const.h expanded by -frewrite-includes */
# 251 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/as_const.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_AS_CONST_H
#define _LIBCPP___UTILITY_AS_CONST_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/as_const.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/as_const.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_const.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/as_const.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/as_const.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/as_const.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/as_const.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/as_const.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/as_const.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/as_const.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/as_const.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/as_const.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/as_const.h" 3
template <class _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr add_const_t<_Tp>& as_const(_Tp& __t) noexcept { return __t; }

template <class _Tp>
void as_const(const _Tp&&) = delete;
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/as_const.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___UTILITY_AS_CONST_H
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/as_const.h" 3
#endif /* as_const.h expanded by -frewrite-includes */
# 252 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/auto_cast.h>
#endif /* expanded by -frewrite-includes */
# 252 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 253 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cmp.h expanded by -frewrite-includes */
#include <__utility/cmp.h>
#else /* cmp.h expanded by -frewrite-includes */
# 253 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_CMP_H
#define _LIBCPP___UTILITY_CMP_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/disjunction.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_signed.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
template<class _Tp, class... _Up>
struct _IsSameAsAny : _Or<_IsSame<_Tp, _Up>...> {};

template<class _Tp>
concept __is_safe_integral_cmp = is_integral_v<_Tp> &&
                      !_IsSameAsAny<_Tp, bool, char, char16_t, char32_t
#ifndef _LIBCPP_HAS_NO_CHAR8_T
                                    , char8_t
#endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
                                    , wchar_t
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
                                    >::value;

template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
bool cmp_equal(_Tp __t, _Up __u) noexcept
{
  if constexpr (is_signed_v<_Tp> == is_signed_v<_Up>)
    return __t == __u;
  else if constexpr (is_signed_v<_Tp>)
    return __t < 0 ? false : make_unsigned_t<_Tp>(__t) == __u;
  else
    return __u < 0 ? false : __t == make_unsigned_t<_Up>(__u);
}

template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
bool cmp_not_equal(_Tp __t, _Up __u) noexcept
{
  return !_VSTD::cmp_equal(__t, __u);
}

template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
bool cmp_less(_Tp __t, _Up __u) noexcept
{
  if constexpr (is_signed_v<_Tp> == is_signed_v<_Up>)
    return __t < __u;
  else if constexpr (is_signed_v<_Tp>)
    return __t < 0 ? true : make_unsigned_t<_Tp>(__t) < __u;
  else
    return __u < 0 ? false : __t < make_unsigned_t<_Up>(__u);
}

template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
bool cmp_greater(_Tp __t, _Up __u) noexcept
{
  return _VSTD::cmp_less(__u, __t);
}

template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
bool cmp_less_equal(_Tp __t, _Up __u) noexcept
{
  return !_VSTD::cmp_greater(__t, __u);
}

template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
bool cmp_greater_equal(_Tp __t, _Up __u) noexcept
{
  return !_VSTD::cmp_less(__t, __u);
}

template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up>
_LIBCPP_INLINE_VISIBILITY constexpr
bool in_range(_Up __u) noexcept
{
  return _VSTD::cmp_less_equal(__u, numeric_limits<_Tp>::max()) &&
         _VSTD::cmp_greater_equal(__u, numeric_limits<_Tp>::min());
}
#endif // _LIBCPP_STD_VER >= 20
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___UTILITY_CMP_H
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/cmp.h" 3
#endif /* cmp.h expanded by -frewrite-includes */
# 254 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 254 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 255 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/exception_guard.h>
#endif /* expanded by -frewrite-includes */
# 255 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 256 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/exchange.h>
#endif /* expanded by -frewrite-includes */
# 256 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 257 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 257 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 258 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* forward_like.h expanded by -frewrite-includes */
#include <__utility/forward_like.h>
#else /* forward_like.h expanded by -frewrite-includes */
# 258 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_FORWARD_LIKE_H
#define _LIBCPP___UTILITY_FORWARD_LIKE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_const.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3

template <class _Ap, class _Bp>
using _CopyConst = _If<is_const_v<_Ap>, const _Bp, _Bp>;

template <class _Ap, class _Bp>
using _OverrideRef = _If<is_rvalue_reference_v<_Ap>, remove_reference_t<_Bp>&&, _Bp&>;

template <class _Ap, class _Bp>
using _ForwardLike = _OverrideRef<_Ap&&, _CopyConst<remove_reference_t<_Ap>, remove_reference_t<_Bp>>>;

template <class _Tp, class _Up>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto forward_like(_LIBCPP_LIFETIMEBOUND _Up&& __ux) noexcept
    -> _ForwardLike<_Tp, _Up> {
  return static_cast<_ForwardLike<_Tp, _Up>>(__ux);
}

#endif // _LIBCPP_STD_VER >= 23
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___UTILITY_FORWARD_LIKE_H
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/forward_like.h" 3
#endif /* forward_like.h expanded by -frewrite-includes */
# 259 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/in_place.h>
#endif /* expanded by -frewrite-includes */
# 259 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 260 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/integer_sequence.h>
#endif /* expanded by -frewrite-includes */
# 260 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 261 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 261 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 262 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 262 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 263 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/piecewise_construct.h>
#endif /* expanded by -frewrite-includes */
# 263 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 264 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/priority_tag.h>
#endif /* expanded by -frewrite-includes */
# 264 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 265 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* rel_ops.h expanded by -frewrite-includes */
#include <__utility/rel_ops.h>
#else /* rel_ops.h expanded by -frewrite-includes */
# 265 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/rel_ops.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_REL_OPS_H
#define _LIBCPP___UTILITY_REL_OPS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/rel_ops.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/rel_ops.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/rel_ops.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/rel_ops.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/rel_ops.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace rel_ops
{

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const _Tp& __x, const _Tp& __y)
{
    return !(__x == __y);
}

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator> (const _Tp& __x, const _Tp& __y)
{
    return __y < __x;
}

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<=(const _Tp& __x, const _Tp& __y)
{
    return !(__y < __x);
}

template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator>=(const _Tp& __x, const _Tp& __y)
{
    return !(__x < __y);
}

} // namespace rel_ops

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___UTILITY_REL_OPS_H
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/rel_ops.h" 3
#endif /* rel_ops.h expanded by -frewrite-includes */
# 266 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 266 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 267 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* to_underlying.h expanded by -frewrite-includes */
#include <__utility/to_underlying.h>
#else /* to_underlying.h expanded by -frewrite-includes */
# 267 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/to_underlying.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_TO_UNDERLYING_H
#define _LIBCPP___UTILITY_TO_UNDERLYING_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/to_underlying.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/to_underlying.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/underlying_type.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/to_underlying.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/to_underlying.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/to_underlying.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/to_underlying.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/to_underlying.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#ifndef _LIBCPP_CXX03_LANG
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr typename underlying_type<_Tp>::type
__to_underlying(_Tp __val) noexcept {
  return static_cast<typename underlying_type<_Tp>::type>(__val);
}
#endif // !_LIBCPP_CXX03_LANG
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/to_underlying.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/to_underlying.h" 3
template <class _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_INLINE_VISIBILITY constexpr underlying_type_t<_Tp>
to_underlying(_Tp __val) noexcept {
  return _VSTD::__to_underlying(__val);
}
#endif
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/to_underlying.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___UTILITY_TO_UNDERLYING_H
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/to_underlying.h" 3
#endif /* to_underlying.h expanded by -frewrite-includes */
# 268 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/unreachable.h>
#endif /* expanded by -frewrite-includes */
# 268 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 269 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 269 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 270 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3

// standard-mandated includes

// [utility.syn]
#if 0 /* expanded by -frewrite-includes */
#include <compare>
#endif /* expanded by -frewrite-includes */
# 274 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 275 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 275 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 276 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3

// [tuple.helper]
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_element.h>
#endif /* expanded by -frewrite-includes */
# 278 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 279 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_size.h>
#endif /* expanded by -frewrite-includes */
# 279 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 280 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 282 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 283 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#endif
# 284 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 286 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 286 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 287 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 287 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 288 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 288 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
# 289 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#endif
# 290 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3

#endif // _LIBCPP_UTILITY
# 292 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/utility" 3
#endif /* utility expanded by -frewrite-includes */
# 11 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h" 2

#if defined(__CLANG_REWRITTEN_INCLUDES) /* utility.h expanded by -frewrite-includes */
#include "internal/utility.h"
#else /* utility.h expanded by -frewrite-includes */
# 12 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"
# 1 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/utility.h" 1
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIB_STDCOMPAT_INTERNAL_UTILITY_H_
#define LIB_STDCOMPAT_INTERNAL_UTILITY_H_

#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 8 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/utility.h"
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/utility.h"
#if 0 /* expanded by -frewrite-includes */
#include <utility>
#endif /* expanded by -frewrite-includes */
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/utility.h"
# 10 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/utility.h"

#if 0 /* expanded by -frewrite-includes */
#include "../type_traits.h"
#endif /* expanded by -frewrite-includes */
# 11 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/utility.h"
# 12 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/utility.h"

namespace cpp17 {
namespace internal {

template <typename Tag>
struct instantiate_templated_tag {
  static constexpr const Tag storage{};
};

template <typename Tag>
constexpr const Tag instantiate_templated_tag<Tag>::storage;

template <typename T, typename ValueType, ValueType Value>
struct inline_storage {
  static constexpr const ValueType storage{Value};
};

template <typename T, typename ValueType, ValueType Value>
constexpr const ValueType inline_storage<T, ValueType, Value>::storage;

// Utility to return the first type in a parameter pack.
template <typename... Ts>
struct first;
template <typename First, typename... Rest>
struct first<First, Rest...> {
  using type = First;
};

template <typename... Ts>
using first_t = typename first<Ts...>::type;

// Utility to count the occurences of type T in the parameter pack Ts.
template <typename T, typename... Ts>
struct occurences_of : std::integral_constant<std::size_t, 0> {};
template <typename T, typename U>
struct occurences_of<T, U> : std::integral_constant<std::size_t, std::is_same<T, U>::value> {};
template <typename T, typename First, typename... Rest>
struct occurences_of<T, First, Rest...>
    : std::integral_constant<std::size_t,
                             occurences_of<T, First>::value + occurences_of<T, Rest...>::value> {};

template <typename T, typename... Ts>
constexpr std::size_t occurences_of_v = occurences_of<T, Ts...>::value;

// Evaluates to truth-like when type T matches type U with cv-reference removed.
template <typename T, typename U>
using not_same_type = negation<std::is_same<T, ::cpp20::remove_cvref_t<U>>>;

// Concept helper for constructors.
template <typename... Conditions>
using requires_conditions = std::enable_if_t<conjunction_v<Conditions...>, bool>;

// Concept helper for assignment operators.
template <typename Return, typename... Conditions>
using assignment_requires_conditions =
    std::enable_if_t<conjunction_v<Conditions...>, std::add_lvalue_reference_t<Return>>;

// Evaluates to true when every element type of Ts is trivially destructible.
template <typename... Ts>
constexpr bool is_trivially_destructible_v = conjunction_v<std::is_trivially_destructible<Ts>...>;

// Evaluates to true when every element type of Ts is trivially copyable.
template <typename... Ts>
constexpr bool is_trivially_copyable_v =
    (conjunction_v<std::is_trivially_copy_assignable<Ts>...> &&
     conjunction_v<std::is_trivially_copy_constructible<Ts>...>);

// Evaluates to true when every element type of Ts is trivially movable.
template <typename... Ts>
constexpr bool is_trivially_movable_v =
    (conjunction_v<std::is_trivially_move_assignable<Ts>...> &&
     conjunction_v<std::is_trivially_move_constructible<Ts>...>);

// Enable if relational operator is convertible to bool and the optional
// conditions are true.
template <typename Op, typename... Conditions>
using enable_relop_t =
    std::enable_if_t<(std::is_convertible<Op, bool>::value && conjunction_v<Conditions...>), bool>;

// Returns true when T is a complete type or an unbounded array.
template <typename T, std::size_t = sizeof(T)>
constexpr bool is_complete_or_unbounded_array(::cpp20::type_identity<T>) {
  return true;
}
template <typename Identity, typename T = typename Identity::type>
constexpr bool is_complete_or_unbounded_array(Identity) {
  return disjunction<std::is_reference<T>, std::is_function<T>, std::is_void<T>,
                     ::cpp20::is_unbounded_array<T>>::value;
}

// Using swap for ADL. This directive is contained within the cpp17::internal
// namespace, which prevents leaking std::swap into user namespaces. Doing this
// at namespace scope is necessary to lookup swap via ADL while preserving the
// noexcept() specification of the resulting lookup.
using std::swap;

// Evaluates to true when T is swappable.
template <typename T, typename = void>
struct is_swappable : std::false_type {
  static_assert(is_complete_or_unbounded_array(::cpp20::type_identity<T>{}),
                "T must be a complete type or an unbounded array!");
};
template <typename T>
struct is_swappable<T, void_t<decltype(swap(std::declval<T&>(), std::declval<T&>()))>>
    : std::true_type {
  static_assert(is_complete_or_unbounded_array(::cpp20::type_identity<T>{}),
                "T must be a complete type or an unbounded array!");
};

// Evaluates to true when T is nothrow swappable.
template <typename T, typename = void>
struct is_nothrow_swappable : std::false_type {
  static_assert(is_complete_or_unbounded_array(::cpp20::type_identity<T>{}),
                "T must be a complete type or an unbounded array!");
};
template <typename T>
struct is_nothrow_swappable<T, void_t<decltype(swap(std::declval<T&>(), std::declval<T&>()))>>
    : std::integral_constant<bool, noexcept(swap(std::declval<T&>(), std::declval<T&>()))> {
  static_assert(is_complete_or_unbounded_array(::cpp20::type_identity<T>{}),
                "T must be a complete type or an unbounded array!");
};

}  // namespace internal
}  // namespace cpp17

#endif  // LIB_STDCOMPAT_INTERNAL_UTILITY_H_
# 138 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/utility.h"
#endif /* utility.h expanded by -frewrite-includes */
# 13 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "version.h"
#endif /* expanded by -frewrite-includes */
# 13 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"
# 14 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"

namespace cpp17 {
// Use alias for cpp17 and above.
#if 0 /* disabled by -frewrite-includes */
#if __cplusplus >= 201411L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"

using std::in_place;
using std::in_place_t;

using std::in_place_index;
using std::in_place_index_t;

using std::in_place_type;
using std::in_place_type_t;

#else  // Provide provide polyfills for |in_place*| types and variables.
# 29 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"

// Tag for requesting in-place initialization.
struct in_place_t {
  explicit constexpr in_place_t() = default;
};

// Tag for requesting in-place initialization by type.
template <typename T>
struct in_place_type_t {
  explicit constexpr in_place_type_t() = default;
};

// Tag for requesting in-place initialization by index.
template <std::size_t Index>
struct in_place_index_t final {
  explicit constexpr in_place_index_t() = default;
};

// Use inline variables if available.
#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_inline_variables) && __cpp_inline_variables >= 201606L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 50 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"

constexpr in_place_t in_place{};

template <typename T>
constexpr in_place_type_t<T> in_place_type{};

template <std::size_t Index>
constexpr in_place_index_t<Index> in_place_index{};

#else  // Provide polyfill reference to provided variable storage.
# 60 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"

static constexpr const in_place_t& in_place =
    internal::instantiate_templated_tag<in_place_t>::storage;

template <typename T>
static constexpr const in_place_type_t<T>& in_place_type =
    internal::instantiate_templated_tag<in_place_type_t<T>>::storage;

template <std::size_t Index>
static constexpr const in_place_index_t<Index>& in_place_index =
    internal::instantiate_templated_tag<in_place_index_t<Index>>::storage;

#endif  // __cpp_inline_variables >= 201606L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 73 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"

#endif  // __cplusplus >= 201411L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 75 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_as_const) && __cpp_lib_as_const >= 201510L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 78 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"

using std::as_const;

#else  // Provide as_const polyfill.
# 82 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"

template <typename T>
constexpr std::add_const_t<T>& as_const(T& t) noexcept {
  return t;
}

template <typename T>
void as_const(T&&) = delete;

#endif  // __cpp_lib_as_const >= 201510L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 92 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"

}  // namespace cpp17

namespace cpp20 {

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_constexpr_algorithms) && __cpp_lib_constexpr_algorithms >= 201806L && \
    !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 99 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"

using std::exchange;

#else  // Add swap constexpr polyfill.
# 103 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"

template <
    typename T, typename U = T,
    typename std::enable_if<std::is_move_assignable<T>::value && cpp17::is_assignable_v<T&, U>,
                            bool>::type = true>
constexpr T exchange(T& obj, U&& new_value) {
  T old = std::move(obj);
  obj = std::forward<U>(new_value);
  return old;
}

#endif  // __cpp_lib_constexpr_algorithms >= 201806L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 115 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"

}  // namespace cpp20

#endif  // LIB_STDCOMPAT_UTILITY_H_
# 119 "../../sdk/lib/stdcompat/include/lib/stdcompat/utility.h"
#endif /* utility.h expanded by -frewrite-includes */
# 11 "../../src/lib/elfldltl/include/lib/elfldltl/field.h" 2

#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 12 "../../src/lib/elfldltl/include/lib/elfldltl/field.h"
# 13 "../../src/lib/elfldltl/include/lib/elfldltl/field.h"

namespace elfldltl {

// This wraps an unsigned integer type T, which might need byte-swapping.
// If kSwap is false, this is a fancy way to just define a plain integer.
// If kSwap is true, then assignments, extractions, and comparisons (only
// == and != are supported, not all inequalities) perform byte-swapping.
// The type is constexpr friendly and safely default (zero) constructible.
// But it's usually used only via a pointer to memory holding data from an
// ELF file or target process memory.
template <typename T, bool kSwap>
class UnsignedField {
 public:
  using value_type = T;

  static_assert(std::is_integral_v<value_type>);
  static_assert(std::is_unsigned_v<value_type>);

  constexpr UnsignedField() = default;

  constexpr UnsignedField(const UnsignedField&) = default;

  constexpr UnsignedField(value_type x) : value_(Convert(x)) {}

  explicit constexpr UnsignedField(std::array<std::byte, sizeof(value_type)> bytes)
      : value_(Convert(bytes)) {}

  explicit constexpr UnsignedField(std::array<char, sizeof(value_type)> bytes)
      : value_(Convert(bytes)) {}

  constexpr UnsignedField& operator=(const UnsignedField&) = default;

  constexpr UnsignedField& operator=(value_type x) {
    value_ = Convert(x);
    return *this;
  }

  constexpr value_type get() const { return Convert(value_); }

  constexpr value_type operator()() const { return get(); }

  constexpr operator value_type() const { return get(); }

 private:
  template <typename Byte, typename = std::enable_if_t<sizeof(Byte) == 1>>
  static constexpr value_type Convert(std::array<Byte, sizeof(value_type)> bytes) {
    auto [first, last] = [&bytes]() {
      if constexpr (cpp20::endian::native == cpp20::endian::little) {
        return std::make_pair(bytes.crbegin(), bytes.crend());
      } else if constexpr (cpp20::endian::native == cpp20::endian::big) {
        return std::make_pair(bytes.cbegin(), bytes.cend());
      }
    }();
    value_type x{};
    for (auto it = first; it != last; ++it) {
      x <<= 8;
      x |= *it;
    }
    return x;
  }

  static constexpr value_type Convert(value_type val) {
    if constexpr (kSwap) {
      // These are portable expressions for byte-swapping but the compiler will
      // recognize the pattern and emit the optimal single instruction or two.
      if constexpr (sizeof(value_type) == sizeof(uint64_t)) {
        val = (((val >> 56) & 0xff) << 0) | (((val >> 48) & 0xff) << 8) |
              (((val >> 40) & 0xff) << 16) | (((val >> 32) & 0xff) << 24) |
              (((val >> 24) & 0xff) << 32) | (((val >> 16) & 0xff) << 40) |
              (((val >> 8) & 0xff) << 48) | (((val >> 0) & 0xff) << 56);
      } else if constexpr (sizeof(value_type) == sizeof(uint32_t)) {
        val = (((val >> 24) & 0xff) << 0) | (((val >> 16) & 0xff) << 8) |
              (((val >> 8) & 0xff) << 16) | (((val >> 0) & 0xff) << 24);
      } else if constexpr (sizeof(value_type) == sizeof(uint16_t)) {
        val = static_cast<value_type>(((val >> 8) & 0xff) << 0) |
              static_cast<value_type>(((val >> 0) & 0xff) << 8);
      } else {
        static_assert(sizeof(value_type) == sizeof(uint8_t));
      }
    }
    return val;
  }

  value_type value_{};
};

// This is like UnsignedField but for signed integer types.
// Note that T is the corresponding unsigned integer type, not
// the signed integer type.  The SignedField<T> object behaves
// for implicit conversions like the signed integer type.
template <typename T, bool kSwap>
class SignedField final : public UnsignedField<T, kSwap> {
 public:
  using Base = UnsignedField<T, kSwap>;

  using value_type = std::make_signed_t<T>;

  using Base::Base;

  constexpr SignedField& operator=(value_type x) {
    Base::operator=(cpp20::bit_cast<T>(x));
    return *this;
  }

  constexpr value_type get() const { return Base::get(); }

  constexpr value_type operator()() const { return get(); }

  constexpr operator value_type() const { return get(); }
};

// This is like UnsignedField but for enum types defined with a specified
// underlying unsigned integer type.  The underlying type of the actual field
// to access (before possible byte-swapping) can be given as an explicit
// template argument if in case it differs from the enum's underlying type.
template <typename T, bool kSwap, typename Uint = std::underlying_type_t<T>>
class EnumField final {
 public:
  using value_type = T;
  static_assert(std::is_enum_v<value_type>);

  constexpr EnumField() = default;

  constexpr EnumField(const EnumField&) = default;

  constexpr EnumField(value_type x) : value_(static_cast<Uint>(x)) {}

  constexpr EnumField& operator=(const EnumField&) = default;

  constexpr EnumField& operator=(value_type x) {
    value_ = static_cast<Uint>(x);
    return *this;
  }

  constexpr bool operator==(const EnumField& other) { return value_ == other.value_; }
  constexpr bool operator!=(const EnumField& other) { return value_ != other.value_; }

  constexpr bool operator==(value_type other) { return *this == EnumField{other}; }
  constexpr bool operator!=(value_type other) { return *this != EnumField{other}; }

  constexpr value_type get() const { return static_cast<value_type>(value_.get()); }

  constexpr value_type operator()() const { return get(); }

  constexpr operator value_type() const { return get(); }

 private:
  UnsignedField<Uint, kSwap> value_;
};

}  // namespace elfldltl

#endif  // SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_FIELD_H_
# 166 "../../src/lib/elfldltl/include/lib/elfldltl/field.h"
#endif /* field.h expanded by -frewrite-includes */
# 16 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h" 2

namespace elfldltl {

// Forward declaration; see <lib/elfldltl/abi-ptr.h>.
struct LocalAbiTraits;

// These types are parameterized by class (32-bit vs 64-bit) and data (byte
// order).  The traditional ELF names Byte, Half, Word, Xword, and Addr are
// used for accessor types that respect the byte order and class.  Note that
// redundant traditional names such as Offset are not used; Addr is used for
// all "address-sized" fields, whether they are offsets, addresses, or sizes.
//
// The Elf<Class, Data> template, abbreviated Elf32<Data> or Elf64<Data>, is
// the intended way to refer to all these types.  The Layout* base types are
// just doing some implementation sharing between template instantiations.
//
// When working with actual values rather than encoded ELF metadata formats,
// the standard uintNN_t types should be used.  The Elf::size_type type is an
// alias for the address-sized unsigned integer type, i.e. the host-side native
// type corresponding to Elf::Addr (which might be a byte-swapping type).
//
// The type and field names for struct types use the traditional terse ELF
// names, but without the traditional prefixes or capitalization.  Each field
// is a byte-order-respecting accessor for the natural underlying type or an
// enum class with the natural underlying type, and has a simple lowercase name
// with no prefix or suffix.  For compound fields, specific accessors are also
// provided to do the bit-field extraction.

// The basic types and some structure layouts are identical across bit width
// (ElfClass).  This base class handles differences in byte order (ElfData).
template <ElfData Data>
struct LayoutBase {
  static constexpr ElfData kData = Data;
  static constexpr bool kSwap = Data != ElfData::kNative;

  template <typename T>
  struct UnsignedType {
    using type = UnsignedField<T, kSwap>;
    static_assert(sizeof(type) == sizeof(T));
    static_assert(alignof(type) == alignof(T));
  };

  template <typename T>
  using Unsigned = typename UnsignedType<T>::type;

  using Byte = Unsigned<uint8_t>;
  using Half = Unsigned<uint16_t>;
  using Word = Unsigned<uint32_t>;
  using Xword = Unsigned<uint64_t>;

  struct Nhdr {
    static constexpr uint32_t Align(uint32_t size) {
      return (size + kAlign - 1) & -uint32_t{kAlign};
    }

    constexpr uint32_t name_offset() const { return sizeof(*this); }

    constexpr uint32_t desc_offset() const { return name_offset() + Align(namesz); }

    constexpr uint32_t size_bytes() const { return desc_offset() + Align(descsz); }

    static constexpr uint32_t kAlign = 4;

    Word namesz;
    Word descsz;
    Word type;
  };
  static_assert(sizeof(Nhdr) == 12);
};

// A base class for the different phdr layouts, ensuring that all of the
// Elf<...>::Phdr definitions below use the same Flags type.
struct PhdrBase {
  // These are individual bits OR'd together.
  enum Flags : uint32_t {
    kExecute = 1 << 0,
    kWrite = 1 << 1,
    kRead = 1 << 2,
  };
};

// A base class for the shdr layout, ensuring that all of the Elf<...>::Shdr
// definitions below use the same Flags type.
struct ShdrBase {
  // These are individual bits OR'd together.
  enum Flags : uint32_t {
    kWrite = 1u << 0,
    kAlloc = 1u << 1,
    kExecinstr = 1u << 2,
    kMerge = 1u << 4,
    kStrings = 1u << 5,
    kInfoLink = 1u << 6,
    kLinkOrder = 1u << 7,
    kOsNonconforming = 1u << 8,
    kGroup = 1u << 9,
    kTls = 1u << 10,
    kCompressed = 1u << 11,
    kOrdered = 1u << 30,
    kExclude = 1u << 31,
  };
};

// A base class for the sym layout, allowing the Elf<...>::Sym definitions
// below to share these methods.
template <class Sym>
struct SymBase {
  constexpr ElfSymBind bind() const {
    return static_cast<ElfSymBind>(static_cast<const Sym*>(this)->info() >> 4);
  }

  constexpr ElfSymType type() const {
    return static_cast<ElfSymType>(static_cast<const Sym*>(this)->info() & 0xf);
  }

  static constexpr uint8_t MakeInfo(ElfSymBind bind, ElfSymType type) {
    return static_cast<uint8_t>((static_cast<uint8_t>(bind) << 4) |
                                (static_cast<uint8_t>(type) << 0));
  }
};

// Some header layouts vary by ElfClass, i.e. address size used in ELF
// metadata.  This is partially specialized by class below.
template <ElfClass Class, ElfData Data>
struct Layout;

// Layout details specific to 32-bit ELF.
template <ElfData Data>
struct Layout<ElfClass::k32, Data> : public LayoutBase<Data> {
  static constexpr ElfClass kClass = ElfClass::k32;

  using LayoutBase<Data>::kData;
  using LayoutBase<Data>::kSwap;
  using typename LayoutBase<Data>::Byte;
  using typename LayoutBase<Data>::Half;
  using typename LayoutBase<Data>::Word;

  using Addr = typename LayoutBase<Data>::template Unsigned<uint32_t>;

  struct Phdr : public PhdrBase {
    EnumField<ElfPhdrType, kSwap> type;
    Addr offset;
    Addr vaddr;
    Addr paddr;
    Addr filesz;
    Addr memsz;
    Word flags;
    Addr align;
  };

  struct Sym : public SymBase<Sym> {
    Word name;
    Addr value;
    Addr size;
    Byte info;
    Byte other;
    Half shndx;
  };

  static constexpr unsigned int kRelTypeBits = 8;
};

// Layout details specific to 64-bit ELF.
template <ElfData Data>
struct Layout<ElfClass::k64, Data> : public LayoutBase<Data> {
  static constexpr ElfClass kClass = ElfClass::k64;

  using LayoutBase<Data>::kData;
  using LayoutBase<Data>::kSwap;
  using typename LayoutBase<Data>::Byte;
  using typename LayoutBase<Data>::Half;
  using typename LayoutBase<Data>::Word;

  using Addr = typename LayoutBase<Data>::template Unsigned<uint64_t>;

  struct Phdr : public PhdrBase {
    EnumField<ElfPhdrType, kSwap> type;
    Word flags;
    Addr offset;
    Addr vaddr;
    Addr paddr;
    Addr filesz;
    Addr memsz;
    Addr align;
  };

  struct Sym : public SymBase<Sym> {
    Word name;
    Byte info;
    Byte other;
    Half shndx;
    Addr value;
    Addr size;
  };

  static constexpr unsigned int kRelTypeBits = 32;
};

// Forward declarations (see note.h).
struct ElfNote;
template <ElfData Data>
class ElfNoteSegment;

template <typename Addr>
constexpr auto kAddrBits = std::numeric_limits<typename Addr::value_type>::digits;

// The various ELF data structure layouts differ by class (32-bit vs 64-bit).
// But many use the same layout with certain fields being either 32 or 64 bits.
// The layouts that actually differ in field order and the like are defined by
// the Layout base class; the common-by-analogy layouts are defined here.
template <ElfClass Class = ElfClass::kNative, ElfData Data = ElfData::kNative>
struct Elf : private Layout<Class, Data> {
  static constexpr ElfClass kClass = Class;
  static constexpr ElfData kData = Data;

  using Layout<Class, Data>::kSwap;
  using typename Layout<Class, Data>::Byte;
  using typename Layout<Class, Data>::Half;
  using typename Layout<Class, Data>::Word;
  using typename Layout<Class, Data>::Xword;
  using typename Layout<Class, Data>::Addr;

  using size_type = typename Addr::value_type;

  using Addend = SignedField<size_type, kSwap>;

  static constexpr auto kAddressBits = kAddrBits<Addr>;

  using typename Layout<Class, Data>::Nhdr;

  using Note = ElfNote;
  using NoteSegment = ElfNoteSegment<kData>;

  struct Ehdr {
    using ElfLayout = Elf;

    constexpr bool Valid() const {
      return magic == kMagic &&                        // It's ELF at all,
             elfclass == Class && elfdata == Data &&   // of the right sort,
             ident_version == ElfVersion::kCurrent &&  // and passes basic
             version == ElfVersion::kCurrent &&        // sanity checks of
             ehsize == sizeof(Ehdr);                   // various sorts.
    }

    // This is the verbose version that uses the Diagnostics template API (see
    // diagnostics.h) to report why it returns false when it does.
    template <class Diagnostics>
    constexpr bool Valid(Diagnostics& diagnostics) const {
      using namespace std::literals::string_view_literals;

      // The diagnostics object might tell us to keep going after each error.
      bool valid = true;
      auto check = [&](bool ok, auto&& error) -> bool {
        if (ok) {
          return true;
        }
        valid = false;
        return diagnostics.FormatError(std::forward<decltype(error)>(error));
      };

      return check(magic == kMagic, "not an ELF file"sv) &&
             check(elfclass == Class, "wrong ELF class (bit-width)"sv) &&
             check(elfdata == Data, "wrong byte order"sv) &&
             check(version == ElfVersion::kCurrent, "wrong e_version value"sv) &&
             check(ehsize == sizeof(Ehdr), "wrong e_ehsize value"sv) &&
             check(ident_version == ElfVersion::kCurrent, "wrong EI_VERSION value"sv) && valid;
    }

    constexpr bool Loadable(std::optional<ElfMachine> target = ElfMachine::kNative) const {
      return Valid() && type == ElfType::kDyn && (!target || machine == target);
    }

    // This is the verbose version that uses the Diagnostics template API (see
    // diagnostics.h) to report why it returns false when it does.
    template <class Diagnostics>
    constexpr bool Loadable(Diagnostics& diagnostics,
                            std::optional<ElfMachine> target = ElfMachine::kNative) const {
      using namespace std::literals::string_view_literals;

      if (!Valid(diagnostics)) [[unlikely]] {
        return false;
      }

      if (target && machine != target) [[unlikely]] {
        diagnostics.FormatError("wrong e_machine for architecture"sv);
        return false;
      }

      switch (type()) {
        case ElfType::kDyn:
          [[likely]];
          break;
        case ElfType::kExec:
          diagnostics.FormatError(
              "loading ET_EXEC files is not supported, only ET_DYN files;"
              " be sure to compile and link as PIE (-fPIE, -pie)"sv);
          return false;
        case ElfType::kRel:
          diagnostics.FormatError("ET_REL files cannot be loaded"sv);
          return false;
        case ElfType::kCore:
          diagnostics.FormatError("ET_CORE files cannot be loaded"sv);
          return false;
        default:
          diagnostics.FormatError("unrecognized e_type value"sv, static_cast<uint32_t>(type()));
          return false;
      }

      return true;
    }

    static constexpr Word kMagic{std::array{'\x7f', 'E', 'L', 'F'}};

    // phnum has this value to indicate the real number of phdrs is too large
    // to fit and is instead stored in shdr[0].info.
    static inline const Half kPnXnum{0xffff};

    // These together make up the traditional unsigned char e_ident[16].
    Word magic;
    ElfClass elfclass;
    ElfData elfdata;
    ElfVersion ident_version;
    Byte osabi;
    Byte abiversion;
    Byte ident_pad[7];

    EnumField<ElfType, kSwap> type;
    EnumField<ElfMachine, kSwap> machine;
    EnumField<ElfVersion, kSwap, uint32_t> version;
    Addr entry;
    Addr phoff;
    Addr shoff;
    Word flags;
    Half ehsize;
    Half phentsize;
    Half phnum;
    Half shentsize;
    Half shnum;
    Half shstrndx;
  };

  using typename Layout<Class, Data>::Phdr;

  // This is not really used at runtime except for the kPnXnum protocol.
  // But it's useful to have all the values handy for diagnostic tools.
  struct Shdr : public ShdrBase {
    Word name;
    EnumField<ElfShdrType, kSwap> type;
    Addr flags;
    Addr addr;
    Addr offset;
    Addr size;
    Word link;
    Word info;
    Addr addralign;
    Addr entsize;
  };

  struct Dyn {
    EnumField<ElfDynTag, kSwap, size_type> tag;

    // Traditionally this was a union d_un of d_val and d_ptr, but both with
    // types that are just an address-sized unsigned integer.  Sometimes the
    // value is a "pointer" (relative to load bias) to some data structure.
    // Sometimes it's a byte size.  Sometimes it's an enum constant.
    Addr val;
  };

  using typename Layout<Class, Data>::Sym;

  // These two classes are copied so that these types can be both easily
  // aggregate initialized and designated initialized. We can't have both
  // if we opt to use inheritance to save some code duplication in these
  // two classes. Note, Phdr and Sym types use inheritance in this way
  // and the syntax to aggregate initialize them is ugly {{}, fields...}.
  // In practice, those types are never aggregate initialized because their
  // layout differs between elf classes. The Rel types do not so we wish
  // for them to be easily aggregate initializable. Likewise, we want
  // these types to follow Phdr and Sym and be designated initializable
  // even if this pattern is unlikely to be used on these types.

  struct Rel {
    constexpr uint32_t symndx() const { return static_cast<uint32_t>(info() >> kSymndxShift); }
    constexpr uint32_t type() const { return info() & kTypeMask; }

    static constexpr auto kSymndxShift = Layout<Class, Data>::kRelTypeBits;
    static constexpr auto kTypeMask = (size_type{1} << kSymndxShift) - 1;

    static constexpr Addr MakeInfo(Addr sym_name, uint32_t type) {
      return (sym_name << kSymndxShift) | (static_cast<Addr>(type) & kTypeMask);
    }

    Addr offset;
    Addr info;
  };

  struct Rela {
    constexpr uint32_t symndx() const { return static_cast<uint32_t>(info() >> kSymndxShift); }
    constexpr uint32_t type() const { return info() & kTypeMask; }

    static constexpr auto kSymndxShift = Layout<Class, Data>::kRelTypeBits;
    static constexpr auto kTypeMask = (size_type{1} << kSymndxShift) - 1;

    static constexpr Addr MakeInfo(Addr sym_name, uint32_t type) {
      return (sym_name << kSymndxShift) | (static_cast<Addr>(type) & kTypeMask);
    }

    Addr offset;
    Addr info;
    SignedField<size_type, kSwap> addend;
  };

  // These are declared in svr4-abi.h rather than there.  These are not
  // formally parts of the ELF format, but rather de facto standard ABI types
  // from the original SVR4 implementation that introduced ELF that have been
  // kept compatible in other implementations historically.

  template <class AbiTraits = LocalAbiTraits>
  struct LinkMap;

  template <class AbiTraits = LocalAbiTraits>
  struct RDebug;
};

template <ElfData Data = ElfData::kNative>
using Elf32 = Elf<ElfClass::k32, Data>;

template <ElfData Data = ElfData::kNative>
using Elf64 = Elf<ElfClass::k64, Data>;

// This instantiates Template with Elf64<> and Elf32<> as parameters.
template <template <class...> typename Template>
using AllNativeFormats = Template<Elf64<>, Elf32<>>;

// This instantiates Template with each Elf variant as a parameter.
template <template <class...> typename Template>
using AllFormats = Template<Elf64<ElfData::k2Lsb>, Elf32<ElfData::k2Lsb>,  //
                            Elf64<ElfData::k2Msb>, Elf32<ElfData::k2Msb>>;

}  // namespace elfldltl

#endif  // SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_LAYOUT_H_
# 457 "../../src/lib/elfldltl/include/lib/elfldltl/layout.h"
#endif /* layout.h expanded by -frewrite-includes */
# 11 "../../src/lib/elfldltl/include/lib/elfldltl/link-map-list.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) /* svr4-abi.h expanded by -frewrite-includes */
#include "svr4-abi.h"
#else /* svr4-abi.h expanded by -frewrite-includes */
# 11 "../../src/lib/elfldltl/include/lib/elfldltl/link-map-list.h"
# 1 "../../src/lib/elfldltl/include/lib/elfldltl/svr4-abi.h" 1
// Copyright 2023 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_SVR4_ABI_H_
#define SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_SVR4_ABI_H_

#if defined(__CLANG_REWRITTEN_INCLUDES) /* abi-ptr.h expanded by -frewrite-includes */
#include "abi-ptr.h"
#else /* abi-ptr.h expanded by -frewrite-includes */
# 8 "../../src/lib/elfldltl/include/lib/elfldltl/svr4-abi.h"
# 1 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h" 1
// Copyright 2023 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_ABI_PTR_H_
#define SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_ABI_PTR_H_

#if 0 /* expanded by -frewrite-includes */
#include <lib/stdcompat/version.h>
#endif /* expanded by -frewrite-includes */
# 8 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h"
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cassert expanded by -frewrite-includes */
#include <cassert>
#else /* cassert expanded by -frewrite-includes */
# 10 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

/*
    cassert synopsis

Macros:

    assert

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3

// <assert.h> is not provided by libc++
#if 0 /* disabled by -frewrite-includes */
#if __has_include(<assert.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* assert.h expanded by -frewrite-includes */
#  include <assert.h>
#else /* assert.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
# 1 "gen/zircon/public/sysroot/cpp/include/assert.h" 1 3 4
#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 1 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
# 2 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

#undef assert

#ifdef NDEBUG
#define assert(x) (void)0
#else
# 8 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__), 0)))
#endif
# 10 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus) && !defined(static_assert)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 12 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
#define static_assert _Static_assert
#endif
# 14 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

#ifdef __cplusplus
extern "C" {
#endif
# 18 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

void __assert_fail(const char*, const char*, int, const char*);

#ifdef __cplusplus
}
#endif
# 24 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
#endif /* assert.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 2 3
#  ifdef _LIBCPP_ASSERT_H
#    error "If libc++ starts defining <assert.h>, the __has_include check should move to libc++'s <assert.h>"
#  endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#endif /* cassert expanded by -frewrite-includes */
# 11 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 11 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h"
# 12 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h"

#if 0 /* disabled by -frewrite-includes */
#if __cpp_impl_three_way_comparison >= 201907L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 14 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h"
#if 0 /* expanded by -frewrite-includes */
#include <compare>
#endif /* expanded by -frewrite-includes */
# 14 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h"
# 15 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h"
#endif
# 16 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h"

#if 0 /* expanded by -frewrite-includes */
#include "layout.h"
#endif /* expanded by -frewrite-includes */
# 17 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h"
# 18 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h"

namespace elfldltl {

// See below.
struct LocalAbiTraits;

// elfldltl::AbiPtr<T> is like a T* but can support a stable and cross-friendly
// ABI.  It can be used to store pointers that use a different byte order,
// address size, or address space, than the current process.  Its main purpose
// is for conversions from pointers in the local address space into pointers in
// a different address space and possibly different format.  The conversions
// are handled elsewhere (TODO(mcgrathr): not yet implemented).
//
// The byte order and address are represented by an elfldltl::Elf<...> type in
// the Elf template parameter; it defaults to the native elfldltl::Elf<>.  The
// type in the Traits template parameter determines whether these are actually
// used in how the pointer is stored; it defaults to LocalAbiTraits, which just
// stores a normal native pointer regardless of the Elf size and encoding.
//
// elfldltl::AbiPtr<T> should be used instead of normal T* in all data
// structures that will exist in one process address space but be populated by
// code running in a different address space.  Such data structures should be
// templated on Elf and AbiTraits classes that are propagated to the
// elfldltl::AbiPtr<T, ...> instantiations they use for pointer-type members.
//
// elfldltl::AbiPtr<T> always supports all the arithmetic operators that real
// T* pointers do.  The Traits type might or might not allow converting the
// stored pointer to a real pointer in the local address space.  If it does,
// then elfldltl::AbiPtr<T> can be used like a smart-pointer type with `get()`
// and `*` and `->` operators and can be constructed from real T* pointers.
//
// The Traits template API is described below.  The default LocalAbiTraits type
// just uses a normal pointer and supports all the the smart-pointer methods
// and operators.
template <typename T, class Elf = elfldltl::Elf<>, class Traits = LocalAbiTraits>
struct AbiPtr {
 public:
  using value_type = T;

  // This is the type used to represent an address in the target address space.
  using Addr = typename Elf::Addr;

  // No matter how the pointer is represented, sizes of objects or arrays it
  // points to must fit into size_type.
  using size_type = typename Elf::size_type;

  // The Traits type determines the underlying type stored.
  using StorageType = typename Traits::template StorageType<Elf, T>;

  constexpr AbiPtr() = default;

  constexpr AbiPtr(const AbiPtr&) = default;

  // If Traits::Get<T> is supported, then Traits::Make<T> is too.
  // In this case, the AbiPtr can be constructed from a normal pointer.
  template <class TT = Traits,
            typename = decltype(TT::template Get<value_type>(std::declval<StorageType>()))>
  constexpr explicit AbiPtr(value_type* ptr) : storage_(Traits::template Make<value_type>(ptr)) {}

  constexpr AbiPtr& operator=(const AbiPtr&) = default;

  template <class TT = Traits,
            typename = decltype(TT::template Get<value_type>(std::declval<StorageType>()))>
  constexpr AbiPtr& operator=(value_type* ptr) {
    *this = AbiPtr{ptr};
    return *this;
  }

  static constexpr AbiPtr FromAddress(Addr address) {
    return AbiPtr{Traits::template FromAddress<Elf, T>(address), std::in_place};
  }

  constexpr explicit operator bool() const { return *this != AbiPtr{}; }

  constexpr bool operator==(const AbiPtr& other) const {
    return ComparisonValue() == other.ComparisonValue();
  }

  constexpr bool operator!=(const AbiPtr& other) const {
    return ComparisonValue() != other.ComparisonValue();
  }

#if 0 /* disabled by -frewrite-includes */
#if __cpp_impl_three_way_comparison >= 201907L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 101 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h"

  constexpr std::strong_ordering operator<=>(const AbiPtr& other) const {
    return ComparisonValue() <=> other.ComparisonValue();
  }

#else  // No operator<=> support.
# 107 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h"

  constexpr bool operator<(const AbiPtr& other) const {
    return ComparisonValue() < other.ComparisonValue();
  }

  constexpr bool operator>(const AbiPtr& other) const {
    return ComparisonValue() > other.ComparisonValue();
  }

  constexpr bool operator<=(const AbiPtr& other) const {
    return ComparisonValue() <= other.ComparisonValue();
  }

  constexpr bool operator>=(const AbiPtr& other) const {
    return ComparisonValue() >= other.ComparisonValue();
  }

#endif  // operator<=> support.
# 125 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h"

  constexpr AbiPtr operator+(size_type n) const {
    return AbiPtr{storage_ + (n * kScale), std::in_place};
  }

  constexpr AbiPtr operator-(size_type n) const {
    return AbiPtr{storage_ - (n * kScale), std::in_place};
  }

  constexpr size_type operator-(const AbiPtr& other) const {
    return static_cast<size_type>(storage_ - other.storage_) / kScale;
  }

  constexpr AbiPtr& operator+=(size_type n) {
    *this = *this + n;
    return *this;
  }

  constexpr AbiPtr& operator-=(size_type n) {
    *this = *this - n;
    return *this;
  }

  // This just returns the address in the target address space.
  constexpr size_type address() const {
    return static_cast<size_type>(Traits::GetAddress(storage_));
  }

  // Dereferencing methods are only available if enabled by the Traits type.

  template <typename TT = Traits,
            typename = decltype(TT::template Get<T>(std::declval<StorageType>()))>
  constexpr T* get() const {
    return Traits::template Get<T>(storage_);
  }

  template <typename TT = Traits,
            typename = decltype(TT::template Get<T>(std::declval<StorageType>()))>
  constexpr T* operator->() const {
    return get();
  }

  template <typename TT = Traits,
            typename = decltype(TT::template Get<T>(std::declval<StorageType>()))>
  constexpr T& operator*() const {
    return *get();
  }

 private:
  static constexpr size_type kScale = Traits::template kScale<T>;

  constexpr explicit AbiPtr(StorageType storage, std::in_place_t in_place) : storage_{storage} {}

  constexpr auto ComparisonValue() const { return Traits::ComparisonValue(storage_); }

  constexpr size_type Scale(size_type n) { return n * kScale; }

  StorageType storage_{};
};

// This is the default Traits type for AbiPtr and things that use it.
// It also serves as the exemplar for the template API.  Comments here
// describe what any Traits type must define.
struct LocalAbiTraits {
  // This must be defined to some type that admits + and - operators with
  // integer types, and operator- with itself.
  template <class Elf, typename T>
  using StorageType = T*;

  // This must be defined to a factor by which an integer should be scaled up
  // before adding or subtracting to StorageType<..., T>, and by which the
  // value of subtracting two StorageType<..., T> values should be scaled down.
  template <typename T>
  static constexpr uint32_t kScale = 1;

  // This must be defined to accept any StorageType<...> argument and yield the
  // address in the target address space as some unsigned integer type.
  static uintptr_t GetAddress(const void* ptr) { return reinterpret_cast<uintptr_t>(ptr); }

  // This must be defined to accept any StorageType<...> argument and yield an
  // integer type that admits operator<=> for comparison of two pointers it's
  // valid to compare by C rules.
  template <typename T>
  static constexpr auto ComparisonValue(T* ptr) {
    return ptr;
  }

  // This must be defined to accept Elf::Addr (or Elf::size_type, since they
  // are mutually convertible).
  template <class Elf, typename T>
  static StorageType<Elf, T> FromAddress(typename Elf::size_type address) {
    return reinterpret_cast<T*>(static_cast<uintptr_t>(address));
  }

  // The last two functions don't have to be defined, but if one is defined
  // then both must be defined.  They convert between a local T* pointer and
  // StorageType<Elf,T> and are only defined when such a conversion exists.

  template <class Elf, typename T>
  static constexpr StorageType<Elf, T> Make(T* ptr) {
    return ptr;
  }

  template <class Elf, typename T>
  static constexpr T* Get(StorageType<Elf, T> ptr) {
    return ptr;
  }
};

// This is a baseline Traits type for storing pointers in a different address
// space and pointer encoding.  An AbiPtr<..., RemoteAbiTraits> type doesn't
// support the get() method and the pointer-like operators.
//
// elfldltl::AbiPtr<T, Elf, elfldltl::RemoteAbiTraits> has in every context the
// same layout that elfldltl::AbiPtr<T> does wherever elfldltl::Elf<> is Elf.
struct RemoteAbiTraits {
  template <class Elf, typename T>
  using StorageType = typename Elf::Addr;

  template <typename T>
  static constexpr uint32_t kScale = sizeof(T);

  template <typename Addr>
  static constexpr auto GetAddress(Addr ptr) {
    return ptr();
  }

  template <typename Addr>
  static constexpr auto ComparisonValue(Addr ptr) {
    return ptr();
  }

  // This must be defined to accept Elf::Addr (or Elf::size_type, since they
  // are mutually convertible).
  template <class Elf, typename T>
  static constexpr StorageType<Elf, T> FromAddress(typename Elf::Addr address) {
    return address;
  }
};

}  // namespace elfldltl

#endif  // SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_ABI_PTR_H_
# 268 "../../src/lib/elfldltl/include/lib/elfldltl/abi-ptr.h"
#endif /* abi-ptr.h expanded by -frewrite-includes */
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/svr4-abi.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "layout.h"
#endif /* expanded by -frewrite-includes */
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/svr4-abi.h"
# 10 "../../src/lib/elfldltl/include/lib/elfldltl/svr4-abi.h"

namespace elfldltl {

// These type layouts are not formally parts of the ELF format, but rather
// de facto standard ABI types from the original SVR4 implementation that
// introduced ELF that have been kept compatible in other implementations
// historically.  In SVR4 and other systems <link.h> declares these types.

// Expected value for RDebug::version field.
inline constexpr uint32_t kRDebugVersion = 1;

// Recognized values for RDebug::state field.  See below.
enum class RDebugState : uint32_t {
  // This indicates that no loading or unloading is in progress, so
  // everything is in a consistent state.
  kConsistent = 0,

  // This indicates that a new module is about to be loaded.  At the next
  // stop when state is kConsistent, the map list can be expected to have
  // an additional module (usually on the end of the list).
  kAdd = 1,

  // This indicates that a new module is about to be unloaded.  At the next
  // stop when state is kConsistent, the map list can be expected to have
  // fewer modules.
  kDelete = 2,
};

// This is the traditional `struct r_debug` that SVR4 and other systems declare
// in <link.h>.  In the original scheme, the DT_DEBUG element in the PT_DYNAMIC
// (.dynamic) data would be updated to point to this in memory so that a
// debugger could examine that in memory to find it.  However, debuggers also
// began looking for known symbol names like `_r_debug` in the dynamic linker
// to find this, so the de facto expectation is that it has that symbol.  The
// scheme of modifying DT_DEBUG is not feasible when .dynamic is read-only, so
// it's not used on systems like Fuchsia with `-z rodynamic` on by default.
template <ElfClass Class, ElfData Data>
template <class AbiTraits>
struct Elf<Class, Data>::RDebug {
  // A version number > 0.  The kRDebugVersion indicates this layout.
  // Higher version numbers would indicate a layout that's compatible with
  // this but has additional fields.
  Word version;

  // The list of modules currently loaded.  This is a doubly-linked list in
  // load order, with a null prev at the beginning and a null next at the
  // end.  For the initial-exec set of modules, the main executable is
  // first in the list and the remainder matches a breadth-first pre-order
  // traversal of the DT_NEEDED graph.
  AbiPtr<const LinkMap<AbiTraits>, Elf, AbiTraits> map;

  // This is a PC location where a breakpoint can be set.  When a dynamic
  // linker does loading or unloading, it executes this PC both before and
  // after the operation with different `.state` values.  A debugger is
  // expected to read out this address, set a breakpoint there, and then
  // when that breakpoint fires to examine `.state` and `.map` to assess
  // the new state of what modules are now loaded.
  Addr brk;

  // This is normally kConsistent.  When a dynamic linker is loading new
  // modules, it sets `.state` to kAdd before executing the `.brk` PC; when
  // unloading modules, it sets `.state` to kRemove before executing the
  // `.brk` PC.  When the operation is finished, it sets `.state` back to
  // kConsistent before executing the `.brk` PC for a second time.
  EnumField<RDebugState, kSwap> state;

  // This is the load bias of the dynamic linker itself.
  Addr ldbase;
};

// This is the traditional `struct link_map` that SVR4 and other systems
// declare in <link.h>.  One of these describes each module loaded, forming a
// doubly-linked list in load order: first the main executable, then its
// DT_NEEDED dependency graph, then modules loaded later at runtime.
template <ElfClass Class, ElfData Data>
template <class AbiTraits>
struct Elf<Class, Data>::LinkMap {
  using ElfLayout = Elf;

  // This is the load bias, meaning the difference between runtime addresses in
  // this process and the link-timeaddress that they appear in this module's
  // ELF metadata (program headers, symbol table, etc.).  More precisely, it's
  // the difference between the runtime address of the module's load image and
  // the first PT_LOAD segment's p_vaddr rounded down to the runtime page size.
  // In most ELF modules the latter is zero and so the load bias is usually
  // equal to the load address; but this does not have to be so.
  Addr addr;

  // This points to a NUL-terminated C string.  For the main executable, it's
  // usually the empty string "".  For others, it's the "name" of the module.
  // What that means exactly depends on how the module was loaded and differs
  // on different systems.  On traditional POSIX systems, it's usually an
  // absolute path name.  On Fuchsia, it's just the name that was presented to
  // the loader service protocol, usually just the plain DT_NEEDED string
  // (which in turn usually matches the DT_SONAME string in the module itself).
  AbiPtr<const char, Elf, AbiTraits> name;

  // This is the runtime address of the PT_DYNAMIC segment (.dynamic) section
  // of this module.  The dynamic linker has already processed the data, so
  // it's guaranteed that there is a proper DT_NULL element terminating the
  // array, though there is no other indication here of the number of elements.
  //
  // Some dynamic linkers on some systems will apply the load bias to address
  // values in .dynamic entries and update them in place, while others do not;
  // on systems like Fuchsia where `-z rodynamic` is on by default, this points
  // to read-only space that cannot have been modified to apply the load bias.
  // A reasonable heuristic is to check whether an address value in an entry
  // falls within the bounds of the load image based on its PT_LOAD headers and
  // its load bias; if it does, it's probably already relocated and if not it's
  // probably unrelocated.
  AbiPtr<const Dyn, Elf, AbiTraits> ld;

  // These members form a doubly-linked list.  The `prev` of the first element
  // in the list and the `next` of the last element in the list are both null.
  // At startup, this lists the main executable and its dependencies in load
  // order, which is also symbol resolution order for that set of modules
  // (known as the "initial-exec set").  If more modules are loaded after
  // startup, they are added on the end of the list and may be removed later
  // from anywhere in the list after the initial-exec set, depending on the
  // order of adding and removing modules and how they may share dependencies.
  AbiPtr<LinkMap, Elf, AbiTraits> next, prev;
};

}  // namespace elfldltl

#endif  // SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_SVR4_ABI_H_
# 136 "../../src/lib/elfldltl/include/lib/elfldltl/svr4-abi.h"
#endif /* svr4-abi.h expanded by -frewrite-includes */
# 12 "../../src/lib/elfldltl/include/lib/elfldltl/link-map-list.h" 2

namespace elfldltl {

// Forward declaration; see below.
struct LinkMapListDefaultTraits;

// This provides a container API with bidirectional iterators for a
// doubly-linked list that uses the traditional `struct link_map` (see
// elfldltl::Elf<...>::LinkMap<...> in <lib/elfldltl/svr4-abi.h>) as part
// of its element type layout.  The first template parameter gives the type
// of elements, what will be `value_type` in the container and its
// iterators.  The second template parameter defines how the LinkMap member
// is found therein via a "traits" type (see below).
template <typename ElementType = Elf<>::LinkMap<>, class Traits = LinkMapListDefaultTraits>
class LinkMapList {
  template <bool Reverse, bool Const>
  class IteratorImpl;

 public:
  using value_type = ElementType;
  using reference = value_type&;
  using const_reference = const value_type&;
  using pointer = value_type*;
  using difference_type = ptrdiff_t;
  using size_type = size_t;

  using iterator = IteratorImpl<false, false>;
  using reverse_iterator = IteratorImpl<true, false>;
  using const_iterator = IteratorImpl<false, true>;
  using const_reverse_iterator = IteratorImpl<true, true>;

  constexpr LinkMapList() = default;

  constexpr LinkMapList(const LinkMapList&) = default;

  constexpr explicit LinkMapList(const value_type* head) : head_(head) {}

  constexpr LinkMapList& operator=(const LinkMapList&) = default;

  constexpr iterator begin() { return iterator(this, head_); }

  constexpr iterator end() { return iterator(this, nullptr); }

  constexpr const_iterator begin() const { return const_iterator(this, head_); }

  constexpr const_iterator end() const { return const_iterator(this, nullptr); }

  constexpr reverse_iterator rbegin() {
    reverse_iterator it(this, nullptr);
    if (head_) {
      ++it;
    }
    return it;
  }

  constexpr reverse_iterator rend() {
    reverse_iterator it(this, head_);
    if (head_) {
      ++it;
    }
    return it;
  }

  constexpr const_reverse_iterator rbegin() const { return const_reverse_iterator(this, nullptr); }

  constexpr const_reverse_iterator rend() const { return const_reverse_iterator(this, head_); }

  constexpr bool empty() const { return !head_; }

 private:
  constexpr const value_type* Next(const value_type* pos) const {
    if (!pos) {
      // Moving "forwards" from rend() gets the head.
      assert(head_);
      return head_;
    }
    if (auto* next = Traits::ElementToLinkMap(*pos).next.get()) {
      return &(Traits::LinkMapToElement(*next));
    }
    // We've reached the end, so cache the tail if not already known.
    if (!tail_) {
      tail_ = pos;
    }
    return nullptr;
  }

  constexpr const value_type* Prev(const value_type* pos) const {
    if (!pos) {
      // Moving backwards from the end gets the tail.
      if (!tail_) {
        // It's not already known, so find it forward from the head and
        // cache it.  Note this takes O(n) time.
        assert(head_);
        const value_type* pos = head_;
        do {
          pos = Next(pos);
        } while (pos);
        assert(tail_);
      }
      return tail_;
    }
    if (auto* prev = Traits::ElementToLinkMap(*pos).prev.get()) {
      return &(Traits::LinkMapToElement(*prev));
    }
    return nullptr;
  }

  const value_type* head_ = nullptr;
  mutable const value_type* tail_ = nullptr;
};

// This is the default "traits" type for LinkMapList, which only works when
// the element type is LinkMap itself, or really is any type with members
// named `next` and `prev` that are pointers to that same type.
struct LinkMapListDefaultTraits {
  // This must translate a `const LinkMap&` to a `const value_type&`.
  template <class Element>
  static constexpr Element& LinkMapToElement(Element& map) {
    return map;
  }

  // This must translate a `const value_type&` to a `const LinkMap&`.
  template <class Element>
  static constexpr Element& ElementToLinkMap(Element& map) {
    return map;
  }
};

// This defines the "traits" type for a struct with a first member named
// `link_map` that is of the LinkMap type.
template <class ElementType>
struct LinkMapListInFirstMemberTraits {
  using LinkMapType = decltype(std::declval<ElementType>().link_map);

  static const ElementType& LinkMapToElement(const LinkMapType& map) {
    if constexpr (std::is_standard_layout_v<ElementType>) {
      static_assert(offsetof(ElementType, link_map) == 0);
    } else {
      // It's not kosher to use offsetof here, but this should get compiled
      // away so there's no runtime test at all (but maybe a runtime failure).
      assert(&(reinterpret_cast<const ElementType&>(map).link_map) == &map);
    }
    return reinterpret_cast<const ElementType&>(map);
  }

  static const LinkMapType& ElementToLinkMap(const ElementType& element) {
    return element.link_map;
  }
};

template <typename ElementType, class Traits>
template <bool Reverse, bool Const>
class LinkMapList<ElementType, Traits>::IteratorImpl {
 public:
  using value_type = LinkMapList<ElementType, Traits>::value_type;
  using reference = LinkMapList<ElementType, Traits>::reference;
  using pointer = LinkMapList<ElementType, Traits>::pointer;
  using difference_type = LinkMapList<ElementType, Traits>::difference_type;
  using iterator_category = std::bidirectional_iterator_tag;

  constexpr IteratorImpl() = default;

  constexpr IteratorImpl(const IteratorImpl&) = default;

  // const_iterator is constructible from iterator.
  template <bool C = Const, typename = std::enable_if_t<C>>
  constexpr IteratorImpl(const IteratorImpl<Reverse, false>& other)
      : list_(other.list_), pos_(other.pos_) {}

  constexpr IteratorImpl& operator=(const IteratorImpl&) = default;

  constexpr bool operator==(const IteratorImpl& other) const { return pos_ == other.pos_; }

  constexpr bool operator!=(const IteratorImpl& other) const { return !(*this == other); }

  constexpr auto& operator*() const { return *operator->(); }

  constexpr auto* operator->() const {
    if constexpr (Const) {
      return pos_;
    } else {
      return const_cast<value_type*>(pos_);
    }
  }

  constexpr IteratorImpl& operator++() {  // prefix
    pos_ = (list_->*kNext)(pos_);
    return *this;
  }

  constexpr IteratorImpl operator++(int) {  // postfix
    IteratorImpl old = *this;
    ++*this;
    return old;
  }

  constexpr IteratorImpl& operator--() {  // prefix
    pos_ = (list_->*kPrev)(pos_);
    return *this;
  }

  constexpr IteratorImpl operator--(int) {  // postfix
    IteratorImpl old = *this;
    --*this;
    return old;
  }

 private:
  friend LinkMapList;

  static constexpr auto kNext = Reverse ? &LinkMapList::Prev : &LinkMapList::Next;
  static constexpr auto kPrev = !Reverse ? &LinkMapList::Prev : &LinkMapList::Next;

  constexpr IteratorImpl(const LinkMapList* list, const value_type* pos) : list_{list}, pos_{pos} {}

  const LinkMapList* list_ = nullptr;
  const value_type* pos_ = nullptr;
};

}  // namespace elfldltl

#endif  // SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_LINK_MAP_LIST_H_
# 234 "../../src/lib/elfldltl/include/lib/elfldltl/link-map-list.h"
#endif /* link-map-list.h expanded by -frewrite-includes */
# 6 "../../sdk/lib/ld/test/filter-view-tests.cc" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) /* filter-view.h expanded by -frewrite-includes */
#include <lib/ld/internal/filter-view.h>
#else /* filter-view.h expanded by -frewrite-includes */
# 6 "../../sdk/lib/ld/test/filter-view-tests.cc"
# 1 "../../sdk/lib/ld/include/lib/ld/internal/filter-view.h" 1
// Copyright 2023 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIB_LD_INTERNAL_FILTER_VIEW_H_
#define LIB_LD_INTERNAL_FILTER_VIEW_H_

#if 0 /* expanded by -frewrite-includes */
#include <lib/stdcompat/version.h>
#endif /* expanded by -frewrite-includes */
# 8 "../../sdk/lib/ld/include/lib/ld/internal/filter-view.h"
# 9 "../../sdk/lib/ld/include/lib/ld/internal/filter-view.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* algorithm expanded by -frewrite-includes */
#include <algorithm>
#else /* algorithm expanded by -frewrite-includes */
# 10 "../../sdk/lib/ld/include/lib/ld/internal/filter-view.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_ALGORITHM
#define _LIBCPP_ALGORITHM

/*
    algorithm synopsis

#include <initializer_list>

namespace std
{

namespace ranges {

  // [algorithms.results], algorithm result types
  template <class I, class F>
    struct in_fun_result;                // since C++20

  template <class I1, class I2>
    struct in_in_result;                 // since C++20

  template <class I, class O>
    struct in_out_result;                // since C++20

  template <class I1, class I2, class O>
    struct in_in_out_result;             // since C++20

  template <class I, class O1, class O2>
    struct in_out_out_result;            // since C++20

  template <class I1, class I2>
    struct min_max_result;               // since C++20

  template <class I>
    struct in_found_result;              // since C++20

  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
    indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>                                   // since C++20
  constexpr I min_element(I first, S last, Comp comp = {}, Proj proj = {});

  template<forward_range R, class Proj = identity,
    indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>                       // since C++20
  constexpr borrowed_iterator_t<R> min_element(R&& r, Comp comp = {}, Proj proj = {});

  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
    indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>
  constexpr I ranges::max_element(I first, S last, Comp comp = {}, Proj proj = {});                       // since C++20

  template<forward_range R, class Proj = identity,
    indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
  constexpr borrowed_iterator_t<R> ranges::max_element(R&& r, Comp comp = {}, Proj proj = {});            // since C++20

  template<class I1, class I2>
    using mismatch_result = in_in_result<I1, I2>;

  template <input_iterator I1, sentinel_for<_I1> S1, input_iterator I2, sentinel_for<_I2> S2,
          class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
    requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
  constexpr mismatch_result<_I1, _I2>                                                                     // since C++20
  mismatch()(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {})

  template <input_range R1, input_range R2,
          class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
    requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
  constexpr mismatch_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>>
  mismatch(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {})                          // since C++20

    requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>
    constexpr I find(I first, S last, const T& value, Proj proj = {});                                    // since C++20

  template<input_range R, class T, class Proj = identity>
    requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>
    constexpr borrowed_iterator_t<R>
      find(R&& r, const T& value, Proj proj = {});                                                        // since C++20

  template<input_iterator I, sentinel_for<I> S, class Proj = identity,
           indirect_unary_predicate<projected<I, Proj>> Pred>
    constexpr I find_if(I first, S last, Pred pred, Proj proj = {});                                      // since C++20

  template<input_range R, class Proj = identity,
           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    constexpr borrowed_iterator_t<R>
      find_if(R&& r, Pred pred, Proj proj = {});                                                          // since C++20

  template<input_iterator I, sentinel_for<I> S, class Proj = identity,
           indirect_unary_predicate<projected<I, Proj>> Pred>
    constexpr I find_if_not(I first, S last, Pred pred, Proj proj = {});                                  // since C++20

  template<input_range R, class Proj = identity,
           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    constexpr borrowed_iterator_t<R>
      find_if_not(R&& r, Pred pred, Proj proj = {});                                                      // since C++20

  template<class T, class Proj = identity,
           indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
    constexpr const T& min(const T& a, const T& b, Comp comp = {}, Proj proj = {});                       // since C++20

  template<copyable T, class Proj = identity,
           indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
    constexpr T min(initializer_list<T> r, Comp comp = {}, Proj proj = {});                               // since C++20

 template<input_range R, class Proj = identity,
          indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
   requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*>
   constexpr range_value_t<R>
     min(R&& r, Comp comp = {}, Proj proj = {});                                                          // since C++20

  template<class T, class Proj = identity,
           indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
    constexpr const T& max(const T& a, const T& b, Comp comp = {}, Proj proj = {});                       // since C++20

  template<copyable T, class Proj = identity,
           indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
    constexpr T max(initializer_list<T> r, Comp comp = {}, Proj proj = {});                               // since C++20

  template<input_range R, class Proj = identity,
           indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
    requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*>
    constexpr range_value_t<R>
      max(R&& r, Comp comp = {}, Proj proj = {});                                                         // since C++20

  template<class I, class O>
    using unary_transform_result = in_out_result<I, O>;                                                   // since C++20

  template<class I1, class I2, class O>
    using binary_transform_result = in_in_out_result<I1, I2, O>;                                          // since C++20

  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O,
           copy_constructible F, class Proj = identity>
    requires indirectly_writable<O, indirect_result_t<F&, projected<I, Proj>>>
    constexpr ranges::unary_transform_result<I, O>
      transform(I first1, S last1, O result, F op, Proj proj = {});                                       // since C++20

  template<input_range R, weakly_incrementable O, copy_constructible F,
           class Proj = identity>
    requires indirectly_writable<O, indirect_result_t<F&, projected<iterator_t<R>, Proj>>>
    constexpr ranges::unary_transform_result<borrowed_iterator_t<R>, O>
      transform(R&& r, O result, F op, Proj proj = {});                                                   // since C++20

  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
           weakly_incrementable O, copy_constructible F, class Proj1 = identity,
           class Proj2 = identity>
    requires indirectly_writable<O, indirect_result_t<F&, projected<I1, Proj1>,
                                           projected<I2, Proj2>>>
    constexpr ranges::binary_transform_result<I1, I2, O>
      transform(I1 first1, S1 last1, I2 first2, S2 last2, O result,
                        F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {});                                 // since C++20

  template<input_range R1, input_range R2, weakly_incrementable O,
           copy_constructible F, class Proj1 = identity, class Proj2 = identity>
    requires indirectly_writable<O, indirect_result_t<F&, projected<iterator_t<R1>, Proj1>,
                                           projected<iterator_t<R2>, Proj2>>>
    constexpr ranges::binary_transform_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>, O>
      transform(R1&& r1, R2&& r2, O result,
                        F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {});                                 // since C++20

  template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity>
    requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>
    constexpr iter_difference_t<I>
      count(I first, S last, const T& value, Proj proj = {});                                             // since C++20

  template<input_range R, class T, class Proj = identity>
    requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>
    constexpr range_difference_t<R>
      count(R&& r, const T& value, Proj proj = {});                                                       // since C++20

  template<input_iterator I, sentinel_for<I> S, class Proj = identity,
           indirect_unary_predicate<projected<I, Proj>> Pred>
    constexpr iter_difference_t<I>
      count_if(I first, S last, Pred pred, Proj proj = {});                                               // since C++20

  template<input_range R, class Proj = identity,
           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    constexpr range_difference_t<R>
      count_if(R&& r, Pred pred, Proj proj = {});                                                         // since C++20

  template<class T>
  using minmax_result = min_max_result<T>;

  template<class T, class Proj = identity,
           indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
    constexpr ranges::minmax_result<const T&>
      minmax(const T& a, const T& b, Comp comp = {}, Proj proj = {});                                     // since C++20

  template<copyable T, class Proj = identity,
           indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
    constexpr ranges::minmax_result<T>
      minmax(initializer_list<T> r, Comp comp = {}, Proj proj = {});                                      // since C++20

  template<input_range R, class Proj = identity,
           indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
    requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*>
    constexpr ranges::minmax_result<range_value_t<R>>
      minmax(R&& r, Comp comp = {}, Proj proj = {});                                                      // since C++20

  template<class I>
  using minmax_element_result = min_max_result<I>;

  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
           indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>
    constexpr ranges::minmax_element_result<I>
      minmax_element(I first, S last, Comp comp = {}, Proj proj = {});                                    // since C++20

  template<forward_range R, class Proj = identity,
           indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
    constexpr ranges::minmax_element_result<borrowed_iterator_t<R>>
      minmax_element(R&& r, Comp comp = {}, Proj proj = {});                                              // since C++20

  template<class I, class O>
    using copy_result = in_out_result<I, O>;                                                // since C++20

  template<class I, class O>
    using copy_n_result = in_out_result<I, O>;                                              // since C++20

  template<class I, class O>
    using copy_if_result = in_out_result<I, O>;                                             // since C++20

  template<class I1, class I2>
    using copy_backward_result = in_out_result<I1, I2>;                                     // since C++20

  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O>
    requires indirectly_copyable<I, O>
    constexpr ranges::copy_result<I, O> ranges::copy(I first, S last, O result);            // since C++20

  template<input_range R, weakly_incrementable O>
    requires indirectly_copyable<iterator_t<R>, O>
    constexpr ranges::copy_result<borrowed_iterator_t<R>, O> ranges::copy(R&& r, O result); // since C++20

  template<input_iterator I, weakly_incrementable O>
    requires indirectly_copyable<I, O>
    constexpr ranges::copy_n_result<I, O>
      ranges::copy_n(I first, iter_difference_t<I> n, O result);                            // since C++20

  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class Proj = identity,
           indirect_unary_predicate<projected<I, Proj>> Pred>
    requires indirectly_copyable<I, O>
    constexpr ranges::copy_if_result<I, O>
      ranges::copy_if(I first, S last, O result, Pred pred, Proj proj = {});                // since C++20

  template<input_range R, weakly_incrementable O, class Proj = identity,
           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    requires indirectly_copyable<iterator_t<R>, O>
    constexpr ranges::copy_if_result<borrowed_iterator_t<R>, O>
      ranges::copy_if(R&& r, O result, Pred pred, Proj proj = {});                          // since C++20

  template<bidirectional_iterator I1, sentinel_for<I1> S1, bidirectional_iterator I2>
    requires indirectly_copyable<I1, I2>
    constexpr ranges::copy_backward_result<I1, I2>
      ranges::copy_backward(I1 first, S1 last, I2 result);                                  // since C++20

  template<bidirectional_range R, bidirectional_iterator I>
    requires indirectly_copyable<iterator_t<R>, I>
    constexpr ranges::copy_backward_result<borrowed_iterator_t<R>, I>
      ranges::copy_backward(R&& r, I result);                                               // since C++20

  template<class I, class F>
    using for_each_result = in_fun_result<I, F>;                                            // since C++20

  template<input_iterator I, sentinel_for<I> S, class Proj = identity,
           indirectly_unary_invocable<projected<I, Proj>> Fun>
    constexpr ranges::for_each_result<I, Fun>
      ranges::for_each(I first, S last, Fun f, Proj proj = {});                             // since C++20

  template<input_range R, class Proj = identity,
           indirectly_unary_invocable<projected<iterator_t<R>, Proj>> Fun>
    constexpr ranges::for_each_result<borrowed_iterator_t<R>, Fun>
      ranges::for_each(R&& r, Fun f, Proj proj = {});                                       // since C++20

  template<input_iterator I, class Proj = identity,
           indirectly_unary_invocable<projected<I, Proj>> Fun>
    constexpr ranges::for_each_n_result<I, Fun>
      ranges::for_each_n(I first, iter_difference_t<I> n, Fun f, Proj proj = {});           // since C++20

  template<input_iterator I, sentinel_for<I> S, class Proj = identity,
           indirect_unary_predicate<projected<I, Proj>> Pred>
    constexpr bool ranges::is_partitioned(I first, S last, Pred pred, Proj proj = {});      // since C++20

  template<input_range R, class Proj = identity,
           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    constexpr bool ranges::is_partitioned(R&& r, Pred pred, Proj proj = {});                // since C++20

  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,
          class Proj = identity>
    requires sortable<I, Comp, Proj>
    constexpr I
      ranges::push_heap(I first, S last, Comp comp = {}, Proj proj = {});                   // since C++20

  template<random_access_range R, class Comp = ranges::less, class Proj = identity>
    requires sortable<iterator_t<R>, Comp, Proj>
    constexpr borrowed_iterator_t<R>
      ranges::push_heap(R&& r, Comp comp = {}, Proj proj = {});                             // since C++20

  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,
          class Proj = identity>
    requires sortable<I, Comp, Proj>
    constexpr I
      ranges::pop_heap(I first, S last, Comp comp = {}, Proj proj = {});                    // since C++20

  template<random_access_range R, class Comp = ranges::less, class Proj = identity>
    requires sortable<iterator_t<R>, Comp, Proj>
    constexpr borrowed_iterator_t<R>
      ranges::pop_heap(R&& r, Comp comp = {}, Proj proj = {});                              // since C++20

  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,
          class Proj = identity>
    requires sortable<I, Comp, Proj>
    constexpr I
      ranges::make_heap(I first, S last, Comp comp = {}, Proj proj = {});                   // since C++20

  template<random_access_range R, class Comp = ranges::less, class Proj = identity>
    requires sortable<iterator_t<R>, Comp, Proj>
    constexpr borrowed_iterator_t<R>
      ranges::make_heap(R&& r, Comp comp = {}, Proj proj = {});                             // since C++20

  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,
          class Proj = identity>
    requires sortable<I, Comp, Proj>
    constexpr I
      ranges::sort_heap(I first, S last, Comp comp = {}, Proj proj = {});                   // since C++20

  template<random_access_range R, class Comp = ranges::less, class Proj = identity>
    requires sortable<iterator_t<R>, Comp, Proj>
    constexpr borrowed_iterator_t<R>
      ranges::sort_heap(R&& r, Comp comp = {}, Proj proj = {});                             // since C++20

  template<random_access_iterator I, sentinel_for<I> S, class Proj = identity,
            indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>
    constexpr bool is_heap(I first, S last, Comp comp = {}, Proj proj = {});                // since C++20

  template<random_access_range R, class Proj = identity,
            indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
    constexpr bool is_heap(R&& r, Comp comp = {}, Proj proj = {});                          // since C++20

  template<random_access_iterator I, sentinel_for<I> S, class Proj = identity,
           indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>
    constexpr I is_heap_until(I first, S last, Comp comp = {}, Proj proj = {});             // since C++20

  template<random_access_range R, class Proj = identity,
           indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
    constexpr borrowed_iterator_t<R>
      is_heap_until(R&& r, Comp comp = {}, Proj proj = {});                                 // since C++20

  template<bidirectional_iterator I, sentinel_for<I> S>
    requires permutable<I>
    constexpr I ranges::reverse(I first, S last);                                           // since C++20

  template<bidirectional_range R>
    requires permutable<iterator_t<R>>
    constexpr borrowed_iterator_t<R> ranges::reverse(R&& r);                                // since C++20

  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,
            class Proj = identity>
    requires sortable<I, Comp, Proj>
    constexpr I
      ranges::sort(I first, S last, Comp comp = {}, Proj proj = {});                        // since C++20

  template<random_access_range R, class Comp = ranges::less, class Proj = identity>
    requires sortable<iterator_t<R>, Comp, Proj>
    constexpr borrowed_iterator_t<R>
      ranges::sort(R&& r, Comp comp = {}, Proj proj = {});                                  // since C++20

  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,
          class Proj = identity>
    requires sortable<I, Comp, Proj>
    I ranges::stable_sort(I first, S last, Comp comp = {}, Proj proj = {});                 // since C++20

  template<random_access_range R, class Comp = ranges::less, class Proj = identity>
    requires sortable<iterator_t<R>, Comp, Proj>
    borrowed_iterator_t<R>
      ranges::stable_sort(R&& r, Comp comp = {}, Proj proj = {});                           // since C++20

  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,
           class Proj = identity>
    requires sortable<I, Comp, Proj>
    constexpr I
      ranges::partial_sort(I first, I middle, S last, Comp comp = {}, Proj proj = {});      // since C++20

  template<random_access_range R, class Comp = ranges::less, class Proj = identity>
    requires sortable<iterator_t<R>, Comp, Proj>
    constexpr borrowed_iterator_t<R>
      ranges::partial_sort(R&& r, iterator_t<R> middle, Comp comp = {}, Proj proj = {});    // since C++20

  template<class T, output_iterator<const T&> O, sentinel_for<O> S>
    constexpr O ranges::fill(O first, S last, const T& value);                              // since C++20

  template<class T, output_range<const T&> R>
    constexpr borrowed_iterator_t<R> ranges::fill(R&& r, const T& value);                   // since C++20

  template<class T, output_iterator<const T&> O>
    constexpr O ranges::fill_n(O first, iter_difference_t<O> n, const T& value);            // since C++20

  template<input_or_output_iterator O, sentinel_for<O> S, copy_constructible F>
    requires invocable<F&> && indirectly_writable<O, invoke_result_t<F&>>
    constexpr O generate(O first, S last, F gen);                                           // since C++20

  template<class ExecutionPolicy, class ForwardIterator, class Generator>
    void generate(ExecutionPolicy&& exec,
                  ForwardIterator first, ForwardIterator last,
                  Generator gen);                                                           // since C++17

  template<class R, copy_constructible F>
    requires invocable<F&> && output_range<R, invoke_result_t<F&>>
    constexpr borrowed_iterator_t<R> generate(R&& r, F gen);                                // since C++20

  template<input_or_output_iterator O, copy_constructible F>
    requires invocable<F&> && indirectly_writable<O, invoke_result_t<F&>>
    constexpr O generate_n(O first, iter_difference_t<O> n, F gen);                         // since C++20

  template<class ExecutionPolicy, class ForwardIterator, class Size, class Generator>
    ForwardIterator generate_n(ExecutionPolicy&& exec,
                               ForwardIterator first, Size n, Generator gen);               // since C++17

 template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
          class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
   requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
   constexpr bool ranges::equal(I1 first1, S1 last1, I2 first2, S2 last2,
                                Pred pred = {},
                                Proj1 proj1 = {}, Proj2 proj2 = {});                        // since C++20

 template<input_range R1, input_range R2, class Pred = ranges::equal_to,
          class Proj1 = identity, class Proj2 = identity>
   requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
   constexpr bool ranges::equal(R1&& r1, R2&& r2, Pred pred = {},
                                Proj1 proj1 = {}, Proj2 proj2 = {});                        // since C++20

  template<input_iterator I, sentinel_for<I> S, class Proj = identity,
           indirect_unary_predicate<projected<I, Proj>> Pred>
    constexpr bool ranges::all_of(I first, S last, Pred pred, Proj proj = {});              // since C++20

  template<input_range R, class Proj = identity,
           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    constexpr bool ranges::all_of(R&& r, Pred pred, Proj proj = {});                        // since C++20

  template<input_iterator I, sentinel_for<I> S, class Proj = identity,
           indirect_unary_predicate<projected<I, Proj>> Pred>
    constexpr bool ranges::any_of(I first, S last, Pred pred, Proj proj = {});              // since C++20

  template<input_range R, class Proj = identity,
           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    constexpr bool ranges::any_of(R&& r, Pred pred, Proj proj = {});                        // since C++20

  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
          class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
    requires (forward_iterator<I1> || sized_sentinel_for<S1, I1>) &&
           (forward_iterator<I2> || sized_sentinel_for<S2, I2>) &&
           indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
    constexpr bool ranges::ends_with(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {},
                                   Proj1 proj1 = {}, Proj2 proj2 = {});                     // since C++23

  template<input_range R1, input_range R2, class Pred = ranges::equal_to, class Proj1 = identity,
          class Proj2 = identity>
    requires (forward_range<R1> || sized_range<R1>) &&
           (forward_range<R2> || sized_range<R2>) &&
           indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
    constexpr bool ranges::ends_with(R1&& r1, R2&& r2, Pred pred = {},
                                   Proj1 proj1 = {}, Proj2 proj2 = {});                     // since C++23

  template<input_iterator I, sentinel_for<I> S, class Proj = identity,
           indirect_unary_predicate<projected<I, Proj>> Pred>
    constexpr bool ranges::none_of(I first, S last, Pred pred, Proj proj = {});             // since C++20

  template<input_range R, class Proj = identity,
           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    constexpr bool ranges::none_of(R&& r, Pred pred, Proj proj = {});                       // since C++20

  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
          class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
    requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
    constexpr bool ranges::starts_with(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {},
                                      Proj1 proj1 = {}, Proj2 proj2 = {});                 // since C++23

  template<input_range R1, input_range R2, class Pred = ranges::equal_to, class Proj1 = identity,
          class Proj2 = identity>
    requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
    constexpr bool ranges::starts_with(R1&& r1, R2&& r2, Pred pred = {},
                                      Proj1 proj1 = {}, Proj2 proj2 = {});                // since C++23

  template<input_iterator I1, sentinel_for<I1> S1,
          random_access_iterator I2, sentinel_for<I2> S2,
          class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity>
    requires indirectly_copyable<I1, I2> && sortable<I2, Comp, Proj2> &&
            indirect_strict_weak_order<Comp, projected<I1, Proj1>, projected<I2, Proj2>>
    constexpr partial_sort_copy_result<I1, I2>
      partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last,
                        Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                // since C++20

  template<input_range R1, random_access_range R2, class Comp = ranges::less,
          class Proj1 = identity, class Proj2 = identity>
    requires indirectly_copyable<iterator_t<R1>, iterator_t<R2>> &&
            sortable<iterator_t<R2>, Comp, Proj2> &&
            indirect_strict_weak_order<Comp, projected<iterator_t<R1>, Proj1>,
                                        projected<iterator_t<R2>, Proj2>>
    constexpr partial_sort_copy_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>>
      partial_sort_copy(R1&& r, R2&& result_r, Comp comp = {},
                        Proj1 proj1 = {}, Proj2 proj2 = {});                                // since C++20

  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
           indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>
    constexpr bool ranges::is_sorted(I first, S last, Comp comp = {}, Proj proj = {});      // since C++20

  template<forward_range R, class Proj = identity,
           indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
    constexpr bool ranges::is_sorted(R&& r, Comp comp = {}, Proj proj = {});                // since C++20

  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
           indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>
    constexpr I ranges::is_sorted_until(I first, S last, Comp comp = {}, Proj proj = {});   // since C++20

  template<forward_range R, class Proj = identity,
           indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less>
    constexpr borrowed_iterator_t<R>
      ranges::is_sorted_until(R&& r, Comp comp = {}, Proj proj = {});                       // since C++20

  template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less,
          class Proj = identity>
    requires sortable<I, Comp, Proj>
    constexpr I
      ranges::nth_element(I first, I nth, S last, Comp comp = {}, Proj proj = {});          // since C++20

  template<random_access_range R, class Comp = ranges::less, class Proj = identity>
    requires sortable<iterator_t<R>, Comp, Proj>
    constexpr borrowed_iterator_t<R>
      ranges::nth_element(R&& r, iterator_t<R> nth, Comp comp = {}, Proj proj = {});        // since C++20

  template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,
           indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>    // since C++20
    constexpr I upper_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {});

  template<forward_range R, class T, class Proj = identity,
           indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =
             ranges::less>
    constexpr borrowed_iterator_t<R>
      upper_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {});                   // since C++20

  template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,
           indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>
    constexpr I lower_bound(I first, S last, const T& value, Comp comp = {},
                                    Proj proj = {});                                        // since C++20
  template<forward_range R, class T, class Proj = identity,
           indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =
             ranges::less>
    constexpr borrowed_iterator_t<R>
      lower_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {});                   // since C++20

  template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,
           indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>
    constexpr bool binary_search(I first, S last, const T& value, Comp comp = {},
                                         Proj proj = {});                                   // since C++20

  template<forward_range R, class T, class Proj = identity,
           indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =
             ranges::less>
    constexpr bool binary_search(R&& r, const T& value, Comp comp = {},
                                         Proj proj = {});                                   // since C++20

  template<permutable I, sentinel_for<I> S, class Proj = identity,
           indirect_unary_predicate<projected<I, Proj>> Pred>
    constexpr subrange<I>
      partition(I first, S last, Pred pred, Proj proj = {});                                // since C++20

  template<forward_range R, class Proj = identity,
           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    requires permutable<iterator_t<R>>
    constexpr borrowed_subrange_t<R>
      partition(R&& r, Pred pred, Proj proj = {});                                          // since C++20

  template<bidirectional_iterator I, sentinel_for<I> S, class Proj = identity,
           indirect_unary_predicate<projected<I, Proj>> Pred>
    requires permutable<I>
    subrange<I> stable_partition(I first, S last, Pred pred, Proj proj = {});               // since C++20

  template<bidirectional_range R, class Proj = identity,
           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    requires permutable<iterator_t<R>>
    borrowed_subrange_t<R> stable_partition(R&& r, Pred pred, Proj proj = {});              // since C++20

  template<input_iterator I1, sentinel_for<I1> S1, forward_iterator I2, sentinel_for<I2> S2,
           class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
    requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
    constexpr I1 ranges::find_first_of(I1 first1, S1 last1, I2 first2, S2 last2,
                                       Pred pred = {},
                                       Proj1 proj1 = {}, Proj2 proj2 = {});                 // since C++20

  template<input_range R1, forward_range R2,
           class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
    requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
    constexpr borrowed_iterator_t<R1>
      ranges::find_first_of(R1&& r1, R2&& r2,
                            Pred pred = {},
                            Proj1 proj1 = {}, Proj2 proj2 = {});                            // since C++20

  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
           indirect_binary_predicate<projected<I, Proj>,
                                     projected<I, Proj>> Pred = ranges::equal_to>
    constexpr I ranges::adjacent_find(I first, S last, Pred pred = {}, Proj proj = {});     // since C++20

  template<forward_range R, class Proj = identity,
           indirect_binary_predicate<projected<iterator_t<R>, Proj>,
                                     projected<iterator_t<R>, Proj>> Pred = ranges::equal_to>
    constexpr borrowed_iterator_t<R> ranges::adjacent_find(R&& r, Pred pred = {}, Proj proj = {});  // since C++20

  template<input_iterator I, sentinel_for<I> S, class T1, class T2, class Proj = identity>
    requires indirectly_writable<I, const T2&> &&
             indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T1*>
    constexpr I
      ranges::replace(I first, S last, const T1& old_value, const T2& new_value, Proj proj = {});   // since C++20

  template<input_range R, class T1, class T2, class Proj = identity>
    requires indirectly_writable<iterator_t<R>, const T2&> &&
             indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T1*>
    constexpr borrowed_iterator_t<R>
      ranges::replace(R&& r, const T1& old_value, const T2& new_value, Proj proj = {});             // since C++20

  template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity,
           indirect_unary_predicate<projected<I, Proj>> Pred>
    requires indirectly_writable<I, const T&>
    constexpr I ranges::replace_if(I first, S last, Pred pred, const T& new_value, Proj proj = {}); // since C++20

  template<input_range R, class T, class Proj = identity,
           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    requires indirectly_writable<iterator_t<R>, const T&>
    constexpr borrowed_iterator_t<R>
      ranges::replace_if(R&& r, Pred pred, const T& new_value, Proj proj = {});                     // since C++20

  template<class T, class Proj = identity,
           indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>
    constexpr const T&
      ranges::clamp(const T& v, const T& lo, const T& hi, Comp comp = {}, Proj proj = {});          // since C++20

  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
           class Proj1 = identity, class Proj2 = identity,
           indirect_strict_weak_order<projected<I1, Proj1>,
                                      projected<I2, Proj2>> Comp = ranges::less>
    constexpr bool
      ranges::lexicographical_compare(I1 first1, S1 last1, I2 first2, S2 last2,
                                      Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});          // since C++20

  template<input_range R1, input_range R2, class Proj1 = identity,
           class Proj2 = identity,
           indirect_strict_weak_order<projected<iterator_t<R1>, Proj1>,
                                      projected<iterator_t<R2>, Proj2>> Comp = ranges::less>
    constexpr bool
      ranges::lexicographical_compare(R1&& r1, R2&& r2, Comp comp = {},
                                      Proj1 proj1 = {}, Proj2 proj2 = {});                          // since C++20

  template<bidirectional_iterator I1, sentinel_for<I1> S1, bidirectional_iterator I2>
    requires indirectly_movable<I1, I2>
    constexpr ranges::move_backward_result<I1, I2>
      ranges::move_backward(I1 first, S1 last, I2 result);                                          // since C++20

  template<bidirectional_range R, bidirectional_iterator I>
    requires indirectly_movable<iterator_t<R>, I>
    constexpr ranges::move_backward_result<borrowed_iterator_t<R>, I>
      ranges::move_backward(R&& r, I result);                                                       // since C++20

  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O>
    requires indirectly_movable<I, O>
    constexpr ranges::move_result<I, O>
      ranges::move(I first, S last, O result);                                                      // since C++20

  template<input_range R, weakly_incrementable O>
    requires indirectly_movable<iterator_t<R>, O>
    constexpr ranges::move_result<borrowed_iterator_t<R>, O>
      ranges::move(R&& r, O result);                                                                // since C++20

  template<class I, class O1, class O2>
      using partition_copy_result = in_out_out_result<I, O1, O2>;                                   // since C++20

  template<input_iterator I, sentinel_for<I> S,
          weakly_incrementable O1, weakly_incrementable O2,
          class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred>
    requires indirectly_copyable<I, O1> && indirectly_copyable<I, O2>
    constexpr partition_copy_result<I, O1, O2>
      partition_copy(I first, S last, O1 out_true, O2 out_false, Pred pred,
                    Proj proj = {});                                                                // since C++20

  template<input_range R, weakly_incrementable O1, weakly_incrementable O2,
          class Proj = identity,
          indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    requires indirectly_copyable<iterator_t<R>, O1> &&
            indirectly_copyable<iterator_t<R>, O2>
    constexpr partition_copy_result<borrowed_iterator_t<R>, O1, O2>
      partition_copy(R&& r, O1 out_true, O2 out_false, Pred pred, Proj proj = {});                  // since C++20

  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
           indirect_unary_predicate<projected<I, Proj>> Pred>
    constexpr I partition_point(I first, S last, Pred pred, Proj proj = {});                        // since C++20

  template<forward_range R, class Proj = identity,
           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    constexpr borrowed_iterator_t<R>
      partition_point(R&& r, Pred pred, Proj proj = {});                                            // since C++20

  template<class I1, class I2, class O>
    using merge_result = in_in_out_result<I1, I2, O>;                                               // since C++20

  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
           weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity,
           class Proj2 = identity>
    requires mergeable<I1, I2, O, Comp, Proj1, Proj2>
    constexpr merge_result<I1, I2, O>
      merge(I1 first1, S1 last1, I2 first2, S2 last2, O result,
            Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                                    // since C++20

  template<input_range R1, input_range R2, weakly_incrementable O, class Comp = ranges::less,
           class Proj1 = identity, class Proj2 = identity>
    requires mergeable<iterator_t<R1>, iterator_t<R2>, O, Comp, Proj1, Proj2>
    constexpr merge_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>, O>
      merge(R1&& r1, R2&& r2, O result,
            Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                                    // since C++20

  template<permutable I, sentinel_for<I> S, class T, class Proj = identity>
    requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>
    constexpr subrange<I> ranges::remove(I first, S last, const T& value, Proj proj = {});          // since C++20

  template<forward_range R, class T, class Proj = identity>
    requires permutable<iterator_t<R>> &&
             indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>
    constexpr borrowed_subrange_t<R>
      ranges::remove(R&& r, const T& value, Proj proj = {});                                        // since C++20

  template<permutable I, sentinel_for<I> S, class Proj = identity,
           indirect_unary_predicate<projected<I, Proj>> Pred>
    constexpr subrange<I> ranges::remove_if(I first, S last, Pred pred, Proj proj = {});            // since C++20

  template<forward_range R, class Proj = identity,
           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    requires permutable<iterator_t<R>>
    constexpr borrowed_subrange_t<R>
      ranges::remove_if(R&& r, Pred pred, Proj proj = {});                                          // since C++20

  template<class I, class O>
    using set_difference_result = in_out_result<I, O>;                                              // since C++20

  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
           weakly_incrementable O, class Comp = ranges::less,
           class Proj1 = identity, class Proj2 = identity>
    requires mergeable<I1, I2, O, Comp, Proj1, Proj2>
    constexpr set_difference_result<I1, O>
      set_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result,
                     Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                           // since C++20

  template<input_range R1, input_range R2, weakly_incrementable O,
           class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity>
    requires mergeable<iterator_t<R1>, iterator_t<R2>, O, Comp, Proj1, Proj2>
    constexpr set_difference_result<borrowed_iterator_t<R1>, O>
      set_difference(R1&& r1, R2&& r2, O result,
                     Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                           // since C++20

  template<class I1, class I2, class O>
    using set_intersection_result = in_in_out_result<I1, I2, O>;                                    // since C++20

  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
           weakly_incrementable O, class Comp = ranges::less,
           class Proj1 = identity, class Proj2 = identity>
    requires mergeable<I1, I2, O, Comp, Proj1, Proj2>
    constexpr set_intersection_result<I1, I2, O>
      set_intersection(I1 first1, S1 last1, I2 first2, S2 last2, O result,
                       Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                         // since C++20

  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
           weakly_incrementable O, class Comp = ranges::less,
           class Proj1 = identity, class Proj2 = identity>
    requires mergeable<I1, I2, O, Comp, Proj1, Proj2>
    constexpr set_intersection_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>, O>
      set_intersection(R1&& r1, R2&& r2, O result,
                       Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});                         // since C++20

  template <class _InIter, class _OutIter>
  using reverse_copy_result = in_out_result<_InIter, _OutIter>;                                     // since C++20

  template<bidirectional_iterator I, sentinel_for<I> S, weakly_incrementable O>
    requires indirectly_copyable<I, O>
    constexpr ranges::reverse_copy_result<I, O>
      ranges::reverse_copy(I first, S last, O result);                                              // since C++20

  template<bidirectional_range R, weakly_incrementable O>
    requires indirectly_copyable<iterator_t<R>, O>
    constexpr ranges::reverse_copy_result<borrowed_iterator_t<R>, O>
      ranges::reverse_copy(R&& r, O result);                                                        // since C++20

  template<permutable I, sentinel_for<I> S>
    constexpr subrange<I> rotate(I first, I middle, S last);                                        // since C++20

  template<forward_range R>
    requires permutable<iterator_t<R>>
    constexpr borrowed_subrange_t<R> rotate(R&& r, iterator_t<R> middle);                           // since C++20

  template <class _InIter, class _OutIter>
  using rotate_copy_result = in_out_result<_InIter, _OutIter>;                                      // since C++20

  template<forward_iterator I, sentinel_for<I> S, weakly_incrementable O>
    requires indirectly_copyable<I, O>
    constexpr ranges::rotate_copy_result<I, O>
      ranges::rotate_copy(I first, I middle, S last, O result);                                     // since C++20

  template<forward_range R, weakly_incrementable O>
    requires indirectly_copyable<iterator_t<R>, O>
    constexpr ranges::rotate_copy_result<borrowed_iterator_t<R>, O>
      ranges::rotate_copy(R&& r, iterator_t<R> middle, O result);                                   // since C++20

  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class Gen>
    requires (forward_iterator<I> || random_access_iterator<O>) &&
            indirectly_copyable<I, O> &&
            uniform_random_bit_generator<remove_reference_t<Gen>>
    O sample(I first, S last, O out, iter_difference_t<I> n, Gen&& g);                              // since C++20

  template<input_range R, weakly_incrementable O, class Gen>
    requires (forward_range<R> || random_access_iterator<O>) &&
            indirectly_copyable<iterator_t<R>, O> &&
            uniform_random_bit_generator<remove_reference_t<Gen>>
    O sample(R&& r, O out, range_difference_t<R> n, Gen&& g);                                       // since C++20

  template<random_access_iterator I, sentinel_for<I> S, class Gen>
    requires permutable<I> &&
            uniform_random_bit_generator<remove_reference_t<Gen>>
    I shuffle(I first, S last, Gen&& g);                                                            // since C++20

  template<random_access_range R, class Gen>
    requires permutable<iterator_t<R>> &&
            uniform_random_bit_generator<remove_reference_t<Gen>>
    borrowed_iterator_t<R> shuffle(R&& r, Gen&& g);                                                 // since C++20

  template<forward_iterator I1, sentinel_for<I1> S1, forward_iterator I2,
         sentinel_for<I2> S2, class Proj1 = identity, class Proj2 = identity,
         indirect_equivalence_relation<projected<I1, Proj1>,
                                       projected<I2, Proj2>> Pred = ranges::equal_to>
  constexpr bool ranges::is_permutation(I1 first1, S1 last1, I2 first2, S2 last2,
                                        Pred pred = {},
                                        Proj1 proj1 = {}, Proj2 proj2 = {});                       // since C++20

  template<forward_range R1, forward_range R2,
         class Proj1 = identity, class Proj2 = identity,
         indirect_equivalence_relation<projected<iterator_t<R1>, Proj1>,
                                       projected<iterator_t<R2>, Proj2>> Pred = ranges::equal_to>
  constexpr bool ranges::is_permutation(R1&& r1, R2&& r2, Pred pred = {},
                                        Proj1 proj1 = {}, Proj2 proj2 = {});                       // since C++20

  template<forward_iterator I1, sentinel_for<I1> S1, forward_iterator I2,
           sentinel_for<I2> S2, class Pred = ranges::equal_to,
           class Proj1 = identity, class Proj2 = identity>
    requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
    constexpr subrange<I1>
      ranges::search(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {},
                     Proj1 proj1 = {}, Proj2 proj2 = {});                                           // since C++20

  template<forward_range R1, forward_range R2, class Pred = ranges::equal_to,
           class Proj1 = identity, class Proj2 = identity>
    requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
    constexpr borrowed_subrange_t<R1>
      ranges::search(R1&& r1, R2&& r2, Pred pred = {},
                     Proj1 proj1 = {}, Proj2 proj2 = {});                                           // since C++20

  template<forward_iterator I, sentinel_for<I> S, class T,
           class Pred = ranges::equal_to, class Proj = identity>
    requires indirectly_comparable<I, const T*, Pred, Proj>
    constexpr subrange<I>
      ranges::search_n(I first, S last, iter_difference_t<I> count,
                       const T& value, Pred pred = {}, Proj proj = {});                             // since C++20

  template<forward_range R, class T, class Pred = ranges::equal_to,
           class Proj = identity>
    requires indirectly_comparable<iterator_t<R>, const T*, Pred, Proj>
    constexpr borrowed_subrange_t<R>
      ranges::search_n(R&& r, range_difference_t<R> count,
                       const T& value, Pred pred = {}, Proj proj = {});                             // since C++20

  template<forward_iterator I1, sentinel_for<I1> S1, forward_iterator I2, sentinel_for<I2> S2,
           class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
    requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
    constexpr subrange<I1>
      ranges::find_end(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {},
                       Proj1 proj1 = {}, Proj2 proj2 = {});                                         // since C++20

  template<forward_range R1, forward_range R2,
           class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
    requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
    constexpr borrowed_subrange_t<R1>
      ranges::find_end(R1&& r1, R2&& r2, Pred pred = {},
                       Proj1 proj1 = {}, Proj2 proj2 = {});                                         // since C++20

  template<class I1, class I2, class O>
    using set_symmetric_difference_result = in_in_out_result<I1, I2, O>;                            // since C++20

  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
           weakly_incrementable O, class Comp = ranges::less,
           class Proj1 = identity, class Proj2 = identity>
    requires mergeable<I1, I2, O, Comp, Proj1, Proj2>
    constexpr set_symmetric_difference_result<I1, I2, O>
      set_symmetric_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result,
                               Comp comp = {}, Proj1 proj1 = {},
                               Proj2 proj2 = {});                                                   // since C++20

  template<input_range R1, input_range R2, weakly_incrementable O,
           class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity>
    requires mergeable<iterator_t<R1>, iterator_t<R2>, O, Comp, Proj1, Proj2>
    constexpr set_symmetric_difference_result<borrowed_iterator_t<R1>,
                                                      borrowed_iterator_t<R2>, O>
      set_symmetric_difference(R1&& r1, R2&& r2, O result, Comp comp = {},
                               Proj1 proj1 = {}, Proj2 proj2 = {});                                 // since C++20

  template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,
           indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>
    constexpr subrange<I>
      equal_range(I first, S last, const T& value, Comp comp = {}, Proj proj = {});                 // since C++20

  template<forward_range R, class T, class Proj = identity,
           indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp =
             ranges::less>
    constexpr borrowed_subrange_t<R>
      equal_range(R&& r, const T& value, Comp comp = {}, Proj proj = {});                           // since C++20

  template<class I1, class I2, class O>
    using set_union_result = in_in_out_result<I1, I2, O>;                                           // since C++20

  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
           weakly_incrementable O, class Comp = ranges::less,
           class Proj1 = identity, class Proj2 = identity>
    requires mergeable<I1, I2, O, Comp, Proj1, Proj2>
    constexpr set_union_result<I1, I2, O>
      set_union(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {},
                Proj1 proj1 = {}, Proj2 proj2 = {});                                                // since C++20

  template<input_range R1, input_range R2, weakly_incrementable O,
           class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity>
    requires mergeable<iterator_t<R1>, iterator_t<R2>, O, Comp, Proj1, Proj2>
    constexpr set_union_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>, O>
      set_union(R1&& r1, R2&& r2, O result, Comp comp = {},
                Proj1 proj1 = {}, Proj2 proj2 = {});                                                // since C++20

  template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
           class Proj1 = identity, class Proj2 = identity,
           indirect_strict_weak_order<projected<I1, Proj1>, projected<I2, Proj2>> Comp =
             ranges::less>
    constexpr bool includes(I1 first1, S1 last1, I2 first2, S2 last2, Comp comp = {},
                            Proj1 proj1 = {}, Proj2 proj2 = {});                                   // since C++20

  template<input_range R1, input_range R2, class Proj1 = identity,
           class Proj2 = identity,
           indirect_strict_weak_order<projected<iterator_t<R1>, Proj1>,
                                      projected<iterator_t<R2>, Proj2>> Comp = ranges::less>
    constexpr bool includes(R1&& r1, R2&& r2, Comp comp = {},
                            Proj1 proj1 = {}, Proj2 proj2 = {});                                   // since C++20

  template<bidirectional_iterator I, sentinel_for<I> S, class Comp = ranges::less,
           class Proj = identity>
    requires sortable<I, Comp, Proj>
    I inplace_merge(I first, I middle, S last, Comp comp = {}, Proj proj = {});                    // since C++20

  template<bidirectional_range R, class Comp = ranges::less, class Proj = identity>
    requires sortable<iterator_t<R>, Comp, Proj>
    borrowed_iterator_t<R>
      inplace_merge(R&& r, iterator_t<R> middle, Comp comp = {},
                    Proj proj = {});                                                               // since C++20

  template<permutable I, sentinel_for<I> S, class Proj = identity,
           indirect_equivalence_relation<projected<I, Proj>> C = ranges::equal_to>
    constexpr subrange<I> unique(I first, S last, C comp = {}, Proj proj = {});                    // since C++20

  template<forward_range R, class Proj = identity,
           indirect_equivalence_relation<projected<iterator_t<R>, Proj>> C = ranges::equal_to>
    requires permutable<iterator_t<R>>
    constexpr borrowed_subrange_t<R>
      unique(R&& r, C comp = {}, Proj proj = {});                                                  // since C++20

  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class Proj = identity,
           indirect_equivalence_relation<projected<I, Proj>> C = ranges::equal_to>
    requires indirectly_copyable<I, O> &&
             (forward_iterator<I> ||
              (input_iterator<O> && same_as<iter_value_t<I>, iter_value_t<O>>) ||
              indirectly_copyable_storable<I, O>)
    constexpr unique_copy_result<I, O>
      unique_copy(I first, S last, O result, C comp = {}, Proj proj = {});                         // since C++20

  template<input_range R, weakly_incrementable O, class Proj = identity,
           indirect_equivalence_relation<projected<iterator_t<R>, Proj>> C = ranges::equal_to>
    requires indirectly_copyable<iterator_t<R>, O> &&
             (forward_iterator<iterator_t<R>> ||
              (input_iterator<O> && same_as<range_value_t<R>, iter_value_t<O>>) ||
              indirectly_copyable_storable<iterator_t<R>, O>)
    constexpr unique_copy_result<borrowed_iterator_t<R>, O>
      unique_copy(R&& r, O result, C comp = {}, Proj proj = {});                                   // since C++20

  template<class I, class O>
      using remove_copy_result = in_out_result<I, O>;                                              // since C++20

  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class T,
           class Proj = identity>
             indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>
    constexpr remove_copy_result<I, O>
      remove_copy(I first, S last, O result, const T& value, Proj proj = {});                      // since C++20

  template<input_range R, weakly_incrementable O, class T, class Proj = identity>
    requires indirectly_copyable<iterator_t<R>, O> &&
             indirect_binary_predicate<ranges::equal_to,
                                       projected<iterator_t<R>, Proj>, const T*>
    constexpr remove_copy_result<borrowed_iterator_t<R>, O>
      remove_copy(R&& r, O result, const T& value, Proj proj = {});                                // since C++20

  template<class I, class O>
      using remove_copy_if_result = in_out_result<I, O>;                                           // since C++20

  template<input_iterator I, sentinel_for<I> S, weakly_incrementable O,
           class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred>
    requires indirectly_copyable<I, O>
    constexpr remove_copy_if_result<I, O>
      remove_copy_if(I first, S last, O result, Pred pred, Proj proj = {});                        // since C++20

  template<input_range R, weakly_incrementable O, class Proj = identity,
           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    requires indirectly_copyable<iterator_t<R>, O>
    constexpr remove_copy_if_result<borrowed_iterator_t<R>, O>
      remove_copy_if(R&& r, O result, Pred pred, Proj proj = {});                                  // since C++20

  template<class I, class O>
      using replace_copy_result = in_out_result<I, O>;                                             // since C++20

  template<input_iterator I, sentinel_for<I> S, class T1, class T2,
           output_iterator<const T2&> O, class Proj = identity>
    requires indirectly_copyable<I, O> &&
             indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T1*>
    constexpr replace_copy_result<I, O>
      replace_copy(I first, S last, O result, const T1& old_value, const T2& new_value,
                   Proj proj = {});                                                                // since C++20

  template<input_range R, class T1, class T2, output_iterator<const T2&> O,
           class Proj = identity>
    requires indirectly_copyable<iterator_t<R>, O> &&
             indirect_binary_predicate<ranges::equal_to,
                                       projected<iterator_t<R>, Proj>, const T1*>
    constexpr replace_copy_result<borrowed_iterator_t<R>, O>
      replace_copy(R&& r, O result, const T1& old_value, const T2& new_value,
                   Proj proj = {});                                                                // since C++20

  template<class I, class O>
      using replace_copy_if_result = in_out_result<I, O>;                                          // since C++20

  template<input_iterator I, sentinel_for<I> S, class T, output_iterator<const T&> O,
           class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred>
    requires indirectly_copyable<I, O>
    constexpr replace_copy_if_result<I, O>
      replace_copy_if(I first, S last, O result, Pred pred, const T& new_value,
                      Proj proj = {});                                                             // since C++20

  template<input_range R, class T, output_iterator<const T&> O, class Proj = identity,
           indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
    requires indirectly_copyable<iterator_t<R>, O>
    constexpr replace_copy_if_result<borrowed_iterator_t<R>, O>
      replace_copy_if(R&& r, O result, Pred pred, const T& new_value,
                      Proj proj = {});                                                             // since C++20

  template<class I>
    using prev_permutation_result = in_found_result<I>;                                            // since C++20

  template<bidirectional_iterator I, sentinel_for<I> S, class Comp = ranges::less,
           class Proj = identity>
    requires sortable<I, Comp, Proj>
    constexpr ranges::prev_permutation_result<I>
      ranges::prev_permutation(I first, S last, Comp comp = {}, Proj proj = {});                   // since C++20

  template<bidirectional_range R, class Comp = ranges::less,
           class Proj = identity>
    requires sortable<iterator_t<R>, Comp, Proj>
    constexpr ranges::prev_permutation_result<borrowed_iterator_t<R>>
      ranges::prev_permutation(R&& r, Comp comp = {}, Proj proj = {});                             // since C++20

  template<class I>
    using next_permutation_result = in_found_result<I>;                                            // since C++20

  template<bidirectional_iterator I, sentinel_for<I> S, class Comp = ranges::less,
           class Proj = identity>
    requires sortable<I, Comp, Proj>
    constexpr ranges::next_permutation_result<I>
      ranges::next_permutation(I first, S last, Comp comp = {}, Proj proj = {});                   // since C++20

  template<bidirectional_range R, class Comp = ranges::less,
           class Proj = identity>
    requires sortable<iterator_t<R>, Comp, Proj>
    constexpr ranges::next_permutation_result<borrowed_iterator_t<R>>
      ranges::next_permutation(R&& r, Comp comp = {}, Proj proj = {});                             // since C++20

}

template <class InputIterator, class Predicate>
    constexpr bool     // constexpr in C++20
    all_of(InputIterator first, InputIterator last, Predicate pred);

template <class InputIterator, class Predicate>
    constexpr bool     // constexpr in C++20
    any_of(InputIterator first, InputIterator last, Predicate pred);

template <class InputIterator, class Predicate>
    constexpr bool     // constexpr in C++20
    none_of(InputIterator first, InputIterator last, Predicate pred);

template <class InputIterator, class Function>
    constexpr Function          // constexpr in C++20
    for_each(InputIterator first, InputIterator last, Function f);

template<class InputIterator, class Size, class Function>
    constexpr InputIterator     // constexpr in C++20
    for_each_n(InputIterator first, Size n, Function f); // C++17

template <class InputIterator, class T>
    constexpr InputIterator     // constexpr in C++20
    find(InputIterator first, InputIterator last, const T& value);

template <class InputIterator, class Predicate>
    constexpr InputIterator     // constexpr in C++20
    find_if(InputIterator first, InputIterator last, Predicate pred);

template<class InputIterator, class Predicate>
    constexpr InputIterator     // constexpr in C++20
    find_if_not(InputIterator first, InputIterator last, Predicate pred);

template <class ForwardIterator1, class ForwardIterator2>
    constexpr ForwardIterator1  // constexpr in C++20
    find_end(ForwardIterator1 first1, ForwardIterator1 last1,
             ForwardIterator2 first2, ForwardIterator2 last2);

template <class ForwardIterator1, class ForwardIterator2, class BinaryPredicate>
    constexpr ForwardIterator1  // constexpr in C++20
    find_end(ForwardIterator1 first1, ForwardIterator1 last1,
             ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred);

template <class ForwardIterator1, class ForwardIterator2>
    constexpr ForwardIterator1  // constexpr in C++20
    find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
                  ForwardIterator2 first2, ForwardIterator2 last2);

template <class ForwardIterator1, class ForwardIterator2, class BinaryPredicate>
    constexpr ForwardIterator1  // constexpr in C++20
    find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
                  ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred);

template <class ForwardIterator>
    constexpr ForwardIterator   // constexpr in C++20
    adjacent_find(ForwardIterator first, ForwardIterator last);

template <class ForwardIterator, class BinaryPredicate>
    constexpr ForwardIterator   // constexpr in C++20
    adjacent_find(ForwardIterator first, ForwardIterator last, BinaryPredicate pred);

template <class InputIterator, class T>
    constexpr typename iterator_traits<InputIterator>::difference_type  // constexpr in C++20
    count(InputIterator first, InputIterator last, const T& value);

template <class InputIterator, class Predicate>
    constexpr typename iterator_traits<InputIterator>::difference_type // constexpr in C++20
    count_if(InputIterator first, InputIterator last, Predicate pred);

template <class InputIterator1, class InputIterator2>
    constexpr pair<InputIterator1, InputIterator2>   // constexpr in C++20
    mismatch(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2);

template <class InputIterator1, class InputIterator2>
    constexpr pair<InputIterator1, InputIterator2>   // constexpr in C++20
    mismatch(InputIterator1 first1, InputIterator1 last1,
             InputIterator2 first2, InputIterator2 last2); // **C++14**

template <class InputIterator1, class InputIterator2, class BinaryPredicate>
    constexpr pair<InputIterator1, InputIterator2>   // constexpr in C++20
    mismatch(InputIterator1 first1, InputIterator1 last1,
             InputIterator2 first2, BinaryPredicate pred);

template <class InputIterator1, class InputIterator2, class BinaryPredicate>
    constexpr pair<InputIterator1, InputIterator2>   // constexpr in C++20
    mismatch(InputIterator1 first1, InputIterator1 last1,
             InputIterator2 first2, InputIterator2 last2,
             BinaryPredicate pred); // **C++14**

template <class InputIterator1, class InputIterator2>
    constexpr bool      // constexpr in C++20
    equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2);

template <class InputIterator1, class InputIterator2>
    constexpr bool      // constexpr in C++20
    equal(InputIterator1 first1, InputIterator1 last1,
          InputIterator2 first2, InputIterator2 last2); // **C++14**

template <class InputIterator1, class InputIterator2, class BinaryPredicate>
    constexpr bool      // constexpr in C++20
    equal(InputIterator1 first1, InputIterator1 last1,
          InputIterator2 first2, BinaryPredicate pred);

template <class InputIterator1, class InputIterator2, class BinaryPredicate>
    constexpr bool      // constexpr in C++20
    equal(InputIterator1 first1, InputIterator1 last1,
          InputIterator2 first2, InputIterator2 last2,
          BinaryPredicate pred); // **C++14**

template<class ForwardIterator1, class ForwardIterator2>
    constexpr bool      // constexpr in C++20
    is_permutation(ForwardIterator1 first1, ForwardIterator1 last1,
                   ForwardIterator2 first2);

template<class ForwardIterator1, class ForwardIterator2>
    constexpr bool      // constexpr in C++20
    is_permutation(ForwardIterator1 first1, ForwardIterator1 last1,
                   ForwardIterator2 first2, ForwardIterator2 last2); // **C++14**

template<class ForwardIterator1, class ForwardIterator2, class BinaryPredicate>
    constexpr bool      // constexpr in C++20
    is_permutation(ForwardIterator1 first1, ForwardIterator1 last1,
                   ForwardIterator2 first2, BinaryPredicate pred);

template<class ForwardIterator1, class ForwardIterator2, class BinaryPredicate>
    constexpr bool      // constexpr in C++20
    is_permutation(ForwardIterator1 first1, ForwardIterator1 last1,
                   ForwardIterator2 first2, ForwardIterator2 last2,
                   BinaryPredicate pred);  // **C++14**

template <class ForwardIterator1, class ForwardIterator2>
    constexpr ForwardIterator1      // constexpr in C++20
    search(ForwardIterator1 first1, ForwardIterator1 last1,
           ForwardIterator2 first2, ForwardIterator2 last2);

template <class ForwardIterator1, class ForwardIterator2, class BinaryPredicate>
    constexpr ForwardIterator1      // constexpr in C++20
    search(ForwardIterator1 first1, ForwardIterator1 last1,
           ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred);

template <class ForwardIterator, class Size, class T>
    constexpr ForwardIterator       // constexpr in C++20
    search_n(ForwardIterator first, ForwardIterator last, Size count, const T& value);

template <class ForwardIterator, class Size, class T, class BinaryPredicate>
    constexpr ForwardIterator       // constexpr in C++20
    search_n(ForwardIterator first, ForwardIterator last,
             Size count, const T& value, BinaryPredicate pred);

template <class InputIterator, class OutputIterator>
    constexpr OutputIterator      // constexpr in C++20
    copy(InputIterator first, InputIterator last, OutputIterator result);

template<class InputIterator, class OutputIterator, class Predicate>
    constexpr OutputIterator      // constexpr in C++20
    copy_if(InputIterator first, InputIterator last,
            OutputIterator result, Predicate pred);

template<class InputIterator, class Size, class OutputIterator>
    constexpr OutputIterator      // constexpr in C++20
    copy_n(InputIterator first, Size n, OutputIterator result);

template <class BidirectionalIterator1, class BidirectionalIterator2>
    constexpr BidirectionalIterator2      // constexpr in C++20
    copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last,
                  BidirectionalIterator2 result);

// [alg.move], move
template<class InputIterator, class OutputIterator>
    constexpr OutputIterator move(InputIterator first, InputIterator last,
                                OutputIterator result);

template<class BidirectionalIterator1, class BidirectionalIterator2>
    constexpr BidirectionalIterator2
    move_backward(BidirectionalIterator1 first, BidirectionalIterator1 last,
                  BidirectionalIterator2 result);

template <class ForwardIterator1, class ForwardIterator2>
    constexpr ForwardIterator2    // constexpr in C++20
    swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2);

namespace ranges {
    template<class I1, class I2>
    using swap_ranges_result = in_in_result<I1, I2>;

template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2>
        requires indirectly_swappable<I1, I2>
    constexpr ranges::swap_ranges_result<I1, I2>
        swap_ranges(I1 first1, S1 last1, I2 first2, S2 last2);

template<input_range R1, input_range R2>
        requires indirectly_swappable<iterator_t<R1>, iterator_t<R2>>
    constexpr ranges::swap_ranges_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>>
        swap_ranges(R1&& r1, R2&& r2);
}

template <class ForwardIterator1, class ForwardIterator2>
    constexpr void                // constexpr in C++20
    iter_swap(ForwardIterator1 a, ForwardIterator2 b);

template <class InputIterator, class OutputIterator, class UnaryOperation>
    constexpr OutputIterator      // constexpr in C++20
    transform(InputIterator first, InputIterator last, OutputIterator result, UnaryOperation op);

template <class InputIterator1, class InputIterator2, class OutputIterator, class BinaryOperation>
    constexpr OutputIterator      // constexpr in C++20
    transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2,
              OutputIterator result, BinaryOperation binary_op);

template <class ForwardIterator, class T>
    constexpr void      // constexpr in C++20
    replace(ForwardIterator first, ForwardIterator last, const T& old_value, const T& new_value);

template <class ForwardIterator, class Predicate, class T>
    constexpr void      // constexpr in C++20
    replace_if(ForwardIterator first, ForwardIterator last, Predicate pred, const T& new_value);

template <class InputIterator, class OutputIterator, class T>
    constexpr OutputIterator      // constexpr in C++20
    replace_copy(InputIterator first, InputIterator last, OutputIterator result,
                 const T& old_value, const T& new_value);

template <class InputIterator, class OutputIterator, class Predicate, class T>
    constexpr OutputIterator      // constexpr in C++20
    replace_copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred, const T& new_value);

template <class ForwardIterator, class T>
    constexpr void      // constexpr in C++20
    fill(ForwardIterator first, ForwardIterator last, const T& value);

template <class OutputIterator, class Size, class T>
    constexpr OutputIterator      // constexpr in C++20
    fill_n(OutputIterator first, Size n, const T& value);

template <class ForwardIterator, class Generator>
    constexpr void      // constexpr in C++20
    generate(ForwardIterator first, ForwardIterator last, Generator gen);

template <class OutputIterator, class Size, class Generator>
    constexpr OutputIterator      // constexpr in C++20
    generate_n(OutputIterator first, Size n, Generator gen);

template <class ForwardIterator, class T>
    constexpr ForwardIterator     // constexpr in C++20
    remove(ForwardIterator first, ForwardIterator last, const T& value);

template <class ForwardIterator, class Predicate>
    constexpr ForwardIterator     // constexpr in C++20
    remove_if(ForwardIterator first, ForwardIterator last, Predicate pred);

template <class InputIterator, class OutputIterator, class T>
    constexpr OutputIterator     // constexpr in C++20
    remove_copy(InputIterator first, InputIterator last, OutputIterator result, const T& value);

template <class InputIterator, class OutputIterator, class Predicate>
    constexpr OutputIterator     // constexpr in C++20
    remove_copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred);

template <class ForwardIterator>
    constexpr ForwardIterator    // constexpr in C++20
    unique(ForwardIterator first, ForwardIterator last);

template <class ForwardIterator, class BinaryPredicate>
    constexpr ForwardIterator    // constexpr in C++20
    unique(ForwardIterator first, ForwardIterator last, BinaryPredicate pred);

template <class InputIterator, class OutputIterator>
    constexpr OutputIterator     // constexpr in C++20
    unique_copy(InputIterator first, InputIterator last, OutputIterator result);

template <class InputIterator, class OutputIterator, class BinaryPredicate>
    constexpr OutputIterator     // constexpr in C++20
    unique_copy(InputIterator first, InputIterator last, OutputIterator result, BinaryPredicate pred);

template <class BidirectionalIterator>
    constexpr void               // constexpr in C++20
    reverse(BidirectionalIterator first, BidirectionalIterator last);

template <class BidirectionalIterator, class OutputIterator>
    constexpr OutputIterator       // constexpr in C++20
    reverse_copy(BidirectionalIterator first, BidirectionalIterator last, OutputIterator result);

template <class ForwardIterator>
    constexpr ForwardIterator      // constexpr in C++20
    rotate(ForwardIterator first, ForwardIterator middle, ForwardIterator last);

template <class ForwardIterator, class OutputIterator>
    constexpr OutputIterator       // constexpr in C++20
    rotate_copy(ForwardIterator first, ForwardIterator middle, ForwardIterator last, OutputIterator result);

template <class RandomAccessIterator>
    void
    random_shuffle(RandomAccessIterator first, RandomAccessIterator last); // deprecated in C++14, removed in C++17

template <class RandomAccessIterator, class RandomNumberGenerator>
    void
    random_shuffle(RandomAccessIterator first, RandomAccessIterator last,
                   RandomNumberGenerator& rand);  // deprecated in C++14, removed in C++17

template<class PopulationIterator, class SampleIterator,
         class Distance, class UniformRandomBitGenerator>
    SampleIterator sample(PopulationIterator first, PopulationIterator last,
                          SampleIterator out, Distance n,
                          UniformRandomBitGenerator&& g); // C++17

template<class RandomAccessIterator, class UniformRandomNumberGenerator>
    void shuffle(RandomAccessIterator first, RandomAccessIterator last,
                 UniformRandomNumberGenerator&& g);

template<class ForwardIterator>
  constexpr ForwardIterator
    shift_left(ForwardIterator first, ForwardIterator last,
               typename iterator_traits<ForwardIterator>::difference_type n); // C++20

template<class ForwardIterator>
  constexpr ForwardIterator
    shift_right(ForwardIterator first, ForwardIterator last,
                typename iterator_traits<ForwardIterator>::difference_type n); // C++20

template <class InputIterator, class Predicate>
    constexpr bool  // constexpr in C++20
    is_partitioned(InputIterator first, InputIterator last, Predicate pred);

template <class ForwardIterator, class Predicate>
    constexpr ForwardIterator  // constexpr in C++20
    partition(ForwardIterator first, ForwardIterator last, Predicate pred);

template <class InputIterator, class OutputIterator1,
          class OutputIterator2, class Predicate>
    constexpr pair<OutputIterator1, OutputIterator2>   // constexpr in C++20
    partition_copy(InputIterator first, InputIterator last,
                   OutputIterator1 out_true, OutputIterator2 out_false,
                   Predicate pred);

template <class ForwardIterator, class Predicate>
    ForwardIterator
    stable_partition(ForwardIterator first, ForwardIterator last, Predicate pred);

template<class ForwardIterator, class Predicate>
    constexpr ForwardIterator  // constexpr in C++20
    partition_point(ForwardIterator first, ForwardIterator last, Predicate pred);

template <class ForwardIterator>
    constexpr bool  // constexpr in C++20
    is_sorted(ForwardIterator first, ForwardIterator last);

template <class ForwardIterator, class Compare>
    constexpr bool  // constexpr in C++20
    is_sorted(ForwardIterator first, ForwardIterator last, Compare comp);

template<class ForwardIterator>
    constexpr ForwardIterator    // constexpr in C++20
    is_sorted_until(ForwardIterator first, ForwardIterator last);

template <class ForwardIterator, class Compare>
    constexpr ForwardIterator    // constexpr in C++20
    is_sorted_until(ForwardIterator first, ForwardIterator last, Compare comp);

template <class RandomAccessIterator>
    constexpr void               // constexpr in C++20
    sort(RandomAccessIterator first, RandomAccessIterator last);

template <class RandomAccessIterator, class Compare>
    constexpr void               // constexpr in C++20
    sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp);

template <class RandomAccessIterator>
    void
    stable_sort(RandomAccessIterator first, RandomAccessIterator last);

template <class RandomAccessIterator, class Compare>
    void
    stable_sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp);

template <class RandomAccessIterator>
    constexpr void                    // constexpr in C++20
    partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last);

template <class RandomAccessIterator, class Compare>
    constexpr void                    // constexpr in C++20
    partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last, Compare comp);

template <class InputIterator, class RandomAccessIterator>
    constexpr RandomAccessIterator    // constexpr in C++20
    partial_sort_copy(InputIterator first, InputIterator last,
                      RandomAccessIterator result_first, RandomAccessIterator result_last);

template <class InputIterator, class RandomAccessIterator, class Compare>
    constexpr RandomAccessIterator    // constexpr in C++20
    partial_sort_copy(InputIterator first, InputIterator last,
                      RandomAccessIterator result_first, RandomAccessIterator result_last, Compare comp);

template <class RandomAccessIterator>
    constexpr void                    // constexpr in C++20
    nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last);

template <class RandomAccessIterator, class Compare>
    constexpr void                    // constexpr in C++20
    nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last, Compare comp);

template <class ForwardIterator, class T>
    constexpr ForwardIterator                         // constexpr in C++20
    lower_bound(ForwardIterator first, ForwardIterator last, const T& value);

template <class ForwardIterator, class T, class Compare>
    constexpr ForwardIterator                         // constexpr in C++20
    lower_bound(ForwardIterator first, ForwardIterator last, const T& value, Compare comp);

template <class ForwardIterator, class T>
    constexpr ForwardIterator                         // constexpr in C++20
    upper_bound(ForwardIterator first, ForwardIterator last, const T& value);

template <class ForwardIterator, class T, class Compare>
    constexpr ForwardIterator                         // constexpr in C++20
    upper_bound(ForwardIterator first, ForwardIterator last, const T& value, Compare comp);

template <class ForwardIterator, class T>
    constexpr pair<ForwardIterator, ForwardIterator>  // constexpr in C++20
    equal_range(ForwardIterator first, ForwardIterator last, const T& value);

template <class ForwardIterator, class T, class Compare>
    constexpr pair<ForwardIterator, ForwardIterator>  // constexpr in C++20
    equal_range(ForwardIterator first, ForwardIterator last, const T& value, Compare comp);

template <class ForwardIterator, class T>
    constexpr bool                                    // constexpr in C++20
    binary_search(ForwardIterator first, ForwardIterator last, const T& value);

template <class ForwardIterator, class T, class Compare>
    constexpr bool                                    // constexpr in C++20
    binary_search(ForwardIterator first, ForwardIterator last, const T& value, Compare comp);

template <class InputIterator1, class InputIterator2, class OutputIterator>
    constexpr OutputIterator                          // constexpr in C++20
    merge(InputIterator1 first1, InputIterator1 last1,
          InputIterator2 first2, InputIterator2 last2, OutputIterator result);

template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare>
    constexpr OutputIterator                          // constexpr in C++20
    merge(InputIterator1 first1, InputIterator1 last1,
          InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp);

template <class BidirectionalIterator>
    void
    inplace_merge(BidirectionalIterator first, BidirectionalIterator middle, BidirectionalIterator last);

template <class BidirectionalIterator, class Compare>
    void
    inplace_merge(BidirectionalIterator first, BidirectionalIterator middle, BidirectionalIterator last, Compare comp);

template <class InputIterator1, class InputIterator2>
    constexpr bool                                    // constexpr in C++20
    includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2);

template <class InputIterator1, class InputIterator2, class Compare>
    constexpr bool                                    // constexpr in C++20
    includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, Compare comp);

template <class InputIterator1, class InputIterator2, class OutputIterator>
    constexpr OutputIterator                          // constexpr in C++20
    set_union(InputIterator1 first1, InputIterator1 last1,
              InputIterator2 first2, InputIterator2 last2, OutputIterator result);

template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare>
    constexpr OutputIterator                          // constexpr in C++20
    set_union(InputIterator1 first1, InputIterator1 last1,
              InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp);

template <class InputIterator1, class InputIterator2, class OutputIterator>
    constexpr OutputIterator                         // constexpr in C++20
    set_intersection(InputIterator1 first1, InputIterator1 last1,
                     InputIterator2 first2, InputIterator2 last2, OutputIterator result);

template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare>
    constexpr OutputIterator                         // constexpr in C++20
    set_intersection(InputIterator1 first1, InputIterator1 last1,
                     InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp);

template <class InputIterator1, class InputIterator2, class OutputIterator>
    constexpr OutputIterator                         // constexpr in C++20
    set_difference(InputIterator1 first1, InputIterator1 last1,
                   InputIterator2 first2, InputIterator2 last2, OutputIterator result);

template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare>
    constexpr OutputIterator                         // constexpr in C++20
    set_difference(InputIterator1 first1, InputIterator1 last1,
                   InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp);

template <class InputIterator1, class InputIterator2, class OutputIterator>
    constexpr OutputIterator                         // constexpr in C++20
    set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
                             InputIterator2 first2, InputIterator2 last2, OutputIterator result);

template <class InputIterator1, class InputIterator2, class OutputIterator, class Compare>
    constexpr OutputIterator                         // constexpr in C++20
    set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
                             InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp);

template <class RandomAccessIterator>
    constexpr void                                   // constexpr in C++20
    push_heap(RandomAccessIterator first, RandomAccessIterator last);

template <class RandomAccessIterator, class Compare>
    constexpr void                                   // constexpr in C++20
    push_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp);

template <class RandomAccessIterator>
    constexpr void                                   // constexpr in C++20
    pop_heap(RandomAccessIterator first, RandomAccessIterator last);

template <class RandomAccessIterator, class Compare>
    constexpr void                                   // constexpr in C++20
    pop_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp);

template <class RandomAccessIterator>
    constexpr void                                   // constexpr in C++20
    make_heap(RandomAccessIterator first, RandomAccessIterator last);

template <class RandomAccessIterator, class Compare>
    constexpr void                                   // constexpr in C++20
    make_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp);

template <class RandomAccessIterator>
    constexpr void                                   // constexpr in C++20
    sort_heap(RandomAccessIterator first, RandomAccessIterator last);

template <class RandomAccessIterator, class Compare>
    constexpr void                                   // constexpr in C++20
    sort_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp);

template <class RandomAccessIterator>
    constexpr bool   // constexpr in C++20
    is_heap(RandomAccessIterator first, RandomAccessiterator last);

template <class RandomAccessIterator, class Compare>
    constexpr bool   // constexpr in C++20
    is_heap(RandomAccessIterator first, RandomAccessiterator last, Compare comp);

template <class RandomAccessIterator>
    constexpr RandomAccessIterator   // constexpr in C++20
    is_heap_until(RandomAccessIterator first, RandomAccessiterator last);

template <class RandomAccessIterator, class Compare>
    constexpr RandomAccessIterator   // constexpr in C++20
    is_heap_until(RandomAccessIterator first, RandomAccessiterator last, Compare comp);

template <class ForwardIterator>
    constexpr ForwardIterator        // constexpr in C++14
    min_element(ForwardIterator first, ForwardIterator last);

template <class ForwardIterator, class Compare>
    constexpr ForwardIterator        // constexpr in C++14
    min_element(ForwardIterator first, ForwardIterator last, Compare comp);

template <class T>
    constexpr const T&               // constexpr in C++14
    min(const T& a, const T& b);

template <class T, class Compare>
    constexpr const T&               // constexpr in C++14
    min(const T& a, const T& b, Compare comp);

template<class T>
    constexpr T                      // constexpr in C++14
    min(initializer_list<T> t);

template<class T, class Compare>
    constexpr T                      // constexpr in C++14
    min(initializer_list<T> t, Compare comp);

template<class T>
    constexpr const T& clamp(const T& v, const T& lo, const T& hi);               // C++17

template<class T, class Compare>
    constexpr const T& clamp(const T& v, const T& lo, const T& hi, Compare comp); // C++17

template <class ForwardIterator>
    constexpr ForwardIterator        // constexpr in C++14
    max_element(ForwardIterator first, ForwardIterator last);

template <class ForwardIterator, class Compare>
    constexpr ForwardIterator        // constexpr in C++14
    max_element(ForwardIterator first, ForwardIterator last, Compare comp);

template <class T>
    constexpr const T&               // constexpr in C++14
    max(const T& a, const T& b);

template <class T, class Compare>
    constexpr const T&               // constexpr in C++14
    max(const T& a, const T& b, Compare comp);

template<class T>
    constexpr T                      // constexpr in C++14
    max(initializer_list<T> t);

template<class T, class Compare>
    constexpr T                      // constexpr in C++14
    max(initializer_list<T> t, Compare comp);

template<class ForwardIterator>
    constexpr pair<ForwardIterator, ForwardIterator>  // constexpr in C++14
    minmax_element(ForwardIterator first, ForwardIterator last);

template<class ForwardIterator, class Compare>
    constexpr pair<ForwardIterator, ForwardIterator>  // constexpr in C++14
    minmax_element(ForwardIterator first, ForwardIterator last, Compare comp);

template<class T>
    constexpr pair<const T&, const T&>  // constexpr in C++14
    minmax(const T& a, const T& b);

template<class T, class Compare>
    constexpr pair<const T&, const T&>  // constexpr in C++14
    minmax(const T& a, const T& b, Compare comp);

template<class T>
    constexpr pair<T, T>                // constexpr in C++14
    minmax(initializer_list<T> t);

template<class T, class Compare>
    constexpr pair<T, T>                // constexpr in C++14
    minmax(initializer_list<T> t, Compare comp);

template <class InputIterator1, class InputIterator2>
    constexpr bool     // constexpr in C++20
    lexicographical_compare(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2);

template <class InputIterator1, class InputIterator2, class Compare>
    constexpr bool     // constexpr in C++20
    lexicographical_compare(InputIterator1 first1, InputIterator1 last1,
                            InputIterator2 first2, InputIterator2 last2, Compare comp);

template<class InputIterator1, class InputIterator2, class Cmp>
    constexpr auto
    lexicographical_compare_three_way(InputIterator1 first1, InputIterator1 last1,
                                      InputIterator2 first2, InputIterator2 last2,
                                      Cmp comp)
      -> decltype(comp(*b1, *b2));                                                        // since C++20

template<class InputIterator1, class InputIterator2>
    constexpr auto
    lexicographical_compare_three_way(InputIterator1 first1, InputIterator1 last1,
                                      InputIterator2 first2, InputIterator2 last2);      // since C++20

template <class BidirectionalIterator>
    constexpr bool     // constexpr in C++20
    next_permutation(BidirectionalIterator first, BidirectionalIterator last);

template <class BidirectionalIterator, class Compare>
    constexpr bool     // constexpr in C++20
    next_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp);

template <class BidirectionalIterator>
    constexpr bool     // constexpr in C++20
    prev_permutation(BidirectionalIterator first, BidirectionalIterator last);

template <class BidirectionalIterator, class Compare>
    constexpr bool     // constexpr in C++20
    prev_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp);
}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 1755 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1756 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 1756 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1757 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 1757 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1758 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 1758 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1759 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* adjacent_find.h expanded by -frewrite-includes */
#include <__algorithm/adjacent_find.h>
#else /* adjacent_find.h expanded by -frewrite-includes */
# 1760 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_ADJACENT_FIND_H
#define _LIBCPP___ALGORITHM_ADJACENT_FIND_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Iter, class _Sent, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter
__adjacent_find(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
  if (__first == __last)
    return __first;
  _Iter __i = __first;
  while (++__i != __last) {
    if (__pred(*__first, *__i))
      return __first;
    __first = __i;
  }
  return __i;
}

template <class _ForwardIterator, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
adjacent_find(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred) {
  return std::__adjacent_find(std::move(__first), std::move(__last), __pred);
}

template <class _ForwardIterator>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
adjacent_find(_ForwardIterator __first, _ForwardIterator __last) {
  return std::adjacent_find(std::move(__first), std::move(__last), __equal_to());
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_ADJACENT_FIND_H
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/adjacent_find.h" 3
#endif /* adjacent_find.h expanded by -frewrite-includes */
# 1761 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* all_of.h expanded by -frewrite-includes */
#include <__algorithm/all_of.h>
#else /* all_of.h expanded by -frewrite-includes */
# 1761 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/all_of.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_ALL_OF_H
#define _LIBCPP___ALGORITHM_ALL_OF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/all_of.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/all_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/all_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/all_of.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/all_of.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _Predicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
  for (; __first != __last; ++__first)
    if (!__pred(*__first))
      return false;
  return true;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_ALL_OF_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/all_of.h" 3
#endif /* all_of.h expanded by -frewrite-includes */
# 1762 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* any_of.h expanded by -frewrite-includes */
#include <__algorithm/any_of.h>
#else /* any_of.h expanded by -frewrite-includes */
# 1762 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/any_of.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_ANY_OF_H
#define _LIBCPP___ALGORITHM_ANY_OF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/any_of.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/any_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/any_of.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/any_of.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _Predicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
  for (; __first != __last; ++__first)
    if (__pred(*__first))
      return true;
  return false;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_ANY_OF_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/any_of.h" 3
#endif /* any_of.h expanded by -frewrite-includes */
# 1763 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* binary_search.h expanded by -frewrite-includes */
#include <__algorithm/binary_search.h>
#else /* binary_search.h expanded by -frewrite-includes */
# 1763 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/binary_search.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_BINARY_SEARCH_H
#define _LIBCPP___ALGORITHM_BINARY_SEARCH_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/binary_search.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/binary_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/binary_search.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/binary_search.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* lower_bound.h expanded by -frewrite-includes */
#include <__algorithm/lower_bound.h>
#else /* lower_bound.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/binary_search.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_LOWER_BOUND_H
#define _LIBCPP___ALGORITHM_LOWER_BOUND_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* half_positive.h expanded by -frewrite-includes */
#include <__algorithm/half_positive.h>
#else /* half_positive.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/half_positive.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_HALF_POSITIVE_H
#define _LIBCPP___ALGORITHM_HALF_POSITIVE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/half_positive.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/half_positive.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/half_positive.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/half_positive.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/half_positive.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/half_positive.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/half_positive.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/half_positive.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/half_positive.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/half_positive.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/half_positive.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Perform division by two quickly for positive integers (llvm.org/PR39129)

template <typename _Integral, __enable_if_t<is_integral<_Integral>::value, int> = 0>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
_Integral
__half_positive(_Integral __value)
{
    return static_cast<_Integral>(static_cast<__make_unsigned_t<_Integral> >(__value) / 2);
}

template <typename _Tp, __enable_if_t<!is_integral<_Tp>::value, int> = 0>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
_Tp
__half_positive(_Tp __value)
{
    return __value / 2;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_HALF_POSITIVE_H
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/half_positive.h" 3
#endif /* half_positive.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_callable.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Iter, class _Sent, class _Type, class _Proj, class _Comp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_Iter __lower_bound(_Iter __first, _Sent __last, const _Type& __value, _Comp& __comp, _Proj& __proj) {
  auto __len = _IterOps<_AlgPolicy>::distance(__first, __last);

  while (__len != 0) {
    auto __l2 = std::__half_positive(__len);
    _Iter __m = __first;
    _IterOps<_AlgPolicy>::advance(__m, __l2);
    if (std::__invoke(__comp, std::__invoke(__proj, *__m), __value)) {
      __first = ++__m;
      __len -= __l2 + 1;
    } else {
      __len = __l2;
    }
  }
  return __first;
}

template <class _ForwardIterator, class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
  static_assert(__is_callable<_Compare, decltype(*__first), const _Tp&>::value,
                "The comparator has to be callable");
  auto __proj = std::__identity();
  return std::__lower_bound<_ClassicAlgPolicy>(__first, __last, __value, __comp, __proj);
}

template <class _ForwardIterator, class _Tp>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
  return std::lower_bound(__first, __last, __value, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_LOWER_BOUND_H
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/lower_bound.h" 3
#endif /* lower_bound.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/binary_search.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/binary_search.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/binary_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/binary_search.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/binary_search.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/binary_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/binary_search.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/binary_search.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ForwardIterator, class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp)
{
    __first = std::lower_bound<_ForwardIterator, _Tp, __comp_ref_type<_Compare> >(__first, __last, __value, __comp);
    return __first != __last && !__comp(__value, *__first);
}

template <class _ForwardIterator, class _Tp>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
{
    return std::binary_search(__first, __last, __value, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_BINARY_SEARCH_H
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/binary_search.h" 3
#endif /* binary_search.h expanded by -frewrite-includes */
# 1764 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* clamp.h expanded by -frewrite-includes */
#include <__algorithm/clamp.h>
#else /* clamp.h expanded by -frewrite-includes */
# 1764 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/clamp.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_CLAMP_H
#define _LIBCPP___ALGORITHM_CLAMP_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/clamp.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/clamp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/clamp.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/clamp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/clamp.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/clamp.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/clamp.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/clamp.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/clamp.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/clamp.h" 3
template <class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI constexpr const _Tp&
clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v,
      _LIBCPP_LIFETIMEBOUND const _Tp& __lo,
      _LIBCPP_LIFETIMEBOUND const _Tp& __hi,
      _Compare __comp) {
  _LIBCPP_ASSERT_UNCATEGORIZED(!__comp(__hi, __lo), "Bad bounds passed to std::clamp");
  return __comp(__v, __lo) ? __lo : __comp(__hi, __v) ? __hi : __v;
}

template <class _Tp>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI constexpr const _Tp&
clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v,
      _LIBCPP_LIFETIMEBOUND const _Tp& __lo,
      _LIBCPP_LIFETIMEBOUND const _Tp& __hi) {
  return _VSTD::clamp(__v, __lo, __hi, __less<>());
}
#endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/clamp.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_CLAMP_H
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/clamp.h" 3
#endif /* clamp.h expanded by -frewrite-includes */
# 1765 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 1765 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1766 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 1766 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1767 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy.h>
#endif /* expanded by -frewrite-includes */
# 1767 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1768 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* copy_backward.h expanded by -frewrite-includes */
#include <__algorithm/copy_backward.h>
#else /* copy_backward.h expanded by -frewrite-includes */
# 1768 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_COPY_BACKWARD_H
#define _LIBCPP___ALGORITHM_COPY_BACKWARD_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy_move_common.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/segmented_iterator.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InIter, _OutIter>
__copy_backward(_InIter __first, _Sent __last, _OutIter __result);

template <class _AlgPolicy>
struct __copy_backward_loop {
  template <class _InIter, class _Sent, class _OutIter>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
  operator()(_InIter __first, _Sent __last, _OutIter __result) const {
    auto __last_iter          = _IterOps<_AlgPolicy>::next(__first, __last);
    auto __original_last_iter = __last_iter;

    while (__first != __last_iter) {
      *--__result = *--__last_iter;
    }

    return std::make_pair(std::move(__original_last_iter), std::move(__result));
  }

  template <class _InIter, class _OutIter, __enable_if_t<__is_segmented_iterator<_InIter>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
  operator()(_InIter __first, _InIter __last, _OutIter __result) const {
    using _Traits = __segmented_iterator_traits<_InIter>;
    auto __sfirst = _Traits::__segment(__first);
    auto __slast  = _Traits::__segment(__last);
    if (__sfirst == __slast) {
      auto __iters =
          std::__copy_backward<_AlgPolicy>(_Traits::__local(__first), _Traits::__local(__last), std::move(__result));
      return std::make_pair(__last, __iters.second);
    }

    __result =
        std::__copy_backward<_AlgPolicy>(_Traits::__begin(__slast), _Traits::__local(__last), std::move(__result))
            .second;
    --__slast;
    while (__sfirst != __slast) {
      __result =
          std::__copy_backward<_AlgPolicy>(_Traits::__begin(__slast), _Traits::__end(__slast), std::move(__result))
              .second;
      --__slast;
    }
    __result = std::__copy_backward<_AlgPolicy>(_Traits::__local(__first), _Traits::__end(__slast), std::move(__result))
                   .second;
    return std::make_pair(__last, std::move(__result));
  }

  template <class _InIter,
            class _OutIter,
            __enable_if_t<__has_random_access_iterator_category<_InIter>::value &&
                              !__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
                          int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
  operator()(_InIter __first, _InIter __last, _OutIter __result) const {
    using _Traits           = __segmented_iterator_traits<_OutIter>;
    auto __orig_last        = __last;
    auto __segment_iterator = _Traits::__segment(__result);

    // When the range contains no elements, __result might not be a valid iterator
    if (__first == __last)
      return std::make_pair(__first, __result);

    auto __local_last = _Traits::__local(__result);
    while (true) {
      using _DiffT = typename common_type<__iter_diff_t<_InIter>, __iter_diff_t<_OutIter> >::type;

      auto __local_first = _Traits::__begin(__segment_iterator);
      auto __size        = std::min<_DiffT>(__local_last - __local_first, __last - __first);
      auto __iter        = std::__copy_backward<_AlgPolicy>(__last - __size, __last, __local_last).second;
      __last -= __size;

      if (__first == __last)
        return std::make_pair(std::move(__orig_last), _Traits::__compose(__segment_iterator, std::move(__iter)));
      --__segment_iterator;
      __local_last = _Traits::__end(__segment_iterator);
    }
  }
};

struct __copy_backward_trivial {
  // At this point, the iterators have been unwrapped so any `contiguous_iterator` has been unwrapped to a pointer.
  template <class _In, class _Out,
            __enable_if_t<__can_lower_copy_assignment_to_memmove<_In, _Out>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
  operator()(_In* __first, _In* __last, _Out* __result) const {
    return std::__copy_backward_trivial_impl(__first, __last, __result);
  }
};

template <class _AlgPolicy, class _BidirectionalIterator1, class _Sentinel, class _BidirectionalIterator2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator1, _BidirectionalIterator2>
__copy_backward(_BidirectionalIterator1 __first, _Sentinel __last, _BidirectionalIterator2 __result) {
  return std::__dispatch_copy_or_move<_AlgPolicy, __copy_backward_loop<_AlgPolicy>, __copy_backward_trivial>(
      std::move(__first), std::move(__last), std::move(__result));
}

template <class _BidirectionalIterator1, class _BidirectionalIterator2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_BidirectionalIterator2
copy_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
              _BidirectionalIterator2 __result)
{
  static_assert(std::is_copy_constructible<_BidirectionalIterator1>::value &&
                std::is_copy_constructible<_BidirectionalIterator1>::value, "Iterators must be copy constructible.");

  return std::__copy_backward<_ClassicAlgPolicy>(
      std::move(__first), std::move(__last), std::move(__result)).second;
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_COPY_BACKWARD_H
# 144 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_backward.h" 3
#endif /* copy_backward.h expanded by -frewrite-includes */
# 1769 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* copy_if.h expanded by -frewrite-includes */
#include <__algorithm/copy_if.h>
#else /* copy_if.h expanded by -frewrite-includes */
# 1769 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_if.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_COPY_IF_H
#define _LIBCPP___ALGORITHM_COPY_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_if.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_if.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template<class _InputIterator, class _OutputIterator, class _Predicate>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
copy_if(_InputIterator __first, _InputIterator __last,
        _OutputIterator __result, _Predicate __pred)
{
    for (; __first != __last; ++__first)
    {
        if (__pred(*__first))
        {
            *__result = *__first;
            ++__result;
        }
    }
    return __result;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_COPY_IF_H
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/copy_if.h" 3
#endif /* copy_if.h expanded by -frewrite-includes */
# 1770 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy_n.h>
#endif /* expanded by -frewrite-includes */
# 1770 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1771 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* count.h expanded by -frewrite-includes */
#include <__algorithm/count.h>
#else /* count.h expanded by -frewrite-includes */
# 1771 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_COUNT_H
#define _LIBCPP___ALGORITHM_COUNT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* invert_if.h expanded by -frewrite-includes */
#include <__bit/invert_if.h>
#else /* invert_if.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/invert_if.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___BIT_INVERT_IF_H
#define _LIBCPP___BIT_INVERT_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/invert_if.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/invert_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/invert_if.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/invert_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/invert_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/invert_if.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/invert_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <bool _Invert, class _Tp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp __invert_if(_Tp __v) {
  if (_Invert)
    return ~__v;
  return __v;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___BIT_INVERT_IF_H
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit/invert_if.h" 3
#endif /* invert_if.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/popcount.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* bit_reference.h expanded by -frewrite-includes */
#include <__fwd/bit_reference.h>
#else /* bit_reference.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/bit_reference.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_BIT_REFERENCE_H
#define _LIBCPP___FWD_BIT_REFERENCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/bit_reference.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/bit_reference.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/bit_reference.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/bit_reference.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/bit_reference.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Cp, bool _IsConst, typename _Cp::__storage_type = 0>
class __bit_iterator;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FWD_BIT_REFERENCE_H
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/bit_reference.h" 3
#endif /* bit_reference.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

// generic implementation
template <class _AlgPolicy, class _Iter, class _Sent, class _Tp, class _Proj>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 typename _IterOps<_AlgPolicy>::template __difference_type<_Iter>
__count(_Iter __first, _Sent __last, const _Tp& __value, _Proj& __proj) {
  typename _IterOps<_AlgPolicy>::template __difference_type<_Iter> __r(0);
  for (; __first != __last; ++__first)
    if (std::__invoke(__proj, *__first) == __value)
      ++__r;
  return __r;
}

// __bit_iterator implementation
template <bool _ToCount, class _Cp, bool _IsConst>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 typename __bit_iterator<_Cp, _IsConst>::difference_type
__count_bool(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) {
  using _It             = __bit_iterator<_Cp, _IsConst>;
  using __storage_type  = typename _It::__storage_type;
  using difference_type = typename _It::difference_type;

  const int __bits_per_word = _It::__bits_per_word;
  difference_type __r       = 0;
  // do first partial word
  if (__first.__ctz_ != 0) {
    __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
    __storage_type __dn    = std::min(__clz_f, __n);
    __storage_type __m     = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
    __r                    = std::__libcpp_popcount(std::__invert_if<!_ToCount>(*__first.__seg_) & __m);
    __n -= __dn;
    ++__first.__seg_;
  }
  // do middle whole words
  for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
    __r += std::__libcpp_popcount(std::__invert_if<!_ToCount>(*__first.__seg_));
  // do last partial word
  if (__n > 0) {
    __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
    __r += std::__libcpp_popcount(std::__invert_if<!_ToCount>(*__first.__seg_) & __m);
  }
  return __r;
}

template <class, class _Cp, bool _IsConst, class _Tp, class _Proj, __enable_if_t<__is_identity<_Proj>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __iter_diff_t<__bit_iterator<_Cp, _IsConst> >
__count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value, _Proj&) {
  if (__value)
    return std::__count_bool<true>(__first, static_cast<typename _Cp::size_type>(__last - __first));
  return std::__count_bool<false>(__first, static_cast<typename _Cp::size_type>(__last - __first));
}

template <class _InputIterator, class _Tp>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __iter_diff_t<_InputIterator>
count(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
  __identity __proj;
  return std::__count<_ClassicAlgPolicy>(__first, __last, __value, __proj);
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_COUNT_H
# 93 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count.h" 3
#endif /* count.h expanded by -frewrite-includes */
# 1772 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* count_if.h expanded by -frewrite-includes */
#include <__algorithm/count_if.h>
#else /* count_if.h expanded by -frewrite-includes */
# 1772 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count_if.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_COUNT_IF_H
#define _LIBCPP___ALGORITHM_COUNT_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count_if.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count_if.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count_if.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _Predicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    typename iterator_traits<_InputIterator>::difference_type
    count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
  typename iterator_traits<_InputIterator>::difference_type __r(0);
  for (; __first != __last; ++__first)
    if (__pred(*__first))
      ++__r;
  return __r;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_COUNT_IF_H
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/count_if.h" 3
#endif /* count_if.h expanded by -frewrite-includes */
# 1773 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/equal.h>
#endif /* expanded by -frewrite-includes */
# 1773 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1774 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* equal_range.h expanded by -frewrite-includes */
#include <__algorithm/equal_range.h>
#else /* equal_range.h expanded by -frewrite-includes */
# 1774 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_EQUAL_RANGE_H
#define _LIBCPP___ALGORITHM_EQUAL_RANGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/half_positive.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/lower_bound.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* upper_bound.h expanded by -frewrite-includes */
#include <__algorithm/upper_bound.h>
#else /* upper_bound.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_UPPER_BOUND_H
#define _LIBCPP___ALGORITHM_UPPER_BOUND_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/half_positive.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare, class _Iter, class _Sent, class _Tp, class _Proj>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Iter
__upper_bound(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp, _Proj&& __proj) {
  auto __len = _IterOps<_AlgPolicy>::distance(__first, __last);
  while (__len != 0) {
    auto __half_len = std::__half_positive(__len);
    auto __mid      = _IterOps<_AlgPolicy>::next(__first, __half_len);
    if (std::__invoke(__comp, __value, std::__invoke(__proj, *__mid)))
      __len = __half_len;
    else {
      __first = ++__mid;
      __len -= __half_len + 1;
    }
  }
  return __first;
}

template <class _ForwardIterator, class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
  static_assert(is_copy_constructible<_ForwardIterator>::value, "Iterator has to be copy constructible");
  return std::__upper_bound<_ClassicAlgPolicy>(
      std::move(__first), std::move(__last), __value, std::move(__comp), std::__identity());
}

template <class _ForwardIterator, class _Tp>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
  return std::upper_bound(std::move(__first), std::move(__last), __value, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_UPPER_BOUND_H
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/upper_bound.h" 3
#endif /* upper_bound.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_callable.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare, class _Iter, class _Sent, class _Tp, class _Proj>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_Iter, _Iter>
__equal_range(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp, _Proj&& __proj) {
  auto __len  = _IterOps<_AlgPolicy>::distance(__first, __last);
  _Iter __end = _IterOps<_AlgPolicy>::next(__first, __last);
  while (__len != 0) {
    auto __half_len = std::__half_positive(__len);
    _Iter __mid     = _IterOps<_AlgPolicy>::next(__first, __half_len);
    if (std::__invoke(__comp, std::__invoke(__proj, *__mid), __value)) {
      __first = ++__mid;
      __len -= __half_len + 1;
    } else if (std::__invoke(__comp, __value, std::__invoke(__proj, *__mid))) {
      __end = __mid;
      __len = __half_len;
    } else {
      _Iter __mp1 = __mid;
      return pair<_Iter, _Iter>(
          std::__lower_bound<_AlgPolicy>(__first, __mid, __value, __comp, __proj),
          std::__upper_bound<_AlgPolicy>(++__mp1, __end, __value, __comp, __proj));
    }
  }
  return pair<_Iter, _Iter>(__first, __first);
}

template <class _ForwardIterator, class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator, _ForwardIterator>
equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
  static_assert(__is_callable<_Compare, decltype(*__first), const _Tp&>::value,
                "The comparator has to be callable");
  static_assert(is_copy_constructible<_ForwardIterator>::value,
                "Iterator has to be copy constructible");
  return std::__equal_range<_ClassicAlgPolicy>(
      std::move(__first),
      std::move(__last),
      __value,
      static_cast<__comp_ref_type<_Compare> >(__comp),
      std::__identity());
}

template <class _ForwardIterator, class _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator, _ForwardIterator>
equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
  return std::equal_range(std::move(__first), std::move(__last), __value, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_EQUAL_RANGE_H
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/equal_range.h" 3
#endif /* equal_range.h expanded by -frewrite-includes */
# 1775 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* fill.h expanded by -frewrite-includes */
#include <__algorithm/fill.h>
#else /* fill.h expanded by -frewrite-includes */
# 1775 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_FILL_H
#define _LIBCPP___ALGORITHM_FILL_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/fill_n.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// fill isn't specialized for std::memset, because the compiler already optimizes the loop to a call to std::memset.

template <class _ForwardIterator, class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
__fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, forward_iterator_tag)
{
    for (; __first != __last; ++__first)
        *__first = __value;
}

template <class _RandomAccessIterator, class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
__fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __value, random_access_iterator_tag)
{
    _VSTD::fill_n(__first, __last - __first, __value);
}

template <class _ForwardIterator, class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
{
    _VSTD::__fill(__first, __last, __value, typename iterator_traits<_ForwardIterator>::iterator_category());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_FILL_H
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/fill.h" 3
#endif /* fill.h expanded by -frewrite-includes */
# 1776 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/fill_n.h>
#endif /* expanded by -frewrite-includes */
# 1776 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1777 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* find.h expanded by -frewrite-includes */
#include <__algorithm/find.h>
#else /* find.h expanded by -frewrite-includes */
# 1777 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_FIND_H
#define _LIBCPP___ALGORITHM_FIND_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/unwrap_iter.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/countr.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/invert_if.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/bit_reference.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__string/constexpr_c_functions.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
#if 0 /* expanded by -frewrite-includes */
#  include <cwchar>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

// generic implementation
template <class _Iter, class _Sent, class _Tp, class _Proj>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iter
__find_impl(_Iter __first, _Sent __last, const _Tp& __value, _Proj& __proj) {
  for (; __first != __last; ++__first)
    if (std::__invoke(__proj, *__first) == __value)
      break;
  return __first;
}

// trivially equality comparable implementations
template <class _Tp,
          class _Up,
          class _Proj,
          __enable_if_t<__is_identity<_Proj>::value && __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value &&
                            sizeof(_Tp) == 1,
                        int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp*
__find_impl(_Tp* __first, _Tp* __last, const _Up& __value, _Proj&) {
  if (auto __ret = std::__constexpr_memchr(__first, __value, __last - __first))
    return __ret;
  return __last;
}

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <class _Tp,
          class _Up,
          class _Proj,
          __enable_if_t<__is_identity<_Proj>::value && __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value &&
                            sizeof(_Tp) == sizeof(wchar_t) && _LIBCPP_ALIGNOF(_Tp) >= _LIBCPP_ALIGNOF(wchar_t),
                        int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp*
__find_impl(_Tp* __first, _Tp* __last, const _Up& __value, _Proj&) {
  if (auto __ret = std::__constexpr_wmemchr(__first, __value, __last - __first))
    return __ret;
  return __last;
}
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3

// __bit_iterator implementation
template <bool _ToFind, class _Cp, bool _IsConst>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, _IsConst>
__find_bool(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) {
  using _It            = __bit_iterator<_Cp, _IsConst>;
  using __storage_type = typename _It::__storage_type;

  const int __bits_per_word = _It::__bits_per_word;
  // do first partial word
  if (__first.__ctz_ != 0) {
    __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
    __storage_type __dn    = std::min(__clz_f, __n);
    __storage_type __m     = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
    __storage_type __b     = std::__invert_if<!_ToFind>(*__first.__seg_) & __m;
    if (__b)
      return _It(__first.__seg_, static_cast<unsigned>(std::__libcpp_ctz(__b)));
    if (__n == __dn)
      return __first + __n;
    __n -= __dn;
    ++__first.__seg_;
  }
  // do middle whole words
  for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word) {
    __storage_type __b = std::__invert_if<!_ToFind>(*__first.__seg_);
    if (__b)
      return _It(__first.__seg_, static_cast<unsigned>(std::__libcpp_ctz(__b)));
  }
  // do last partial word
  if (__n > 0) {
    __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
    __storage_type __b = std::__invert_if<!_ToFind>(*__first.__seg_) & __m;
    if (__b)
      return _It(__first.__seg_, static_cast<unsigned>(std::__libcpp_ctz(__b)));
  }
  return _It(__first.__seg_, static_cast<unsigned>(__n));
}

template <class _Cp, bool _IsConst, class _Tp, class _Proj, __enable_if_t<__is_identity<_Proj>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, _IsConst>
__find_impl(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value, _Proj&) {
  if (static_cast<bool>(__value))
    return std::__find_bool<true>(__first, static_cast<typename _Cp::size_type>(__last - __first));
  return std::__find_bool<false>(__first, static_cast<typename _Cp::size_type>(__last - __first));
}

template <class _InputIterator, class _Tp>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator
find(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
  __identity __proj;
  return std::__rewrap_iter(
      __first, std::__find_impl(std::__unwrap_iter(__first), std::__unwrap_iter(__last), __value, __proj));
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_FIND_H
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find.h" 3
#endif /* find.h expanded by -frewrite-includes */
# 1778 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/find_end.h>
#endif /* expanded by -frewrite-includes */
# 1778 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1779 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/find_first_of.h>
#endif /* expanded by -frewrite-includes */
# 1779 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1780 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* find_if.h expanded by -frewrite-includes */
#include <__algorithm/find_if.h>
#else /* find_if.h expanded by -frewrite-includes */
# 1780 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_if.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_FIND_IF_H
#define _LIBCPP___ALGORITHM_FIND_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_if.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_if.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _Predicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator
find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
  for (; __first != __last; ++__first)
    if (__pred(*__first))
      break;
  return __first;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_FIND_IF_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_if.h" 3
#endif /* find_if.h expanded by -frewrite-includes */
# 1781 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* find_if_not.h expanded by -frewrite-includes */
#include <__algorithm/find_if_not.h>
#else /* find_if_not.h expanded by -frewrite-includes */
# 1781 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_if_not.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_FIND_IF_NOT_H
#define _LIBCPP___ALGORITHM_FIND_IF_NOT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_if_not.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_if_not.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_if_not.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_if_not.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_if_not.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _Predicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator
find_if_not(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
  for (; __first != __last; ++__first)
    if (!__pred(*__first))
      break;
  return __first;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_FIND_IF_NOT_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/find_if_not.h" 3
#endif /* find_if_not.h expanded by -frewrite-includes */
# 1782 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* for_each.h expanded by -frewrite-includes */
#include <__algorithm/for_each.h>
#else /* for_each.h expanded by -frewrite-includes */
# 1782 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_FOR_EACH_H
#define _LIBCPP___ALGORITHM_FOR_EACH_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _Function>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _Function for_each(_InputIterator __first,
                                                                                  _InputIterator __last,
                                                                                  _Function __f) {
  for (; __first != __last; ++__first)
    __f(*__first);
  return __f;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_FOR_EACH_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each.h" 3
#endif /* for_each.h expanded by -frewrite-includes */
# 1783 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* for_each_n.h expanded by -frewrite-includes */
#include <__algorithm/for_each_n.h>
#else /* for_each_n.h expanded by -frewrite-includes */
# 1783 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_n.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_FOR_EACH_N_H
#define _LIBCPP___ALGORITHM_FOR_EACH_N_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_n.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/convert_to_integral.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_n.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_n.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_n.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_n.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_n.h" 3

template <class _InputIterator, class _Size, class _Function>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator for_each_n(_InputIterator __first,
                                                                                         _Size __orig_n,
                                                                                         _Function __f) {
  typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
  _IntegralSize __n = __orig_n;
  while (__n > 0) {
    __f(*__first);
    ++__first;
    --__n;
  }
  return __first;
}

#endif
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_n.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_FOR_EACH_N_H
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/for_each_n.h" 3
#endif /* for_each_n.h expanded by -frewrite-includes */
# 1784 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* generate.h expanded by -frewrite-includes */
#include <__algorithm/generate.h>
#else /* generate.h expanded by -frewrite-includes */
# 1784 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_GENERATE_H
#define _LIBCPP___ALGORITHM_GENERATE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ForwardIterator, class _Generator>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
generate(_ForwardIterator __first, _ForwardIterator __last, _Generator __gen)
{
    for (; __first != __last; ++__first)
        *__first = __gen();
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_GENERATE_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate.h" 3
#endif /* generate.h expanded by -frewrite-includes */
# 1785 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* generate_n.h expanded by -frewrite-includes */
#include <__algorithm/generate_n.h>
#else /* generate_n.h expanded by -frewrite-includes */
# 1785 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate_n.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_GENERATE_N_H
#define _LIBCPP___ALGORITHM_GENERATE_N_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate_n.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/convert_to_integral.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate_n.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate_n.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate_n.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate_n.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _OutputIterator, class _Size, class _Generator>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
generate_n(_OutputIterator __first, _Size __orig_n, _Generator __gen)
{
    typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
    _IntegralSize __n = __orig_n;
    for (; __n > 0; ++__first, (void) --__n)
        *__first = __gen();
    return __first;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_GENERATE_N_H
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/generate_n.h" 3
#endif /* generate_n.h expanded by -frewrite-includes */
# 1786 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/half_positive.h>
#endif /* expanded by -frewrite-includes */
# 1786 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1787 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* in_found_result.h expanded by -frewrite-includes */
#include <__algorithm/in_found_result.h>
#else /* in_found_result.h expanded by -frewrite-includes */
# 1787 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_found_result.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_IN_FOUND_RESULT_H
#define _LIBCPP___ALGORITHM_IN_FOUND_RESULT_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_found_result.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_found_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_found_result.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_found_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_found_result.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_found_result.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_found_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_found_result.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_found_result.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_found_result.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
template <class _InIter1>
struct in_found_result {
  _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
  bool found;

  template <class _InIter2>
    requires convertible_to<const _InIter1&, _InIter2>
  _LIBCPP_HIDE_FROM_ABI constexpr operator in_found_result<_InIter2>() const & {
    return {in, found};
  }

  template <class _InIter2>
    requires convertible_to<_InIter1, _InIter2>
  _LIBCPP_HIDE_FROM_ABI constexpr operator in_found_result<_InIter2>() && {
    return {std::move(in), found};
  }
};
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_found_result.h" 3

#endif // _LIBCPP___ALGORITHM_IN_FOUND_RESULT_H
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_found_result.h" 3
#endif /* in_found_result.h expanded by -frewrite-includes */
# 1788 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* in_fun_result.h expanded by -frewrite-includes */
#include <__algorithm/in_fun_result.h>
#else /* in_fun_result.h expanded by -frewrite-includes */
# 1788 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_fun_result.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_IN_FUN_RESULT_H
#define _LIBCPP___ALGORITHM_IN_FUN_RESULT_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_fun_result.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_fun_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_fun_result.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_fun_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_fun_result.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_fun_result.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_fun_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_fun_result.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_fun_result.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_fun_result.h" 3

namespace ranges {
template <class _InIter1, class _Func1>
struct in_fun_result {
  _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
  _LIBCPP_NO_UNIQUE_ADDRESS _Func1 fun;

  template <class _InIter2, class _Func2>
    requires convertible_to<const _InIter1&, _InIter2> && convertible_to<const _Func1&, _Func2>
  _LIBCPP_HIDE_FROM_ABI constexpr operator in_fun_result<_InIter2, _Func2>() const & {
    return {in, fun};
  }

  template <class _InIter2, class _Func2>
    requires convertible_to<_InIter1, _InIter2> && convertible_to<_Func1, _Func2>
  _LIBCPP_HIDE_FROM_ABI constexpr operator in_fun_result<_InIter2, _Func2>() && {
    return {std::move(in), std::move(fun)};
  }
};
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_fun_result.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_IN_FUN_RESULT_H
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_fun_result.h" 3
#endif /* in_fun_result.h expanded by -frewrite-includes */
# 1789 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* in_in_out_result.h expanded by -frewrite-includes */
#include <__algorithm/in_in_out_result.h>
#else /* in_in_out_result.h expanded by -frewrite-includes */
# 1789 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_out_result.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_IN_IN_OUT_RESULT_H
#define _LIBCPP___ALGORITHM_IN_IN_OUT_RESULT_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_out_result.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_out_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_out_result.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_out_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_out_result.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_out_result.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_out_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_out_result.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_out_result.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_out_result.h" 3

namespace ranges {

template <class _InIter1, class _InIter2, class _OutIter1>
struct in_in_out_result {
  _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in1;
  _LIBCPP_NO_UNIQUE_ADDRESS _InIter2 in2;
  _LIBCPP_NO_UNIQUE_ADDRESS _OutIter1 out;

  template <class _InIter3, class _InIter4, class _OutIter2>
    requires convertible_to<const _InIter1&, _InIter3>
          && convertible_to<const _InIter2&, _InIter4> && convertible_to<const _OutIter1&, _OutIter2>
  _LIBCPP_HIDE_FROM_ABI constexpr
  operator in_in_out_result<_InIter3, _InIter4, _OutIter2>() const& {
    return {in1, in2, out};
  }

  template <class _InIter3, class _InIter4, class _OutIter2>
    requires convertible_to<_InIter1, _InIter3>
          && convertible_to<_InIter2, _InIter4> && convertible_to<_OutIter1, _OutIter2>
  _LIBCPP_HIDE_FROM_ABI constexpr
  operator in_in_out_result<_InIter3, _InIter4, _OutIter2>() && {
    return {std::move(in1), std::move(in2), std::move(out)};
  }
};

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_out_result.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_IN_IN_OUT_RESULT_H
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_out_result.h" 3
#endif /* in_in_out_result.h expanded by -frewrite-includes */
# 1790 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* in_in_result.h expanded by -frewrite-includes */
#include <__algorithm/in_in_result.h>
#else /* in_in_result.h expanded by -frewrite-includes */
# 1790 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_result.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_IN_IN_RESULT_H
#define _LIBCPP___ALGORITHM_IN_IN_RESULT_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_result.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_result.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_result.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_result.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_result.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_result.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_result.h" 3

namespace ranges {

template <class _InIter1, class _InIter2>
struct in_in_result {
  _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in1;
  _LIBCPP_NO_UNIQUE_ADDRESS _InIter2 in2;

  template <class _InIter3, class _InIter4>
    requires convertible_to<const _InIter1&, _InIter3> && convertible_to<const _InIter2&, _InIter4>
   _LIBCPP_HIDE_FROM_ABI constexpr
   operator in_in_result<_InIter3, _InIter4>() const & {
    return {in1, in2};
  }

  template <class _InIter3, class _InIter4>
    requires convertible_to<_InIter1, _InIter3> && convertible_to<_InIter2, _InIter4>
  _LIBCPP_HIDE_FROM_ABI constexpr
  operator in_in_result<_InIter3, _InIter4>() && {
    return {std::move(in1), std::move(in2)};
  }
};

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_result.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_IN_IN_RESULT_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_in_result.h" 3
#endif /* in_in_result.h expanded by -frewrite-includes */
# 1791 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* in_out_out_result.h expanded by -frewrite-includes */
#include <__algorithm/in_out_out_result.h>
#else /* in_out_out_result.h expanded by -frewrite-includes */
# 1791 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_out_result.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_IN_OUT_OUT_RESULT_H
#define _LIBCPP___ALGORITHM_IN_OUT_OUT_RESULT_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_out_result.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_out_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_out_result.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_out_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_out_result.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_out_result.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_out_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_out_result.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_out_result.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_out_result.h" 3

namespace ranges {
template <class _InIter1, class _OutIter1, class _OutIter2>
struct in_out_out_result {
  _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
  _LIBCPP_NO_UNIQUE_ADDRESS _OutIter1 out1;
  _LIBCPP_NO_UNIQUE_ADDRESS _OutIter2 out2;

  template <class _InIter2, class _OutIter3, class _OutIter4>
    requires convertible_to<const _InIter1&, _InIter2>
          && convertible_to<const _OutIter1&, _OutIter3> && convertible_to<const _OutIter2&, _OutIter4>
  _LIBCPP_HIDE_FROM_ABI constexpr
  operator in_out_out_result<_InIter2, _OutIter3, _OutIter4>() const& {
    return {in, out1, out2};
  }

  template <class _InIter2, class _OutIter3, class _OutIter4>
    requires convertible_to<_InIter1, _InIter2>
          && convertible_to<_OutIter1, _OutIter3> && convertible_to<_OutIter2, _OutIter4>
  _LIBCPP_HIDE_FROM_ABI constexpr
  operator in_out_out_result<_InIter2, _OutIter3, _OutIter4>() && {
    return {std::move(in), std::move(out1), std::move(out2)};
  }
};
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_out_result.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_IN_OUT_OUT_RESULT_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/in_out_out_result.h" 3
#endif /* in_out_out_result.h expanded by -frewrite-includes */
# 1792 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 1792 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1793 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* includes.h expanded by -frewrite-includes */
#include <__algorithm/includes.h>
#else /* includes.h expanded by -frewrite-includes */
# 1793 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_INCLUDES_H
#define _LIBCPP___ALGORITHM_INCLUDES_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_callable.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Comp, class _Proj1, class _Proj2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__includes(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
           _Comp&& __comp, _Proj1&& __proj1, _Proj2&& __proj2) {
  for (; __first2 != __last2; ++__first1) {
    if (__first1 == __last1 || std::__invoke(
          __comp, std::__invoke(__proj2, *__first2), std::__invoke(__proj1, *__first1)))
      return false;
    if (!std::__invoke(__comp, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2)))
      ++__first2;
  }
  return true;
}

template <class _InputIterator1, class _InputIterator2, class _Compare>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool includes(
    _InputIterator1 __first1,
    _InputIterator1 __last1,
    _InputIterator2 __first2,
    _InputIterator2 __last2,
    _Compare __comp) {
  static_assert(__is_callable<_Compare, decltype(*__first1), decltype(*__first2)>::value,
      "Comparator has to be callable");

  return std::__includes(
      std::move(__first1),
      std::move(__last1),
      std::move(__first2),
      std::move(__last2),
      static_cast<__comp_ref_type<_Compare> >(__comp),
      __identity(),
      __identity());
}

template <class _InputIterator1, class _InputIterator2>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
  return std::includes(std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2), __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_INCLUDES_H
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/includes.h" 3
#endif /* includes.h expanded by -frewrite-includes */
# 1794 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* inplace_merge.h expanded by -frewrite-includes */
#include <__algorithm/inplace_merge.h>
#else /* inplace_merge.h expanded by -frewrite-includes */
# 1794 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_INPLACE_MERGE_H
#define _LIBCPP___ALGORITHM_INPLACE_MERGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/lower_bound.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/move.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* rotate.h expanded by -frewrite-includes */
#include <__algorithm/rotate.h>
#else /* rotate.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_ROTATE_H
#define _LIBCPP___ALGORITHM_ROTATE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/move.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* move_backward.h expanded by -frewrite-includes */
#include <__algorithm/move_backward.h>
#else /* move_backward.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_MOVE_BACKWARD_H
#define _LIBCPP___ALGORITHM_MOVE_BACKWARD_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy_move_common.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/segmented_iterator.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _BidirectionalIterator1, class _Sentinel, class _BidirectionalIterator2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator1, _BidirectionalIterator2>
__move_backward(_BidirectionalIterator1 __first, _Sentinel __last, _BidirectionalIterator2 __result);

template <class _AlgPolicy>
struct __move_backward_loop {
  template <class _InIter, class _Sent, class _OutIter>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
  operator()(_InIter __first, _Sent __last, _OutIter __result) const {
    auto __last_iter          = _IterOps<_AlgPolicy>::next(__first, __last);
    auto __original_last_iter = __last_iter;

    while (__first != __last_iter) {
      *--__result = _IterOps<_AlgPolicy>::__iter_move(--__last_iter);
    }

    return std::make_pair(std::move(__original_last_iter), std::move(__result));
  }

  template <class _InIter, class _OutIter, __enable_if_t<__is_segmented_iterator<_InIter>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
  operator()(_InIter __first, _InIter __last, _OutIter __result) const {
    using _Traits = __segmented_iterator_traits<_InIter>;
    auto __sfirst = _Traits::__segment(__first);
    auto __slast  = _Traits::__segment(__last);
    if (__sfirst == __slast) {
      auto __iters =
          std::__move_backward<_AlgPolicy>(_Traits::__local(__first), _Traits::__local(__last), std::move(__result));
      return std::make_pair(__last, __iters.second);
    }

    __result =
        std::__move_backward<_AlgPolicy>(_Traits::__begin(__slast), _Traits::__local(__last), std::move(__result))
            .second;
    --__slast;
    while (__sfirst != __slast) {
      __result =
          std::__move_backward<_AlgPolicy>(_Traits::__begin(__slast), _Traits::__end(__slast), std::move(__result))
              .second;
      --__slast;
    }
    __result = std::__move_backward<_AlgPolicy>(_Traits::__local(__first), _Traits::__end(__slast), std::move(__result))
                   .second;
    return std::make_pair(__last, std::move(__result));
  }

  template <class _InIter,
            class _OutIter,
            __enable_if_t<__has_random_access_iterator_category<_InIter>::value &&
                              !__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
                          int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
  operator()(_InIter __first, _InIter __last, _OutIter __result) const {
    using _Traits = __segmented_iterator_traits<_OutIter>;
    using _DiffT  = typename common_type<__iter_diff_t<_InIter>, __iter_diff_t<_OutIter> >::type;

    // When the range contains no elements, __result might not be a valid iterator
    if (__first == __last)
      return std::make_pair(__first, __result);

    auto __orig_last = __last;

    auto __local_last       = _Traits::__local(__result);
    auto __segment_iterator = _Traits::__segment(__result);
    while (true) {
      auto __local_first = _Traits::__begin(__segment_iterator);
      auto __size        = std::min<_DiffT>(__local_last - __local_first, __last - __first);
      auto __iter        = std::__move_backward<_AlgPolicy>(__last - __size, __last, __local_last).second;
      __last -= __size;

      if (__first == __last)
        return std::make_pair(std::move(__orig_last), _Traits::__compose(__segment_iterator, std::move(__iter)));

      __local_last = _Traits::__end(--__segment_iterator);
    }
  }
};

struct __move_backward_trivial {
  // At this point, the iterators have been unwrapped so any `contiguous_iterator` has been unwrapped to a pointer.
  template <class _In, class _Out,
            __enable_if_t<__can_lower_move_assignment_to_memmove<_In, _Out>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_In*, _Out*>
  operator()(_In* __first, _In* __last, _Out* __result) const {
    return std::__copy_backward_trivial_impl(__first, __last, __result);
  }
};

template <class _AlgPolicy, class _BidirectionalIterator1, class _Sentinel, class _BidirectionalIterator2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator1, _BidirectionalIterator2>
__move_backward(_BidirectionalIterator1 __first, _Sentinel __last, _BidirectionalIterator2 __result) {
  static_assert(std::is_copy_constructible<_BidirectionalIterator1>::value &&
                std::is_copy_constructible<_BidirectionalIterator1>::value, "Iterators must be copy constructible.");

  return std::__dispatch_copy_or_move<_AlgPolicy, __move_backward_loop<_AlgPolicy>, __move_backward_trivial>(
      std::move(__first), std::move(__last), std::move(__result));
}

template <class _BidirectionalIterator1, class _BidirectionalIterator2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _BidirectionalIterator2
move_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last, _BidirectionalIterator2 __result) {
  return std::__move_backward<_ClassicAlgPolicy>(std::move(__first), std::move(__last), std::move(__result)).second;
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_MOVE_BACKWARD_H
# 140 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/move_backward.h" 3
#endif /* move_backward.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/swap_ranges.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
__rotate_left(_ForwardIterator __first, _ForwardIterator __last)
{
    typedef typename iterator_traits<_ForwardIterator>::value_type value_type;
    using _Ops = _IterOps<_AlgPolicy>;

    value_type __tmp = _Ops::__iter_move(__first);
    _ForwardIterator __lm1 = std::__move<_AlgPolicy>(
        _Ops::next(__first), __last, __first).second;
    *__lm1 = _VSTD::move(__tmp);
    return __lm1;
}

template <class _AlgPolicy, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _BidirectionalIterator
__rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last)
{
    typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
    using _Ops = _IterOps<_AlgPolicy>;

    _BidirectionalIterator __lm1 = _Ops::prev(__last);
    value_type __tmp = _Ops::__iter_move(__lm1);
    _BidirectionalIterator __fp1 = std::__move_backward<_AlgPolicy>(__first, __lm1, std::move(__last)).second;
    *__first = _VSTD::move(__tmp);
    return __fp1;
}

template <class _AlgPolicy, class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _ForwardIterator
__rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last)
{
    _ForwardIterator __i = __middle;
    while (true)
    {
        _IterOps<_AlgPolicy>::iter_swap(__first, __i);
        ++__first;
        if (++__i == __last)
            break;
        if (__first == __middle)
            __middle = __i;
    }
    _ForwardIterator __r = __first;
    if (__first != __middle)
    {
        __i = __middle;
        while (true)
        {
            _IterOps<_AlgPolicy>::iter_swap(__first, __i);
            ++__first;
            if (++__i == __last)
            {
                if (__first == __middle)
                    break;
                __i = __middle;
            }
            else if (__first == __middle)
                __middle = __i;
        }
    }
    return __r;
}

template<typename _Integral>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR_SINCE_CXX17 _Integral
__algo_gcd(_Integral __x, _Integral __y)
{
    do
    {
        _Integral __t = __x % __y;
        __x = __y;
        __y = __t;
    } while (__y);
    return __x;
}

template <class _AlgPolicy, typename _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _RandomAccessIterator
__rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last)
{
    typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
    typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type;
    using _Ops = _IterOps<_AlgPolicy>;

    const difference_type __m1 = __middle - __first;
    const difference_type __m2 = _Ops::distance(__middle, __last);
    if (__m1 == __m2)
    {
        std::__swap_ranges<_AlgPolicy>(__first, __middle, __middle, __last);
        return __middle;
    }
    const difference_type __g = _VSTD::__algo_gcd(__m1, __m2);
    for (_RandomAccessIterator __p = __first + __g; __p != __first;)
    {
        value_type __t(_Ops::__iter_move(--__p));
        _RandomAccessIterator __p1 = __p;
        _RandomAccessIterator __p2 = __p1 + __m1;
        do
        {
            *__p1 = _Ops::__iter_move(__p2);
            __p1 = __p2;
            const difference_type __d = _Ops::distance(__p2, __last);
            if (__m1 < __d)
                __p2 += __m1;
            else
                __p2 = __first + (__m1 - __d);
        } while (__p2 != __p);
        *__p1 = _VSTD::move(__t);
    }
    return __first + __m2;
}

template <class _AlgPolicy, class _ForwardIterator>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
__rotate_impl(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last,
         _VSTD::forward_iterator_tag)
{
    typedef typename iterator_traits<_ForwardIterator>::value_type value_type;
    if (is_trivially_move_assignable<value_type>::value)
    {
        if (_IterOps<_AlgPolicy>::next(__first) == __middle)
            return std::__rotate_left<_AlgPolicy>(__first, __last);
    }
    return std::__rotate_forward<_AlgPolicy>(__first, __middle, __last);
}

template <class _AlgPolicy, class _BidirectionalIterator>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR_SINCE_CXX14 _BidirectionalIterator
__rotate_impl(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last,
         bidirectional_iterator_tag)
{
    typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
    if (is_trivially_move_assignable<value_type>::value)
    {
        if (_IterOps<_AlgPolicy>::next(__first) == __middle)
            return std::__rotate_left<_AlgPolicy>(__first, __last);
        if (_IterOps<_AlgPolicy>::next(__middle) == __last)
            return std::__rotate_right<_AlgPolicy>(__first, __last);
    }
    return std::__rotate_forward<_AlgPolicy>(__first, __middle, __last);
}

template <class _AlgPolicy, class _RandomAccessIterator>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR_SINCE_CXX14 _RandomAccessIterator
__rotate_impl(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last,
         random_access_iterator_tag)
{
    typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type;
    if (is_trivially_move_assignable<value_type>::value)
    {
        if (_IterOps<_AlgPolicy>::next(__first) == __middle)
            return std::__rotate_left<_AlgPolicy>(__first, __last);
        if (_IterOps<_AlgPolicy>::next(__middle) == __last)
            return std::__rotate_right<_AlgPolicy>(__first, __last);
        return std::__rotate_gcd<_AlgPolicy>(__first, __middle, __last);
    }
    return std::__rotate_forward<_AlgPolicy>(__first, __middle, __last);
}

template <class _AlgPolicy, class _Iterator, class _Sentinel>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iterator, _Iterator>
__rotate(_Iterator __first, _Iterator __middle, _Sentinel __last) {
  using _Ret = pair<_Iterator, _Iterator>;
  _Iterator __last_iter = _IterOps<_AlgPolicy>::next(__middle, __last);

  if (__first == __middle)
      return _Ret(__last_iter, __last_iter);
  if (__middle == __last)
      return _Ret(std::move(__first), std::move(__last_iter));

  using _IterCategory = typename _IterOps<_AlgPolicy>::template __iterator_category<_Iterator>;
  auto __result = std::__rotate_impl<_AlgPolicy>(
      std::move(__first), std::move(__middle), __last_iter, _IterCategory());

  return _Ret(std::move(__result), std::move(__last_iter));
}

template <class _ForwardIterator>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last)
{
  return std::__rotate<_ClassicAlgPolicy>(
      std::move(__first), std::move(__middle), std::move(__last)).first;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_ROTATE_H
# 222 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate.h" 3
#endif /* rotate.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/upper_bound.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* destruct_n.h expanded by -frewrite-includes */
#include <__memory/destruct_n.h>
#else /* destruct_n.h expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/destruct_n.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_DESTRUCT_N_H
#define _LIBCPP___MEMORY_DESTRUCT_N_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/destruct_n.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/destruct_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/destruct_n.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/destruct_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_destructible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/destruct_n.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/destruct_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/destruct_n.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/destruct_n.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/destruct_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/destruct_n.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/destruct_n.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

struct __destruct_n
{
private:
    size_t __size_;

    template <class _Tp>
    _LIBCPP_INLINE_VISIBILITY void __process(_Tp* __p, false_type) _NOEXCEPT
        {for (size_t __i = 0; __i < __size_; ++__i, ++__p) __p->~_Tp();}

    template <class _Tp>
    _LIBCPP_INLINE_VISIBILITY void __process(_Tp*, true_type) _NOEXCEPT
        {}

    _LIBCPP_INLINE_VISIBILITY void __incr(false_type) _NOEXCEPT
        {++__size_;}
    _LIBCPP_INLINE_VISIBILITY void __incr(true_type) _NOEXCEPT
        {}

    _LIBCPP_INLINE_VISIBILITY void __set(size_t __s, false_type) _NOEXCEPT
        {__size_ = __s;}
    _LIBCPP_INLINE_VISIBILITY void __set(size_t, true_type) _NOEXCEPT
        {}
public:
    _LIBCPP_INLINE_VISIBILITY explicit __destruct_n(size_t __s) _NOEXCEPT
        : __size_(__s) {}

    template <class _Tp>
    _LIBCPP_INLINE_VISIBILITY void __incr() _NOEXCEPT
        {__incr(integral_constant<bool, is_trivially_destructible<_Tp>::value>());}

    template <class _Tp>
    _LIBCPP_INLINE_VISIBILITY void __set(size_t __s, _Tp*) _NOEXCEPT
        {__set(__s, integral_constant<bool, is_trivially_destructible<_Tp>::value>());}

    template <class _Tp>
    _LIBCPP_INLINE_VISIBILITY void operator()(_Tp* __p) _NOEXCEPT
        {__process(__p, integral_constant<bool, is_trivially_destructible<_Tp>::value>());}
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_DESTRUCT_N_H
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/destruct_n.h" 3
#endif /* destruct_n.h expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/temporary_buffer.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/unique_ptr.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#endif
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Predicate>
class __invert // invert the sense of a comparison
{
private:
    _Predicate __p_;
public:
    _LIBCPP_INLINE_VISIBILITY __invert() {}

    _LIBCPP_INLINE_VISIBILITY
    explicit __invert(_Predicate __p) : __p_(__p) {}

    template <class _T1>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _T1& __x) {return !__p_(__x);}

    template <class _T1, class _T2>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _T1& __x, const _T2& __y) {return __p_(__y, __x);}
};

template <class _AlgPolicy, class _Compare, class _InputIterator1, class _Sent1,
          class _InputIterator2, class _Sent2, class _OutputIterator>
_LIBCPP_HIDE_FROM_ABI
void __half_inplace_merge(_InputIterator1 __first1, _Sent1 __last1,
                          _InputIterator2 __first2, _Sent2 __last2,
                          _OutputIterator __result, _Compare&& __comp)
{
    for (; __first1 != __last1; ++__result)
    {
        if (__first2 == __last2)
        {
            std::__move<_AlgPolicy>(__first1, __last1, __result);
            return;
        }

        if (__comp(*__first2, *__first1))
        {
            *__result = _IterOps<_AlgPolicy>::__iter_move(__first2);
            ++__first2;
        }
        else
        {
            *__result = _IterOps<_AlgPolicy>::__iter_move(__first1);
            ++__first1;
        }
    }
    // __first2 through __last2 are already in the right spot.
}

template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI
void __buffered_inplace_merge(
    _BidirectionalIterator __first,
    _BidirectionalIterator __middle,
    _BidirectionalIterator __last,
    _Compare&& __comp,
    typename iterator_traits<_BidirectionalIterator>::difference_type __len1,
    typename iterator_traits<_BidirectionalIterator>::difference_type __len2,
    typename iterator_traits<_BidirectionalIterator>::value_type* __buff) {
  typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
    __destruct_n __d(0);
    unique_ptr<value_type, __destruct_n&> __h2(__buff, __d);
    if (__len1 <= __len2)
    {
        value_type* __p = __buff;
        for (_BidirectionalIterator __i = __first; __i != __middle; __d.template __incr<value_type>(), (void) ++__i, (void) ++__p)
            ::new ((void*)__p) value_type(_IterOps<_AlgPolicy>::__iter_move(__i));
        std::__half_inplace_merge<_AlgPolicy>(__buff, __p, __middle, __last, __first, __comp);
    }
    else
    {
        value_type* __p = __buff;
        for (_BidirectionalIterator __i = __middle; __i != __last; __d.template __incr<value_type>(), (void) ++__i, (void) ++__p)
            ::new ((void*)__p) value_type(_IterOps<_AlgPolicy>::__iter_move(__i));
        typedef __unconstrained_reverse_iterator<_BidirectionalIterator> _RBi;
        typedef __unconstrained_reverse_iterator<value_type*> _Rv;
        typedef __invert<_Compare> _Inverted;
        std::__half_inplace_merge<_AlgPolicy>(_Rv(__p), _Rv(__buff),
                                    _RBi(__middle), _RBi(__first),
                                    _RBi(__last), _Inverted(__comp));
    }
}

template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
void __inplace_merge(
    _BidirectionalIterator __first,
    _BidirectionalIterator __middle,
    _BidirectionalIterator __last,
    _Compare&& __comp,
    typename iterator_traits<_BidirectionalIterator>::difference_type __len1,
    typename iterator_traits<_BidirectionalIterator>::difference_type __len2,
    typename iterator_traits<_BidirectionalIterator>::value_type* __buff,
    ptrdiff_t __buff_size) {
    using _Ops = _IterOps<_AlgPolicy>;

    typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type;
    while (true)
    {
        // if __middle == __last, we're done
        if (__len2 == 0)
            return;
        if (__len1 <= __buff_size || __len2 <= __buff_size)
            return std::__buffered_inplace_merge<_AlgPolicy>
                   (__first, __middle, __last, __comp, __len1, __len2, __buff);
        // shrink [__first, __middle) as much as possible (with no moves), returning if it shrinks to 0
        for (; true; ++__first, (void) --__len1)
        {
            if (__len1 == 0)
                return;
            if (__comp(*__middle, *__first))
                break;
        }
        // __first < __middle < __last
        // *__first > *__middle
        // partition [__first, __m1) [__m1, __middle) [__middle, __m2) [__m2, __last) such that
        //     all elements in:
        //         [__first, __m1)  <= [__middle, __m2)
        //         [__middle, __m2) <  [__m1, __middle)
        //         [__m1, __middle) <= [__m2, __last)
        //     and __m1 or __m2 is in the middle of its range
        _BidirectionalIterator __m1;  // "median" of [__first, __middle)
        _BidirectionalIterator __m2;  // "median" of [__middle, __last)
        difference_type __len11;      // distance(__first, __m1)
        difference_type __len21;      // distance(__middle, __m2)
        // binary search smaller range
        if (__len1 < __len2)
        {   // __len >= 1, __len2 >= 2
            __len21 = __len2 / 2;
            __m2 = __middle;
            _Ops::advance(__m2, __len21);
            __m1 = std::__upper_bound<_AlgPolicy>(__first, __middle, *__m2, __comp, std::__identity());
            __len11 = _Ops::distance(__first, __m1);
        }
        else
        {
            if (__len1 == 1)
            {   // __len1 >= __len2 && __len2 > 0, therefore __len2 == 1
                // It is known *__first > *__middle
              _Ops::iter_swap(__first, __middle);
                return;
            }
            // __len1 >= 2, __len2 >= 1
            __len11 = __len1 / 2;
            __m1 = __first;
            _Ops::advance(__m1, __len11);
            __m2 = std::lower_bound(__middle, __last, *__m1, __comp);
            __len21 = _Ops::distance(__middle, __m2);
        }
        difference_type __len12 = __len1 - __len11;  // distance(__m1, __middle)
        difference_type __len22 = __len2 - __len21;  // distance(__m2, __last)
        // [__first, __m1) [__m1, __middle) [__middle, __m2) [__m2, __last)
        // swap middle two partitions
        __middle = std::__rotate<_AlgPolicy>(__m1, __middle, __m2).first;
        // __len12 and __len21 now have swapped meanings
        // merge smaller range with recursive call and larger with tail recursion elimination
        if (__len11 + __len21 < __len12 + __len22)
        {
            std::__inplace_merge<_AlgPolicy>(
                __first, __m1, __middle, __comp, __len11, __len21, __buff, __buff_size);
            __first = __middle;
            __middle = __m2;
            __len1 = __len12;
            __len2 = __len22;
        }
        else
        {
            std::__inplace_merge<_AlgPolicy>(
                __middle, __m2, __last, __comp, __len12, __len22, __buff, __buff_size);
            __last = __middle;
            __middle = __m1;
            __len1 = __len11;
            __len2 = __len21;
        }
    }
}

template <class _AlgPolicy, class _BidirectionalIterator, class _Compare>
_LIBCPP_HIDE_FROM_ABI
void
__inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last,
              _Compare&& __comp)
{
    typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
    typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type;
    difference_type __len1 = _IterOps<_AlgPolicy>::distance(__first, __middle);
    difference_type __len2 = _IterOps<_AlgPolicy>::distance(__middle, __last);
    difference_type __buf_size = _VSTD::min(__len1, __len2);
// TODO: Remove the use of std::get_temporary_buffer
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
    pair<value_type*, ptrdiff_t> __buf = _VSTD::get_temporary_buffer<value_type>(__buf_size);
_LIBCPP_SUPPRESS_DEPRECATED_POP
    unique_ptr<value_type, __return_temporary_buffer> __h(__buf.first);
    return std::__inplace_merge<_AlgPolicy>(
        std::move(__first), std::move(__middle), std::move(__last), __comp, __len1, __len2, __buf.first, __buf.second);
}

template <class _BidirectionalIterator, class _Compare>
inline _LIBCPP_HIDE_FROM_ABI void inplace_merge(
    _BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Compare __comp) {
  std::__inplace_merge<_ClassicAlgPolicy>(
      std::move(__first), std::move(__middle), std::move(__last), static_cast<__comp_ref_type<_Compare> >(__comp));
}

template <class _BidirectionalIterator>
inline _LIBCPP_HIDE_FROM_ABI
void
inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last)
{
    std::inplace_merge(std::move(__first), std::move(__middle), std::move(__last), __less<>());
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_INPLACE_MERGE_H
# 257 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/inplace_merge.h" 3
#endif /* inplace_merge.h expanded by -frewrite-includes */
# 1795 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_heap.h expanded by -frewrite-includes */
#include <__algorithm/is_heap.h>
#else /* is_heap.h expanded by -frewrite-includes */
# 1795 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_IS_HEAP_H
#define _LIBCPP___ALGORITHM_IS_HEAP_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_heap_until.h expanded by -frewrite-includes */
#include <__algorithm/is_heap_until.h>
#else /* is_heap_until.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap_until.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_IS_HEAP_UNTIL_H
#define _LIBCPP___ALGORITHM_IS_HEAP_UNTIL_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap_until.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap_until.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap_until.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap_until.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap_until.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap_until.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap_until.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Compare, class _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
__is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp)
{
    typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
    difference_type __len = __last - __first;
    difference_type __p = 0;
    difference_type __c = 1;
    _RandomAccessIterator __pp = __first;
    while (__c < __len)
    {
        _RandomAccessIterator __cp = __first + __c;
        if (__comp(*__pp, *__cp))
            return __cp;
        ++__c;
        ++__cp;
        if (__c == __len)
            return __last;
        if (__comp(*__pp, *__cp))
            return __cp;
        ++__p;
        ++__pp;
        __c = 2 * __p + 1;
    }
    return __last;
}

template <class _RandomAccessIterator, class _Compare>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
{
    return std::__is_heap_until(__first, __last, static_cast<__comp_ref_type<_Compare> >(__comp));
}

template<class _RandomAccessIterator>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
    return _VSTD::__is_heap_until(__first, __last, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_IS_HEAP_UNTIL_H
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap_until.h" 3
#endif /* is_heap_until.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _RandomAccessIterator, class _Compare>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
{
    return std::__is_heap_until(__first, __last, static_cast<__comp_ref_type<_Compare> >(__comp)) == __last;
}

template<class _RandomAccessIterator>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
    return _VSTD::is_heap(__first, __last, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_IS_HEAP_H
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_heap.h" 3
#endif /* is_heap.h expanded by -frewrite-includes */
# 1796 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/is_heap_until.h>
#endif /* expanded by -frewrite-includes */
# 1796 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1797 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_partitioned.h expanded by -frewrite-includes */
#include <__algorithm/is_partitioned.h>
#else /* is_partitioned.h expanded by -frewrite-includes */
# 1797 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_partitioned.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_IS_PARTITIONED_H
#define _LIBCPP___ALGORITHM_IS_PARTITIONED_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_partitioned.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_partitioned.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_partitioned.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_partitioned.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _Predicate>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
is_partitioned(_InputIterator __first, _InputIterator __last, _Predicate __pred)
{
    for (; __first != __last; ++__first)
        if (!__pred(*__first))
            break;
    if ( __first == __last )
        return true;
    ++__first;
    for (; __first != __last; ++__first)
        if (__pred(*__first))
            return false;
    return true;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_IS_PARTITIONED_H
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_partitioned.h" 3
#endif /* is_partitioned.h expanded by -frewrite-includes */
# 1798 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_permutation.h expanded by -frewrite-includes */
#include <__algorithm/is_permutation.h>
#else /* is_permutation.h expanded by -frewrite-includes */
# 1798 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_IS_PERMUTATION_H
#define _LIBCPP___ALGORITHM_IS_PERMUTATION_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_callable.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class = void>
struct _ConstTimeDistance : false_type {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3

template <class _Iter1, class _Sent1, class _Iter2, class _Sent2>
struct _ConstTimeDistance<_Iter1, _Sent1, _Iter2, _Sent2, __enable_if_t<
  sized_sentinel_for<_Sent1, _Iter1> &&
  sized_sentinel_for<_Sent2, _Iter2>
>> : true_type {};

#else
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3

template <class _Iter1, class _Iter2>
struct _ConstTimeDistance<_Iter1, _Iter1, _Iter2, _Iter2, __enable_if_t<
    is_same<typename iterator_traits<_Iter1>::iterator_category, random_access_iterator_tag>::value &&
    is_same<typename iterator_traits<_Iter2>::iterator_category, random_access_iterator_tag>::value
> > : true_type {};

#endif // _LIBCPP_STD_VER >= 20
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3

// Internal functions

// For each element in [f1, l1) see if there are the same number of equal elements in [f2, l2)
template <class _AlgPolicy,
          class _Iter1, class _Sent1, class _Iter2, class _Sent2,
          class _Proj1, class _Proj2, class _Pred>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__is_permutation_impl(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
                      _Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2) {
  using _D1 = __iter_diff_t<_Iter1>;

  for (auto __i = __first1; __i != __last1; ++__i) {
    //  Have we already counted the number of *__i in [f1, l1)?
    auto __match = __first1;
    for (; __match != __i; ++__match) {
      if (std::__invoke(__pred, std::__invoke(__proj1, *__match), std::__invoke(__proj1, *__i)))
        break;
    }

    if (__match == __i) {
      // Count number of *__i in [f2, l2)
      _D1 __c2 = 0;
      for (auto __j = __first2; __j != __last2; ++__j) {
        if (std::__invoke(__pred, std::__invoke(__proj1, *__i), std::__invoke(__proj2, *__j)))
          ++__c2;
      }
      if (__c2 == 0)
        return false;

      // Count number of *__i in [__i, l1) (we can start with 1)
      _D1 __c1 = 1;
      for (auto __j = _IterOps<_AlgPolicy>::next(__i); __j != __last1; ++__j) {
        if (std::__invoke(__pred, std::__invoke(__proj1, *__i), std::__invoke(__proj1, *__j)))
          ++__c1;
      }
      if (__c1 != __c2)
        return false;
    }
  }

  return true;
}

// 2+1 iterators, predicate. Not used by range algorithms.
template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__is_permutation(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2,
                 _BinaryPredicate&& __pred) {
  // Shorten sequences as much as possible by lopping of any equal prefix.
  for (; __first1 != __last1; ++__first1, (void)++__first2) {
    if (!__pred(*__first1, *__first2))
      break;
  }

  if (__first1 == __last1)
    return true;

  //  __first1 != __last1 && *__first1 != *__first2
  using _D1 = __iter_diff_t<_ForwardIterator1>;
  _D1 __l1 = _IterOps<_AlgPolicy>::distance(__first1, __last1);
  if (__l1 == _D1(1))
    return false;
  auto __last2 = _IterOps<_AlgPolicy>::next(__first2, __l1);

  return std::__is_permutation_impl<_AlgPolicy>(
      std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2),
      __pred, __identity(), __identity());
}

// 2+2 iterators, predicate, non-constant time `distance`.
template <class _AlgPolicy,
          class _Iter1, class _Sent1, class _Iter2, class _Sent2,
          class _Proj1, class _Proj2, class _Pred>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
                 _Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2,
                 /*_ConstTimeDistance=*/false_type) {
  // Shorten sequences as much as possible by lopping of any equal prefix.
  while (__first1 != __last1 && __first2 != __last2) {
    if (!std::__invoke(__pred, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2)))
      break;
    ++__first1;
    ++__first2;
  }

  if (__first1 == __last1)
    return __first2 == __last2;
  if (__first2 == __last2) // Second range is shorter
    return false;

  using _D1 = __iter_diff_t<_Iter1>;
  _D1 __l1 = _IterOps<_AlgPolicy>::distance(__first1, __last1);

  using _D2 = __iter_diff_t<_Iter2>;
  _D2 __l2 = _IterOps<_AlgPolicy>::distance(__first2, __last2);
  if (__l1 != __l2)
    return false;

  return std::__is_permutation_impl<_AlgPolicy>(
      std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2),
      __pred, __proj1, __proj2);
}

// 2+2 iterators, predicate, specialization for constant-time `distance` call.
template <class _AlgPolicy,
          class _Iter1, class _Sent1, class _Iter2, class _Sent2,
          class _Proj1, class _Proj2, class _Pred>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
                 _Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2,
                 /*_ConstTimeDistance=*/true_type) {
  if (std::distance(__first1, __last1) != std::distance(__first2, __last2))
    return false;
  return std::__is_permutation<_AlgPolicy>(
      std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2),
      __pred, __proj1, __proj2,
      /*_ConstTimeDistance=*/false_type());
}

// 2+2 iterators, predicate
template <class _AlgPolicy,
          class _Iter1, class _Sent1, class _Iter2, class _Sent2,
          class _Proj1, class _Proj2, class _Pred>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
__is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
                 _Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2) {
  return std::__is_permutation<_AlgPolicy>(
      std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2),
      __pred, __proj1, __proj2,
      _ConstTimeDistance<_Iter1, _Sent1, _Iter2, _Sent2>());
}

// Public interface

// 2+1 iterators, predicate
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
               _BinaryPredicate __pred) {
  static_assert(__is_callable<_BinaryPredicate, decltype(*__first1), decltype(*__first2)>::value,
      "The predicate has to be callable");

  return std::__is_permutation<_ClassicAlgPolicy>(
      std::move(__first1), std::move(__last1), std::move(__first2), __pred);
}

// 2+1 iterators
template <class _ForwardIterator1, class _ForwardIterator2>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) {
  return std::is_permutation(__first1, __last1, __first2, __equal_to());
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3

// 2+2 iterators
template <class _ForwardIterator1, class _ForwardIterator2>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool is_permutation(
    _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) {
  return std::__is_permutation<_ClassicAlgPolicy>(
      std::move(__first1),
      std::move(__last1),
      std::move(__first2),
      std::move(__last2),
      __equal_to(),
      __identity(),
      __identity());
}

// 2+2 iterators, predicate
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
               _ForwardIterator2 __last2, _BinaryPredicate __pred) {
  static_assert(__is_callable<_BinaryPredicate, decltype(*__first1), decltype(*__first2)>::value,
      "The predicate has to be callable");

  return std::__is_permutation<_ClassicAlgPolicy>(
      std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2),
      __pred, __identity(), __identity());
}

#endif // _LIBCPP_STD_VER >= 14
# 238 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_IS_PERMUTATION_H
# 244 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_permutation.h" 3
#endif /* is_permutation.h expanded by -frewrite-includes */
# 1799 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_sorted.h expanded by -frewrite-includes */
#include <__algorithm/is_sorted.h>
#else /* is_sorted.h expanded by -frewrite-includes */
# 1799 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_IS_SORTED_H
#define _LIBCPP___ALGORITHM_IS_SORTED_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_sorted_until.h expanded by -frewrite-includes */
#include <__algorithm/is_sorted_until.h>
#else /* is_sorted_until.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted_until.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_IS_SORTED_UNTIL_H
#define _LIBCPP___ALGORITHM_IS_SORTED_UNTIL_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted_until.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted_until.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted_until.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted_until.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted_until.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted_until.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted_until.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Compare, class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
__is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
{
    if (__first != __last)
    {
        _ForwardIterator __i = __first;
        while (++__i != __last)
        {
            if (__comp(*__i, *__first))
                return __i;
            __first = __i;
        }
    }
    return __last;
}

template <class _ForwardIterator, class _Compare>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
{
    return _VSTD::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp);
}

template<class _ForwardIterator>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
is_sorted_until(_ForwardIterator __first, _ForwardIterator __last)
{
    return _VSTD::is_sorted_until(__first, __last, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_IS_SORTED_UNTIL_H
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted_until.h" 3
#endif /* is_sorted_until.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ForwardIterator, class _Compare>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
{
    return _VSTD::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp) == __last;
}

template<class _ForwardIterator>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
is_sorted(_ForwardIterator __first, _ForwardIterator __last)
{
    return _VSTD::is_sorted(__first, __last, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_IS_SORTED_H
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/is_sorted.h" 3
#endif /* is_sorted.h expanded by -frewrite-includes */
# 1800 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/is_sorted_until.h>
#endif /* expanded by -frewrite-includes */
# 1800 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1801 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 1801 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1802 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/lexicographical_compare.h>
#endif /* expanded by -frewrite-includes */
# 1802 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1803 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/lexicographical_compare_three_way.h>
#endif /* expanded by -frewrite-includes */
# 1803 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1804 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/lower_bound.h>
#endif /* expanded by -frewrite-includes */
# 1804 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1805 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* make_heap.h expanded by -frewrite-includes */
#include <__algorithm/make_heap.h>
#else /* make_heap.h expanded by -frewrite-includes */
# 1805 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_MAKE_HEAP_H
#define _LIBCPP___ALGORITHM_MAKE_HEAP_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* sift_down.h expanded by -frewrite-includes */
#include <__algorithm/sift_down.h>
#else /* sift_down.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_SIFT_DOWN_H
#define _LIBCPP___ALGORITHM_SIFT_DOWN_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
__sift_down(_RandomAccessIterator __first, _Compare&& __comp,
            typename iterator_traits<_RandomAccessIterator>::difference_type __len,
            _RandomAccessIterator __start)
{
    using _Ops = _IterOps<_AlgPolicy>;

    typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
    typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type;
    // left-child of __start is at 2 * __start + 1
    // right-child of __start is at 2 * __start + 2
    difference_type __child = __start - __first;

    if (__len < 2 || (__len - 2) / 2 < __child)
        return;

    __child = 2 * __child + 1;
    _RandomAccessIterator __child_i = __first + __child;

    if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) {
        // right-child exists and is greater than left-child
        ++__child_i;
        ++__child;
    }

    // check if we are in heap-order
    if (__comp(*__child_i, *__start))
        // we are, __start is larger than its largest child
        return;

    value_type __top(_Ops::__iter_move(__start));
    do
    {
        // we are not in heap-order, swap the parent with its largest child
        *__start = _Ops::__iter_move(__child_i);
        __start = __child_i;

        if ((__len - 2) / 2 < __child)
            break;

        // recompute the child based off of the updated parent
        __child = 2 * __child + 1;
        __child_i = __first + __child;

        if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) {
            // right-child exists and is greater than left-child
            ++__child_i;
            ++__child;
        }

        // check if we are in heap-order
    } while (!__comp(*__child_i, __top));
    *__start = _VSTD::move(__top);
}

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _RandomAccessIterator
__floyd_sift_down(_RandomAccessIterator __first, _Compare&& __comp,
                  typename iterator_traits<_RandomAccessIterator>::difference_type __len)
{
    using difference_type = typename iterator_traits<_RandomAccessIterator>::difference_type;
    _LIBCPP_ASSERT_UNCATEGORIZED(__len >= 2, "shouldn't be called unless __len >= 2");

    _RandomAccessIterator __hole = __first;
    _RandomAccessIterator __child_i = __first;
    difference_type __child = 0;

    while (true) {
        __child_i += difference_type(__child + 1);
        __child = 2 * __child + 1;

        if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) {
            // right-child exists and is greater than left-child
            ++__child_i;
            ++__child;
        }

        // swap __hole with its largest child
        *__hole = _IterOps<_AlgPolicy>::__iter_move(__child_i);
        __hole = __child_i;

        // if __hole is now a leaf, we're done
        if (__child > (__len - 2) / 2)
            return __hole;
    }
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_SIFT_DOWN_H
# 120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sift_down.h" 3
#endif /* sift_down.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp) {
  __comp_ref_type<_Compare> __comp_ref = __comp;

  using difference_type = typename iterator_traits<_RandomAccessIterator>::difference_type;
  difference_type __n = __last - __first;
  if (__n > 1) {
    // start from the first parent, there is no need to consider children
    for (difference_type __start = (__n - 2) / 2; __start >= 0; --__start) {
        std::__sift_down<_AlgPolicy>(__first, __comp_ref, __n, __first + __start);
    }
  }
}

template <class _RandomAccessIterator, class _Compare>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
  std::__make_heap<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
}

template <class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
  std::make_heap(std::move(__first), std::move(__last), __less<>());
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_MAKE_HEAP_H
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_heap.h" 3
#endif /* make_heap.h expanded by -frewrite-includes */
# 1806 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* max.h expanded by -frewrite-includes */
#include <__algorithm/max.h>
#else /* max.h expanded by -frewrite-includes */
# 1806 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_MAX_H
#define _LIBCPP___ALGORITHM_MAX_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* max_element.h expanded by -frewrite-includes */
#include <__algorithm/max_element.h>
#else /* max_element.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max_element.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_MAX_ELEMENT_H
#define _LIBCPP___ALGORITHM_MAX_ELEMENT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max_element.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max_element.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max_element.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max_element.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max_element.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max_element.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max_element.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Compare, class _ForwardIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
__max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
{
    static_assert(__has_forward_iterator_category<_ForwardIterator>::value,
        "std::max_element requires a ForwardIterator");
    if (__first != __last)
    {
        _ForwardIterator __i = __first;
        while (++__i != __last)
            if (__comp(*__first, *__i))
                __first = __i;
    }
    return __first;
}

template <class _ForwardIterator, class _Compare>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
{
    return _VSTD::__max_element<__comp_ref_type<_Compare> >(__first, __last, __comp);
}


template <class _ForwardIterator>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
max_element(_ForwardIterator __first, _ForwardIterator __last)
{
    return _VSTD::max_element(__first, __last, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_MAX_ELEMENT_H
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max_element.h" 3
#endif /* max_element.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&
max(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b, _Compare __comp)
{
    return __comp(__a, __b) ? __b : __a;
}

template <class _Tp>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
const _Tp&
max(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b)
{
    return _VSTD::max(__a, __b, __less<>());
}

#ifndef _LIBCPP_CXX03_LANG

template<class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp
max(initializer_list<_Tp> __t, _Compare __comp)
{
    return *_VSTD::__max_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
}

template<class _Tp>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
_Tp
max(initializer_list<_Tp> __t)
{
    return *_VSTD::max_element(__t.begin(), __t.end(), __less<>());
}

#endif // _LIBCPP_CXX03_LANG
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_MAX_H
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/max.h" 3
#endif /* max.h expanded by -frewrite-includes */
# 1807 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/max_element.h>
#endif /* expanded by -frewrite-includes */
# 1807 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1808 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* merge.h expanded by -frewrite-includes */
#include <__algorithm/merge.h>
#else /* merge.h expanded by -frewrite-includes */
# 1808 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/merge.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_MERGE_H
#define _LIBCPP___ALGORITHM_MERGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/merge.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/merge.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/merge.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/merge.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/merge.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/merge.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/merge.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/merge.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Compare, class _InputIterator1, class _InputIterator2, class _OutputIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
__merge(_InputIterator1 __first1, _InputIterator1 __last1,
        _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
{
    for (; __first1 != __last1; ++__result)
    {
        if (__first2 == __last2)
            return _VSTD::copy(__first1, __last1, __result);
        if (__comp(*__first2, *__first1))
        {
            *__result = *__first2;
            ++__first2;
        }
        else
        {
            *__result = *__first1;
            ++__first1;
        }
    }
    return _VSTD::copy(__first2, __last2, __result);
}

template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
merge(_InputIterator1 __first1, _InputIterator1 __last1,
      _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
{
    return _VSTD::__merge<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __result, __comp);
}

template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
merge(_InputIterator1 __first1, _InputIterator1 __last1,
      _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result)
{
    return _VSTD::merge(__first1, __last1, __first2, __last2, __result, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_MERGE_H
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/merge.h" 3
#endif /* merge.h expanded by -frewrite-includes */
# 1809 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 1809 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1810 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min_element.h>
#endif /* expanded by -frewrite-includes */
# 1810 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1811 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* min_max_result.h expanded by -frewrite-includes */
#include <__algorithm/min_max_result.h>
#else /* min_max_result.h expanded by -frewrite-includes */
# 1811 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_max_result.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_MIN_MAX_RESULT_H
#define _LIBCPP___ALGORITHM_MIN_MAX_RESULT_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_max_result.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_max_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_max_result.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_max_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_max_result.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_max_result.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_max_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_max_result.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_max_result.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_max_result.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_max_result.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_max_result.h" 3

namespace ranges {

template <class _T1>
struct min_max_result {
  _LIBCPP_NO_UNIQUE_ADDRESS _T1 min;
  _LIBCPP_NO_UNIQUE_ADDRESS _T1 max;

  template <class _T2>
    requires convertible_to<const _T1&, _T2>
  _LIBCPP_HIDE_FROM_ABI constexpr operator min_max_result<_T2>() const & {
    return {min, max};
  }

  template <class _T2>
    requires convertible_to<_T1, _T2>
  _LIBCPP_HIDE_FROM_ABI constexpr operator min_max_result<_T2>() && {
    return {std::move(min), std::move(max)};
  }
};

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_max_result.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_MIN_MAX_RESULT_H
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/min_max_result.h" 3
#endif /* min_max_result.h expanded by -frewrite-includes */
# 1812 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* minmax.h expanded by -frewrite-includes */
#include <__algorithm/minmax.h>
#else /* minmax.h expanded by -frewrite-includes */
# 1812 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_MINMAX_H
#define _LIBCPP___ALGORITHM_MINMAX_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* minmax_element.h expanded by -frewrite-includes */
#include <__algorithm/minmax_element.h>
#else /* minmax_element.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_MINMAX_ELEMENT_H
#define _LIBCPP___ALGORITHM_MINMAX_ELEMENT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_callable.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Comp, class _Proj>
class _MinmaxElementLessFunc {
  _Comp& __comp_;
  _Proj& __proj_;

public:
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
  _MinmaxElementLessFunc(_Comp& __comp, _Proj& __proj) : __comp_(__comp), __proj_(__proj) {}

  template <class _Iter>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
  bool operator()(_Iter& __it1, _Iter& __it2) {
    return std::__invoke(__comp_, std::__invoke(__proj_, *__it1), std::__invoke(__proj_, *__it2));
  }
};

template <class _Iter, class _Sent, class _Proj, class _Comp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter, _Iter> __minmax_element_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
  auto __less = _MinmaxElementLessFunc<_Comp, _Proj>(__comp, __proj);

  pair<_Iter, _Iter> __result(__first, __first);
  if (__first == __last || ++__first == __last)
    return __result;

  if (__less(__first, __result.first))
    __result.first = __first;
  else
    __result.second = __first;

  while (++__first != __last) {
    _Iter __i = __first;
    if (++__first == __last) {
      if (__less(__i, __result.first))
        __result.first = __i;
      else if (!__less(__i, __result.second))
        __result.second = __i;
      return __result;
    }

    if (__less(__first, __i)) {
      if (__less(__first, __result.first))
        __result.first = __first;
    if (!__less(__i, __result.second))
      __result.second = __i;
    } else {
      if (__less(__i, __result.first))
        __result.first = __i;
      if (!__less(__first, __result.second))
        __result.second = __first;
    }
  }

  return __result;
}

template <class _ForwardIterator, class _Compare>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_ForwardIterator, _ForwardIterator>
minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) {
  static_assert(__has_forward_iterator_category<_ForwardIterator>::value,
                "std::minmax_element requires a ForwardIterator");
  static_assert(__is_callable<_Compare, decltype(*__first), decltype(*__first)>::value,
                "The comparator has to be callable");
  auto __proj = __identity();
  return std::__minmax_element_impl(__first, __last, __comp, __proj);
}

template <class _ForwardIterator>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_ForwardIterator, _ForwardIterator> minmax_element(_ForwardIterator __first, _ForwardIterator __last) {
    return std::minmax_element(__first, __last, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_MINMAX_ELEMENT_H
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax_element.h" 3
#endif /* minmax_element.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_callable.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template<class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<const _Tp&, const _Tp&>
minmax(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b, _Compare __comp)
{
    return __comp(__b, __a) ? pair<const _Tp&, const _Tp&>(__b, __a) :
                              pair<const _Tp&, const _Tp&>(__a, __b);
}

template<class _Tp>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<const _Tp&, const _Tp&>
minmax(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b)
{
    return std::minmax(__a, __b, __less<>());
}

#ifndef _LIBCPP_CXX03_LANG

template<class _Tp, class _Compare>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Tp, _Tp> minmax(initializer_list<_Tp> __t, _Compare __comp) {
    static_assert(__is_callable<_Compare, _Tp, _Tp>::value, "The comparator has to be callable");
    __identity __proj;
    auto __ret = std::__minmax_element_impl(__t.begin(), __t.end(), __comp, __proj);
    return pair<_Tp, _Tp>(*__ret.first, *__ret.second);
}

template<class _Tp>
_LIBCPP_NODISCARD_EXT inline
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Tp, _Tp>
minmax(initializer_list<_Tp> __t)
{
    return std::minmax(__t, __less<>());
}

#endif // _LIBCPP_CXX03_LANG
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_MINMAX_H
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/minmax.h" 3
#endif /* minmax.h expanded by -frewrite-includes */
# 1813 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/minmax_element.h>
#endif /* expanded by -frewrite-includes */
# 1813 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1814 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* mismatch.h expanded by -frewrite-includes */
#include <__algorithm/mismatch.h>
#else /* mismatch.h expanded by -frewrite-includes */
# 1814 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/mismatch.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_MISMATCH_H
#define _LIBCPP___ALGORITHM_MISMATCH_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/mismatch.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/mismatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/mismatch.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/mismatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/mismatch.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/mismatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/mismatch.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/mismatch.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/mismatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/mismatch.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/mismatch.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator1, _InputIterator2>
    mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __pred) {
  for (; __first1 != __last1; ++__first1, (void)++__first2)
    if (!__pred(*__first1, *__first2))
      break;
  return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
}

template <class _InputIterator1, class _InputIterator2>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator1, _InputIterator2>
    mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) {
  return std::mismatch(__first1, __last1, __first2, __equal_to());
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/mismatch.h" 3
template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator1, _InputIterator2>
    mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
             _BinaryPredicate __pred) {
  for (; __first1 != __last1 && __first2 != __last2; ++__first1, (void)++__first2)
    if (!__pred(*__first1, *__first2))
      break;
  return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
}

template <class _InputIterator1, class _InputIterator2>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator1, _InputIterator2>
    mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
  return std::mismatch(__first1, __last1, __first2, __last2, __equal_to());
}
#endif
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/mismatch.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_MISMATCH_H
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/mismatch.h" 3
#endif /* mismatch.h expanded by -frewrite-includes */
# 1815 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/move.h>
#endif /* expanded by -frewrite-includes */
# 1815 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1816 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/move_backward.h>
#endif /* expanded by -frewrite-includes */
# 1816 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1817 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* next_permutation.h expanded by -frewrite-includes */
#include <__algorithm/next_permutation.h>
#else /* next_permutation.h expanded by -frewrite-includes */
# 1817 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_NEXT_PERMUTATION_H
#define _LIBCPP___ALGORITHM_NEXT_PERMUTATION_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* reverse.h expanded by -frewrite-includes */
#include <__algorithm/reverse.h>
#else /* reverse.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_REVERSE_H
#define _LIBCPP___ALGORITHM_REVERSE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _BidirectionalIterator>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
__reverse_impl(_BidirectionalIterator __first, _BidirectionalIterator __last, bidirectional_iterator_tag)
{
    while (__first != __last)
    {
        if (__first == --__last)
            break;
        _IterOps<_AlgPolicy>::iter_swap(__first, __last);
        ++__first;
    }
}

template <class _AlgPolicy, class _RandomAccessIterator>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
__reverse_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag)
{
    if (__first != __last)
        for (; __first < --__last; ++__first)
            _IterOps<_AlgPolicy>::iter_swap(__first, __last);
}

template <class _AlgPolicy, class _BidirectionalIterator, class _Sentinel>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __reverse(_BidirectionalIterator __first, _Sentinel __last) {
  using _IterCategory = typename _IterOps<_AlgPolicy>::template __iterator_category<_BidirectionalIterator>;
  std::__reverse_impl<_AlgPolicy>(std::move(__first), std::move(__last), _IterCategory());
}

template <class _BidirectionalIterator>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
{
  std::__reverse<_ClassicAlgPolicy>(std::move(__first), std::move(__last));
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_REVERSE_H
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse.h" 3
#endif /* reverse.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator, bool>
__next_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&& __comp)
{
    using _Result = pair<_BidirectionalIterator, bool>;

    _BidirectionalIterator __last_iter = _IterOps<_AlgPolicy>::next(__first, __last);
    _BidirectionalIterator __i = __last_iter;
    if (__first == __last || __first == --__i)
        return _Result(std::move(__last_iter), false);

    while (true)
    {
        _BidirectionalIterator __ip1 = __i;
        if (__comp(*--__i, *__ip1))
        {
            _BidirectionalIterator __j = __last_iter;
            while (!__comp(*__i, *--__j))
                ;
            _IterOps<_AlgPolicy>::iter_swap(__i, __j);
            std::__reverse<_AlgPolicy>(__ip1, __last_iter);
            return _Result(std::move(__last_iter), true);
        }
        if (__i == __first)
        {
            std::__reverse<_AlgPolicy>(__first, __last_iter);
            return _Result(std::move(__last_iter), false);
        }
    }
}

template <class _BidirectionalIterator, class _Compare>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp)
{
  return std::__next_permutation<_ClassicAlgPolicy>(
      std::move(__first), std::move(__last), static_cast<__comp_ref_type<_Compare> >(__comp)).second;
}

template <class _BidirectionalIterator>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last)
{
    return _VSTD::next_permutation(__first, __last, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_NEXT_PERMUTATION_H
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/next_permutation.h" 3
#endif /* next_permutation.h expanded by -frewrite-includes */
# 1818 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* none_of.h expanded by -frewrite-includes */
#include <__algorithm/none_of.h>
#else /* none_of.h expanded by -frewrite-includes */
# 1818 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/none_of.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_NONE_OF_H
#define _LIBCPP___ALGORITHM_NONE_OF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/none_of.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/none_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/none_of.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/none_of.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _Predicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
  for (; __first != __last; ++__first)
    if (__pred(*__first))
      return false;
  return true;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_NONE_OF_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/none_of.h" 3
#endif /* none_of.h expanded by -frewrite-includes */
# 1819 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* nth_element.h expanded by -frewrite-includes */
#include <__algorithm/nth_element.h>
#else /* nth_element.h expanded by -frewrite-includes */
# 1819 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_NTH_ELEMENT_H
#define _LIBCPP___ALGORITHM_NTH_ELEMENT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* sort.h expanded by -frewrite-includes */
#include <__algorithm/sort.h>
#else /* sort.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_SORT_H
#define _LIBCPP___ALGORITHM_SORT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min_element.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* partial_sort.h expanded by -frewrite-includes */
#include <__algorithm/partial_sort.h>
#else /* partial_sort.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PARTIAL_SORT_H
#define _LIBCPP___ALGORITHM_PARTIAL_SORT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_heap.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/sift_down.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* sort_heap.h expanded by -frewrite-includes */
#include <__algorithm/sort_heap.h>
#else /* sort_heap.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_SORT_HEAP_H
#define _LIBCPP___ALGORITHM_SORT_HEAP_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pop_heap.h expanded by -frewrite-includes */
#include <__algorithm/pop_heap.h>
#else /* pop_heap.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_POP_HEAP_H
#define _LIBCPP___ALGORITHM_POP_HEAP_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* push_heap.h expanded by -frewrite-includes */
#include <__algorithm/push_heap.h>
#else /* push_heap.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PUSH_HEAP_H
#define _LIBCPP___ALGORITHM_PUSH_HEAP_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_assignable.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void __sift_up(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp,
        typename iterator_traits<_RandomAccessIterator>::difference_type __len) {
  using value_type = typename iterator_traits<_RandomAccessIterator>::value_type;

  if (__len > 1) {
    __len = (__len - 2) / 2;
    _RandomAccessIterator __ptr = __first + __len;

    if (__comp(*__ptr, *--__last)) {
      value_type __t(_IterOps<_AlgPolicy>::__iter_move(__last));
      do {
        *__last = _IterOps<_AlgPolicy>::__iter_move(__ptr);
        __last = __ptr;
        if (__len == 0)
          break;
        __len = (__len - 1) / 2;
        __ptr = __first + __len;
      } while (__comp(*__ptr, __t));

      *__last = std::move(__t);
    }
  }
}

template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void __push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp) {
  typename iterator_traits<_RandomAccessIterator>::difference_type __len = __last - __first;
  std::__sift_up<_AlgPolicy, __comp_ref_type<_Compare> >(std::move(__first), std::move(__last), __comp, __len);
}

template <class _RandomAccessIterator, class _Compare>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
  static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
  static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");

  std::__push_heap<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
}

template <class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
  std::push_heap(std::move(__first), std::move(__last), __less<>());
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_PUSH_HEAP_H
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/push_heap.h" 3
#endif /* push_heap.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/sift_down.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_assignable.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp,
    typename iterator_traits<_RandomAccessIterator>::difference_type __len) {
  _LIBCPP_ASSERT_UNCATEGORIZED(__len > 0, "The heap given to pop_heap must be non-empty");

  __comp_ref_type<_Compare> __comp_ref = __comp;

  using value_type = typename iterator_traits<_RandomAccessIterator>::value_type;
  if (__len > 1) {
    value_type __top = _IterOps<_AlgPolicy>::__iter_move(__first);  // create a hole at __first
    _RandomAccessIterator __hole = std::__floyd_sift_down<_AlgPolicy>(__first, __comp_ref, __len);
    --__last;

    if (__hole == __last) {
      *__hole = std::move(__top);
    } else {
      *__hole = _IterOps<_AlgPolicy>::__iter_move(__last);
      ++__hole;
      *__last = std::move(__top);
      std::__sift_up<_AlgPolicy>(__first, __hole, __comp_ref, __hole - __first);
    }
  }
}

template <class _RandomAccessIterator, class _Compare>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
  static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
  static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");

  typename iterator_traits<_RandomAccessIterator>::difference_type __len = __last - __first;
  std::__pop_heap<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp, __len);
}

template <class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
  std::pop_heap(std::move(__first), std::move(__last), __less<>());
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_POP_HEAP_H
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pop_heap.h" 3
#endif /* pop_heap.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* strict_weak_ordering_check.h expanded by -frewrite-includes */
#include <__debug_utils/strict_weak_ordering_check.h>
#else /* strict_weak_ordering_check.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___LIBCXX_DEBUG_STRICT_WEAK_ORDERING_CHECK
#define _LIBCPP___LIBCXX_DEBUG_STRICT_WEAK_ORDERING_CHECK

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/is_sorted.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _RandomAccessIterator, class _Comp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
__check_strict_weak_ordering_sorted(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) {
#ifdef _LIBCPP_DEBUG_STRICT_WEAK_ORDERING_CHECK
  using __diff_t  = __iter_diff_t<_RandomAccessIterator>;
  using _Comp_ref = __comp_ref_type<_Comp>;
  if (!__libcpp_is_constant_evaluated()) {
    // Check if the range is actually sorted.
    _LIBCPP_ASSERT_UNCATEGORIZED(
        (std::is_sorted<_RandomAccessIterator, _Comp_ref>(__first, __last, _Comp_ref(__comp))),
        "The range is not sorted after the sort, your comparator is not a valid strict-weak ordering");
    // Limit the number of elements we need to check.
    __diff_t __size = __last - __first > __diff_t(100) ? __diff_t(100) : __last - __first;
    __diff_t __p    = 0;
    while (__p < __size) {
      __diff_t __q = __p + __diff_t(1);
      // Find first element that is greater than *(__first+__p).
      while (__q < __size && !__comp(*(__first + __p), *(__first + __q))) {
        ++__q;
      }
      // Check that the elements from __p to __q are equal between each other.
      for (__diff_t __b = __p; __b < __q; ++__b) {
        for (__diff_t __a = __p; __a <= __b; ++__a) {
          _LIBCPP_ASSERT_UNCATEGORIZED(
              !__comp(*(__first + __a), *(__first + __b)), "Your comparator is not a valid strict-weak ordering");
          _LIBCPP_ASSERT_UNCATEGORIZED(
              !__comp(*(__first + __b), *(__first + __a)), "Your comparator is not a valid strict-weak ordering");
        }
      }
      // Check that elements between __p and __q are less than between __q and __size.
      for (__diff_t __a = __p; __a < __q; ++__a) {
        for (__diff_t __b = __q; __b < __size; ++__b) {
          _LIBCPP_ASSERT_UNCATEGORIZED(
              __comp(*(__first + __a), *(__first + __b)), "Your comparator is not a valid strict-weak ordering");
          _LIBCPP_ASSERT_UNCATEGORIZED(
              !__comp(*(__first + __b), *(__first + __a)), "Your comparator is not a valid strict-weak ordering");
        }
      }
      // Skip these equal elements.
      __p = __q;
    }
  }
#else
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3
  (void)__first;
  (void)__last;
  (void)__comp;
#endif
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___LIBCXX_DEBUG_STRICT_WEAK_ORDERING_CHECK
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h" 3
#endif /* strict_weak_ordering_check.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_assignable.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp) {
  _RandomAccessIterator __saved_last = __last;
  __comp_ref_type<_Compare> __comp_ref = __comp;

  using difference_type = typename iterator_traits<_RandomAccessIterator>::difference_type;
  for (difference_type __n = __last - __first; __n > 1; --__last, (void) --__n)
    std::__pop_heap<_AlgPolicy>(__first, __last, __comp_ref, __n);
  std::__check_strict_weak_ordering_sorted(__first, __saved_last, __comp_ref);
}

template <class _RandomAccessIterator, class _Compare>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
  static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
  static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");

  std::__sort_heap<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
}

template <class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
  std::sort_heap(std::move(__first), std::move(__last), __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_SORT_HEAP_H
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort_heap.h" 3
#endif /* sort_heap.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* randomize_range.h expanded by -frewrite-includes */
#include <__debug_utils/randomize_range.h>
#else /* randomize_range.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/randomize_range.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___LIBCXX_DEBUG_RANDOMIZE_RANGE_H
#define _LIBCPP___LIBCXX_DEBUG_RANDOMIZE_RANGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/randomize_range.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/randomize_range.h" 3

#ifdef _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
#if 0 /* expanded by -frewrite-includes */
#  include <__algorithm/shuffle.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/randomize_range.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/randomize_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#  include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/randomize_range.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/randomize_range.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/randomize_range.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/randomize_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/randomize_range.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/randomize_range.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Iterator, class _Sentinel>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
void __debug_randomize_range(_Iterator __first, _Sentinel __last) {
#ifdef _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
#  ifdef _LIBCPP_CXX03_LANG
#    error Support for unspecified stability is only for C++11 and higher
#  endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/randomize_range.h" 3

  if (!__libcpp_is_constant_evaluated())
    std::__shuffle<_AlgPolicy>(__first, __last, __libcpp_debug_randomizer());
#else
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/randomize_range.h" 3
  (void)__first;
  (void)__last;
#endif
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/randomize_range.h" 3
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___LIBCXX_DEBUG_RANDOMIZE_RANGE_H
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__debug_utils/randomize_range.h" 3
#endif /* randomize_range.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_assignable.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, class _Sentinel>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_RandomAccessIterator __partial_sort_impl(
    _RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last, _Compare&& __comp) {
  if (__first == __middle) {
    return _IterOps<_AlgPolicy>::next(__middle, __last);
  }

  std::__make_heap<_AlgPolicy>(__first, __middle, __comp);

  typename iterator_traits<_RandomAccessIterator>::difference_type __len = __middle - __first;
  _RandomAccessIterator __i = __middle;
  for (; __i != __last; ++__i)
  {
      if (__comp(*__i, *__first))
      {
          _IterOps<_AlgPolicy>::iter_swap(__i, __first);
          std::__sift_down<_AlgPolicy>(__first, __comp, __len, __first);
      }
  }
  std::__sort_heap<_AlgPolicy>(std::move(__first), std::move(__middle), __comp);

  return __i;
}

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, class _Sentinel>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_RandomAccessIterator __partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last,
                                     _Compare& __comp) {
  if (__first == __middle)
      return _IterOps<_AlgPolicy>::next(__middle, __last);

  std::__debug_randomize_range<_AlgPolicy>(__first, __last);

  auto __last_iter =
      std::__partial_sort_impl<_AlgPolicy>(__first, __middle, __last, static_cast<__comp_ref_type<_Compare> >(__comp));

  std::__debug_randomize_range<_AlgPolicy>(__middle, __last);

  return __last_iter;
}

template <class _RandomAccessIterator, class _Compare>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last,
             _Compare __comp)
{
  static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
  static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");

  (void)std::__partial_sort<_ClassicAlgPolicy>(std::move(__first), std::move(__middle), std::move(__last), __comp);
}

template <class _RandomAccessIterator>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last)
{
    _VSTD::partial_sort(__first, __middle, __last, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_PARTIAL_SORT_H
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort.h" 3
#endif /* partial_sort.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/unwrap_iter.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/blsr.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/countl.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/countr.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__debug_utils/randomize_range.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__debug_utils/strict_weak_ordering_check.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/disjunction.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* climits expanded by -frewrite-includes */
#include <climits>
#else /* climits expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/climits" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CLIMITS
#define _LIBCPP_CLIMITS

/*
    climits synopsis

Macros:

    CHAR_BIT
    SCHAR_MIN
    SCHAR_MAX
    UCHAR_MAX
    CHAR_MIN
    CHAR_MAX
    MB_LEN_MAX
    SHRT_MIN
    SHRT_MAX
    USHRT_MAX
    INT_MIN
    INT_MAX
    UINT_MAX
    LONG_MIN
    LONG_MAX
    ULONG_MAX
    LLONG_MIN   // C99
    LLONG_MAX   // C99
    ULLONG_MAX  // C99

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/climits" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/climits" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/climits" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/climits" 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* limits.h expanded by -frewrite-includes */
#include <limits.h>
#else /* limits.h expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/climits" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 1 3
/*===---- limits.h - Standard header for integer sizes --------------------===*\
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
\*===----------------------------------------------------------------------===*/

#ifndef __CLANG_LIMITS_H
#define __CLANG_LIMITS_H

/* The system's limits.h may, in turn, try to #include_next GCC's limits.h.
   Avert this #include_next madness. */
#if 0 /* disabled by -frewrite-includes */
#if defined __GNUC__ && !defined _GCC_LIMITS_H_
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3
#define _GCC_LIMITS_H_
#endif
# 17 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3

/* System headers include a number of constants from POSIX in <limits.h>.
   Include it if we're hosted. */
#if 0 /* disabled by -frewrite-includes */
#if __STDC_HOSTED__ && __has_include_next(<limits.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* limits.h expanded by -frewrite-includes */
#include_next <limits.h>
#else /* limits.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3
# 1 "gen/zircon/public/sysroot/cpp/include/limits.h" 1 3 4
#ifndef SYSROOT_LIMITS_H_
#define SYSROOT_LIMITS_H_

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 4 "gen/zircon/public/sysroot/cpp/include/limits.h" 3 4
# 5 "gen/zircon/public/sysroot/cpp/include/limits.h" 3 4

/* Most limits are system-specific */

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* limits.h expanded by -frewrite-includes */
#include <bits/limits.h>
#else /* limits.h expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/limits.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/limits.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
    defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 3 "gen/zircon/public/sysroot/cpp/include/bits/limits.h" 3 4
#define PAGE_SIZE 4096
#define LONG_BIT 64
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/limits.h" 3 4

#define LONG_MAX 0x7fffffffffffffffL
#define LLONG_MAX 0x7fffffffffffffffLL
#endif /* limits.h expanded by -frewrite-includes */
# 9 "gen/zircon/public/sysroot/cpp/include/limits.h" 2 3 4

/* Support signed or unsigned plain-char */

#if 0 /* disabled by -frewrite-includes */
#if '\0' - 1 > 0
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/limits.h" 3 4
#define CHAR_MIN 0
#define CHAR_MAX 255
#else
# 16 "gen/zircon/public/sysroot/cpp/include/limits.h" 3 4
#define CHAR_MIN (-128)
#define CHAR_MAX 127
#endif
# 19 "gen/zircon/public/sysroot/cpp/include/limits.h" 3 4

/* Some universal constants... */

#define CHAR_BIT 8
#define SCHAR_MIN (-128)
#define SCHAR_MAX 127
#define UCHAR_MAX 255
#define SHRT_MIN (-1 - 0x7fff)
#define SHRT_MAX 0x7fff
#define USHRT_MAX 0xffff
#define INT_MIN (-1 - 0x7fffffff)
#define INT_MAX 0x7fffffff
#define UINT_MAX 0xffffffffU
#define LONG_MIN (-LONG_MAX - 1)
#define ULONG_MAX (2UL * LONG_MAX + 1)
#define LLONG_MIN (-LLONG_MAX - 1)
#define ULLONG_MAX (2ULL * LLONG_MAX + 1)

#define MB_LEN_MAX 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
    defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 41 "gen/zircon/public/sysroot/cpp/include/limits.h" 3 4

#define PIPE_BUF 4096
#ifdef PAGE_SIZE
#define PAGESIZE PAGE_SIZE
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/limits.h" 3 4
#define FILESIZEBITS 64
#define NAME_MAX 255
#define SYMLINK_MAX 255
#define PATH_MAX 4096
#define NZERO 20
#define NGROUPS_MAX 32
#define IOV_MAX 1024
#define SYMLOOP_MAX 40
#define WORD_BIT 32
#define SSIZE_MAX LONG_MAX
#define TZNAME_MAX 6
#define TTY_NAME_MAX 32
#define HOST_NAME_MAX 255

/* Implementation choices... */

#define PTHREAD_KEYS_MAX 128
#define PTHREAD_STACK_MIN 3072
#define PTHREAD_DESTRUCTOR_ITERATIONS 4
#define SEM_VALUE_MAX 0x7fffffff
#define SEM_NSEMS_MAX 256
#define DELAYTIMER_MAX 0x7fffffff
#define MQ_PRIO_MAX 32768
#define LOGIN_NAME_MAX 256

/* Arbitrary numbers... */

#define BC_BASE_MAX 99
#define BC_DIM_MAX 2048
#define BC_SCALE_MAX 99
#define BC_STRING_MAX 1000
#define CHARCLASS_NAME_MAX 14
#define COLL_WEIGHTS_MAX 2
#define EXPR_NEST_MAX 32
#define LINE_MAX 4096
#define RE_DUP_MAX 255

#define NL_ARGMAX 9
#define NL_LANGMAX 32
#define NL_MSGMAX 32767
#define NL_SETMAX 255
#define NL_TEXTMAX 2048

#endif
# 90 "gen/zircon/public/sysroot/cpp/include/limits.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || \
    (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE + 0 < 700)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/limits.h" 3 4

#define NL_NMAX 16

#endif
# 97 "gen/zircon/public/sysroot/cpp/include/limits.h" 3 4

/* POSIX/SUS requirements follow. These numbers come directly
 * from SUS and have nothing to do with the host system. */

#define _POSIX_AIO_LISTIO_MAX 2
#define _POSIX_AIO_MAX 1
#define _POSIX_ARG_MAX 4096
#define _POSIX_CHILD_MAX 25
#define _POSIX_CLOCKRES_MIN 20000000
#define _POSIX_DELAYTIMER_MAX 32
#define _POSIX_HOST_NAME_MAX 255
#define _POSIX_LINK_MAX 8
#define _POSIX_LOGIN_NAME_MAX 9
#define _POSIX_MAX_CANON 255
#define _POSIX_MAX_INPUT 255
#define _POSIX_MQ_OPEN_MAX 8
#define _POSIX_MQ_PRIO_MAX 32
#define _POSIX_NAME_MAX 14
#define _POSIX_NGROUPS_MAX 8
#define _POSIX_OPEN_MAX 20
#define _POSIX_PATH_MAX 256
#define _POSIX_PIPE_BUF 512
#define _POSIX_RE_DUP_MAX 255
#define _POSIX_RTSIG_MAX 8
#define _POSIX_SEM_NSEMS_MAX 256
#define _POSIX_SEM_VALUE_MAX 32767
#define _POSIX_SIGQUEUE_MAX 32
#define _POSIX_SSIZE_MAX 32767
#define _POSIX_STREAM_MAX 8
#define _POSIX_SS_REPL_MAX 4
#define _POSIX_SYMLINK_MAX 255
#define _POSIX_SYMLOOP_MAX 8
#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
#define _POSIX_THREAD_KEYS_MAX 128
#define _POSIX_THREAD_THREADS_MAX 64
#define _POSIX_TIMER_MAX 32
#define _POSIX_TRACE_EVENT_NAME_MAX 30
#define _POSIX_TRACE_NAME_MAX 8
#define _POSIX_TRACE_SYS_MAX 8
#define _POSIX_TRACE_USER_EVENT_MAX 32
#define _POSIX_TTY_NAME_MAX 9
#define _POSIX_TZNAME_MAX 6
#define _POSIX2_BC_BASE_MAX 99
#define _POSIX2_BC_DIM_MAX 2048
#define _POSIX2_BC_SCALE_MAX 99
#define _POSIX2_BC_STRING_MAX 1000
#define _POSIX2_CHARCLASS_NAME_MAX 14
#define _POSIX2_COLL_WEIGHTS_MAX 2
#define _POSIX2_EXPR_NEST_MAX 32
#define _POSIX2_LINE_MAX 2048
#define _POSIX2_RE_DUP_MAX 255

#define _XOPEN_IOV_MAX 16
#define _XOPEN_NAME_MAX 255
#define _XOPEN_PATH_MAX 1024

#endif  // SYSROOT_LIMITS_H_
# 154 "gen/zircon/public/sysroot/cpp/include/limits.h" 3 4
#endif /* limits.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 2 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3

/* Many system headers try to "help us out" by defining these.  No really, we
   know how big each datatype is. */
#undef  SCHAR_MIN
#undef  SCHAR_MAX
#undef  UCHAR_MAX
#undef  SHRT_MIN
#undef  SHRT_MAX
#undef  USHRT_MAX
#undef  INT_MIN
#undef  INT_MAX
#undef  UINT_MAX
#undef  LONG_MIN
#undef  LONG_MAX
#undef  ULONG_MAX

#undef  CHAR_BIT
#undef  CHAR_MIN
#undef  CHAR_MAX

/* C90/99 5.2.4.2.1 */
#define SCHAR_MAX __SCHAR_MAX__
#define SHRT_MAX  __SHRT_MAX__
#define INT_MAX   __INT_MAX__
#define LONG_MAX  __LONG_MAX__

#define SCHAR_MIN (-__SCHAR_MAX__-1)
#define SHRT_MIN  (-__SHRT_MAX__ -1)
#define INT_MIN   (-__INT_MAX__  -1)
#define LONG_MIN  (-__LONG_MAX__ -1L)

#define UCHAR_MAX (__SCHAR_MAX__*2  +1)
#if 0 /* disabled by -frewrite-includes */
#if __SHRT_WIDTH__ < __INT_WIDTH__
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 56 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3
#define USHRT_MAX (__SHRT_MAX__ * 2 + 1)
#else
# 58 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3
#define USHRT_MAX (__SHRT_MAX__ * 2U + 1U)
#endif
# 60 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3
#define UINT_MAX  (__INT_MAX__  *2U +1U)
#define ULONG_MAX (__LONG_MAX__ *2UL+1UL)

#ifndef MB_LEN_MAX
#define MB_LEN_MAX 1
#endif
# 66 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3

#define CHAR_BIT  __CHAR_BIT__

/* C23 5.2.4.2.1 */
#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 71 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3
#define BOOL_WIDTH   __BOOL_WIDTH__
#define CHAR_WIDTH   CHAR_BIT
#define SCHAR_WIDTH  CHAR_BIT
#define UCHAR_WIDTH  CHAR_BIT
#define USHRT_WIDTH  __SHRT_WIDTH__
#define SHRT_WIDTH   __SHRT_WIDTH__
#define UINT_WIDTH   __INT_WIDTH__
#define INT_WIDTH    __INT_WIDTH__
#define ULONG_WIDTH  __LONG_WIDTH__
#define LONG_WIDTH   __LONG_WIDTH__
#define ULLONG_WIDTH __LLONG_WIDTH__
#define LLONG_WIDTH  __LLONG_WIDTH__

#define BITINT_MAXWIDTH __BITINT_MAXWIDTH__
#endif
# 86 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3

#ifdef __CHAR_UNSIGNED__  /* -funsigned-char */
#define CHAR_MIN 0
#define CHAR_MAX UCHAR_MAX
#else
# 91 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3
#define CHAR_MIN SCHAR_MIN
#define CHAR_MAX __SCHAR_MAX__
#endif
# 94 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3

/* C99 5.2.4.2.1: Added long long.
   C++11 18.3.3.2: same contents as the Standard C Library header <limits.h>.
 */
#if 0 /* disabled by -frewrite-includes */
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) ||              \
    (defined(__cplusplus) && __cplusplus >= 201103L)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 100 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3

#undef  LLONG_MIN
#undef  LLONG_MAX
#undef  ULLONG_MAX

#define LLONG_MAX  __LONG_LONG_MAX__
#define LLONG_MIN  (-__LONG_LONG_MAX__-1LL)
#define ULLONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
#endif
# 109 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3

/* LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX are a GNU extension.  It's too bad
   that we don't have something like #pragma poison that could be used to
   deprecate a macro - the code should just use LLONG_MAX and friends.
 */
#if 0 /* disabled by -frewrite-includes */
#if defined(__GNU_LIBRARY__) ? defined(__USE_GNU) : !defined(__STRICT_ANSI__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 115 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3

#undef   LONG_LONG_MIN
#undef   LONG_LONG_MAX
#undef   ULONG_LONG_MAX

#define LONG_LONG_MAX  __LONG_LONG_MAX__
#define LONG_LONG_MIN  (-__LONG_LONG_MAX__-1LL)
#define ULONG_LONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
#endif
# 124 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3

#endif /* __CLANG_LIMITS_H */
# 126 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/limits.h" 3
#endif /* limits.h expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/climits" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/climits" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/climits" 3
#endif
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/climits" 3

#endif // _LIBCPP_CLIMITS
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/climits" 3
#endif /* climits expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// stable, 2-3 compares, 0-2 swaps

template <class _AlgPolicy, class _Compare, class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_SINCE_CXX14 unsigned __sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z,
                                               _Compare __c) {
  using _Ops = _IterOps<_AlgPolicy>;

  unsigned __r = 0;
  if (!__c(*__y, *__x))   // if x <= y
  {
    if (!__c(*__z, *__y)) // if y <= z
      return __r;         // x <= y && y <= z
                          // x <= y && y > z
    _Ops::iter_swap(__y, __z);     // x <= z && y < z
    __r = 1;
    if (__c(*__y, *__x))  // if x > y
    {
      _Ops::iter_swap(__x, __y);   // x < y && y <= z
      __r = 2;
    }
    return __r;           // x <= y && y < z
  }
  if (__c(*__z, *__y))    // x > y, if y > z
  {
    _Ops::iter_swap(__x, __z);     // x < y && y < z
    __r = 1;
    return __r;
  }
  _Ops::iter_swap(__x, __y);       // x > y && y <= z
  __r = 1;                // x < y && x <= z
  if (__c(*__z, *__y))    // if y > z
  {
    _Ops::iter_swap(__y, __z);     // x <= y && y < z
    __r = 2;
  }
  return __r;
}                         // x <= y && y <= z

// stable, 3-6 compares, 0-5 swaps

template <class _AlgPolicy, class _Compare, class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI
void __sort4(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3, _ForwardIterator __x4,
                 _Compare __c) {
  using _Ops   = _IterOps<_AlgPolicy>;
  std::__sort3<_AlgPolicy, _Compare>(__x1, __x2, __x3, __c);
  if (__c(*__x4, *__x3)) {
    _Ops::iter_swap(__x3, __x4);
    if (__c(*__x3, *__x2)) {
      _Ops::iter_swap(__x2, __x3);
      if (__c(*__x2, *__x1)) {
        _Ops::iter_swap(__x1, __x2);
      }
    }
  }
}

// stable, 4-10 compares, 0-9 swaps

template <class _AlgPolicy, class _Comp, class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI void __sort5(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3,
                                   _ForwardIterator __x4, _ForwardIterator __x5, _Comp __comp) {
  using _Ops = _IterOps<_AlgPolicy>;

  std::__sort4<_AlgPolicy, _Comp>(__x1, __x2, __x3, __x4, __comp);
  if (__comp(*__x5, *__x4)) {
    _Ops::iter_swap(__x4, __x5);
    if (__comp(*__x4, *__x3)) {
      _Ops::iter_swap(__x3, __x4);
      if (__comp(*__x3, *__x2)) {
        _Ops::iter_swap(__x2, __x3);
        if (__comp(*__x2, *__x1)) {
          _Ops::iter_swap(__x1, __x2);
        }
      }
    }
  }
}

// The comparator being simple is a prerequisite for using the branchless optimization.
template <class _Tp>
struct __is_simple_comparator : false_type {};
template <>
struct __is_simple_comparator<__less<>&> : true_type {};
template <class _Tp>
struct __is_simple_comparator<less<_Tp>&> : true_type {};
template <class _Tp>
struct __is_simple_comparator<greater<_Tp>&> : true_type {};
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
template <>
struct __is_simple_comparator<ranges::less&> : true_type {};
template <>
struct __is_simple_comparator<ranges::greater&> : true_type {};
#endif
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3

template <class _Compare, class _Iter, class _Tp = typename iterator_traits<_Iter>::value_type>
using __use_branchless_sort =
    integral_constant<bool, __libcpp_is_contiguous_iterator<_Iter>::value && sizeof(_Tp) <= sizeof(void*) &&
                                is_arithmetic<_Tp>::value && __is_simple_comparator<_Compare>::value>;

namespace __detail {

// Size in bits for the bitset in use.
enum { __block_size = sizeof(uint64_t) * 8 };

} // namespace __detail

// Ensures that __c(*__x, *__y) is true by swapping *__x and *__y if necessary.
template <class _Compare, class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI void __cond_swap(_RandomAccessIterator __x, _RandomAccessIterator __y, _Compare __c) {
  // Note: this function behaves correctly even with proxy iterators (because it relies on `value_type`).
  using value_type = typename iterator_traits<_RandomAccessIterator>::value_type;
  bool __r = __c(*__x, *__y);
  value_type __tmp = __r ? *__x : *__y;
  *__y = __r ? *__y : *__x;
  *__x = __tmp;
}

// Ensures that *__x, *__y and *__z are ordered according to the comparator __c,
// under the assumption that *__y and *__z are already ordered.
template <class _Compare, class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI void __partially_sorted_swap(_RandomAccessIterator __x, _RandomAccessIterator __y,
                                                          _RandomAccessIterator __z, _Compare __c) {
  // Note: this function behaves correctly even with proxy iterators (because it relies on `value_type`).
  using value_type = typename iterator_traits<_RandomAccessIterator>::value_type;
  bool __r = __c(*__z, *__x);
  value_type __tmp = __r ? *__z : *__x;
  *__z = __r ? *__x : *__z;
  __r = __c(__tmp, *__y);
  *__x = __r ? *__x : *__y;
  *__y = __r ? *__y : __tmp;
}

template <class, class _Compare, class _RandomAccessIterator,
          __enable_if_t<__use_branchless_sort<_Compare, _RandomAccessIterator>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI void
__sort3_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2, _RandomAccessIterator __x3,
                         _Compare __c) {
  std::__cond_swap<_Compare>(__x2, __x3, __c);
  std::__partially_sorted_swap<_Compare>(__x1, __x2, __x3, __c);
}

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator,
          __enable_if_t<!__use_branchless_sort<_Compare, _RandomAccessIterator>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI void
__sort3_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2, _RandomAccessIterator __x3,
                         _Compare __c) {
  std::__sort3<_AlgPolicy, _Compare>(__x1, __x2, __x3, __c);
}

template <class, class _Compare, class _RandomAccessIterator,
          __enable_if_t<__use_branchless_sort<_Compare, _RandomAccessIterator>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI void
__sort4_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2, _RandomAccessIterator __x3,
                         _RandomAccessIterator __x4, _Compare __c) {
  std::__cond_swap<_Compare>(__x1, __x3, __c);
  std::__cond_swap<_Compare>(__x2, __x4, __c);
  std::__cond_swap<_Compare>(__x1, __x2, __c);
  std::__cond_swap<_Compare>(__x3, __x4, __c);
  std::__cond_swap<_Compare>(__x2, __x3, __c);
}

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator,
          __enable_if_t<!__use_branchless_sort<_Compare, _RandomAccessIterator>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI void
__sort4_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2, _RandomAccessIterator __x3,
                         _RandomAccessIterator __x4, _Compare __c) {
  std::__sort4<_AlgPolicy, _Compare>(__x1, __x2, __x3, __x4, __c);
}

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator,
          __enable_if_t<__use_branchless_sort<_Compare, _RandomAccessIterator>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI void
__sort5_maybe_branchless(
    _RandomAccessIterator __x1,
    _RandomAccessIterator __x2,
    _RandomAccessIterator __x3,
    _RandomAccessIterator __x4,
    _RandomAccessIterator __x5,
    _Compare __c) {
  std::__cond_swap<_Compare>(__x1, __x2, __c);
  std::__cond_swap<_Compare>(__x4, __x5, __c);
  std::__partially_sorted_swap<_Compare>(__x3, __x4, __x5, __c);
  std::__cond_swap<_Compare>(__x2, __x5, __c);
  std::__partially_sorted_swap<_Compare>(__x1, __x3, __x4, __c);
  std::__partially_sorted_swap<_Compare>(__x2, __x3, __x4, __c);
}

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator,
          __enable_if_t<!__use_branchless_sort<_Compare, _RandomAccessIterator>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI void
__sort5_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2, _RandomAccessIterator __x3,
                         _RandomAccessIterator __x4, _RandomAccessIterator __x5, _Compare __c) {
  std::__sort5<_AlgPolicy, _Compare, _RandomAccessIterator>(
      std::move(__x1), std::move(__x2), std::move(__x3), std::move(__x4), std::move(__x5), __c);
}

// Assumes size > 0
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_SINCE_CXX14 void __selection_sort(_BidirectionalIterator __first, _BidirectionalIterator __last,
                                                    _Compare __comp) {
  _BidirectionalIterator __lm1 = __last;
  for (--__lm1; __first != __lm1; ++__first) {
    _BidirectionalIterator __i = std::__min_element<_Compare>(__first, __last, __comp);
    if (__i != __first)
      _IterOps<_AlgPolicy>::iter_swap(__first, __i);
  }
}

// Sort the iterator range [__first, __last) using the comparator __comp using
// the insertion sort algorithm.
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI
void __insertion_sort(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) {
  using _Ops = _IterOps<_AlgPolicy>;

  typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
  if (__first == __last)
    return;
  _BidirectionalIterator __i = __first;
  for (++__i; __i != __last; ++__i) {
    _BidirectionalIterator __j = __i;
    --__j;
    if (__comp(*__i, *__j)) {
      value_type __t(_Ops::__iter_move(__i));
      _BidirectionalIterator __k = __j;
      __j                        = __i;
      do {
        *__j = _Ops::__iter_move(__k);
        __j  = __k;
      } while (__j != __first && __comp(__t, *--__k));
      *__j = std::move(__t);
    }
  }
}

// Sort the iterator range [__first, __last) using the comparator __comp using
// the insertion sort algorithm.  Insertion sort has two loops, outer and inner.
// The implementation below has no bounds check (unguarded) for the inner loop.
// Assumes that there is an element in the position (__first - 1) and that each
// element in the input range is greater or equal to the element at __first - 1.
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI void
__insertion_sort_unguarded(_RandomAccessIterator const __first, _RandomAccessIterator __last, _Compare __comp) {
  using _Ops = _IterOps<_AlgPolicy>;
  typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
  typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type;
  if (__first == __last)
    return;
  const _RandomAccessIterator __leftmost = __first - difference_type(1); (void)__leftmost; // can be unused when assertions are disabled
  for (_RandomAccessIterator __i = __first + difference_type(1); __i != __last; ++__i) {
    _RandomAccessIterator __j = __i - difference_type(1);
    if (__comp(*__i, *__j)) {
      value_type __t(_Ops::__iter_move(__i));
      _RandomAccessIterator __k = __j;
      __j = __i;
      do {
        *__j = _Ops::__iter_move(__k);
        __j = __k;
        _LIBCPP_ASSERT_UNCATEGORIZED(
            __k != __leftmost,
            "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
      } while (__comp(__t, *--__k)); // No need for bounds check due to the assumption stated above.
      *__j = std::move(__t);
    }
  }
}

template <class _AlgPolicy, class _Comp, class _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI bool __insertion_sort_incomplete(
    _RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp) {
  using _Ops = _IterOps<_AlgPolicy>;

  typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
  switch (__last - __first) {
  case 0:
  case 1:
    return true;
  case 2:
    if (__comp(*--__last, *__first))
      _Ops::iter_swap(__first, __last);
    return true;
  case 3:
    std::__sort3_maybe_branchless<_AlgPolicy, _Comp>(__first, __first + difference_type(1), --__last, __comp);
    return true;
  case 4:
    std::__sort4_maybe_branchless<_AlgPolicy, _Comp>(
        __first, __first + difference_type(1), __first + difference_type(2), --__last, __comp);
    return true;
  case 5:
    std::__sort5_maybe_branchless<_AlgPolicy, _Comp>(
        __first, __first + difference_type(1), __first + difference_type(2), __first + difference_type(3),
        --__last, __comp);
    return true;
  }
  typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type;
  _RandomAccessIterator __j = __first + difference_type(2);
  std::__sort3_maybe_branchless<_AlgPolicy, _Comp>(__first, __first + difference_type(1), __j, __comp);
  const unsigned __limit = 8;
  unsigned __count = 0;
  for (_RandomAccessIterator __i = __j + difference_type(1); __i != __last; ++__i) {
    if (__comp(*__i, *__j)) {
      value_type __t(_Ops::__iter_move(__i));
      _RandomAccessIterator __k = __j;
      __j = __i;
      do {
        *__j = _Ops::__iter_move(__k);
        __j = __k;
      } while (__j != __first && __comp(__t, *--__k));
      *__j = std::move(__t);
      if (++__count == __limit)
        return ++__i == __last;
    }
    __j = __i;
  }
  return true;
}

template <class _AlgPolicy, class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI void __swap_bitmap_pos(
    _RandomAccessIterator __first, _RandomAccessIterator __last, uint64_t& __left_bitset, uint64_t& __right_bitset) {
  using _Ops = _IterOps<_AlgPolicy>;
  typedef typename std::iterator_traits<_RandomAccessIterator>::difference_type difference_type;
  // Swap one pair on each iteration as long as both bitsets have at least one
  // element for swapping.
  while (__left_bitset != 0 && __right_bitset != 0) {
    difference_type __tz_left  = __libcpp_ctz(__left_bitset);
    __left_bitset              = __libcpp_blsr(__left_bitset);
    difference_type __tz_right = __libcpp_ctz(__right_bitset);
    __right_bitset             = __libcpp_blsr(__right_bitset);
    _Ops::iter_swap(__first + __tz_left, __last - __tz_right);
  }
}

template <class _Compare,
          class _RandomAccessIterator,
          class _ValueType = typename iterator_traits<_RandomAccessIterator>::value_type>
inline _LIBCPP_HIDE_FROM_ABI void
__populate_left_bitset(_RandomAccessIterator __first, _Compare __comp, _ValueType& __pivot, uint64_t& __left_bitset) {
  // Possible vectorization. With a proper "-march" flag, the following loop
  // will be compiled into a set of SIMD instructions.
  _RandomAccessIterator __iter = __first;
  for (int __j = 0; __j < __detail::__block_size;) {
    bool __comp_result = !__comp(*__iter, __pivot);
    __left_bitset |= (static_cast<uint64_t>(__comp_result) << __j);
    __j++;
    ++__iter;
  }
}

template <class _Compare,
          class _RandomAccessIterator,
          class _ValueType = typename iterator_traits<_RandomAccessIterator>::value_type>
inline _LIBCPP_HIDE_FROM_ABI void
__populate_right_bitset(_RandomAccessIterator __lm1, _Compare __comp, _ValueType& __pivot, uint64_t& __right_bitset) {
  // Possible vectorization. With a proper "-march" flag, the following loop
  // will be compiled into a set of SIMD instructions.
  _RandomAccessIterator __iter = __lm1;
  for (int __j = 0; __j < __detail::__block_size;) {
    bool __comp_result = __comp(*__iter, __pivot);
    __right_bitset |= (static_cast<uint64_t>(__comp_result) << __j);
    __j++;
    --__iter;
  }
}

template <class _AlgPolicy,
          class _Compare,
          class _RandomAccessIterator,
          class _ValueType = typename iterator_traits<_RandomAccessIterator>::value_type>
inline _LIBCPP_HIDE_FROM_ABI void __bitset_partition_partial_blocks(
    _RandomAccessIterator& __first,
    _RandomAccessIterator& __lm1,
    _Compare __comp,
    _ValueType& __pivot,
    uint64_t& __left_bitset,
    uint64_t& __right_bitset) {
  typedef typename std::iterator_traits<_RandomAccessIterator>::difference_type difference_type;
  difference_type __remaining_len = __lm1 - __first + 1;
  difference_type __l_size;
  difference_type __r_size;
  if (__left_bitset == 0 && __right_bitset == 0) {
    __l_size = __remaining_len / 2;
    __r_size = __remaining_len - __l_size;
  } else if (__left_bitset == 0) {
    // We know at least one side is a full block.
    __l_size = __remaining_len - __detail::__block_size;
    __r_size = __detail::__block_size;
  } else { // if (__right_bitset == 0)
    __l_size = __detail::__block_size;
    __r_size = __remaining_len - __detail::__block_size;
  }
  // Record the comparison outcomes for the elements currently on the left side.
  if (__left_bitset == 0) {
    _RandomAccessIterator __iter = __first;
    for (int __j = 0; __j < __l_size; __j++) {
      bool __comp_result = !__comp(*__iter, __pivot);
      __left_bitset |= (static_cast<uint64_t>(__comp_result) << __j);
      ++__iter;
    }
  }
  // Record the comparison outcomes for the elements currently on the right
  // side.
  if (__right_bitset == 0) {
    _RandomAccessIterator __iter = __lm1;
    for (int __j = 0; __j < __r_size; __j++) {
      bool __comp_result = __comp(*__iter, __pivot);
      __right_bitset |= (static_cast<uint64_t>(__comp_result) << __j);
      --__iter;
    }
  }
  std::__swap_bitmap_pos<_AlgPolicy, _RandomAccessIterator>(__first, __lm1, __left_bitset, __right_bitset);
  __first += (__left_bitset == 0) ? __l_size : 0;
  __lm1 -= (__right_bitset == 0) ? __r_size : 0;
}

template <class _AlgPolicy, class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI void __swap_bitmap_pos_within(
    _RandomAccessIterator& __first, _RandomAccessIterator& __lm1, uint64_t& __left_bitset, uint64_t& __right_bitset) {
  using _Ops = _IterOps<_AlgPolicy>;
  typedef typename std::iterator_traits<_RandomAccessIterator>::difference_type difference_type;
  if (__left_bitset) {
    // Swap within the left side.  Need to find set positions in the reverse
    // order.
    while (__left_bitset != 0) {
      difference_type __tz_left = __detail::__block_size - 1 - __libcpp_clz(__left_bitset);
      __left_bitset &= (static_cast<uint64_t>(1) << __tz_left) - 1;
      _RandomAccessIterator __it = __first + __tz_left;
      if (__it != __lm1) {
        _Ops::iter_swap(__it, __lm1);
      }
      --__lm1;
    }
    __first = __lm1 + difference_type(1);
  } else if (__right_bitset) {
    // Swap within the right side.  Need to find set positions in the reverse
    // order.
    while (__right_bitset != 0) {
      difference_type __tz_right = __detail::__block_size - 1 - __libcpp_clz(__right_bitset);
      __right_bitset &= (static_cast<uint64_t>(1) << __tz_right) - 1;
      _RandomAccessIterator __it = __lm1 - __tz_right;
      if (__it != __first) {
        _Ops::iter_swap(__it, __first);
      }
      ++__first;
    }
  }
}

// Partition [__first, __last) using the comparator __comp.  *__first has the
// chosen pivot.  Elements that are equivalent are kept to the left of the
// pivot.  Returns the iterator for the pivot and a bool value which is true if
// the provided range is already sorted, false otherwise.  We assume that the
// length of the range is at least three elements.
//
// __bitset_partition uses bitsets for storing outcomes of the comparisons
// between the pivot and other elements.
template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
_LIBCPP_HIDE_FROM_ABI std::pair<_RandomAccessIterator, bool>
__bitset_partition(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
  using _Ops = _IterOps<_AlgPolicy>;
  typedef typename std::iterator_traits<_RandomAccessIterator>::value_type value_type;
  typedef typename std::iterator_traits<_RandomAccessIterator>::difference_type difference_type;
  _LIBCPP_ASSERT_UNCATEGORIZED(__last - __first >= difference_type(3), "");
  const _RandomAccessIterator __begin = __first;            // used for bounds checking, those are not moved around
  const _RandomAccessIterator __end = __last; (void)__end;  //

  value_type __pivot(_Ops::__iter_move(__first));
  // Find the first element greater than the pivot.
  if (__comp(__pivot, *(__last - difference_type(1)))) {
    // Not guarded since we know the last element is greater than the pivot.
    do {
      ++__first;
      _LIBCPP_ASSERT_UNCATEGORIZED(
          __first != __end,
          "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
    } while (!__comp(__pivot, *__first));
  } else {
    while (++__first < __last && !__comp(__pivot, *__first)) {
    }
  }
  // Find the last element less than or equal to the pivot.
  if (__first < __last) {
    // It will be always guarded because __introsort will do the median-of-three
    // before calling this.
    do {
      _LIBCPP_ASSERT_UNCATEGORIZED(
          __last != __begin,
          "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
      --__last;
    } while (__comp(__pivot, *__last));
  }
  // If the first element greater than the pivot is at or after the
  // last element less than or equal to the pivot, then we have covered the
  // entire range without swapping elements.  This implies the range is already
  // partitioned.
  bool __already_partitioned = __first >= __last;
  if (!__already_partitioned) {
    _Ops::iter_swap(__first, __last);
    ++__first;
  }

  // In [__first, __last) __last is not inclusive. From now on, it uses last
  // minus one to be inclusive on both sides.
  _RandomAccessIterator __lm1 = __last - difference_type(1);
  uint64_t __left_bitset      = 0;
  uint64_t __right_bitset     = 0;

  // Reminder: length = __lm1 - __first + 1.
  while (__lm1 - __first >= 2 * __detail::__block_size - 1) {
    // Record the comparison outcomes for the elements currently on the left
    // side.
    if (__left_bitset == 0)
      std::__populate_left_bitset<_Compare>(__first, __comp, __pivot, __left_bitset);
    // Record the comparison outcomes for the elements currently on the right
    // side.
    if (__right_bitset == 0)
      std::__populate_right_bitset<_Compare>(__lm1, __comp, __pivot, __right_bitset);
    // Swap the elements recorded to be the candidates for swapping in the
    // bitsets.
    std::__swap_bitmap_pos<_AlgPolicy, _RandomAccessIterator>(__first, __lm1, __left_bitset, __right_bitset);
    // Only advance the iterator if all the elements that need to be moved to
    // other side were moved.
    __first += (__left_bitset == 0) ? difference_type(__detail::__block_size) : difference_type(0);
    __lm1 -= (__right_bitset == 0) ? difference_type(__detail::__block_size) : difference_type(0);
  }
  // Now, we have a less-than a block worth of elements on at least one of the
  // sides.
  std::__bitset_partition_partial_blocks<_AlgPolicy, _Compare>(
      __first, __lm1, __comp, __pivot, __left_bitset, __right_bitset);
  // At least one the bitsets would be empty.  For the non-empty one, we need to
  // properly partition the elements that appear within that bitset.
  std::__swap_bitmap_pos_within<_AlgPolicy>(__first, __lm1, __left_bitset, __right_bitset);

  // Move the pivot to its correct position.
  _RandomAccessIterator __pivot_pos = __first - difference_type(1);
  if (__begin != __pivot_pos) {
    *__begin = _Ops::__iter_move(__pivot_pos);
  }
  *__pivot_pos = std::move(__pivot);
  return std::make_pair(__pivot_pos, __already_partitioned);
}

// Partition [__first, __last) using the comparator __comp.  *__first has the
// chosen pivot.  Elements that are equivalent are kept to the right of the
// pivot.  Returns the iterator for the pivot and a bool value which is true if
// the provided range is already sorted, false otherwise.  We assume that the
// length of the range is at least three elements.
template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
_LIBCPP_HIDE_FROM_ABI std::pair<_RandomAccessIterator, bool>
__partition_with_equals_on_right(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
  using _Ops = _IterOps<_AlgPolicy>;
  typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
  typedef typename std::iterator_traits<_RandomAccessIterator>::value_type value_type;
  _LIBCPP_ASSERT_UNCATEGORIZED(__last - __first >= difference_type(3), "");
  const _RandomAccessIterator __begin = __first;            // used for bounds checking, those are not moved around
  const _RandomAccessIterator __end = __last; (void)__end;  //
  value_type __pivot(_Ops::__iter_move(__first));
  // Find the first element greater or equal to the pivot.  It will be always
  // guarded because __introsort will do the median-of-three before calling
  // this.
  do {
    ++__first;
    _LIBCPP_ASSERT_UNCATEGORIZED(
        __first != __end,
        "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
  } while (__comp(*__first, __pivot));

  // Find the last element less than the pivot.
  if (__begin == __first - difference_type(1)) {
    while (__first < __last && !__comp(*--__last, __pivot))
      ;
  } else {
    // Guarded.
    do {
      _LIBCPP_ASSERT_UNCATEGORIZED(
          __last != __begin,
          "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
      --__last;
    } while (!__comp(*__last, __pivot));
  }

  // If the first element greater than or equal to the pivot is at or after the
  // last element less than the pivot, then we have covered the entire range
  // without swapping elements.  This implies the range is already partitioned.
  bool __already_partitioned = __first >= __last;
  // Go through the remaining elements.  Swap pairs of elements (one to the
  // right of the pivot and the other to left of the pivot) that are not on the
  // correct side of the pivot.
  while (__first < __last) {
    _Ops::iter_swap(__first, __last);
    do {
      ++__first;
      _LIBCPP_ASSERT_UNCATEGORIZED(
          __first != __end,
          "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
    } while (__comp(*__first, __pivot));
    do {
      _LIBCPP_ASSERT_UNCATEGORIZED(
          __last != __begin,
          "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
      --__last;
    } while (!__comp(*__last, __pivot));
  }
  // Move the pivot to its correct position.
  _RandomAccessIterator __pivot_pos = __first - difference_type(1);
  if (__begin != __pivot_pos) {
    *__begin = _Ops::__iter_move(__pivot_pos);
  }
  *__pivot_pos = std::move(__pivot);
  return std::make_pair(__pivot_pos, __already_partitioned);
}

// Similar to the above function.  Elements equivalent to the pivot are put to
// the left of the pivot.  Returns the iterator to the pivot element.
template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
_LIBCPP_HIDE_FROM_ABI _RandomAccessIterator
__partition_with_equals_on_left(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
  using _Ops = _IterOps<_AlgPolicy>;
  typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
  typedef typename std::iterator_traits<_RandomAccessIterator>::value_type value_type;
  // TODO(LLVM18): Make __begin const, see https://reviews.llvm.org/D147089#4349748
  _RandomAccessIterator __begin = __first;                  // used for bounds checking, those are not moved around
  const _RandomAccessIterator __end = __last; (void)__end;  //
  value_type __pivot(_Ops::__iter_move(__first));
  if (__comp(__pivot, *(__last - difference_type(1)))) {
    // Guarded.
    do {
      ++__first;
      _LIBCPP_ASSERT_UNCATEGORIZED(
          __first != __end,
          "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
    } while (!__comp(__pivot, *__first));
  } else {
    while (++__first < __last && !__comp(__pivot, *__first)) {
    }
  }

  if (__first < __last) {
    // It will be always guarded because __introsort will do the
    // median-of-three before calling this.
    do {
      _LIBCPP_ASSERT_UNCATEGORIZED(
          __last != __begin,
          "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
      --__last;
    } while (__comp(__pivot, *__last));
  }
  while (__first < __last) {
    _Ops::iter_swap(__first, __last);
    do {
      ++__first;
      _LIBCPP_ASSERT_UNCATEGORIZED(
          __first != __end,
          "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
    } while (!__comp(__pivot, *__first));
    do {
      _LIBCPP_ASSERT_UNCATEGORIZED(
          __last != __begin,
          "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
      --__last;
    } while (__comp(__pivot, *__last));
  }
  _RandomAccessIterator __pivot_pos = __first - difference_type(1);
  if (__begin != __pivot_pos) {
    *__begin = _Ops::__iter_move(__pivot_pos);
  }
  *__pivot_pos = std::move(__pivot);
  return __first;
}

// The main sorting function.  Implements introsort combined with other ideas:
//  - option of using block quick sort for partitioning,
//  - guarded and unguarded insertion sort for small lengths,
//  - Tuckey's ninther technique for computing the pivot,
//  - check on whether partition was not required.
// The implementation is partly based on Orson Peters' pattern-defeating
// quicksort, published at: <https://github.com/orlp/pdqsort>.
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, bool _UseBitSetPartition>
void __introsort(_RandomAccessIterator __first,
                 _RandomAccessIterator __last,
                 _Compare __comp,
                 typename iterator_traits<_RandomAccessIterator>::difference_type __depth,
                 bool __leftmost = true) {
  using _Ops = _IterOps<_AlgPolicy>;
  typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
  using _Comp_ref = __comp_ref_type<_Compare>;
  // Upper bound for using insertion sort for sorting.
  _LIBCPP_CONSTEXPR difference_type __limit = 24;
  // Lower bound for using Tuckey's ninther technique for median computation.
  _LIBCPP_CONSTEXPR difference_type __ninther_threshold = 128;
  while (true) {
    difference_type __len = __last - __first;
    switch (__len) {
    case 0:
    case 1:
      return;
    case 2:
      if (__comp(*--__last, *__first))
        _Ops::iter_swap(__first, __last);
      return;
    case 3:
      std::__sort3_maybe_branchless<_AlgPolicy, _Compare>(__first, __first + difference_type(1), --__last, __comp);
      return;
    case 4:
      std::__sort4_maybe_branchless<_AlgPolicy, _Compare>(
          __first, __first + difference_type(1), __first + difference_type(2), --__last, __comp);
      return;
    case 5:
      std::__sort5_maybe_branchless<_AlgPolicy, _Compare>(
          __first, __first + difference_type(1), __first + difference_type(2), __first + difference_type(3),
          --__last, __comp);
      return;
    }
    // Use insertion sort if the length of the range is below the specified limit.
    if (__len < __limit) {
      if (__leftmost) {
        std::__insertion_sort<_AlgPolicy, _Compare>(__first, __last, __comp);
      } else {
        std::__insertion_sort_unguarded<_AlgPolicy, _Compare>(__first, __last, __comp);
      }
      return;
    }
    if (__depth == 0) {
      // Fallback to heap sort as Introsort suggests.
      std::__partial_sort<_AlgPolicy, _Compare>(__first, __last, __last, __comp);
      return;
    }
    --__depth;
    {
      difference_type __half_len = __len / 2;
      // Use Tuckey's ninther technique or median of 3 for pivot selection
      // depending on the length of the range being sorted.
      if (__len > __ninther_threshold) {
        std::__sort3<_AlgPolicy, _Compare>(__first, __first + __half_len, __last - difference_type(1), __comp);
        std::__sort3<_AlgPolicy, _Compare>(
            __first + difference_type(1), __first + (__half_len - 1), __last - difference_type(2), __comp);
        std::__sort3<_AlgPolicy, _Compare>(
            __first + difference_type(2), __first + (__half_len + 1), __last - difference_type(3), __comp);
        std::__sort3<_AlgPolicy, _Compare>(
            __first + (__half_len - 1), __first + __half_len, __first + (__half_len + 1), __comp);
        _Ops::iter_swap(__first, __first + __half_len);
      } else {
        std::__sort3<_AlgPolicy, _Compare>(__first + __half_len, __first, __last - difference_type(1), __comp);
      }
    }
    // The elements to the left of the current iterator range are already
    // sorted.  If the current iterator range to be sorted is not the
    // leftmost part of the entire iterator range and the pivot is same as
    // the highest element in the range to the left, then we know that all
    // the elements in the range [first, pivot] would be equal to the pivot,
    // assuming the equal elements are put on the left side when
    // partitioned.  This also means that we do not need to sort the left
    // side of the partition.
    if (!__leftmost && !__comp(*(__first - difference_type(1)), *__first)) {
      __first = std::__partition_with_equals_on_left<_AlgPolicy, _RandomAccessIterator, _Comp_ref>(
          __first, __last, _Comp_ref(__comp));
      continue;
    }
    // Use bitset partition only if asked for.
    auto __ret =
        _UseBitSetPartition
            ? std::__bitset_partition<_AlgPolicy, _RandomAccessIterator, _Compare>(__first, __last, __comp)
            : std::__partition_with_equals_on_right<_AlgPolicy, _RandomAccessIterator, _Compare>(__first, __last, __comp);
    _RandomAccessIterator __i = __ret.first;
    // [__first, __i) < *__i and *__i <= [__i+1, __last)
    // If we were given a perfect partition, see if insertion sort is quick...
    if (__ret.second) {
      bool __fs = std::__insertion_sort_incomplete<_AlgPolicy, _Compare>(__first, __i, __comp);
      if (std::__insertion_sort_incomplete<_AlgPolicy, _Compare>(__i + difference_type(1), __last, __comp)) {
        if (__fs)
          return;
        __last = __i;
        continue;
      } else {
        if (__fs) {
          __first = ++__i;
          continue;
        }
      }
    }
    // Sort the left partiton recursively and the right partition with tail recursion elimination.
    std::__introsort<_AlgPolicy, _Compare, _RandomAccessIterator, _UseBitSetPartition>(
        __first, __i, __comp, __depth, __leftmost);
    __leftmost = false;
    __first    = ++__i;
  }
}

template <typename _Number>
inline _LIBCPP_HIDE_FROM_ABI _Number __log2i(_Number __n) {
  if (__n == 0)
    return 0;
  if (sizeof(__n) <= sizeof(unsigned))
    return sizeof(unsigned) * CHAR_BIT - 1 - __libcpp_clz(static_cast<unsigned>(__n));
  if (sizeof(__n) <= sizeof(unsigned long))
    return sizeof(unsigned long) * CHAR_BIT - 1 - __libcpp_clz(static_cast<unsigned long>(__n));
  if (sizeof(__n) <= sizeof(unsigned long long))
    return sizeof(unsigned long long) * CHAR_BIT - 1 - __libcpp_clz(static_cast<unsigned long long>(__n));

  _Number __log2 = 0;
  while (__n > 1) {
    __log2++;
    __n >>= 1;
  }
  return __log2;
}

template <class _Comp, class _RandomAccessIterator>
void __sort(_RandomAccessIterator, _RandomAccessIterator, _Comp);

extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<char>&, char*>(char*, char*, __less<char>&);
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
#endif
# 861 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<signed char>&, signed char*>(signed char*, signed char*, __less<signed char>&);
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<unsigned char>&, unsigned char*>(unsigned char*, unsigned char*, __less<unsigned char>&);
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<short>&, short*>(short*, short*, __less<short>&);
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<unsigned short>&, unsigned short*>(unsigned short*, unsigned short*, __less<unsigned short>&);
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<int>&, int*>(int*, int*, __less<int>&);
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<unsigned>&, unsigned*>(unsigned*, unsigned*, __less<unsigned>&);
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<long>&, long*>(long*, long*, __less<long>&);
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<unsigned long>&, unsigned long*>(unsigned long*, unsigned long*, __less<unsigned long>&);
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<long long>&, long long*>(long long*, long long*, __less<long long>&);
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<unsigned long long>&, unsigned long long*>(unsigned long long*, unsigned long long*, __less<unsigned long long>&);
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<float>&, float*>(float*, float*, __less<float>&);
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<double>&, double*>(double*, double*, __less<double>&);
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<long double>&, long double*>(long double*, long double*, __less<long double>&);

template <class _AlgPolicy, class _RandomAccessIterator, class _Comp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
__sort_dispatch(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) {
  typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
  difference_type __depth_limit = 2 * std::__log2i(__last - __first);

  // Only use bitset partitioning for arithmetic types.  We should also check
  // that the default comparator is in use so that we are sure that there are no
  // branches in the comparator.
  std::__introsort<_AlgPolicy,
                   _Comp&,
                   _RandomAccessIterator,
                   __use_branchless_sort<_Comp, _RandomAccessIterator>::value>(
      __first, __last, __comp, __depth_limit);
}

template <class _Type, class... _Options>
using __is_any_of = _Or<is_same<_Type, _Options>...>;

template <class _Type>
using __sort_is_specialized_in_library = __is_any_of<
    _Type,
    char,
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
    wchar_t,
#endif
# 901 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
    signed char,
    unsigned char,
    short,
    unsigned short,
    int,
    unsigned int,
    long,
    unsigned long,
    long long,
    unsigned long long,
    float,
    double,
    long double>;

template <class _AlgPolicy, class _Type, __enable_if_t<__sort_is_specialized_in_library<_Type>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI void __sort_dispatch(_Type* __first, _Type* __last, __less<>&) {
  __less<_Type> __comp;
  std::__sort<__less<_Type>&, _Type*>(__first, __last, __comp);
}

template <class _AlgPolicy, class _Type, __enable_if_t<__sort_is_specialized_in_library<_Type>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI void __sort_dispatch(_Type* __first, _Type* __last, less<_Type>&) {
  __less<_Type> __comp;
  std::__sort<__less<_Type>&, _Type*>(__first, __last, __comp);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 928 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
template <class _AlgPolicy, class _Type, __enable_if_t<__sort_is_specialized_in_library<_Type>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI void __sort_dispatch(_Type* __first, _Type* __last, less<>&) {
  __less<_Type> __comp;
  std::__sort<__less<_Type>&, _Type*>(__first, __last, __comp);
}
#endif
# 934 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 936 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
template <class _AlgPolicy, class _Type, __enable_if_t<__sort_is_specialized_in_library<_Type>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI void __sort_dispatch(_Type* __first, _Type* __last, ranges::less&) {
  __less<_Type> __comp;
  std::__sort<__less<_Type>&, _Type*>(__first, __last, __comp);
}
#endif
# 942 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3

template <class _AlgPolicy, class _RandomAccessIterator, class _Comp>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) {
  std::__debug_randomize_range<_AlgPolicy>(__first, __last);

  if (__libcpp_is_constant_evaluated()) {
    std::__partial_sort<_AlgPolicy>(
        std::__unwrap_iter(__first), std::__unwrap_iter(__last), std::__unwrap_iter(__last), __comp);
  } else {
    std::__sort_dispatch<_AlgPolicy>(std::__unwrap_iter(__first), std::__unwrap_iter(__last), __comp);
  }
  std::__check_strict_weak_ordering_sorted(std::__unwrap_iter(__first), std::__unwrap_iter(__last), __comp);
}

template <class _RandomAccessIterator, class _Comp>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp) {
  std::__sort_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
}

template <class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void sort(_RandomAccessIterator __first, _RandomAccessIterator __last) {
  std::sort(__first, __last, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_SORT_H
# 972 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sort.h" 3
#endif /* sort.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__debug_utils/randomize_range.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template<class _Compare, class _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
__nth_element_find_guard(_RandomAccessIterator& __i, _RandomAccessIterator& __j,
                         _RandomAccessIterator __m, _Compare __comp)
{
    // manually guard downward moving __j against __i
    while (true) {
        if (__i == --__j) {
            return false;
        }
        if (__comp(*__j, *__m)) {
            return true;  // found guard for downward moving __j, now use unguarded partition
        }
    }
}

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
__nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp)
{
    using _Ops = _IterOps<_AlgPolicy>;

    // _Compare is known to be a reference type
    typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
    const difference_type __limit = 7;
    while (true)
    {
        if (__nth == __last)
            return;
        difference_type __len = __last - __first;
        switch (__len)
        {
        case 0:
        case 1:
            return;
        case 2:
            if (__comp(*--__last, *__first))
                _Ops::iter_swap(__first, __last);
            return;
        case 3:
            {
            _RandomAccessIterator __m = __first;
            std::__sort3<_AlgPolicy, _Compare>(__first, ++__m, --__last, __comp);
            return;
            }
        }
        if (__len <= __limit)
        {
            std::__selection_sort<_AlgPolicy, _Compare>(__first, __last, __comp);
            return;
        }
        // __len > __limit >= 3
        _RandomAccessIterator __m = __first + __len/2;
        _RandomAccessIterator __lm1 = __last;
        unsigned __n_swaps = std::__sort3<_AlgPolicy, _Compare>(__first, __m, --__lm1, __comp);
        // *__m is median
        // partition [__first, __m) < *__m and *__m <= [__m, __last)
        // (this inhibits tossing elements equivalent to __m around unnecessarily)
        _RandomAccessIterator __i = __first;
        _RandomAccessIterator __j = __lm1;
        // j points beyond range to be tested, *__lm1 is known to be <= *__m
        // The search going up is known to be guarded but the search coming down isn't.
        // Prime the downward search with a guard.
        if (!__comp(*__i, *__m))  // if *__first == *__m
        {
            // *__first == *__m, *__first doesn't go in first part
            if (_VSTD::__nth_element_find_guard<_Compare>(__i, __j, __m, __comp)) {
                _Ops::iter_swap(__i, __j);
                ++__n_swaps;
            } else {
                // *__first == *__m, *__m <= all other elements
                // Partition instead into [__first, __i) == *__first and *__first < [__i, __last)
                ++__i;  // __first + 1
                __j = __last;
                if (!__comp(*__first, *--__j)) {  // we need a guard if *__first == *(__last-1)
                    while (true) {
                        if (__i == __j) {
                            return;  // [__first, __last) all equivalent elements
                        } else if (__comp(*__first, *__i)) {
                            _Ops::iter_swap(__i, __j);
                            ++__n_swaps;
                            ++__i;
                            break;
                        }
                        ++__i;
                    }
                }
                // [__first, __i) == *__first and *__first < [__j, __last) and __j == __last - 1
                if (__i == __j) {
                    return;
                }
                while (true) {
                    while (!__comp(*__first, *__i))
                        ++__i;
                    while (__comp(*__first, *--__j))
                        ;
                    if (__i >= __j)
                        break;
                    _Ops::iter_swap(__i, __j);
                    ++__n_swaps;
                    ++__i;
                }
                // [__first, __i) == *__first and *__first < [__i, __last)
                // The first part is sorted,
                if (__nth < __i) {
                    return;
                }
                // __nth_element the second part
                // _VSTD::__nth_element<_Compare>(__i, __nth, __last, __comp);
                __first = __i;
                continue;
            }
        }
        ++__i;
        // j points beyond range to be tested, *__lm1 is known to be <= *__m
        // if not yet partitioned...
        if (__i < __j)
        {
            // known that *(__i - 1) < *__m
            while (true)
            {
                // __m still guards upward moving __i
                while (__comp(*__i, *__m))
                    ++__i;
                // It is now known that a guard exists for downward moving __j
                while (!__comp(*--__j, *__m))
                    ;
                if (__i >= __j)
                    break;
                _Ops::iter_swap(__i, __j);
                ++__n_swaps;
                // It is known that __m != __j
                // If __m just moved, follow it
                if (__m == __i)
                    __m = __j;
                ++__i;
            }
        }
        // [__first, __i) < *__m and *__m <= [__i, __last)
        if (__i != __m && __comp(*__m, *__i))
        {
            _Ops::iter_swap(__i, __m);
            ++__n_swaps;
        }
        // [__first, __i) < *__i and *__i <= [__i+1, __last)
        if (__nth == __i)
            return;
        if (__n_swaps == 0)
        {
            // We were given a perfectly partitioned sequence.  Coincidence?
            if (__nth < __i)
            {
                // Check for [__first, __i) already sorted
                __j = __m = __first;
                while (true) {
                    if (++__j == __i) {
                        // [__first, __i) sorted
                        return;
                    }
                    if (__comp(*__j, *__m)) {
                        // not yet sorted, so sort
                        break;
                    }
                    __m = __j;
                }
            }
            else
            {
                // Check for [__i, __last) already sorted
                __j = __m = __i;
                while (true) {
                    if (++__j == __last) {
                        // [__i, __last) sorted
                        return;
                    }
                    if (__comp(*__j, *__m)) {
                        // not yet sorted, so sort
                        break;
                    }
                    __m = __j;
                }
            }
        }
        // __nth_element on range containing __nth
        if (__nth < __i)
        {
            // _VSTD::__nth_element<_Compare>(__first, __nth, __i, __comp);
            __last = __i;
        }
        else
        {
            // _VSTD::__nth_element<_Compare>(__i+1, __nth, __last, __comp);
            __first = ++__i;
        }
    }
}

template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __nth_element_impl(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last,
                        _Compare& __comp) {
  if (__nth == __last)
    return;

  std::__debug_randomize_range<_AlgPolicy>(__first, __last);

  std::__nth_element<_AlgPolicy, __comp_ref_type<_Compare> >(__first, __nth, __last, __comp);

  std::__debug_randomize_range<_AlgPolicy>(__first, __nth);
  if (__nth != __last) {
    std::__debug_randomize_range<_AlgPolicy>(++__nth, __last);
  }
}

template <class _RandomAccessIterator, class _Compare>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last,
                 _Compare __comp) {
  std::__nth_element_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__nth), std::move(__last), __comp);
}

template <class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last) {
  std::nth_element(std::move(__first), std::move(__nth), std::move(__last), __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_NTH_ELEMENT_H
# 257 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/nth_element.h" 3
#endif /* nth_element.h expanded by -frewrite-includes */
# 1820 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/partial_sort.h>
#endif /* expanded by -frewrite-includes */
# 1820 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1821 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* partial_sort_copy.h expanded by -frewrite-includes */
#include <__algorithm/partial_sort_copy.h>
#else /* partial_sort_copy.h expanded by -frewrite-includes */
# 1821 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PARTIAL_SORT_COPY_H
#define _LIBCPP___ALGORITHM_PARTIAL_SORT_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_heap.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* make_projected.h expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#else /* make_projected.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_MAKE_PROJECTED_H
#define _LIBCPP___ALGORITHM_MAKE_PROJECTED_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_member_pointer.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Pred, class _Proj>
struct _ProjectedPred {
  _Pred& __pred; // Can be a unary or a binary predicate.
  _Proj& __proj;

  _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI _ProjectedPred(_Pred& __pred_arg, _Proj& __proj_arg)
      : __pred(__pred_arg), __proj(__proj_arg) {}

  template <class _Tp>
  typename __invoke_of<_Pred&,
                       decltype(std::__invoke(std::declval<_Proj&>(), std::declval<_Tp>()))
  >::type
  _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI operator()(_Tp&& __v) const {
    return std::__invoke(__pred, std::__invoke(__proj, std::forward<_Tp>(__v)));
  }

  template <class _T1, class _T2>
  typename __invoke_of<_Pred&,
                       decltype(std::__invoke(std::declval<_Proj&>(), std::declval<_T1>())),
                       decltype(std::__invoke(std::declval<_Proj&>(), std::declval<_T2>()))
  >::type
  _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI operator()(_T1&& __lhs, _T2&& __rhs) const {
    return std::__invoke(__pred,
                      std::__invoke(__proj, std::forward<_T1>(__lhs)),
                      std::__invoke(__proj, std::forward<_T2>(__rhs)));
  }

};

template <class _Pred,
          class _Proj,
          __enable_if_t<!(!is_member_pointer<__decay_t<_Pred> >::value &&
                            __is_identity<__decay_t<_Proj> >::value),
                        int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ProjectedPred<_Pred, _Proj>
__make_projected(_Pred& __pred, _Proj& __proj) {
  return _ProjectedPred<_Pred, _Proj>(__pred, __proj);
}

// Avoid creating the functor and just use the pristine comparator -- for certain algorithms, this would enable
// optimizations that rely on the type of the comparator. Additionally, this results in less layers of indirection in
// the call stack when the comparator is invoked, even in an unoptimized build.
template <class _Pred,
          class _Proj,
          __enable_if_t<!is_member_pointer<__decay_t<_Pred> >::value &&
                          __is_identity<__decay_t<_Proj> >::value,
                        int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Pred& __make_projected(_Pred& __pred, _Proj&) {
  return __pred;
}

_LIBCPP_END_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _Comp, class _Proj1, class _Proj2>
_LIBCPP_HIDE_FROM_ABI constexpr
decltype(auto) __make_projected_comp(_Comp& __comp, _Proj1& __proj1, _Proj2& __proj2) {
  if constexpr (__is_identity<decay_t<_Proj1>>::value && __is_identity<decay_t<_Proj2>>::value &&
                !is_member_pointer_v<decay_t<_Comp>>) {
    // Avoid creating the lambda and just use the pristine comparator -- for certain algorithms, this would enable
    // optimizations that rely on the type of the comparator.
    return __comp;

  } else {
    return [&](auto&& __lhs, auto&& __rhs) {
      return std::invoke(__comp,
                        std::invoke(__proj1, std::forward<decltype(__lhs)>(__lhs)),
                        std::invoke(__proj2, std::forward<decltype(__rhs)>(__rhs)));
    };
  }
}

} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3

#endif // _LIBCPP___ALGORITHM_MAKE_PROJECTED_H
# 114 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/make_projected.h" 3
#endif /* make_projected.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/sift_down.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/sort_heap.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_callable.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare,
          class _InputIterator, class _Sentinel1, class _RandomAccessIterator, class _Sentinel2,
          class _Proj1, class _Proj2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InputIterator, _RandomAccessIterator>
__partial_sort_copy(_InputIterator __first, _Sentinel1 __last,
                    _RandomAccessIterator __result_first, _Sentinel2 __result_last,
                    _Compare&& __comp, _Proj1&& __proj1, _Proj2&& __proj2)
{
    _RandomAccessIterator __r = __result_first;
    auto&& __projected_comp = std::__make_projected(__comp, __proj2);

    if (__r != __result_last)
    {
        for (; __first != __last && __r != __result_last; ++__first, (void) ++__r)
            *__r = *__first;
        std::__make_heap<_AlgPolicy>(__result_first, __r, __projected_comp);
        typename iterator_traits<_RandomAccessIterator>::difference_type __len = __r - __result_first;
        for (; __first != __last; ++__first)
            if (std::__invoke(__comp, std::__invoke(__proj1, *__first), std::__invoke(__proj2, *__result_first))) {
                *__result_first = *__first;
                std::__sift_down<_AlgPolicy>(__result_first, __projected_comp, __len, __result_first);
            }
        std::__sort_heap<_AlgPolicy>(__result_first, __r, __projected_comp);
    }

    return pair<_InputIterator, _RandomAccessIterator>(
        _IterOps<_AlgPolicy>::next(std::move(__first), std::move(__last)), std::move(__r));
}

template <class _InputIterator, class _RandomAccessIterator, class _Compare>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_RandomAccessIterator
partial_sort_copy(_InputIterator __first, _InputIterator __last,
                  _RandomAccessIterator __result_first, _RandomAccessIterator __result_last, _Compare __comp)
{
  static_assert(__is_callable<_Compare, decltype(*__first), decltype(*__result_first)>::value,
                "Comparator has to be callable");

  auto __result = std::__partial_sort_copy<_ClassicAlgPolicy>(__first, __last, __result_first, __result_last,
      static_cast<__comp_ref_type<_Compare> >(__comp), __identity(), __identity());
  return __result.second;
}

template <class _InputIterator, class _RandomAccessIterator>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_RandomAccessIterator
partial_sort_copy(_InputIterator __first, _InputIterator __last,
                  _RandomAccessIterator __result_first, _RandomAccessIterator __result_last)
{
    return _VSTD::partial_sort_copy(__first, __last, __result_first, __result_last, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_PARTIAL_SORT_COPY_H
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partial_sort_copy.h" 3
#endif /* partial_sort_copy.h expanded by -frewrite-includes */
# 1822 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* partition.h expanded by -frewrite-includes */
#include <__algorithm/partition.h>
#else /* partition.h expanded by -frewrite-includes */
# 1822 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PARTITION_H
#define _LIBCPP___ALGORITHM_PARTITION_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Predicate, class _AlgPolicy, class _ForwardIterator, class _Sentinel>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator, _ForwardIterator>
__partition_impl(_ForwardIterator __first, _Sentinel __last, _Predicate __pred, forward_iterator_tag)
{
    while (true)
    {
        if (__first == __last)
            return std::make_pair(std::move(__first), std::move(__first));
        if (!__pred(*__first))
            break;
        ++__first;
    }

    _ForwardIterator __p = __first;
    while (++__p != __last)
    {
        if (__pred(*__p))
        {
            _IterOps<_AlgPolicy>::iter_swap(__first, __p);
            ++__first;
        }
    }
    return std::make_pair(std::move(__first), std::move(__p));
}

template <class _Predicate, class _AlgPolicy, class _BidirectionalIterator, class _Sentinel>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_BidirectionalIterator, _BidirectionalIterator>
__partition_impl(_BidirectionalIterator __first, _Sentinel __sentinel, _Predicate __pred,
            bidirectional_iterator_tag)
{
    _BidirectionalIterator __original_last = _IterOps<_AlgPolicy>::next(__first, __sentinel);
    _BidirectionalIterator __last = __original_last;

    while (true)
    {
        while (true)
        {
            if (__first == __last)
                return std::make_pair(std::move(__first), std::move(__original_last));
            if (!__pred(*__first))
                break;
            ++__first;
        }
        do
        {
            if (__first == --__last)
                return std::make_pair(std::move(__first), std::move(__original_last));
        } while (!__pred(*__last));
        _IterOps<_AlgPolicy>::iter_swap(__first, __last);
        ++__first;
    }
}

template <class _AlgPolicy, class _ForwardIterator, class _Sentinel, class _Predicate, class _IterCategory>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
pair<_ForwardIterator, _ForwardIterator> __partition(
    _ForwardIterator __first, _Sentinel __last, _Predicate&& __pred, _IterCategory __iter_category) {
  return std::__partition_impl<__remove_cvref_t<_Predicate>&, _AlgPolicy>(
      std::move(__first), std::move(__last), __pred, __iter_category);
}

template <class _ForwardIterator, class _Predicate>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator
partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
{
  using _IterCategory = typename iterator_traits<_ForwardIterator>::iterator_category;
  auto __result = std::__partition<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __pred, _IterCategory());
  return __result.first;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_PARTITION_H
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition.h" 3
#endif /* partition.h expanded by -frewrite-includes */
# 1823 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* partition_copy.h expanded by -frewrite-includes */
#include <__algorithm/partition_copy.h>
#else /* partition_copy.h expanded by -frewrite-includes */
# 1823 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PARTITION_COPY_H
#define _LIBCPP___ALGORITHM_PARTITION_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_copy.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_copy.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_copy.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _OutputIterator1,
          class _OutputIterator2, class _Predicate>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_OutputIterator1, _OutputIterator2>
partition_copy(_InputIterator __first, _InputIterator __last,
               _OutputIterator1 __out_true, _OutputIterator2 __out_false,
               _Predicate __pred)
{
    for (; __first != __last; ++__first)
    {
        if (__pred(*__first))
        {
            *__out_true = *__first;
            ++__out_true;
        }
        else
        {
            *__out_false = *__first;
            ++__out_false;
        }
    }
    return pair<_OutputIterator1, _OutputIterator2>(__out_true, __out_false);
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_PARTITION_COPY_H
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_copy.h" 3
#endif /* partition_copy.h expanded by -frewrite-includes */
# 1824 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* partition_point.h expanded by -frewrite-includes */
#include <__algorithm/partition_point.h>
#else /* partition_point.h expanded by -frewrite-includes */
# 1824 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_point.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PARTITION_POINT_H
#define _LIBCPP___ALGORITHM_PARTITION_POINT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/half_positive.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_point.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_point.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_point.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_point.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_point.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_point.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_point.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_point.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template<class _ForwardIterator, class _Predicate>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
partition_point(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
{
    typedef typename iterator_traits<_ForwardIterator>::difference_type difference_type;
    difference_type __len = _VSTD::distance(__first, __last);
    while (__len != 0)
    {
        difference_type __l2 = _VSTD::__half_positive(__len);
        _ForwardIterator __m = __first;
        _VSTD::advance(__m, __l2);
        if (__pred(*__m))
        {
            __first = ++__m;
            __len -= __l2 + 1;
        }
        else
            __len = __l2;
    }
    return __first;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_PARTITION_POINT_H
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/partition_point.h" 3
#endif /* partition_point.h expanded by -frewrite-includes */
# 1825 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pop_heap.h>
#endif /* expanded by -frewrite-includes */
# 1825 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1826 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* prev_permutation.h expanded by -frewrite-includes */
#include <__algorithm/prev_permutation.h>
#else /* prev_permutation.h expanded by -frewrite-includes */
# 1826 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PREV_PERMUTATION_H
#define _LIBCPP___ALGORITHM_PREV_PERMUTATION_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/reverse.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
pair<_BidirectionalIterator, bool>
__prev_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&& __comp)
{
    using _Result = pair<_BidirectionalIterator, bool>;

    _BidirectionalIterator __last_iter = _IterOps<_AlgPolicy>::next(__first, __last);
    _BidirectionalIterator __i = __last_iter;
    if (__first == __last || __first == --__i)
        return _Result(std::move(__last_iter), false);

    while (true)
    {
        _BidirectionalIterator __ip1 = __i;
        if (__comp(*__ip1, *--__i))
        {
            _BidirectionalIterator __j = __last_iter;
            while (!__comp(*--__j, *__i))
                ;
            _IterOps<_AlgPolicy>::iter_swap(__i, __j);
            std::__reverse<_AlgPolicy>(__ip1, __last_iter);
            return _Result(std::move(__last_iter), true);
        }
        if (__i == __first)
        {
            std::__reverse<_AlgPolicy>(__first, __last_iter);
            return _Result(std::move(__last_iter), false);
        }
    }
}

template <class _BidirectionalIterator, class _Compare>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp)
{
  return std::__prev_permutation<_ClassicAlgPolicy>(
      std::move(__first), std::move(__last), static_cast<__comp_ref_type<_Compare> >(__comp)).second;
}

template <class _BidirectionalIterator>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last)
{
    return _VSTD::prev_permutation(__first, __last, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_PREV_PERMUTATION_H
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/prev_permutation.h" 3
#endif /* prev_permutation.h expanded by -frewrite-includes */
# 1827 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_any_all_none_of.h expanded by -frewrite-includes */
#include <__algorithm/pstl_any_all_none_of.h>
#else /* pstl_any_all_none_of.h expanded by -frewrite-includes */
# 1827 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_ANY_ALL_NONE_OF_H
#define _LIBCPP___ALGORITHM_PSTL_ANY_ALL_NONE_OF_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_find.h expanded by -frewrite-includes */
#include <__algorithm/pstl_find.h>
#else /* pstl_find.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_FIND_H
#define _LIBCPP___ALGORITHM_PSTL_FIND_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/find.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_backend.h expanded by -frewrite-includes */
#include <__algorithm/pstl_backend.h>
#else /* pstl_backend.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_BACKEND_H
#define _LIBCPP___ALGORITHM_PSTL_BACKEND_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cpu_backend.h expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backend.h>
#else /* cpu_backend.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKEND_H
#define _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKEND_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 3

/*

  // _Functor takes a subrange for [__first, __last) that should be executed in serial
  template <class _RandomAccessIterator, class _Functor>
  optional<__empty> __parallel_for(_RandomAccessIterator __first, _RandomAccessIterator __last, _Functor __func);

  template <class _Iterator, class _UnaryOp, class _Tp, class _BinaryOp, class _Reduction>
  optional<_Tp>
  __parallel_transform_reduce(_Iterator __first, _Iterator __last, _UnaryOp, _Tp __init, _BinaryOp, _Reduction);

  // Cancel the execution of other jobs - they aren't needed anymore
  void __cancel_execution();

  template <class _RandomAccessIterator1,
            class _RandomAccessIterator2,
            class _RandomAccessIterator3,
            class _Compare,
            class _LeafMerge>
  optional<void> __parallel_merge(
      _RandomAccessIterator1 __first1,
      _RandomAccessIterator1 __last1,
      _RandomAccessIterator2 __first2,
      _RandomAccessIterator2 __last2,
      _RandomAccessIterator3 __outit,
      _Compare __comp,
      _LeafMerge __leaf_merge);

  template <class _RandomAccessIterator, class _Comp, class _LeafSort>
  void __parallel_stable_sort(_RandomAccessIterator __first,
                              _RandomAccessIterator __last,
                              _Comp __comp,
                              _LeafSort __leaf_sort);

  TODO: Document the parallel backend

Exception handling
==================

CPU backends are expected to report errors (i.e. failure to allocate) by returning a disengaged `optional` from their
implementation. Exceptions shouldn't be used to report an internal failure-to-allocate, since all exceptions are turned
into a program termination at the front-end level. When a backend returns a disengaged `optional` to the frontend, the
frontend will turn that into a call to `std::__throw_bad_alloc();` to report the internal failure to the user.
*/

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* any_of.h expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/any_of.h>
#else /* any_of.h expanded by -frewrite-includes */
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKEND_ANY_OF_H
#define _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKEND_ANY_OF_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/any_of.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/find_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* backend.h expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/backend.h>
#else /* backend.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKEND_BACKEND_H
#define _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKEND_BACKEND_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_PSTL_CPU_BACKEND_SERIAL)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3
#if 0 /* expanded by -frewrite-includes */
#  include <__algorithm/pstl_backends/cpu_backends/serial.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_LIBCPP_PSTL_CPU_BACKEND_THREAD)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* thread.h expanded by -frewrite-includes */
#  include <__algorithm/pstl_backends/cpu_backends/thread.h>
#else /* thread.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_THREAD_H
#define _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_THREAD_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* empty.h expanded by -frewrite-includes */
#include <__utility/empty.h>
#else /* empty.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/empty.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___UTILITY_EMPTY_H
#define _LIBCPP___UTILITY_EMPTY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/empty.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/empty.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/empty.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/empty.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/empty.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

struct __empty {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___UTILITY_EMPTY_H
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__utility/empty.h" 3
#endif /* empty.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3

// This backend implementation is for testing purposes only and not meant for production use. This will be replaced
// by a proper implementation once the PSTL implementation is somewhat stable.

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __par_backend {
inline namespace __thread_cpu_backend {

template <class _RandomAccessIterator, class _Fp>
_LIBCPP_HIDE_FROM_ABI optional<__empty>
__parallel_for(_RandomAccessIterator __first, _RandomAccessIterator __last, _Fp __f) {
  __f(__first, __last);
  return __empty{};
}

template <class _Index, class _UnaryOp, class _Tp, class _BinaryOp, class _Reduce>
_LIBCPP_HIDE_FROM_ABI optional<_Tp>
__parallel_transform_reduce(_Index __first, _Index __last, _UnaryOp, _Tp __init, _BinaryOp, _Reduce __reduce) {
  return __reduce(std::move(__first), std::move(__last), std::move(__init));
}

template <class _RandomAccessIterator, class _Compare, class _LeafSort>
_LIBCPP_HIDE_FROM_ABI optional<__empty> __parallel_stable_sort(
    _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp, _LeafSort __leaf_sort) {
  __leaf_sort(__first, __last, __comp);
  return __empty{};
}

_LIBCPP_HIDE_FROM_ABI inline void __cancel_execution() {}

template <class _RandomAccessIterator1,
          class _RandomAccessIterator2,
          class _RandomAccessIterator3,
          class _Compare,
          class _LeafMerge>
_LIBCPP_HIDE_FROM_ABI optional<__empty> __parallel_merge(
    _RandomAccessIterator1 __first1,
    _RandomAccessIterator1 __last1,
    _RandomAccessIterator2 __first2,
    _RandomAccessIterator2 __last2,
    _RandomAccessIterator3 __outit,
    _Compare __comp,
    _LeafMerge __leaf_merge) {
  __leaf_merge(__first1, __last1, __first2, __last2, __outit, __comp);
  return __empty{};
}

} // namespace __thread_cpu_backend
} // namespace __par_backend

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && && _LIBCPP_STD_VER >= 17
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_THREAD_H
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/thread.h" 3
#endif /* thread.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 2 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_LIBCPP_PSTL_CPU_BACKEND_LIBDISPATCH)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3
#if 0 /* expanded by -frewrite-includes */
#  include <__algorithm/pstl_backends/cpu_backends/libdispatch.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3
#else
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3
#  error "Invalid CPU backend choice"
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

struct __cpu_backend_tag {};

inline constexpr size_t __lane_size = 64;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 17
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKEND_BACKEND_H
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/backend.h" 3
#endif /* backend.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* atomic.h expanded by -frewrite-includes */
#include <__atomic/atomic.h>
#else /* atomic.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ATOMIC_ATOMIC_H
#define _LIBCPP___ATOMIC_ATOMIC_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* atomic_base.h expanded by -frewrite-includes */
#include <__atomic/atomic_base.h>
#else /* atomic_base.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ATOMIC_ATOMIC_BASE_H
#define _LIBCPP___ATOMIC_ATOMIC_BASE_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* atomic_sync.h expanded by -frewrite-includes */
#include <__atomic/atomic_sync.h>
#else /* atomic_sync.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ATOMIC_ATOMIC_SYNC_H
#define _LIBCPP___ATOMIC_ATOMIC_SYNC_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* contention_t.h expanded by -frewrite-includes */
#include <__atomic/contention_t.h>
#else /* contention_t.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/contention_t.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ATOMIC_CONTENTION_T_H
#define _LIBCPP___ATOMIC_CONTENTION_T_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cxx_atomic_impl.h expanded by -frewrite-includes */
#include <__atomic/cxx_atomic_impl.h>
#else /* cxx_atomic_impl.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/contention_t.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ATOMIC_CXX_ATOMIC_IMPL_H
#define _LIBCPP___ATOMIC_CXX_ATOMIC_IMPL_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_always_lock_free.h expanded by -frewrite-includes */
#include <__atomic/is_always_lock_free.h>
#else /* is_always_lock_free.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/is_always_lock_free.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ATOMIC_IS_ALWAYS_LOCK_FREE_H
#define _LIBCPP___ATOMIC_IS_ALWAYS_LOCK_FREE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/is_always_lock_free.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/is_always_lock_free.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/is_always_lock_free.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/is_always_lock_free.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/is_always_lock_free.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct __libcpp_is_always_lock_free {
  // __atomic_always_lock_free is available in all Standard modes
  static const bool __value = __atomic_always_lock_free(sizeof(_Tp), 0);
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ATOMIC_IS_ALWAYS_LOCK_FREE_H
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/is_always_lock_free.h" 3
#endif /* is_always_lock_free.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/memory_order.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_assignable.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copyable.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_const.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstring>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_GCC_ATOMIC_IMP) || \
    defined(_LIBCPP_ATOMIC_ONLY_USE_BUILTINS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3

// [atomics.types.generic]p1 guarantees _Tp is trivially copyable. Because
// the default operator= in an object is not volatile, a byte-by-byte copy
// is required.
template <typename _Tp, typename _Tv, __enable_if_t<is_assignable<_Tp&, _Tv>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI
void __cxx_atomic_assign_volatile(_Tp& __a_value, _Tv const& __val) {
  __a_value = __val;
}
template <typename _Tp, typename _Tv, __enable_if_t<is_assignable<_Tp&, _Tv>::value, int> = 0> _LIBCPP_HIDE_FROM_ABI
void __cxx_atomic_assign_volatile(_Tp volatile& __a_value, _Tv volatile const& __val) {
  volatile char* __to         = reinterpret_cast<volatile char*>(std::addressof(__a_value));
  volatile char* __end = __to + sizeof(_Tp);
  volatile const char* __from = reinterpret_cast<volatile const char*>(std::addressof(__val));
  while (__to != __end)
    *__to++ = *__from++;
}

#endif
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_GCC_ATOMIC_IMP)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3

template <typename _Tp>
struct __cxx_atomic_base_impl {

  _LIBCPP_HIDE_FROM_ABI
#ifndef _LIBCPP_CXX03_LANG
    __cxx_atomic_base_impl() _NOEXCEPT = default;
#else
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
    __cxx_atomic_base_impl() _NOEXCEPT : __a_value() {}
#endif // _LIBCPP_CXX03_LANG
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
  _LIBCPP_CONSTEXPR explicit __cxx_atomic_base_impl(_Tp value) _NOEXCEPT
    : __a_value(value) {}
  _Tp __a_value;
};

_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR int __to_gcc_order(memory_order __order) {
  // Avoid switch statement to make this a constexpr.
  return __order == memory_order_relaxed ? __ATOMIC_RELAXED:
         (__order == memory_order_acquire ? __ATOMIC_ACQUIRE:
          (__order == memory_order_release ? __ATOMIC_RELEASE:
           (__order == memory_order_seq_cst ? __ATOMIC_SEQ_CST:
            (__order == memory_order_acq_rel ? __ATOMIC_ACQ_REL:
              __ATOMIC_CONSUME))));
}

_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR int __to_gcc_failure_order(memory_order __order) {
  // Avoid switch statement to make this a constexpr.
  return __order == memory_order_relaxed ? __ATOMIC_RELAXED:
         (__order == memory_order_acquire ? __ATOMIC_ACQUIRE:
          (__order == memory_order_release ? __ATOMIC_RELAXED:
           (__order == memory_order_seq_cst ? __ATOMIC_SEQ_CST:
            (__order == memory_order_acq_rel ? __ATOMIC_ACQUIRE:
              __ATOMIC_CONSUME))));
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
void __cxx_atomic_init(volatile __cxx_atomic_base_impl<_Tp>* __a,  _Tp __val) {
  __cxx_atomic_assign_volatile(__a->__a_value, __val);
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
void __cxx_atomic_init(__cxx_atomic_base_impl<_Tp>* __a,  _Tp __val) {
  __a->__a_value = __val;
}

_LIBCPP_HIDE_FROM_ABI inline
void __cxx_atomic_thread_fence(memory_order __order) {
  __atomic_thread_fence(__to_gcc_order(__order));
}

_LIBCPP_HIDE_FROM_ABI inline
void __cxx_atomic_signal_fence(memory_order __order) {
  __atomic_signal_fence(__to_gcc_order(__order));
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
void __cxx_atomic_store(volatile __cxx_atomic_base_impl<_Tp>* __a,  _Tp __val,
                        memory_order __order) {
  __atomic_store(std::addressof(__a->__a_value), std::addressof(__val), __to_gcc_order(__order));
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
void __cxx_atomic_store(__cxx_atomic_base_impl<_Tp>* __a,  _Tp __val,
                        memory_order __order) {
  __atomic_store(std::addressof(__a->__a_value), std::addressof(__val), __to_gcc_order(__order));
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_load(const volatile __cxx_atomic_base_impl<_Tp>* __a,
                      memory_order __order) {
  _Tp __ret;
  __atomic_load(std::addressof(__a->__a_value), std::addressof(__ret), __to_gcc_order(__order));
  return __ret;
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_load(const __cxx_atomic_base_impl<_Tp>* __a, memory_order __order) {
  _Tp __ret;
  __atomic_load(std::addressof(__a->__a_value), std::addressof(__ret), __to_gcc_order(__order));
  return __ret;
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_exchange(volatile __cxx_atomic_base_impl<_Tp>* __a,
                          _Tp __value, memory_order __order) {
  _Tp __ret;
  __atomic_exchange(
      std::addressof(__a->__a_value), std::addressof(__value), std::addressof(__ret), __to_gcc_order(__order));
  return __ret;
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_exchange(__cxx_atomic_base_impl<_Tp>* __a, _Tp __value,
                          memory_order __order) {
  _Tp __ret;
  __atomic_exchange(
      std::addressof(__a->__a_value), std::addressof(__value), std::addressof(__ret), __to_gcc_order(__order));
  return __ret;
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
bool __cxx_atomic_compare_exchange_strong(
    volatile __cxx_atomic_base_impl<_Tp>* __a, _Tp* __expected, _Tp __value,
    memory_order __success, memory_order __failure) {
  return __atomic_compare_exchange(
      std::addressof(__a->__a_value),
      __expected,
      std::addressof(__value),
      false,
      __to_gcc_order(__success),
      __to_gcc_failure_order(__failure));
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
bool __cxx_atomic_compare_exchange_strong(
    __cxx_atomic_base_impl<_Tp>* __a, _Tp* __expected, _Tp __value, memory_order __success,
    memory_order __failure) {
  return __atomic_compare_exchange(
      std::addressof(__a->__a_value),
      __expected,
      std::addressof(__value),
      false,
      __to_gcc_order(__success),
      __to_gcc_failure_order(__failure));
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
bool __cxx_atomic_compare_exchange_weak(
    volatile __cxx_atomic_base_impl<_Tp>* __a, _Tp* __expected, _Tp __value,
    memory_order __success, memory_order __failure) {
  return __atomic_compare_exchange(
      std::addressof(__a->__a_value),
      __expected,
      std::addressof(__value),
      true,
      __to_gcc_order(__success),
      __to_gcc_failure_order(__failure));
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
bool __cxx_atomic_compare_exchange_weak(
    __cxx_atomic_base_impl<_Tp>* __a, _Tp* __expected, _Tp __value, memory_order __success,
    memory_order __failure) {
  return __atomic_compare_exchange(
      std::addressof(__a->__a_value),
      __expected,
      std::addressof(__value),
      true,
      __to_gcc_order(__success),
      __to_gcc_failure_order(__failure));
}

template <typename _Tp>
struct __skip_amt { enum {value = 1}; };

template <typename _Tp>
struct __skip_amt<_Tp*> { enum {value = sizeof(_Tp)}; };

// FIXME: Haven't figured out what the spec says about using arrays with
// atomic_fetch_add. Force a failure rather than creating bad behavior.
template <typename _Tp>
struct __skip_amt<_Tp[]> { };
template <typename _Tp, int n>
struct __skip_amt<_Tp[n]> { };

template <typename _Tp, typename _Td>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_add(volatile __cxx_atomic_base_impl<_Tp>* __a,
                           _Td __delta, memory_order __order) {
  return __atomic_fetch_add(std::addressof(__a->__a_value), __delta * __skip_amt<_Tp>::value, __to_gcc_order(__order));
}

template <typename _Tp, typename _Td>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp>* __a, _Td __delta,
                           memory_order __order) {
  return __atomic_fetch_add(std::addressof(__a->__a_value), __delta * __skip_amt<_Tp>::value, __to_gcc_order(__order));
}

template <typename _Tp, typename _Td>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_sub(volatile __cxx_atomic_base_impl<_Tp>* __a,
                           _Td __delta, memory_order __order) {
  return __atomic_fetch_sub(std::addressof(__a->__a_value), __delta * __skip_amt<_Tp>::value, __to_gcc_order(__order));
}

template <typename _Tp, typename _Td>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp>* __a, _Td __delta,
                           memory_order __order) {
  return __atomic_fetch_sub(std::addressof(__a->__a_value), __delta * __skip_amt<_Tp>::value, __to_gcc_order(__order));
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_and(volatile __cxx_atomic_base_impl<_Tp>* __a,
                           _Tp __pattern, memory_order __order) {
  return __atomic_fetch_and(std::addressof(__a->__a_value), __pattern, __to_gcc_order(__order));
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_and(__cxx_atomic_base_impl<_Tp>* __a,
                           _Tp __pattern, memory_order __order) {
  return __atomic_fetch_and(std::addressof(__a->__a_value), __pattern, __to_gcc_order(__order));
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_or(volatile __cxx_atomic_base_impl<_Tp>* __a,
                          _Tp __pattern, memory_order __order) {
  return __atomic_fetch_or(std::addressof(__a->__a_value), __pattern, __to_gcc_order(__order));
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_or(__cxx_atomic_base_impl<_Tp>* __a, _Tp __pattern,
                          memory_order __order) {
  return __atomic_fetch_or(std::addressof(__a->__a_value), __pattern, __to_gcc_order(__order));
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_xor(volatile __cxx_atomic_base_impl<_Tp>* __a,
                           _Tp __pattern, memory_order __order) {
  return __atomic_fetch_xor(std::addressof(__a->__a_value), __pattern, __to_gcc_order(__order));
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_xor(__cxx_atomic_base_impl<_Tp>* __a, _Tp __pattern,
                           memory_order __order) {
  return __atomic_fetch_xor(std::addressof(__a->__a_value), __pattern, __to_gcc_order(__order));
}

#define __cxx_atomic_is_lock_free(__s) __atomic_is_lock_free(__s, 0)

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_LIBCPP_HAS_C_ATOMIC_IMP)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 301 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3

template <typename _Tp>
struct __cxx_atomic_base_impl {

  _LIBCPP_HIDE_FROM_ABI
#ifndef _LIBCPP_CXX03_LANG
    __cxx_atomic_base_impl() _NOEXCEPT = default;
#else
# 309 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
    __cxx_atomic_base_impl() _NOEXCEPT : __a_value() {}
#endif // _LIBCPP_CXX03_LANG
# 311 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
  _LIBCPP_CONSTEXPR explicit __cxx_atomic_base_impl(_Tp __value) _NOEXCEPT
    : __a_value(__value) {}
  _LIBCPP_DISABLE_EXTENSION_WARNING _Atomic(_Tp) __a_value;
};

#define __cxx_atomic_is_lock_free(__s) __c11_atomic_is_lock_free(__s)

_LIBCPP_HIDE_FROM_ABI inline
void __cxx_atomic_thread_fence(memory_order __order) _NOEXCEPT {
    __c11_atomic_thread_fence(static_cast<__memory_order_underlying_t>(__order));
}

_LIBCPP_HIDE_FROM_ABI inline
void __cxx_atomic_signal_fence(memory_order __order) _NOEXCEPT {
    __c11_atomic_signal_fence(static_cast<__memory_order_underlying_t>(__order));
}

template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
void __cxx_atomic_init(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __val) _NOEXCEPT {
    __c11_atomic_init(std::addressof(__a->__a_value), __val);
}
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
void __cxx_atomic_init(__cxx_atomic_base_impl<_Tp> * __a, _Tp __val) _NOEXCEPT {
    __c11_atomic_init(std::addressof(__a->__a_value), __val);
}

template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
void __cxx_atomic_store(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __val, memory_order __order) _NOEXCEPT {
    __c11_atomic_store(std::addressof(__a->__a_value), __val, static_cast<__memory_order_underlying_t>(__order));
}
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
void __cxx_atomic_store(__cxx_atomic_base_impl<_Tp> * __a, _Tp __val, memory_order __order) _NOEXCEPT {
    __c11_atomic_store(std::addressof(__a->__a_value), __val, static_cast<__memory_order_underlying_t>(__order));
}

template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_load(__cxx_atomic_base_impl<_Tp> const volatile* __a, memory_order __order) _NOEXCEPT {
    using __ptr_type = __remove_const_t<decltype(__a->__a_value)>*;
    return __c11_atomic_load(
        const_cast<__ptr_type>(std::addressof(__a->__a_value)), static_cast<__memory_order_underlying_t>(__order));
}
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_load(__cxx_atomic_base_impl<_Tp> const* __a, memory_order __order) _NOEXCEPT {
    using __ptr_type = __remove_const_t<decltype(__a->__a_value)>*;
    return __c11_atomic_load(
        const_cast<__ptr_type>(std::addressof(__a->__a_value)), static_cast<__memory_order_underlying_t>(__order));
}

template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_exchange(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __value, memory_order __order) _NOEXCEPT {
    return __c11_atomic_exchange(
        std::addressof(__a->__a_value), __value, static_cast<__memory_order_underlying_t>(__order));
}
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_exchange(__cxx_atomic_base_impl<_Tp> * __a, _Tp __value, memory_order __order) _NOEXCEPT {
    return __c11_atomic_exchange(
        std::addressof(__a->__a_value), __value, static_cast<__memory_order_underlying_t>(__order));
}

_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR memory_order __to_failure_order(memory_order __order) {
  // Avoid switch statement to make this a constexpr.
  return __order == memory_order_release ? memory_order_relaxed:
         (__order == memory_order_acq_rel ? memory_order_acquire:
             __order);
}

template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
bool __cxx_atomic_compare_exchange_strong(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) _NOEXCEPT {
  return __c11_atomic_compare_exchange_strong(
      std::addressof(__a->__a_value),
      __expected,
      __value,
      static_cast<__memory_order_underlying_t>(__success),
      static_cast<__memory_order_underlying_t>(__to_failure_order(__failure)));
}
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
bool __cxx_atomic_compare_exchange_strong(__cxx_atomic_base_impl<_Tp> * __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) _NOEXCEPT {
  return __c11_atomic_compare_exchange_strong(
      std::addressof(__a->__a_value),
      __expected,
      __value,
      static_cast<__memory_order_underlying_t>(__success),
      static_cast<__memory_order_underlying_t>(__to_failure_order(__failure)));
}

template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
bool __cxx_atomic_compare_exchange_weak(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) _NOEXCEPT {
  return __c11_atomic_compare_exchange_weak(
      std::addressof(__a->__a_value),
      __expected,
      __value,
      static_cast<__memory_order_underlying_t>(__success),
      static_cast<__memory_order_underlying_t>(__to_failure_order(__failure)));
}
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
bool __cxx_atomic_compare_exchange_weak(__cxx_atomic_base_impl<_Tp> * __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) _NOEXCEPT {
  return __c11_atomic_compare_exchange_weak(
      std::addressof(__a->__a_value),
      __expected,
      __value,
      static_cast<__memory_order_underlying_t>(__success),
      static_cast<__memory_order_underlying_t>(__to_failure_order(__failure)));
}

template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __delta, memory_order __order) _NOEXCEPT {
  return __c11_atomic_fetch_add(
      std::addressof(__a->__a_value), __delta, static_cast<__memory_order_underlying_t>(__order));
}
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp> * __a, _Tp __delta, memory_order __order) _NOEXCEPT {
  return __c11_atomic_fetch_add(
      std::addressof(__a->__a_value), __delta, static_cast<__memory_order_underlying_t>(__order));
}

template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp* __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp*> volatile* __a, ptrdiff_t __delta, memory_order __order) _NOEXCEPT {
  return __c11_atomic_fetch_add(
      std::addressof(__a->__a_value), __delta, static_cast<__memory_order_underlying_t>(__order));
}
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp* __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp*> * __a, ptrdiff_t __delta, memory_order __order) _NOEXCEPT {
  return __c11_atomic_fetch_add(
      std::addressof(__a->__a_value), __delta, static_cast<__memory_order_underlying_t>(__order));
}

template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __delta, memory_order __order) _NOEXCEPT {
  return __c11_atomic_fetch_sub(
      std::addressof(__a->__a_value), __delta, static_cast<__memory_order_underlying_t>(__order));
}
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp> * __a, _Tp __delta, memory_order __order) _NOEXCEPT {
  return __c11_atomic_fetch_sub(
      std::addressof(__a->__a_value), __delta, static_cast<__memory_order_underlying_t>(__order));
}
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp* __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp*> volatile* __a, ptrdiff_t __delta, memory_order __order) _NOEXCEPT {
  return __c11_atomic_fetch_sub(
      std::addressof(__a->__a_value), __delta, static_cast<__memory_order_underlying_t>(__order));
}
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp* __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp*> * __a, ptrdiff_t __delta, memory_order __order) _NOEXCEPT {
  return __c11_atomic_fetch_sub(
      std::addressof(__a->__a_value), __delta, static_cast<__memory_order_underlying_t>(__order));
}

template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_and(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __pattern, memory_order __order) _NOEXCEPT {
  return __c11_atomic_fetch_and(
      std::addressof(__a->__a_value), __pattern, static_cast<__memory_order_underlying_t>(__order));
}
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_and(__cxx_atomic_base_impl<_Tp> * __a, _Tp __pattern, memory_order __order) _NOEXCEPT {
  return __c11_atomic_fetch_and(
      std::addressof(__a->__a_value), __pattern, static_cast<__memory_order_underlying_t>(__order));
}

template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_or(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __pattern, memory_order __order) _NOEXCEPT {
  return __c11_atomic_fetch_or(
      std::addressof(__a->__a_value), __pattern, static_cast<__memory_order_underlying_t>(__order));
}
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_or(__cxx_atomic_base_impl<_Tp> * __a, _Tp __pattern, memory_order __order) _NOEXCEPT {
  return __c11_atomic_fetch_or(
      std::addressof(__a->__a_value), __pattern, static_cast<__memory_order_underlying_t>(__order));
}

template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_xor(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __pattern, memory_order __order) _NOEXCEPT {
  return __c11_atomic_fetch_xor(
      std::addressof(__a->__a_value), __pattern, static_cast<__memory_order_underlying_t>(__order));
}
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_xor(__cxx_atomic_base_impl<_Tp> * __a, _Tp __pattern, memory_order __order) _NOEXCEPT {
  return __c11_atomic_fetch_xor(
      std::addressof(__a->__a_value), __pattern, static_cast<__memory_order_underlying_t>(__order));
}

#endif // _LIBCPP_HAS_GCC_ATOMIC_IMP, _LIBCPP_HAS_C_ATOMIC_IMP
# 518 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3

#ifdef _LIBCPP_ATOMIC_ONLY_USE_BUILTINS

template<typename _Tp>
struct __cxx_atomic_lock_impl {

  _LIBCPP_HIDE_FROM_ABI
  __cxx_atomic_lock_impl() _NOEXCEPT
    : __a_value(), __a_lock(0) {}
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit
  __cxx_atomic_lock_impl(_Tp value) _NOEXCEPT
    : __a_value(value), __a_lock(0) {}

  _Tp __a_value;
  mutable __cxx_atomic_base_impl<_LIBCPP_ATOMIC_FLAG_TYPE> __a_lock;

  _LIBCPP_HIDE_FROM_ABI void __lock() const volatile {
    while(1 == __cxx_atomic_exchange(&__a_lock, _LIBCPP_ATOMIC_FLAG_TYPE(true), memory_order_acquire))
        /*spin*/;
  }
  _LIBCPP_HIDE_FROM_ABI void __lock() const {
    while(1 == __cxx_atomic_exchange(&__a_lock, _LIBCPP_ATOMIC_FLAG_TYPE(true), memory_order_acquire))
        /*spin*/;
  }
  _LIBCPP_HIDE_FROM_ABI void __unlock() const volatile {
    __cxx_atomic_store(&__a_lock, _LIBCPP_ATOMIC_FLAG_TYPE(false), memory_order_release);
  }
  _LIBCPP_HIDE_FROM_ABI void __unlock() const {
    __cxx_atomic_store(&__a_lock, _LIBCPP_ATOMIC_FLAG_TYPE(false), memory_order_release);
  }
  _LIBCPP_HIDE_FROM_ABI _Tp __read() const volatile {
    __lock();
    _Tp __old;
    __cxx_atomic_assign_volatile(__old, __a_value);
    __unlock();
    return __old;
  }
  _LIBCPP_HIDE_FROM_ABI _Tp __read() const {
    __lock();
    _Tp __old = __a_value;
    __unlock();
    return __old;
  }
};

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
void __cxx_atomic_init(volatile __cxx_atomic_lock_impl<_Tp>* __a,  _Tp __val) {
  __cxx_atomic_assign_volatile(__a->__a_value, __val);
}
template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
void __cxx_atomic_init(__cxx_atomic_lock_impl<_Tp>* __a,  _Tp __val) {
  __a->__a_value = __val;
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
void __cxx_atomic_store(volatile __cxx_atomic_lock_impl<_Tp>* __a,  _Tp __val, memory_order) {
  __a->__lock();
  __cxx_atomic_assign_volatile(__a->__a_value, __val);
  __a->__unlock();
}
template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
void __cxx_atomic_store(__cxx_atomic_lock_impl<_Tp>* __a,  _Tp __val, memory_order) {
  __a->__lock();
  __a->__a_value = __val;
  __a->__unlock();
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_load(const volatile __cxx_atomic_lock_impl<_Tp>* __a, memory_order) {
  return __a->__read();
}
template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_load(const __cxx_atomic_lock_impl<_Tp>* __a, memory_order) {
  return __a->__read();
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_exchange(volatile __cxx_atomic_lock_impl<_Tp>* __a, _Tp __value, memory_order) {
  __a->__lock();
  _Tp __old;
  __cxx_atomic_assign_volatile(__old, __a->__a_value);
  __cxx_atomic_assign_volatile(__a->__a_value, __value);
  __a->__unlock();
  return __old;
}
template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_exchange(__cxx_atomic_lock_impl<_Tp>* __a, _Tp __value, memory_order) {
  __a->__lock();
  _Tp __old = __a->__a_value;
  __a->__a_value = __value;
  __a->__unlock();
  return __old;
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
bool __cxx_atomic_compare_exchange_strong(volatile __cxx_atomic_lock_impl<_Tp>* __a,
                                          _Tp* __expected, _Tp __value, memory_order, memory_order) {
  _Tp __temp;
  __a->__lock();
  __cxx_atomic_assign_volatile(__temp, __a->__a_value);
  bool __ret = (std::memcmp(&__temp, __expected, sizeof(_Tp)) == 0);
  if(__ret)
    __cxx_atomic_assign_volatile(__a->__a_value, __value);
  else
    __cxx_atomic_assign_volatile(*__expected, __a->__a_value);
  __a->__unlock();
  return __ret;
}
template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
bool __cxx_atomic_compare_exchange_strong(__cxx_atomic_lock_impl<_Tp>* __a,
                                          _Tp* __expected, _Tp __value, memory_order, memory_order) {
  __a->__lock();
  bool __ret = (std::memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0);
  if(__ret)
    std::memcpy(&__a->__a_value, &__value, sizeof(_Tp));
  else
    std::memcpy(__expected, &__a->__a_value, sizeof(_Tp));
  __a->__unlock();
  return __ret;
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
bool __cxx_atomic_compare_exchange_weak(volatile __cxx_atomic_lock_impl<_Tp>* __a,
                                        _Tp* __expected, _Tp __value, memory_order, memory_order) {
  _Tp __temp;
  __a->__lock();
  __cxx_atomic_assign_volatile(__temp, __a->__a_value);
  bool __ret = (std::memcmp(&__temp, __expected, sizeof(_Tp)) == 0);
  if(__ret)
    __cxx_atomic_assign_volatile(__a->__a_value, __value);
  else
    __cxx_atomic_assign_volatile(*__expected, __a->__a_value);
  __a->__unlock();
  return __ret;
}
template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
bool __cxx_atomic_compare_exchange_weak(__cxx_atomic_lock_impl<_Tp>* __a,
                                        _Tp* __expected, _Tp __value, memory_order, memory_order) {
  __a->__lock();
  bool __ret = (std::memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0);
  if(__ret)
    std::memcpy(&__a->__a_value, &__value, sizeof(_Tp));
  else
    std::memcpy(__expected, &__a->__a_value, sizeof(_Tp));
  __a->__unlock();
  return __ret;
}

template <typename _Tp, typename _Td>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_add(volatile __cxx_atomic_lock_impl<_Tp>* __a,
                           _Td __delta, memory_order) {
  __a->__lock();
  _Tp __old;
  __cxx_atomic_assign_volatile(__old, __a->__a_value);
  __cxx_atomic_assign_volatile(__a->__a_value, _Tp(__old + __delta));
  __a->__unlock();
  return __old;
}
template <typename _Tp, typename _Td>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_add(__cxx_atomic_lock_impl<_Tp>* __a,
                           _Td __delta, memory_order) {
  __a->__lock();
  _Tp __old = __a->__a_value;
  __a->__a_value += __delta;
  __a->__unlock();
  return __old;
}

template <typename _Tp, typename _Td>
_LIBCPP_HIDE_FROM_ABI
_Tp* __cxx_atomic_fetch_add(volatile __cxx_atomic_lock_impl<_Tp*>* __a,
                           ptrdiff_t __delta, memory_order) {
  __a->__lock();
  _Tp* __old;
  __cxx_atomic_assign_volatile(__old, __a->__a_value);
  __cxx_atomic_assign_volatile(__a->__a_value, __old + __delta);
  __a->__unlock();
  return __old;
}
template <typename _Tp, typename _Td>
_LIBCPP_HIDE_FROM_ABI
_Tp* __cxx_atomic_fetch_add(__cxx_atomic_lock_impl<_Tp*>* __a,
                           ptrdiff_t __delta, memory_order) {
  __a->__lock();
  _Tp* __old = __a->__a_value;
  __a->__a_value += __delta;
  __a->__unlock();
  return __old;
}

template <typename _Tp, typename _Td>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_sub(volatile __cxx_atomic_lock_impl<_Tp>* __a,
                           _Td __delta, memory_order) {
  __a->__lock();
  _Tp __old;
  __cxx_atomic_assign_volatile(__old, __a->__a_value);
  __cxx_atomic_assign_volatile(__a->__a_value, _Tp(__old - __delta));
  __a->__unlock();
  return __old;
}
template <typename _Tp, typename _Td>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_sub(__cxx_atomic_lock_impl<_Tp>* __a,
                           _Td __delta, memory_order) {
  __a->__lock();
  _Tp __old = __a->__a_value;
  __a->__a_value -= __delta;
  __a->__unlock();
  return __old;
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_and(volatile __cxx_atomic_lock_impl<_Tp>* __a,
                           _Tp __pattern, memory_order) {
  __a->__lock();
  _Tp __old;
  __cxx_atomic_assign_volatile(__old, __a->__a_value);
  __cxx_atomic_assign_volatile(__a->__a_value, _Tp(__old & __pattern));
  __a->__unlock();
  return __old;
}
template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_and(__cxx_atomic_lock_impl<_Tp>* __a,
                           _Tp __pattern, memory_order) {
  __a->__lock();
  _Tp __old = __a->__a_value;
  __a->__a_value &= __pattern;
  __a->__unlock();
  return __old;
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_or(volatile __cxx_atomic_lock_impl<_Tp>* __a,
                          _Tp __pattern, memory_order) {
  __a->__lock();
  _Tp __old;
  __cxx_atomic_assign_volatile(__old, __a->__a_value);
  __cxx_atomic_assign_volatile(__a->__a_value, _Tp(__old | __pattern));
  __a->__unlock();
  return __old;
}
template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_or(__cxx_atomic_lock_impl<_Tp>* __a,
                          _Tp __pattern, memory_order) {
  __a->__lock();
  _Tp __old = __a->__a_value;
  __a->__a_value |= __pattern;
  __a->__unlock();
  return __old;
}

template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_xor(volatile __cxx_atomic_lock_impl<_Tp>* __a,
                           _Tp __pattern, memory_order) {
  __a->__lock();
  _Tp __old;
  __cxx_atomic_assign_volatile(__old, __a->__a_value);
  __cxx_atomic_assign_volatile(__a->__a_value, _Tp(__old ^ __pattern));
  __a->__unlock();
  return __old;
}
template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp __cxx_atomic_fetch_xor(__cxx_atomic_lock_impl<_Tp>* __a,
                           _Tp __pattern, memory_order) {
  __a->__lock();
  _Tp __old = __a->__a_value;
  __a->__a_value ^= __pattern;
  __a->__unlock();
  return __old;
}

template <typename _Tp,
          typename _Base = typename conditional<__libcpp_is_always_lock_free<_Tp>::__value,
                                                __cxx_atomic_base_impl<_Tp>,
                                                __cxx_atomic_lock_impl<_Tp> >::type>
#else
# 815 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
template <typename _Tp,
          typename _Base = __cxx_atomic_base_impl<_Tp> >
#endif //_LIBCPP_ATOMIC_ONLY_USE_BUILTINS
# 818 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
struct __cxx_atomic_impl : public _Base {
    static_assert(is_trivially_copyable<_Tp>::value,
      "std::atomic<T> requires that 'T' be a trivially copyable type");

  _LIBCPP_HIDE_FROM_ABI __cxx_atomic_impl() _NOEXCEPT = default;
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __cxx_atomic_impl(_Tp __value) _NOEXCEPT
    : _Base(__value) {}
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ATOMIC_CXX_ATOMIC_IMPL_H
# 830 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h" 3
#endif /* cxx_atomic_impl.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/contention_t.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/contention_t.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/contention_t.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/contention_t.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/contention_t.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/contention_t.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/contention_t.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/contention_t.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if defined(__linux__) || (defined(_AIX) && !defined(__64BIT__))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/contention_t.h" 3
    using __cxx_contention_t = int32_t;
#else
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/contention_t.h" 3
    using __cxx_contention_t = int64_t;
#endif // __linux__ || (_AIX && !__64BIT__)
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/contention_t.h" 3

using __cxx_atomic_contention_t = __cxx_atomic_impl<__cxx_contention_t>;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ATOMIC_CONTENTION_T_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/contention_t.h" 3
#endif /* contention_t.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/cxx_atomic_impl.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/memory_order.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* duration.h expanded by -frewrite-includes */
#include <__chrono/duration.h>
#else /* duration.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CHRONO_DURATION_H
#define _LIBCPP___CHRONO_DURATION_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/three_way_comparable.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_floating_point.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ratio expanded by -frewrite-includes */
#include <ratio>
#else /* ratio expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_RATIO
#define _LIBCPP_RATIO

/*
    ratio synopsis

namespace std
{

template <intmax_t N, intmax_t D = 1>
class ratio
{
public:
    static constexpr intmax_t num;
    static constexpr intmax_t den;
    typedef ratio<num, den> type;
};

// ratio arithmetic
template <class R1, class R2> using ratio_add = ...;
template <class R1, class R2> using ratio_subtract = ...;
template <class R1, class R2> using ratio_multiply = ...;
template <class R1, class R2> using ratio_divide = ...;

// ratio comparison
template <class R1, class R2> struct ratio_equal;
template <class R1, class R2> struct ratio_not_equal;
template <class R1, class R2> struct ratio_less;
template <class R1, class R2> struct ratio_less_equal;
template <class R1, class R2> struct ratio_greater;
template <class R1, class R2> struct ratio_greater_equal;

// convenience SI typedefs
using quecto = ratio <1, 1'000'000'000'000'000'000'000'000'000'000>; // Since C++26; not supported
using ronto = ratio <1, 1'000'000'000'000'000'000'000'000'000>;      // Since C++26; not supported
typedef ratio<1, 1000000000000000000000000> yocto;  // not supported
typedef ratio<1,    1000000000000000000000> zepto;  // not supported
typedef ratio<1,       1000000000000000000> atto;
typedef ratio<1,          1000000000000000> femto;
typedef ratio<1,             1000000000000> pico;
typedef ratio<1,                1000000000> nano;
typedef ratio<1,                   1000000> micro;
typedef ratio<1,                      1000> milli;
typedef ratio<1,                       100> centi;
typedef ratio<1,                        10> deci;
typedef ratio<                       10, 1> deca;
typedef ratio<                      100, 1> hecto;
typedef ratio<                     1000, 1> kilo;
typedef ratio<                  1000000, 1> mega;
typedef ratio<               1000000000, 1> giga;
typedef ratio<            1000000000000, 1> tera;
typedef ratio<         1000000000000000, 1> peta;
typedef ratio<      1000000000000000000, 1> exa;
typedef ratio<   1000000000000000000000, 1> zetta;  // not supported
typedef ratio<1000000000000000000000000, 1> yotta;  // not supported
using ronna = ratio <1'000'000'000'000'000'000'000'000'000, 1>;      // Since C++26; not supported
using quetta = ratio <1'000'000'000'000'000'000'000'000'000'000, 1>; // Since C++26; not supported

  // 20.11.5, ratio comparison
  template <class R1, class R2> inline constexpr bool ratio_equal_v
    = ratio_equal<R1, R2>::value;                                       // C++17
  template <class R1, class R2> inline constexpr bool ratio_not_equal_v
    = ratio_not_equal<R1, R2>::value;                                   // C++17
  template <class R1, class R2> inline constexpr bool ratio_less_v
    = ratio_less<R1, R2>::value;                                        // C++17
  template <class R1, class R2> inline constexpr bool ratio_less_equal_v
    = ratio_less_equal<R1, R2>::value;                                  // C++17
  template <class R1, class R2> inline constexpr bool ratio_greater_v
    = ratio_greater<R1, R2>::value;                                     // C++17
  template <class R1, class R2> inline constexpr bool ratio_greater_equal_v
    = ratio_greater_equal<R1, R2>::value;                               // C++17
}
*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
#if 0 /* expanded by -frewrite-includes */
#include <climits>
#endif /* expanded by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 93 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
#endif
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 2 3


_LIBCPP_BEGIN_NAMESPACE_STD

// __static_gcd

template <intmax_t _Xp, intmax_t _Yp>
struct __static_gcd
{
    static const intmax_t value = __static_gcd<_Yp, _Xp % _Yp>::value;
};

template <intmax_t _Xp>
struct __static_gcd<_Xp, 0>
{
    static const intmax_t value = _Xp;
};

template <>
struct __static_gcd<0, 0>
{
    static const intmax_t value = 1;
};

// __static_lcm

template <intmax_t _Xp, intmax_t _Yp>
struct __static_lcm
{
    static const intmax_t value = _Xp / __static_gcd<_Xp, _Yp>::value * _Yp;
};

template <intmax_t _Xp>
struct __static_abs
{
    static const intmax_t value = _Xp < 0 ? -_Xp : _Xp;
};

template <intmax_t _Xp>
struct __static_sign
{
    static const intmax_t value = _Xp == 0 ? 0 : (_Xp < 0 ? -1 : 1);
};

template <intmax_t _Xp, intmax_t _Yp, intmax_t = __static_sign<_Yp>::value>
class __ll_add;

template <intmax_t _Xp, intmax_t _Yp>
class __ll_add<_Xp, _Yp, 1>
{
    static const intmax_t min = (1LL << (sizeof(intmax_t) * CHAR_BIT - 1)) + 1;
    static const intmax_t max = -min;

    static_assert(_Xp <= max - _Yp, "overflow in __ll_add");
public:
    static const intmax_t value = _Xp + _Yp;
};

template <intmax_t _Xp, intmax_t _Yp>
class __ll_add<_Xp, _Yp, 0>
{
public:
    static const intmax_t value = _Xp;
};

template <intmax_t _Xp, intmax_t _Yp>
class __ll_add<_Xp, _Yp, -1>
{
    static const intmax_t min = (1LL << (sizeof(intmax_t) * CHAR_BIT - 1)) + 1;
    static const intmax_t max = -min;

    static_assert(min - _Yp <= _Xp, "overflow in __ll_add");
public:
    static const intmax_t value = _Xp + _Yp;
};

template <intmax_t _Xp, intmax_t _Yp, intmax_t = __static_sign<_Yp>::value>
class __ll_sub;

template <intmax_t _Xp, intmax_t _Yp>
class __ll_sub<_Xp, _Yp, 1>
{
    static const intmax_t min = (1LL << (sizeof(intmax_t) * CHAR_BIT - 1)) + 1;
    static const intmax_t max = -min;

    static_assert(min + _Yp <= _Xp, "overflow in __ll_sub");
public:
    static const intmax_t value = _Xp - _Yp;
};

template <intmax_t _Xp, intmax_t _Yp>
class __ll_sub<_Xp, _Yp, 0>
{
public:
    static const intmax_t value = _Xp;
};

template <intmax_t _Xp, intmax_t _Yp>
class __ll_sub<_Xp, _Yp, -1>
{
    static const intmax_t min = (1LL << (sizeof(intmax_t) * CHAR_BIT - 1)) + 1;
    static const intmax_t max = -min;

    static_assert(_Xp <= max + _Yp, "overflow in __ll_sub");
public:
    static const intmax_t value = _Xp - _Yp;
};

template <intmax_t _Xp, intmax_t _Yp>
class __ll_mul
{
    static const intmax_t nan = (1LL << (sizeof(intmax_t) * CHAR_BIT - 1));
    static const intmax_t min = nan + 1;
    static const intmax_t max = -min;
    static const intmax_t __a_x = __static_abs<_Xp>::value;
    static const intmax_t __a_y = __static_abs<_Yp>::value;

    static_assert(_Xp != nan && _Yp != nan && __a_x <= max / __a_y, "overflow in __ll_mul");
public:
    static const intmax_t value = _Xp * _Yp;
};

template <intmax_t _Yp>
class __ll_mul<0, _Yp>
{
public:
    static const intmax_t value = 0;
};

template <intmax_t _Xp>
class __ll_mul<_Xp, 0>
{
public:
    static const intmax_t value = 0;
};

template <>
class __ll_mul<0, 0>
{
public:
    static const intmax_t value = 0;
};

// Not actually used but left here in case needed in future maintenance
template <intmax_t _Xp, intmax_t _Yp>
class __ll_div
{
    static const intmax_t nan = (1LL << (sizeof(intmax_t) * CHAR_BIT - 1));
    static const intmax_t min = nan + 1;
    static const intmax_t max = -min;

    static_assert(_Xp != nan && _Yp != nan && _Yp != 0, "overflow in __ll_div");
public:
    static const intmax_t value = _Xp / _Yp;
};

template <intmax_t _Num, intmax_t _Den = 1>
class _LIBCPP_TEMPLATE_VIS ratio
{
    static_assert(__static_abs<_Num>::value >= 0, "ratio numerator is out of range");
    static_assert(_Den != 0, "ratio divide by 0");
    static_assert(__static_abs<_Den>::value >  0, "ratio denominator is out of range");
    static _LIBCPP_CONSTEXPR const intmax_t __na = __static_abs<_Num>::value;
    static _LIBCPP_CONSTEXPR const intmax_t __da = __static_abs<_Den>::value;
    static _LIBCPP_CONSTEXPR const intmax_t __s = __static_sign<_Num>::value * __static_sign<_Den>::value;
    static _LIBCPP_CONSTEXPR const intmax_t __gcd = __static_gcd<__na, __da>::value;
public:
    static _LIBCPP_CONSTEXPR const intmax_t num = __s * __na / __gcd;
    static _LIBCPP_CONSTEXPR const intmax_t den = __da / __gcd;

    typedef ratio<num, den> type;
};

template <intmax_t _Num, intmax_t _Den>
_LIBCPP_CONSTEXPR const intmax_t ratio<_Num, _Den>::num;

template <intmax_t _Num, intmax_t _Den>
_LIBCPP_CONSTEXPR const intmax_t ratio<_Num, _Den>::den;

template <class _Tp>                    struct __is_ratio                     : false_type {};
template <intmax_t _Num, intmax_t _Den> struct __is_ratio<ratio<_Num, _Den> > : true_type  {};

typedef ratio<1LL, 1000000000000000000LL> atto;
typedef ratio<1LL,    1000000000000000LL> femto;
typedef ratio<1LL,       1000000000000LL> pico;
typedef ratio<1LL,          1000000000LL> nano;
typedef ratio<1LL,             1000000LL> micro;
typedef ratio<1LL,                1000LL> milli;
typedef ratio<1LL,                 100LL> centi;
typedef ratio<1LL,                  10LL> deci;
typedef ratio<                 10LL, 1LL> deca;
typedef ratio<                100LL, 1LL> hecto;
typedef ratio<               1000LL, 1LL> kilo;
typedef ratio<            1000000LL, 1LL> mega;
typedef ratio<         1000000000LL, 1LL> giga;
typedef ratio<      1000000000000LL, 1LL> tera;
typedef ratio<   1000000000000000LL, 1LL> peta;
typedef ratio<1000000000000000000LL, 1LL> exa;

template <class _R1, class _R2>
struct __ratio_multiply
{
private:
    static const intmax_t __gcd_n1_d2 = __static_gcd<_R1::num, _R2::den>::value;
    static const intmax_t __gcd_d1_n2 = __static_gcd<_R1::den, _R2::num>::value;
public:
    typedef typename ratio
        <
            __ll_mul<_R1::num / __gcd_n1_d2, _R2::num / __gcd_d1_n2>::value,
            __ll_mul<_R2::den / __gcd_n1_d2, _R1::den / __gcd_d1_n2>::value
        >::type type;
};

#ifndef _LIBCPP_CXX03_LANG

template <class _R1, class _R2> using ratio_multiply
                                    = typename __ratio_multiply<_R1, _R2>::type;

#else  // _LIBCPP_CXX03_LANG
# 316 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3

template <class _R1, class _R2>
struct _LIBCPP_TEMPLATE_VIS ratio_multiply
    : public __ratio_multiply<_R1, _R2>::type {};

#endif // _LIBCPP_CXX03_LANG
# 322 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3

template <class _R1, class _R2>
struct __ratio_divide
{
private:
    static const intmax_t __gcd_n1_n2 = __static_gcd<_R1::num, _R2::num>::value;
    static const intmax_t __gcd_d1_d2 = __static_gcd<_R1::den, _R2::den>::value;
public:
    typedef typename ratio
        <
            __ll_mul<_R1::num / __gcd_n1_n2, _R2::den / __gcd_d1_d2>::value,
            __ll_mul<_R2::num / __gcd_n1_n2, _R1::den / __gcd_d1_d2>::value
        >::type type;
};

#ifndef _LIBCPP_CXX03_LANG

template <class _R1, class _R2> using ratio_divide
                                      = typename __ratio_divide<_R1, _R2>::type;

#else  // _LIBCPP_CXX03_LANG
# 343 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3

template <class _R1, class _R2>
struct _LIBCPP_TEMPLATE_VIS ratio_divide
    : public __ratio_divide<_R1, _R2>::type {};

#endif // _LIBCPP_CXX03_LANG
# 349 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3

template <class _R1, class _R2>
struct __ratio_add
{
private:
    static const intmax_t __gcd_n1_n2 = __static_gcd<_R1::num, _R2::num>::value;
    static const intmax_t __gcd_d1_d2 = __static_gcd<_R1::den, _R2::den>::value;
public:
    typedef typename ratio_multiply
        <
            ratio<__gcd_n1_n2, _R1::den / __gcd_d1_d2>,
            ratio
            <
                __ll_add
                <
                    __ll_mul<_R1::num / __gcd_n1_n2, _R2::den / __gcd_d1_d2>::value,
                    __ll_mul<_R2::num / __gcd_n1_n2, _R1::den / __gcd_d1_d2>::value
                >::value,
                _R2::den
            >
        >::type type;
};

#ifndef _LIBCPP_CXX03_LANG

template <class _R1, class _R2> using ratio_add
                                         = typename __ratio_add<_R1, _R2>::type;

#else  // _LIBCPP_CXX03_LANG
# 378 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3

template <class _R1, class _R2>
struct _LIBCPP_TEMPLATE_VIS ratio_add
    : public __ratio_add<_R1, _R2>::type {};

#endif // _LIBCPP_CXX03_LANG
# 384 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3

template <class _R1, class _R2>
struct __ratio_subtract
{
private:
    static const intmax_t __gcd_n1_n2 = __static_gcd<_R1::num, _R2::num>::value;
    static const intmax_t __gcd_d1_d2 = __static_gcd<_R1::den, _R2::den>::value;
public:
    typedef typename ratio_multiply
        <
            ratio<__gcd_n1_n2, _R1::den / __gcd_d1_d2>,
            ratio
            <
                __ll_sub
                <
                    __ll_mul<_R1::num / __gcd_n1_n2, _R2::den / __gcd_d1_d2>::value,
                    __ll_mul<_R2::num / __gcd_n1_n2, _R1::den / __gcd_d1_d2>::value
                >::value,
                _R2::den
            >
        >::type type;
};

#ifndef _LIBCPP_CXX03_LANG

template <class _R1, class _R2> using ratio_subtract
                                    = typename __ratio_subtract<_R1, _R2>::type;

#else  // _LIBCPP_CXX03_LANG
# 413 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3

template <class _R1, class _R2>
struct _LIBCPP_TEMPLATE_VIS ratio_subtract
    : public __ratio_subtract<_R1, _R2>::type {};

#endif // _LIBCPP_CXX03_LANG
# 419 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3

// ratio_equal

template <class _R1, class _R2>
struct _LIBCPP_TEMPLATE_VIS ratio_equal
    : _BoolConstant<(_R1::num == _R2::num && _R1::den == _R2::den)> {};

template <class _R1, class _R2>
struct _LIBCPP_TEMPLATE_VIS ratio_not_equal
    : _BoolConstant<!ratio_equal<_R1, _R2>::value> {};

// ratio_less

template <class _R1, class _R2, bool _Odd = false,
          intmax_t _Q1 = _R1::num / _R1::den, intmax_t _M1 = _R1::num % _R1::den,
          intmax_t _Q2 = _R2::num / _R2::den, intmax_t _M2 = _R2::num % _R2::den>
struct __ratio_less1
{
    static const bool value = _Odd ? _Q2 < _Q1 : _Q1 < _Q2;
};

template <class _R1, class _R2, bool _Odd, intmax_t _Qp>
struct __ratio_less1<_R1, _R2, _Odd, _Qp, 0, _Qp, 0>
{
    static const bool value = false;
};

template <class _R1, class _R2, bool _Odd, intmax_t _Qp, intmax_t _M2>
struct __ratio_less1<_R1, _R2, _Odd, _Qp, 0, _Qp, _M2>
{
    static const bool value = !_Odd;
};

template <class _R1, class _R2, bool _Odd, intmax_t _Qp, intmax_t _M1>
struct __ratio_less1<_R1, _R2, _Odd, _Qp, _M1, _Qp, 0>
{
    static const bool value = _Odd;
};

template <class _R1, class _R2, bool _Odd, intmax_t _Qp, intmax_t _M1,
                                                        intmax_t _M2>
struct __ratio_less1<_R1, _R2, _Odd, _Qp, _M1, _Qp, _M2>
{
    static const bool value = __ratio_less1<ratio<_R1::den, _M1>,
                                            ratio<_R2::den, _M2>, !_Odd>::value;
};

template <class _R1, class _R2, intmax_t _S1 = __static_sign<_R1::num>::value,
                                intmax_t _S2 = __static_sign<_R2::num>::value>
struct __ratio_less
{
    static const bool value = _S1 < _S2;
};

template <class _R1, class _R2>
struct __ratio_less<_R1, _R2, 1LL, 1LL>
{
    static const bool value = __ratio_less1<_R1, _R2>::value;
};

template <class _R1, class _R2>
struct __ratio_less<_R1, _R2, -1LL, -1LL>
{
    static const bool value = __ratio_less1<ratio<-_R2::num, _R2::den>, ratio<-_R1::num, _R1::den> >::value;
};

template <class _R1, class _R2>
struct _LIBCPP_TEMPLATE_VIS ratio_less
    : _BoolConstant<__ratio_less<_R1, _R2>::value> {};

template <class _R1, class _R2>
struct _LIBCPP_TEMPLATE_VIS ratio_less_equal
    : _BoolConstant<!ratio_less<_R2, _R1>::value> {};

template <class _R1, class _R2>
struct _LIBCPP_TEMPLATE_VIS ratio_greater
    : _BoolConstant<ratio_less<_R2, _R1>::value> {};

template <class _R1, class _R2>
struct _LIBCPP_TEMPLATE_VIS ratio_greater_equal
    : _BoolConstant<!ratio_less<_R1, _R2>::value> {};

template <class _R1, class _R2>
struct __ratio_gcd
{
    typedef ratio<__static_gcd<_R1::num, _R2::num>::value,
                  __static_lcm<_R1::den, _R2::den>::value> type;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 509 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
template <class _R1, class _R2>
inline constexpr bool ratio_equal_v = ratio_equal<_R1, _R2>::value;

template <class _R1, class _R2>
inline constexpr bool ratio_not_equal_v = ratio_not_equal<_R1, _R2>::value;

template <class _R1, class _R2>
inline constexpr bool ratio_less_v = ratio_less<_R1, _R2>::value;

template <class _R1, class _R2>
inline constexpr bool ratio_less_equal_v = ratio_less_equal<_R1, _R2>::value;

template <class _R1, class _R2>
inline constexpr bool ratio_greater_v = ratio_greater<_R1, _R2>::value;

template <class _R1, class _R2>
inline constexpr bool ratio_greater_equal_v = ratio_greater_equal<_R1, _R2>::value;
#endif
# 527 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 533 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 533 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
# 534 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
#endif
# 535 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3

#endif // _LIBCPP_RATIO
# 537 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ratio" 3
#endif /* ratio expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace chrono
{

template <class _Rep, class _Period = ratio<1> > class _LIBCPP_TEMPLATE_VIS duration;

template <class _Tp>
struct __is_duration : false_type {};

template <class _Rep, class _Period>
struct __is_duration<duration<_Rep, _Period> > : true_type  {};

template <class _Rep, class _Period>
struct __is_duration<const duration<_Rep, _Period> > : true_type  {};

template <class _Rep, class _Period>
struct __is_duration<volatile duration<_Rep, _Period> > : true_type  {};

template <class _Rep, class _Period>
struct __is_duration<const volatile duration<_Rep, _Period> > : true_type  {};

} // namespace chrono

template <class _Rep1, class _Period1, class _Rep2, class _Period2>
struct _LIBCPP_TEMPLATE_VIS common_type<chrono::duration<_Rep1, _Period1>,
                                         chrono::duration<_Rep2, _Period2> >
{
    typedef chrono::duration<typename common_type<_Rep1, _Rep2>::type,
                             typename __ratio_gcd<_Period1, _Period2>::type> type;
};

namespace chrono {

// duration_cast

template <class _FromDuration, class _ToDuration,
          class _Period = typename ratio_divide<typename _FromDuration::period, typename _ToDuration::period>::type,
          bool = _Period::num == 1,
          bool = _Period::den == 1>
struct __duration_cast;

template <class _FromDuration, class _ToDuration, class _Period>
struct __duration_cast<_FromDuration, _ToDuration, _Period, true, true>
{
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    _ToDuration operator()(const _FromDuration& __fd) const
    {
        return _ToDuration(static_cast<typename _ToDuration::rep>(__fd.count()));
    }
};

template <class _FromDuration, class _ToDuration, class _Period>
struct __duration_cast<_FromDuration, _ToDuration, _Period, true, false>
{
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    _ToDuration operator()(const _FromDuration& __fd) const
    {
        typedef typename common_type<typename _ToDuration::rep, typename _FromDuration::rep, intmax_t>::type _Ct;
        return _ToDuration(static_cast<typename _ToDuration::rep>(
                           static_cast<_Ct>(__fd.count()) / static_cast<_Ct>(_Period::den)));
    }
};

template <class _FromDuration, class _ToDuration, class _Period>
struct __duration_cast<_FromDuration, _ToDuration, _Period, false, true>
{
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    _ToDuration operator()(const _FromDuration& __fd) const
    {
        typedef typename common_type<typename _ToDuration::rep, typename _FromDuration::rep, intmax_t>::type _Ct;
        return _ToDuration(static_cast<typename _ToDuration::rep>(
                           static_cast<_Ct>(__fd.count()) * static_cast<_Ct>(_Period::num)));
    }
};

template <class _FromDuration, class _ToDuration, class _Period>
struct __duration_cast<_FromDuration, _ToDuration, _Period, false, false>
{
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    _ToDuration operator()(const _FromDuration& __fd) const
    {
        typedef typename common_type<typename _ToDuration::rep, typename _FromDuration::rep, intmax_t>::type _Ct;
        return _ToDuration(static_cast<typename _ToDuration::rep>(
                           static_cast<_Ct>(__fd.count()) * static_cast<_Ct>(_Period::num)
                                                          / static_cast<_Ct>(_Period::den)));
    }
};

template <class _ToDuration, class _Rep, class _Period, __enable_if_t<__is_duration<_ToDuration>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
_ToDuration
duration_cast(const duration<_Rep, _Period>& __fd)
{
    return __duration_cast<duration<_Rep, _Period>, _ToDuration>()(__fd);
}

template <class _Rep>
struct _LIBCPP_TEMPLATE_VIS treat_as_floating_point : is_floating_point<_Rep> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
template <class _Rep>
inline constexpr bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value;
#endif
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3

template <class _Rep>
struct _LIBCPP_TEMPLATE_VIS duration_values
{
public:
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR _Rep zero() _NOEXCEPT {return _Rep(0);}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR _Rep max()  _NOEXCEPT {return numeric_limits<_Rep>::max();}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR _Rep min()  _NOEXCEPT {return numeric_limits<_Rep>::lowest();}
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
template <class _ToDuration, class _Rep, class _Period, enable_if_t<__is_duration<_ToDuration>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
_ToDuration
floor(const duration<_Rep, _Period>& __d)
{
    _ToDuration __t = chrono::duration_cast<_ToDuration>(__d);
    if (__t > __d)
        __t = __t - _ToDuration{1};
    return __t;
}

template <class _ToDuration, class _Rep, class _Period, enable_if_t<__is_duration<_ToDuration>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
_ToDuration
ceil(const duration<_Rep, _Period>& __d)
{
    _ToDuration __t = chrono::duration_cast<_ToDuration>(__d);
    if (__t < __d)
        __t = __t + _ToDuration{1};
    return __t;
}

template <class _ToDuration, class _Rep, class _Period, enable_if_t<__is_duration<_ToDuration>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
_ToDuration
round(const duration<_Rep, _Period>& __d)
{
    _ToDuration __lower = chrono::floor<_ToDuration>(__d);
    _ToDuration __upper = __lower + _ToDuration{1};
    auto __lower_diff   = __d - __lower;
    auto __upper_diff   = __upper - __d;
    if (__lower_diff < __upper_diff)
        return __lower;
    if (__lower_diff > __upper_diff)
        return __upper;
    return __lower.count() & 1 ? __upper : __lower;
}
#endif
# 184 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3

// duration

template <class _Rep, class _Period>
class _LIBCPP_TEMPLATE_VIS duration
{
    static_assert(!__is_duration<_Rep>::value, "A duration representation can not be a duration");
    static_assert(__is_ratio<_Period>::value, "Second template parameter of duration must be a std::ratio");
    static_assert(_Period::num > 0, "duration period must be positive");

    template <class _R1, class _R2>
    struct __no_overflow
    {
    private:
        static const intmax_t __gcd_n1_n2 = __static_gcd<_R1::num, _R2::num>::value;
        static const intmax_t __gcd_d1_d2 = __static_gcd<_R1::den, _R2::den>::value;
        static const intmax_t __n1 = _R1::num / __gcd_n1_n2;
        static const intmax_t __d1 = _R1::den / __gcd_d1_d2;
        static const intmax_t __n2 = _R2::num / __gcd_n1_n2;
        static const intmax_t __d2 = _R2::den / __gcd_d1_d2;
        static const intmax_t max = -((intmax_t(1) << (sizeof(intmax_t) * CHAR_BIT - 1)) + 1);

        template <intmax_t _Xp, intmax_t _Yp, bool __overflow>
        struct __mul    // __overflow == false
        {
            static const intmax_t value = _Xp * _Yp;
        };

        template <intmax_t _Xp, intmax_t _Yp>
        struct __mul<_Xp, _Yp, true>
        {
            static const intmax_t value = 1;
        };

    public:
        static const bool value = (__n1 <= max / __d2) && (__n2 <= max / __d1);
        typedef ratio<__mul<__n1, __d2, !value>::value,
                      __mul<__n2, __d1, !value>::value> type;
    };

public:
    typedef _Rep rep;
    typedef typename _Period::type period;
private:
    rep __rep_;
public:

#ifndef _LIBCPP_CXX03_LANG
        constexpr duration() = default;
#else
# 234 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
        _LIBCPP_HIDE_FROM_ABI duration() {}
#endif
# 236 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3

    template <class _Rep2, __enable_if_t<is_convertible<const _Rep2&, rep>::value &&
                                         (treat_as_floating_point<rep>::value ||
                                          !treat_as_floating_point<_Rep2>::value), int> = 0>
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
        explicit duration(const _Rep2& __r)
                : __rep_(__r) {}

    // conversions
    template <class _Rep2, class _Period2, __enable_if_t<__no_overflow<_Period2, period>::value && (
                                                            treat_as_floating_point<rep>::value ||
                                                            (__no_overflow<_Period2, period>::type::den == 1 &&
                                                             !treat_as_floating_point<_Rep2>::value)), int> = 0>
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
        duration(const duration<_Rep2, _Period2>& __d)
                : __rep_(chrono::duration_cast<duration>(__d).count()) {}

    // observer

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR rep count() const {return __rep_;}

    // arithmetic

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename common_type<duration>::type operator+() const {return typename common_type<duration>::type(*this);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename common_type<duration>::type operator-() const {return typename common_type<duration>::type(-__rep_);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator++()      {++__rep_; return *this;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration  operator++(int)   {return duration(__rep_++);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator--()      {--__rep_; return *this;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration  operator--(int)   {return duration(__rep_--);}

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator+=(const duration& __d) {__rep_ += __d.count(); return *this;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator-=(const duration& __d) {__rep_ -= __d.count(); return *this;}

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator*=(const rep& __rhs) {__rep_ *= __rhs; return *this;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator/=(const rep& __rhs) {__rep_ /= __rhs; return *this;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator%=(const rep& __rhs) {__rep_ %= __rhs; return *this;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 duration& operator%=(const duration& __rhs) {__rep_ %= __rhs.count(); return *this;}

    // special values

    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR duration zero() _NOEXCEPT {return duration(duration_values<rep>::zero());}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR duration min()  _NOEXCEPT {return duration(duration_values<rep>::min());}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR duration max()  _NOEXCEPT {return duration(duration_values<rep>::max());}
};

typedef duration<long long,         nano> nanoseconds;
typedef duration<long long,        micro> microseconds;
typedef duration<long long,        milli> milliseconds;
typedef duration<long long              > seconds;
typedef duration<     long, ratio<  60> > minutes;
typedef duration<     long, ratio<3600> > hours;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 288 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
typedef duration<     int, ratio_multiply<ratio<24>, hours::period>>         days;
typedef duration<     int, ratio_multiply<ratio<7>,   days::period>>         weeks;
typedef duration<     int, ratio_multiply<ratio<146097, 400>, days::period>> years;
typedef duration<     int, ratio_divide<years::period, ratio<12>>>           months;
#endif
# 293 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
// Duration ==

template <class _LhsDuration, class _RhsDuration>
struct __duration_eq
{
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    bool operator()(const _LhsDuration& __lhs, const _RhsDuration& __rhs) const
        {
            typedef typename common_type<_LhsDuration, _RhsDuration>::type _Ct;
            return _Ct(__lhs).count() == _Ct(__rhs).count();
        }
};

template <class _LhsDuration>
struct __duration_eq<_LhsDuration, _LhsDuration>
{
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    bool operator()(const _LhsDuration& __lhs, const _LhsDuration& __rhs) const
        {return __lhs.count() == __rhs.count();}
};

template <class _Rep1, class _Period1, class _Rep2, class _Period2>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
bool
operator==(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
{
    return __duration_eq<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >()(__lhs, __rhs);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 324 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3

// Duration !=

template <class _Rep1, class _Period1, class _Rep2, class _Period2>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
bool
operator!=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
{
    return !(__lhs == __rhs);
}

#endif // _LIBCPP_STD_VER <= 17
# 337 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3

// Duration <

template <class _LhsDuration, class _RhsDuration>
struct __duration_lt
{
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    bool operator()(const _LhsDuration& __lhs, const _RhsDuration& __rhs) const
        {
            typedef typename common_type<_LhsDuration, _RhsDuration>::type _Ct;
            return _Ct(__lhs).count() < _Ct(__rhs).count();
        }
};

template <class _LhsDuration>
struct __duration_lt<_LhsDuration, _LhsDuration>
{
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
    bool operator()(const _LhsDuration& __lhs, const _LhsDuration& __rhs) const
        {return __lhs.count() < __rhs.count();}
};

template <class _Rep1, class _Period1, class _Rep2, class _Period2>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
bool
operator< (const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
{
    return __duration_lt<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >()(__lhs, __rhs);
}

// Duration >

template <class _Rep1, class _Period1, class _Rep2, class _Period2>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
bool
operator> (const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
{
    return __rhs < __lhs;
}

// Duration <=

template <class _Rep1, class _Period1, class _Rep2, class _Period2>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
bool
operator<=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
{
    return !(__rhs < __lhs);
}

// Duration >=

template <class _Rep1, class _Period1, class _Rep2, class _Period2>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
bool
operator>=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
{
    return !(__lhs < __rhs);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 402 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3

template<class _Rep1, class _Period1, class _Rep2, class _Period2>
  requires three_way_comparable<common_type_t<_Rep1, _Rep2>>
_LIBCPP_HIDE_FROM_ABI
constexpr auto operator<=>(const duration<_Rep1, _Period1>& __lhs,
                           const duration<_Rep2, _Period2>& __rhs)
{
    using _Ct = common_type_t<duration<_Rep1, _Period1>, duration<_Rep2, _Period2>>;
    return _Ct(__lhs).count() <=> _Ct(__rhs).count();
}

#endif // _LIBCPP_STD_VER >= 20
# 414 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3

// Duration +

template <class _Rep1, class _Period1, class _Rep2, class _Period2>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
operator+(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
{
    typedef typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type _Cd;
    return _Cd(_Cd(__lhs).count() + _Cd(__rhs).count());
}

// Duration -

template <class _Rep1, class _Period1, class _Rep2, class _Period2>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
operator-(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
{
    typedef typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type _Cd;
    return _Cd(_Cd(__lhs).count() - _Cd(__rhs).count());
}

// Duration *

template <class _Rep1, class _Period, class _Rep2,
          __enable_if_t<is_convertible<_Rep2, typename common_type<_Rep1, _Rep2>::type>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
duration<typename common_type<_Rep1, _Rep2>::type, _Period>
operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
{
    typedef typename common_type<_Rep1, _Rep2>::type _Cr;
    typedef duration<_Cr, _Period> _Cd;
    return _Cd(_Cd(__d).count() * static_cast<_Cr>(__s));
}

template <class _Rep1, class _Period, class _Rep2,
          __enable_if_t<is_convertible<_Rep1, typename common_type<_Rep1, _Rep2>::type>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
duration<typename common_type<_Rep1, _Rep2>::type, _Period>
operator*(const _Rep1& __s, const duration<_Rep2, _Period>& __d)
{
    return __d * __s;
}

// Duration /

template <class _Rep1, class _Period, class _Rep2,
          __enable_if_t<!__is_duration<_Rep2>::value && is_convertible<_Rep2, typename common_type<_Rep1, _Rep2>::type>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
duration<typename common_type<_Rep1, _Rep2>::type, _Period>
operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
{
    typedef typename common_type<_Rep1, _Rep2>::type _Cr;
    typedef duration<_Cr, _Period> _Cd;
    return _Cd(_Cd(__d).count() / static_cast<_Cr>(__s));
}

template <class _Rep1, class _Period1, class _Rep2, class _Period2>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
typename common_type<_Rep1, _Rep2>::type
operator/(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
{
    typedef typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type _Ct;
    return _Ct(__lhs).count() / _Ct(__rhs).count();
}

// Duration %

template <class _Rep1, class _Period, class _Rep2,
          __enable_if_t<!__is_duration<_Rep2>::value && is_convertible<_Rep2, typename common_type<_Rep1, _Rep2>::type>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
duration<typename common_type<_Rep1, _Rep2>::type, _Period>
operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
{
    typedef typename common_type<_Rep1, _Rep2>::type _Cr;
    typedef duration<_Cr, _Period> _Cd;
    return _Cd(_Cd(__d).count() % static_cast<_Cr>(__s));
}

template <class _Rep1, class _Period1, class _Rep2, class _Period2>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
operator%(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
{
    typedef typename common_type<_Rep1, _Rep2>::type _Cr;
    typedef typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type _Cd;
    return _Cd(static_cast<_Cr>(_Cd(__lhs).count()) % static_cast<_Cr>(_Cd(__rhs).count()));
}

} // namespace chrono

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 515 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
// Suffixes for duration literals [time.duration.literals]
inline namespace literals
{
  inline namespace chrono_literals
  {

    _LIBCPP_HIDE_FROM_ABI constexpr chrono::hours operator""h(unsigned long long __h)
    {
        return chrono::hours(static_cast<chrono::hours::rep>(__h));
    }

    _LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double, ratio<3600,1>> operator""h(long double __h)
    {
        return chrono::duration<long double, ratio<3600,1>>(__h);
    }


    _LIBCPP_HIDE_FROM_ABI constexpr chrono::minutes operator""min(unsigned long long __m)
    {
        return chrono::minutes(static_cast<chrono::minutes::rep>(__m));
    }

    _LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double, ratio<60,1>> operator""min(long double __m)
    {
        return chrono::duration<long double, ratio<60,1>> (__m);
    }


    _LIBCPP_HIDE_FROM_ABI constexpr chrono::seconds operator""s(unsigned long long __s)
    {
        return chrono::seconds(static_cast<chrono::seconds::rep>(__s));
    }

    _LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double> operator""s(long double __s)
    {
        return chrono::duration<long double> (__s);
    }


    _LIBCPP_HIDE_FROM_ABI constexpr chrono::milliseconds operator""ms(unsigned long long __ms)
    {
        return chrono::milliseconds(static_cast<chrono::milliseconds::rep>(__ms));
    }

    _LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double, milli> operator""ms(long double __ms)
    {
        return chrono::duration<long double, milli>(__ms);
    }


    _LIBCPP_HIDE_FROM_ABI constexpr chrono::microseconds operator""us(unsigned long long __us)
    {
        return chrono::microseconds(static_cast<chrono::microseconds::rep>(__us));
    }

    _LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double, micro> operator""us(long double __us)
    {
        return chrono::duration<long double, micro> (__us);
    }


    _LIBCPP_HIDE_FROM_ABI constexpr chrono::nanoseconds operator""ns(unsigned long long __ns)
    {
        return chrono::nanoseconds(static_cast<chrono::nanoseconds::rep>(__ns));
    }

    _LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double, nano> operator""ns(long double __ns)
    {
        return chrono::duration<long double, nano> (__ns);
    }

} // namespace chrono_literals
} // namespace literals

namespace chrono { // hoist the literals into namespace std::chrono
   using namespace literals::chrono_literals;
} // namespace chrono

#endif // _LIBCPP_STD_VER >= 14
# 594 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 600 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 600 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
# 601 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
#endif
# 602 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3

#endif // _LIBCPP___CHRONO_DURATION_H
# 604 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/duration.h" 3
#endif /* duration.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* poll_with_backoff.h expanded by -frewrite-includes */
#include <__thread/poll_with_backoff.h>
#else /* poll_with_backoff.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/poll_with_backoff.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___THREAD_POLL_WITH_BACKOFF_H
#define _LIBCPP___THREAD_POLL_WITH_BACKOFF_H

#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/poll_with_backoff.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/poll_with_backoff.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__chrono/duration.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/poll_with_backoff.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/poll_with_backoff.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* high_resolution_clock.h expanded by -frewrite-includes */
#include <__chrono/high_resolution_clock.h>
#else /* high_resolution_clock.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/poll_with_backoff.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/high_resolution_clock.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CHRONO_HIGH_RESOLUTION_CLOCK_H
#define _LIBCPP___CHRONO_HIGH_RESOLUTION_CLOCK_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* steady_clock.h expanded by -frewrite-includes */
#include <__chrono/steady_clock.h>
#else /* steady_clock.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/high_resolution_clock.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/steady_clock.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CHRONO_STEADY_CLOCK_H
#define _LIBCPP___CHRONO_STEADY_CLOCK_H

#if 0 /* expanded by -frewrite-includes */
#include <__chrono/duration.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/steady_clock.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/steady_clock.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* time_point.h expanded by -frewrite-includes */
#include <__chrono/time_point.h>
#else /* time_point.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/steady_clock.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CHRONO_TIME_POINT_H
#define _LIBCPP___CHRONO_TIME_POINT_H

#if 0 /* expanded by -frewrite-includes */
#include <__chrono/duration.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/three_way_comparable.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace chrono
{

template <class _Clock, class _Duration = typename _Clock::duration>
class _LIBCPP_TEMPLATE_VIS time_point
{
    static_assert(__is_duration<_Duration>::value,
                  "Second template parameter of time_point must be a std::chrono::duration");
public:
    typedef _Clock                    clock;
    typedef _Duration                 duration;
    typedef typename duration::rep    rep;
    typedef typename duration::period period;
private:
    duration __d_;

public:
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 time_point() : __d_(duration::zero()) {}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit time_point(const duration& __d) : __d_(__d) {}

    // conversions
    template <class _Duration2, __enable_if_t<is_convertible<_Duration2, duration>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
    time_point(const time_point<clock, _Duration2>& __t)
            : __d_(__t.time_since_epoch()) {}

    // observer

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 duration time_since_epoch() const {return __d_;}

    // arithmetic

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 time_point& operator+=(const duration& __d) {__d_ += __d; return *this;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 time_point& operator-=(const duration& __d) {__d_ -= __d; return *this;}

    // special values

    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR time_point min() _NOEXCEPT {return time_point(duration::min());}
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR time_point max() _NOEXCEPT {return time_point(duration::max());}
};

} // namespace chrono

template <class _Clock, class _Duration1, class _Duration2>
struct _LIBCPP_TEMPLATE_VIS common_type<chrono::time_point<_Clock, _Duration1>,
                                         chrono::time_point<_Clock, _Duration2> >
{
    typedef chrono::time_point<_Clock, typename common_type<_Duration1, _Duration2>::type> type;
};

namespace chrono {

template <class _ToDuration, class _Clock, class _Duration>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
time_point<_Clock, _ToDuration>
time_point_cast(const time_point<_Clock, _Duration>& __t)
{
    return time_point<_Clock, _ToDuration>(chrono::duration_cast<_ToDuration>(__t.time_since_epoch()));
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
template <class _ToDuration, class _Clock, class _Duration, enable_if_t<__is_duration<_ToDuration>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
time_point<_Clock, _ToDuration>
floor(const time_point<_Clock, _Duration>& __t)
{
    return time_point<_Clock, _ToDuration>{chrono::floor<_ToDuration>(__t.time_since_epoch())};
}

template <class _ToDuration, class _Clock, class _Duration, enable_if_t<__is_duration<_ToDuration>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
time_point<_Clock, _ToDuration>
ceil(const time_point<_Clock, _Duration>& __t)
{
    return time_point<_Clock, _ToDuration>{chrono::ceil<_ToDuration>(__t.time_since_epoch())};
}

template <class _ToDuration, class _Clock, class _Duration, enable_if_t<__is_duration<_ToDuration>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
time_point<_Clock, _ToDuration>
round(const time_point<_Clock, _Duration>& __t)
{
    return time_point<_Clock, _ToDuration>{chrono::round<_ToDuration>(__t.time_since_epoch())};
}

template <class _Rep, class _Period, enable_if_t<numeric_limits<_Rep>::is_signed, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
duration<_Rep, _Period>
abs(duration<_Rep, _Period> __d)
{
    return __d >= __d.zero() ? +__d : -__d;
}
#endif // _LIBCPP_STD_VER >= 17
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3

// time_point ==

template <class _Clock, class _Duration1, class _Duration2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator==(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
    return __lhs.time_since_epoch() == __rhs.time_since_epoch();
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3

// time_point !=

template <class _Clock, class _Duration1, class _Duration2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator!=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
    return !(__lhs == __rhs);
}

#endif // _LIBCPP_STD_VER <= 17
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3

// time_point <

template <class _Clock, class _Duration1, class _Duration2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator<(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
    return __lhs.time_since_epoch() < __rhs.time_since_epoch();
}

// time_point >

template <class _Clock, class _Duration1, class _Duration2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator>(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
    return __rhs < __lhs;
}

// time_point <=

template <class _Clock, class _Duration1, class _Duration2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator<=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
    return !(__rhs < __lhs);
}

// time_point >=

template <class _Clock, class _Duration1, class _Duration2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
bool
operator>=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
    return !(__lhs < __rhs);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3

template <class _Clock, class _Duration1, three_way_comparable_with<_Duration1> _Duration2>
_LIBCPP_HIDE_FROM_ABI constexpr auto
operator<=>(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs) {
    return __lhs.time_since_epoch() <=> __rhs.time_since_epoch();
}

#endif // _LIBCPP_STD_VER >= 20
# 198 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3

// time_point operator+(time_point x, duration y);

template <class _Clock, class _Duration1, class _Rep2, class _Period2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
operator+(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
{
    typedef time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type> _Tr;
    return _Tr (__lhs.time_since_epoch() + __rhs);
}

// time_point operator+(duration x, time_point y);

template <class _Rep1, class _Period1, class _Clock, class _Duration2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
time_point<_Clock, typename common_type<duration<_Rep1, _Period1>, _Duration2>::type>
operator+(const duration<_Rep1, _Period1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
    return __rhs + __lhs;
}

// time_point operator-(time_point x, duration y);

template <class _Clock, class _Duration1, class _Rep2, class _Period2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
operator-(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
{
    typedef time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type> _Ret;
    return _Ret(__lhs.time_since_epoch() -__rhs);
}

// duration operator-(time_point x, time_point y);

template <class _Clock, class _Duration1, class _Duration2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
typename common_type<_Duration1, _Duration2>::type
operator-(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
{
    return __lhs.time_since_epoch() - __rhs.time_since_epoch();
}

} // namespace chrono

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___CHRONO_TIME_POINT_H
# 248 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/time_point.h" 3
#endif /* time_point.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/steady_clock.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/steady_clock.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/steady_clock.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/steady_clock.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/steady_clock.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/steady_clock.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace chrono
{

#ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK
class _LIBCPP_EXPORTED_FROM_ABI steady_clock
{
public:
    typedef nanoseconds                                   duration;
    typedef duration::rep                                 rep;
    typedef duration::period                              period;
    typedef chrono::time_point<steady_clock, duration>    time_point;
    static _LIBCPP_CONSTEXPR_SINCE_CXX14 const bool is_steady = true;

    static time_point now() _NOEXCEPT;
};
#endif
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/steady_clock.h" 3

} // namespace chrono

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CHRONO_STEADY_CLOCK_H
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/steady_clock.h" 3
#endif /* steady_clock.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/high_resolution_clock.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* system_clock.h expanded by -frewrite-includes */
#include <__chrono/system_clock.h>
#else /* system_clock.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/high_resolution_clock.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/system_clock.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CHRONO_SYSTEM_CLOCK_H
#define _LIBCPP___CHRONO_SYSTEM_CLOCK_H

#if 0 /* expanded by -frewrite-includes */
#include <__chrono/duration.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/system_clock.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/system_clock.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__chrono/time_point.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/system_clock.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/system_clock.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/system_clock.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/system_clock.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ctime expanded by -frewrite-includes */
#include <ctime>
#else /* ctime expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/system_clock.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CTIME
#define _LIBCPP_CTIME

/*
    ctime synopsis

Macros:

    NULL
    CLOCKS_PER_SEC
    TIME_UTC // C++17

namespace std
{

Types:

    clock_t
    size_t
    time_t
    tm
    timespec // C++17

clock_t clock();
double difftime(time_t time1, time_t time0);
time_t mktime(tm* timeptr);
time_t time(time_t* timer);
char* asctime(const tm* timeptr);
char* ctime(const time_t* timer);
tm*    gmtime(const time_t* timer);
tm* localtime(const time_t* timer);
size_t strftime(char* restrict s, size_t maxsize, const char* restrict format,
                const tm* restrict timeptr);
int timespec_get( struct timespec *ts, int base); // C++17
}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3

// <time.h> is not provided by libc++
#if 0 /* disabled by -frewrite-includes */
#if __has_include(<time.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* time.h expanded by -frewrite-includes */
#  include <time.h>
#else /* time.h expanded by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3
# 1 "gen/zircon/public/sysroot/cpp/include/time.h" 1 3 4
#ifndef SYSROOT_TIME_H_
#define SYSROOT_TIME_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <bits/null.h>
#endif /* expanded by -frewrite-includes */
# 10 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4
# 11 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4

#define __NEED_size_t
#define __NEED_time_t
#define __NEED_clock_t
#define __NEED_struct_timespec

#if 0 /* disabled by -frewrite-includes */
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
    defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4
#define __NEED_clockid_t
#define __NEED_timer_t
#define __NEED_pid_t
#endif
# 23 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 24 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 25 "gen/zircon/public/sysroot/cpp/include/time.h" 2 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4
#define __tm_gmtoff tm_gmtoff
#define __tm_zone tm_zone
#endif
# 30 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4

struct tm {
  int tm_sec;
  int tm_min;
  int tm_hour;
  int tm_mday;
  int tm_mon;
  int tm_year;
  int tm_wday;
  int tm_yday;
  int tm_isdst;
  long __tm_gmtoff;
  const char* __tm_zone;
};

clock_t clock(void);
time_t time(time_t*);
double difftime(time_t, time_t);
time_t mktime(struct tm*);
size_t strftime(char* __restrict, size_t, const char* __restrict, const struct tm* __restrict);
struct tm* gmtime(const time_t*);
struct tm* localtime(const time_t*);
char* asctime(const struct tm*);
char* ctime(const time_t*);
int timespec_get(struct timespec*, int);

#define CLOCKS_PER_SEC 1000000L

#define TIME_UTC 1

#if 0 /* disabled by -frewrite-includes */
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
    defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 62 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4

struct tm* gmtime_r(const time_t* __restrict, struct tm* __restrict);
struct tm* localtime_r(const time_t* __restrict, struct tm* __restrict);
char* asctime_r(const struct tm* __restrict, char* __restrict);
char* ctime_r(const time_t*, char*);

void tzset(void);

struct itimerspec {
  struct timespec it_interval;
  struct timespec it_value;
};

#define CLOCK_REALTIME 0
#define CLOCK_MONOTONIC 1
#define CLOCK_PROCESS_CPUTIME_ID 2
#define CLOCK_THREAD_CPUTIME_ID 3
#define CLOCK_MONOTONIC_RAW 4
#define CLOCK_REALTIME_COARSE 5
#define CLOCK_MONOTONIC_COARSE 6
#define CLOCK_BOOTTIME 7
#define CLOCK_REALTIME_ALARM 8
#define CLOCK_BOOTTIME_ALARM 9
#define CLOCK_SGI_CYCLE 10
#define CLOCK_TAI 11

#define TIMER_ABSTIME 1

int nanosleep(const struct timespec*, struct timespec*);
int clock_getres(clockid_t, struct timespec*);
int clock_gettime(clockid_t, struct timespec*);
int clock_settime(clockid_t, const struct timespec*);
int clock_nanosleep(clockid_t, int, const struct timespec*, struct timespec*);
int clock_getcpuclockid(pid_t, clockid_t*);

struct sigevent;
int timer_create(clockid_t, struct sigevent* __restrict, timer_t* __restrict);
int timer_delete(timer_t);
int timer_settime(timer_t, int, const struct itimerspec* __restrict, struct itimerspec* __restrict);
int timer_gettime(timer_t, struct itimerspec*);
int timer_getoverrun(timer_t);

#endif
# 105 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_XOPEN_SOURCE) || defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 107 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4
char* strptime(const char* __restrict, const char* __restrict, struct tm* __restrict);
extern int daylight;
extern long timezone;
extern char* tzname[2];
extern int getdate_err;
struct tm* getdate(const char*);
#endif
# 114 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 116 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4
int stime(const time_t*);
time_t timegm(struct tm*);
#endif
# 119 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4

#ifdef __cplusplus
}
#endif
# 123 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4

#endif  // SYSROOT_TIME_H_
# 125 "gen/zircon/public/sysroot/cpp/include/time.h" 3 4
#endif /* time.h expanded by -frewrite-includes */
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 2 3
#  ifdef _LIBCPP_TIME_H
#    error "If libc++ starts defining <time.h>, the __has_include check should move to libc++'s <time.h>"
#  endif
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3
#endif
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3
#endif
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3

_LIBCPP_BEGIN_NAMESPACE_STD

using ::clock_t _LIBCPP_USING_IF_EXISTS;
using ::size_t _LIBCPP_USING_IF_EXISTS;
using ::time_t _LIBCPP_USING_IF_EXISTS;
using ::tm _LIBCPP_USING_IF_EXISTS;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3
using ::timespec _LIBCPP_USING_IF_EXISTS;
#endif
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3
using ::clock _LIBCPP_USING_IF_EXISTS;
using ::difftime _LIBCPP_USING_IF_EXISTS;
using ::mktime _LIBCPP_USING_IF_EXISTS;
using ::time _LIBCPP_USING_IF_EXISTS;
using ::asctime _LIBCPP_USING_IF_EXISTS;
using ::ctime _LIBCPP_USING_IF_EXISTS;
using ::gmtime _LIBCPP_USING_IF_EXISTS;
using ::localtime _LIBCPP_USING_IF_EXISTS;
using ::strftime _LIBCPP_USING_IF_EXISTS;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3
using ::timespec_get _LIBCPP_USING_IF_EXISTS;
#endif
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_CTIME
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ctime" 3
#endif /* ctime expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/system_clock.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/system_clock.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/system_clock.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/system_clock.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace chrono
{

class _LIBCPP_EXPORTED_FROM_ABI system_clock
{
public:
    typedef microseconds                     duration;
    typedef duration::rep                    rep;
    typedef duration::period                 period;
    typedef chrono::time_point<system_clock> time_point;
    static _LIBCPP_CONSTEXPR_SINCE_CXX14 const bool is_steady = false;

    static time_point now() _NOEXCEPT;
    static time_t     to_time_t  (const time_point& __t) _NOEXCEPT;
    static time_point from_time_t(time_t __t) _NOEXCEPT;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/system_clock.h" 3

template <class _Duration>
using sys_time    = time_point<system_clock, _Duration>;
using sys_seconds = sys_time<seconds>;
using sys_days    = sys_time<days>;

#endif
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/system_clock.h" 3

} // namespace chrono

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CHRONO_SYSTEM_CLOCK_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/system_clock.h" 3
#endif /* system_clock.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/high_resolution_clock.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/high_resolution_clock.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/high_resolution_clock.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/high_resolution_clock.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/high_resolution_clock.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/high_resolution_clock.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace chrono
{

#ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK
typedef steady_clock high_resolution_clock;
#else
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/high_resolution_clock.h" 3
typedef system_clock high_resolution_clock;
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/high_resolution_clock.h" 3

} // namespace chrono

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CHRONO_HIGH_RESOLUTION_CLOCK_H
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/high_resolution_clock.h" 3
#endif /* high_resolution_clock.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/poll_with_backoff.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/poll_with_backoff.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/poll_with_backoff.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/poll_with_backoff.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/poll_with_backoff.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/poll_with_backoff.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

static _LIBCPP_CONSTEXPR const int __libcpp_polling_count = 64;

// Polls a thread for a condition given by a predicate, and backs off based on a backoff policy
// before polling again.
//
// - __f is the "test function" that should return true if polling succeeded, and false if it failed.
//
// - __bf is the "backoff policy", which is called with the duration since we started polling. It should
//   return false in order to resume polling, and true if polling should stop entirely for some reason.
//   In general, backoff policies sleep for some time before returning control to the polling loop.
//
// - __max_elapsed is the maximum duration to try polling for. If the maximum duration is exceeded,
//   the polling loop will return false to report a timeout.
template<class _Fn, class _BFn>
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
bool __libcpp_thread_poll_with_backoff(_Fn&& __f, _BFn&& __bf, chrono::nanoseconds __max_elapsed = chrono::nanoseconds::zero()) {
    auto const __start = chrono::high_resolution_clock::now();
    for (int __count = 0;;) {
      if (__f())
        return true; // _Fn completion means success
      if (__count < __libcpp_polling_count) {
        __count += 1;
        continue;
      }
      chrono::nanoseconds const __elapsed = chrono::high_resolution_clock::now() - __start;
      if (__max_elapsed != chrono::nanoseconds::zero() && __max_elapsed < __elapsed)
          return false; // timeout failure
      if (__bf(__elapsed))
        return false; // _BFn completion means failure
    }
}

// A trivial backoff policy that always immediately returns the control to
// the polling loop.
//
// This is not very well-behaved since it will cause the polling loop to spin,
// so this should most likely only be used on single-threaded systems where there
// are no other threads to compete with.
struct __spinning_backoff_policy {
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
  bool operator()(chrono::nanoseconds const&) const {
      return false;
  }
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___THREAD_POLL_WITH_BACKOFF_H
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/poll_with_backoff.h" 3
#endif /* poll_with_backoff.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __threading_support expanded by -frewrite-includes */
#include <__threading_support>
#else /* __threading_support expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___THREADING_SUPPORT
#define _LIBCPP___THREADING_SUPPORT

#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* convert_to_timespec.h expanded by -frewrite-includes */
#include <__chrono/convert_to_timespec.h>
#else /* convert_to_timespec.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/convert_to_timespec.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CHRONO_CONVERT_TO_TIMESPEC_H
#define _LIBCPP___CHRONO_CONVERT_TO_TIMESPEC_H

#if 0 /* expanded by -frewrite-includes */
#include <__chrono/duration.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/convert_to_timespec.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/convert_to_timespec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/convert_to_timespec.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/convert_to_timespec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/convert_to_timespec.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/convert_to_timespec.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/convert_to_timespec.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/convert_to_timespec.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/convert_to_timespec.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/convert_to_timespec.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/convert_to_timespec.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Convert a nanoseconds duration to the given TimeSpec type, which must have
// the same properties as std::timespec.
template <class _TimeSpec>
_LIBCPP_HIDE_FROM_ABI inline
_TimeSpec __convert_to_timespec(const chrono::nanoseconds& __ns)
{
  using namespace chrono;
  seconds __s = duration_cast<seconds>(__ns);
  _TimeSpec __ts;
  typedef decltype(__ts.tv_sec) __ts_sec;
  const __ts_sec __ts_sec_max = numeric_limits<__ts_sec>::max();

  if (__s.count() < __ts_sec_max)
  {
    __ts.tv_sec = static_cast<__ts_sec>(__s.count());
    __ts.tv_nsec = static_cast<decltype(__ts.tv_nsec)>((__ns - __s).count());
  }
  else
  {
    __ts.tv_sec = __ts_sec_max;
    __ts.tv_nsec = 999999999; // (10^9 - 1)
  }

  return __ts;
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___CHRONO_CONVERT_TO_TIMESPEC_H
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__chrono/convert_to_timespec.h" 3
#endif /* convert_to_timespec.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__chrono/duration.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/hash.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
#if 0 /* expanded by -frewrite-includes */
#include <ctime>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* errno.h expanded by -frewrite-includes */
#include <errno.h>
#else /* errno.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_ERRNO_H
#define _LIBCPP_ERRNO_H

/*
    errno.h synopsis

Macros:

    EDOM
    EILSEQ  // C99
    ERANGE
    errno

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#if 0 /* disabled by -frewrite-includes */
#if __has_include_next(<errno.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* errno.h expanded by -frewrite-includes */
#  include_next <errno.h>
#else /* errno.h expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3
# 1 "gen/zircon/public/sysroot/cpp/include/errno.h" 1 3 4
#ifndef SYSROOT_ERRNO_H_
#define SYSROOT_ERRNO_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/errno.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/errno.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/errno.h" 3 4

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* errno.h expanded by -frewrite-includes */
#include <bits/errno.h>
#else /* errno.h expanded by -frewrite-includes */
# 10 "gen/zircon/public/sysroot/cpp/include/errno.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/errno.h" 1 3 4
#define EPERM 1
#define ENOENT 2
#define ESRCH 3
#define EINTR 4
#define EIO 5
#define ENXIO 6
#define E2BIG 7
#define ENOEXEC 8
#define EBADF 9
#define ECHILD 10
#define EAGAIN 11
#define ENOMEM 12
#define EACCES 13
#define EFAULT 14
#define ENOTBLK 15
#define EBUSY 16
#define EEXIST 17
#define EXDEV 18
#define ENODEV 19
#define ENOTDIR 20
#define EISDIR 21
#define EINVAL 22
#define ENFILE 23
#define EMFILE 24
#define ENOTTY 25
#define ETXTBSY 26
#define EFBIG 27
#define ENOSPC 28
#define ESPIPE 29
#define EROFS 30
#define EMLINK 31
#define EPIPE 32
#define EDOM 33
#define ERANGE 34
#define EDEADLK 35
#define ENAMETOOLONG 36
#define ENOLCK 37
#define ENOSYS 38
#define ENOTEMPTY 39
#define ELOOP 40
#define EWOULDBLOCK EAGAIN
#define ENOMSG 42
#define EIDRM 43
#define ECHRNG 44
#define EL2NSYNC 45
#define EL3HLT 46
#define EL3RST 47
#define ELNRNG 48
#define EUNATCH 49
#define ENOCSI 50
#define EL2HLT 51
#define EBADE 52
#define EBADR 53
#define EXFULL 54
#define ENOANO 55
#define EBADRQC 56
#define EBADSLT 57
#define EDEADLOCK EDEADLK
#define EBFONT 59
#define ENOSTR 60
#define ENODATA 61
#define ETIME 62
#define ENOSR 63
#define ENONET 64
#define ENOPKG 65
#define EREMOTE 66
#define ENOLINK 67
#define EADV 68
#define ESRMNT 69
#define ECOMM 70
#define EPROTO 71
#define EMULTIHOP 72
#define EDOTDOT 73
#define EBADMSG 74
#define EOVERFLOW 75
#define ENOTUNIQ 76
#define EBADFD 77
#define EREMCHG 78
#define ELIBACC 79
#define ELIBBAD 80
#define ELIBSCN 81
#define ELIBMAX 82
#define ELIBEXEC 83
#define EILSEQ 84
#define ERESTART 85
#define ESTRPIPE 86
#define EUSERS 87
#define ENOTSOCK 88
#define EDESTADDRREQ 89
#define EMSGSIZE 90
#define EPROTOTYPE 91
#define ENOPROTOOPT 92
#define EPROTONOSUPPORT 93
#define ESOCKTNOSUPPORT 94
#define EOPNOTSUPP 95
#define ENOTSUP EOPNOTSUPP
#define EPFNOSUPPORT 96
#define EAFNOSUPPORT 97
#define EADDRINUSE 98
#define EADDRNOTAVAIL 99
#define ENETDOWN 100
#define ENETUNREACH 101
#define ENETRESET 102
#define ECONNABORTED 103
#define ECONNRESET 104
#define ENOBUFS 105
#define EISCONN 106
#define ENOTCONN 107
#define ESHUTDOWN 108
#define ETOOMANYREFS 109
#define ETIMEDOUT 110
#define ECONNREFUSED 111
#define EHOSTDOWN 112
#define EHOSTUNREACH 113
#define EALREADY 114
#define EINPROGRESS 115
#define ESTALE 116
#define EUCLEAN 117
#define ENOTNAM 118
#define ENAVAIL 119
#define EISNAM 120
#define EREMOTEIO 121
#define EDQUOT 122
#define ENOMEDIUM 123
#define EMEDIUMTYPE 124
#define ECANCELED 125
#define ENOKEY 126
#define EKEYEXPIRED 127
#define EKEYREVOKED 128
#define EKEYREJECTED 129
#define EOWNERDEAD 130
#define ENOTRECOVERABLE 131
#define ERFKILL 132
#define EHWPOISON 133
#endif /* errno.h expanded by -frewrite-includes */
# 11 "gen/zircon/public/sysroot/cpp/include/errno.h" 2 3 4

int* __errno_location(void);
#define errno (*__errno_location())

#ifdef _GNU_SOURCE
extern char *program_invocation_short_name, *program_invocation_name;
#endif
# 18 "gen/zircon/public/sysroot/cpp/include/errno.h" 3 4

#ifdef __cplusplus
}
#endif
# 22 "gen/zircon/public/sysroot/cpp/include/errno.h" 3 4

#endif  // SYSROOT_ERRNO_H_
# 24 "gen/zircon/public/sysroot/cpp/include/errno.h" 3 4
#endif /* errno.h expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 2 3
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifdef __cplusplus

#if 0 /* disabled by -frewrite-includes */
#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifdef ELAST

static const int __elast1 = ELAST+1;
static const int __elast2 = ELAST+2;

#else
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

static const int __elast1 = 104;
static const int __elast2 = 105;

#endif
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifdef ENOTRECOVERABLE

#define EOWNERDEAD __elast1

#ifdef ELAST
#undef ELAST
#define ELAST EOWNERDEAD
#endif
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(EOWNERDEAD)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#define ENOTRECOVERABLE __elast1
#ifdef ELAST
#undef ELAST
#define ELAST ENOTRECOVERABLE
#endif
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#else  // defined(EOWNERDEAD)
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#define EOWNERDEAD __elast1
#define ENOTRECOVERABLE __elast2
#ifdef ELAST
#undef ELAST
#define ELAST ENOTRECOVERABLE
#endif
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#endif // defined(EOWNERDEAD)
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

//  supply errno values likely to be missing, particularly on Windows

#ifndef EAFNOSUPPORT
#define EAFNOSUPPORT 9901
#endif
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EADDRINUSE
#define EADDRINUSE 9902
#endif
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EADDRNOTAVAIL
#define EADDRNOTAVAIL 9903
#endif
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EISCONN
#define EISCONN 9904
#endif
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EBADMSG
#define EBADMSG 9905
#endif
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ECONNABORTED
#define ECONNABORTED 9906
#endif
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EALREADY
#define EALREADY 9907
#endif
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ECONNREFUSED
#define ECONNREFUSED 9908
#endif
# 114 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ECONNRESET
#define ECONNRESET 9909
#endif
# 118 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EDESTADDRREQ
#define EDESTADDRREQ 9910
#endif
# 122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EHOSTUNREACH
#define EHOSTUNREACH 9911
#endif
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EIDRM
#define EIDRM 9912
#endif
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EMSGSIZE
#define EMSGSIZE 9913
#endif
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENETDOWN
#define ENETDOWN 9914
#endif
# 138 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENETRESET
#define ENETRESET 9915
#endif
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENETUNREACH
#define ENETUNREACH 9916
#endif
# 146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOBUFS
#define ENOBUFS 9917
#endif
# 150 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOLINK
#define ENOLINK 9918
#endif
# 154 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENODATA
#define ENODATA 9919
#endif
# 158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOMSG
#define ENOMSG 9920
#endif
# 162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOPROTOOPT
#define ENOPROTOOPT 9921
#endif
# 166 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOSR
#define ENOSR 9922
#endif
# 170 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOTSOCK
#define ENOTSOCK 9923
#endif
# 174 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOSTR
#define ENOSTR 9924
#endif
# 178 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOTCONN
#define ENOTCONN 9925
#endif
# 182 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOTSUP
#define ENOTSUP 9926
#endif
# 186 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ECANCELED
#define ECANCELED 9927
#endif
# 190 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EINPROGRESS
#define EINPROGRESS 9928
#endif
# 194 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EOPNOTSUPP
#define EOPNOTSUPP 9929
#endif
# 198 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EWOULDBLOCK
#define EWOULDBLOCK 9930
#endif
# 202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EOWNERDEAD
#define EOWNERDEAD  9931
#endif
# 206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EPROTO
#define EPROTO 9932
#endif
# 210 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EPROTONOSUPPORT
#define EPROTONOSUPPORT 9933
#endif
# 214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOTRECOVERABLE
#define ENOTRECOVERABLE 9934
#endif
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ETIME
#define ETIME 9935
#endif
# 222 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ETXTBSY
#define ETXTBSY 9936
#endif
# 226 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ETIMEDOUT
#define ETIMEDOUT 9938
#endif
# 230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ELOOP
#define ELOOP 9939
#endif
# 234 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EOVERFLOW
#define EOVERFLOW 9940
#endif
# 238 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EPROTOTYPE
#define EPROTOTYPE 9941
#endif
# 242 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOSYS
#define ENOSYS 9942
#endif
# 246 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EINVAL
#define EINVAL 9943
#endif
# 250 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ERANGE
#define ERANGE 9944
#endif
# 254 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EILSEQ
#define EILSEQ 9945
#endif
# 258 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

//  Windows Mobile doesn't appear to define these:

#ifndef E2BIG
#define E2BIG 9946
#endif
# 264 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EDOM
#define EDOM 9947
#endif
# 268 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EFAULT
#define EFAULT 9948
#endif
# 272 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EBADF
#define EBADF 9949
#endif
# 276 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EPIPE
#define EPIPE 9950
#endif
# 280 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EXDEV
#define EXDEV 9951
#endif
# 284 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EBUSY
#define EBUSY 9952
#endif
# 288 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOTEMPTY
#define ENOTEMPTY 9953
#endif
# 292 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOEXEC
#define ENOEXEC 9954
#endif
# 296 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EEXIST
#define EEXIST 9955
#endif
# 300 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EFBIG
#define EFBIG 9956
#endif
# 304 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENAMETOOLONG
#define ENAMETOOLONG 9957
#endif
# 308 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOTTY
#define ENOTTY 9958
#endif
# 312 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EINTR
#define EINTR 9959
#endif
# 316 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ESPIPE
#define ESPIPE 9960
#endif
# 320 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EIO
#define EIO 9961
#endif
# 324 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EISDIR
#define EISDIR 9962
#endif
# 328 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ECHILD
#define ECHILD 9963
#endif
# 332 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOLCK
#define ENOLCK 9964
#endif
# 336 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOSPC
#define ENOSPC 9965
#endif
# 340 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENXIO
#define ENXIO 9966
#endif
# 344 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENODEV
#define ENODEV 9967
#endif
# 348 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOENT
#define ENOENT 9968
#endif
# 352 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ESRCH
#define ESRCH 9969
#endif
# 356 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOTDIR
#define ENOTDIR 9970
#endif
# 360 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENOMEM
#define ENOMEM 9971
#endif
# 364 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EPERM
#define EPERM 9972
#endif
# 368 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EACCES
#define EACCES 9973
#endif
# 372 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EROFS
#define EROFS 9974
#endif
# 376 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EDEADLK
#define EDEADLK 9975
#endif
# 380 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EAGAIN
#define EAGAIN 9976
#endif
# 384 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef ENFILE
#define ENFILE 9977
#endif
# 388 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EMFILE
#define EMFILE 9978
#endif
# 392 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#ifndef EMLINK
#define EMLINK 9979
#endif
# 396 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#endif // __cplusplus
# 398 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3

#endif // _LIBCPP_ERRNO_H
# 400 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/errno.h" 3
#endif /* errno.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 2 3

#ifdef __MVS__
#if 0 /* expanded by -frewrite-includes */
# include <__support/ibm/nanosleep.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3

#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
#if 0 /* expanded by -frewrite-includes */
# include <__external_threading>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_HAS_NO_THREADS)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
// Some platforms require <bits/atomic_wide_counter.h> in order for
// PTHREAD_COND_INITIALIZER to be expanded. Normally that would come
// in via <pthread.h>, but it's a non-modular header on those platforms,
// so libc++'s <math.h> usually absorbs atomic_wide_counter.h into the
// module with <math.h> and makes atomic_wide_counter.h invisible.
// Include <math.h> here to work around that.
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* math.h expanded by -frewrite-includes */
# include <math.h>
#else /* math.h expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_MATH_H
#define _LIBCPP_MATH_H

/*
    math.h synopsis

Macros:

    HUGE_VAL
    HUGE_VALF               // C99
    HUGE_VALL               // C99
    INFINITY                // C99
    NAN                     // C99
    FP_INFINITE             // C99
    FP_NAN                  // C99
    FP_NORMAL               // C99
    FP_SUBNORMAL            // C99
    FP_ZERO                 // C99
    FP_FAST_FMA             // C99
    FP_FAST_FMAF            // C99
    FP_FAST_FMAL            // C99
    FP_ILOGB0               // C99
    FP_ILOGBNAN             // C99
    MATH_ERRNO              // C99
    MATH_ERREXCEPT          // C99
    math_errhandling        // C99

Types:

    float_t                 // C99
    double_t                // C99

// C90

floating_point abs(floating_point x);

floating_point acos (arithmetic x);
float          acosf(float x);
long double    acosl(long double x);

floating_point asin (arithmetic x);
float          asinf(float x);
long double    asinl(long double x);

floating_point atan (arithmetic x);
float          atanf(float x);
long double    atanl(long double x);

floating_point atan2 (arithmetic y, arithmetic x);
float          atan2f(float y, float x);
long double    atan2l(long double y, long double x);

floating_point ceil (arithmetic x);
float          ceilf(float x);
long double    ceill(long double x);

floating_point cos (arithmetic x);
float          cosf(float x);
long double    cosl(long double x);

floating_point cosh (arithmetic x);
float          coshf(float x);
long double    coshl(long double x);

floating_point exp (arithmetic x);
float          expf(float x);
long double    expl(long double x);

floating_point fabs (arithmetic x);
float          fabsf(float x);
long double    fabsl(long double x);

floating_point floor (arithmetic x);
float          floorf(float x);
long double    floorl(long double x);

floating_point fmod (arithmetic x, arithmetic y);
float          fmodf(float x, float y);
long double    fmodl(long double x, long double y);

floating_point frexp (arithmetic value, int* exp);
float          frexpf(float value, int* exp);
long double    frexpl(long double value, int* exp);

floating_point ldexp (arithmetic value, int exp);
float          ldexpf(float value, int exp);
long double    ldexpl(long double value, int exp);

floating_point log (arithmetic x);
float          logf(float x);
long double    logl(long double x);

floating_point log10 (arithmetic x);
float          log10f(float x);
long double    log10l(long double x);

floating_point modf (floating_point value, floating_point* iptr);
float          modff(float value, float* iptr);
long double    modfl(long double value, long double* iptr);

floating_point pow (arithmetic x, arithmetic y);
float          powf(float x, float y);
long double    powl(long double x, long double y);

floating_point sin (arithmetic x);
float          sinf(float x);
long double    sinl(long double x);

floating_point sinh (arithmetic x);
float          sinhf(float x);
long double    sinhl(long double x);

floating_point sqrt (arithmetic x);
float          sqrtf(float x);
long double    sqrtl(long double x);

floating_point tan (arithmetic x);
float          tanf(float x);
long double    tanl(long double x);

floating_point tanh (arithmetic x);
float          tanhf(float x);
long double    tanhl(long double x);

//  C99

bool signbit(arithmetic x);

int fpclassify(arithmetic x);

bool isfinite(arithmetic x);
bool isinf(arithmetic x);
bool isnan(arithmetic x);
bool isnormal(arithmetic x);

bool isgreater(arithmetic x, arithmetic y);
bool isgreaterequal(arithmetic x, arithmetic y);
bool isless(arithmetic x, arithmetic y);
bool islessequal(arithmetic x, arithmetic y);
bool islessgreater(arithmetic x, arithmetic y);
bool isunordered(arithmetic x, arithmetic y);

floating_point acosh (arithmetic x);
float          acoshf(float x);
long double    acoshl(long double x);

floating_point asinh (arithmetic x);
float          asinhf(float x);
long double    asinhl(long double x);

floating_point atanh (arithmetic x);
float          atanhf(float x);
long double    atanhl(long double x);

floating_point cbrt (arithmetic x);
float          cbrtf(float x);
long double    cbrtl(long double x);

floating_point copysign (arithmetic x, arithmetic y);
float          copysignf(float x, float y);
long double    copysignl(long double x, long double y);

floating_point erf (arithmetic x);
float          erff(float x);
long double    erfl(long double x);

floating_point erfc (arithmetic x);
float          erfcf(float x);
long double    erfcl(long double x);

floating_point exp2 (arithmetic x);
float          exp2f(float x);
long double    exp2l(long double x);

floating_point expm1 (arithmetic x);
float          expm1f(float x);
long double    expm1l(long double x);

floating_point fdim (arithmetic x, arithmetic y);
float          fdimf(float x, float y);
long double    fdiml(long double x, long double y);

floating_point fma (arithmetic x, arithmetic y, arithmetic z);
float          fmaf(float x, float y, float z);
long double    fmal(long double x, long double y, long double z);

floating_point fmax (arithmetic x, arithmetic y);
float          fmaxf(float x, float y);
long double    fmaxl(long double x, long double y);

floating_point fmin (arithmetic x, arithmetic y);
float          fminf(float x, float y);
long double    fminl(long double x, long double y);

floating_point hypot (arithmetic x, arithmetic y);
float          hypotf(float x, float y);
long double    hypotl(long double x, long double y);

int ilogb (arithmetic x);
int ilogbf(float x);
int ilogbl(long double x);

floating_point lgamma (arithmetic x);
float          lgammaf(float x);
long double    lgammal(long double x);

long long llrint (arithmetic x);
long long llrintf(float x);
long long llrintl(long double x);

long long llround (arithmetic x);
long long llroundf(float x);
long long llroundl(long double x);

floating_point log1p (arithmetic x);
float          log1pf(float x);
long double    log1pl(long double x);

floating_point log2 (arithmetic x);
float          log2f(float x);
long double    log2l(long double x);

floating_point logb (arithmetic x);
float          logbf(float x);
long double    logbl(long double x);

long lrint (arithmetic x);
long lrintf(float x);
long lrintl(long double x);

long lround (arithmetic x);
long lroundf(float x);
long lroundl(long double x);

double      nan (const char* str);
float       nanf(const char* str);
long double nanl(const char* str);

floating_point nearbyint (arithmetic x);
float          nearbyintf(float x);
long double    nearbyintl(long double x);

floating_point nextafter (arithmetic x, arithmetic y);
float          nextafterf(float x, float y);
long double    nextafterl(long double x, long double y);

floating_point nexttoward (arithmetic x, long double y);
float          nexttowardf(float x, long double y);
long double    nexttowardl(long double x, long double y);

floating_point remainder (arithmetic x, arithmetic y);
float          remainderf(float x, float y);
long double    remainderl(long double x, long double y);

floating_point remquo (arithmetic x, arithmetic y, int* pquo);
float          remquof(float x, float y, int* pquo);
long double    remquol(long double x, long double y, int* pquo);

floating_point rint (arithmetic x);
float          rintf(float x);
long double    rintl(long double x);

floating_point round (arithmetic x);
float          roundf(float x);
long double    roundl(long double x);

floating_point scalbln (arithmetic x, long ex);
float          scalblnf(float x, long ex);
long double    scalblnl(long double x, long ex);

floating_point scalbn (arithmetic x, int ex);
float          scalbnf(float x, int ex);
long double    scalbnl(long double x, int ex);

floating_point tgamma (arithmetic x);
float          tgammaf(float x);
long double    tgammal(long double x);

floating_point trunc (arithmetic x);
float          truncf(float x);
long double    truncl(long double x);

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 294 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 295 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 298 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#endif
# 299 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<math.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 301 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#    include_next <math.h>
#endif /* expanded by -frewrite-includes */
# 301 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 302 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#  endif
# 303 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#ifdef __cplusplus

// We support including .h headers inside 'extern "C"' contexts, so switch
// back to C++ linkage before including these C++ headers.
extern "C++" {

#    ifdef fpclassify
#      undef fpclassify
#    endif
# 313 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef signbit
#      undef signbit
#    endif
# 317 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isfinite
#      undef isfinite
#    endif
# 321 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isinf
#      undef isinf
#    endif
# 325 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isnan
#      undef isnan
#    endif
# 329 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isnormal
#      undef isnormal
#    endif
# 333 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isgreater
#      undef isgreater
#    endif
# 337 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isgreaterequal
#      undef isgreaterequal
#    endif
# 341 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isless
#      undef isless
#    endif
# 345 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef islessequal
#      undef islessequal
#    endif
# 349 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef islessgreater
#      undef islessgreater
#    endif
# 353 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#    ifdef isunordered
#      undef isunordered
#    endif
# 357 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#if 0 /* expanded by -frewrite-includes */
#include <__math/abs.h>
#endif /* expanded by -frewrite-includes */
# 358 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 359 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/copysign.h>
#endif /* expanded by -frewrite-includes */
# 359 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 360 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/error_functions.h>
#endif /* expanded by -frewrite-includes */
# 360 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 361 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/exponential_functions.h>
#endif /* expanded by -frewrite-includes */
# 361 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 362 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/fdim.h>
#endif /* expanded by -frewrite-includes */
# 362 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 363 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/fma.h>
#endif /* expanded by -frewrite-includes */
# 363 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 364 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/gamma.h>
#endif /* expanded by -frewrite-includes */
# 364 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 365 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/hyperbolic_functions.h>
#endif /* expanded by -frewrite-includes */
# 365 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 366 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/hypot.h>
#endif /* expanded by -frewrite-includes */
# 366 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 367 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/inverse_hyperbolic_functions.h>
#endif /* expanded by -frewrite-includes */
# 367 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 368 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/inverse_trigonometric_functions.h>
#endif /* expanded by -frewrite-includes */
# 368 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 369 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/logarithms.h>
#endif /* expanded by -frewrite-includes */
# 369 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 370 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/min_max.h>
#endif /* expanded by -frewrite-includes */
# 370 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 371 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/modulo.h>
#endif /* expanded by -frewrite-includes */
# 371 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 372 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/remainder.h>
#endif /* expanded by -frewrite-includes */
# 372 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 373 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/roots.h>
#endif /* expanded by -frewrite-includes */
# 373 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 374 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/rounding_functions.h>
#endif /* expanded by -frewrite-includes */
# 374 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 375 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/traits.h>
#endif /* expanded by -frewrite-includes */
# 375 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 376 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__math/trigonometric_functions.h>
#endif /* expanded by -frewrite-includes */
# 376 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 377 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 377 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 378 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_floating_point.h>
#endif /* expanded by -frewrite-includes */
# 378 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 379 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 379 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 380 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 380 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 381 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3


// fpclassify relies on implementation-defined constants, so we can't move it to a detail header
_LIBCPP_BEGIN_NAMESPACE_STD

namespace __math {

// fpclassify

// template on non-double overloads to make them weaker than same overloads from MSVC runtime
template <class = int>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI int fpclassify(float __x) _NOEXCEPT {
  return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
}

template <class = int>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI int fpclassify(double __x) _NOEXCEPT {
  return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
}

template <class = int>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI int fpclassify(long double __x) _NOEXCEPT {
  return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
}

template <class _A1, std::__enable_if_t<std::is_integral<_A1>::value, int> = 0>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI int fpclassify(_A1 __x) _NOEXCEPT {
  return __x == 0 ? FP_ZERO : FP_NORMAL;
}

} // namespace __math

_LIBCPP_END_NAMESPACE_STD

using std::__math::fpclassify;
using std::__math::signbit;

// The MSVC runtime already provides these functions as templates
#ifndef _LIBCPP_MSVCRT
using std::__math::isfinite;
using std::__math::isgreater;
using std::__math::isgreaterequal;
using std::__math::isinf;
using std::__math::isless;
using std::__math::islessequal;
using std::__math::islessgreater;
using std::__math::isnan;
using std::__math::isnormal;
using std::__math::isunordered;
#endif // _LIBCPP_MSVCRT
# 431 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

// abs
//
// handled in stdlib.h

// div
//
// handled in stdlib.h

// We have to provide double overloads for <math.h> to work on platforms that don't provide the full set of math
// functions. To make the overload set work with multiple functions that take the same arguments, we make our overloads
// templates. Functions are preferred over function templates during overload resolution, which means that our overload
// will only be selected when the C library doesn't provide one.

using std::__math::acosh;
using std::__math::acos;
using std::__math::asinh;
using std::__math::asin;
using std::__math::atanh;
using std::__math::atan;
using std::__math::atan2;
using std::__math::cbrt;
using std::__math::ceil;
using std::__math::copysign;
using std::__math::cos;
using std::__math::cosh;
using std::__math::erf;
using std::__math::erfc;
using std::__math::exp;
using std::__math::exp2;
using std::__math::expm1;
using std::__math::fabs;
using std::__math::fdim;
using std::__math::floor;
using std::__math::fma;
using std::__math::fmax;
using std::__math::fmin;
using std::__math::fmod;
using std::__math::frexp;
using std::__math::hypot;
using std::__math::ilogb;
using std::__math::ldexp;
using std::__math::lgamma;
using std::__math::llrint;
using std::__math::llround;
using std::__math::lrint;
using std::__math::lround;
using std::__math::log;
using std::__math::log10;
using std::__math::log1p;
using std::__math::log2;
using std::__math::logb;
using std::__math::modf;
using std::__math::nearbyint;
using std::__math::nextafter;
using std::__math::nexttoward;
using std::__math::pow;
using std::__math::remainder;
using std::__math::remquo;
using std::__math::rint;
using std::__math::round;
using std::__math::scalbln;
using std::__math::scalbn;
using std::__math::signbit;
using std::__math::sin;
using std::__math::sinh;
using std::__math::sqrt;
using std::__math::tan;
using std::__math::tanh;
using std::__math::tgamma;
using std::__math::trunc;

} // extern "C++"

#endif // __cplusplus
# 506 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#else // _LIBCPP_MATH_H
# 508 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

// This include lives outside the header guard in order to support an MSVC
// extension which allows users to do:
//
// #define _USE_MATH_DEFINES
// #include <math.h>
//
// and receive the definitions of mathematical constants, even if <math.h>
// has previously been included.
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_MSVCRT) && defined(_USE_MATH_DEFINES)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 518 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#if 0 /* expanded by -frewrite-includes */
#include_next <math.h>
#endif /* expanded by -frewrite-includes */
# 518 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
# 519 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#endif
# 520 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3

#endif // _LIBCPP_MATH_H
# 522 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/math.h" 3
#endif /* math.h expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 2 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pthread.h expanded by -frewrite-includes */
# include <pthread.h>
#else /* pthread.h expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
# 1 "gen/zircon/public/sysroot/cpp/include/pthread.h" 1 3 4
#ifndef SYSROOT_PTHREAD_H_
#define SYSROOT_PTHREAD_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/pthread.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/pthread.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/pthread.h" 3 4

#define __NEED_time_t
#define __NEED_clockid_t
#define __NEED_struct_timespec
#define __NEED_sigset_t
#define __NEED_pthread_t
#define __NEED_pthread_attr_t
#define __NEED_pthread_mutexattr_t
#define __NEED_pthread_condattr_t
#define __NEED_pthread_rwlockattr_t
#define __NEED_pthread_barrierattr_t
#define __NEED_pthread_mutex_t
#define __NEED_pthread_cond_t
#define __NEED_pthread_rwlock_t
#define __NEED_pthread_barrier_t
#define __NEED_pthread_spinlock_t
#define __NEED_pthread_key_t
#define __NEED_pthread_once_t
#define __NEED_size_t

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* sched.h expanded by -frewrite-includes */
#include <sched.h>
#else /* sched.h expanded by -frewrite-includes */
# 29 "gen/zircon/public/sysroot/cpp/include/pthread.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/sched.h" 1 3 4
#ifndef SYSROOT_SCHED_H_
#define SYSROOT_SCHED_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/sched.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/sched.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/sched.h" 3 4

#define __NEED_struct_timespec
#define __NEED_pid_t
#define __NEED_time_t

#ifdef _GNU_SOURCE
#define __NEED_size_t
#endif
# 17 "gen/zircon/public/sysroot/cpp/include/sched.h" 3 4

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/sched.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 19 "gen/zircon/public/sysroot/cpp/include/sched.h" 2 3 4

struct sched_param {
  int sched_priority;
  int sched_ss_low_priority;
  struct timespec sched_ss_repl_period;
  struct timespec sched_ss_init_budget;
  int sched_ss_max_repl;
};

int sched_get_priority_max(int);
int sched_get_priority_min(int);
int sched_getparam(pid_t, struct sched_param*);
int sched_getscheduler(pid_t);
int sched_rr_get_interval(pid_t, struct timespec*);
int sched_setparam(pid_t, const struct sched_param*);
int sched_setscheduler(pid_t, int, const struct sched_param*);
int sched_yield(void);

#define SCHED_OTHER 0
#define SCHED_FIFO 1
#define SCHED_RR 2
#define SCHED_BATCH 3
#define SCHED_IDLE 5
#define SCHED_DEADLINE 6
#define SCHED_RESET_ON_FORK 0x40000000

#ifdef _GNU_SOURCE
void* memcpy(void* __restrict, const void* __restrict, size_t);
int memcmp(const void*, const void*, size_t);
void* calloc(size_t, size_t) __nothrow_fn;
void free(void*) __nothrow_fn;

typedef struct cpu_set_t {
  unsigned long __bits[128 / sizeof(long)];
} cpu_set_t;
int __sched_cpucount(size_t, const cpu_set_t*);
int sched_getcpu(void);
int sched_getaffinity(pid_t, size_t, cpu_set_t*);
int sched_setaffinity(pid_t, size_t, const cpu_set_t*);

#define __CPU_op_S(i, size, set, op) \
  ((i) / 8U >= (size)                \
       ? 0                           \
       : ((set)->__bits[(i) / 8 / sizeof(long)] op(1UL << ((i) % (8 * sizeof(long))))))

#define CPU_SET_S(i, size, set) __CPU_op_S(i, size, set, |=)
#define CPU_CLR_S(i, size, set) __CPU_op_S(i, size, set, &= ~)
#define CPU_ISSET_S(i, size, set) __CPU_op_S(i, size, set, &)

#define __CPU_op_func_S(func, op)                                                                  \
  static __inline void __CPU_##func##_S(size_t __size, cpu_set_t* __dest, const cpu_set_t* __src1, \
                                        const cpu_set_t* __src2) {                                 \
    size_t __i;                                                                                    \
    for (__i = 0; __i < __size / sizeof(long); __i++)                                              \
      __dest->__bits[__i] = __src1->__bits[__i] op __src2->__bits[__i];                            \
  }

__CPU_op_func_S(AND, &) __CPU_op_func_S(OR, |) __CPU_op_func_S(XOR, ^)

#define CPU_AND_S(a, b, c, d) __CPU_AND_S(a, b, c, d)
#define CPU_OR_S(a, b, c, d) __CPU_OR_S(a, b, c, d)
#define CPU_XOR_S(a, b, c, d) __CPU_XOR_S(a, b, c, d)

#define CPU_COUNT_S(size, set) __sched_cpucount(size, set)
#define CPU_ZERO_S(size, set) memset(set, 0, size)
#define CPU_EQUAL_S(size, set1, set2) (!memcmp(set1, set2, size))

#define CPU_ALLOC_SIZE(n)                     \
  (sizeof(long) * ((n) / (8 * sizeof(long)) + \
                   ((n) % (8 * sizeof(long)) + 8 * sizeof(long) - 1) / (8 * sizeof(long))))
#define CPU_ALLOC(n) ((cpu_set_t*)calloc(1, CPU_ALLOC_SIZE(n)))
#define CPU_FREE(set) free(set)

#define CPU_SETSIZE 128

#define CPU_SET(i, set) CPU_SET_S(i, sizeof(cpu_set_t), set)
#define CPU_CLR(i, set) CPU_CLR_S(i, sizeof(cpu_set_t), set)
#define CPU_ISSET(i, set) CPU_ISSET_S(i, sizeof(cpu_set_t), set)
#define CPU_AND(d, s1, s2) CPU_AND_S(sizeof(cpu_set_t), d, s1, s2)
#define CPU_OR(d, s1, s2) CPU_OR_S(sizeof(cpu_set_t), d, s1, s2)
#define CPU_XOR(d, s1, s2) CPU_XOR_S(sizeof(cpu_set_t), d, s1, s2)
#define CPU_COUNT(set) CPU_COUNT_S(sizeof(cpu_set_t), set)
#define CPU_ZERO(set) CPU_ZERO_S(sizeof(cpu_set_t), set)
#define CPU_EQUAL(s1, s2) CPU_EQUAL_S(sizeof(cpu_set_t), s1, s2)

#endif
# 105 "gen/zircon/public/sysroot/cpp/include/sched.h" 3 4

#ifdef __cplusplus
}
#endif
# 109 "gen/zircon/public/sysroot/cpp/include/sched.h" 3 4

#endif  // SYSROOT_SCHED_H_
# 111 "gen/zircon/public/sysroot/cpp/include/sched.h" 3 4
#endif /* sched.h expanded by -frewrite-includes */
# 30 "gen/zircon/public/sysroot/cpp/include/pthread.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <time.h>
#endif /* expanded by -frewrite-includes */
# 30 "gen/zircon/public/sysroot/cpp/include/pthread.h" 3 4
# 31 "gen/zircon/public/sysroot/cpp/include/pthread.h" 3 4

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 32 "gen/zircon/public/sysroot/cpp/include/pthread.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/pthread.h" 2 3 4

#define PTHREAD_CREATE_JOINABLE 0
#define PTHREAD_CREATE_DETACHED 1

#define PTHREAD_MUTEX_NORMAL 0
#define PTHREAD_MUTEX_DEFAULT 0
#define PTHREAD_MUTEX_RECURSIVE 1
#define PTHREAD_MUTEX_ERRORCHECK 2

#define PTHREAD_MUTEX_STALLED 0
#define PTHREAD_MUTEX_ROBUST 1

#define PTHREAD_PRIO_NONE 0
#define PTHREAD_PRIO_INHERIT 1
#define PTHREAD_PRIO_PROTECT 2

#define PTHREAD_INHERIT_SCHED 0
#define PTHREAD_EXPLICIT_SCHED 1

#define PTHREAD_SCOPE_SYSTEM 0
#define PTHREAD_SCOPE_PROCESS 1

#define PTHREAD_PROCESS_PRIVATE 0

#ifdef __cplusplus
#define PTHREAD_MUTEX_INITIALIZER \
  {}
#define PTHREAD_RWLOCK_INITIALIZER \
  {}
#define PTHREAD_COND_INITIALIZER \
  {}
#else
# 65 "gen/zircon/public/sysroot/cpp/include/pthread.h" 3 4
#define PTHREAD_MUTEX_INITIALIZER \
  { 0 }
#define PTHREAD_RWLOCK_INITIALIZER \
  { 0 }
#define PTHREAD_COND_INITIALIZER \
  { 0 }
#endif
# 72 "gen/zircon/public/sysroot/cpp/include/pthread.h" 3 4
#define PTHREAD_ONCE_INIT 0

#define PTHREAD_CANCEL_ENABLE 0
#define PTHREAD_CANCEL_DISABLE 1
#define PTHREAD_CANCEL_MASKED 2

#define PTHREAD_CANCEL_DEFERRED 0
#define PTHREAD_CANCEL_ASYNCHRONOUS 1

#define PTHREAD_CANCELED ((void*)-1)

#define PTHREAD_BARRIER_SERIAL_THREAD (-1)

int pthread_create(pthread_t* __restrict, const pthread_attr_t* __restrict, void* (*)(void*),
                   void* __restrict);
int pthread_detach(pthread_t);
_Noreturn void pthread_exit(void*);
int pthread_join(pthread_t, void**);

pthread_t pthread_self(void);

int pthread_equal(pthread_t, pthread_t);
#ifndef __cplusplus
#define pthread_equal(x, y) ((x) == (y))
#endif
# 97 "gen/zircon/public/sysroot/cpp/include/pthread.h" 3 4

int pthread_setcancelstate(int, int*);
int pthread_setcanceltype(int, int*);
void pthread_testcancel(void);
int pthread_cancel(pthread_t);

int pthread_once(pthread_once_t*, void (*)(void));

int pthread_mutex_init(pthread_mutex_t* __restrict, const pthread_mutexattr_t* __restrict);
int pthread_mutex_lock(pthread_mutex_t*);
int pthread_mutex_unlock(pthread_mutex_t*);
int pthread_mutex_trylock(pthread_mutex_t*);
int pthread_mutex_timedlock(pthread_mutex_t* __restrict, const struct timespec* __restrict);
int pthread_mutex_destroy(pthread_mutex_t*);
int pthread_mutex_consistent(pthread_mutex_t*);

int pthread_mutex_getprioceiling(const pthread_mutex_t* __restrict, int* __restrict);
int pthread_mutex_setprioceiling(pthread_mutex_t* __restrict, int, int* __restrict);

int pthread_cond_init(pthread_cond_t* __restrict, const pthread_condattr_t* __restrict);
int pthread_cond_destroy(pthread_cond_t*);
int pthread_cond_wait(pthread_cond_t* __restrict, pthread_mutex_t* __restrict);
int pthread_cond_timedwait(pthread_cond_t* __restrict, pthread_mutex_t* __restrict,
                           const struct timespec* __restrict);
int pthread_cond_broadcast(pthread_cond_t*);
int pthread_cond_signal(pthread_cond_t*);

int pthread_rwlock_init(pthread_rwlock_t* __restrict, const pthread_rwlockattr_t* __restrict);
int pthread_rwlock_destroy(pthread_rwlock_t*);
int pthread_rwlock_rdlock(pthread_rwlock_t*);
int pthread_rwlock_tryrdlock(pthread_rwlock_t*);
int pthread_rwlock_timedrdlock(pthread_rwlock_t* __restrict, const struct timespec* __restrict);
int pthread_rwlock_wrlock(pthread_rwlock_t*);
int pthread_rwlock_trywrlock(pthread_rwlock_t*);
int pthread_rwlock_timedwrlock(pthread_rwlock_t* __restrict, const struct timespec* __restrict);
int pthread_rwlock_unlock(pthread_rwlock_t*);

int pthread_spin_init(pthread_spinlock_t*, int);
int pthread_spin_destroy(pthread_spinlock_t*);
int pthread_spin_lock(pthread_spinlock_t*);
int pthread_spin_trylock(pthread_spinlock_t*);
int pthread_spin_unlock(pthread_spinlock_t*);

int pthread_barrier_init(pthread_barrier_t* __restrict, const pthread_barrierattr_t* __restrict,
                         unsigned);
int pthread_barrier_destroy(pthread_barrier_t*);
int pthread_barrier_wait(pthread_barrier_t*);

int pthread_key_create(pthread_key_t*, void (*)(void*));
int pthread_key_delete(pthread_key_t);
void* pthread_getspecific(pthread_key_t);
int pthread_setspecific(pthread_key_t, const void*);

int pthread_attr_init(pthread_attr_t*);
int pthread_attr_destroy(pthread_attr_t*);

int pthread_attr_getguardsize(const pthread_attr_t* __restrict, size_t* __restrict);
int pthread_attr_setguardsize(pthread_attr_t*, size_t);
int pthread_attr_getstacksize(const pthread_attr_t* __restrict, size_t* __restrict);
int pthread_attr_setstacksize(pthread_attr_t*, size_t);
int pthread_attr_getdetachstate(const pthread_attr_t*, int*);
int pthread_attr_setdetachstate(pthread_attr_t*, int);
int pthread_attr_getstack(const pthread_attr_t* __restrict, void** __restrict, size_t* __restrict);
int pthread_attr_setstack(pthread_attr_t*, void*, size_t) __attribute__((__deprecated__(
    "pthread_attr_setstack is not available in Fuchsia; perhaps pthread_attr_setstacksize and/or "
    "pthread_attr_setguardsize is sufficient for your needs?")));
int pthread_attr_getschedparam(const pthread_attr_t* __restrict, struct sched_param* __restrict);
int pthread_attr_setschedparam(pthread_attr_t* __restrict, const struct sched_param* __restrict);

int pthread_mutexattr_destroy(pthread_mutexattr_t*);
int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t* __restrict, int* __restrict);
int pthread_mutexattr_getprotocol(const pthread_mutexattr_t* __restrict, int* __restrict);
int pthread_mutexattr_getrobust(const pthread_mutexattr_t* __restrict, int* __restrict);
int pthread_mutexattr_gettype(const pthread_mutexattr_t* __restrict, int* __restrict);
int pthread_mutexattr_init(pthread_mutexattr_t*);
int pthread_mutexattr_setprioceiling(pthread_mutexattr_t*, int);
int pthread_mutexattr_setprotocol(pthread_mutexattr_t*, int);
int pthread_mutexattr_setrobust(pthread_mutexattr_t*, int);
int pthread_mutexattr_settype(pthread_mutexattr_t*, int);

int pthread_condattr_init(pthread_condattr_t*);
int pthread_condattr_destroy(pthread_condattr_t*);
int pthread_condattr_setclock(pthread_condattr_t*, clockid_t);
int pthread_condattr_getclock(const pthread_condattr_t* __restrict, clockid_t* __restrict);

int pthread_rwlockattr_init(pthread_rwlockattr_t*);
int pthread_rwlockattr_destroy(pthread_rwlockattr_t*);

int pthread_barrierattr_destroy(pthread_barrierattr_t*);
int pthread_barrierattr_init(pthread_barrierattr_t*);

int pthread_atfork(void (*)(void), void (*)(void), void (*)(void));

int pthread_getconcurrency(void);
int pthread_setconcurrency(int);

int pthread_getcpuclockid(pthread_t, clockid_t*);

#define pthread_cleanup_push(f, x)
#define pthread_cleanup_pop(r)

#ifdef _GNU_SOURCE
struct cpu_set_t;
int pthread_getaffinity_np(pthread_t, size_t, struct cpu_set_t*);
int pthread_setaffinity_np(pthread_t, size_t, const struct cpu_set_t*);
int pthread_getattr_np(pthread_t, pthread_attr_t*);
#endif
# 204 "gen/zircon/public/sysroot/cpp/include/pthread.h" 3 4

int pthread_getname_np(pthread_t, char*, size_t);
int pthread_setname_np(pthread_t, const char*);

#ifdef __cplusplus
}
#endif
# 211 "gen/zircon/public/sysroot/cpp/include/pthread.h" 3 4

#endif  // SYSROOT_PTHREAD_H_
# 213 "gen/zircon/public/sysroot/cpp/include/pthread.h" 3 4
#endif /* pthread.h expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 2 3
#if 0 /* expanded by -frewrite-includes */
# include <sched.h>
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_LIBCPP_HAS_THREAD_API_C11)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
#if 0 /* expanded by -frewrite-includes */
# include <threads.h>
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
#endif
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_THREAD_API_WIN32)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
#define _LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_EXPORTED_FROM_ABI
#else
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
#define _LIBCPP_THREAD_ABI_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
#endif
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3

typedef ::timespec __libcpp_timespec_t;
#endif // !defined(_LIBCPP_HAS_NO_THREADS)
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_THREADS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
// Mutex
typedef pthread_mutex_t __libcpp_mutex_t;
#define _LIBCPP_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER

typedef pthread_mutex_t __libcpp_recursive_mutex_t;

// Condition Variable
typedef pthread_cond_t __libcpp_condvar_t;
#define _LIBCPP_CONDVAR_INITIALIZER PTHREAD_COND_INITIALIZER

// Execute once
typedef pthread_once_t __libcpp_exec_once_flag;
#define _LIBCPP_EXEC_ONCE_INITIALIZER PTHREAD_ONCE_INIT

// Thread id
#if 0 /* disabled by -frewrite-includes */
#if defined(__MVS__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
  typedef unsigned long long __libcpp_thread_id;
#else
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
  typedef pthread_t __libcpp_thread_id;
#endif
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3

// Thread
#define _LIBCPP_NULL_THREAD ((__libcpp_thread_t()))
typedef pthread_t __libcpp_thread_t;

// Thread Local Storage
typedef pthread_key_t __libcpp_tls_key;

#define _LIBCPP_TLS_DESTRUCTOR_CC
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_LIBCPP_HAS_THREAD_API_C11)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
// Mutex
typedef mtx_t __libcpp_mutex_t;
// mtx_t is a struct so using {} for initialization is valid.
#define _LIBCPP_MUTEX_INITIALIZER {}

typedef mtx_t __libcpp_recursive_mutex_t;

// Condition Variable
typedef cnd_t __libcpp_condvar_t;
// cnd_t is a struct so using {} for initialization is valid.
#define _LIBCPP_CONDVAR_INITIALIZER {}

// Execute once
typedef ::once_flag __libcpp_exec_once_flag;
#define _LIBCPP_EXEC_ONCE_INITIALIZER ONCE_FLAG_INIT

// Thread id
typedef thrd_t __libcpp_thread_id;

// Thread
#define _LIBCPP_NULL_THREAD 0U

typedef thrd_t __libcpp_thread_t;

// Thread Local Storage
typedef tss_t __libcpp_tls_key;

#define _LIBCPP_TLS_DESTRUCTOR_CC
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 121 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
// Mutex
typedef void* __libcpp_mutex_t;
#define _LIBCPP_MUTEX_INITIALIZER 0

#if 0 /* disabled by -frewrite-includes */
#if defined(_M_IX86) || defined(__i386__) || defined(_M_ARM) || defined(__arm__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
typedef void* __libcpp_recursive_mutex_t[6];
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_M_AMD64) || defined(__x86_64__) || defined(_M_ARM64) || defined(__aarch64__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
typedef void* __libcpp_recursive_mutex_t[5];
#else
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
# error Unsupported architecture
#endif
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3

// Condition Variable
typedef void* __libcpp_condvar_t;
#define _LIBCPP_CONDVAR_INITIALIZER 0

// Execute Once
typedef void* __libcpp_exec_once_flag;
#define _LIBCPP_EXEC_ONCE_INITIALIZER 0

// Thread ID
typedef long __libcpp_thread_id;

// Thread
#define _LIBCPP_NULL_THREAD 0U

typedef void* __libcpp_thread_t;

// Thread Local Storage
typedef long __libcpp_tls_key;

#define _LIBCPP_TLS_DESTRUCTOR_CC __stdcall
#endif // !defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
# 154 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 156 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
// Mutex
_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m);

_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m);

_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
bool __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m);

_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
int __libcpp_recursive_mutex_unlock(__libcpp_recursive_mutex_t *__m);

_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_recursive_mutex_destroy(__libcpp_recursive_mutex_t *__m);

_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
int __libcpp_mutex_lock(__libcpp_mutex_t *__m);

_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
bool __libcpp_mutex_trylock(__libcpp_mutex_t *__m);

_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
int __libcpp_mutex_unlock(__libcpp_mutex_t *__m);

_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_mutex_destroy(__libcpp_mutex_t *__m);

// Condition variable
_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_condvar_signal(__libcpp_condvar_t* __cv);

_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_condvar_broadcast(__libcpp_condvar_t* __cv);

_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
int __libcpp_condvar_wait(__libcpp_condvar_t* __cv, __libcpp_mutex_t* __m);

_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
                               __libcpp_timespec_t *__ts);

_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_condvar_destroy(__libcpp_condvar_t* __cv);

// Execute once
_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_execute_once(__libcpp_exec_once_flag *__flag,
                          void (*__init_routine)());

// Thread id
_LIBCPP_THREAD_ABI_VISIBILITY
bool __libcpp_thread_id_equal(__libcpp_thread_id __t1, __libcpp_thread_id __t2);

_LIBCPP_THREAD_ABI_VISIBILITY
bool __libcpp_thread_id_less(__libcpp_thread_id __t1, __libcpp_thread_id __t2);

// Thread
_LIBCPP_THREAD_ABI_VISIBILITY
bool __libcpp_thread_isnull(const __libcpp_thread_t *__t);

_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
                           void *__arg);

_LIBCPP_THREAD_ABI_VISIBILITY
__libcpp_thread_id __libcpp_thread_get_current_id();

_LIBCPP_THREAD_ABI_VISIBILITY
__libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t *__t);

_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_thread_join(__libcpp_thread_t *__t);

_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_thread_detach(__libcpp_thread_t *__t);

_LIBCPP_THREAD_ABI_VISIBILITY
void __libcpp_thread_yield();

_LIBCPP_THREAD_ABI_VISIBILITY
void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns);

// Thread local storage
_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_tls_create(__libcpp_tls_key* __key,
                        void(_LIBCPP_TLS_DESTRUCTOR_CC* __at_exit)(void*));

_LIBCPP_THREAD_ABI_VISIBILITY
void *__libcpp_tls_get(__libcpp_tls_key __key);

_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_tls_set(__libcpp_tls_key __key, void *__p);

#endif // !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
# 251 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 253 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3

int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m)
{
  pthread_mutexattr_t __attr;
  int __ec = pthread_mutexattr_init(&__attr);
  if (__ec)
    return __ec;
  __ec = pthread_mutexattr_settype(&__attr, PTHREAD_MUTEX_RECURSIVE);
  if (__ec) {
    pthread_mutexattr_destroy(&__attr);
    return __ec;
  }
  __ec = pthread_mutex_init(__m, &__attr);
  if (__ec) {
    pthread_mutexattr_destroy(&__attr);
    return __ec;
  }
  __ec = pthread_mutexattr_destroy(&__attr);
  if (__ec) {
    pthread_mutex_destroy(__m);
    return __ec;
  }
  return 0;
}

int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m)
{
  return pthread_mutex_lock(__m);
}

bool __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m)
{
  return pthread_mutex_trylock(__m) == 0;
}

int __libcpp_recursive_mutex_unlock(__libcpp_recursive_mutex_t *__m)
{
  return pthread_mutex_unlock(__m);
}

int __libcpp_recursive_mutex_destroy(__libcpp_recursive_mutex_t *__m)
{
  return pthread_mutex_destroy(__m);
}

int __libcpp_mutex_lock(__libcpp_mutex_t *__m)
{
  return pthread_mutex_lock(__m);
}

bool __libcpp_mutex_trylock(__libcpp_mutex_t *__m)
{
  return pthread_mutex_trylock(__m) == 0;
}

int __libcpp_mutex_unlock(__libcpp_mutex_t *__m)
{
  return pthread_mutex_unlock(__m);
}

int __libcpp_mutex_destroy(__libcpp_mutex_t *__m)
{
  return pthread_mutex_destroy(__m);
}

// Condition Variable
int __libcpp_condvar_signal(__libcpp_condvar_t *__cv)
{
  return pthread_cond_signal(__cv);
}

int __libcpp_condvar_broadcast(__libcpp_condvar_t *__cv)
{
  return pthread_cond_broadcast(__cv);
}

int __libcpp_condvar_wait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m)
{
  return pthread_cond_wait(__cv, __m);
}

int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
                               __libcpp_timespec_t *__ts)
{
  return pthread_cond_timedwait(__cv, __m, __ts);
}

int __libcpp_condvar_destroy(__libcpp_condvar_t *__cv)
{
  return pthread_cond_destroy(__cv);
}

// Execute once
int __libcpp_execute_once(__libcpp_exec_once_flag *__flag,
                          void (*__init_routine)()) {
  return pthread_once(__flag, __init_routine);
}

// Thread id
// Returns non-zero if the thread ids are equal, otherwise 0
bool __libcpp_thread_id_equal(__libcpp_thread_id __t1, __libcpp_thread_id __t2)
{
  return __t1 == __t2;
}

// Returns non-zero if t1 < t2, otherwise 0
bool __libcpp_thread_id_less(__libcpp_thread_id __t1, __libcpp_thread_id __t2)
{
  return __t1 < __t2;
}

// Thread
bool __libcpp_thread_isnull(const __libcpp_thread_t *__t) {
  return __libcpp_thread_get_id(__t) == 0;
}

int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
                           void *__arg)
{
  return pthread_create(__t, nullptr, __func, __arg);
}

__libcpp_thread_id __libcpp_thread_get_current_id()
{
  const __libcpp_thread_t __current_thread = pthread_self();
  return __libcpp_thread_get_id(&__current_thread);
}

__libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t *__t)
{
#if 0 /* disabled by -frewrite-includes */
#if defined(__MVS__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 384 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
  return __t->__;
#else
# 386 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
  return *__t;
#endif
# 388 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
}

int __libcpp_thread_join(__libcpp_thread_t *__t)
{
  return pthread_join(*__t, nullptr);
}

int __libcpp_thread_detach(__libcpp_thread_t *__t)
{
  return pthread_detach(*__t);
}

void __libcpp_thread_yield()
{
  sched_yield();
}

void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns)
{
   __libcpp_timespec_t __ts = _VSTD::__convert_to_timespec<__libcpp_timespec_t>(__ns);
   while (nanosleep(&__ts, &__ts) == -1 && errno == EINTR);
}

// Thread local storage
int __libcpp_tls_create(__libcpp_tls_key *__key, void (*__at_exit)(void *))
{
  return pthread_key_create(__key, __at_exit);
}

void *__libcpp_tls_get(__libcpp_tls_key __key)
{
  return pthread_getspecific(__key);
}

int __libcpp_tls_set(__libcpp_tls_key __key, void *__p)
{
    return pthread_setspecific(__key, __p);
}

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_LIBCPP_HAS_THREAD_API_C11)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 428 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3

int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m)
{
  return mtx_init(__m, mtx_plain | mtx_recursive) == thrd_success ? 0 : EINVAL;
}

int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m)
{
  return mtx_lock(__m) == thrd_success ? 0 : EINVAL;
}

bool __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m)
{
  return mtx_trylock(__m) == thrd_success;
}

int __libcpp_recursive_mutex_unlock(__libcpp_recursive_mutex_t *__m)
{
  return mtx_unlock(__m) == thrd_success ? 0 : EINVAL;
}

int __libcpp_recursive_mutex_destroy(__libcpp_recursive_mutex_t *__m)
{
  mtx_destroy(__m);
  return 0;
}

int __libcpp_mutex_lock(__libcpp_mutex_t *__m)
{
  return mtx_lock(__m) == thrd_success ? 0 : EINVAL;
}

bool __libcpp_mutex_trylock(__libcpp_mutex_t *__m)
{
  return mtx_trylock(__m) == thrd_success;
}

int __libcpp_mutex_unlock(__libcpp_mutex_t *__m)
{
  return mtx_unlock(__m) == thrd_success ? 0 : EINVAL;
}

int __libcpp_mutex_destroy(__libcpp_mutex_t *__m)
{
  mtx_destroy(__m);
  return 0;
}

// Condition Variable
int __libcpp_condvar_signal(__libcpp_condvar_t *__cv)
{
  return cnd_signal(__cv) == thrd_success ? 0 : EINVAL;
}

int __libcpp_condvar_broadcast(__libcpp_condvar_t *__cv)
{
  return cnd_broadcast(__cv) == thrd_success ? 0 : EINVAL;
}

int __libcpp_condvar_wait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m)
{
  return cnd_wait(__cv, __m) == thrd_success ? 0 : EINVAL;
}

int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
                               timespec *__ts)
{
  int __ec = cnd_timedwait(__cv, __m, __ts);
  return __ec == thrd_timedout ? ETIMEDOUT : __ec;
}

int __libcpp_condvar_destroy(__libcpp_condvar_t *__cv)
{
  cnd_destroy(__cv);
  return 0;
}

// Execute once
int __libcpp_execute_once(__libcpp_exec_once_flag *flag,
                          void (*init_routine)(void)) {
  ::call_once(flag, init_routine);
  return 0;
}

// Thread id
// Returns non-zero if the thread ids are equal, otherwise 0
bool __libcpp_thread_id_equal(__libcpp_thread_id t1, __libcpp_thread_id t2)
{
  return thrd_equal(t1, t2) != 0;
}

// Returns non-zero if t1 < t2, otherwise 0
bool __libcpp_thread_id_less(__libcpp_thread_id t1, __libcpp_thread_id t2)
{
  return t1 < t2;
}

// Thread
bool __libcpp_thread_isnull(const __libcpp_thread_t *__t) {
  return __libcpp_thread_get_id(__t) == 0;
}

int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
                           void *__arg)
{
  int __ec = thrd_create(__t, reinterpret_cast<thrd_start_t>(__func), __arg);
  return __ec == thrd_nomem ? ENOMEM : __ec;
}

__libcpp_thread_id __libcpp_thread_get_current_id()
{
  return thrd_current();
}

__libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t *__t)
{
  return *__t;
}

int __libcpp_thread_join(__libcpp_thread_t *__t)
{
  return thrd_join(*__t, nullptr) == thrd_success ? 0 : EINVAL;
}

int __libcpp_thread_detach(__libcpp_thread_t *__t)
{
  return thrd_detach(*__t) == thrd_success ? 0 : EINVAL;
}

void __libcpp_thread_yield()
{
  thrd_yield();
}

void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns)
{
   __libcpp_timespec_t __ts = _VSTD::__convert_to_timespec<__libcpp_timespec_t>(__ns);
  thrd_sleep(&__ts, nullptr);
}

// Thread local storage
int __libcpp_tls_create(__libcpp_tls_key *__key, void (*__at_exit)(void *))
{
  return tss_create(__key, __at_exit) == thrd_success ? 0 : EINVAL;
}

void *__libcpp_tls_get(__libcpp_tls_key __key)
{
  return tss_get(__key);
}

int __libcpp_tls_set(__libcpp_tls_key __key, void *__p)
{
  return tss_set(__key, __p) == thrd_success ? 0 : EINVAL;
}

#endif
# 585 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3

#endif // !_LIBCPP_HAS_NO_THREADS
# 587 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___THREADING_SUPPORT
# 591 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__threading_support" 3
#endif /* __threading_support expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstring>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#ifndef _LIBCPP_HAS_NO_THREADS

_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile*);
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile*);
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(void const volatile*);
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait(void const volatile*, __cxx_contention_t);

_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(__cxx_atomic_contention_t const volatile*);
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(__cxx_atomic_contention_t const volatile*);
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(__cxx_atomic_contention_t const volatile*);
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait(__cxx_atomic_contention_t const volatile*, __cxx_contention_t);

template <class _Atp, class _Fn>
struct __libcpp_atomic_wait_backoff_impl {
    _Atp* __a;
    _Fn __test_fn;
    _LIBCPP_AVAILABILITY_SYNC
    _LIBCPP_HIDE_FROM_ABI bool operator()(chrono::nanoseconds __elapsed) const
    {
        if(__elapsed > chrono::microseconds(64))
        {
            auto const __monitor = std::__libcpp_atomic_monitor(__a);
            if(__test_fn())
                return true;
            std::__libcpp_atomic_wait(__a, __monitor);
        }
        else if(__elapsed > chrono::microseconds(4))
            __libcpp_thread_yield();
        else
            {} // poll
        return false;
    }
};

template <class _Atp, class _Fn>
_LIBCPP_AVAILABILITY_SYNC
_LIBCPP_HIDE_FROM_ABI bool __cxx_atomic_wait(_Atp* __a, _Fn && __test_fn)
{
    __libcpp_atomic_wait_backoff_impl<_Atp, __decay_t<_Fn> > __backoff_fn = {__a, __test_fn};
    return std::__libcpp_thread_poll_with_backoff(__test_fn, __backoff_fn);
}

#else // _LIBCPP_HAS_NO_THREADS
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI void __cxx_atomic_notify_all(__cxx_atomic_impl<_Tp> const volatile*) { }
template <class _Tp>
_LIBCPP_HIDE_FROM_ABI void __cxx_atomic_notify_one(__cxx_atomic_impl<_Tp> const volatile*) { }
template <class _Atp, class _Fn>
_LIBCPP_HIDE_FROM_ABI bool __cxx_atomic_wait(_Atp*, _Fn && __test_fn)
{
    return std::__libcpp_thread_poll_with_backoff(__test_fn, __spinning_backoff_policy());
}

#endif // _LIBCPP_HAS_NO_THREADS
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3

template <typename _Tp> _LIBCPP_HIDE_FROM_ABI
bool __cxx_nonatomic_compare_equal(_Tp const& __lhs, _Tp const& __rhs) {
    return std::memcmp(std::addressof(__lhs), std::addressof(__rhs), sizeof(_Tp)) == 0;
}

template <class _Atp, class _Tp>
struct __cxx_atomic_wait_test_fn_impl {
    _Atp* __a;
    _Tp __val;
    memory_order __order;
    _LIBCPP_HIDE_FROM_ABI bool operator()() const
    {
        return !std::__cxx_nonatomic_compare_equal(std::__cxx_atomic_load(__a, __order), __val);
    }
};

template <class _Atp, class _Tp>
_LIBCPP_AVAILABILITY_SYNC
_LIBCPP_HIDE_FROM_ABI bool __cxx_atomic_wait(_Atp* __a, _Tp const __val, memory_order __order)
{
    __cxx_atomic_wait_test_fn_impl<_Atp, _Tp> __test_fn = {__a, __val, __order};
    return std::__cxx_atomic_wait(__a, __test_fn);
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ATOMIC_ATOMIC_SYNC_H
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_sync.h" 3
#endif /* atomic_sync.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* check_memory_order.h expanded by -frewrite-includes */
#include <__atomic/check_memory_order.h>
#else /* check_memory_order.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/check_memory_order.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ATOMIC_CHECK_MEMORY_ORDER_H
#define _LIBCPP___ATOMIC_CHECK_MEMORY_ORDER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/check_memory_order.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/check_memory_order.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/check_memory_order.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/check_memory_order.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/check_memory_order.h" 3

#define _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) \
  _LIBCPP_DIAGNOSE_WARNING(__m == memory_order_consume || \
                           __m == memory_order_acquire || \
                           __m == memory_order_acq_rel,   \
                        "memory order argument to atomic operation is invalid")

#define _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) \
  _LIBCPP_DIAGNOSE_WARNING(__m == memory_order_release || \
                           __m == memory_order_acq_rel,   \
                        "memory order argument to atomic operation is invalid")

#define _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__m, __f) \
  _LIBCPP_DIAGNOSE_WARNING(__f == memory_order_release || \
                           __f == memory_order_acq_rel,   \
                        "memory order argument to atomic operation is invalid")

#endif // _LIBCPP___ATOMIC_CHECK_MEMORY_ORDER_H
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/check_memory_order.h" 3
#endif /* check_memory_order.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/cxx_atomic_impl.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/is_always_lock_free.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/memory_order.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_integral.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, bool = is_integral<_Tp>::value && !is_same<_Tp, bool>::value>
struct __atomic_base  // false
{
    mutable __cxx_atomic_impl<_Tp> __a_;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
  static _LIBCPP_CONSTEXPR bool is_always_lock_free = __libcpp_is_always_lock_free<__cxx_atomic_impl<_Tp> >::__value;
#endif
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3

    _LIBCPP_HIDE_FROM_ABI
    bool is_lock_free() const volatile _NOEXCEPT
        {return __cxx_atomic_is_lock_free(sizeof(_Tp));}
    _LIBCPP_HIDE_FROM_ABI
    bool is_lock_free() const _NOEXCEPT
        {return static_cast<__atomic_base const volatile*>(this)->is_lock_free();}
    _LIBCPP_HIDE_FROM_ABI void store(_Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
        _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) {
      std::__cxx_atomic_store(std::addressof(__a_), __d, __m);
    }
    _LIBCPP_HIDE_FROM_ABI void store(_Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT
        _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) {
      std::__cxx_atomic_store(std::addressof(__a_), __d, __m);
    }
    _LIBCPP_HIDE_FROM_ABI _Tp load(memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT
        _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) {
      return std::__cxx_atomic_load(std::addressof(__a_), __m);
    }
    _LIBCPP_HIDE_FROM_ABI _Tp load(memory_order __m = memory_order_seq_cst) const _NOEXCEPT
        _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) {
      return std::__cxx_atomic_load(std::addressof(__a_), __m);
    }
    _LIBCPP_HIDE_FROM_ABI
    operator _Tp() const volatile _NOEXCEPT {return load();}
    _LIBCPP_HIDE_FROM_ABI
    operator _Tp() const _NOEXCEPT          {return load();}
    _LIBCPP_HIDE_FROM_ABI _Tp exchange(_Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
      return std::__cxx_atomic_exchange(std::addressof(__a_), __d, __m);
    }
    _LIBCPP_HIDE_FROM_ABI _Tp exchange(_Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
      return std::__cxx_atomic_exchange(std::addressof(__a_), __d, __m);
    }
    _LIBCPP_HIDE_FROM_ABI bool
    compare_exchange_weak(_Tp& __e, _Tp __d, memory_order __s, memory_order __f) volatile _NOEXCEPT
        _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f) {
      return std::__cxx_atomic_compare_exchange_weak(std::addressof(__a_), std::addressof(__e), __d, __s, __f);
    }
    _LIBCPP_HIDE_FROM_ABI bool compare_exchange_weak(_Tp& __e, _Tp __d, memory_order __s, memory_order __f) _NOEXCEPT
        _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f) {
      return std::__cxx_atomic_compare_exchange_weak(std::addressof(__a_), std::addressof(__e), __d, __s, __f);
    }
    _LIBCPP_HIDE_FROM_ABI bool
    compare_exchange_strong(_Tp& __e, _Tp __d, memory_order __s, memory_order __f) volatile _NOEXCEPT
        _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f) {
      return std::__cxx_atomic_compare_exchange_strong(std::addressof(__a_), std::addressof(__e), __d, __s, __f);
    }
    _LIBCPP_HIDE_FROM_ABI bool compare_exchange_strong(_Tp& __e, _Tp __d, memory_order __s, memory_order __f) _NOEXCEPT
        _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f) {
      return std::__cxx_atomic_compare_exchange_strong(std::addressof(__a_), std::addressof(__e), __d, __s, __f);
    }
    _LIBCPP_HIDE_FROM_ABI bool
    compare_exchange_weak(_Tp& __e, _Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
      return std::__cxx_atomic_compare_exchange_weak(std::addressof(__a_), std::addressof(__e), __d, __m, __m);
    }
    _LIBCPP_HIDE_FROM_ABI bool
    compare_exchange_weak(_Tp& __e, _Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
      return std::__cxx_atomic_compare_exchange_weak(std::addressof(__a_), std::addressof(__e), __d, __m, __m);
    }
    _LIBCPP_HIDE_FROM_ABI bool
    compare_exchange_strong(_Tp& __e, _Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
      return std::__cxx_atomic_compare_exchange_strong(std::addressof(__a_), std::addressof(__e), __d, __m, __m);
    }
    _LIBCPP_HIDE_FROM_ABI bool
    compare_exchange_strong(_Tp& __e, _Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
      return std::__cxx_atomic_compare_exchange_strong(std::addressof(__a_), std::addressof(__e), __d, __m, __m);
    }

    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void wait(_Tp __v, memory_order __m = memory_order_seq_cst) const
        volatile _NOEXCEPT {
      std::__cxx_atomic_wait(std::addressof(__a_), __v, __m);
    }
    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
    wait(_Tp __v, memory_order __m = memory_order_seq_cst) const _NOEXCEPT {
      std::__cxx_atomic_wait(std::addressof(__a_), __v, __m);
    }
    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_one() volatile _NOEXCEPT {
      std::__cxx_atomic_notify_one(std::addressof(__a_));
    }
    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_one() _NOEXCEPT {
      std::__cxx_atomic_notify_one(std::addressof(__a_));
    }
    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_all() volatile _NOEXCEPT {
      std::__cxx_atomic_notify_all(std::addressof(__a_));
    }
    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_all() _NOEXCEPT {
      std::__cxx_atomic_notify_all(std::addressof(__a_));
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
    _LIBCPP_HIDE_FROM_ABI constexpr
    __atomic_base() noexcept(is_nothrow_default_constructible_v<_Tp>) : __a_(_Tp()) {}
#else
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
    _LIBCPP_HIDE_FROM_ABI
    __atomic_base() _NOEXCEPT = default;
#endif
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
    __atomic_base(_Tp __d) _NOEXCEPT : __a_(__d) {}

    __atomic_base(const __atomic_base&) = delete;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 143 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
template <class _Tp, bool __b>
_LIBCPP_CONSTEXPR bool __atomic_base<_Tp, __b>::is_always_lock_free;
#endif
# 146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3

// atomic<Integral>

template <class _Tp>
struct __atomic_base<_Tp, true>
    : public __atomic_base<_Tp, false>
{
    using __base = __atomic_base<_Tp, false>;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    __atomic_base() _NOEXCEPT = default;

    _LIBCPP_HIDE_FROM_ABI
    _LIBCPP_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __base(__d) {}

    _LIBCPP_HIDE_FROM_ABI _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
      return std::__cxx_atomic_fetch_add(std::addressof(this->__a_), __op, __m);
    }
    _LIBCPP_HIDE_FROM_ABI _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
      return std::__cxx_atomic_fetch_add(std::addressof(this->__a_), __op, __m);
    }
    _LIBCPP_HIDE_FROM_ABI _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
      return std::__cxx_atomic_fetch_sub(std::addressof(this->__a_), __op, __m);
    }
    _LIBCPP_HIDE_FROM_ABI _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
      return std::__cxx_atomic_fetch_sub(std::addressof(this->__a_), __op, __m);
    }
    _LIBCPP_HIDE_FROM_ABI _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
      return std::__cxx_atomic_fetch_and(std::addressof(this->__a_), __op, __m);
    }
    _LIBCPP_HIDE_FROM_ABI _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
      return std::__cxx_atomic_fetch_and(std::addressof(this->__a_), __op, __m);
    }
    _LIBCPP_HIDE_FROM_ABI _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
      return std::__cxx_atomic_fetch_or(std::addressof(this->__a_), __op, __m);
    }
    _LIBCPP_HIDE_FROM_ABI _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
      return std::__cxx_atomic_fetch_or(std::addressof(this->__a_), __op, __m);
    }
    _LIBCPP_HIDE_FROM_ABI _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
      return std::__cxx_atomic_fetch_xor(std::addressof(this->__a_), __op, __m);
    }
    _LIBCPP_HIDE_FROM_ABI _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
      return std::__cxx_atomic_fetch_xor(std::addressof(this->__a_), __op, __m);
    }

    _LIBCPP_HIDE_FROM_ABI
    _Tp operator++(int) volatile _NOEXCEPT      {return fetch_add(_Tp(1));}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator++(int) _NOEXCEPT               {return fetch_add(_Tp(1));}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator--(int) volatile _NOEXCEPT      {return fetch_sub(_Tp(1));}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator--(int) _NOEXCEPT               {return fetch_sub(_Tp(1));}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator++() volatile _NOEXCEPT         {return fetch_add(_Tp(1)) + _Tp(1);}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator++() _NOEXCEPT                  {return fetch_add(_Tp(1)) + _Tp(1);}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator--() volatile _NOEXCEPT         {return fetch_sub(_Tp(1)) - _Tp(1);}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator--() _NOEXCEPT                  {return fetch_sub(_Tp(1)) - _Tp(1);}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator+=(_Tp __op) volatile _NOEXCEPT {return fetch_add(__op) + __op;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator+=(_Tp __op) _NOEXCEPT          {return fetch_add(__op) + __op;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator-=(_Tp __op) volatile _NOEXCEPT {return fetch_sub(__op) - __op;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator-=(_Tp __op) _NOEXCEPT          {return fetch_sub(__op) - __op;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator&=(_Tp __op) volatile _NOEXCEPT {return fetch_and(__op) & __op;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator&=(_Tp __op) _NOEXCEPT          {return fetch_and(__op) & __op;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator|=(_Tp __op) volatile _NOEXCEPT {return fetch_or(__op) | __op;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator|=(_Tp __op) _NOEXCEPT          {return fetch_or(__op) | __op;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator^=(_Tp __op) volatile _NOEXCEPT {return fetch_xor(__op) ^ __op;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator^=(_Tp __op) _NOEXCEPT          {return fetch_xor(__op) ^ __op;}
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ATOMIC_ATOMIC_BASE_H
# 233 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_base.h" 3
#endif /* atomic_base.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/check_memory_order.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/cxx_atomic_impl.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/memory_order.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_function.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_pointer.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct atomic
    : public __atomic_base<_Tp>
{
  using __base          = __atomic_base<_Tp>;
  using value_type      = _Tp;
  using difference_type = value_type;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
    _LIBCPP_HIDE_FROM_ABI
    atomic() = default;
#else
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
    _LIBCPP_HIDE_FROM_ABI
    atomic() _NOEXCEPT = default;
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3

    _LIBCPP_HIDE_FROM_ABI
    _LIBCPP_CONSTEXPR atomic(_Tp __d) _NOEXCEPT : __base(__d) {}

    _LIBCPP_HIDE_FROM_ABI
    _Tp operator=(_Tp __d) volatile _NOEXCEPT
        {__base::store(__d); return __d;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp operator=(_Tp __d) _NOEXCEPT
        {__base::store(__d); return __d;}

    atomic& operator=(const atomic&) = delete;
    atomic& operator=(const atomic&) volatile = delete;
};

// atomic<T*>

template <class _Tp>
struct atomic<_Tp*>
    : public __atomic_base<_Tp*>
{
    using __base          = __atomic_base<_Tp*>;
    using value_type      = _Tp*;
    using difference_type = ptrdiff_t;

    _LIBCPP_HIDE_FROM_ABI
    atomic() _NOEXCEPT = default;

    _LIBCPP_HIDE_FROM_ABI
    _LIBCPP_CONSTEXPR atomic(_Tp* __d) _NOEXCEPT : __base(__d) {}

    _LIBCPP_HIDE_FROM_ABI
    _Tp* operator=(_Tp* __d) volatile _NOEXCEPT
        {__base::store(__d); return __d;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp* operator=(_Tp* __d) _NOEXCEPT
        {__base::store(__d); return __d;}

    _LIBCPP_HIDE_FROM_ABI
    _Tp* fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
        // __atomic_fetch_add accepts function pointers, guard against them.
        static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
        return std::__cxx_atomic_fetch_add(std::addressof(this->__a_), __op, __m);
    }

    _LIBCPP_HIDE_FROM_ABI
    _Tp* fetch_add(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
        // __atomic_fetch_add accepts function pointers, guard against them.
        static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
        return std::__cxx_atomic_fetch_add(std::addressof(this->__a_), __op, __m);
    }

    _LIBCPP_HIDE_FROM_ABI
    _Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
        // __atomic_fetch_add accepts function pointers, guard against them.
        static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
        return std::__cxx_atomic_fetch_sub(std::addressof(this->__a_), __op, __m);
    }

    _LIBCPP_HIDE_FROM_ABI
    _Tp* fetch_sub(ptrdiff_t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
        // __atomic_fetch_add accepts function pointers, guard against them.
        static_assert(!is_function<__remove_pointer_t<_Tp> >::value, "Pointer to function isn't allowed");
        return std::__cxx_atomic_fetch_sub(std::addressof(this->__a_), __op, __m);
    }

    _LIBCPP_HIDE_FROM_ABI
    _Tp* operator++(int) volatile _NOEXCEPT            {return fetch_add(1);}
    _LIBCPP_HIDE_FROM_ABI
    _Tp* operator++(int) _NOEXCEPT                     {return fetch_add(1);}
    _LIBCPP_HIDE_FROM_ABI
    _Tp* operator--(int) volatile _NOEXCEPT            {return fetch_sub(1);}
    _LIBCPP_HIDE_FROM_ABI
    _Tp* operator--(int) _NOEXCEPT                     {return fetch_sub(1);}
    _LIBCPP_HIDE_FROM_ABI
    _Tp* operator++() volatile _NOEXCEPT               {return fetch_add(1) + 1;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp* operator++() _NOEXCEPT                        {return fetch_add(1) + 1;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp* operator--() volatile _NOEXCEPT               {return fetch_sub(1) - 1;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp* operator--() _NOEXCEPT                        {return fetch_sub(1) - 1;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp* operator+=(ptrdiff_t __op) volatile _NOEXCEPT {return fetch_add(__op) + __op;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp* operator+=(ptrdiff_t __op) _NOEXCEPT          {return fetch_add(__op) + __op;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp* operator-=(ptrdiff_t __op) volatile _NOEXCEPT {return fetch_sub(__op) - __op;}
    _LIBCPP_HIDE_FROM_ABI
    _Tp* operator-=(ptrdiff_t __op) _NOEXCEPT          {return fetch_sub(__op) - __op;}

    atomic& operator=(const atomic&) = delete;
    atomic& operator=(const atomic&) volatile = delete;
};

// atomic_is_lock_free

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
bool
atomic_is_lock_free(const volatile atomic<_Tp>* __o) _NOEXCEPT
{
    return __o->is_lock_free();
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
bool
atomic_is_lock_free(const atomic<_Tp>* __o) _NOEXCEPT
{
    return __o->is_lock_free();
}

// atomic_init

template <class _Tp>
_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI
void
atomic_init(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT
{
    std::__cxx_atomic_init(std::addressof(__o->__a_), __d);
}

template <class _Tp>
_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI
void
atomic_init(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT
{
    std::__cxx_atomic_init(std::addressof(__o->__a_), __d);
}

// atomic_store

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
void
atomic_store(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT
{
    __o->store(__d);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
void
atomic_store(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT
{
    __o->store(__d);
}

// atomic_store_explicit

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
void
atomic_store_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d, memory_order __m) _NOEXCEPT
  _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m)
{
    __o->store(__d, __m);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
void
atomic_store_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d, memory_order __m) _NOEXCEPT
  _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m)
{
    __o->store(__d, __m);
}

// atomic_load

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_load(const volatile atomic<_Tp>* __o) _NOEXCEPT
{
    return __o->load();
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_load(const atomic<_Tp>* __o) _NOEXCEPT
{
    return __o->load();
}

// atomic_load_explicit

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_load_explicit(const volatile atomic<_Tp>* __o, memory_order __m) _NOEXCEPT
  _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m)
{
    return __o->load(__m);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_load_explicit(const atomic<_Tp>* __o, memory_order __m) _NOEXCEPT
  _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m)
{
    return __o->load(__m);
}

// atomic_exchange

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_exchange(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT
{
    return __o->exchange(__d);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_exchange(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT
{
    return __o->exchange(__d);
}

// atomic_exchange_explicit

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_exchange_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d, memory_order __m) _NOEXCEPT
{
    return __o->exchange(__d, __m);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_exchange_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d, memory_order __m) _NOEXCEPT
{
    return __o->exchange(__d, __m);
}

// atomic_compare_exchange_weak

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
bool
atomic_compare_exchange_weak(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d) _NOEXCEPT
{
    return __o->compare_exchange_weak(*__e, __d);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
bool
atomic_compare_exchange_weak(atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d) _NOEXCEPT
{
    return __o->compare_exchange_weak(*__e, __d);
}

// atomic_compare_exchange_strong

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
bool
atomic_compare_exchange_strong(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d) _NOEXCEPT
{
    return __o->compare_exchange_strong(*__e, __d);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
bool
atomic_compare_exchange_strong(atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d) _NOEXCEPT
{
    return __o->compare_exchange_strong(*__e, __d);
}

// atomic_compare_exchange_weak_explicit

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
bool
atomic_compare_exchange_weak_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e,
                                      typename atomic<_Tp>::value_type __d,
                                      memory_order __s, memory_order __f) _NOEXCEPT
  _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
{
    return __o->compare_exchange_weak(*__e, __d, __s, __f);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
bool
atomic_compare_exchange_weak_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d,
                                      memory_order __s, memory_order __f) _NOEXCEPT
  _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
{
    return __o->compare_exchange_weak(*__e, __d, __s, __f);
}

// atomic_compare_exchange_strong_explicit

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
bool
atomic_compare_exchange_strong_explicit(volatile atomic<_Tp>* __o,
                                        typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d,
                                        memory_order __s, memory_order __f) _NOEXCEPT
  _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
{
    return __o->compare_exchange_strong(*__e, __d, __s, __f);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
bool
atomic_compare_exchange_strong_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e,
                                        typename atomic<_Tp>::value_type __d,
                                        memory_order __s, memory_order __f) _NOEXCEPT
  _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
{
    return __o->compare_exchange_strong(*__e, __d, __s, __f);
}

// atomic_wait

template <class _Tp>
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
void atomic_wait(const volatile atomic<_Tp>* __o,
                 typename atomic<_Tp>::value_type __v) _NOEXCEPT
{
    return __o->wait(__v);
}

template <class _Tp>
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
void atomic_wait(const atomic<_Tp>* __o,
                 typename atomic<_Tp>::value_type __v) _NOEXCEPT
{
    return __o->wait(__v);
}

// atomic_wait_explicit

template <class _Tp>
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
void atomic_wait_explicit(const volatile atomic<_Tp>* __o,
                          typename atomic<_Tp>::value_type __v,
                          memory_order __m) _NOEXCEPT
  _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m)
{
    return __o->wait(__v, __m);
}

template <class _Tp>
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
void atomic_wait_explicit(const atomic<_Tp>* __o,
                          typename atomic<_Tp>::value_type __v,
                          memory_order __m) _NOEXCEPT
  _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m)
{
    return __o->wait(__v, __m);
}

// atomic_notify_one

template <class _Tp>
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
void atomic_notify_one(volatile atomic<_Tp>* __o) _NOEXCEPT
{
    __o->notify_one();
}
template <class _Tp>
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
void atomic_notify_one(atomic<_Tp>* __o) _NOEXCEPT
{
    __o->notify_one();
}

// atomic_notify_all

template <class _Tp>
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
void atomic_notify_all(volatile atomic<_Tp>* __o) _NOEXCEPT
{
    __o->notify_all();
}
template <class _Tp>
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
void atomic_notify_all(atomic<_Tp>* __o) _NOEXCEPT
{
    __o->notify_all();
}

// atomic_fetch_add

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_fetch_add(volatile atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op) _NOEXCEPT
{
    return __o->fetch_add(__op);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_fetch_add(atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op) _NOEXCEPT
{
    return __o->fetch_add(__op);
}

// atomic_fetch_add_explicit

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp atomic_fetch_add_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op, memory_order __m) _NOEXCEPT
{
    return __o->fetch_add(__op, __m);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp atomic_fetch_add_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op, memory_order __m) _NOEXCEPT
{
    return __o->fetch_add(__op, __m);
}

// atomic_fetch_sub

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp atomic_fetch_sub(volatile atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op) _NOEXCEPT
{
    return __o->fetch_sub(__op);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp atomic_fetch_sub(atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op) _NOEXCEPT
{
    return __o->fetch_sub(__op);
}

// atomic_fetch_sub_explicit

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp atomic_fetch_sub_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op, memory_order __m) _NOEXCEPT
{
    return __o->fetch_sub(__op, __m);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp atomic_fetch_sub_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op, memory_order __m) _NOEXCEPT
{
    return __o->fetch_sub(__op, __m);
}

// atomic_fetch_and

template <class _Tp, __enable_if_t<is_integral<_Tp>::value && !is_same<_Tp, bool>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_fetch_and(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT
{
    return __o->fetch_and(__op);
}

template <class _Tp, __enable_if_t<is_integral<_Tp>::value && !is_same<_Tp, bool>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_fetch_and(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT
{
    return __o->fetch_and(__op);
}

// atomic_fetch_and_explicit

template <class _Tp, __enable_if_t<is_integral<_Tp>::value && !is_same<_Tp, bool>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_fetch_and_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT
{
    return __o->fetch_and(__op, __m);
}

template <class _Tp, __enable_if_t<is_integral<_Tp>::value && !is_same<_Tp, bool>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_fetch_and_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT
{
    return __o->fetch_and(__op, __m);
}

// atomic_fetch_or

template <class _Tp, __enable_if_t<is_integral<_Tp>::value && !is_same<_Tp, bool>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_fetch_or(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT
{
    return __o->fetch_or(__op);
}

template <class _Tp, __enable_if_t<is_integral<_Tp>::value && !is_same<_Tp, bool>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_fetch_or(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT
{
    return __o->fetch_or(__op);
}

// atomic_fetch_or_explicit

template <class _Tp, __enable_if_t<is_integral<_Tp>::value && !is_same<_Tp, bool>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_fetch_or_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT
{
    return __o->fetch_or(__op, __m);
}

template <class _Tp, __enable_if_t<is_integral<_Tp>::value && !is_same<_Tp, bool>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_fetch_or_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT
{
    return __o->fetch_or(__op, __m);
}

// atomic_fetch_xor

template <class _Tp, __enable_if_t<is_integral<_Tp>::value && !is_same<_Tp, bool>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_fetch_xor(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT
{
    return __o->fetch_xor(__op);
}

template <class _Tp, __enable_if_t<is_integral<_Tp>::value && !is_same<_Tp, bool>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_fetch_xor(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCEPT
{
    return __o->fetch_xor(__op);
}

// atomic_fetch_xor_explicit

template <class _Tp, __enable_if_t<is_integral<_Tp>::value && !is_same<_Tp, bool>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_fetch_xor_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT
{
    return __o->fetch_xor(__op, __m);
}

template <class _Tp, __enable_if_t<is_integral<_Tp>::value && !is_same<_Tp, bool>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
_Tp
atomic_fetch_xor_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op, memory_order __m) _NOEXCEPT
{
    return __o->fetch_xor(__op, __m);
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ATOMIC_ATOMIC_H
# 617 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic.h" 3
#endif /* atomic.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/memory_order.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_execution_policy.h expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#else /* is_execution_policy.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_execution_policy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_IS_EXECUTION_POLICY_H
#define _LIBCPP___TYPE_TRAITS_IS_EXECUTION_POLICY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_execution_policy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_execution_policy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_execution_policy.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_execution_policy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_execution_policy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_execution_policy.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_execution_policy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_execution_policy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class>
inline constexpr bool is_execution_policy_v = false;

template <class>
inline constexpr bool __is_unsequenced_execution_policy_impl = false;

template <class _Tp>
inline constexpr bool __is_unsequenced_execution_policy_v =
    __is_unsequenced_execution_policy_impl<__remove_cvref_t<_Tp>>;

template <class>
inline constexpr bool __is_parallel_execution_policy_impl = false;

template <class _Tp>
inline constexpr bool __is_parallel_execution_policy_v = __is_parallel_execution_policy_impl<__remove_cvref_t<_Tp>>;

namespace execution {
struct __disable_user_instantiations_tag {
  explicit __disable_user_instantiations_tag() = default;
};
} // namespace execution

// TODO: Remove default argument once algorithms are using the new backend dispatching
template <class _ExecutionPolicy>
_LIBCPP_HIDE_FROM_ABI auto
__remove_parallel_policy(const _ExecutionPolicy& = _ExecutionPolicy{execution::__disable_user_instantiations_tag{}});

// Removes the "parallel" part of an execution policy.
// For example, turns par_unseq into unseq, and par into seq.
template <class _ExecutionPolicy>
using __remove_parallel_policy_t = decltype(std::__remove_parallel_policy<_ExecutionPolicy>());

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 17
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_execution_policy.h" 3

#endif // _LIBCPP___TYPE_TRAITS_IS_EXECUTION_POLICY_H
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_execution_policy.h" 3
#endif /* is_execution_policy.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3

_LIBCPP_PUSH_MACROS
#if 0 /* expanded by -frewrite-includes */
#  include <__undef_macros>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Index, class _Brick>
_LIBCPP_HIDE_FROM_ABI optional<bool> __parallel_or(_Index __first, _Index __last, _Brick __f) {
  std::atomic<bool> __found(false);
  auto __ret = __par_backend::__parallel_for(__first, __last, [__f, &__found](_Index __i, _Index __j) {
    if (!__found.load(std::memory_order_relaxed) && __f(__i, __j)) {
      __found.store(true, std::memory_order_relaxed);
      __par_backend::__cancel_execution();
    }
  });
  if (!__ret)
    return nullopt;
  return static_cast<bool>(__found);
}

// TODO: check whether __simd_first() can be used here
template <class _Index, class _DifferenceType, class _Pred>
_LIBCPP_HIDE_FROM_ABI bool __simd_or(_Index __first, _DifferenceType __n, _Pred __pred) noexcept {
  _DifferenceType __block_size = 4 < __n ? 4 : __n;
  const _Index __last          = __first + __n;
  while (__last != __first) {
    int32_t __flag = 1;
    _PSTL_PRAGMA_SIMD_REDUCTION(& : __flag)
    for (_DifferenceType __i = 0; __i < __block_size; ++__i)
      if (__pred(*(__first + __i)))
        __flag = 0;
    if (!__flag)
      return true;

    __first += __block_size;
    if (__last - __first >= __block_size << 1) {
      // Double the block _Size.  Any unnecessary iterations can be amortized against work done so far.
      __block_size <<= 1;
    } else {
      __block_size = __last - __first;
    }
  }
  return false;
}

template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate>
_LIBCPP_HIDE_FROM_ABI optional<bool>
__pstl_any_of(__cpu_backend_tag, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) {
  if constexpr (__is_parallel_execution_policy_v<_ExecutionPolicy> &&
                __has_random_access_iterator_category_or_concept<_ForwardIterator>::value) {
    return std::__parallel_or(
        __first, __last, [&__pred](_ForwardIterator __brick_first, _ForwardIterator __brick_last) {
          auto __res = std::__pstl_any_of<__remove_parallel_policy_t<_ExecutionPolicy>>(
              __cpu_backend_tag{}, __brick_first, __brick_last, __pred);
          _LIBCPP_ASSERT_INTERNAL(__res, "unseq/seq should never try to allocate!");
          return *std::move(__res);
        });
  } else if constexpr (__is_unsequenced_execution_policy_v<_ExecutionPolicy> &&
                       __has_random_access_iterator_category_or_concept<_ForwardIterator>::value) {
    return std::__simd_or(__first, __last - __first, __pred);
  } else {
    return std::any_of(__first, __last, __pred);
  }
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKEND_ANY_OF_H
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/any_of.h" 3
#endif /* any_of.h expanded by -frewrite-includes */
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/backend.h>
#endif /* expanded by -frewrite-includes */
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 3
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* fill.h expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/fill.h>
#else /* fill.h expanded by -frewrite-includes */
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_FILL_H
#define _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_FILL_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/fill.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/backend.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/empty.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Index, class _DifferenceType, class _Tp>
_LIBCPP_HIDE_FROM_ABI _Index __simd_fill_n(_Index __first, _DifferenceType __n, const _Tp& __value) noexcept {
  _PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED
  _PSTL_PRAGMA_SIMD
  for (_DifferenceType __i = 0; __i < __n; ++__i)
    __first[__i] = __value;
  return __first + __n;
}

template <class _ExecutionPolicy, class _ForwardIterator, class _Tp>
_LIBCPP_HIDE_FROM_ABI optional<__empty>
__pstl_fill(__cpu_backend_tag, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
  if constexpr (__is_parallel_execution_policy_v<_ExecutionPolicy> &&
                __has_random_access_iterator_category_or_concept<_ForwardIterator>::value) {
    return __par_backend::__parallel_for(
        __first, __last, [&__value](_ForwardIterator __brick_first, _ForwardIterator __brick_last) {
          [[maybe_unused]] auto __res = std::__pstl_fill<__remove_parallel_policy_t<_ExecutionPolicy>>(
              __cpu_backend_tag{}, __brick_first, __brick_last, __value);
          _LIBCPP_ASSERT_INTERNAL(__res, "unseq/seq should never try to allocate!");
        });
  } else if constexpr (__is_unsequenced_execution_policy_v<_ExecutionPolicy> &&
                       __has_random_access_iterator_category_or_concept<_ForwardIterator>::value) {
    std::__simd_fill_n(__first, __last - __first, __value);
    return __empty{};
  } else {
    std::fill(__first, __last, __value);
    return __empty{};
  }
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_FILL_H
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/fill.h" 3
#endif /* fill.h expanded by -frewrite-includes */
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* find_if.h expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/find_if.h>
#else /* find_if.h expanded by -frewrite-includes */
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_FIND_IF_H
#define _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_FIND_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/find_if.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/backend.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/atomic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3

_LIBCPP_PUSH_MACROS
#if 0 /* expanded by -frewrite-includes */
#  include <__undef_macros>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Index, class _Brick, class _Compare>
_LIBCPP_HIDE_FROM_ABI optional<_Index>
__parallel_find(_Index __first, _Index __last, _Brick __f, _Compare __comp, bool __b_first) {
  typedef typename std::iterator_traits<_Index>::difference_type _DifferenceType;
  const _DifferenceType __n      = __last - __first;
  _DifferenceType __initial_dist = __b_first ? __n : -1;
  std::atomic<_DifferenceType> __extremum(__initial_dist);
  // TODO: find out what is better here: parallel_for or parallel_reduce
  auto __res =
      __par_backend::__parallel_for(__first, __last, [__comp, __f, __first, &__extremum](_Index __i, _Index __j) {
        // See "Reducing Contention Through Priority Updates", PPoPP '13, for discussion of
        // why using a shared variable scales fairly well in this situation.
        if (__comp(__i - __first, __extremum)) {
          _Index __result = __f(__i, __j);
          // If not '__last' returned then we found what we want so put this to extremum
          if (__result != __j) {
            const _DifferenceType __k = __result - __first;
            for (_DifferenceType __old = __extremum; __comp(__k, __old); __old = __extremum) {
              __extremum.compare_exchange_weak(__old, __k);
            }
          }
        }
      });
  if (!__res)
    return nullopt;
  return __extremum.load() != __initial_dist ? __first + __extremum.load() : __last;
}

template <class _Index, class _DifferenceType, class _Compare>
_LIBCPP_HIDE_FROM_ABI _Index
__simd_first(_Index __first, _DifferenceType __begin, _DifferenceType __end, _Compare __comp) noexcept {
  // Experiments show good block sizes like this
  const _DifferenceType __block_size                        = 8;
  alignas(__lane_size) _DifferenceType __lane[__block_size] = {0};
  while (__end - __begin >= __block_size) {
    _DifferenceType __found = 0;
    _PSTL_PRAGMA_SIMD_REDUCTION(| : __found) for (_DifferenceType __i = __begin; __i < __begin + __block_size; ++__i) {
      const _DifferenceType __t = __comp(__first, __i);
      __lane[__i - __begin]     = __t;
      __found |= __t;
    }
    if (__found) {
      _DifferenceType __i;
      // This will vectorize
      for (__i = 0; __i < __block_size; ++__i) {
        if (__lane[__i]) {
          break;
        }
      }
      return __first + __begin + __i;
    }
    __begin += __block_size;
  }

  // Keep remainder scalar
  while (__begin != __end) {
    if (__comp(__first, __begin)) {
      return __first + __begin;
    }
    ++__begin;
  }
  return __first + __end;
}

template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate>
_LIBCPP_HIDE_FROM_ABI optional<_ForwardIterator>
__pstl_find_if(__cpu_backend_tag, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) {
  if constexpr (__is_parallel_execution_policy_v<_ExecutionPolicy> &&
                __has_random_access_iterator_category_or_concept<_ForwardIterator>::value) {
    return std::__parallel_find(
        __first,
        __last,
        [&__pred](_ForwardIterator __brick_first, _ForwardIterator __brick_last) {
          auto __res = std::__pstl_find_if<__remove_parallel_policy_t<_ExecutionPolicy>>(
              __cpu_backend_tag{}, __brick_first, __brick_last, __pred);
          _LIBCPP_ASSERT_INTERNAL(__res, "unseq/seq should never try to allocate!");
          return *std::move(__res);
        },
        less<>{},
        true);
  } else if constexpr (__is_unsequenced_execution_policy_v<_ExecutionPolicy> &&
                       __has_random_access_iterator_category_or_concept<_ForwardIterator>::value) {
    using __diff_t = __iter_diff_t<_ForwardIterator>;
    return std::__simd_first(__first, __diff_t(0), __last - __first, [&__pred](_ForwardIterator __iter, __diff_t __i) {
      return __pred(__iter[__i]);
    });
  } else {
    return std::find_if(__first, __last, __pred);
  }
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_FIND_IF_H
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/find_if.h" 3
#endif /* find_if.h expanded by -frewrite-includes */
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* for_each.h expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/for_each.h>
#else /* for_each.h expanded by -frewrite-includes */
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKNEDS_FOR_EACH_H
#define _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKNEDS_FOR_EACH_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/for_each.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/backend.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/empty.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Iterator, class _DifferenceType, class _Function>
_LIBCPP_HIDE_FROM_ABI _Iterator __simd_walk(_Iterator __first, _DifferenceType __n, _Function __f) noexcept {
  _PSTL_PRAGMA_SIMD
  for (_DifferenceType __i = 0; __i < __n; ++__i)
    __f(__first[__i]);

  return __first + __n;
}

template <class _ExecutionPolicy, class _ForwardIterator, class _Functor>
_LIBCPP_HIDE_FROM_ABI optional<__empty>
__pstl_for_each(__cpu_backend_tag, _ForwardIterator __first, _ForwardIterator __last, _Functor __func) {
  if constexpr (__is_parallel_execution_policy_v<_ExecutionPolicy> &&
                __has_random_access_iterator_category_or_concept<_ForwardIterator>::value) {
    return std::__par_backend::__parallel_for(
        __first, __last, [__func](_ForwardIterator __brick_first, _ForwardIterator __brick_last) {
          [[maybe_unused]] auto __res = std::__pstl_for_each<__remove_parallel_policy_t<_ExecutionPolicy>>(
              __cpu_backend_tag{}, __brick_first, __brick_last, __func);
          _LIBCPP_ASSERT_INTERNAL(__res, "unseq/seq should never try to allocate!");
        });
  } else if constexpr (__is_unsequenced_execution_policy_v<_ExecutionPolicy> &&
                       __has_random_access_iterator_category_or_concept<_ForwardIterator>::value) {
    std::__simd_walk(__first, __last - __first, __func);
    return __empty{};
  } else {
    std::for_each(__first, __last, __func);
    return __empty{};
  }
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKNEDS_FOR_EACH_H
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/for_each.h" 3
#endif /* for_each.h expanded by -frewrite-includes */
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* merge.h expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/merge.h>
#else /* merge.h expanded by -frewrite-includes */
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_MERGE_H
#define _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_MERGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/merge.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/backend.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3

_LIBCPP_PUSH_MACROS
#if 0 /* expanded by -frewrite-includes */
#  include <__undef_macros>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ExecutionPolicy,
          class _ForwardIterator1,
          class _ForwardIterator2,
          class _ForwardOutIterator,
          class _Comp>
_LIBCPP_HIDE_FROM_ABI optional<_ForwardOutIterator> __pstl_merge(
    __cpu_backend_tag,
    _ForwardIterator1 __first1,
    _ForwardIterator1 __last1,
    _ForwardIterator2 __first2,
    _ForwardIterator2 __last2,
    _ForwardOutIterator __result,
    _Comp __comp) {
  if constexpr (__is_parallel_execution_policy_v<_ExecutionPolicy> &&
                __has_random_access_iterator_category_or_concept<_ForwardIterator1>::value &&
                __has_random_access_iterator_category_or_concept<_ForwardIterator2>::value &&
                __has_random_access_iterator_category_or_concept<_ForwardOutIterator>::value) {
    auto __res = __par_backend::__parallel_merge(
        __first1,
        __last1,
        __first2,
        __last2,
        __result,
        __comp,
        [](_ForwardIterator1 __g_first1,
           _ForwardIterator1 __g_last1,
           _ForwardIterator2 __g_first2,
           _ForwardIterator2 __g_last2,
           _ForwardOutIterator __g_result,
           _Comp __g_comp) {
          [[maybe_unused]] auto __g_res = std::__pstl_merge<__remove_parallel_policy_t<_ExecutionPolicy>>(
              __cpu_backend_tag{},
              std::move(__g_first1),
              std::move(__g_last1),
              std::move(__g_first2),
              std::move(__g_last2),
              std::move(__g_result),
              std::move(__g_comp));
          _LIBCPP_ASSERT_INTERNAL(__g_res, "unsed/sed should never try to allocate!");
        });
    if (!__res)
      return nullopt;
    return __result + (__last1 - __first1) + (__last2 - __first2);
  } else {
    return std::merge(__first1, __last1, __first2, __last2, __result, __comp);
  }
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_MERGE_H
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/merge.h" 3
#endif /* merge.h expanded by -frewrite-includes */
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stable_sort.h expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/stable_sort.h>
#else /* stable_sort.h expanded by -frewrite-includes */
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_STABLE_SORT_H
#define _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_STABLE_SORT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/backend.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stable_sort.h expanded by -frewrite-includes */
#include <__algorithm/stable_sort.h>
#else /* stable_sort.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_STABLE_SORT_H
#define _LIBCPP___ALGORITHM_STABLE_SORT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/inplace_merge.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/sort.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__debug_utils/strict_weak_ordering_check.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/destruct_n.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/temporary_buffer.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/unique_ptr.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copy_assignable.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI
void __insertion_sort_move(_BidirectionalIterator __first1, _BidirectionalIterator __last1,
                           typename iterator_traits<_BidirectionalIterator>::value_type* __first2, _Compare __comp) {
  using _Ops = _IterOps<_AlgPolicy>;

  typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
  if (__first1 != __last1) {
    __destruct_n __d(0);
    unique_ptr<value_type, __destruct_n&> __h(__first2, __d);
    value_type* __last2 = __first2;
    ::new ((void*)__last2) value_type(_Ops::__iter_move(__first1));
    __d.template __incr<value_type>();
    for (++__last2; ++__first1 != __last1; ++__last2) {
      value_type* __j2 = __last2;
      value_type* __i2 = __j2;
      if (__comp(*__first1, *--__i2)) {
        ::new ((void*)__j2) value_type(std::move(*__i2));
        __d.template __incr<value_type>();
        for (--__j2; __i2 != __first2 && __comp(*__first1, *--__i2); --__j2)
          *__j2 = std::move(*__i2);
        *__j2 = _Ops::__iter_move(__first1);
      } else {
        ::new ((void*)__j2) value_type(_Ops::__iter_move(__first1));
        __d.template __incr<value_type>();
      }
    }
    __h.release();
  }
}

template <class _AlgPolicy, class _Compare, class _InputIterator1, class _InputIterator2>
_LIBCPP_HIDE_FROM_ABI void
__merge_move_construct(_InputIterator1 __first1, _InputIterator1 __last1,
        _InputIterator2 __first2, _InputIterator2 __last2,
        typename iterator_traits<_InputIterator1>::value_type* __result, _Compare __comp)
{
    using _Ops = _IterOps<_AlgPolicy>;

    typedef typename iterator_traits<_InputIterator1>::value_type value_type;
    __destruct_n __d(0);
    unique_ptr<value_type, __destruct_n&> __h(__result, __d);
    for (; true; ++__result)
    {
        if (__first1 == __last1)
        {
            for (; __first2 != __last2; ++__first2, (void) ++__result, __d.template __incr<value_type>())
                ::new ((void*)__result) value_type(_Ops::__iter_move(__first2));
            __h.release();
            return;
        }
        if (__first2 == __last2)
        {
            for (; __first1 != __last1; ++__first1, (void) ++__result, __d.template __incr<value_type>())
                ::new ((void*)__result) value_type(_Ops::__iter_move(__first1));
            __h.release();
            return;
        }
        if (__comp(*__first2, *__first1))
        {
            ::new ((void*)__result) value_type(_Ops::__iter_move(__first2));
            __d.template __incr<value_type>();
            ++__first2;
        }
        else
        {
            ::new ((void*)__result) value_type(_Ops::__iter_move(__first1));
            __d.template __incr<value_type>();
            ++__first1;
        }
    }
}

template <class _AlgPolicy, class _Compare, class _InputIterator1, class _InputIterator2, class _OutputIterator>
_LIBCPP_HIDE_FROM_ABI void
__merge_move_assign(_InputIterator1 __first1, _InputIterator1 __last1,
        _InputIterator2 __first2, _InputIterator2 __last2,
        _OutputIterator __result, _Compare __comp)
{
    using _Ops = _IterOps<_AlgPolicy>;

    for (; __first1 != __last1; ++__result)
    {
        if (__first2 == __last2)
        {
            for (; __first1 != __last1; ++__first1, (void) ++__result)
                *__result = _Ops::__iter_move(__first1);
            return;
        }
        if (__comp(*__first2, *__first1))
        {
            *__result = _Ops::__iter_move(__first2);
            ++__first2;
        }
        else
        {
            *__result = _Ops::__iter_move(__first1);
            ++__first1;
        }
    }
    for (; __first2 != __last2; ++__first2, (void) ++__result)
        *__result = _Ops::__iter_move(__first2);
}

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
void
__stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
              typename iterator_traits<_RandomAccessIterator>::difference_type __len,
              typename iterator_traits<_RandomAccessIterator>::value_type* __buff, ptrdiff_t __buff_size);

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
void
__stable_sort_move(_RandomAccessIterator __first1, _RandomAccessIterator __last1, _Compare __comp,
                   typename iterator_traits<_RandomAccessIterator>::difference_type __len,
                   typename iterator_traits<_RandomAccessIterator>::value_type* __first2)
{
    using _Ops = _IterOps<_AlgPolicy>;

    typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type;
    switch (__len)
    {
    case 0:
        return;
    case 1:
        ::new ((void*)__first2) value_type(_Ops::__iter_move(__first1));
        return;
    case 2:
        __destruct_n __d(0);
        unique_ptr<value_type, __destruct_n&> __h2(__first2, __d);
        if (__comp(*--__last1, *__first1))
        {
            ::new ((void*)__first2) value_type(_Ops::__iter_move(__last1));
            __d.template __incr<value_type>();
            ++__first2;
            ::new ((void*)__first2) value_type(_Ops::__iter_move(__first1));
        }
        else
        {
            ::new ((void*)__first2) value_type(_Ops::__iter_move(__first1));
            __d.template __incr<value_type>();
            ++__first2;
            ::new ((void*)__first2) value_type(_Ops::__iter_move(__last1));
        }
        __h2.release();
        return;
    }
    if (__len <= 8)
    {
        std::__insertion_sort_move<_AlgPolicy, _Compare>(__first1, __last1, __first2, __comp);
        return;
    }
    typename iterator_traits<_RandomAccessIterator>::difference_type __l2 = __len / 2;
    _RandomAccessIterator __m = __first1 + __l2;
    std::__stable_sort<_AlgPolicy, _Compare>(__first1, __m, __comp, __l2, __first2, __l2);
    std::__stable_sort<_AlgPolicy, _Compare>(__m, __last1, __comp, __len - __l2, __first2 + __l2, __len - __l2);
    std::__merge_move_construct<_AlgPolicy, _Compare>(__first1, __m, __m, __last1, __first2, __comp);
}

template <class _Tp>
struct __stable_sort_switch
{
    static const unsigned value = 128*is_trivially_copy_assignable<_Tp>::value;
};

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
void
__stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
              typename iterator_traits<_RandomAccessIterator>::difference_type __len,
              typename iterator_traits<_RandomAccessIterator>::value_type* __buff, ptrdiff_t __buff_size)
{
    typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type;
    typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
    switch (__len)
    {
    case 0:
    case 1:
        return;
    case 2:
        if (__comp(*--__last, *__first))
            _IterOps<_AlgPolicy>::iter_swap(__first, __last);
        return;
    }
    if (__len <= static_cast<difference_type>(__stable_sort_switch<value_type>::value))
    {
        std::__insertion_sort<_AlgPolicy, _Compare>(__first, __last, __comp);
        return;
    }
    typename iterator_traits<_RandomAccessIterator>::difference_type __l2 = __len / 2;
    _RandomAccessIterator __m = __first + __l2;
    if (__len <= __buff_size)
    {
        __destruct_n __d(0);
        unique_ptr<value_type, __destruct_n&> __h2(__buff, __d);
        std::__stable_sort_move<_AlgPolicy, _Compare>(__first, __m, __comp, __l2, __buff);
        __d.__set(__l2, (value_type*)nullptr);
        std::__stable_sort_move<_AlgPolicy, _Compare>(__m, __last, __comp, __len - __l2, __buff + __l2);
        __d.__set(__len, (value_type*)nullptr);
        std::__merge_move_assign<_AlgPolicy, _Compare>(
            __buff, __buff + __l2, __buff + __l2, __buff + __len, __first, __comp);
//         _VSTD::__merge<_Compare>(move_iterator<value_type*>(__buff),
//                                  move_iterator<value_type*>(__buff + __l2),
//                                  move_iterator<_RandomAccessIterator>(__buff + __l2),
//                                  move_iterator<_RandomAccessIterator>(__buff + __len),
//                                  __first, __comp);
        return;
    }
    std::__stable_sort<_AlgPolicy, _Compare>(__first, __m, __comp, __l2, __buff, __buff_size);
    std::__stable_sort<_AlgPolicy, _Compare>(__m, __last, __comp, __len - __l2, __buff, __buff_size);
    std::__inplace_merge<_AlgPolicy>(__first, __m, __last, __comp, __l2, __len - __l2, __buff, __buff_size);
}

template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
inline _LIBCPP_HIDE_FROM_ABI
void __stable_sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp) {
  using value_type = typename iterator_traits<_RandomAccessIterator>::value_type;
  using difference_type = typename iterator_traits<_RandomAccessIterator>::difference_type;

  difference_type __len = __last - __first;
  pair<value_type*, ptrdiff_t> __buf(0, 0);
  unique_ptr<value_type, __return_temporary_buffer> __h;
  if (__len > static_cast<difference_type>(__stable_sort_switch<value_type>::value)) {
// TODO: Remove the use of std::get_temporary_buffer
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
      __buf = std::get_temporary_buffer<value_type>(__len);
_LIBCPP_SUPPRESS_DEPRECATED_POP
      __h.reset(__buf.first);
  }

  std::__stable_sort<_AlgPolicy, __comp_ref_type<_Compare> >(__first, __last, __comp, __len, __buf.first, __buf.second);
  std::__check_strict_weak_ordering_sorted(__first, __last, __comp);
}

template <class _RandomAccessIterator, class _Compare>
inline _LIBCPP_HIDE_FROM_ABI
void stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
  std::__stable_sort_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
}

template <class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI
void stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) {
  std::stable_sort(__first, __last, __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_STABLE_SORT_H
# 281 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_sort.h" 3
#endif /* stable_sort.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/empty.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ExecutionPolicy, class _RandomAccessIterator, class _Comp>
_LIBCPP_HIDE_FROM_ABI optional<__empty>
__pstl_stable_sort(__cpu_backend_tag, _RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp) {
  if constexpr (__is_parallel_execution_policy_v<_ExecutionPolicy>) {
    return __par_backend::__parallel_stable_sort(
        __first, __last, __comp, [](_RandomAccessIterator __g_first, _RandomAccessIterator __g_last, _Comp __g_comp) {
          std::stable_sort(__g_first, __g_last, __g_comp);
        });
  } else {
    std::stable_sort(__first, __last, __comp);
    return __empty{};
  }
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_STABLE_SORT_H
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/stable_sort.h" 3
#endif /* stable_sort.h expanded by -frewrite-includes */
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* transform.h expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/transform.h>
#else /* transform.h expanded by -frewrite-includes */
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_TRANSFORM_H
#define _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_TRANSFORM_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/backend.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* transform.h expanded by -frewrite-includes */
#include <__algorithm/transform.h>
#else /* transform.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/transform.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_TRANSFORM_H
#define _LIBCPP___ALGORITHM_TRANSFORM_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/transform.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/transform.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/transform.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/transform.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _OutputIterator, class _UnaryOperation>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
transform(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _UnaryOperation __op)
{
    for (; __first != __last; ++__first, (void) ++__result)
        *__result = __op(*__first);
    return __result;
}

template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _BinaryOperation>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
transform(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2,
          _OutputIterator __result, _BinaryOperation __binary_op)
{
    for (; __first1 != __last1; ++__first1, (void) ++__first2, ++__result)
        *__result = __binary_op(*__first1, *__first2);
    return __result;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_TRANSFORM_H
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/transform.h" 3
#endif /* transform.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3

_LIBCPP_PUSH_MACROS
#if 0 /* expanded by -frewrite-includes */
#  include <__undef_macros>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Iterator1, class _DifferenceType, class _Iterator2, class _Function>
_LIBCPP_HIDE_FROM_ABI _Iterator2
__simd_walk(_Iterator1 __first1, _DifferenceType __n, _Iterator2 __first2, _Function __f) noexcept {
  _PSTL_PRAGMA_SIMD
  for (_DifferenceType __i = 0; __i < __n; ++__i)
    __f(__first1[__i], __first2[__i]);
  return __first2 + __n;
}

template <class _ExecutionPolicy, class _ForwardIterator, class _ForwardOutIterator, class _UnaryOperation>
_LIBCPP_HIDE_FROM_ABI optional<_ForwardOutIterator> __pstl_transform(
    __cpu_backend_tag,
    _ForwardIterator __first,
    _ForwardIterator __last,
    _ForwardOutIterator __result,
    _UnaryOperation __op) {
  if constexpr (__is_parallel_execution_policy_v<_ExecutionPolicy> &&
                __has_random_access_iterator_category_or_concept<_ForwardIterator>::value &&
                __has_random_access_iterator_category_or_concept<_ForwardOutIterator>::value) {
    std::__par_backend::__parallel_for(
        __first, __last, [__op, __first, __result](_ForwardIterator __brick_first, _ForwardIterator __brick_last) {
          auto __res = std::__pstl_transform<__remove_parallel_policy_t<_ExecutionPolicy>>(
              __cpu_backend_tag{}, __brick_first, __brick_last, __result + (__brick_first - __first), __op);
          _LIBCPP_ASSERT_INTERNAL(__res, "unseq/seq should never try to allocate!");
          return *std::move(__res);
        });
    return __result + (__last - __first);
  } else if constexpr (__is_unsequenced_execution_policy_v<_ExecutionPolicy> &&
                       __has_random_access_iterator_category_or_concept<_ForwardIterator>::value &&
                       __has_random_access_iterator_category_or_concept<_ForwardOutIterator>::value) {
    return std::__simd_walk(
        __first,
        __last - __first,
        __result,
        [&](__iter_reference<_ForwardIterator> __in_value, __iter_reference<_ForwardOutIterator> __out_value) {
          __out_value = __op(__in_value);
        });
  } else {
    return std::transform(__first, __last, __result, __op);
  }
}

template <class _Iterator1, class _DifferenceType, class _Iterator2, class _Iterator3, class _Function>
_LIBCPP_HIDE_FROM_ABI _Iterator3 __simd_walk(
    _Iterator1 __first1, _DifferenceType __n, _Iterator2 __first2, _Iterator3 __first3, _Function __f) noexcept {
  _PSTL_PRAGMA_SIMD
  for (_DifferenceType __i = 0; __i < __n; ++__i)
    __f(__first1[__i], __first2[__i], __first3[__i]);
  return __first3 + __n;
}
template <class _ExecutionPolicy,
          class _ForwardIterator1,
          class _ForwardIterator2,
          class _ForwardOutIterator,
          class _BinaryOperation,
          enable_if_t<is_execution_policy_v<__remove_cvref_t<_ExecutionPolicy>>, int> = 0>
_LIBCPP_HIDE_FROM_ABI optional<_ForwardOutIterator> __pstl_transform(
    __cpu_backend_tag,
    _ForwardIterator1 __first1,
    _ForwardIterator1 __last1,
    _ForwardIterator2 __first2,
    _ForwardOutIterator __result,
    _BinaryOperation __op) {
  if constexpr (__is_parallel_execution_policy_v<_ExecutionPolicy> &&
                __has_random_access_iterator_category_or_concept<_ForwardIterator1>::value &&
                __has_random_access_iterator_category_or_concept<_ForwardIterator2>::value &&
                __has_random_access_iterator_category_or_concept<_ForwardOutIterator>::value) {
    auto __res = std::__par_backend::__parallel_for(
        __first1,
        __last1,
        [__op, __first1, __first2, __result](_ForwardIterator1 __brick_first, _ForwardIterator1 __brick_last) {
          return std::__pstl_transform<__remove_parallel_policy_t<_ExecutionPolicy>>(
              __cpu_backend_tag{},
              __brick_first,
              __brick_last,
              __first2 + (__brick_first - __first1),
              __result + (__brick_first - __first1),
              __op);
        });
    if (!__res)
      return nullopt;
    return __result + (__last1 - __first1);
  } else if constexpr (__is_unsequenced_execution_policy_v<_ExecutionPolicy> &&
                       __has_random_access_iterator_category_or_concept<_ForwardIterator1>::value &&
                       __has_random_access_iterator_category_or_concept<_ForwardIterator2>::value &&
                       __has_random_access_iterator_category_or_concept<_ForwardOutIterator>::value) {
    return std::__simd_walk(
        __first1,
        __last1 - __first1,
        __first2,
        __result,
        [&](__iter_reference<_ForwardIterator1> __in1,
            __iter_reference<_ForwardIterator2> __in2,
            __iter_reference<_ForwardOutIterator> __out_value) { __out_value = __op(__in1, __in2); });
  } else {
    return std::transform(__first1, __last1, __first2, __result, __op);
  }
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 137 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_TRANSFORM_H
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform.h" 3
#endif /* transform.h expanded by -frewrite-includes */
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* transform_reduce.h expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/transform_reduce.h>
#else /* transform_reduce.h expanded by -frewrite-includes */
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_TRANSFORM_REDUCE_H
#define _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_TRANSFORM_REDUCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backends/cpu_backends/backend.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* transform_reduce.h expanded by -frewrite-includes */
#include <__numeric/transform_reduce.h>
#else /* transform_reduce.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/transform_reduce.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___NUMERIC_TRANSFORM_REDUCE_H
#define _LIBCPP___NUMERIC_TRANSFORM_REDUCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/transform_reduce.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/transform_reduce.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/transform_reduce.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/transform_reduce.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/transform_reduce.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/transform_reduce.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/transform_reduce.h" 3
template <class _InputIterator, class _Tp, class _BinaryOp, class _UnaryOp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp transform_reduce(_InputIterator __first,
                                                                             _InputIterator __last, _Tp __init,
                                                                             _BinaryOp __b, _UnaryOp __u) {
  for (; __first != __last; ++__first)
    __init = __b(std::move(__init), __u(*__first));
  return __init;
}

template <class _InputIterator1, class _InputIterator2, class _Tp, class _BinaryOp1, class _BinaryOp2>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp transform_reduce(_InputIterator1 __first1,
                                                                             _InputIterator1 __last1,
                                                                             _InputIterator2 __first2, _Tp __init,
                                                                             _BinaryOp1 __b1, _BinaryOp2 __b2) {
  for (; __first1 != __last1; ++__first1, (void)++__first2)
    __init = __b1(std::move(__init), __b2(*__first1, *__first2));
  return __init;
}

template <class _InputIterator1, class _InputIterator2, class _Tp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp transform_reduce(_InputIterator1 __first1,
                                                                             _InputIterator1 __last1,
                                                                             _InputIterator2 __first2, _Tp __init) {
  return _VSTD::transform_reduce(__first1, __last1, __first2, _VSTD::move(__init), _VSTD::plus<>(),
                                 _VSTD::multiplies<>());
}
#endif
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/transform_reduce.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___NUMERIC_TRANSFORM_REDUCE_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/transform_reduce.h" 3
#endif /* transform_reduce.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/operation_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <
    typename _DifferenceType,
    typename _Tp,
    typename _BinaryOperation,
    typename _UnaryOperation,
    __enable_if_t<__is_trivial_plus_operation<_BinaryOperation, _Tp, _Tp>::value && is_arithmetic_v<_Tp>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _Tp
__simd_transform_reduce(_DifferenceType __n, _Tp __init, _BinaryOperation, _UnaryOperation __f) noexcept {
  _PSTL_PRAGMA_SIMD_REDUCTION(+ : __init)
  for (_DifferenceType __i = 0; __i < __n; ++__i)
    __init += __f(__i);
  return __init;
}

template <
    typename _Size,
    typename _Tp,
    typename _BinaryOperation,
    typename _UnaryOperation,
    __enable_if_t<!(__is_trivial_plus_operation<_BinaryOperation, _Tp, _Tp>::value && is_arithmetic_v<_Tp>), int> = 0>
_LIBCPP_HIDE_FROM_ABI _Tp
__simd_transform_reduce(_Size __n, _Tp __init, _BinaryOperation __binary_op, _UnaryOperation __f) noexcept {
  const _Size __block_size = __lane_size / sizeof(_Tp);
  if (__n > 2 * __block_size && __block_size > 1) {
    alignas(__lane_size) char __lane_buffer[__lane_size];
    _Tp* __lane = reinterpret_cast<_Tp*>(__lane_buffer);

    // initializer
    _PSTL_PRAGMA_SIMD
    for (_Size __i = 0; __i < __block_size; ++__i) {
      ::new (__lane + __i) _Tp(__binary_op(__f(__i), __f(__block_size + __i)));
    }
    // main loop
    _Size __i                    = 2 * __block_size;
    const _Size __last_iteration = __block_size * (__n / __block_size);
    for (; __i < __last_iteration; __i += __block_size) {
      _PSTL_PRAGMA_SIMD
      for (_Size __j = 0; __j < __block_size; ++__j) {
        __lane[__j] = __binary_op(std::move(__lane[__j]), __f(__i + __j));
      }
    }
    // remainder
    _PSTL_PRAGMA_SIMD
    for (_Size __j = 0; __j < __n - __last_iteration; ++__j) {
      __lane[__j] = __binary_op(std::move(__lane[__j]), __f(__last_iteration + __j));
    }
    // combiner
    for (_Size __j = 0; __j < __block_size; ++__j) {
      __init = __binary_op(std::move(__init), std::move(__lane[__j]));
    }
    // destroyer
    _PSTL_PRAGMA_SIMD
    for (_Size __j = 0; __j < __block_size; ++__j) {
      __lane[__j].~_Tp();
    }
  } else {
    for (_Size __i = 0; __i < __n; ++__i) {
      __init = __binary_op(std::move(__init), __f(__i));
    }
  }
  return __init;
}

template <class _ExecutionPolicy,
          class _ForwardIterator1,
          class _ForwardIterator2,
          class _Tp,
          class _BinaryOperation1,
          class _BinaryOperation2>
_LIBCPP_HIDE_FROM_ABI optional<_Tp> __pstl_transform_reduce(
    __cpu_backend_tag,
    _ForwardIterator1 __first1,
    _ForwardIterator1 __last1,
    _ForwardIterator2 __first2,
    _Tp __init,
    _BinaryOperation1 __reduce,
    _BinaryOperation2 __transform) {
  if constexpr (__is_parallel_execution_policy_v<_ExecutionPolicy> &&
                __has_random_access_iterator_category_or_concept<_ForwardIterator1>::value &&
                __has_random_access_iterator_category_or_concept<_ForwardIterator2>::value) {
    return __par_backend::__parallel_transform_reduce(
        __first1,
        std::move(__last1),
        [__first1, __first2, __transform](_ForwardIterator1 __iter) {
          return __transform(*__iter, *(__first2 + (__iter - __first1)));
        },
        std::move(__init),
        std::move(__reduce),
        [__first1, __first2, __reduce, __transform](
            _ForwardIterator1 __brick_first, _ForwardIterator1 __brick_last, _Tp __brick_init) {
          return *std::__pstl_transform_reduce<__remove_parallel_policy_t<_ExecutionPolicy>>(
              __cpu_backend_tag{},
              __brick_first,
              std::move(__brick_last),
              __first2 + (__brick_first - __first1),
              std::move(__brick_init),
              std::move(__reduce),
              std::move(__transform));
        });
  } else if constexpr (__is_unsequenced_execution_policy_v<_ExecutionPolicy> &&
                       __has_random_access_iterator_category_or_concept<_ForwardIterator1>::value &&
                       __has_random_access_iterator_category_or_concept<_ForwardIterator2>::value) {
    return std::__simd_transform_reduce(
        __last1 - __first1, std::move(__init), std::move(__reduce), [&](__iter_diff_t<_ForwardIterator1> __i) {
          return __transform(__first1[__i], __first2[__i]);
        });
  } else {
    return std::transform_reduce(
        std::move(__first1),
        std::move(__last1),
        std::move(__first2),
        std::move(__init),
        std::move(__reduce),
        std::move(__transform));
  }
}

template <class _ExecutionPolicy, class _ForwardIterator, class _Tp, class _BinaryOperation, class _UnaryOperation>
_LIBCPP_HIDE_FROM_ABI optional<_Tp> __pstl_transform_reduce(
    __cpu_backend_tag,
    _ForwardIterator __first,
    _ForwardIterator __last,
    _Tp __init,
    _BinaryOperation __reduce,
    _UnaryOperation __transform) {
  if constexpr (__is_parallel_execution_policy_v<_ExecutionPolicy> &&
                __has_random_access_iterator_category_or_concept<_ForwardIterator>::value) {
    return __par_backend::__parallel_transform_reduce(
        std::move(__first),
        std::move(__last),
        [__transform](_ForwardIterator __iter) { return __transform(*__iter); },
        std::move(__init),
        __reduce,
        [__transform, __reduce](auto __brick_first, auto __brick_last, _Tp __brick_init) {
          auto __res = std::__pstl_transform_reduce<__remove_parallel_policy_t<_ExecutionPolicy>>(
              __cpu_backend_tag{},
              std::move(__brick_first),
              std::move(__brick_last),
              std::move(__brick_init),
              std::move(__reduce),
              std::move(__transform));
          _LIBCPP_ASSERT_INTERNAL(__res, "unseq/seq should never try to allocate!");
          return *std::move(__res);
        });
  } else if constexpr (__is_unsequenced_execution_policy_v<_ExecutionPolicy> &&
                       __has_random_access_iterator_category_or_concept<_ForwardIterator>::value) {
    return std::__simd_transform_reduce(
        __last - __first,
        std::move(__init),
        std::move(__reduce),
        [=, &__transform](__iter_diff_t<_ForwardIterator> __i) { return __transform(__first[__i]); });
  } else {
    return std::transform_reduce(
        std::move(__first), std::move(__last), std::move(__init), std::move(__reduce), std::move(__transform));
  }
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 192 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_TRANSFORM_REDUCE_H
# 194 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backends/transform_reduce.h" 3
#endif /* transform_reduce.h expanded by -frewrite-includes */
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 2 3

#endif // _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKEND_H
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backends/cpu_backend.h" 3
#endif /* cpu_backend.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* execution expanded by -frewrite-includes */
#include <execution>
#else /* execution expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_EXECUTION
#define _LIBCPP_EXECUTION

/*
namespace std::execution {
  struct sequenced_policy;
  struct parallel_policy;
  struct parallel_unsequenced_policy;
  struct unsequenced_policy; // since C++20

  inline constexpr sequenced_policy seq = implementation-defined;
  inline constexpr parallel_policy par = implementation-defined;
  inline constexpr parallel_unsequenced_policy par_unseq = implementation-defined;
  inline constexpr unsequenced_policy unseq = implementation-defined; // since C++20
}

namespace std {
  template <class T>
  struct is_execution_policy;

  template <class T>
  inline constexpr bool is_execution_policy_v;
}
*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3
#endif
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace execution {
struct sequenced_policy {
  _LIBCPP_HIDE_FROM_ABI constexpr explicit sequenced_policy(__disable_user_instantiations_tag) {}
  sequenced_policy(const sequenced_policy&)            = delete;
  sequenced_policy& operator=(const sequenced_policy&) = delete;
};

inline constexpr sequenced_policy seq{__disable_user_instantiations_tag{}};

struct parallel_policy {
  _LIBCPP_HIDE_FROM_ABI constexpr explicit parallel_policy(__disable_user_instantiations_tag) {}
  parallel_policy(const parallel_policy&)            = delete;
  parallel_policy& operator=(const parallel_policy&) = delete;
};

inline constexpr parallel_policy par{__disable_user_instantiations_tag{}};

struct parallel_unsequenced_policy {
  _LIBCPP_HIDE_FROM_ABI constexpr explicit parallel_unsequenced_policy(__disable_user_instantiations_tag) {}
  parallel_unsequenced_policy(const parallel_unsequenced_policy&)            = delete;
  parallel_unsequenced_policy& operator=(const parallel_unsequenced_policy&) = delete;
};

inline constexpr parallel_unsequenced_policy par_unseq{__disable_user_instantiations_tag{}};

struct __unsequenced_policy {
  _LIBCPP_HIDE_FROM_ABI constexpr explicit __unsequenced_policy(__disable_user_instantiations_tag) {}
  __unsequenced_policy(const __unsequenced_policy&)            = delete;
  __unsequenced_policy& operator=(const __unsequenced_policy&) = delete;
};

constexpr __unsequenced_policy __unseq{__disable_user_instantiations_tag{}};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3

struct unsequenced_policy {
  _LIBCPP_HIDE_FROM_ABI constexpr explicit unsequenced_policy(__disable_user_instantiations_tag) {}
  unsequenced_policy(const unsequenced_policy&)            = delete;
  unsequenced_policy& operator=(const unsequenced_policy&) = delete;
};

inline constexpr unsequenced_policy unseq{__disable_user_instantiations_tag{}};

#  endif // _LIBCPP_STD_VER >= 20
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3

} // namespace execution

template <>
inline constexpr bool is_execution_policy_v<execution::sequenced_policy> = true;

template <>
inline constexpr bool is_execution_policy_v<execution::parallel_policy> = true;

template <>
inline constexpr bool is_execution_policy_v<execution::parallel_unsequenced_policy> = true;

template <>
inline constexpr bool is_execution_policy_v<execution::__unsequenced_policy> = true;

template <>
inline constexpr bool __is_parallel_execution_policy_impl<execution::parallel_policy> = true;

template <>
inline constexpr bool __is_parallel_execution_policy_impl<execution::parallel_unsequenced_policy> = true;

template <>
inline constexpr bool __is_unsequenced_execution_policy_impl<execution::__unsequenced_policy> = true;

template <>
inline constexpr bool __is_unsequenced_execution_policy_impl<execution::parallel_unsequenced_policy> = true;

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3
template <>
inline constexpr bool is_execution_policy_v<execution::unsequenced_policy> = true;

template <>
inline constexpr bool __is_unsequenced_execution_policy_impl<execution::unsequenced_policy> = true;

#  endif
# 129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3

template <class _Tp>
struct is_execution_policy : bool_constant<is_execution_policy_v<_Tp>> {};

template <class _ExecutionPolicy>
_LIBCPP_HIDE_FROM_ABI auto __remove_parallel_policy(const _ExecutionPolicy&) {
  if constexpr (is_same_v<_ExecutionPolicy, execution::parallel_policy>) {
    return execution::sequenced_policy(execution::__disable_user_instantiations_tag{});
  } else if constexpr (is_same_v<_ExecutionPolicy, execution::parallel_unsequenced_policy>) {
    return execution::__unsequenced_policy{execution::__disable_user_instantiations_tag{}};
  }
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3

#endif // _LIBCPP_EXECUTION
# 147 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/execution" 3
#endif /* execution expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

/*
TODO: Documentation of how backends work

A PSTL parallel backend is a tag type to which the following functions are associated, at minimum:

  template <class _ExecutionPolicy, class _Iterator, class _Func>
  optional<__empty> __pstl_for_each(_Backend, _ExecutionPolicy&&, _Iterator __first, _Iterator __last, _Func __f);

  template <class _ExecutionPolicy, class _Iterator, class _Predicate>
  optional<_Iterator> __pstl_find_if(_Backend, _Iterator __first, _Iterator __last, _Predicate __pred);

  template <class _ExecutionPolicy, class _RandomAccessIterator, class _Comp>
  optional<__empty>
  __pstl_stable_sort(_Backend, _RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp);

  template <class _ExecutionPolicy,
            class _ForwardIterator1,
            class _ForwardIterator2,
            class _ForwardOutIterator,
            class _Comp>
  optional<_ForwardOutIterator> __pstl_merge(_Backend,
                                             _ForwardIterator1 __first1,
                                             _ForwardIterator1 __last1,
                                             _ForwardIterator2 __first2,
                                             _ForwardIterator2 __last2,
                                             _ForwardOutIterator __result,
                                             _Comp __comp);

  template <class _ExecutionPolicy, class _InIterator, class _OutIterator, class _UnaryOperation>
  optional<_OutIterator>
  __pstl_transform(_Backend, _InIterator __first, _InIterator __last, _OutIterator __result, _UnaryOperation __op);

  template <class _ExecutionPolicy, class _InIterator1, class _InIterator2, class _OutIterator, class _BinaryOperation>
  optional<_OutIterator> __pstl_transform(_InIterator1 __first1,
                                          _InIterator2 __first2,
                                          _InIterator1 __last1,
                                          _OutIterator __result,
                                          _BinaryOperation __op);

  template <class _ExecutionPolicy,
            class _Iterator1,
            class _Iterator2,
            class _Tp,
            class _BinaryOperation1,
            class _BinaryOperation2>
  optional<_Tp> __pstl_transform_reduce(_Backend,
                                        _Iterator1 __first1,
                                        _Iterator1 __last1,
                                        _Iterator2 __first2,
                                        _Iterator2 __last2,
                                        _Tp __init,
                                        _BinaryOperation1 __reduce,
                                        _BinaryOperation2 __transform);

  template <class _ExecutionPolicy, class _Iterator, class _Tp, class _BinaryOperation, class _UnaryOperation>
  optional<_Tp> __pstl_transform_reduce(_Backend,
                                        _Iterator __first,
                                        _Iterator __last,
                                        _Tp __init,
                                        _BinaryOperation __reduce,
                                        _UnaryOperation __transform);

// TODO: Complete this list

The following functions are optional but can be provided. If provided, they are used by the corresponding
algorithms, otherwise they are implemented in terms of other algorithms. If none of the optional algorithms are
implemented, all the algorithms will eventually forward to the basis algorithms listed above:

  template <class _ExecutionPolicy, class _Iterator, class _Size, class _Func>
  optional<__empty> __pstl_for_each_n(_Backend, _Iterator __first, _Size __n, _Func __f);

  template <class _ExecutionPolicy, class _Iterator, class _Predicate>
  optional<bool> __pstl_any_of(_Backend, _Iterator __first, _iterator __last, _Predicate __pred);

  template <class _ExecutionPolicy, class _Iterator, class _Predicate>
  optional<bool> __pstl_all_of(_Backend, _Iterator __first, _iterator __last, _Predicate __pred);

  template <class _ExecutionPolicy, class _Iterator, class _Predicate>
  optional<bool> __pstl_none_of(_Backend, _Iterator __first, _iterator __last, _Predicate __pred);

  template <class _ExecutionPolicy, class _Iterator, class _Tp>
  optional<_Iterator> __pstl_find(_Backend, _Iterator __first, _Iterator __last, const _Tp& __value);

  template <class _ExecutionPolicy, class _Iterator, class _Predicate>
  optional<_Iterator> __pstl_find_if_not(_Backend, _Iterator __first, _Iterator __last, _Predicate __pred);

  template <class _ExecutionPolicy, class _Iterator, class _Tp>
  optional<__empty> __pstl_fill(_Backend, _Iterator __first, _Iterator __last, const _Tp& __value);

  template <class _ExecutionPolicy, class _Iterator, class _SizeT, class _Tp>
  optional<__empty> __pstl_fill_n(_Backend, _Iterator __first, _SizeT __n, const _Tp& __value);

  template <class _ExecutionPolicy, class _Iterator, class _Generator>
  optional<__empty> __pstl_generate(_Backend, _Iterator __first, _Iterator __last, _Generator __gen);

  template <class _ExecutionPolicy, class _Iterator, class _Predicate>
  optional<__empty> __pstl_is_partitioned(_Backend, _Iterator __first, _Iterator __last, _Predicate __pred);

  template <class _ExecutionPolicy, class _Iterator, class _Size, class _Generator>
  optional<__empty> __pstl_generator_n(_Backend, _Iterator __first, _Size __n, _Generator __gen);

  template <class _ExecutionPolicy, class _terator1, class _Iterator2, class _OutIterator, class _Comp>
  optional<_OutIterator> __pstl_merge(_Backend,
                                      _Iterator1 __first1,
                                      _Iterator1 __last1,
                                      _Iterator2 __first2,
                                      _Iterator2 __last2,
                                      _OutIterator __result,
                                      _Comp __comp);

  template <class _ExecutionPolicy, class _Iterator, class _Tp, class _BinaryOperation>
  optional<_Tp> __pstl_reduce(_Backend, _Iterator __first, _Iterator __last, _Tp __init, _BinaryOperation __op);

  temlate <class _ExecutionPolicy, class _Iterator>
  optional<__iter_value_type<_Iterator>> __pstl_reduce(_Backend, _Iterator __first, _Iterator __last);

  template <class _ExecuitonPolicy, class _Iterator, class _Tp>
  optional<__iter_diff_t<_Iterator>> __pstl_count(_Backend, _Iterator __first, _Iterator __last, const _Tp& __value);

  template <class _ExecutionPolicy, class _Iterator, class _Predicate>
  optional<__iter_diff_t<_Iterator>> __pstl_count_if(_Backend, _Iterator __first, _Iterator __last, _Predicate __pred);

  template <class _ExecutionPolicy, class _Iterator, class _Tp>
  optional<__empty>
  __pstl_replace(_Backend, _Iterator __first, _Iterator __last, const _Tp& __old_value, const _Tp& __new_value);

  template <class _ExecutionPolicy, class _Iterator, class _Pred, class _Tp>
  optional<__empty>
  __pstl_replace_if(_Backend, _Iterator __first, _Iterator __last, _Pred __pred, const _Tp& __new_value);

  template <class _ExecutionPolicy, class _Iterator, class _OutIterator, class _Tp>
  optional<__empty> __pstl_replace_copy(_Backend,
                                        _Iterator __first,
                                        _Iterator __last,
                                        _OutIterator __result,
                                        const _Tp& __old_value,
                                        const _Tp& __new_value);

  template <class _ExecutionPolicy, class _Iterator, class _OutIterator, class _Pred, class _Tp>
  optional<__empty> __pstl_replace_copy_if(_Backend,
                                           _Iterator __first,
                                           _Iterator __last,
                                           _OutIterator __result,
                                           _Pred __pred,
                                           const _Tp& __new_value);

  template <class _ExecutionPolicy, class _Iterator, class _Comp>
  optional<__empty> __pstl_sort(_Backend, _Iterator __first, _Iterator __last, _Comp __comp);

// TODO: Complete this list

Exception handling
==================

PSTL backends are expected to report errors (i.e. failure to allocate) by returning a disengaged `optional` from their
implementation. Exceptions shouldn't be used to report an internal failure-to-allocate, since all exceptions are turned
into a program termination at the front-end level. When a backend returns a disengaged `optional` to the frontend, the
frontend will turn that into a call to `std::__throw_bad_alloc();` to report the internal failure to the user.
*/

template <class _ExecutionPolicy>
struct __select_backend;

template <>
struct __select_backend<std::execution::sequenced_policy> {
  using type = __cpu_backend_tag;
};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 193 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 3
template <>
struct __select_backend<std::execution::unsequenced_policy> {
  using type = __cpu_backend_tag;
};
#  endif
# 198 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_PSTL_CPU_BACKEND_SERIAL) || defined(_LIBCPP_PSTL_CPU_BACKEND_THREAD) ||                          \
      defined(_LIBCPP_PSTL_CPU_BACKEND_LIBDISPATCH)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 201 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 3
template <>
struct __select_backend<std::execution::parallel_policy> {
  using type = __cpu_backend_tag;
};

template <>
struct __select_backend<std::execution::parallel_unsequenced_policy> {
  using type = __cpu_backend_tag;
};

#  else
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 3

// ...New vendors can add parallel backends here...

#    error "Invalid choice of a PSTL parallel backend"
#  endif
# 217 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 221 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_BACKEND_H
# 223 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_backend.h" 3
#endif /* pstl_backend.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_frontend_dispatch.h expanded by -frewrite-includes */
#include <__algorithm/pstl_frontend_dispatch.h>
#else /* pstl_frontend_dispatch.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_frontend_dispatch.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_FRONTEND_DISPATCH
#define _LIBCPP___ALGORITHM_PSTL_FRONTEND_DISPATCH

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_frontend_dispatch.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_frontend_dispatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_callable.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_frontend_dispatch.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_frontend_dispatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_frontend_dispatch.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_frontend_dispatch.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_frontend_dispatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_frontend_dispatch.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_frontend_dispatch.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_frontend_dispatch.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#  define _LIBCPP_PSTL_CUSTOMIZATION_POINT(name, policy)                                                               \
    [](auto&&... __args) -> decltype(std::name<policy>(                                                                \
                             typename __select_backend<policy>::type{}, std::forward<decltype(__args)>(__args)...)) {  \
      return std::name<policy>(typename __select_backend<policy>::type{}, std::forward<decltype(__args)>(__args)...);  \
    }

template <class _SpecializedImpl, class _GenericImpl, class... _Args>
_LIBCPP_HIDE_FROM_ABI decltype(auto)
__pstl_frontend_dispatch(_SpecializedImpl __specialized_impl, _GenericImpl __generic_impl, _Args&&... __args) {
  if constexpr (__is_callable<_SpecializedImpl, _Args...>::value) {
    return __specialized_impl(std::forward<_Args>(__args)...);
  } else {
    return __generic_impl(std::forward<_Args>(__args)...);
  }
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 17
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_frontend_dispatch.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_FRONTEND_DISPATCH
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_frontend_dispatch.h" 3
#endif /* pstl_frontend_dispatch.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cpp17_iterator_concepts.h expanded by -frewrite-includes */
#include <__iterator/cpp17_iterator_concepts.h>
#else /* cpp17_iterator_concepts.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_CPP17_ITERATOR_CONCEPTS_H
#define _LIBCPP___ITERATOR_CPP17_ITERATOR_CONCEPTS_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/boolean_testable.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_signed.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_void.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/as_const.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
concept __cpp17_move_constructible = is_move_constructible_v<_Tp>;

template <class _Tp>
concept __cpp17_copy_constructible = __cpp17_move_constructible<_Tp> && is_copy_constructible_v<_Tp>;

template <class _Tp>
concept __cpp17_move_assignable = requires(_Tp __lhs, _Tp __rhs) {
  { __lhs = std::move(__rhs) } -> same_as<_Tp&>;
};

template <class _Tp>
concept __cpp17_copy_assignable = __cpp17_move_assignable<_Tp> && requires(_Tp __lhs, _Tp __rhs) {
  { __lhs = __rhs } -> same_as<_Tp&>;
  { __lhs = std::as_const(__rhs) } -> same_as<_Tp&>;
};

template <class _Tp>
concept __cpp17_destructible = requires(_Tp __v) { __v.~_Tp(); };

template <class _Tp>
concept __cpp17_equality_comparable = requires(_Tp __lhs, _Tp __rhs) {
  { __lhs == __rhs } -> __boolean_testable;
  { std::as_const(__lhs) == __rhs } -> __boolean_testable;
  { __lhs == std::as_const(__rhs) } -> __boolean_testable;
  { std::as_const(__lhs) == std::as_const(__rhs) } -> __boolean_testable;
};

template <class _Tp>
concept __cpp17_default_constructible = is_default_constructible_v<_Tp>;

template <class _Iter>
concept __cpp17_iterator =
    __cpp17_copy_constructible<_Iter> && __cpp17_copy_assignable<_Iter> && __cpp17_destructible<_Iter> &&
    (is_signed_v<__iter_diff_t<_Iter>> || is_void_v<__iter_diff_t<_Iter>>)&&requires(_Iter __iter) {
      { *__iter };
      { ++__iter } -> same_as<_Iter&>;
    };

template <class _Iter>
concept __cpp17_input_iterator =
    __cpp17_iterator<_Iter> && __cpp17_equality_comparable<_Iter> && requires(_Iter __lhs, _Iter __rhs) {
      { __lhs != __rhs } -> __boolean_testable;
      { std::as_const(__lhs) != __rhs } -> __boolean_testable;
      { __lhs != std::as_const(__rhs) } -> __boolean_testable;
      { std::as_const(__lhs) != std::as_const(__rhs) } -> __boolean_testable;

      { *__lhs } -> same_as<__iter_reference<_Iter>>;
      { *std::as_const(__lhs) } -> same_as<__iter_reference<_Iter>>;

      { ++__lhs } -> same_as<_Iter&>;
      { (void)__lhs++ };
      { *__lhs++ };
    };

template <class _Iter, class _WriteTo>
concept __cpp17_output_iterator = __cpp17_iterator<_Iter> && requires(_Iter __iter, _WriteTo __write) {
  { *__iter = std::forward<_WriteTo>(__write) };
  { ++__iter } -> same_as<_Iter&>;
  { __iter++ } -> convertible_to<const _Iter&>;
  { *__iter++ = std::forward<_WriteTo>(__write) };
};

template <class _Iter>
concept __cpp17_forward_iterator =
    __cpp17_input_iterator<_Iter> && __cpp17_default_constructible<_Iter> && requires(_Iter __iter) {
      { __iter++ } -> convertible_to<const _Iter&>;
      { *__iter++ } -> same_as<__iter_reference<_Iter>>;
    };

template <class _Iter>
concept __cpp17_bidirectional_iterator = __cpp17_forward_iterator<_Iter> && requires(_Iter __iter) {
  { --__iter } -> same_as<_Iter&>;
  { __iter-- } -> convertible_to<const _Iter&>;
  { *__iter-- } -> same_as<__iter_reference<_Iter>>;
};

template <class _Iter>
concept __cpp17_random_access_iterator =
    __cpp17_bidirectional_iterator<_Iter> && requires(_Iter __iter, __iter_diff_t<_Iter> __n) {
      { __iter += __n } -> same_as<_Iter&>;

      { __iter + __n } -> same_as<_Iter>;
      { __n + __iter } -> same_as<_Iter>;
      { std::as_const(__iter) + __n } -> same_as<_Iter>;
      { __n + std::as_const(__iter) } -> same_as<_Iter>;

      { __iter -= __n } -> same_as<_Iter&>;
      { __iter - __n } -> same_as<_Iter>;
      { std::as_const(__iter) - __n } -> same_as<_Iter>;

      { __iter - __iter } -> same_as<__iter_diff_t<_Iter>>;
      { std::as_const(__iter) - __iter } -> same_as<__iter_diff_t<_Iter>>;
      { __iter - std::as_const(__iter) } -> same_as<__iter_diff_t<_Iter>>;
      { std::as_const(__iter) - std::as_const(__iter) } -> same_as<__iter_diff_t<_Iter>>;

      { __iter[__n] } -> convertible_to<__iter_reference<_Iter>>;
      { std::as_const(__iter)[__n] } -> convertible_to<__iter_reference<_Iter>>;

      { __iter < __iter } -> __boolean_testable;
      { std::as_const(__iter) < __iter } -> __boolean_testable;
      { __iter < std::as_const(__iter) } -> __boolean_testable;
      { std::as_const(__iter) < std::as_const(__iter) } -> __boolean_testable;

      { __iter > __iter } -> __boolean_testable;
      { std::as_const(__iter) > __iter } -> __boolean_testable;
      { __iter > std::as_const(__iter) } -> __boolean_testable;
      { std::as_const(__iter) > std::as_const(__iter) } -> __boolean_testable;

      { __iter >= __iter } -> __boolean_testable;
      { std::as_const(__iter) >= __iter } -> __boolean_testable;
      { __iter >= std::as_const(__iter) } -> __boolean_testable;
      { std::as_const(__iter) >= std::as_const(__iter) } -> __boolean_testable;

      { __iter <= __iter } -> __boolean_testable;
      { std::as_const(__iter) <= __iter } -> __boolean_testable;
      { __iter <= std::as_const(__iter) } -> __boolean_testable;
      { std::as_const(__iter) <= std::as_const(__iter) } -> __boolean_testable;
    };

_LIBCPP_END_NAMESPACE_STD

#  ifndef _LIBCPP_DISABLE_ITERATOR_CHECKS
#    define _LIBCPP_REQUIRE_CPP17_INPUT_ITERATOR(iter_t) static_assert(::std::__cpp17_input_iterator<iter_t>);
#    define _LIBCPP_REQUIRE_CPP17_OUTPUT_ITERATOR(iter_t, write_t)                                                     \
      static_assert(::std::__cpp17_output_iterator<iter_t, write_t>);
#    define _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(iter_t) static_assert(::std::__cpp17_forward_iterator<iter_t>);
#    define _LIBCPP_REQUIRE_CPP17_BIDIRECTIONAL_ITERATOR(iter_t)                                                       \
      static_assert(::std::__cpp17_bidirectional_iterator<iter_t>);
#    define _LIBCPP_REQUIRE_CPP17_RANDOM_ACCESS_ITERATOR(iter_t)                                                       \
      static_assert(::std::__cpp17_random_access_iterator<iter_t>);
#  else
# 168 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#    define _LIBCPP_REQUIRE_CPP17_INPUT_ITERATOR(iter_t)
#    define _LIBCPP_REQUIRE_CPP17_OUTPUT_ITERATOR(iter_t, write_t)
#    define _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(iter_t)
#    define _LIBCPP_REQUIRE_CPP17_BIDIRECTIONAL_ITERATOR(iter_t)
#    define _LIBCPP_REQUIRE_CPP17_RANDOM_ACCESS_ITERATOR(iter_t)
#  endif
# 174 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3

#else // _LIBCPP_STD_VER >= 20
# 176 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3

#  define _LIBCPP_REQUIRE_CPP17_INPUT_ITERATOR(iter_t)
#  define _LIBCPP_REQUIRE_CPP17_OUTPUT_ITERATOR(iter_t, write_t)
#  define _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(iter_t)
#  define _LIBCPP_REQUIRE_CPP17_BIDIRECTIONAL_ITERATOR(iter_t)
#  define _LIBCPP_REQUIRE_CPP17_RANDOM_ACCESS_ITERATOR(iter_t)

#endif // _LIBCPP_STD_VER >= 20
# 184 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3

#endif // _LIBCPP___ITERATOR_CPP17_ITERATOR_CONCEPTS_H
# 186 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/cpp17_iterator_concepts.h" 3
#endif /* cpp17_iterator_concepts.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Predicate,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__remove_cvref_t<_ForwardIterator>>
__find_if(_ExecutionPolicy&&, _ForwardIterator&& __first, _ForwardIterator&& __last, _Predicate&& __pred) noexcept {
  using _Backend = typename __select_backend<_RawPolicy>::type;
  return std::__pstl_find_if<_RawPolicy>(_Backend{}, std::move(__first), std::move(__last), std::move(__pred));
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Predicate,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _ForwardIterator
find_if(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  auto __res = std::__find_if(__policy, std::move(__first), std::move(__last), std::move(__pred));
  if (!__res)
    std::__throw_bad_alloc();
  return *std::move(__res);
}

template <class>
void __pstl_find_if_not();

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Predicate,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__remove_cvref_t<_ForwardIterator>>
__find_if_not(_ExecutionPolicy&& __policy, _ForwardIterator&& __first, _ForwardIterator&& __last, _Predicate&& __pred) {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_find_if_not, _RawPolicy),
      [&](_ForwardIterator&& __g_first, _ForwardIterator&& __g_last, _Predicate&& __g_pred)
          -> optional<__remove_cvref_t<_ForwardIterator>> {
        return std::__find_if(
            __policy, __g_first, __g_last, [&](__iter_reference<__remove_cvref_t<_ForwardIterator>> __value) {
              return !__g_pred(__value);
            });
      },
      std::move(__first),
      std::move(__last),
      std::move(__pred));
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Predicate,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _ForwardIterator
find_if_not(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  auto __res = std::__find_if_not(__policy, std::move(__first), std::move(__last), std::move(__pred));
  if (!__res)
    std::__throw_bad_alloc();
  return *std::move(__res);
}

template <class>
void __pstl_find();

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__remove_cvref_t<_ForwardIterator>>
__find(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) noexcept {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_find, _RawPolicy),
      [&](_ForwardIterator __g_first, _ForwardIterator __g_last, const _Tp& __g_value) -> optional<_ForwardIterator> {
        return std::find_if(
            __policy, __g_first, __g_last, [&](__iter_reference<__remove_cvref_t<_ForwardIterator>> __element) {
              return __element == __g_value;
            });
      },
      std::move(__first),
      std::move(__last),
      __value);
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _ForwardIterator
find(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  auto __res = std::__find(__policy, std::move(__first), std::move(__last), __value);
  if (!__res)
    std::__throw_bad_alloc();
  return *std::move(__res);
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_FIND_H
# 137 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_find.h" 3
#endif /* pstl_find.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_frontend_dispatch.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/cpp17_iterator_concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class>
void __pstl_any_of(); // declaration needed for the frontend dispatch below

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Predicate,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<bool> __any_of(
    _ExecutionPolicy&& __policy, _ForwardIterator&& __first, _ForwardIterator&& __last, _Predicate&& __pred) noexcept {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_any_of, _RawPolicy),
      [&](_ForwardIterator __g_first, _ForwardIterator __g_last, _Predicate __g_pred) -> optional<bool> {
        auto __res = std::__find_if(__policy, __g_first, __g_last, __g_pred);
        if (!__res)
          return nullopt;
        return *__res != __g_last;
      },
      std::move(__first),
      std::move(__last),
      std::move(__pred));
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Predicate,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI bool
any_of(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  auto __res = std::__any_of(__policy, std::move(__first), std::move(__last), std::move(__pred));
  if (!__res)
    std::__throw_bad_alloc();
  return *std::move(__res);
}

template <class>
void __pstl_all_of(); // declaration needed for the frontend dispatch below

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Pred,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<bool>
__all_of(_ExecutionPolicy&& __policy, _ForwardIterator&& __first, _ForwardIterator&& __last, _Pred&& __pred) noexcept {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_all_of, _RawPolicy),
      [&](_ForwardIterator __g_first, _ForwardIterator __g_last, _Pred __g_pred) -> optional<bool> {
        auto __res = std::__any_of(__policy, __g_first, __g_last, [&](__iter_reference<_ForwardIterator> __value) {
          return !__g_pred(__value);
        });
        if (!__res)
          return nullopt;
        return !*__res;
      },
      std::move(__first),
      std::move(__last),
      std::move(__pred));
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Pred,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI bool
all_of(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, _Pred __pred) {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  auto __res = std::__all_of(__policy, std::move(__first), std::move(__last), std::move(__pred));
  if (!__res)
    std::__throw_bad_alloc();
  return *std::move(__res);
}

template <class>
void __pstl_none_of(); // declaration needed for the frontend dispatch below

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Pred,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<bool>
__none_of(_ExecutionPolicy&& __policy, _ForwardIterator&& __first, _ForwardIterator&& __last, _Pred&& __pred) noexcept {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_none_of, _RawPolicy),
      [&](_ForwardIterator __g_first, _ForwardIterator __g_last, _Pred __g_pred) -> optional<bool> {
        auto __res = std::__any_of(__policy, __g_first, __g_last, __g_pred);
        if (!__res)
          return nullopt;
        return !*__res;
      },
      std::move(__first),
      std::move(__last),
      std::move(__pred));
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Pred,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI bool
none_of(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, _Pred __pred) {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  auto __res = std::__none_of(__policy, std::move(__first), std::move(__last), std::move(__pred));
  if (!__res)
    std::__throw_bad_alloc();
  return *std::move(__res);
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_ANY_ALL_NONE_OF_H
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_any_all_none_of.h" 3
#endif /* pstl_any_all_none_of.h expanded by -frewrite-includes */
# 1828 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_copy.h expanded by -frewrite-includes */
#include <__algorithm/pstl_copy.h>
#else /* pstl_copy.h expanded by -frewrite-includes */
# 1828 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_COPY_H
#define _LIBCPP___ALGORITHM_PSTL_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy_n.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backend.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_frontend_dispatch.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_transform.h expanded by -frewrite-includes */
#include <__algorithm/pstl_transform.h>
#else /* pstl_transform.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_TRANSFORM_H
#define _LIBCPP___ALGORITHM_PSTL_TRANSFORM_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backend.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/cpp17_iterator_concepts.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _ForwardOutIterator,
          class _UnaryOperation,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__remove_cvref_t<_ForwardOutIterator>>
__transform(_ExecutionPolicy&&,
            _ForwardIterator&& __first,
            _ForwardIterator&& __last,
            _ForwardOutIterator&& __result,
            _UnaryOperation&& __op) noexcept {
  using _Backend = typename __select_backend<_RawPolicy>::type;
  return std::__pstl_transform<_RawPolicy>(
      _Backend{}, std::move(__first), std::move(__last), std::move(__result), std::move(__op));
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _ForwardOutIterator,
          class _UnaryOperation,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _ForwardOutIterator transform(
    _ExecutionPolicy&& __policy,
    _ForwardIterator __first,
    _ForwardIterator __last,
    _ForwardOutIterator __result,
    _UnaryOperation __op) {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardOutIterator);
  _LIBCPP_REQUIRE_CPP17_OUTPUT_ITERATOR(_ForwardOutIterator, decltype(__op(*__first)));
  auto __res = std::__transform(__policy, std::move(__first), std::move(__last), std::move(__result), std::move(__op));
  if (!__res)
    std::__throw_bad_alloc();
  return *std::move(__res);
}

template <class _ExecutionPolicy,
          class _ForwardIterator1,
          class _ForwardIterator2,
          class _ForwardOutIterator,
          class _BinaryOperation,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI optional<__remove_cvref_t<_ForwardOutIterator>>
__transform(_ExecutionPolicy&&,
            _ForwardIterator1&& __first1,
            _ForwardIterator1&& __last1,
            _ForwardIterator2&& __first2,
            _ForwardOutIterator&& __result,
            _BinaryOperation&& __op) noexcept {
  using _Backend = typename __select_backend<_RawPolicy>::type;
  return std::__pstl_transform<_RawPolicy>(
      _Backend{}, std::move(__first1), std::move(__last1), std::move(__first2), std::move(__result), std::move(__op));
}

template <class _ExecutionPolicy,
          class _ForwardIterator1,
          class _ForwardIterator2,
          class _ForwardOutIterator,
          class _BinaryOperation,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _ForwardOutIterator transform(
    _ExecutionPolicy&& __policy,
    _ForwardIterator1 __first1,
    _ForwardIterator1 __last1,
    _ForwardIterator2 __first2,
    _ForwardOutIterator __result,
    _BinaryOperation __op) {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator1);
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator2);
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardOutIterator);
  _LIBCPP_REQUIRE_CPP17_OUTPUT_ITERATOR(_ForwardOutIterator, decltype(__op(*__first1, *__first2)));
  auto __res = std::__transform(
      __policy, std::move(__first1), std::move(__last1), std::move(__first2), std::move(__result), std::move(__op));
  if (!__res)
    std::__throw_bad_alloc();
  return *std::move(__res);
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 114 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_TRANSFORM_H
# 116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_transform.h" 3
#endif /* pstl_transform.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copyable.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// TODO: Use the std::copy/move shenanigans to forward to std::memmove

template <class>
void __pstl_copy();

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _ForwardOutIterator,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<_ForwardOutIterator>
__copy(_ExecutionPolicy&& __policy,
       _ForwardIterator&& __first,
       _ForwardIterator&& __last,
       _ForwardOutIterator&& __result) noexcept {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_copy, _RawPolicy),
      [&__policy](_ForwardIterator __g_first, _ForwardIterator __g_last, _ForwardOutIterator __g_result) {
        return std::__transform(__policy, __g_first, __g_last, __g_result, __identity());
      },
      std::move(__first),
      std::move(__last),
      std::move(__result));
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _ForwardOutIterator,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _ForwardOutIterator
copy(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, _ForwardOutIterator __result) {
  auto __res = std::__copy(__policy, std::move(__first), std::move(__last), std::move(__result));
  if (!__res)
    std::__throw_bad_alloc();
  return *std::move(__res);
}

template <class>
void __pstl_copy_n();

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _ForwardOutIterator,
          class _Size,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<_ForwardOutIterator> __copy_n(
    _ExecutionPolicy&& __policy, _ForwardIterator&& __first, _Size&& __n, _ForwardOutIterator&& __result) noexcept {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_copy_n, _RawPolicy),
      [&__policy](
          _ForwardIterator __g_first, _Size __g_n, _ForwardOutIterator __g_result) -> optional<_ForwardIterator> {
        if constexpr (__has_random_access_iterator_category_or_concept<_ForwardIterator>::value)
          return std::__copy(__policy, std::move(__g_first), std::move(__g_first + __g_n), std::move(__g_result));
        else
          return std::copy_n(__g_first, __g_n, __g_result);
      },
      std::move(__first),
      std::move(__n),
      std::move(__result));
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _ForwardOutIterator,
          class _Size,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _ForwardOutIterator
copy_n(_ExecutionPolicy&& __policy, _ForwardIterator __first, _Size __n, _ForwardOutIterator __result) {
  auto __res = std::__copy_n(__policy, std::move(__first), std::move(__n), std::move(__result));
  if (!__res)
    std::__throw_bad_alloc();
  return *std::move(__res);
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 115 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_COPY_H
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_copy.h" 3
#endif /* pstl_copy.h expanded by -frewrite-includes */
# 1829 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_count.h expanded by -frewrite-includes */
#include <__algorithm/pstl_count.h>
#else /* pstl_count.h expanded by -frewrite-includes */
# 1829 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_COUNT_H
#define _LIBCPP___ALGORITHM_PSTL_COUNT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/count.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/for_each.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backend.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_for_each.h expanded by -frewrite-includes */
#include <__algorithm/pstl_for_each.h>
#else /* pstl_for_each.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_FOR_EACH_H
#define _LIBCPP___ALGORITHM_PSTL_FOR_EACH_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/for_each.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/for_each_n.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backend.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_frontend_dispatch.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/cpp17_iterator_concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/void_t.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/empty.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Function,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__empty>
__for_each(_ExecutionPolicy&&, _ForwardIterator&& __first, _ForwardIterator&& __last, _Function&& __func) noexcept {
  using _Backend = typename __select_backend<_RawPolicy>::type;
  return std::__pstl_for_each<_RawPolicy>(_Backend{}, std::move(__first), std::move(__last), std::move(__func));
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Function,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void
for_each(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, _Function __func) {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  if (!std::__for_each(__policy, std::move(__first), std::move(__last), std::move(__func)))
    std::__throw_bad_alloc();
}

template <class>
void __pstl_for_each_n(); // declaration needed for the frontend dispatch below

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Size,
          class _Function,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__empty>
__for_each_n(_ExecutionPolicy&& __policy, _ForwardIterator&& __first, _Size&& __size, _Function&& __func) noexcept {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_for_each_n, _RawPolicy),
      [&](_ForwardIterator __g_first, _Size __g_size, _Function __g_func) -> optional<__empty> {
        if constexpr (__has_random_access_iterator_category_or_concept<_ForwardIterator>::value) {
          std::for_each(__policy, std::move(__g_first), __g_first + __g_size, std::move(__g_func));
          return __empty{};
        } else {
          std::for_each_n(std::move(__g_first), __g_size, std::move(__g_func));
          return __empty{};
        }
      },
      std::move(__first),
      std::move(__size),
      std::move(__func));
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Size,
          class _Function,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void
for_each_n(_ExecutionPolicy&& __policy, _ForwardIterator __first, _Size __size, _Function __func) {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  auto __res = std::__for_each_n(__policy, std::move(__first), std::move(__size), std::move(__func));
  if (!__res)
    std::__throw_bad_alloc();
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_FOR_EACH_H
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_for_each.h" 3
#endif /* pstl_for_each.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_frontend_dispatch.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/atomic.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_transform_reduce.h expanded by -frewrite-includes */
#include <__numeric/pstl_transform_reduce.h>
#else /* pstl_transform_reduce.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___NUMERIC_PSTL_TRANSFORM_REDUCE_H
#define _LIBCPP___NUMERIC_PSTL_TRANSFORM_REDUCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backend.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_frontend_dispatch.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__numeric/transform_reduce.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ExecutionPolicy,
          class _ForwardIterator1,
          class _ForwardIterator2,
          class _Tp,
          class _BinaryOperation1,
          class _BinaryOperation2,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI optional<_Tp> __transform_reduce(
    _ExecutionPolicy&&,
    _ForwardIterator1&& __first1,
    _ForwardIterator1&& __last1,
    _ForwardIterator2&& __first2,
    _Tp&& __init,
    _BinaryOperation1&& __reduce,
    _BinaryOperation2&& __transform) noexcept {
  using _Backend = typename __select_backend<_RawPolicy>::type;
  return std::__pstl_transform_reduce<_RawPolicy>(
      _Backend{},
      std::move(__first1),
      std::move(__last1),
      std::move(__first2),
      std::move(__init),
      std::move(__reduce),
      std::move(__transform));
}

template <class _ExecutionPolicy,
          class _ForwardIterator1,
          class _ForwardIterator2,
          class _Tp,
          class _BinaryOperation1,
          class _BinaryOperation2,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _Tp transform_reduce(
    _ExecutionPolicy&& __policy,
    _ForwardIterator1 __first1,
    _ForwardIterator1 __last1,
    _ForwardIterator2 __first2,
    _Tp __init,
    _BinaryOperation1 __reduce,
    _BinaryOperation2 __transform) {
  auto __res = std::__transform_reduce(
      __policy,
      std::move(__first1),
      std::move(__last1),
      std::move(__first2),
      std::move(__init),
      std::move(__reduce),
      std::move(__transform));

  if (!__res)
    std::__throw_bad_alloc();
  return *std::move(__res);
}

// This overload doesn't get a customization point because it's trivial to detect (through e.g.
// __is_trivial_plus_operation) when specializing the more general variant, which should always be preferred
template <class _ExecutionPolicy,
          class _ForwardIterator1,
          class _ForwardIterator2,
          class _Tp,
          enable_if_t<is_execution_policy_v<__remove_cvref_t<_ExecutionPolicy>>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _Tp transform_reduce(
    _ExecutionPolicy&& __policy,
    _ForwardIterator1 __first1,
    _ForwardIterator1 __last1,
    _ForwardIterator2 __first2,
    _Tp __init) {
  return std::transform_reduce(__policy, __first1, __last1, __first2, __init, plus{}, multiplies{});
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Tp,
          class _BinaryOperation,
          class _UnaryOperation,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__remove_cvref_t<_Tp>> __transform_reduce(
    _ExecutionPolicy&&,
    _ForwardIterator&& __first,
    _ForwardIterator&& __last,
    _Tp&& __init,
    _BinaryOperation&& __reduce,
    _UnaryOperation&& __transform) noexcept {
  using _Backend = typename __select_backend<_RawPolicy>::type;
  return std::__pstl_transform_reduce<_RawPolicy>(
      _Backend{},
      std::move(__first),
      std::move(__last),
      std::move(__init),
      std::move(__reduce),
      std::move(__transform));
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Tp,
          class _BinaryOperation,
          class _UnaryOperation,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _Tp transform_reduce(
    _ExecutionPolicy&& __policy,
    _ForwardIterator __first,
    _ForwardIterator __last,
    _Tp __init,
    _BinaryOperation __reduce,
    _UnaryOperation __transform) {
  auto __res = std::__transform_reduce(
      __policy, std::move(__first), std::move(__last), std::move(__init), std::move(__reduce), std::move(__transform));
  if (!__res)
    std::__throw_bad_alloc();
  return *std::move(__res);
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 150 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3

#endif // _LIBCPP___NUMERIC_PSTL_TRANSFORM_REDUCE_H
# 152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__numeric/pstl_transform_reduce.h" 3
#endif /* pstl_transform_reduce.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class>
void __pstl_count_if(); // declaration needed for the frontend dispatch below

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Predicate,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__iter_diff_t<_ForwardIterator>> __count_if(
    _ExecutionPolicy&& __policy, _ForwardIterator&& __first, _ForwardIterator&& __last, _Predicate&& __pred) noexcept {
  using __diff_t = __iter_diff_t<_ForwardIterator>;
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_count_if, _RawPolicy),
      [&](_ForwardIterator __g_first, _ForwardIterator __g_last, _Predicate __g_pred) -> optional<__diff_t> {
        return std::__transform_reduce(
            __policy,
            std::move(__g_first),
            std::move(__g_last),
            __diff_t(),
            std::plus{},
            [&](__iter_reference<_ForwardIterator> __element) -> bool { return __g_pred(__element); });
      },
      std::move(__first),
      std::move(__last),
      std::move(__pred));
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Predicate,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI __iter_diff_t<_ForwardIterator>
count_if(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) {
  auto __res = std::__count_if(__policy, std::move(__first), std::move(__last), std::move(__pred));
  if (!__res)
    std::__throw_bad_alloc();
  return *std::move(__res);
}

template <class>
void __pstl_count(); // declaration needed for the frontend dispatch below

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__iter_diff_t<_ForwardIterator>>
__count(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_count, _RawPolicy),
      [&](_ForwardIterator __g_first, _ForwardIterator __g_last, const _Tp& __g_value)
          -> optional<__iter_diff_t<_ForwardIterator>> {
        return std::count_if(__policy, __g_first, __g_last, [&](__iter_reference<_ForwardIterator> __v) {
          return __v == __g_value;
        });
      },
      std::move(__first),
      std::move(__last),
      __value);
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI __iter_diff_t<_ForwardIterator>
count(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
  auto __res = std::__count(__policy, std::move(__first), std::move(__last), __value);
  if (!__res)
    std::__throw_bad_alloc();
  return *__res;
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 115 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_COUNT_H
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_count.h" 3
#endif /* pstl_count.h expanded by -frewrite-includes */
# 1830 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_fill.h expanded by -frewrite-includes */
#include <__algorithm/pstl_fill.h>
#else /* pstl_fill.h expanded by -frewrite-includes */
# 1830 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_FILL_H
#define _LIBCPP___ALGORITHM_PSTL_FILL_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/fill_n.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_for_each.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_frontend_dispatch.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/cpp17_iterator_concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class>
void __pstl_fill(); // declaration needed for the frontend dispatch below

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI optional<__empty>
__fill(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) noexcept {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_fill, _RawPolicy),
      [&](_ForwardIterator __g_first, _ForwardIterator __g_last, const _Tp& __g_value) {
        return std::__for_each(__policy, __g_first, __g_last, [&](__iter_reference<_ForwardIterator> __element) {
          __element = __g_value;
        });
      },
      std::move(__first),
      std::move(__last),
      __value);
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void
fill(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  if (!std::__fill(__policy, std::move(__first), std::move(__last), __value))
    std::__throw_bad_alloc();
}

template <class>
void __pstl_fill_n(); // declaration needed for the frontend dispatch below

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _SizeT,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__empty>
__fill_n(_ExecutionPolicy&& __policy, _ForwardIterator&& __first, _SizeT&& __n, const _Tp& __value) noexcept {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_fill_n, _RawPolicy),
      [&](_ForwardIterator __g_first, _SizeT __g_n, const _Tp& __g_value) {
        if constexpr (__has_random_access_iterator_category_or_concept<_ForwardIterator>::value)
          std::fill(__policy, __g_first, __g_first + __g_n, __g_value);
        else
          std::fill_n(__g_first, __g_n, __g_value);
        return optional<__empty>{__empty{}};
      },
      std::move(__first),
      std::move(__n),
      __value);
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _SizeT,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void
fill_n(_ExecutionPolicy&& __policy, _ForwardIterator __first, _SizeT __n, const _Tp& __value) {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  if (!std::__fill_n(__policy, std::move(__first), std::move(__n), __value))
    std::__throw_bad_alloc();
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_FILL_H
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_fill.h" 3
#endif /* pstl_fill.h expanded by -frewrite-includes */
# 1831 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_find.h>
#endif /* expanded by -frewrite-includes */
# 1831 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1832 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_for_each.h>
#endif /* expanded by -frewrite-includes */
# 1832 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1833 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_generate.h expanded by -frewrite-includes */
#include <__algorithm/pstl_generate.h>
#else /* pstl_generate.h expanded by -frewrite-includes */
# 1833 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_GENERATE_H
#define _LIBCPP___ALGORITHM_PSTL_GENERATE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backend.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_for_each.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_frontend_dispatch.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/cpp17_iterator_concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class>
void __pstl_generate();

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Generator,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__empty>
__generate(_ExecutionPolicy&& __policy, _ForwardIterator&& __first, _ForwardIterator&& __last, _Generator&& __gen) {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_generate, _RawPolicy),
      [&__policy](_ForwardIterator __g_first, _ForwardIterator __g_last, _Generator __g_gen) {
        return std::__for_each(
            __policy, std::move(__g_first), std::move(__g_last), [&](__iter_reference<_ForwardIterator> __element) {
              __element = __g_gen();
            });
      },
      std::move(__first),
      std::move(__last),
      std::move(__gen));
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Generator,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void
generate(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, _Generator __gen) {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  if (!std::__generate(__policy, std::move(__first), std::move(__last), std::move(__gen)))
    std::__throw_bad_alloc();
}

template <class>
void __pstl_generate_n();

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Size,
          class _Generator,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__empty>
__generate_n(_ExecutionPolicy&& __policy, _ForwardIterator&& __first, _Size&& __n, _Generator&& __gen) {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_generate_n, _RawPolicy),
      [&__policy](_ForwardIterator __g_first, _Size __g_n, _Generator __g_gen) {
        return std::__for_each_n(
            __policy, std::move(__g_first), std::move(__g_n), [&](__iter_reference<_ForwardIterator> __element) {
              __element = __g_gen();
            });
      },
      std::move(__first),
      __n,
      std::move(__gen));
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Size,
          class _Generator,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void
generate_n(_ExecutionPolicy&& __policy, _ForwardIterator __first, _Size __n, _Generator __gen) {
  _LIBCPP_REQUIRE_CPP17_FORWARD_ITERATOR(_ForwardIterator);
  if (!std::__generate_n(__policy, std::move(__first), std::move(__n), std::move(__gen)))
    std::__throw_bad_alloc();
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_GENERATE_H
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_generate.h" 3
#endif /* pstl_generate.h expanded by -frewrite-includes */
# 1834 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_is_partitioned.h expanded by -frewrite-includes */
#include <__algorithm/pstl_is_partitioned.h>
#else /* pstl_is_partitioned.h expanded by -frewrite-includes */
# 1834 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_IS_PARITTIONED
#define _LIBCPP___ALGORITHM_PSTL_IS_PARITTIONED

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_any_all_none_of.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backend.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_find.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_frontend_dispatch.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class>
void __pstl_is_partitioned();

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Predicate,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<bool> __is_partitioned(
    _ExecutionPolicy&& __policy, _ForwardIterator&& __first, _ForwardIterator&& __last, _Predicate&& __pred) {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_is_partitioned, _RawPolicy),
      [&__policy](_ForwardIterator __g_first, _ForwardIterator __g_last, _Predicate __g_pred) {
        __g_first = std::find_if_not(__policy, __g_first, __g_last, __g_pred);
        if (__g_first == __g_last)
          return true;
        ++__g_first;
        return std::none_of(__policy, __g_first, __g_last, __g_pred);
      },
      std::move(__first),
      std::move(__last),
      std::move(__pred));
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Predicate,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI bool
is_partitioned(_ExecutionPolicy&& __policy, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) {
  auto __res = std::__is_partitioned(__policy, std::move(__first), std::move(__last), std::move(__pred));
  if (!__res)
    std::__throw_bad_alloc();
  return *std::move(__res);
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_IS_PARITTIONED
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_is_partitioned.h" 3
#endif /* pstl_is_partitioned.h expanded by -frewrite-includes */
# 1835 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_merge.h expanded by -frewrite-includes */
#include <__algorithm/pstl_merge.h>
#else /* pstl_merge.h expanded by -frewrite-includes */
# 1835 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_MERGE_H
#define _LIBCPP___ALGORITHM_PSTL_MERGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backend.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ExecutionPolicy,
          class _ForwardIterator1,
          class _ForwardIterator2,
          class _ForwardOutIterator,
          class _Comp                                         = std::less<>,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<_ForwardOutIterator>
__merge(_ExecutionPolicy&&,
        _ForwardIterator1 __first1,
        _ForwardIterator1 __last1,
        _ForwardIterator2 __first2,
        _ForwardIterator2 __last2,
        _ForwardOutIterator __result,
        _Comp __comp = {}) noexcept {
  using _Backend = typename __select_backend<_RawPolicy>::type;
  return std::__pstl_merge<_RawPolicy>(
      _Backend{},
      std::move(__first1),
      std::move(__last1),
      std::move(__first2),
      std::move(__last2),
      std::move(__result),
      std::move(__comp));
}

template <class _ExecutionPolicy,
          class _ForwardIterator1,
          class _ForwardIterator2,
          class _ForwardOutIterator,
          class _Comp                                         = std::less<>,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _ForwardOutIterator
merge(_ExecutionPolicy&& __policy,
      _ForwardIterator1 __first1,
      _ForwardIterator1 __last1,
      _ForwardIterator2 __first2,
      _ForwardIterator2 __last2,
      _ForwardOutIterator __result,
      _Comp __comp = {}) {
  auto __res = std::__merge(
      __policy,
      std::move(__first1),
      std::move(__last1),
      std::move(__first2),
      std::move(__last2),
      std::move(__result),
      std::move(__comp));
  if (!__res)
    std::__throw_bad_alloc();
  return *std::move(__res);
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_MERGE_H
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_merge.h" 3
#endif /* pstl_merge.h expanded by -frewrite-includes */
# 1836 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_replace.h expanded by -frewrite-includes */
#include <__algorithm/pstl_replace.h>
#else /* pstl_replace.h expanded by -frewrite-includes */
# 1836 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_REPLACE_H
#define _LIBCPP___ALGORITHM_PSTL_REPLACE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backend.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_for_each.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_frontend_dispatch.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_transform.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class>
void __pstl_replace_if();

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Pred,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__empty>
__replace_if(_ExecutionPolicy&& __policy,
             _ForwardIterator&& __first,
             _ForwardIterator&& __last,
             _Pred&& __pred,
             const _Tp& __new_value) noexcept {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_replace_if, _RawPolicy),
      [&__policy](
          _ForwardIterator&& __g_first, _ForwardIterator&& __g_last, _Pred&& __g_pred, const _Tp& __g_new_value) {
        std::for_each(__policy, __g_first, __g_last, [&](__iter_reference<_ForwardIterator> __element) {
          if (__g_pred(__element))
            __element = __g_new_value;
        });
        return optional<__empty>{__empty{}};
      },
      std::move(__first),
      std::move(__last),
      std::move(__pred),
      __new_value);
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Pred,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void
replace_if(_ExecutionPolicy&& __policy,
           _ForwardIterator __first,
           _ForwardIterator __last,
           _Pred __pred,
           const _Tp& __new_value) {
  auto __res = std::__replace_if(__policy, std::move(__first), std::move(__last), std::move(__pred), __new_value);
  if (!__res)
    std::__throw_bad_alloc();
}

template <class>
void __pstl_replace();

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__empty>
__replace(_ExecutionPolicy&& __policy,
          _ForwardIterator __first,
          _ForwardIterator __last,
          const _Tp& __old_value,
          const _Tp& __new_value) noexcept {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_replace, _RawPolicy),
      [&__policy](
          _ForwardIterator __g_first, _ForwardIterator __g_last, const _Tp& __g_old_value, const _Tp& __g_new_value) {
        return std::__replace_if(
            __policy,
            std::move(__g_first),
            std::move(__g_last),
            [&](__iter_reference<_ForwardIterator> __element) { return __element == __g_old_value; },
            __g_new_value);
      },
      std::move(__first),
      std::move(__last),
      __old_value,
      __new_value);
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void
replace(_ExecutionPolicy&& __policy,
        _ForwardIterator __first,
        _ForwardIterator __last,
        const _Tp& __old_value,
        const _Tp& __new_value) {
  if (!std::__replace(__policy, std::move(__first), std::move(__last), __old_value, __new_value))
    std::__throw_bad_alloc();
}

template <class>
void __pstl_replace_copy_if();

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _ForwardOutIterator,
          class _Pred,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__empty> __replace_copy_if(
    _ExecutionPolicy&& __policy,
    _ForwardIterator&& __first,
    _ForwardIterator&& __last,
    _ForwardOutIterator&& __result,
    _Pred&& __pred,
    const _Tp& __new_value) {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_replace_copy_if, _RawPolicy),
      [&__policy](_ForwardIterator __g_first,
                  _ForwardIterator __g_last,
                  _ForwardOutIterator __g_result,
                  _Pred __g_pred,
                  const _Tp& __g_new_value) -> optional<__empty> {
        if (!std::__transform(
                __policy, __g_first, __g_last, __g_result, [&](__iter_reference<_ForwardIterator> __element) {
                  return __g_pred(__element) ? __g_new_value : __element;
                }))
          return nullopt;
        return __empty{};
      },
      std::move(__first),
      std::move(__last),
      std::move(__result),
      std::move(__pred),
      __new_value);
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _ForwardOutIterator,
          class _Pred,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void replace_copy_if(
    _ExecutionPolicy&& __policy,
    _ForwardIterator __first,
    _ForwardIterator __last,
    _ForwardOutIterator __result,
    _Pred __pred,
    const _Tp& __new_value) {
  if (!std::__replace_copy_if(
          __policy, std::move(__first), std::move(__last), std::move(__result), std::move(__pred), __new_value))
    std::__throw_bad_alloc();
}

template <class>
void __pstl_replace_copy();

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _ForwardOutIterator,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__empty> __replace_copy(
    _ExecutionPolicy&& __policy,
    _ForwardIterator&& __first,
    _ForwardIterator&& __last,
    _ForwardOutIterator&& __result,
    const _Tp& __old_value,
    const _Tp& __new_value) noexcept {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_replace_copy, _RawPolicy),
      [&__policy](_ForwardIterator __g_first,
                  _ForwardIterator __g_last,
                  _ForwardOutIterator __g_result,
                  const _Tp& __g_old_value,
                  const _Tp& __g_new_value) {
        return std::__replace_copy_if(
            __policy,
            std::move(__g_first),
            std::move(__g_last),
            std::move(__g_result),
            [&](__iter_reference<_ForwardIterator> __element) { return __element == __g_old_value; },
            __g_new_value);
      },
      std::move(__first),
      std::move(__last),
      std::move(__result),
      __old_value,
      __new_value);
}

template <class _ExecutionPolicy,
          class _ForwardIterator,
          class _ForwardOutIterator,
          class _Tp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void replace_copy(
    _ExecutionPolicy&& __policy,
    _ForwardIterator __first,
    _ForwardIterator __last,
    _ForwardOutIterator __result,
    const _Tp& __old_value,
    const _Tp& __new_value) {
  if (!std::__replace_copy(
          __policy, std::move(__first), std::move(__last), std::move(__result), __old_value, __new_value))
    std::__throw_bad_alloc();
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 241 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_REPLACE_H
# 243 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_replace.h" 3
#endif /* pstl_replace.h expanded by -frewrite-includes */
# 1837 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_sort.h expanded by -frewrite-includes */
#include <__algorithm/pstl_sort.h>
#else /* pstl_sort.h expanded by -frewrite-includes */
# 1837 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_SORT_H
#define _LIBCPP___ALGORITHM_PSTL_SORT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backend.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_frontend_dispatch.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pstl_stable_sort.h expanded by -frewrite-includes */
#include <__algorithm/pstl_stable_sort.h>
#else /* pstl_stable_sort.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_PSTL_STABLE_SORT_H
#define _LIBCPP___ALGORITHM_PSTL_STABLE_SORT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_backend.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/empty.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ExecutionPolicy,
          class _RandomAccessIterator,
          class _Comp                                         = less<>,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__empty> __stable_sort(
    _ExecutionPolicy&&, _RandomAccessIterator&& __first, _RandomAccessIterator&& __last, _Comp&& __comp = {}) noexcept {
  using _Backend = typename __select_backend<_RawPolicy>::type;
  return std::__pstl_stable_sort<_RawPolicy>(_Backend{}, std::move(__first), std::move(__last), std::move(__comp));
}

template <class _ExecutionPolicy,
          class _RandomAccessIterator,
          class _Comp                                         = less<>,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void stable_sort(
    _ExecutionPolicy&& __policy, _RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp = {}) {
  if (!std::__stable_sort(__policy, std::move(__first), std::move(__last), std::move(__comp)))
    std::__throw_bad_alloc();
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_STABLE_SORT_H
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_stable_sort.h" 3
#endif /* pstl_stable_sort.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_execution_policy.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/empty.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class>
void __pstl_sort();

template <class _ExecutionPolicy,
          class _RandomAccessIterator,
          class _Comp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<__empty> __sort(
    _ExecutionPolicy&& __policy, _RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp) noexcept {
  return std::__pstl_frontend_dispatch(
      _LIBCPP_PSTL_CUSTOMIZATION_POINT(__pstl_sort, _RawPolicy),
      [&__policy](_RandomAccessIterator __g_first, _RandomAccessIterator __g_last, _Comp __g_comp) {
        std::stable_sort(__policy, std::move(__g_first), std::move(__g_last), std::move(__g_comp));
        return optional<__empty>{__empty{}};
      },
      std::move(__first),
      std::move(__last),
      std::move(__comp));
}

template <class _ExecutionPolicy,
          class _RandomAccessIterator,
          class _Comp,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void
sort(_ExecutionPolicy&& __policy, _RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp) {
  if (!std::__sort(__policy, std::move(__first), std::move(__last), std::move(__comp)))
    std::__throw_bad_alloc();
}

template <class _ExecutionPolicy,
          class _RandomAccessIterator,
          class _RawPolicy                                    = __remove_cvref_t<_ExecutionPolicy>,
          enable_if_t<is_execution_policy_v<_RawPolicy>, int> = 0>
_LIBCPP_HIDE_FROM_ABI void
sort(_ExecutionPolicy&& __policy, _RandomAccessIterator __first, _RandomAccessIterator __last) {
  std::sort(std::forward<_ExecutionPolicy>(__policy), std::move(__first), std::move(__last), less{});
}

_LIBCPP_END_NAMESPACE_STD

#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3

#endif // _LIBCPP___ALGORITHM_PSTL_SORT_H
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/pstl_sort.h" 3
#endif /* pstl_sort.h expanded by -frewrite-includes */
# 1838 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_stable_sort.h>
#endif /* expanded by -frewrite-includes */
# 1838 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1839 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pstl_transform.h>
#endif /* expanded by -frewrite-includes */
# 1839 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1840 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/push_heap.h>
#endif /* expanded by -frewrite-includes */
# 1840 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1841 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_adjacent_find.h expanded by -frewrite-includes */
#include <__algorithm/ranges_adjacent_find.h>
#else /* ranges_adjacent_find.h expanded by -frewrite-includes */
# 1841 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_ADJACENT_FIND_H
#define _LIBCPP___ALGORITHM_RANGES_ADJACENT_FIND_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __adjacent_find {
struct __fn {
  template <class _Iter, class _Sent, class _Proj, class _Pred>
  _LIBCPP_HIDE_FROM_ABI constexpr static _Iter
  __adjacent_find_impl(_Iter __first, _Sent __last, _Pred& __pred, _Proj& __proj) {
    if (__first == __last)
      return __first;

    auto __i = __first;
    while (++__i != __last) {
      if (std::invoke(__pred, std::invoke(__proj, *__first), std::invoke(__proj, *__i)))
        return __first;
      __first = __i;
    }
    return __i;
  }

  template <forward_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj                                                                       = identity,
            indirect_binary_predicate<projected<_Iter, _Proj>, projected<_Iter, _Proj>> _Pred = ranges::equal_to>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Iter
  operator()(_Iter __first, _Sent __last, _Pred __pred = {}, _Proj __proj = {}) const {
    return __adjacent_find_impl(std::move(__first), std::move(__last), __pred, __proj);
  }

  template <forward_range _Range,
            class _Proj = identity,
            indirect_binary_predicate<projected<iterator_t<_Range>, _Proj>, projected<iterator_t<_Range>, _Proj>>
                _Pred = ranges::equal_to>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
  operator()(_Range&& __range, _Pred __pred = {}, _Proj __proj = {}) const {
    return __adjacent_find_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
  }
};
} // namespace __adjacent_find

inline namespace __cpo {
inline constexpr auto adjacent_find = __adjacent_find::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_RANGES_ADJACENT_FIND_H
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_adjacent_find.h" 3
#endif /* ranges_adjacent_find.h expanded by -frewrite-includes */
# 1842 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_all_of.h expanded by -frewrite-includes */
#include <__algorithm/ranges_all_of.h>
#else /* ranges_all_of.h expanded by -frewrite-includes */
# 1842 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_ALL_OF_H
#define _LIBCPP___ALGORITHM_RANGES_ALL_OF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __all_of {
struct __fn {
  template <class _Iter, class _Sent, class _Proj, class _Pred>
  _LIBCPP_HIDE_FROM_ABI constexpr static bool __all_of_impl(_Iter __first, _Sent __last, _Pred& __pred, _Proj& __proj) {
    for (; __first != __last; ++__first) {
      if (!std::invoke(__pred, std::invoke(__proj, *__first)))
        return false;
    }
    return true;
  }

  template <input_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj = identity,
            indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool
  operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const {
    return __all_of_impl(std::move(__first), std::move(__last), __pred, __proj);
  }

  template <input_range _Range,
            class _Proj = identity,
            indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool
  operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
    return __all_of_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
  }
};
} // namespace __all_of

inline namespace __cpo {
inline constexpr auto all_of = __all_of::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_ALL_OF_H
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_all_of.h" 3
#endif /* ranges_all_of.h expanded by -frewrite-includes */
# 1843 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_any_of.h expanded by -frewrite-includes */
#include <__algorithm/ranges_any_of.h>
#else /* ranges_any_of.h expanded by -frewrite-includes */
# 1843 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_ANY_OF_H
#define _LIBCPP___ALGORITHM_RANGES_ANY_OF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __any_of {
struct __fn {
  template <class _Iter, class _Sent, class _Proj, class _Pred>
  _LIBCPP_HIDE_FROM_ABI constexpr static bool __any_of_impl(_Iter __first, _Sent __last, _Pred& __pred, _Proj& __proj) {
    for (; __first != __last; ++__first) {
      if (std::invoke(__pred, std::invoke(__proj, *__first)))
        return true;
    }
    return false;
  }

  template <input_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj = identity,
            indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool
  operator()(_Iter __first, _Sent __last, _Pred __pred = {}, _Proj __proj = {}) const {
    return __any_of_impl(std::move(__first), std::move(__last), __pred, __proj);
  }

  template <input_range _Range,
            class _Proj = identity,
            indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool
  operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
    return __any_of_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
  }
};
} // namespace __any_of

inline namespace __cpo {
inline constexpr auto any_of = __any_of::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_ANY_OF_H
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_any_of.h" 3
#endif /* ranges_any_of.h expanded by -frewrite-includes */
# 1844 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_binary_search.h expanded by -frewrite-includes */
#include <__algorithm/ranges_binary_search.h>
#else /* ranges_binary_search.h expanded by -frewrite-includes */
# 1844 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_BINARY_SEARCH_H
#define _LIBCPP___ALGORITHM_RANGES_BINARY_SEARCH_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/lower_bound.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __binary_search {
struct __fn {
  template <forward_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Type,
            class _Proj                                                             = identity,
            indirect_strict_weak_order<const _Type*, projected<_Iter, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool
  operator()(_Iter __first, _Sent __last, const _Type& __value, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __ret = std::__lower_bound<_RangeAlgPolicy>(__first, __last, __value, __comp, __proj);
    return __ret != __last && !std::invoke(__comp, __value, std::invoke(__proj, *__ret));
  }

  template <forward_range _Range,
            class _Type,
            class _Proj                                                                          = identity,
            indirect_strict_weak_order<const _Type*, projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool
  operator()(_Range&& __r, const _Type& __value, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __first = ranges::begin(__r);
    auto __last  = ranges::end(__r);
    auto __ret   = std::__lower_bound<_RangeAlgPolicy>(__first, __last, __value, __comp, __proj);
    return __ret != __last && !std::invoke(__comp, __value, std::invoke(__proj, *__ret));
  }
};
} // namespace __binary_search

inline namespace __cpo {
inline constexpr auto binary_search = __binary_search::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_BINARY_SEARCH_H
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_binary_search.h" 3
#endif /* ranges_binary_search.h expanded by -frewrite-includes */
# 1845 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_clamp.h expanded by -frewrite-includes */
#include <__algorithm/ranges_clamp.h>
#else /* ranges_clamp.h expanded by -frewrite-includes */
# 1845 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_CLAMP_H
#define _LIBCPP___ALGORITHM_RANGES_CLAMP_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __clamp {
struct __fn {
  template <class _Type,
            class _Proj                                                      = identity,
            indirect_strict_weak_order<projected<const _Type*, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr const _Type& operator()(
      const _Type& __value, const _Type& __low, const _Type& __high, _Comp __comp = {}, _Proj __proj = {}) const {
    _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))),
                                 "Bad bounds passed to std::ranges::clamp");

    if (std::invoke(__comp, std::invoke(__proj, __value), std::invoke(__proj, __low)))
      return __low;
    else if (std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __value)))
      return __high;
    else
      return __value;
  }
};
} // namespace __clamp

inline namespace __cpo {
inline constexpr auto clamp = __clamp::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_CLAMP_H
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_clamp.h" 3
#endif /* ranges_clamp.h expanded by -frewrite-includes */
# 1846 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_copy.h expanded by -frewrite-includes */
#include <__algorithm/ranges_copy.h>
#else /* ranges_copy.h expanded by -frewrite-includes */
# 1846 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_COPY_H
#define _LIBCPP___ALGORITHM_RANGES_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter, class _OutIter>
using copy_result = in_out_result<_InIter, _OutIter>;

namespace __copy {
struct __fn {
  template <input_iterator _InIter, sentinel_for<_InIter> _Sent, weakly_incrementable _OutIter>
    requires indirectly_copyable<_InIter, _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr copy_result<_InIter, _OutIter>
  operator()(_InIter __first, _Sent __last, _OutIter __result) const {
    auto __ret = std::__copy<_RangeAlgPolicy>(std::move(__first), std::move(__last), std::move(__result));
    return {std::move(__ret.first), std::move(__ret.second)};
  }

  template <input_range _Range, weakly_incrementable _OutIter>
    requires indirectly_copyable<iterator_t<_Range>, _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr copy_result<borrowed_iterator_t<_Range>, _OutIter>
  operator()(_Range&& __r, _OutIter __result) const {
    auto __ret = std::__copy<_RangeAlgPolicy>(ranges::begin(__r), ranges::end(__r), std::move(__result));
    return {std::move(__ret.first), std::move(__ret.second)};
  }
};
} // namespace __copy

inline namespace __cpo {
inline constexpr auto copy = __copy::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_COPY_H
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy.h" 3
#endif /* ranges_copy.h expanded by -frewrite-includes */
# 1847 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_copy_backward.h expanded by -frewrite-includes */
#include <__algorithm/ranges_copy_backward.h>
#else /* ranges_copy_backward.h expanded by -frewrite-includes */
# 1847 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_COPY_BACKWARD_H
#define _LIBCPP___ALGORITHM_RANGES_COPY_BACKWARD_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy_backward.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _Ip, class _Op>
using copy_backward_result = in_out_result<_Ip, _Op>;

namespace __copy_backward {
struct __fn {
  template <bidirectional_iterator _InIter1, sentinel_for<_InIter1> _Sent1, bidirectional_iterator _InIter2>
    requires indirectly_copyable<_InIter1, _InIter2>
  _LIBCPP_HIDE_FROM_ABI constexpr copy_backward_result<_InIter1, _InIter2>
  operator()(_InIter1 __first, _Sent1 __last, _InIter2 __result) const {
    auto __ret = std::__copy_backward<_RangeAlgPolicy>(std::move(__first), std::move(__last), std::move(__result));
    return {std::move(__ret.first), std::move(__ret.second)};
  }

  template <bidirectional_range _Range, bidirectional_iterator _Iter>
    requires indirectly_copyable<iterator_t<_Range>, _Iter>
  _LIBCPP_HIDE_FROM_ABI constexpr copy_backward_result<borrowed_iterator_t<_Range>, _Iter>
  operator()(_Range&& __r, _Iter __result) const {
    auto __ret = std::__copy_backward<_RangeAlgPolicy>(ranges::begin(__r), ranges::end(__r), std::move(__result));
    return {std::move(__ret.first), std::move(__ret.second)};
  }
};
} // namespace __copy_backward

inline namespace __cpo {
inline constexpr auto copy_backward = __copy_backward::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_COPY_BACKWARD_H
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_backward.h" 3
#endif /* ranges_copy_backward.h expanded by -frewrite-includes */
# 1848 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_copy_if.h expanded by -frewrite-includes */
#include <__algorithm/ranges_copy_if.h>
#else /* ranges_copy_if.h expanded by -frewrite-includes */
# 1848 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_COPY_IF_H
#define _LIBCPP___ALGORITHM_RANGES_COPY_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _Ip, class _Op>
using copy_if_result = in_out_result<_Ip, _Op>;

namespace __copy_if {
struct __fn {
  template <class _InIter, class _Sent, class _OutIter, class _Proj, class _Pred>
  _LIBCPP_HIDE_FROM_ABI static constexpr copy_if_result<_InIter, _OutIter>
  __copy_if_impl(_InIter __first, _Sent __last, _OutIter __result, _Pred& __pred, _Proj& __proj) {
    for (; __first != __last; ++__first) {
      if (std::invoke(__pred, std::invoke(__proj, *__first))) {
        *__result = *__first;
        ++__result;
      }
    }
    return {std::move(__first), std::move(__result)};
  }

  template <input_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            weakly_incrementable _OutIter,
            class _Proj = identity,
            indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
    requires indirectly_copyable<_Iter, _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr copy_if_result<_Iter, _OutIter>
  operator()(_Iter __first, _Sent __last, _OutIter __result, _Pred __pred, _Proj __proj = {}) const {
    return __copy_if_impl(std::move(__first), std::move(__last), std::move(__result), __pred, __proj);
  }

  template <input_range _Range,
            weakly_incrementable _OutIter,
            class _Proj = identity,
            indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
    requires indirectly_copyable<iterator_t<_Range>, _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr copy_if_result<borrowed_iterator_t<_Range>, _OutIter>
  operator()(_Range&& __r, _OutIter __result, _Pred __pred, _Proj __proj = {}) const {
    return __copy_if_impl(ranges::begin(__r), ranges::end(__r), std::move(__result), __pred, __proj);
  }
};
} // namespace __copy_if

inline namespace __cpo {
inline constexpr auto copy_if = __copy_if::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_COPY_IF_H
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_if.h" 3
#endif /* ranges_copy_if.h expanded by -frewrite-includes */
# 1849 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_copy_n.h expanded by -frewrite-includes */
#include <__algorithm/ranges_copy_n.h>
#else /* ranges_copy_n.h expanded by -frewrite-includes */
# 1849 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_COPY_N_H
#define _LIBCPP___ALGORITHM_RANGES_COPY_N_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_copy.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/unreachable_sentinel.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/wrap_iter.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3

namespace ranges {

template <class _Ip, class _Op>
using copy_n_result = in_out_result<_Ip, _Op>;

namespace __copy_n {
struct __fn {
  template <class _InIter, class _DiffType, class _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr static copy_n_result<_InIter, _OutIter>
  __go(_InIter __first, _DiffType __n, _OutIter __result) {
    while (__n != 0) {
      *__result = *__first;
      ++__first;
      ++__result;
      --__n;
    }
    return {std::move(__first), std::move(__result)};
  }

  template <random_access_iterator _InIter, class _DiffType, random_access_iterator _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr static copy_n_result<_InIter, _OutIter>
  __go(_InIter __first, _DiffType __n, _OutIter __result) {
    auto __ret = std::__copy<_RangeAlgPolicy>(__first, __first + __n, __result);
    return {__ret.first, __ret.second};
  }

  template <input_iterator _Ip, weakly_incrementable _Op>
    requires indirectly_copyable<_Ip, _Op>
  _LIBCPP_HIDE_FROM_ABI constexpr copy_n_result<_Ip, _Op>
  operator()(_Ip __first, iter_difference_t<_Ip> __n, _Op __result) const {
    return __go(std::move(__first), __n, std::move(__result));
  }
};
} // namespace __copy_n

inline namespace __cpo {
inline constexpr auto copy_n = __copy_n::__fn{};
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_RANGES_COPY_N_H
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_copy_n.h" 3
#endif /* ranges_copy_n.h expanded by -frewrite-includes */
# 1850 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_count.h expanded by -frewrite-includes */
#include <__algorithm/ranges_count.h>
#else /* ranges_count.h expanded by -frewrite-includes */
# 1850 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_COUNT_H
#define _LIBCPP___ALGORITHM_RANGES_COUNT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/count.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __count {
struct __fn {
  template <input_iterator _Iter, sentinel_for<_Iter> _Sent, class _Type, class _Proj = identity>
    requires indirect_binary_predicate<ranges::equal_to, projected<_Iter, _Proj>, const _Type*>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr iter_difference_t<_Iter>
  operator()(_Iter __first, _Sent __last, const _Type& __value, _Proj __proj = {}) const {
    return std::__count<_RangeAlgPolicy>(std::move(__first), std::move(__last), __value, __proj);
  }

  template <input_range _Range, class _Type, class _Proj = identity>
    requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _Type*>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr range_difference_t<_Range>
  operator()(_Range&& __r, const _Type& __value, _Proj __proj = {}) const {
    return std::__count<_RangeAlgPolicy>(ranges::begin(__r), ranges::end(__r), __value, __proj);
  }
};
} // namespace __count

inline namespace __cpo {
inline constexpr auto count = __count::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_COUNT_H
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count.h" 3
#endif /* ranges_count.h expanded by -frewrite-includes */
# 1851 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_count_if.h expanded by -frewrite-includes */
#include <__algorithm/ranges_count_if.h>
#else /* ranges_count_if.h expanded by -frewrite-includes */
# 1851 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_COUNT_IF_H
#define _LIBCPP___ALGORITHM_RANGES_COUNT_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
template <class _Iter, class _Sent, class _Proj, class _Pred>
_LIBCPP_HIDE_FROM_ABI constexpr iter_difference_t<_Iter>
__count_if_impl(_Iter __first, _Sent __last, _Pred& __pred, _Proj& __proj) {
  iter_difference_t<_Iter> __counter(0);
  for (; __first != __last; ++__first) {
    if (std::invoke(__pred, std::invoke(__proj, *__first)))
      ++__counter;
  }
  return __counter;
}

namespace __count_if {
struct __fn {
  template <input_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj = identity,
            indirect_unary_predicate<projected<_Iter, _Proj>> _Predicate>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr iter_difference_t<_Iter>
  operator()(_Iter __first, _Sent __last, _Predicate __pred, _Proj __proj = {}) const {
    return ranges::__count_if_impl(std::move(__first), std::move(__last), __pred, __proj);
  }

  template <input_range _Range,
            class _Proj = identity,
            indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Predicate>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr range_difference_t<_Range>
  operator()(_Range&& __r, _Predicate __pred, _Proj __proj = {}) const {
    return ranges::__count_if_impl(ranges::begin(__r), ranges::end(__r), __pred, __proj);
  }
};
} // namespace __count_if

inline namespace __cpo {
inline constexpr auto count_if = __count_if::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_COUNT_IF_H
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_count_if.h" 3
#endif /* ranges_count_if.h expanded by -frewrite-includes */
# 1852 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_ends_with.h expanded by -frewrite-includes */
#include <__algorithm/ranges_ends_with.h>
#else /* ranges_ends_with.h expanded by -frewrite-includes */
# 1852 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_ENDS_WITH_H
#define _LIBCPP___ALGORITHM_RANGES_ENDS_WITH_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_equal.h expanded by -frewrite-includes */
#include <__algorithm/ranges_equal.h>
#else /* ranges_equal.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_EQUAL_H
#define _LIBCPP___ALGORITHM_RANGES_EQUAL_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/equal.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/unwrap_range.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/indirectly_comparable.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __equal {
struct __fn {
  template <input_iterator _Iter1,
            sentinel_for<_Iter1> _Sent1,
            input_iterator _Iter2,
            sentinel_for<_Iter2> _Sent2,
            class _Pred  = ranges::equal_to,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Pred __pred   = {},
      _Proj1 __proj1 = {},
      _Proj2 __proj2 = {}) const {
    if constexpr (sized_sentinel_for<_Sent1, _Iter1> && sized_sentinel_for<_Sent2, _Iter2>) {
      if (__last1 - __first1 != __last2 - __first2)
        return false;
    }
    auto __unwrapped1 = std::__unwrap_range(std::move(__first1), std::move(__last1));
    auto __unwrapped2 = std::__unwrap_range(std::move(__first2), std::move(__last2));
    return std::__equal_impl(
        std::move(__unwrapped1.first),
        std::move(__unwrapped1.second),
        std::move(__unwrapped2.first),
        std::move(__unwrapped2.second),
        __pred,
        __proj1,
        __proj2);
  }

  template <input_range _Range1,
            input_range _Range2,
            class _Pred  = ranges::equal_to,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
      _Range1&& __range1, _Range2&& __range2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
    if constexpr (sized_range<_Range1> && sized_range<_Range2>) {
      if (ranges::distance(__range1) != ranges::distance(__range2))
        return false;
    }
    auto __unwrapped1 = std::__unwrap_range(ranges::begin(__range1), ranges::end(__range1));
    auto __unwrapped2 = std::__unwrap_range(ranges::begin(__range2), ranges::end(__range2));
    return std::__equal_impl(
        std::move(__unwrapped1.first),
        std::move(__unwrapped1.second),
        std::move(__unwrapped2.first),
        std::move(__unwrapped2.second),
        __pred,
        __proj1,
        __proj2);
    return false;
  }
};
} // namespace __equal

inline namespace __cpo {
inline constexpr auto equal = __equal::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_EQUAL_H
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal.h" 3
#endif /* ranges_equal.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_starts_with.h expanded by -frewrite-includes */
#include <__algorithm/ranges_starts_with.h>
#else /* ranges_starts_with.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_STARTS_WITH_H
#define _LIBCPP___ALGORITHM_RANGES_STARTS_WITH_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_in_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_mismatch.h expanded by -frewrite-includes */
#include <__algorithm/ranges_mismatch.h>
#else /* ranges_mismatch.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_MISMATCH_H
#define _LIBCPP___ALGORITHM_RANGES_MISMATCH_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_in_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/indirectly_comparable.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3

namespace ranges {

template <class _I1, class _I2>
using mismatch_result = in_in_result<_I1, _I2>;

namespace __mismatch {
struct __fn {
  template <class _I1, class _S1, class _I2, class _S2, class _Pred, class _Proj1, class _Proj2>
  static _LIBCPP_HIDE_FROM_ABI constexpr mismatch_result<_I1, _I2>
  __go(_I1 __first1, _S1 __last1, _I2 __first2, _S2 __last2, _Pred& __pred, _Proj1& __proj1, _Proj2& __proj2) {
    while (__first1 != __last1 && __first2 != __last2) {
      if (!std::invoke(__pred, std::invoke(__proj1, *__first1), std::invoke(__proj2, *__first2)))
        break;
      ++__first1;
      ++__first2;
    }
    return {std::move(__first1), std::move(__first2)};
  }

  template <input_iterator _I1,
            sentinel_for<_I1> _S1,
            input_iterator _I2,
            sentinel_for<_I2> _S2,
            class _Pred  = ranges::equal_to,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_comparable<_I1, _I2, _Pred, _Proj1, _Proj2>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr mismatch_result<_I1, _I2> operator()(
      _I1 __first1, _S1 __last1, _I2 __first2, _S2 __last2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {})
      const {
    return __go(std::move(__first1), __last1, std::move(__first2), __last2, __pred, __proj1, __proj2);
  }

  template <input_range _R1,
            input_range _R2,
            class _Pred  = ranges::equal_to,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_comparable<iterator_t<_R1>, iterator_t<_R2>, _Pred, _Proj1, _Proj2>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr mismatch_result<borrowed_iterator_t<_R1>,
                                                                        borrowed_iterator_t<_R2>>
  operator()(_R1&& __r1, _R2&& __r2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
    return __go(
        ranges::begin(__r1), ranges::end(__r1), ranges::begin(__r2), ranges::end(__r2), __pred, __proj1, __proj2);
  }
};
} // namespace __mismatch

inline namespace __cpo {
constexpr inline auto mismatch = __mismatch::__fn{};
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_RANGES_MISMATCH_H
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_mismatch.h" 3
#endif /* ranges_mismatch.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/indirectly_comparable.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __starts_with {
struct __fn {
  template <input_iterator _Iter1,
            sentinel_for<_Iter1> _Sent1,
            input_iterator _Iter2,
            sentinel_for<_Iter2> _Sent2,
            class _Pred  = ranges::equal_to,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Pred __pred   = {},
      _Proj1 __proj1 = {},
      _Proj2 __proj2 = {}) const {
    return __mismatch::__fn::__go(
               std::move(__first1),
               std::move(__last1),
               std::move(__first2),
               std::move(__last2),
               __pred,
               __proj1,
               __proj2)
               .in2 == __last2;
  }

  template <input_range _Range1,
            input_range _Range2,
            class _Pred  = ranges::equal_to,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
      _Range1&& __range1, _Range2&& __range2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
    return __mismatch::__fn::__go(
               ranges::begin(__range1),
               ranges::end(__range1),
               ranges::begin(__range2),
               ranges::end(__range2),
               __pred,
               __proj1,
               __proj2)
               .in2 == ranges::end(__range2);
  }
};
} // namespace __starts_with
inline namespace __cpo {
inline constexpr auto starts_with = __starts_with::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 23
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_STARTS_WITH_H
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_starts_with.h" 3
#endif /* ranges_starts_with.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/reference_wrapper.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/indirectly_comparable.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __ends_with {
struct __fn {
  template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Pred, class _Proj1, class _Proj2>
  static _LIBCPP_HIDE_FROM_ABI constexpr bool __ends_with_fn_impl_bidirectional(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Pred& __pred,
      _Proj1& __proj1,
      _Proj2& __proj2) {
    auto __rbegin1 = std::make_reverse_iterator(__last1);
    auto __rend1   = std::make_reverse_iterator(__first1);
    auto __rbegin2 = std::make_reverse_iterator(__last2);
    auto __rend2   = std::make_reverse_iterator(__first2);
    return ranges::starts_with(
        __rbegin1, __rend1, __rbegin2, __rend2, std::ref(__pred), std::ref(__proj1), std::ref(__proj2));
  }

  template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Pred, class _Proj1, class _Proj2>
  static _LIBCPP_HIDE_FROM_ABI constexpr bool __ends_with_fn_impl(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Pred& __pred,
      _Proj1& __proj1,
      _Proj2& __proj2) {
    if constexpr (std::bidirectional_iterator<_Sent1> && std::bidirectional_iterator<_Sent2> &&
                  (!std::random_access_iterator<_Sent1>)&&(!std::random_access_iterator<_Sent2>)) {
      return __ends_with_fn_impl_bidirectional(__first1, __last1, __first2, __last2, __pred, __proj1, __proj2);

    } else {
      auto __n1 = ranges::distance(__first1, __last1);
      auto __n2 = ranges::distance(__first2, __last2);
      if (__n2 == 0)
        return true;
      if (__n2 > __n1)
        return false;

      return __ends_with_fn_impl_with_offset(
          std::move(__first1),
          std::move(__last1),
          std::move(__first2),
          std::move(__last2),
          __pred,
          __proj1,
          __proj2,
          __n1 - __n2);
    }
  }

  template <class _Iter1,
            class _Sent1,
            class _Iter2,
            class _Sent2,
            class _Pred,
            class _Proj1,
            class _Proj2,
            class _Offset>
  static _LIBCPP_HIDE_FROM_ABI constexpr bool __ends_with_fn_impl_with_offset(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Pred& __pred,
      _Proj1& __proj1,
      _Proj2& __proj2,
      _Offset __offset) {
    if constexpr (std::bidirectional_iterator<_Sent1> && std::bidirectional_iterator<_Sent2> &&
                  !std::random_access_iterator<_Sent1> && !std::random_access_iterator<_Sent2>) {
      return __ends_with_fn_impl_bidirectional(
          std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2), __pred, __proj1, __proj2);

    } else {
      ranges::advance(__first1, __offset);
      return ranges::equal(
          std::move(__first1),
          std::move(__last1),
          std::move(__first2),
          std::move(__last2),
          std::ref(__pred),
          std::ref(__proj1),
          std::ref(__proj2));
    }
  }

  template <input_iterator _Iter1,
            sentinel_for<_Iter1> _Sent1,
            input_iterator _Iter2,
            sentinel_for<_Iter2> _Sent2,
            class _Pred  = ranges::equal_to,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires(forward_iterator<_Iter1> || sized_sentinel_for<_Sent1, _Iter1>) &&
            (forward_iterator<_Iter2> || sized_sentinel_for<_Sent2, _Iter2>) &&
            indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Pred __pred   = {},
      _Proj1 __proj1 = {},
      _Proj2 __proj2 = {}) const {
    return __ends_with_fn_impl(
        std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2), __pred, __proj1, __proj2);
  }

  template <input_range _Range1,
            input_range _Range2,
            class _Pred  = ranges::equal_to,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires(forward_range<_Range1> || sized_range<_Range1>) && (forward_range<_Range2> || sized_range<_Range2>) &&
            indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
      _Range1&& __range1, _Range2&& __range2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
    if constexpr (sized_range<_Range1> && sized_range<_Range2>) {
      auto __n1 = ranges::size(__range1);
      auto __n2 = ranges::size(__range2);
      if (__n2 == 0)
        return true;
      if (__n2 > __n1)
        return false;
      auto __offset = __n1 - __n2;

      return __ends_with_fn_impl_with_offset(
          ranges::begin(__range1),
          ranges::end(__range1),
          ranges::begin(__range2),
          ranges::end(__range2),
          __pred,
          __proj1,
          __proj2,
          __offset);

    } else {
      return __ends_with_fn_impl(
          ranges::begin(__range1),
          ranges::end(__range1),
          ranges::begin(__range2),
          ranges::end(__range2),
          __pred,
          __proj1,
          __proj2);
    }
  }
};
} // namespace __ends_with

inline namespace __cpo {
inline constexpr auto ends_with = __ends_with::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 23
# 195 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_ENDS_WITH_H
# 197 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_ends_with.h" 3
#endif /* ranges_ends_with.h expanded by -frewrite-includes */
# 1853 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_equal.h>
#endif /* expanded by -frewrite-includes */
# 1853 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1854 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_equal_range.h expanded by -frewrite-includes */
#include <__algorithm/ranges_equal_range.h>
#else /* ranges_equal_range.h expanded by -frewrite-includes */
# 1854 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM __project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_EQUAL_RANGE_H
#define _LIBCPP___ALGORITHM_RANGES_EQUAL_RANGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/equal_range.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __equal_range {

struct __fn {
  template <forward_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Tp,
            class _Proj                                                           = identity,
            indirect_strict_weak_order<const _Tp*, projected<_Iter, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter>
  operator()(_Iter __first, _Sent __last, const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __ret = std::__equal_range<_RangeAlgPolicy>(std::move(__first), std::move(__last), __value, __comp, __proj);
    return {std::move(__ret.first), std::move(__ret.second)};
  }

  template <forward_range _Range,
            class _Tp,
            class _Proj                                                                        = identity,
            indirect_strict_weak_order<const _Tp*, projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range>
  operator()(_Range&& __range, const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __ret =
        std::__equal_range<_RangeAlgPolicy>(ranges::begin(__range), ranges::end(__range), __value, __comp, __proj);
    return {std::move(__ret.first), std::move(__ret.second)};
  }
};

} // namespace __equal_range

inline namespace __cpo {
inline constexpr auto equal_range = __equal_range::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_EQUAL_RANGE_H
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_equal_range.h" 3
#endif /* ranges_equal_range.h expanded by -frewrite-includes */
# 1855 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_fill.h expanded by -frewrite-includes */
#include <__algorithm/ranges_fill.h>
#else /* ranges_fill.h expanded by -frewrite-includes */
# 1855 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_FILL_H
#define _LIBCPP___ALGORITHM_RANGES_FILL_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_fill_n.h expanded by -frewrite-includes */
#include <__algorithm/ranges_fill_n.h>
#else /* ranges_fill_n.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill_n.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_FILL_N_H
#define _LIBCPP___ALGORITHM_RANGES_FILL_N_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill_n.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill_n.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill_n.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill_n.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill_n.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill_n.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill_n.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __fill_n {
struct __fn {
  template <class _Type, output_iterator<const _Type&> _Iter>
  _LIBCPP_HIDE_FROM_ABI constexpr _Iter
  operator()(_Iter __first, iter_difference_t<_Iter> __n, const _Type& __value) const {
    for (; __n != 0; --__n) {
      *__first = __value;
      ++__first;
    }
    return __first;
  }
};
} // namespace __fill_n

inline namespace __cpo {
inline constexpr auto fill_n = __fill_n::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill_n.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_FILL_N_H
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill_n.h" 3
#endif /* ranges_fill_n.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __fill {
struct __fn {
  template <class _Type, output_iterator<const _Type&> _Iter, sentinel_for<_Iter> _Sent>
  _LIBCPP_HIDE_FROM_ABI constexpr _Iter operator()(_Iter __first, _Sent __last, const _Type& __value) const {
    if constexpr (random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>) {
      return ranges::fill_n(__first, __last - __first, __value);
    } else {
      for (; __first != __last; ++__first)
        *__first = __value;
      return __first;
    }
  }

  template <class _Type, output_range<const _Type&> _Range>
  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range> operator()(_Range&& __range, const _Type& __value) const {
    return (*this)(ranges::begin(__range), ranges::end(__range), __value);
  }
};
} // namespace __fill

inline namespace __cpo {
inline constexpr auto fill = __fill::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_FILL_H
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_fill.h" 3
#endif /* ranges_fill.h expanded by -frewrite-includes */
# 1856 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_fill_n.h>
#endif /* expanded by -frewrite-includes */
# 1856 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1857 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_find.h expanded by -frewrite-includes */
#include <__algorithm/ranges_find.h>
#else /* ranges_find.h expanded by -frewrite-includes */
# 1857 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_FIND_H
#define _LIBCPP___ALGORITHM_RANGES_FIND_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/find.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_find_if.h expanded by -frewrite-includes */
#include <__algorithm/ranges_find_if.h>
#else /* ranges_find_if.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_FIND_IF_H
#define _LIBCPP___ALGORITHM_RANGES_FIND_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _Ip, class _Sp, class _Pred, class _Proj>
_LIBCPP_HIDE_FROM_ABI constexpr _Ip __find_if_impl(_Ip __first, _Sp __last, _Pred& __pred, _Proj& __proj) {
  for (; __first != __last; ++__first) {
    if (std::invoke(__pred, std::invoke(__proj, *__first)))
      break;
  }
  return __first;
}

namespace __find_if {
struct __fn {
  template <input_iterator _Ip,
            sentinel_for<_Ip> _Sp,
            class _Proj = identity,
            indirect_unary_predicate<projected<_Ip, _Proj>> _Pred>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Ip
  operator()(_Ip __first, _Sp __last, _Pred __pred, _Proj __proj = {}) const {
    return ranges::__find_if_impl(std::move(__first), std::move(__last), __pred, __proj);
  }

  template <input_range _Rp, class _Proj = identity, indirect_unary_predicate<projected<iterator_t<_Rp>, _Proj>> _Pred>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Rp>
  operator()(_Rp&& __r, _Pred __pred, _Proj __proj = {}) const {
    return ranges::__find_if_impl(ranges::begin(__r), ranges::end(__r), __pred, __proj);
  }
};
} // namespace __find_if

inline namespace __cpo {
inline constexpr auto find_if = __find_if::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_FIND_IF_H
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if.h" 3
#endif /* ranges_find_if.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/unwrap_range.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __find {
struct __fn {
  template <class _Iter, class _Sent, class _Tp, class _Proj>
  _LIBCPP_HIDE_FROM_ABI static constexpr _Iter
  __find_unwrap(_Iter __first, _Sent __last, const _Tp& __value, _Proj& __proj) {
    if constexpr (forward_iterator<_Iter>) {
      auto [__first_un, __last_un] = std::__unwrap_range(__first, std::move(__last));
      return std::__rewrap_range<_Sent>(
          std::move(__first), std::__find_impl(std::move(__first_un), std::move(__last_un), __value, __proj));
    } else {
      return std::__find_impl(std::move(__first), std::move(__last), __value, __proj);
    }
  }

  template <input_iterator _Ip, sentinel_for<_Ip> _Sp, class _Tp, class _Proj = identity>
    requires indirect_binary_predicate<ranges::equal_to, projected<_Ip, _Proj>, const _Tp*>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Ip
  operator()(_Ip __first, _Sp __last, const _Tp& __value, _Proj __proj = {}) const {
    return __find_unwrap(std::move(__first), std::move(__last), __value, __proj);
  }

  template <input_range _Rp, class _Tp, class _Proj = identity>
    requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Rp>, _Proj>, const _Tp*>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Rp>
  operator()(_Rp&& __r, const _Tp& __value, _Proj __proj = {}) const {
    return __find_unwrap(ranges::begin(__r), ranges::end(__r), __value, __proj);
  }
};
} // namespace __find

inline namespace __cpo {
inline constexpr auto find = __find::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_FIND_H
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find.h" 3
#endif /* ranges_find.h expanded by -frewrite-includes */
# 1858 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_find_end.h expanded by -frewrite-includes */
#include <__algorithm/ranges_find_end.h>
#else /* ranges_find_end.h expanded by -frewrite-includes */
# 1858 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_FIND_END_H
#define _LIBCPP___ALGORITHM_RANGES_FIND_END_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/find_end.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_iterator_concept.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/indirectly_comparable.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __find_end {
struct __fn {
  template <forward_iterator _Iter1,
            sentinel_for<_Iter1> _Sent1,
            forward_iterator _Iter2,
            sentinel_for<_Iter2> _Sent2,
            class _Pred  = ranges::equal_to,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter1> operator()(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Pred __pred   = {},
      _Proj1 __proj1 = {},
      _Proj2 __proj2 = {}) const {
    auto __ret = std::__find_end_impl<_RangeAlgPolicy>(
        __first1,
        __last1,
        __first2,
        __last2,
        __pred,
        __proj1,
        __proj2,
        __iterator_concept<_Iter1>(),
        __iterator_concept<_Iter2>());
    return {__ret.first, __ret.second};
  }

  template <forward_range _Range1,
            forward_range _Range2,
            class _Pred  = ranges::equal_to,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range1> operator()(
      _Range1&& __range1, _Range2&& __range2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
    auto __ret = std::__find_end_impl<_RangeAlgPolicy>(
        ranges::begin(__range1),
        ranges::end(__range1),
        ranges::begin(__range2),
        ranges::end(__range2),
        __pred,
        __proj1,
        __proj2,
        __iterator_concept<iterator_t<_Range1>>(),
        __iterator_concept<iterator_t<_Range2>>());
    return {__ret.first, __ret.second};
  }
};
} // namespace __find_end

inline namespace __cpo {
inline constexpr auto find_end = __find_end::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_FIND_END_H
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_end.h" 3
#endif /* ranges_find_end.h expanded by -frewrite-includes */
# 1859 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_find_first_of.h expanded by -frewrite-includes */
#include <__algorithm/ranges_find_first_of.h>
#else /* ranges_find_first_of.h expanded by -frewrite-includes */
# 1859 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_FIND_FIRST_OF_H
#define _LIBCPP___ALGORITHM_RANGES_FIND_FIRST_OF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/indirectly_comparable.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __find_first_of {
struct __fn {
  template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Pred, class _Proj1, class _Proj2>
  _LIBCPP_HIDE_FROM_ABI constexpr static _Iter1 __find_first_of_impl(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Pred& __pred,
      _Proj1& __proj1,
      _Proj2& __proj2) {
    for (; __first1 != __last1; ++__first1) {
      for (auto __j = __first2; __j != __last2; ++__j) {
        if (std::invoke(__pred, std::invoke(__proj1, *__first1), std::invoke(__proj2, *__j)))
          return __first1;
      }
    }
    return __first1;
  }

  template <input_iterator _Iter1,
            sentinel_for<_Iter1> _Sent1,
            forward_iterator _Iter2,
            sentinel_for<_Iter2> _Sent2,
            class _Pred  = ranges::equal_to,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Iter1 operator()(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Pred __pred   = {},
      _Proj1 __proj1 = {},
      _Proj2 __proj2 = {}) const {
    return __find_first_of_impl(
        std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2), __pred, __proj1, __proj2);
  }

  template <input_range _Range1,
            forward_range _Range2,
            class _Pred  = ranges::equal_to,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range1> operator()(
      _Range1&& __range1, _Range2&& __range2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
    return __find_first_of_impl(
        ranges::begin(__range1),
        ranges::end(__range1),
        ranges::begin(__range2),
        ranges::end(__range2),
        __pred,
        __proj1,
        __proj2);
  }
};
} // namespace __find_first_of

inline namespace __cpo {
inline constexpr auto find_first_of = __find_first_of::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 100 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_FIND_FIRST_OF_H
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_first_of.h" 3
#endif /* ranges_find_first_of.h expanded by -frewrite-includes */
# 1860 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_find_if.h>
#endif /* expanded by -frewrite-includes */
# 1860 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1861 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_find_if_not.h expanded by -frewrite-includes */
#include <__algorithm/ranges_find_if_not.h>
#else /* ranges_find_if_not.h expanded by -frewrite-includes */
# 1861 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_FIND_IF_NOT_H
#define _LIBCPP___ALGORITHM_RANGES_FIND_IF_NOT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_find_if.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __find_if_not {
struct __fn {
  template <input_iterator _Ip,
            sentinel_for<_Ip> _Sp,
            class _Proj = identity,
            indirect_unary_predicate<projected<_Ip, _Proj>> _Pred>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Ip
  operator()(_Ip __first, _Sp __last, _Pred __pred, _Proj __proj = {}) const {
    auto __pred2 = [&](auto&& __e) { return !std::invoke(__pred, std::forward<decltype(__e)>(__e)); };
    return ranges::__find_if_impl(std::move(__first), std::move(__last), __pred2, __proj);
  }

  template <input_range _Rp, class _Proj = identity, indirect_unary_predicate<projected<iterator_t<_Rp>, _Proj>> _Pred>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Rp>
  operator()(_Rp&& __r, _Pred __pred, _Proj __proj = {}) const {
    auto __pred2 = [&](auto&& __e) { return !std::invoke(__pred, std::forward<decltype(__e)>(__e)); };
    return ranges::__find_if_impl(ranges::begin(__r), ranges::end(__r), __pred2, __proj);
  }
};
} // namespace __find_if_not

inline namespace __cpo {
inline constexpr auto find_if_not = __find_if_not::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_FIND_IF_NOT_H
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_find_if_not.h" 3
#endif /* ranges_find_if_not.h expanded by -frewrite-includes */
# 1862 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_for_each.h expanded by -frewrite-includes */
#include <__algorithm/ranges_for_each.h>
#else /* ranges_for_each.h expanded by -frewrite-includes */
# 1862 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_FOR_EACH_H
#define _LIBCPP___ALGORITHM_RANGES_FOR_EACH_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_fun_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _Iter, class _Func>
using for_each_result = in_fun_result<_Iter, _Func>;

namespace __for_each {
struct __fn {
private:
  template <class _Iter, class _Sent, class _Proj, class _Func>
  _LIBCPP_HIDE_FROM_ABI constexpr static for_each_result<_Iter, _Func>
  __for_each_impl(_Iter __first, _Sent __last, _Func& __func, _Proj& __proj) {
    for (; __first != __last; ++__first)
      std::invoke(__func, std::invoke(__proj, *__first));
    return {std::move(__first), std::move(__func)};
  }

public:
  template <input_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj = identity,
            indirectly_unary_invocable<projected<_Iter, _Proj>> _Func>
  _LIBCPP_HIDE_FROM_ABI constexpr for_each_result<_Iter, _Func>
  operator()(_Iter __first, _Sent __last, _Func __func, _Proj __proj = {}) const {
    return __for_each_impl(std::move(__first), std::move(__last), __func, __proj);
  }

  template <input_range _Range,
            class _Proj = identity,
            indirectly_unary_invocable<projected<iterator_t<_Range>, _Proj>> _Func>
  _LIBCPP_HIDE_FROM_ABI constexpr for_each_result<borrowed_iterator_t<_Range>, _Func>
  operator()(_Range&& __range, _Func __func, _Proj __proj = {}) const {
    return __for_each_impl(ranges::begin(__range), ranges::end(__range), __func, __proj);
  }
};
} // namespace __for_each

inline namespace __cpo {
inline constexpr auto for_each = __for_each::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_FOR_EACH_H
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each.h" 3
#endif /* ranges_for_each.h expanded by -frewrite-includes */
# 1863 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_for_each_n.h expanded by -frewrite-includes */
#include <__algorithm/ranges_for_each_n.h>
#else /* ranges_for_each_n.h expanded by -frewrite-includes */
# 1863 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_FOR_EACH_N_H
#define _LIBCPP___ALGORITHM_RANGES_FOR_EACH_N_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_fun_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _Iter, class _Func>
using for_each_n_result = in_fun_result<_Iter, _Func>;

namespace __for_each_n {
struct __fn {
  template <input_iterator _Iter, class _Proj = identity, indirectly_unary_invocable<projected<_Iter, _Proj>> _Func>
  _LIBCPP_HIDE_FROM_ABI constexpr for_each_n_result<_Iter, _Func>
  operator()(_Iter __first, iter_difference_t<_Iter> __count, _Func __func, _Proj __proj = {}) const {
    while (__count-- > 0) {
      std::invoke(__func, std::invoke(__proj, *__first));
      ++__first;
    }
    return {std::move(__first), std::move(__func)};
  }
};
} // namespace __for_each_n

inline namespace __cpo {
inline constexpr auto for_each_n = __for_each_n::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_FOR_EACH_N_H
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_for_each_n.h" 3
#endif /* ranges_for_each_n.h expanded by -frewrite-includes */
# 1864 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_generate.h expanded by -frewrite-includes */
#include <__algorithm/ranges_generate.h>
#else /* ranges_generate.h expanded by -frewrite-includes */
# 1864 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_GENERATE_H
#define _LIBCPP___ALGORITHM_RANGES_GENERATE_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/invocable.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __generate {

struct __fn {
  template <class _OutIter, class _Sent, class _Func>
  _LIBCPP_HIDE_FROM_ABI constexpr static _OutIter __generate_fn_impl(_OutIter __first, _Sent __last, _Func& __gen) {
    for (; __first != __last; ++__first) {
      *__first = __gen();
    }

    return __first;
  }

  template <input_or_output_iterator _OutIter, sentinel_for<_OutIter> _Sent, copy_constructible _Func>
    requires invocable<_Func&> && indirectly_writable<_OutIter, invoke_result_t<_Func&>>
  _LIBCPP_HIDE_FROM_ABI constexpr _OutIter operator()(_OutIter __first, _Sent __last, _Func __gen) const {
    return __generate_fn_impl(std::move(__first), std::move(__last), __gen);
  }

  template <class _Range, copy_constructible _Func>
    requires invocable<_Func&> && output_range<_Range, invoke_result_t<_Func&>>
  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range> operator()(_Range&& __range, _Func __gen) const {
    return __generate_fn_impl(ranges::begin(__range), ranges::end(__range), __gen);
  }
};

} // namespace __generate

inline namespace __cpo {
inline constexpr auto generate = __generate::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_GENERATE_H
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate.h" 3
#endif /* ranges_generate.h expanded by -frewrite-includes */
# 1865 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_generate_n.h expanded by -frewrite-includes */
#include <__algorithm/ranges_generate_n.h>
#else /* ranges_generate_n.h expanded by -frewrite-includes */
# 1865 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_GENERATE_N_H
#define _LIBCPP___ALGORITHM_RANGES_GENERATE_N_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/invocable.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __generate_n {

struct __fn {
  template <input_or_output_iterator _OutIter, copy_constructible _Func>
    requires invocable<_Func&> && indirectly_writable<_OutIter, invoke_result_t<_Func&>>
  _LIBCPP_HIDE_FROM_ABI constexpr _OutIter
  operator()(_OutIter __first, iter_difference_t<_OutIter> __n, _Func __gen) const {
    for (; __n > 0; --__n) {
      *__first = __gen();
      ++__first;
    }

    return __first;
  }
};

} // namespace __generate_n

inline namespace __cpo {
inline constexpr auto generate_n = __generate_n::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_GENERATE_N_H
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_generate_n.h" 3
#endif /* ranges_generate_n.h expanded by -frewrite-includes */
# 1866 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_includes.h expanded by -frewrite-includes */
#include <__algorithm/ranges_includes.h>
#else /* ranges_includes.h expanded by -frewrite-includes */
# 1866 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_INCLUDES_H
#define _LIBCPP___ALGORITHM_RANGES_INCLUDES_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/includes.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __includes {

struct __fn {
  template <input_iterator _Iter1,
            sentinel_for<_Iter1> _Sent1,
            input_iterator _Iter2,
            sentinel_for<_Iter2> _Sent2,
            class _Proj1                                                                           = identity,
            class _Proj2                                                                           = identity,
            indirect_strict_weak_order<projected<_Iter1, _Proj1>, projected<_Iter2, _Proj2>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Comp __comp   = {},
      _Proj1 __proj1 = {},
      _Proj2 __proj2 = {}) const {
    return std::__includes(
        std::move(__first1),
        std::move(__last1),
        std::move(__first2),
        std::move(__last2),
        std::move(__comp),
        std::move(__proj1),
        std::move(__proj2));
  }

  template <input_range _Range1,
            input_range _Range2,
            class _Proj1 = identity,
            class _Proj2 = identity,
            indirect_strict_weak_order<projected<iterator_t<_Range1>, _Proj1>, projected<iterator_t<_Range2>, _Proj2>>
                _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
      _Range1&& __range1, _Range2&& __range2, _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
    return std::__includes(
        ranges::begin(__range1),
        ranges::end(__range1),
        ranges::begin(__range2),
        ranges::end(__range2),
        std::move(__comp),
        std::move(__proj1),
        std::move(__proj2));
  }
};

} // namespace __includes

inline namespace __cpo {
inline constexpr auto includes = __includes::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_INCLUDES_H
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_includes.h" 3
#endif /* ranges_includes.h expanded by -frewrite-includes */
# 1867 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_inplace_merge.h expanded by -frewrite-includes */
#include <__algorithm/ranges_inplace_merge.h>
#else /* ranges_inplace_merge.h expanded by -frewrite-includes */
# 1867 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_INPLACE_MERGE_H
#define _LIBCPP___ALGORITHM_RANGES_INPLACE_MERGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/inplace_merge.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/sortable.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __inplace_merge {

struct __fn {
  template <class _Iter, class _Sent, class _Comp, class _Proj>
  _LIBCPP_HIDE_FROM_ABI static constexpr auto
  __inplace_merge_impl(_Iter __first, _Iter __middle, _Sent __last, _Comp&& __comp, _Proj&& __proj) {
    auto __last_iter = ranges::next(__middle, __last);
    std::__inplace_merge<_RangeAlgPolicy>(
        std::move(__first), std::move(__middle), __last_iter, std::__make_projected(__comp, __proj));
    return __last_iter;
  }

  template <bidirectional_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<_Iter, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI _Iter
  operator()(_Iter __first, _Iter __middle, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    return __inplace_merge_impl(
        std::move(__first), std::move(__middle), std::move(__last), std::move(__comp), std::move(__proj));
  }

  template <bidirectional_range _Range, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<iterator_t<_Range>, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI borrowed_iterator_t<_Range>
  operator()(_Range&& __range, iterator_t<_Range> __middle, _Comp __comp = {}, _Proj __proj = {}) const {
    return __inplace_merge_impl(
        ranges::begin(__range), std::move(__middle), ranges::end(__range), std::move(__comp), std::move(__proj));
  }
};

} // namespace __inplace_merge

inline namespace __cpo {
inline constexpr auto inplace_merge = __inplace_merge::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_INPLACE_MERGE_H
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_inplace_merge.h" 3
#endif /* ranges_inplace_merge.h expanded by -frewrite-includes */
# 1868 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_is_heap.h expanded by -frewrite-includes */
#include <__algorithm/ranges_is_heap.h>
#else /* ranges_is_heap.h expanded by -frewrite-includes */
# 1868 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_IS_HEAP_H
#define _LIBCPP___ALGORITHM_RANGES_IS_HEAP_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/is_heap_until.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __is_heap {

struct __fn {
  template <class _Iter, class _Sent, class _Proj, class _Comp>
  _LIBCPP_HIDE_FROM_ABI constexpr static bool
  __is_heap_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
    auto __last_iter        = ranges::next(__first, __last);
    auto&& __projected_comp = std::__make_projected(__comp, __proj);

    auto __result = std::__is_heap_until(std::move(__first), std::move(__last_iter), __projected_comp);
    return __result == __last;
  }

  template <random_access_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj                                               = identity,
            indirect_strict_weak_order<projected<_Iter, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool
  operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    return __is_heap_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
  }

  template <random_access_range _Range,
            class _Proj                                                            = identity,
            indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool
  operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
    return __is_heap_fn_impl(ranges::begin(__range), ranges::end(__range), __comp, __proj);
  }
};

} // namespace __is_heap

inline namespace __cpo {
inline constexpr auto is_heap = __is_heap::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_IS_HEAP_H
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap.h" 3
#endif /* ranges_is_heap.h expanded by -frewrite-includes */
# 1869 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_is_heap_until.h expanded by -frewrite-includes */
#include <__algorithm/ranges_is_heap_until.h>
#else /* ranges_is_heap_until.h expanded by -frewrite-includes */
# 1869 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_IS_HEAP_UNTIL_H
#define _LIBCPP___ALGORITHM_RANGES_IS_HEAP_UNTIL_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/is_heap_until.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __is_heap_until {

struct __fn {
  template <class _Iter, class _Sent, class _Proj, class _Comp>
  _LIBCPP_HIDE_FROM_ABI constexpr static _Iter
  __is_heap_until_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
    auto __last_iter        = ranges::next(__first, __last);
    auto&& __projected_comp = std::__make_projected(__comp, __proj);

    return std::__is_heap_until(std::move(__first), std::move(__last_iter), __projected_comp);
  }

  template <random_access_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj                                               = identity,
            indirect_strict_weak_order<projected<_Iter, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Iter
  operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    return __is_heap_until_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
  }

  template <random_access_range _Range,
            class _Proj                                                            = identity,
            indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
  operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
    return __is_heap_until_fn_impl(ranges::begin(__range), ranges::end(__range), __comp, __proj);
  }
};

} // namespace __is_heap_until

inline namespace __cpo {
inline constexpr auto is_heap_until = __is_heap_until::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_IS_HEAP_UNTIL_H
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_heap_until.h" 3
#endif /* ranges_is_heap_until.h expanded by -frewrite-includes */
# 1870 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_is_partitioned.h expanded by -frewrite-includes */
#include <__algorithm/ranges_is_partitioned.h>
#else /* ranges_is_partitioned.h expanded by -frewrite-includes */
# 1870 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_IS_PARTITIONED_H
#define _LIBCPP___ALGORITHM_RANGES_IS_PARTITIONED_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/indirectly_comparable.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __is_partitioned {
struct __fn {
  template <class _Iter, class _Sent, class _Proj, class _Pred>
  _LIBCPP_HIDE_FROM_ABI constexpr static bool
  __is_partitioned_impl(_Iter __first, _Sent __last, _Pred& __pred, _Proj& __proj) {
    for (; __first != __last; ++__first) {
      if (!std::invoke(__pred, std::invoke(__proj, *__first)))
        break;
    }

    if (__first == __last)
      return true;
    ++__first;

    for (; __first != __last; ++__first) {
      if (std::invoke(__pred, std::invoke(__proj, *__first)))
        return false;
    }

    return true;
  }

  template <input_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj = identity,
            indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool
  operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const {
    return __is_partitioned_impl(std::move(__first), std::move(__last), __pred, __proj);
  }

  template <input_range _Range,
            class _Proj = identity,
            indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool
  operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
    return __is_partitioned_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
  }
};
} // namespace __is_partitioned

inline namespace __cpo {
inline constexpr auto is_partitioned = __is_partitioned::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_IS_PARTITIONED_H
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_partitioned.h" 3
#endif /* ranges_is_partitioned.h expanded by -frewrite-includes */
# 1871 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_is_permutation.h expanded by -frewrite-includes */
#include <__algorithm/ranges_is_permutation.h>
#else /* ranges_is_permutation.h expanded by -frewrite-includes */
# 1871 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_IS_PERMUTATION_H
#define _LIBCPP___ALGORITHM_RANGES_IS_PERMUTATION_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/is_permutation.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __is_permutation {
struct __fn {
  template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Proj1, class _Proj2, class _Pred>
  _LIBCPP_HIDE_FROM_ABI constexpr static bool __is_permutation_func_impl(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Pred& __pred,
      _Proj1& __proj1,
      _Proj2& __proj2) {
    return std::__is_permutation<_RangeAlgPolicy>(
        std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2), __pred, __proj1, __proj2);
  }

  template <
      forward_iterator _Iter1,
      sentinel_for<_Iter1> _Sent1,
      forward_iterator _Iter2,
      sentinel_for<_Iter2> _Sent2,
      class _Proj1                                                                              = identity,
      class _Proj2                                                                              = identity,
      indirect_equivalence_relation<projected<_Iter1, _Proj1>, projected<_Iter2, _Proj2>> _Pred = ranges::equal_to>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Pred __pred   = {},
      _Proj1 __proj1 = {},
      _Proj2 __proj2 = {}) const {
    return __is_permutation_func_impl(
        std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2), __pred, __proj1, __proj2);
  }

  template <forward_range _Range1,
            forward_range _Range2,
            class _Proj1                                                                = identity,
            class _Proj2                                                                = identity,
            indirect_equivalence_relation<projected<iterator_t<_Range1>, _Proj1>,
                                          projected<iterator_t<_Range2>, _Proj2>> _Pred = ranges::equal_to>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
      _Range1&& __range1, _Range2&& __range2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
    if constexpr (sized_range<_Range1> && sized_range<_Range2>) {
      if (ranges::distance(__range1) != ranges::distance(__range2))
        return false;
    }

    return __is_permutation_func_impl(
        ranges::begin(__range1),
        ranges::end(__range1),
        ranges::begin(__range2),
        ranges::end(__range2),
        __pred,
        __proj1,
        __proj2);
  }
};
} // namespace __is_permutation

inline namespace __cpo {
inline constexpr auto is_permutation = __is_permutation::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_IS_PERMUTATION_H
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_permutation.h" 3
#endif /* ranges_is_permutation.h expanded by -frewrite-includes */
# 1872 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_is_sorted.h expanded by -frewrite-includes */
#include <__algorithm/ranges_is_sorted.h>
#else /* ranges_is_sorted.h expanded by -frewrite-includes */
# 1872 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP__ALGORITHM_RANGES_IS_SORTED_H
#define _LIBCPP__ALGORITHM_RANGES_IS_SORTED_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_is_sorted_until.h expanded by -frewrite-includes */
#include <__algorithm/ranges_is_sorted_until.h>
#else /* ranges_is_sorted_until.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP__ALGORITHM_RANGES_IS_SORTED_UNTIL_H
#define _LIBCPP__ALGORITHM_RANGES_IS_SORTED_UNTIL_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _Iter, class _Sent, class _Proj, class _Comp>
_LIBCPP_HIDE_FROM_ABI constexpr _Iter
__is_sorted_until_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
  if (__first == __last)
    return __first;
  auto __i = __first;
  while (++__i != __last) {
    if (std::invoke(__comp, std::invoke(__proj, *__i), std::invoke(__proj, *__first)))
      return __i;
    __first = __i;
  }
  return __i;
}

namespace __is_sorted_until {
struct __fn {
  template <forward_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj                                               = identity,
            indirect_strict_weak_order<projected<_Iter, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Iter
  operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    return ranges::__is_sorted_until_impl(std::move(__first), std::move(__last), __comp, __proj);
  }

  template <forward_range _Range,
            class _Proj                                                            = identity,
            indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
  operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
    return ranges::__is_sorted_until_impl(ranges::begin(__range), ranges::end(__range), __comp, __proj);
  }
};
} // namespace __is_sorted_until

inline namespace __cpo {
inline constexpr auto is_sorted_until = __is_sorted_until::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3

#endif // _LIBCPP__ALGORITHM_RANGES_IS_SORTED_UNTIL_H
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted_until.h" 3
#endif /* ranges_is_sorted_until.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __is_sorted {
struct __fn {
  template <forward_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj                                               = identity,
            indirect_strict_weak_order<projected<_Iter, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool
  operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    return ranges::__is_sorted_until_impl(std::move(__first), __last, __comp, __proj) == __last;
  }

  template <forward_range _Range,
            class _Proj                                                            = identity,
            indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool
  operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __last = ranges::end(__range);
    return ranges::__is_sorted_until_impl(ranges::begin(__range), __last, __comp, __proj) == __last;
  }
};
} // namespace __is_sorted

inline namespace __cpo {
inline constexpr auto is_sorted = __is_sorted::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3

#endif // _LIBCPP__ALGORITHM_RANGES_IS_SORTED_H
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_is_sorted.h" 3
#endif /* ranges_is_sorted.h expanded by -frewrite-includes */
# 1873 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_is_sorted_until.h>
#endif /* expanded by -frewrite-includes */
# 1873 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1874 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_lexicographical_compare.h expanded by -frewrite-includes */
#include <__algorithm/ranges_lexicographical_compare.h>
#else /* ranges_lexicographical_compare.h expanded by -frewrite-includes */
# 1874 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_LEXICOGRAPHICAL_COMPARE_H
#define _LIBCPP___ALGORITHM_RANGES_LEXICOGRAPHICAL_COMPARE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __lexicographical_compare {
struct __fn {
  template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Proj1, class _Proj2, class _Comp>
  _LIBCPP_HIDE_FROM_ABI constexpr static bool __lexicographical_compare_impl(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Comp& __comp,
      _Proj1& __proj1,
      _Proj2& __proj2) {
    while (__first2 != __last2) {
      if (__first1 == __last1 || std::invoke(__comp, std::invoke(__proj1, *__first1), std::invoke(__proj2, *__first2)))
        return true;
      if (std::invoke(__comp, std::invoke(__proj2, *__first2), std::invoke(__proj1, *__first1)))
        return false;
      ++__first1;
      ++__first2;
    }
    return false;
  }

  template <input_iterator _Iter1,
            sentinel_for<_Iter1> _Sent1,
            input_iterator _Iter2,
            sentinel_for<_Iter2> _Sent2,
            class _Proj1                                                                           = identity,
            class _Proj2                                                                           = identity,
            indirect_strict_weak_order<projected<_Iter1, _Proj1>, projected<_Iter2, _Proj2>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Comp __comp   = {},
      _Proj1 __proj1 = {},
      _Proj2 __proj2 = {}) const {
    return __lexicographical_compare_impl(
        std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2), __comp, __proj1, __proj2);
  }

  template <input_range _Range1,
            input_range _Range2,
            class _Proj1 = identity,
            class _Proj2 = identity,
            indirect_strict_weak_order<projected<iterator_t<_Range1>, _Proj1>, projected<iterator_t<_Range2>, _Proj2>>
                _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
      _Range1&& __range1, _Range2&& __range2, _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
    return __lexicographical_compare_impl(
        ranges::begin(__range1),
        ranges::end(__range1),
        ranges::begin(__range2),
        ranges::end(__range2),
        __comp,
        __proj1,
        __proj2);
  }
};
} // namespace __lexicographical_compare

inline namespace __cpo {
inline constexpr auto lexicographical_compare = __lexicographical_compare::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 100 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_LEXICOGRAPHICAL_COMPARE_H
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lexicographical_compare.h" 3
#endif /* ranges_lexicographical_compare.h expanded by -frewrite-includes */
# 1875 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_lower_bound.h expanded by -frewrite-includes */
#include <__algorithm/ranges_lower_bound.h>
#else /* ranges_lower_bound.h expanded by -frewrite-includes */
# 1875 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_LOWER_BOUND_H
#define _LIBCPP___ALGORITHM_RANGES_LOWER_BOUND_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/lower_bound.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

namespace __lower_bound {
struct __fn {
  template <forward_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Type,
            class _Proj                                                             = identity,
            indirect_strict_weak_order<const _Type*, projected<_Iter, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Iter
  operator()(_Iter __first, _Sent __last, const _Type& __value, _Comp __comp = {}, _Proj __proj = {}) const {
    return std::__lower_bound<_RangeAlgPolicy>(__first, __last, __value, __comp, __proj);
  }

  template <forward_range _Range,
            class _Type,
            class _Proj                                                                          = identity,
            indirect_strict_weak_order<const _Type*, projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
  operator()(_Range&& __r, const _Type& __value, _Comp __comp = {}, _Proj __proj = {}) const {
    return std::__lower_bound<_RangeAlgPolicy>(ranges::begin(__r), ranges::end(__r), __value, __comp, __proj);
  }
};
} // namespace __lower_bound

inline namespace __cpo {
inline constexpr auto lower_bound = __lower_bound::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_LOWER_BOUND_H
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_lower_bound.h" 3
#endif /* ranges_lower_bound.h expanded by -frewrite-includes */
# 1876 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_make_heap.h expanded by -frewrite-includes */
#include <__algorithm/ranges_make_heap.h>
#else /* ranges_make_heap.h expanded by -frewrite-includes */
# 1876 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_MAKE_HEAP_H
#define _LIBCPP___ALGORITHM_RANGES_MAKE_HEAP_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_heap.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/sortable.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __make_heap {

struct __fn {
  template <class _Iter, class _Sent, class _Comp, class _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr static _Iter
  __make_heap_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
    auto __last_iter = ranges::next(__first, __last);

    auto&& __projected_comp = std::__make_projected(__comp, __proj);
    std::__make_heap<_RangeAlgPolicy>(std::move(__first), __last_iter, __projected_comp);

    return __last_iter;
  }

  template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<_Iter, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr _Iter
  operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    return __make_heap_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
  }

  template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<iterator_t<_Range>, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
  operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
    return __make_heap_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
  }
};

} // namespace __make_heap

inline namespace __cpo {
inline constexpr auto make_heap = __make_heap::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_MAKE_HEAP_H
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_make_heap.h" 3
#endif /* ranges_make_heap.h expanded by -frewrite-includes */
# 1877 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_max.h expanded by -frewrite-includes */
#include <__algorithm/ranges_max.h>
#else /* ranges_max.h expanded by -frewrite-includes */
# 1877 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_MAX_H
#define _LIBCPP___ALGORITHM_RANGES_MAX_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_min_element.h expanded by -frewrite-includes */
#include <__algorithm/ranges_min_element.h>
#else /* ranges_min_element.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_MIN_ELEMENT_H
#define _LIBCPP___ALGORITHM_RANGES_MIN_ELEMENT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

// TODO(ranges): `ranges::min_element` can now simply delegate to `std::__min_element`.
template <class _Ip, class _Sp, class _Proj, class _Comp>
_LIBCPP_HIDE_FROM_ABI constexpr _Ip __min_element_impl(_Ip __first, _Sp __last, _Comp& __comp, _Proj& __proj) {
  if (__first == __last)
    return __first;

  _Ip __i = __first;
  while (++__i != __last)
    if (std::invoke(__comp, std::invoke(__proj, *__i), std::invoke(__proj, *__first)))
      __first = __i;
  return __first;
}

namespace __min_element {
struct __fn {
  template <forward_iterator _Ip,
            sentinel_for<_Ip> _Sp,
            class _Proj                                             = identity,
            indirect_strict_weak_order<projected<_Ip, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Ip
  operator()(_Ip __first, _Sp __last, _Comp __comp = {}, _Proj __proj = {}) const {
    return ranges::__min_element_impl(__first, __last, __comp, __proj);
  }

  template <forward_range _Rp,
            class _Proj                                                         = identity,
            indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Rp>
  operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
    return ranges::__min_element_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
  }
};
} // namespace __min_element

inline namespace __cpo {
inline constexpr auto min_element = __min_element::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_MIN_ELEMENT_H
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min_element.h" 3
#endif /* ranges_min_element.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copyable.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3

_LIBCPP_PUSH_MACROS
#if 0 /* expanded by -frewrite-includes */
#  include <__undef_macros>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __max {
struct __fn {
  template <class _Tp,
            class _Proj                                                    = identity,
            indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr const _Tp&
  operator()(_LIBCPP_LIFETIMEBOUND const _Tp& __a,
             _LIBCPP_LIFETIMEBOUND const _Tp& __b,
             _Comp __comp = {},
             _Proj __proj = {}) const {
    return std::invoke(__comp, std::invoke(__proj, __a), std::invoke(__proj, __b)) ? __b : __a;
  }

  template <copyable _Tp,
            class _Proj                                                    = identity,
            indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Tp
  operator()(initializer_list<_Tp> __il, _Comp __comp = {}, _Proj __proj = {}) const {
    _LIBCPP_ASSERT_UNCATEGORIZED(__il.begin() != __il.end(), "initializer_list must contain at least one element");

    auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) { return std::invoke(__comp, __rhs, __lhs); };
    return *ranges::__min_element_impl(__il.begin(), __il.end(), __comp_lhs_rhs_swapped, __proj);
  }

  template <input_range _Rp,
            class _Proj                                                         = identity,
            indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
    requires indirectly_copyable_storable<iterator_t<_Rp>, range_value_t<_Rp>*>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr range_value_t<_Rp>
  operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __first = ranges::begin(__r);
    auto __last  = ranges::end(__r);

    _LIBCPP_ASSERT_UNCATEGORIZED(__first != __last, "range must contain at least one element");

    if constexpr (forward_range<_Rp> && !__is_cheap_to_copy<range_value_t<_Rp>>) {
      auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) { return std::invoke(__comp, __rhs, __lhs); };
      return *ranges::__min_element_impl(std::move(__first), std::move(__last), __comp_lhs_rhs_swapped, __proj);
    } else {
      range_value_t<_Rp> __result = *__first;
      while (++__first != __last) {
        if (std::invoke(__comp, std::invoke(__proj, __result), std::invoke(__proj, *__first)))
          __result = *__first;
      }
      return __result;
    }
  }
};
} // namespace __max

inline namespace __cpo {
inline constexpr auto max = __max::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP_STD_VER >= 20 &&
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_MAX_H
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max.h" 3
#endif /* ranges_max.h expanded by -frewrite-includes */
# 1878 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_max_element.h expanded by -frewrite-includes */
#include <__algorithm/ranges_max_element.h>
#else /* ranges_max_element.h expanded by -frewrite-includes */
# 1878 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_MAX_ELEMENT_H
#define _LIBCPP___ALGORITHM_RANGES_MAX_ELEMENT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_min_element.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __max_element {
struct __fn {
  template <forward_iterator _Ip,
            sentinel_for<_Ip> _Sp,
            class _Proj                                             = identity,
            indirect_strict_weak_order<projected<_Ip, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Ip
  operator()(_Ip __first, _Sp __last, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) { return std::invoke(__comp, __rhs, __lhs); };
    return ranges::__min_element_impl(__first, __last, __comp_lhs_rhs_swapped, __proj);
  }

  template <forward_range _Rp,
            class _Proj                                                         = identity,
            indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Rp>
  operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) { return std::invoke(__comp, __rhs, __lhs); };
    return ranges::__min_element_impl(ranges::begin(__r), ranges::end(__r), __comp_lhs_rhs_swapped, __proj);
  }
};
} // namespace __max_element

inline namespace __cpo {
inline constexpr auto max_element = __max_element::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_MAX_ELEMENT_H
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_max_element.h" 3
#endif /* ranges_max_element.h expanded by -frewrite-includes */
# 1879 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_merge.h expanded by -frewrite-includes */
#include <__algorithm/ranges_merge.h>
#else /* ranges_merge.h expanded by -frewrite-includes */
# 1879 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_MERGE_H
#define _LIBCPP___ALGORITHM_RANGES_MERGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_copy.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/mergeable.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter1, class _InIter2, class _OutIter>
using merge_result = in_in_out_result<_InIter1, _InIter2, _OutIter>;

namespace __merge {

template < class _InIter1,
           class _Sent1,
           class _InIter2,
           class _Sent2,
           class _OutIter,
           class _Comp,
           class _Proj1,
           class _Proj2>
_LIBCPP_HIDE_FROM_ABI constexpr merge_result<__remove_cvref_t<_InIter1>,
                                             __remove_cvref_t<_InIter2>,
                                             __remove_cvref_t<_OutIter>>
__merge_impl(_InIter1&& __first1,
             _Sent1&& __last1,
             _InIter2&& __first2,
             _Sent2&& __last2,
             _OutIter&& __result,
             _Comp&& __comp,
             _Proj1&& __proj1,
             _Proj2&& __proj2) {
  for (; __first1 != __last1 && __first2 != __last2; ++__result) {
    if (std::invoke(__comp, std::invoke(__proj2, *__first2), std::invoke(__proj1, *__first1))) {
      *__result = *__first2;
      ++__first2;
    } else {
      *__result = *__first1;
      ++__first1;
    }
  }
  auto __ret1 = ranges::copy(std::move(__first1), std::move(__last1), std::move(__result));
  auto __ret2 = ranges::copy(std::move(__first2), std::move(__last2), std::move(__ret1.out));
  return {std::move(__ret1.in), std::move(__ret2.in), std::move(__ret2.out)};
}

struct __fn {
  template <input_iterator _InIter1,
            sentinel_for<_InIter1> _Sent1,
            input_iterator _InIter2,
            sentinel_for<_InIter2> _Sent2,
            weakly_incrementable _OutIter,
            class _Comp  = less,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires mergeable<_InIter1, _InIter2, _OutIter, _Comp, _Proj1, _Proj2>
  _LIBCPP_HIDE_FROM_ABI constexpr merge_result<_InIter1, _InIter2, _OutIter> operator()(
      _InIter1 __first1,
      _Sent1 __last1,
      _InIter2 __first2,
      _Sent2 __last2,
      _OutIter __result,
      _Comp __comp   = {},
      _Proj1 __proj1 = {},
      _Proj2 __proj2 = {}) const {
    return __merge::__merge_impl(__first1, __last1, __first2, __last2, __result, __comp, __proj1, __proj2);
  }

  template <input_range _Range1,
            input_range _Range2,
            weakly_incrementable _OutIter,
            class _Comp  = less,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires mergeable<iterator_t<_Range1>, iterator_t<_Range2>, _OutIter, _Comp, _Proj1, _Proj2>
  _LIBCPP_HIDE_FROM_ABI constexpr merge_result<borrowed_iterator_t<_Range1>, borrowed_iterator_t<_Range2>, _OutIter>
  operator()(_Range1&& __range1,
             _Range2&& __range2,
             _OutIter __result,
             _Comp __comp   = {},
             _Proj1 __proj1 = {},
             _Proj2 __proj2 = {}) const {
    return __merge::__merge_impl(
        ranges::begin(__range1),
        ranges::end(__range1),
        ranges::begin(__range2),
        ranges::end(__range2),
        __result,
        __comp,
        __proj1,
        __proj2);
  }
};

} // namespace __merge

inline namespace __cpo {
inline constexpr auto merge = __merge::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_MERGE_H
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_merge.h" 3
#endif /* ranges_merge.h expanded by -frewrite-includes */
# 1880 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_min.h expanded by -frewrite-includes */
#include <__algorithm/ranges_min.h>
#else /* ranges_min.h expanded by -frewrite-includes */
# 1880 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_MIN_H
#define _LIBCPP___ALGORITHM_RANGES_MIN_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_min_element.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copyable.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3

_LIBCPP_PUSH_MACROS
#if 0 /* expanded by -frewrite-includes */
#  include <__undef_macros>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __min {
struct __fn {
  template <class _Tp,
            class _Proj                                                    = identity,
            indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr const _Tp&
  operator()(_LIBCPP_LIFETIMEBOUND const _Tp& __a,
             _LIBCPP_LIFETIMEBOUND const _Tp& __b,
             _Comp __comp = {},
             _Proj __proj = {}) const {
    return std::invoke(__comp, std::invoke(__proj, __b), std::invoke(__proj, __a)) ? __b : __a;
  }

  template <copyable _Tp,
            class _Proj                                                    = identity,
            indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Tp
  operator()(initializer_list<_Tp> __il, _Comp __comp = {}, _Proj __proj = {}) const {
    _LIBCPP_ASSERT_UNCATEGORIZED(__il.begin() != __il.end(), "initializer_list must contain at least one element");
    return *ranges::__min_element_impl(__il.begin(), __il.end(), __comp, __proj);
  }

  template <input_range _Rp,
            class _Proj                                                         = identity,
            indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
    requires indirectly_copyable_storable<iterator_t<_Rp>, range_value_t<_Rp>*>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr range_value_t<_Rp>
  operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __first = ranges::begin(__r);
    auto __last  = ranges::end(__r);
    _LIBCPP_ASSERT_UNCATEGORIZED(__first != __last, "range must contain at least one element");
    if constexpr (forward_range<_Rp> && !__is_cheap_to_copy<range_value_t<_Rp>>) {
      return *ranges::__min_element_impl(__first, __last, __comp, __proj);
    } else {
      range_value_t<_Rp> __result = *__first;
      while (++__first != __last) {
        if (std::invoke(__comp, std::invoke(__proj, *__first), std::invoke(__proj, __result)))
          __result = *__first;
      }
      return __result;
    }
  }
};
} // namespace __min

inline namespace __cpo {
inline constexpr auto min = __min::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP_STD_VER >= 20 &&
# 93 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_MIN_H
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_min.h" 3
#endif /* ranges_min.h expanded by -frewrite-includes */
# 1881 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_min_element.h>
#endif /* expanded by -frewrite-includes */
# 1881 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1882 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_minmax.h expanded by -frewrite-includes */
#include <__algorithm/ranges_minmax.h>
#else /* ranges_minmax.h expanded by -frewrite-includes */
# 1882 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_MINMAX_H
#define _LIBCPP___ALGORITHM_RANGES_MINMAX_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min_max_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/minmax_element.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#endif
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3

_LIBCPP_PUSH_MACROS
#if 0 /* expanded by -frewrite-includes */
#  include <__undef_macros>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
template <class _T1>
using minmax_result = min_max_result<_T1>;

namespace __minmax {
struct __fn {
  template <class _Type,
            class _Proj                                                      = identity,
            indirect_strict_weak_order<projected<const _Type*, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr ranges::minmax_result<const _Type&>
  operator()(_LIBCPP_LIFETIMEBOUND const _Type& __a,
             _LIBCPP_LIFETIMEBOUND const _Type& __b,
             _Comp __comp = {},
             _Proj __proj = {}) const {
    if (std::invoke(__comp, std::invoke(__proj, __b), std::invoke(__proj, __a)))
      return {__b, __a};
    return {__a, __b};
  }

  template <copyable _Type,
            class _Proj                                                      = identity,
            indirect_strict_weak_order<projected<const _Type*, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr ranges::minmax_result<_Type>
  operator()(initializer_list<_Type> __il, _Comp __comp = {}, _Proj __proj = {}) const {
    _LIBCPP_ASSERT_UNCATEGORIZED(__il.begin() != __il.end(), "initializer_list has to contain at least one element");
    auto __iters = std::__minmax_element_impl(__il.begin(), __il.end(), __comp, __proj);
    return ranges::minmax_result<_Type>{*__iters.first, *__iters.second};
  }

  template <input_range _Range,
            class _Proj                                                            = identity,
            indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
    requires indirectly_copyable_storable<iterator_t<_Range>, range_value_t<_Range>*>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr ranges::minmax_result<range_value_t<_Range>>
  operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __first  = ranges::begin(__r);
    auto __last   = ranges::end(__r);
    using _ValueT = range_value_t<_Range>;

    _LIBCPP_ASSERT_UNCATEGORIZED(__first != __last, "range has to contain at least one element");

    if constexpr (forward_range<_Range>) {
      // Special-case the one element case. Avoid repeatedly initializing objects from the result of an iterator
      // dereference when doing so might not be idempotent. The `if constexpr` avoids the extra branch in cases where
      // it's not needed.
      if constexpr (!same_as<remove_cvref_t<range_reference_t<_Range>>, _ValueT> ||
                    is_rvalue_reference_v<range_reference_t<_Range>>) {
        if (ranges::next(__first) == __last) {
          // During initialization, members are allowed to refer to already initialized members
          // (see http://eel.is/c++draft/dcl.init.aggr#6)
          minmax_result<_ValueT> __result = {*__first, __result.min};
          return __result;
        }
      }
      auto __result = std::__minmax_element_impl(__first, __last, __comp, __proj);
      return {*__result.first, *__result.second};
    } else {
      // input_iterators can't be copied, so the implementation for input_iterators has to store
      // the values instead of a pointer to the correct values
      auto __less = [&](auto&& __a, auto&& __b) -> bool {
        return std::invoke(__comp,
                           std::invoke(__proj, std::forward<decltype(__a)>(__a)),
                           std::invoke(__proj, std::forward<decltype(__b)>(__b)));
      };

      // During initialization, members are allowed to refer to already initialized members
      // (see http://eel.is/c++draft/dcl.init.aggr#6)
      ranges::minmax_result<_ValueT> __result = {*__first, __result.min};
      if (__first == __last || ++__first == __last)
        return __result;

      if (__less(*__first, __result.min))
        __result.min = *__first;
      else
        __result.max = *__first;

      while (++__first != __last) {
        _ValueT __i = *__first;
        if (++__first == __last) {
          if (__less(__i, __result.min))
            __result.min = __i;
          else if (!__less(__i, __result.max))
            __result.max = __i;
          return __result;
        }

        if (__less(*__first, __i)) {
          if (__less(*__first, __result.min))
            __result.min = *__first;
          if (!__less(__i, __result.max))
            __result.max = std::move(__i);
        } else {
          if (__less(__i, __result.min))
            __result.min = std::move(__i);
          if (!__less(*__first, __result.max))
            __result.max = *__first;
        }
      }
      return __result;
    }
  }
};
} // namespace __minmax

inline namespace __cpo {
inline constexpr auto minmax = __minmax::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP_STD_VER >= 20
# 158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_MINMAX_H
# 160 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax.h" 3
#endif /* ranges_minmax.h expanded by -frewrite-includes */
# 1883 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_minmax_element.h expanded by -frewrite-includes */
#include <__algorithm/ranges_minmax_element.h>
#else /* ranges_minmax_element.h expanded by -frewrite-includes */
# 1883 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_MINMAX_ELEMENT_H
#define _LIBCPP___ALGORITHM_RANGES_MINMAX_ELEMENT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min_max_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/minmax_element.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _T1>
using minmax_element_result = min_max_result<_T1>;

namespace __minmax_element {
struct __fn {
  template <forward_iterator _Ip,
            sentinel_for<_Ip> _Sp,
            class _Proj                                             = identity,
            indirect_strict_weak_order<projected<_Ip, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr ranges::minmax_element_result<_Ip>
  operator()(_Ip __first, _Sp __last, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __ret = std::__minmax_element_impl(std::move(__first), std::move(__last), __comp, __proj);
    return {__ret.first, __ret.second};
  }

  template <forward_range _Rp,
            class _Proj                                                         = identity,
            indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr ranges::minmax_element_result<borrowed_iterator_t<_Rp>>
  operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __ret = std::__minmax_element_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
    return {__ret.first, __ret.second};
  }
};
} // namespace __minmax_element

inline namespace __cpo {
inline constexpr auto minmax_element = __minmax_element::__fn{};
} // namespace __cpo

} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_MINMAX_H
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_minmax_element.h" 3
#endif /* ranges_minmax_element.h expanded by -frewrite-includes */
# 1884 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_mismatch.h>
#endif /* expanded by -frewrite-includes */
# 1884 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1885 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_move.h expanded by -frewrite-includes */
#include <__algorithm/ranges_move.h>
#else /* ranges_move.h expanded by -frewrite-includes */
# 1885 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_MOVE_H
#define _LIBCPP___ALGORITHM_RANGES_MOVE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/move.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter, class _OutIter>
using move_result = in_out_result<_InIter, _OutIter>;

namespace __move {
struct __fn {
  template <class _InIter, class _Sent, class _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr static move_result<_InIter, _OutIter>
  __move_impl(_InIter __first, _Sent __last, _OutIter __result) {
    auto __ret = std::__move<_RangeAlgPolicy>(std::move(__first), std::move(__last), std::move(__result));
    return {std::move(__ret.first), std::move(__ret.second)};
  }

  template <input_iterator _InIter, sentinel_for<_InIter> _Sent, weakly_incrementable _OutIter>
    requires indirectly_movable<_InIter, _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr move_result<_InIter, _OutIter>
  operator()(_InIter __first, _Sent __last, _OutIter __result) const {
    return __move_impl(std::move(__first), std::move(__last), std::move(__result));
  }

  template <input_range _Range, weakly_incrementable _OutIter>
    requires indirectly_movable<iterator_t<_Range>, _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr move_result<borrowed_iterator_t<_Range>, _OutIter>
  operator()(_Range&& __range, _OutIter __result) const {
    return __move_impl(ranges::begin(__range), ranges::end(__range), std::move(__result));
  }
};
} // namespace __move

inline namespace __cpo {
inline constexpr auto move = __move::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_MOVE_H
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move.h" 3
#endif /* ranges_move.h expanded by -frewrite-includes */
# 1886 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_move_backward.h expanded by -frewrite-includes */
#include <__algorithm/ranges_move_backward.h>
#else /* ranges_move_backward.h expanded by -frewrite-includes */
# 1886 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_MOVE_BACKWARD_H
#define _LIBCPP___ALGORITHM_RANGES_MOVE_BACKWARD_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/move_backward.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter, class _OutIter>
using move_backward_result = in_out_result<_InIter, _OutIter>;

namespace __move_backward {
struct __fn {
  template <class _InIter, class _Sent, class _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr static move_backward_result<_InIter, _OutIter>
  __move_backward_impl(_InIter __first, _Sent __last, _OutIter __result) {
    auto __ret = std::__move_backward<_RangeAlgPolicy>(std::move(__first), std::move(__last), std::move(__result));
    return {std::move(__ret.first), std::move(__ret.second)};
  }

  template <bidirectional_iterator _InIter, sentinel_for<_InIter> _Sent, bidirectional_iterator _OutIter>
    requires indirectly_movable<_InIter, _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr move_backward_result<_InIter, _OutIter>
  operator()(_InIter __first, _Sent __last, _OutIter __result) const {
    return __move_backward_impl(std::move(__first), std::move(__last), std::move(__result));
  }

  template <bidirectional_range _Range, bidirectional_iterator _Iter>
    requires indirectly_movable<iterator_t<_Range>, _Iter>
  _LIBCPP_HIDE_FROM_ABI constexpr move_backward_result<borrowed_iterator_t<_Range>, _Iter>
  operator()(_Range&& __range, _Iter __result) const {
    return __move_backward_impl(ranges::begin(__range), ranges::end(__range), std::move(__result));
  }
};
} // namespace __move_backward

inline namespace __cpo {
inline constexpr auto move_backward = __move_backward::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_MOVE_BACKWARD_H
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_move_backward.h" 3
#endif /* ranges_move_backward.h expanded by -frewrite-includes */
# 1887 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_next_permutation.h expanded by -frewrite-includes */
#include <__algorithm/ranges_next_permutation.h>
#else /* ranges_next_permutation.h expanded by -frewrite-includes */
# 1887 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_NEXT_PERMUTATION_H
#define _LIBCPP___ALGORITHM_RANGES_NEXT_PERMUTATION_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_found_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/next_permutation.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/sortable.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter>
using next_permutation_result = in_found_result<_InIter>;

namespace __next_permutation {

struct __fn {
  template <bidirectional_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<_Iter, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr next_permutation_result<_Iter>
  operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __result = std::__next_permutation<_RangeAlgPolicy>(
        std::move(__first), std::move(__last), std::__make_projected(__comp, __proj));
    return {std::move(__result.first), std::move(__result.second)};
  }

  template <bidirectional_range _Range, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<iterator_t<_Range>, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr next_permutation_result<borrowed_iterator_t<_Range>>
  operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __result = std::__next_permutation<_RangeAlgPolicy>(
        ranges::begin(__range), ranges::end(__range), std::__make_projected(__comp, __proj));
    return {std::move(__result.first), std::move(__result.second)};
  }
};

} // namespace __next_permutation

inline namespace __cpo {
constexpr inline auto next_permutation = __next_permutation::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_NEXT_PERMUTATION_H
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_next_permutation.h" 3
#endif /* ranges_next_permutation.h expanded by -frewrite-includes */
# 1888 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_none_of.h expanded by -frewrite-includes */
#include <__algorithm/ranges_none_of.h>
#else /* ranges_none_of.h expanded by -frewrite-includes */
# 1888 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_NONE_OF_H
#define _LIBCPP___ALGORITHM_RANGES_NONE_OF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __none_of {
struct __fn {
  template <class _Iter, class _Sent, class _Proj, class _Pred>
  _LIBCPP_HIDE_FROM_ABI constexpr static bool
  __none_of_impl(_Iter __first, _Sent __last, _Pred& __pred, _Proj& __proj) {
    for (; __first != __last; ++__first) {
      if (std::invoke(__pred, std::invoke(__proj, *__first)))
        return false;
    }
    return true;
  }

  template <input_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj = identity,
            indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool
  operator()(_Iter __first, _Sent __last, _Pred __pred = {}, _Proj __proj = {}) const {
    return __none_of_impl(std::move(__first), std::move(__last), __pred, __proj);
  }

  template <input_range _Range,
            class _Proj = identity,
            indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool
  operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
    return __none_of_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
  }
};
} // namespace __none_of

inline namespace __cpo {
inline constexpr auto none_of = __none_of::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_NONE_OF_H
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_none_of.h" 3
#endif /* ranges_none_of.h expanded by -frewrite-includes */
# 1889 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_nth_element.h expanded by -frewrite-includes */
#include <__algorithm/ranges_nth_element.h>
#else /* ranges_nth_element.h expanded by -frewrite-includes */
# 1889 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_NTH_ELEMENT_H
#define _LIBCPP___ALGORITHM_RANGES_NTH_ELEMENT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/nth_element.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/sortable.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __nth_element {

struct __fn {
  template <class _Iter, class _Sent, class _Comp, class _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr static _Iter
  __nth_element_fn_impl(_Iter __first, _Iter __nth, _Sent __last, _Comp& __comp, _Proj& __proj) {
    auto __last_iter = ranges::next(__first, __last);

    auto&& __projected_comp = std::__make_projected(__comp, __proj);
    std::__nth_element_impl<_RangeAlgPolicy>(std::move(__first), std::move(__nth), __last_iter, __projected_comp);

    return __last_iter;
  }

  template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<_Iter, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr _Iter
  operator()(_Iter __first, _Iter __nth, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    return __nth_element_fn_impl(std::move(__first), std::move(__nth), std::move(__last), __comp, __proj);
  }

  template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<iterator_t<_Range>, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
  operator()(_Range&& __r, iterator_t<_Range> __nth, _Comp __comp = {}, _Proj __proj = {}) const {
    return __nth_element_fn_impl(ranges::begin(__r), std::move(__nth), ranges::end(__r), __comp, __proj);
  }
};

} // namespace __nth_element

inline namespace __cpo {
inline constexpr auto nth_element = __nth_element::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_NTH_ELEMENT_H
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_nth_element.h" 3
#endif /* ranges_nth_element.h expanded by -frewrite-includes */
# 1890 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_partial_sort.h expanded by -frewrite-includes */
#include <__algorithm/ranges_partial_sort.h>
#else /* ranges_partial_sort.h expanded by -frewrite-includes */
# 1890 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_H
#define _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/partial_sort.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/sortable.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#endif
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __partial_sort {

struct __fn {
  template <class _Iter, class _Sent, class _Comp, class _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr static _Iter
  __partial_sort_fn_impl(_Iter __first, _Iter __middle, _Sent __last, _Comp& __comp, _Proj& __proj) {
    auto&& __projected_comp = std::__make_projected(__comp, __proj);
    return std::__partial_sort<_RangeAlgPolicy>(std::move(__first), std::move(__middle), __last, __projected_comp);
  }

  template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<_Iter, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr _Iter
  operator()(_Iter __first, _Iter __middle, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    return __partial_sort_fn_impl(std::move(__first), std::move(__middle), std::move(__last), __comp, __proj);
  }

  template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<iterator_t<_Range>, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
  operator()(_Range&& __r, iterator_t<_Range> __middle, _Comp __comp = {}, _Proj __proj = {}) const {
    return __partial_sort_fn_impl(ranges::begin(__r), std::move(__middle), ranges::end(__r), __comp, __proj);
  }
};

} // namespace __partial_sort

inline namespace __cpo {
inline constexpr auto partial_sort = __partial_sort::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_H
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort.h" 3
#endif /* ranges_partial_sort.h expanded by -frewrite-includes */
# 1891 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_partial_sort_copy.h expanded by -frewrite-includes */
#include <__algorithm/ranges_partial_sort_copy.h>
#else /* ranges_partial_sort_copy.h expanded by -frewrite-includes */
# 1891 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_COPY_H
#define _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/partial_sort_copy.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/sortable.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter, class _OutIter>
using partial_sort_copy_result = in_out_result<_InIter, _OutIter>;

namespace __partial_sort_copy {

struct __fn {
  template <input_iterator _Iter1,
            sentinel_for<_Iter1> _Sent1,
            random_access_iterator _Iter2,
            sentinel_for<_Iter2> _Sent2,
            class _Comp  = ranges::less,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_copyable<_Iter1, _Iter2> && sortable<_Iter2, _Comp, _Proj2> &&
             indirect_strict_weak_order<_Comp, projected<_Iter1, _Proj1>, projected<_Iter2, _Proj2>>
  _LIBCPP_HIDE_FROM_ABI constexpr partial_sort_copy_result<_Iter1, _Iter2> operator()(
      _Iter1 __first,
      _Sent1 __last,
      _Iter2 __result_first,
      _Sent2 __result_last,
      _Comp __comp   = {},
      _Proj1 __proj1 = {},
      _Proj2 __proj2 = {}) const {
    auto __result = std::__partial_sort_copy<_RangeAlgPolicy>(
        std::move(__first),
        std::move(__last),
        std::move(__result_first),
        std::move(__result_last),
        __comp,
        __proj1,
        __proj2);
    return {std::move(__result.first), std::move(__result.second)};
  }

  template <input_range _Range1,
            random_access_range _Range2,
            class _Comp  = ranges::less,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_copyable<iterator_t<_Range1>, iterator_t<_Range2>> &&
             sortable<iterator_t<_Range2>, _Comp, _Proj2> &&
             indirect_strict_weak_order<_Comp,
                                        projected<iterator_t<_Range1>, _Proj1>,
                                        projected<iterator_t<_Range2>, _Proj2>>
  _LIBCPP_HIDE_FROM_ABI constexpr partial_sort_copy_result<borrowed_iterator_t<_Range1>, borrowed_iterator_t<_Range2>>
  operator()(
      _Range1&& __range, _Range2&& __result_range, _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
    auto __result = std::__partial_sort_copy<_RangeAlgPolicy>(
        ranges::begin(__range),
        ranges::end(__range),
        ranges::begin(__result_range),
        ranges::end(__result_range),
        __comp,
        __proj1,
        __proj2);
    return {std::move(__result.first), std::move(__result.second)};
  }
};

} // namespace __partial_sort_copy

inline namespace __cpo {
inline constexpr auto partial_sort_copy = __partial_sort_copy::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_COPY_H
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partial_sort_copy.h" 3
#endif /* ranges_partial_sort_copy.h expanded by -frewrite-includes */
# 1892 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_partition.h expanded by -frewrite-includes */
#include <__algorithm/ranges_partition.h>
#else /* ranges_partition.h expanded by -frewrite-includes */
# 1892 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_PARTITION_H
#define _LIBCPP___ALGORITHM_RANGES_PARTITION_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/partition.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_iterator_concept.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/permutable.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __partition {

struct __fn {
  template <class _Iter, class _Sent, class _Proj, class _Pred>
  _LIBCPP_HIDE_FROM_ABI static constexpr subrange<__remove_cvref_t<_Iter>>
  __partition_fn_impl(_Iter&& __first, _Sent&& __last, _Pred&& __pred, _Proj&& __proj) {
    auto&& __projected_pred = std::__make_projected(__pred, __proj);
    auto __result           = std::__partition<_RangeAlgPolicy>(
        std::move(__first), std::move(__last), __projected_pred, __iterator_concept<_Iter>());

    return {std::move(__result.first), std::move(__result.second)};
  }

  template <permutable _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj = identity,
            indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
  _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter>
  operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const {
    return __partition_fn_impl(__first, __last, __pred, __proj);
  }

  template <forward_range _Range,
            class _Proj = identity,
            indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
    requires permutable<iterator_t<_Range>>
  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range>
  operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
    return __partition_fn_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
  }
};

} // namespace __partition

inline namespace __cpo {
inline constexpr auto partition = __partition::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_PARTITION_H
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition.h" 3
#endif /* ranges_partition.h expanded by -frewrite-includes */
# 1893 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_partition_copy.h expanded by -frewrite-includes */
#include <__algorithm/ranges_partition_copy.h>
#else /* ranges_partition_copy.h expanded by -frewrite-includes */
# 1893 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_PARTITION_COPY_H
#define _LIBCPP___ALGORITHM_RANGES_PARTITION_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter, class _OutIter1, class _OutIter2>
using partition_copy_result = in_out_out_result<_InIter, _OutIter1, _OutIter2>;

namespace __partition_copy {

struct __fn {
  // TODO(ranges): delegate to the classic algorithm.
  template <class _InIter, class _Sent, class _OutIter1, class _OutIter2, class _Proj, class _Pred>
  _LIBCPP_HIDE_FROM_ABI constexpr static partition_copy_result<__remove_cvref_t<_InIter>,
                                                               __remove_cvref_t<_OutIter1>,
                                                               __remove_cvref_t<_OutIter2> >
  __partition_copy_fn_impl(
      _InIter&& __first,
      _Sent&& __last,
      _OutIter1&& __out_true,
      _OutIter2&& __out_false,
      _Pred& __pred,
      _Proj& __proj) {
    for (; __first != __last; ++__first) {
      if (std::invoke(__pred, std::invoke(__proj, *__first))) {
        *__out_true = *__first;
        ++__out_true;

      } else {
        *__out_false = *__first;
        ++__out_false;
      }
    }

    return {std::move(__first), std::move(__out_true), std::move(__out_false)};
  }

  template <input_iterator _InIter,
            sentinel_for<_InIter> _Sent,
            weakly_incrementable _OutIter1,
            weakly_incrementable _OutIter2,
            class _Proj = identity,
            indirect_unary_predicate<projected<_InIter, _Proj>> _Pred>
    requires indirectly_copyable<_InIter, _OutIter1> && indirectly_copyable<_InIter, _OutIter2>
  _LIBCPP_HIDE_FROM_ABI constexpr partition_copy_result<_InIter, _OutIter1, _OutIter2> operator()(
      _InIter __first, _Sent __last, _OutIter1 __out_true, _OutIter2 __out_false, _Pred __pred, _Proj __proj = {})
      const {
    return __partition_copy_fn_impl(
        std::move(__first), std::move(__last), std::move(__out_true), std::move(__out_false), __pred, __proj);
  }

  template <input_range _Range,
            weakly_incrementable _OutIter1,
            weakly_incrementable _OutIter2,
            class _Proj = identity,
            indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
    requires indirectly_copyable<iterator_t<_Range>, _OutIter1> && indirectly_copyable<iterator_t<_Range>, _OutIter2>
  _LIBCPP_HIDE_FROM_ABI constexpr partition_copy_result<borrowed_iterator_t<_Range>, _OutIter1, _OutIter2>
  operator()(_Range&& __range, _OutIter1 __out_true, _OutIter2 __out_false, _Pred __pred, _Proj __proj = {}) const {
    return __partition_copy_fn_impl(
        ranges::begin(__range), ranges::end(__range), std::move(__out_true), std::move(__out_false), __pred, __proj);
  }
};

} // namespace __partition_copy

inline namespace __cpo {
inline constexpr auto partition_copy = __partition_copy::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_PARTITION_COPY_H
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_copy.h" 3
#endif /* ranges_partition_copy.h expanded by -frewrite-includes */
# 1894 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_partition_point.h expanded by -frewrite-includes */
#include <__algorithm/ranges_partition_point.h>
#else /* ranges_partition_point.h expanded by -frewrite-includes */
# 1894 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_PARTITION_POINT_H
#define _LIBCPP___ALGORITHM_RANGES_PARTITION_POINT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/half_positive.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __partition_point {

struct __fn {
  // TODO(ranges): delegate to the classic algorithm.
  template <class _Iter, class _Sent, class _Proj, class _Pred>
  _LIBCPP_HIDE_FROM_ABI constexpr static _Iter
  __partition_point_fn_impl(_Iter&& __first, _Sent&& __last, _Pred& __pred, _Proj& __proj) {
    auto __len = ranges::distance(__first, __last);

    while (__len != 0) {
      auto __half_len = std::__half_positive(__len);
      auto __mid      = ranges::next(__first, __half_len);

      if (std::invoke(__pred, std::invoke(__proj, *__mid))) {
        __first = ++__mid;
        __len -= __half_len + 1;

      } else {
        __len = __half_len;
      }
    }

    return __first;
  }

  template <forward_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj = identity,
            indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
  _LIBCPP_HIDE_FROM_ABI constexpr _Iter operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const {
    return __partition_point_fn_impl(std::move(__first), std::move(__last), __pred, __proj);
  }

  template <forward_range _Range,
            class _Proj = identity,
            indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
  operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
    return __partition_point_fn_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
  }
};

} // namespace __partition_point

inline namespace __cpo {
inline constexpr auto partition_point = __partition_point::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_PARTITION_POINT_H
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_partition_point.h" 3
#endif /* ranges_partition_point.h expanded by -frewrite-includes */
# 1895 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_pop_heap.h expanded by -frewrite-includes */
#include <__algorithm/ranges_pop_heap.h>
#else /* ranges_pop_heap.h expanded by -frewrite-includes */
# 1895 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_POP_HEAP_H
#define _LIBCPP___ALGORITHM_RANGES_POP_HEAP_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/pop_heap.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/sortable.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __pop_heap {

struct __fn {
  template <class _Iter, class _Sent, class _Comp, class _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr static _Iter
  __pop_heap_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
    auto __last_iter = ranges::next(__first, __last);
    auto __len       = __last_iter - __first;

    auto&& __projected_comp = std::__make_projected(__comp, __proj);
    std::__pop_heap<_RangeAlgPolicy>(std::move(__first), __last_iter, __projected_comp, __len);

    return __last_iter;
  }

  template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<_Iter, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr _Iter
  operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    return __pop_heap_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
  }

  template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<iterator_t<_Range>, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
  operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
    return __pop_heap_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
  }
};

} // namespace __pop_heap

inline namespace __cpo {
inline constexpr auto pop_heap = __pop_heap::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_POP_HEAP_H
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_pop_heap.h" 3
#endif /* ranges_pop_heap.h expanded by -frewrite-includes */
# 1896 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_prev_permutation.h expanded by -frewrite-includes */
#include <__algorithm/ranges_prev_permutation.h>
#else /* ranges_prev_permutation.h expanded by -frewrite-includes */
# 1896 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_PREV_PERMUTATION_H
#define _LIBCPP___ALGORITHM_RANGES_PREV_PERMUTATION_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_found_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/prev_permutation.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/sortable.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter>
using prev_permutation_result = in_found_result<_InIter>;

namespace __prev_permutation {

struct __fn {
  template <bidirectional_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<_Iter, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr prev_permutation_result<_Iter>
  operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __result = std::__prev_permutation<_RangeAlgPolicy>(
        std::move(__first), std::move(__last), std::__make_projected(__comp, __proj));
    return {std::move(__result.first), std::move(__result.second)};
  }

  template <bidirectional_range _Range, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<iterator_t<_Range>, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr prev_permutation_result<borrowed_iterator_t<_Range>>
  operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __result = std::__prev_permutation<_RangeAlgPolicy>(
        ranges::begin(__range), ranges::end(__range), std::__make_projected(__comp, __proj));
    return {std::move(__result.first), std::move(__result.second)};
  }
};

} // namespace __prev_permutation

inline namespace __cpo {
constexpr inline auto prev_permutation = __prev_permutation::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_PREV_PERMUTATION_H
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_prev_permutation.h" 3
#endif /* ranges_prev_permutation.h expanded by -frewrite-includes */
# 1897 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_push_heap.h expanded by -frewrite-includes */
#include <__algorithm/ranges_push_heap.h>
#else /* ranges_push_heap.h expanded by -frewrite-includes */
# 1897 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_PUSH_HEAP_H
#define _LIBCPP___ALGORITHM_RANGES_PUSH_HEAP_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/push_heap.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/sortable.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __push_heap {

struct __fn {
  template <class _Iter, class _Sent, class _Comp, class _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr static _Iter
  __push_heap_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
    auto __last_iter = ranges::next(__first, __last);

    auto&& __projected_comp = std::__make_projected(__comp, __proj);
    std::__push_heap<_RangeAlgPolicy>(std::move(__first), __last_iter, __projected_comp);

    return __last_iter;
  }

  template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<_Iter, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr _Iter
  operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    return __push_heap_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
  }

  template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<iterator_t<_Range>, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
  operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
    return __push_heap_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
  }
};

} // namespace __push_heap

inline namespace __cpo {
inline constexpr auto push_heap = __push_heap::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_PUSH_HEAP_H
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_push_heap.h" 3
#endif /* ranges_push_heap.h expanded by -frewrite-includes */
# 1898 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_remove.h expanded by -frewrite-includes */
#include <__algorithm/ranges_remove.h>
#else /* ranges_remove.h expanded by -frewrite-includes */
# 1898 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_REMOVE_H
#define _LIBCPP___ALGORITHM_RANGES_REMOVE_H
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 11 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_remove_if.h expanded by -frewrite-includes */
#include <__algorithm/ranges_remove_if.h>
#else /* ranges_remove_if.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_REMOVE_IF_H
#define _LIBCPP___ALGORITHM_RANGES_REMOVE_IF_H
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 11 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_find_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/permutable.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _Iter, class _Sent, class _Proj, class _Pred>
_LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter>
__remove_if_impl(_Iter __first, _Sent __last, _Pred& __pred, _Proj& __proj) {
  auto __new_end = ranges::__find_if_impl(__first, __last, __pred, __proj);
  if (__new_end == __last)
    return {__new_end, __new_end};

  _Iter __i = __new_end;
  while (++__i != __last) {
    if (!std::invoke(__pred, std::invoke(__proj, *__i))) {
      *__new_end = ranges::iter_move(__i);
      ++__new_end;
    }
  }
  return {__new_end, __i};
}

namespace __remove_if {
struct __fn {
  template <permutable _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj = identity,
            indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter>
  operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const {
    return ranges::__remove_if_impl(std::move(__first), std::move(__last), __pred, __proj);
  }

  template <forward_range _Range,
            class _Proj = identity,
            indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
    requires permutable<iterator_t<_Range>>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range>
  operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
    return ranges::__remove_if_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
  }
};
} // namespace __remove_if

inline namespace __cpo {
inline constexpr auto remove_if = __remove_if::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_IF_H
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_if.h" 3
#endif /* ranges_remove_if.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/permutable.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __remove {
struct __fn {
  template <permutable _Iter, sentinel_for<_Iter> _Sent, class _Type, class _Proj = identity>
    requires indirect_binary_predicate<ranges::equal_to, projected<_Iter, _Proj>, const _Type*>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter>
  operator()(_Iter __first, _Sent __last, const _Type& __value, _Proj __proj = {}) const {
    auto __pred = [&](auto&& __other) { return __value == __other; };
    return ranges::__remove_if_impl(std::move(__first), std::move(__last), __pred, __proj);
  }

  template <forward_range _Range, class _Type, class _Proj = identity>
    requires permutable<iterator_t<_Range>> &&
             indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _Type*>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range>
  operator()(_Range&& __range, const _Type& __value, _Proj __proj = {}) const {
    auto __pred = [&](auto&& __other) { return __value == __other; };
    return ranges::__remove_if_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
  }
};
} // namespace __remove

inline namespace __cpo {
inline constexpr auto remove = __remove::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_H
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove.h" 3
#endif /* ranges_remove.h expanded by -frewrite-includes */
# 1899 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_remove_copy.h expanded by -frewrite-includes */
#include <__algorithm/ranges_remove_copy.h>
#else /* ranges_remove_copy.h expanded by -frewrite-includes */
# 1899 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_H
#define _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_remove_copy_if.h expanded by -frewrite-includes */
#include <__algorithm/ranges_remove_copy_if.h>
#else /* ranges_remove_copy_if.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_IF_H
#define _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* remove_copy_if.h expanded by -frewrite-includes */
#include <__algorithm/remove_copy_if.h>
#else /* remove_copy_if.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_copy_if.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_REMOVE_COPY_IF_H
#define _LIBCPP___ALGORITHM_REMOVE_COPY_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_copy_if.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_copy_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_copy_if.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_copy_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _OutputIterator, class _Predicate>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
remove_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred)
{
    for (; __first != __last; ++__first)
    {
        if (!__pred(*__first))
        {
            *__result = *__first;
            ++__result;
        }
    }
    return __result;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_REMOVE_COPY_IF_H
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_copy_if.h" 3
#endif /* remove_copy_if.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter, class _OutIter>
using remove_copy_if_result = in_out_result<_InIter, _OutIter>;

template <class _InIter, class _Sent, class _OutIter, class _Proj, class _Pred>
_LIBCPP_HIDE_FROM_ABI constexpr in_out_result<_InIter, _OutIter>
__remove_copy_if_impl(_InIter __first, _Sent __last, _OutIter __result, _Pred& __pred, _Proj& __proj) {
  for (; __first != __last; ++__first) {
    if (!std::invoke(__pred, std::invoke(__proj, *__first))) {
      *__result = *__first;
      ++__result;
    }
  }
  return {std::move(__first), std::move(__result)};
}

namespace __remove_copy_if {

struct __fn {
  template <input_iterator _InIter,
            sentinel_for<_InIter> _Sent,
            weakly_incrementable _OutIter,
            class _Proj = identity,
            indirect_unary_predicate<projected<_InIter, _Proj>> _Pred>
    requires indirectly_copyable<_InIter, _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr remove_copy_if_result<_InIter, _OutIter>
  operator()(_InIter __first, _Sent __last, _OutIter __result, _Pred __pred, _Proj __proj = {}) const {
    return ranges::__remove_copy_if_impl(std::move(__first), std::move(__last), std::move(__result), __pred, __proj);
  }

  template <input_range _Range,
            weakly_incrementable _OutIter,
            class _Proj = identity,
            indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
    requires indirectly_copyable<iterator_t<_Range>, _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr remove_copy_if_result<borrowed_iterator_t<_Range>, _OutIter>
  operator()(_Range&& __range, _OutIter __result, _Pred __pred, _Proj __proj = {}) const {
    return ranges::__remove_copy_if_impl(
        ranges::begin(__range), ranges::end(__range), std::move(__result), __pred, __proj);
  }
};

} // namespace __remove_copy_if

inline namespace __cpo {
inline constexpr auto remove_copy_if = __remove_copy_if::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_IF_H
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy_if.h" 3
#endif /* ranges_remove_copy_if.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter, class _OutIter>
using remove_copy_result = in_out_result<_InIter, _OutIter>;

namespace __remove_copy {

struct __fn {
  template <input_iterator _InIter,
            sentinel_for<_InIter> _Sent,
            weakly_incrementable _OutIter,
            class _Type,
            class _Proj = identity>
    requires indirectly_copyable<_InIter, _OutIter> &&
             indirect_binary_predicate<ranges::equal_to, projected<_InIter, _Proj>, const _Type*>
  _LIBCPP_HIDE_FROM_ABI constexpr remove_copy_result<_InIter, _OutIter>
  operator()(_InIter __first, _Sent __last, _OutIter __result, const _Type& __value, _Proj __proj = {}) const {
    auto __pred = [&](auto&& __val) { return __value == __val; };
    return ranges::__remove_copy_if_impl(std::move(__first), std::move(__last), std::move(__result), __pred, __proj);
  }

  template <input_range _Range, weakly_incrementable _OutIter, class _Type, class _Proj = identity>
    requires indirectly_copyable<iterator_t<_Range>, _OutIter> &&
             indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _Type*>
  _LIBCPP_HIDE_FROM_ABI constexpr remove_copy_result<borrowed_iterator_t<_Range>, _OutIter>
  operator()(_Range&& __range, _OutIter __result, const _Type& __value, _Proj __proj = {}) const {
    auto __pred = [&](auto&& __val) { return __value == __val; };
    return ranges::__remove_copy_if_impl(
        ranges::begin(__range), ranges::end(__range), std::move(__result), __pred, __proj);
  }
};

} // namespace __remove_copy

inline namespace __cpo {
inline constexpr auto remove_copy = __remove_copy::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_H
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_remove_copy.h" 3
#endif /* ranges_remove_copy.h expanded by -frewrite-includes */
# 1900 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_remove_copy_if.h>
#endif /* expanded by -frewrite-includes */
# 1900 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1901 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_remove_if.h>
#endif /* expanded by -frewrite-includes */
# 1901 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1902 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_replace.h expanded by -frewrite-includes */
#include <__algorithm/ranges_replace.h>
#else /* ranges_replace.h expanded by -frewrite-includes */
# 1902 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_REPLACE_H
#define _LIBCPP___ALGORITHM_RANGES_REPLACE_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_replace_if.h expanded by -frewrite-includes */
#include <__algorithm/ranges_replace_if.h>
#else /* ranges_replace_if.h expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_REPLACE_IF_H
#define _LIBCPP___ALGORITHM_RANGES_REPLACE_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _Iter, class _Sent, class _Type, class _Proj, class _Pred>
_LIBCPP_HIDE_FROM_ABI constexpr _Iter
__replace_if_impl(_Iter __first, _Sent __last, _Pred& __pred, const _Type& __new_value, _Proj& __proj) {
  for (; __first != __last; ++__first) {
    if (std::invoke(__pred, std::invoke(__proj, *__first)))
      *__first = __new_value;
  }
  return __first;
}

namespace __replace_if {
struct __fn {
  template <input_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Type,
            class _Proj = identity,
            indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
    requires indirectly_writable<_Iter, const _Type&>
  _LIBCPP_HIDE_FROM_ABI constexpr _Iter
  operator()(_Iter __first, _Sent __last, _Pred __pred, const _Type& __new_value, _Proj __proj = {}) const {
    return ranges::__replace_if_impl(std::move(__first), std::move(__last), __pred, __new_value, __proj);
  }

  template <input_range _Range,
            class _Type,
            class _Proj = identity,
            indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
    requires indirectly_writable<iterator_t<_Range>, const _Type&>
  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
  operator()(_Range&& __range, _Pred __pred, const _Type& __new_value, _Proj __proj = {}) const {
    return ranges::__replace_if_impl(ranges::begin(__range), ranges::end(__range), __pred, __new_value, __proj);
  }
};
} // namespace __replace_if

inline namespace __cpo {
inline constexpr auto replace_if = __replace_if::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_IF_H
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_if.h" 3
#endif /* ranges_replace_if.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __replace {
struct __fn {
  template <input_iterator _Iter, sentinel_for<_Iter> _Sent, class _Type1, class _Type2, class _Proj = identity>
    requires indirectly_writable<_Iter, const _Type2&> &&
             indirect_binary_predicate<ranges::equal_to, projected<_Iter, _Proj>, const _Type1*>
  _LIBCPP_HIDE_FROM_ABI constexpr _Iter operator()(
      _Iter __first, _Sent __last, const _Type1& __old_value, const _Type2& __new_value, _Proj __proj = {}) const {
    auto __pred = [&](const auto& __val) { return __val == __old_value; };
    return ranges::__replace_if_impl(std::move(__first), std::move(__last), __pred, __new_value, __proj);
  }

  template <input_range _Range, class _Type1, class _Type2, class _Proj = identity>
    requires indirectly_writable<iterator_t<_Range>, const _Type2&> &&
             indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _Type1*>
  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
  operator()(_Range&& __range, const _Type1& __old_value, const _Type2& __new_value, _Proj __proj = {}) const {
    auto __pred = [&](auto&& __val) { return __val == __old_value; };
    return ranges::__replace_if_impl(ranges::begin(__range), ranges::end(__range), __pred, __new_value, __proj);
  }
};
} // namespace __replace

inline namespace __cpo {
inline constexpr auto replace = __replace::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_H
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace.h" 3
#endif /* ranges_replace.h expanded by -frewrite-includes */
# 1903 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_replace_copy.h expanded by -frewrite-includes */
#include <__algorithm/ranges_replace_copy.h>
#else /* ranges_replace_copy.h expanded by -frewrite-includes */
# 1903 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_H
#define _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_replace_copy_if.h expanded by -frewrite-includes */
#include <__algorithm/ranges_replace_copy_if.h>
#else /* ranges_replace_copy_if.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_IF_H
#define _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter, class _OutIter>
using replace_copy_if_result = in_out_result<_InIter, _OutIter>;

template <class _InIter, class _Sent, class _OutIter, class _Pred, class _Type, class _Proj>
_LIBCPP_HIDE_FROM_ABI constexpr replace_copy_if_result<_InIter, _OutIter> __replace_copy_if_impl(
    _InIter __first, _Sent __last, _OutIter __result, _Pred& __pred, const _Type& __new_value, _Proj& __proj) {
  while (__first != __last) {
    if (std::invoke(__pred, std::invoke(__proj, *__first)))
      *__result = __new_value;
    else
      *__result = *__first;

    ++__first;
    ++__result;
  }

  return {std::move(__first), std::move(__result)};
}

namespace __replace_copy_if {

struct __fn {
  template <input_iterator _InIter,
            sentinel_for<_InIter> _Sent,
            class _Type,
            output_iterator<const _Type&> _OutIter,
            class _Proj = identity,
            indirect_unary_predicate<projected<_InIter, _Proj>> _Pred>
    requires indirectly_copyable<_InIter, _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr replace_copy_if_result<_InIter, _OutIter> operator()(
      _InIter __first, _Sent __last, _OutIter __result, _Pred __pred, const _Type& __new_value, _Proj __proj = {})
      const {
    return ranges::__replace_copy_if_impl(
        std::move(__first), std::move(__last), std::move(__result), __pred, __new_value, __proj);
  }

  template <input_range _Range,
            class _Type,
            output_iterator<const _Type&> _OutIter,
            class _Proj = identity,
            indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
    requires indirectly_copyable<iterator_t<_Range>, _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr replace_copy_if_result<borrowed_iterator_t<_Range>, _OutIter>
  operator()(_Range&& __range, _OutIter __result, _Pred __pred, const _Type& __new_value, _Proj __proj = {}) const {
    return ranges::__replace_copy_if_impl(
        ranges::begin(__range), ranges::end(__range), std::move(__result), __pred, __new_value, __proj);
  }
};

} // namespace __replace_copy_if

inline namespace __cpo {
inline constexpr auto replace_copy_if = __replace_copy_if::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_IF_H
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy_if.h" 3
#endif /* ranges_replace_copy_if.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter, class _OutIter>
using replace_copy_result = in_out_result<_InIter, _OutIter>;

namespace __replace_copy {

struct __fn {
  template <input_iterator _InIter,
            sentinel_for<_InIter> _Sent,
            class _OldType,
            class _NewType,
            output_iterator<const _NewType&> _OutIter,
            class _Proj = identity>
    requires indirectly_copyable<_InIter, _OutIter> &&
             indirect_binary_predicate<ranges::equal_to, projected<_InIter, _Proj>, const _OldType*>
  _LIBCPP_HIDE_FROM_ABI constexpr replace_copy_result<_InIter, _OutIter>
  operator()(_InIter __first,
             _Sent __last,
             _OutIter __result,
             const _OldType& __old_value,
             const _NewType& __new_value,
             _Proj __proj = {}) const {
    auto __pred = [&](const auto& __value) { return __value == __old_value; };
    return ranges::__replace_copy_if_impl(
        std::move(__first), std::move(__last), std::move(__result), __pred, __new_value, __proj);
  }

  template <input_range _Range,
            class _OldType,
            class _NewType,
            output_iterator<const _NewType&> _OutIter,
            class _Proj = identity>
    requires indirectly_copyable<iterator_t<_Range>, _OutIter> &&
             indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _OldType*>
  _LIBCPP_HIDE_FROM_ABI constexpr replace_copy_result<borrowed_iterator_t<_Range>, _OutIter> operator()(
      _Range&& __range, _OutIter __result, const _OldType& __old_value, const _NewType& __new_value, _Proj __proj = {})
      const {
    auto __pred = [&](const auto& __value) { return __value == __old_value; };
    return ranges::__replace_copy_if_impl(
        ranges::begin(__range), ranges::end(__range), std::move(__result), __pred, __new_value, __proj);
  }
};

} // namespace __replace_copy

inline namespace __cpo {
inline constexpr auto replace_copy = __replace_copy::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_H
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_replace_copy.h" 3
#endif /* ranges_replace_copy.h expanded by -frewrite-includes */
# 1904 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_replace_copy_if.h>
#endif /* expanded by -frewrite-includes */
# 1904 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1905 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_replace_if.h>
#endif /* expanded by -frewrite-includes */
# 1905 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1906 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_reverse.h expanded by -frewrite-includes */
#include <__algorithm/ranges_reverse.h>
#else /* ranges_reverse.h expanded by -frewrite-includes */
# 1906 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_REVERSE_H
#define _LIBCPP___ALGORITHM_RANGES_REVERSE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/permutable.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __reverse {
struct __fn {
  template <bidirectional_iterator _Iter, sentinel_for<_Iter> _Sent>
    requires permutable<_Iter>
  _LIBCPP_HIDE_FROM_ABI constexpr _Iter operator()(_Iter __first, _Sent __last) const {
    if constexpr (random_access_iterator<_Iter>) {
      if (__first == __last)
        return __first;

      auto __end = ranges::next(__first, __last);
      auto __ret = __end;

      while (__first < --__end) {
        ranges::iter_swap(__first, __end);
        ++__first;
      }
      return __ret;
    } else {
      auto __end = ranges::next(__first, __last);
      auto __ret = __end;

      while (__first != __end) {
        if (__first == --__end)
          break;

        ranges::iter_swap(__first, __end);
        ++__first;
      }
      return __ret;
    }
  }

  template <bidirectional_range _Range>
    requires permutable<iterator_t<_Range>>
  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range> operator()(_Range&& __range) const {
    return (*this)(ranges::begin(__range), ranges::end(__range));
  }
};
} // namespace __reverse

inline namespace __cpo {
inline constexpr auto reverse = __reverse::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_REVERSE_H
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse.h" 3
#endif /* ranges_reverse.h expanded by -frewrite-includes */
# 1907 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_reverse_copy.h expanded by -frewrite-includes */
#include <__algorithm/ranges_reverse_copy.h>
#else /* ranges_reverse_copy.h expanded by -frewrite-includes */
# 1907 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_REVERSE_COPY_H
#define _LIBCPP___ALGORITHM_RANGES_REVERSE_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_copy.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter, class _OutIter>
using reverse_copy_result = in_out_result<_InIter, _OutIter>;

namespace __reverse_copy {
struct __fn {
  template <bidirectional_iterator _InIter, sentinel_for<_InIter> _Sent, weakly_incrementable _OutIter>
    requires indirectly_copyable<_InIter, _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr reverse_copy_result<_InIter, _OutIter>
  operator()(_InIter __first, _Sent __last, _OutIter __result) const {
    return (*this)(subrange(std::move(__first), std::move(__last)), std::move(__result));
  }

  template <bidirectional_range _Range, weakly_incrementable _OutIter>
    requires indirectly_copyable<iterator_t<_Range>, _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr reverse_copy_result<borrowed_iterator_t<_Range>, _OutIter>
  operator()(_Range&& __range, _OutIter __result) const {
    auto __ret = ranges::copy(std::__reverse_range(__range), std::move(__result));
    return {ranges::next(ranges::begin(__range), ranges::end(__range)), std::move(__ret.out)};
  }
};
} // namespace __reverse_copy

inline namespace __cpo {
inline constexpr auto reverse_copy = __reverse_copy::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_REVERSE_COPY_H
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_reverse_copy.h" 3
#endif /* ranges_reverse_copy.h expanded by -frewrite-includes */
# 1908 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_rotate.h expanded by -frewrite-includes */
#include <__algorithm/ranges_rotate.h>
#else /* ranges_rotate.h expanded by -frewrite-includes */
# 1908 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_ROTATE_H
#define _LIBCPP___ALGORITHM_RANGES_ROTATE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_iterator_concept.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/rotate.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/permutable.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __rotate {

struct __fn {
  template <class _Iter, class _Sent>
  _LIBCPP_HIDE_FROM_ABI constexpr static subrange<_Iter> __rotate_fn_impl(_Iter __first, _Iter __middle, _Sent __last) {
    auto __ret = std::__rotate<_RangeAlgPolicy>(std::move(__first), std::move(__middle), std::move(__last));
    return {std::move(__ret.first), std::move(__ret.second)};
  }

  template <permutable _Iter, sentinel_for<_Iter> _Sent>
  _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter> operator()(_Iter __first, _Iter __middle, _Sent __last) const {
    return __rotate_fn_impl(std::move(__first), std::move(__middle), std::move(__last));
  }

  template <forward_range _Range>
    requires permutable<iterator_t<_Range>>
  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range>
  operator()(_Range&& __range, iterator_t<_Range> __middle) const {
    return __rotate_fn_impl(ranges::begin(__range), std::move(__middle), ranges::end(__range));
  }
};

} // namespace __rotate

inline namespace __cpo {
inline constexpr auto rotate = __rotate::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_ROTATE_H
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate.h" 3
#endif /* ranges_rotate.h expanded by -frewrite-includes */
# 1909 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_rotate_copy.h expanded by -frewrite-includes */
#include <__algorithm/ranges_rotate_copy.h>
#else /* ranges_rotate_copy.h expanded by -frewrite-includes */
# 1909 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_ROTATE_COPY_H
#define _LIBCPP___ALGORITHM_RANGES_ROTATE_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_copy.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter, class _OutIter>
using rotate_copy_result = in_out_result<_InIter, _OutIter>;

namespace __rotate_copy {
struct __fn {
  template <bidirectional_iterator _InIter, sentinel_for<_InIter> _Sent, weakly_incrementable _OutIter>
    requires indirectly_copyable<_InIter, _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr rotate_copy_result<_InIter, _OutIter>
  operator()(_InIter __first, _InIter __middle, _Sent __last, _OutIter __result) const {
    auto __res1 = ranges::copy(__middle, __last, std::move(__result));
    auto __res2 = ranges::copy(__first, __middle, std::move(__res1.out));
    return {std::move(__res1.in), std::move(__res2.out)};
  }

  template <bidirectional_range _Range, weakly_incrementable _OutIter>
    requires indirectly_copyable<iterator_t<_Range>, _OutIter>
  _LIBCPP_HIDE_FROM_ABI constexpr rotate_copy_result<borrowed_iterator_t<_Range>, _OutIter>
  operator()(_Range&& __range, iterator_t<_Range> __middle, _OutIter __result) const {
    return (*this)(ranges::begin(__range), std::move(__middle), ranges::end(__range), std::move(__result));
  }
};
} // namespace __rotate_copy

inline namespace __cpo {
inline constexpr auto rotate_copy = __rotate_copy::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_ROTATE_COPY_H
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_rotate_copy.h" 3
#endif /* ranges_rotate_copy.h expanded by -frewrite-includes */
# 1910 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_sample.h expanded by -frewrite-includes */
#include <__algorithm/ranges_sample.h>
#else /* ranges_sample.h expanded by -frewrite-includes */
# 1910 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_SAMPLE_H
#define _LIBCPP___ALGORITHM_RANGES_SAMPLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* sample.h expanded by -frewrite-includes */
#include <__algorithm/sample.h>
#else /* sample.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_SAMPLE_H
#define _LIBCPP___ALGORITHM_SAMPLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* uniform_int_distribution.h expanded by -frewrite-includes */
#include <__random/uniform_int_distribution.h>
#else /* uniform_int_distribution.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANDOM_UNIFORM_INT_DISTRIBUTION_H
#define _LIBCPP___RANDOM_UNIFORM_INT_DISTRIBUTION_H

#if 0 /* expanded by -frewrite-includes */
#include <__bit/countl.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_valid.h expanded by -frewrite-includes */
#include <__random/is_valid.h>
#else /* is_valid.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANDOM_IS_VALID_H
#define _LIBCPP___RANDOM_IS_VALID_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// [rand.req.genl]/1.5:
// The effect of instantiating a template that has a template type parameter
// named IntType is undefined unless the corresponding template argument is
// cv-unqualified and is one of short, int, long, long long, unsigned short,
// unsigned int, unsigned long, or unsigned long long.

template<class> struct __libcpp_random_is_valid_inttype : false_type {};
template<> struct __libcpp_random_is_valid_inttype<int8_t> : true_type {}; // extension
template<> struct __libcpp_random_is_valid_inttype<short> : true_type {};
template<> struct __libcpp_random_is_valid_inttype<int> : true_type {};
template<> struct __libcpp_random_is_valid_inttype<long> : true_type {};
template<> struct __libcpp_random_is_valid_inttype<long long> : true_type {};
template<> struct __libcpp_random_is_valid_inttype<uint8_t> : true_type {}; // extension
template<> struct __libcpp_random_is_valid_inttype<unsigned short> : true_type {};
template<> struct __libcpp_random_is_valid_inttype<unsigned int> : true_type {};
template<> struct __libcpp_random_is_valid_inttype<unsigned long> : true_type {};
template<> struct __libcpp_random_is_valid_inttype<unsigned long long> : true_type {};

#ifndef _LIBCPP_HAS_NO_INT128
template<> struct __libcpp_random_is_valid_inttype<__int128_t> : true_type {}; // extension
template<> struct __libcpp_random_is_valid_inttype<__uint128_t> : true_type {}; // extension
#endif // _LIBCPP_HAS_NO_INT128
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3

// [rand.req.urng]/3:
// A class G meets the uniform random bit generator requirements if G models
// uniform_random_bit_generator, invoke_result_t<G&> is an unsigned integer type,
// and G provides a nested typedef-name result_type that denotes the same type
// as invoke_result_t<G&>.
// (In particular, reject URNGs with signed result_types; our distributions cannot
// handle such generator types.)

template<class, class = void> struct __libcpp_random_is_valid_urng : false_type {};
template<class _Gp> struct __libcpp_random_is_valid_urng<_Gp, __enable_if_t<
    is_unsigned<typename _Gp::result_type>::value &&
    _IsSame<decltype(std::declval<_Gp&>()()), typename _Gp::result_type>::value
> > : true_type {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANDOM_IS_VALID_H
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/is_valid.h" 3
#endif /* is_valid.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* log2.h expanded by -frewrite-includes */
#include <__random/log2.h>
#else /* log2.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/log2.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANDOM_LOG2_H
#define _LIBCPP___RANDOM_LOG2_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/log2.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/log2.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/log2.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/log2.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/log2.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/log2.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/log2.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/log2.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/log2.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _UIntType, _UIntType _Xp, size_t _Rp>
struct __log2_imp;

template <unsigned long long _Xp, size_t _Rp>
struct __log2_imp<unsigned long long, _Xp, _Rp>
{
    static const size_t value = _Xp & ((unsigned long long)(1) << _Rp) ? _Rp
                                           : __log2_imp<unsigned long long, _Xp, _Rp - 1>::value;
};

template <unsigned long long _Xp>
struct __log2_imp<unsigned long long, _Xp, 0>
{
    static const size_t value = 0;
};

template <size_t _Rp>
struct __log2_imp<unsigned long long, 0, _Rp>
{
    static const size_t value = _Rp + 1;
};

#ifndef _LIBCPP_HAS_NO_INT128

template <__uint128_t _Xp, size_t _Rp>
struct __log2_imp<__uint128_t, _Xp, _Rp>
{
    static const size_t value = (_Xp >> 64)
        ? (64 + __log2_imp<unsigned long long, (_Xp >> 64), 63>::value)
        : __log2_imp<unsigned long long, _Xp, 63>::value;
};

#endif // _LIBCPP_HAS_NO_INT128
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/log2.h" 3

template <class _UIntType, _UIntType _Xp>
struct __log2
{
    static const size_t value = __log2_imp<
#ifndef _LIBCPP_HAS_NO_INT128
        __conditional_t<sizeof(_UIntType) <= sizeof(unsigned long long), unsigned long long, __uint128_t>,
#else
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/log2.h" 3
        unsigned long long,
#endif // _LIBCPP_HAS_NO_INT128
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/log2.h" 3
        _Xp,
        sizeof(_UIntType) * __CHAR_BIT__ - 1>::value;
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANDOM_LOG2_H
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/log2.h" 3
#endif /* log2.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template<class _Engine, class _UIntType>
class __independent_bits_engine
{
public:
    // types
    typedef _UIntType result_type;

private:
    typedef typename _Engine::result_type _Engine_result_type;
    typedef __conditional_t<sizeof(_Engine_result_type) <= sizeof(result_type), result_type, _Engine_result_type>
        _Working_result_type;

    _Engine& __e_;
    size_t __w_;
    size_t __w0_;
    size_t __n_;
    size_t __n0_;
    _Working_result_type __y0_;
    _Working_result_type __y1_;
    _Engine_result_type __mask0_;
    _Engine_result_type __mask1_;

#ifdef _LIBCPP_CXX03_LANG
    static const _Working_result_type _Rp = _Engine::_Max - _Engine::_Min
                                          + _Working_result_type(1);
#else
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
    static _LIBCPP_CONSTEXPR const _Working_result_type _Rp = _Engine::max() - _Engine::min()
                                                      + _Working_result_type(1);
#endif
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
    static _LIBCPP_CONSTEXPR const size_t __m = __log2<_Working_result_type, _Rp>::value;
    static _LIBCPP_CONSTEXPR const size_t _WDt = numeric_limits<_Working_result_type>::digits;
    static _LIBCPP_CONSTEXPR const size_t _EDt = numeric_limits<_Engine_result_type>::digits;

public:
    // constructors and seeding functions
    _LIBCPP_HIDE_FROM_ABI __independent_bits_engine(_Engine& __e, size_t __w);

    // generating functions
    _LIBCPP_HIDE_FROM_ABI result_type operator()() {return __eval(integral_constant<bool, _Rp != 0>());}

private:
    _LIBCPP_HIDE_FROM_ABI result_type __eval(false_type);
    _LIBCPP_HIDE_FROM_ABI result_type __eval(true_type);
};

template<class _Engine, class _UIntType>
__independent_bits_engine<_Engine, _UIntType>
    ::__independent_bits_engine(_Engine& __e, size_t __w)
        : __e_(__e),
          __w_(__w)
{
    __n_ = __w_ / __m + (__w_ % __m != 0);
    __w0_ = __w_ / __n_;
    if (_Rp == 0)
        __y0_ = _Rp;
    else if (__w0_ < _WDt)
        __y0_ = (_Rp >> __w0_) << __w0_;
    else
        __y0_ = 0;
    if (_Rp - __y0_ > __y0_ / __n_)
    {
        ++__n_;
        __w0_ = __w_ / __n_;
        if (__w0_ < _WDt)
            __y0_ = (_Rp >> __w0_) << __w0_;
        else
            __y0_ = 0;
    }
    __n0_ = __n_ - __w_ % __n_;
    if (__w0_ < _WDt - 1)
        __y1_ = (_Rp >> (__w0_ + 1)) << (__w0_ + 1);
    else
        __y1_ = 0;
    __mask0_ = __w0_ > 0 ? _Engine_result_type(~0) >> (_EDt - __w0_) :
                          _Engine_result_type(0);
    __mask1_ = __w0_ < _EDt - 1 ?
                               _Engine_result_type(~0) >> (_EDt - (__w0_ + 1)) :
                               _Engine_result_type(~0);
}

template<class _Engine, class _UIntType>
inline
_UIntType
__independent_bits_engine<_Engine, _UIntType>::__eval(false_type)
{
    return static_cast<result_type>(__e_() & __mask0_);
}

template<class _Engine, class _UIntType>
_UIntType
__independent_bits_engine<_Engine, _UIntType>::__eval(true_type)
{
    const size_t __w_rt = numeric_limits<result_type>::digits;
    result_type __sp = 0;
    for (size_t __k = 0; __k < __n0_; ++__k)
    {
        _Engine_result_type __u;
        do
        {
            __u = __e_() - _Engine::min();
        } while (__u >= __y0_);
        if (__w0_ < __w_rt)
            __sp <<= __w0_;
        else
            __sp = 0;
        __sp += __u & __mask0_;
    }
    for (size_t __k = __n0_; __k < __n_; ++__k)
    {
        _Engine_result_type __u;
        do
        {
            __u = __e_() - _Engine::min();
        } while (__u >= __y1_);
        if (__w0_ < __w_rt - 1)
            __sp <<= __w0_ + 1;
        else
            __sp = 0;
        __sp += __u & __mask1_;
    }
    return __sp;
}

template<class _IntType = int>
class uniform_int_distribution
{
    static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
public:
    // types
    typedef _IntType result_type;

    class param_type
    {
        result_type __a_;
        result_type __b_;
    public:
        typedef uniform_int_distribution distribution_type;

        _LIBCPP_HIDE_FROM_ABI explicit param_type(result_type __a = 0,
                            result_type __b = numeric_limits<result_type>::max())
            : __a_(__a), __b_(__b) {}

        _LIBCPP_HIDE_FROM_ABI result_type a() const {return __a_;}
        _LIBCPP_HIDE_FROM_ABI result_type b() const {return __b_;}

        _LIBCPP_HIDE_FROM_ABI
        friend bool operator==(const param_type& __x, const param_type& __y)
            {return __x.__a_ == __y.__a_ && __x.__b_ == __y.__b_;}
        _LIBCPP_HIDE_FROM_ABI
        friend bool operator!=(const param_type& __x, const param_type& __y)
            {return !(__x == __y);}
    };

private:
    param_type __p_;

public:
    // constructors and reset functions
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI uniform_int_distribution() : uniform_int_distribution(0) {}
    _LIBCPP_HIDE_FROM_ABI explicit uniform_int_distribution(
        result_type __a, result_type __b = numeric_limits<result_type>::max())
        : __p_(param_type(__a, __b)) {}
#else
# 196 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
    explicit uniform_int_distribution(
        result_type __a = 0,
        result_type __b = numeric_limits<result_type>::max())
        : __p_(param_type(__a, __b)) {}
#endif
# 201 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
    _LIBCPP_HIDE_FROM_ABI explicit uniform_int_distribution(const param_type& __p) : __p_(__p) {}
    _LIBCPP_HIDE_FROM_ABI void reset() {}

    // generating functions
    template<class _URNG>
    _LIBCPP_HIDE_FROM_ABI result_type operator()(_URNG& __g)
        {return (*this)(__g, __p_);}
    template<class _URNG>
    _LIBCPP_HIDE_FROM_ABI result_type operator()(_URNG& __g, const param_type& __p);

    // property functions
    _LIBCPP_HIDE_FROM_ABI result_type a() const {return __p_.a();}
    _LIBCPP_HIDE_FROM_ABI result_type b() const {return __p_.b();}

    _LIBCPP_HIDE_FROM_ABI param_type param() const {return __p_;}
    _LIBCPP_HIDE_FROM_ABI void param(const param_type& __p) {__p_ = __p;}

    _LIBCPP_HIDE_FROM_ABI result_type min() const {return a();}
    _LIBCPP_HIDE_FROM_ABI result_type max() const {return b();}

    _LIBCPP_HIDE_FROM_ABI
    friend bool operator==(const uniform_int_distribution& __x,
                           const uniform_int_distribution& __y)
        {return __x.__p_ == __y.__p_;}
    _LIBCPP_HIDE_FROM_ABI
    friend bool operator!=(const uniform_int_distribution& __x,
                           const uniform_int_distribution& __y)
            {return !(__x == __y);}
};

template<class _IntType>
template<class _URNG>
typename uniform_int_distribution<_IntType>::result_type
uniform_int_distribution<_IntType>::operator()(_URNG& __g, const param_type& __p)
_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
{
    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
    typedef __conditional_t<sizeof(result_type) <= sizeof(uint32_t), uint32_t, __make_unsigned_t<result_type> >
        _UIntType;
    const _UIntType __rp = _UIntType(__p.b()) - _UIntType(__p.a()) + _UIntType(1);
    if (__rp == 1)
        return __p.a();
    const size_t __dt = numeric_limits<_UIntType>::digits;
    typedef __independent_bits_engine<_URNG, _UIntType> _Eng;
    if (__rp == 0)
        return static_cast<result_type>(_Eng(__g, __dt)());
    size_t __w = __dt - std::__countl_zero(__rp) - 1;
    if ((__rp & (numeric_limits<_UIntType>::max() >> (__dt - __w))) != 0)
        ++__w;
    _Eng __e(__g, __w);
    _UIntType __u;
    do
    {
        __u = __e();
    } while (__u >= __rp);
    return static_cast<result_type>(__u + __p.a());
}

template <class _CharT, class _Traits, class _IT>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
           const uniform_int_distribution<_IT>& __x)
{
    __save_flags<_CharT, _Traits> __lx(__os);
    typedef basic_ostream<_CharT, _Traits> _Ostream;
    __os.flags(_Ostream::dec | _Ostream::left);
    _CharT __sp = __os.widen(' ');
    __os.fill(__sp);
    return __os << __x.a() << __sp << __x.b();
}

template <class _CharT, class _Traits, class _IT>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
           uniform_int_distribution<_IT>& __x)
{
    typedef uniform_int_distribution<_IT> _Eng;
    typedef typename _Eng::result_type result_type;
    typedef typename _Eng::param_type param_type;
    __save_flags<_CharT, _Traits> __lx(__is);
    typedef basic_istream<_CharT, _Traits> _Istream;
    __is.flags(_Istream::dec | _Istream::skipws);
    result_type __a;
    result_type __b;
    __is >> __a >> __b;
    if (!__is.fail())
        __x.param(param_type(__a, __b));
    return __is;
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___RANDOM_UNIFORM_INT_DISTRIBUTION_H
# 296 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_int_distribution.h" 3
#endif /* uniform_int_distribution.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy,
          class _PopulationIterator, class _PopulationSentinel, class _SampleIterator, class _Distance,
          class _UniformRandomNumberGenerator>
_LIBCPP_INLINE_VISIBILITY
_SampleIterator __sample(_PopulationIterator __first,
                         _PopulationSentinel __last, _SampleIterator __output_iter,
                         _Distance __n,
                         _UniformRandomNumberGenerator& __g,
                         input_iterator_tag) {

  _Distance __k = 0;
  for (; __first != __last && __k < __n; ++__first, (void) ++__k)
    __output_iter[__k] = *__first;
  _Distance __sz = __k;
  for (; __first != __last; ++__first, (void) ++__k) {
    _Distance __r = uniform_int_distribution<_Distance>(0, __k)(__g);
    if (__r < __sz)
      __output_iter[__r] = *__first;
  }
  return __output_iter + _VSTD::min(__n, __k);
}

template <class _AlgPolicy,
          class _PopulationIterator, class _PopulationSentinel, class _SampleIterator, class _Distance,
          class _UniformRandomNumberGenerator>
_LIBCPP_INLINE_VISIBILITY
_SampleIterator __sample(_PopulationIterator __first,
                         _PopulationSentinel __last, _SampleIterator __output_iter,
                         _Distance __n,
                         _UniformRandomNumberGenerator& __g,
                         forward_iterator_tag) {
  _Distance __unsampled_sz = _IterOps<_AlgPolicy>::distance(__first, __last);
  for (__n = _VSTD::min(__n, __unsampled_sz); __n != 0; ++__first) {
    _Distance __r = uniform_int_distribution<_Distance>(0, --__unsampled_sz)(__g);
    if (__r < __n) {
      *__output_iter++ = *__first;
      --__n;
    }
  }
  return __output_iter;
}

template <class _AlgPolicy,
          class _PopulationIterator, class _PopulationSentinel, class _SampleIterator, class _Distance,
          class _UniformRandomNumberGenerator>
_LIBCPP_INLINE_VISIBILITY
_SampleIterator __sample(_PopulationIterator __first,
                         _PopulationSentinel __last, _SampleIterator __output_iter,
                         _Distance __n, _UniformRandomNumberGenerator& __g) {
  _LIBCPP_ASSERT_UNCATEGORIZED(__n >= 0, "N must be a positive number.");

  using _PopIterCategory = typename _IterOps<_AlgPolicy>::template __iterator_category<_PopulationIterator>;
  using _Difference = typename _IterOps<_AlgPolicy>::template __difference_type<_PopulationIterator>;
  using _CommonType = typename common_type<_Distance, _Difference>::type;

  return std::__sample<_AlgPolicy>(
      std::move(__first), std::move(__last), std::move(__output_iter), _CommonType(__n),
      __g, _PopIterCategory());
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
template <class _PopulationIterator, class _SampleIterator, class _Distance,
          class _UniformRandomNumberGenerator>
inline _LIBCPP_INLINE_VISIBILITY
_SampleIterator sample(_PopulationIterator __first,
                       _PopulationIterator __last, _SampleIterator __output_iter,
                       _Distance __n, _UniformRandomNumberGenerator&& __g) {
  static_assert(__has_forward_iterator_category<_PopulationIterator>::value ||
                __has_random_access_iterator_category<_SampleIterator>::value,
                "SampleIterator must meet the requirements of RandomAccessIterator");

  return std::__sample<_ClassicAlgPolicy>(
      std::move(__first), std::move(__last), std::move(__output_iter), __n, __g);
}

#endif // _LIBCPP_STD_VER >= 17
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_SAMPLE_H
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/sample.h" 3
#endif /* sample.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* uniform_random_bit_generator_adaptor.h expanded by -frewrite-includes */
#include <__algorithm/uniform_random_bit_generator_adaptor.h>
#else /* uniform_random_bit_generator_adaptor.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/uniform_random_bit_generator_adaptor.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_UNIFORM_RANDOM_BIT_GENERATOR_ADAPTOR_H
#define _LIBCPP___ALGORITHM_RANGES_UNIFORM_RANDOM_BIT_GENERATOR_ADAPTOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/uniform_random_bit_generator_adaptor.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/uniform_random_bit_generator_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/uniform_random_bit_generator_adaptor.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/uniform_random_bit_generator_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/uniform_random_bit_generator_adaptor.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/uniform_random_bit_generator_adaptor.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/uniform_random_bit_generator_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/uniform_random_bit_generator_adaptor.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/uniform_random_bit_generator_adaptor.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/uniform_random_bit_generator_adaptor.h" 3

_LIBCPP_PUSH_MACROS
#if 0 /* expanded by -frewrite-includes */
#include <__undef_macros>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/uniform_random_bit_generator_adaptor.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/uniform_random_bit_generator_adaptor.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Range versions of random algorithms (e.g. `std::shuffle`) are less constrained than their classic counterparts.
// Range algorithms only require the given generator to satisfy the `std::uniform_random_bit_generator` concept.
// Classic algorithms require the given generator to meet the uniform random bit generator requirements; these
// requirements include satisfying `std::uniform_random_bit_generator` and add a requirement for the generator to
// provide a nested `result_type` typedef (see `[rand.req.urng]`).
//
// To be able to reuse classic implementations, make the given generator meet the classic requirements by wrapping
// it into an adaptor type that forwards all of its interface and adds the required typedef.
template <class _Gen>
class _ClassicGenAdaptor {
private:
  // The generator is not required to be copyable or movable, so it has to be stored as a reference.
  _Gen& __gen_;

public:
  using result_type = invoke_result_t<_Gen&>;

  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto min() { return __remove_cvref_t<_Gen>::min(); }
  _LIBCPP_HIDE_FROM_ABI
  static constexpr auto max() { return __remove_cvref_t<_Gen>::max(); }

  _LIBCPP_HIDE_FROM_ABI
  constexpr explicit _ClassicGenAdaptor(_Gen& __g) : __gen_(__g) {}

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()() const { return __gen_(); }
};

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP_STD_VER >= 20
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/uniform_random_bit_generator_adaptor.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_UNIFORM_RANDOM_BIT_GENERATOR_ADAPTOR_H
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/uniform_random_bit_generator_adaptor.h" 3
#endif /* uniform_random_bit_generator_adaptor.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* uniform_random_bit_generator.h expanded by -frewrite-includes */
#include <__random/uniform_random_bit_generator.h>
#else /* uniform_random_bit_generator.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANDOM_UNIFORM_RANDOM_BIT_GENERATOR_H
#define _LIBCPP___RANDOM_UNIFORM_RANDOM_BIT_GENERATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/invocable.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3

// [rand.req.urng]
template<class _Gen>
concept uniform_random_bit_generator =
  invocable<_Gen&> && unsigned_integral<invoke_result_t<_Gen&>> &&
  requires {
    { _Gen::min() } -> same_as<invoke_result_t<_Gen&>>;
    { _Gen::max() } -> same_as<invoke_result_t<_Gen&>>;
    requires bool_constant<(_Gen::min() < _Gen::max())>::value;
  };

#endif // _LIBCPP_STD_VER >= 20
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___RANDOM_UNIFORM_RANDOM_BIT_GENERATOR_H
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__random/uniform_random_bit_generator.h" 3
#endif /* uniform_random_bit_generator.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __sample {

struct __fn {
  template <input_iterator _Iter, sentinel_for<_Iter> _Sent, weakly_incrementable _OutIter, class _Gen>
    requires(forward_iterator<_Iter> || random_access_iterator<_OutIter>) && indirectly_copyable<_Iter, _OutIter> &&
            uniform_random_bit_generator<remove_reference_t<_Gen>>
  _LIBCPP_HIDE_FROM_ABI _OutIter
  operator()(_Iter __first, _Sent __last, _OutIter __out_first, iter_difference_t<_Iter> __n, _Gen&& __gen) const {
    _ClassicGenAdaptor<_Gen> __adapted_gen(__gen);
    return std::__sample<_RangeAlgPolicy>(
        std::move(__first), std::move(__last), std::move(__out_first), __n, __adapted_gen);
  }

  template <input_range _Range, weakly_incrementable _OutIter, class _Gen>
    requires(forward_range<_Range> || random_access_iterator<_OutIter>) &&
            indirectly_copyable<iterator_t<_Range>, _OutIter> && uniform_random_bit_generator<remove_reference_t<_Gen>>
  _LIBCPP_HIDE_FROM_ABI _OutIter
  operator()(_Range&& __range, _OutIter __out_first, range_difference_t<_Range> __n, _Gen&& __gen) const {
    return (*this)(
        ranges::begin(__range), ranges::end(__range), std::move(__out_first), __n, std::forward<_Gen>(__gen));
  }
};

} // namespace __sample

inline namespace __cpo {
inline constexpr auto sample = __sample::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_SAMPLE_H
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sample.h" 3
#endif /* ranges_sample.h expanded by -frewrite-includes */
# 1911 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_search.h expanded by -frewrite-includes */
#include <__algorithm/ranges_search.h>
#else /* ranges_search.h expanded by -frewrite-includes */
# 1911 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_SEARCH_H
#define _LIBCPP___ALGORITHM_RANGES_SEARCH_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/search.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/indirectly_comparable.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __search {
struct __fn {
  template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Pred, class _Proj1, class _Proj2>
  _LIBCPP_HIDE_FROM_ABI static constexpr subrange<_Iter1> __ranges_search_impl(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Pred& __pred,
      _Proj1& __proj1,
      _Proj2& __proj2) {
    if constexpr (sized_sentinel_for<_Sent2, _Iter2>) {
      auto __size2 = ranges::distance(__first2, __last2);
      if (__size2 == 0)
        return {__first1, __first1};

      if constexpr (sized_sentinel_for<_Sent1, _Iter1>) {
        auto __size1 = ranges::distance(__first1, __last1);
        if (__size1 < __size2) {
          ranges::advance(__first1, __last1);
          return {__first1, __first1};
        }

        if constexpr (random_access_iterator<_Iter1> && random_access_iterator<_Iter2>) {
          auto __ret = std::__search_random_access_impl<_RangeAlgPolicy>(
              __first1, __last1, __first2, __last2, __pred, __proj1, __proj2, __size1, __size2);
          return {__ret.first, __ret.second};
        }
      }
    }

    auto __ret =
        std::__search_forward_impl<_RangeAlgPolicy>(__first1, __last1, __first2, __last2, __pred, __proj1, __proj2);
    return {__ret.first, __ret.second};
  }

  template <forward_iterator _Iter1,
            sentinel_for<_Iter1> _Sent1,
            forward_iterator _Iter2,
            sentinel_for<_Iter2> _Sent2,
            class _Pred  = ranges::equal_to,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter1> operator()(
      _Iter1 __first1,
      _Sent1 __last1,
      _Iter2 __first2,
      _Sent2 __last2,
      _Pred __pred   = {},
      _Proj1 __proj1 = {},
      _Proj2 __proj2 = {}) const {
    return __ranges_search_impl(__first1, __last1, __first2, __last2, __pred, __proj1, __proj2);
  }

  template <forward_range _Range1,
            forward_range _Range2,
            class _Pred  = ranges::equal_to,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range1> operator()(
      _Range1&& __range1, _Range2&& __range2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
    auto __first1 = ranges::begin(__range1);
    if constexpr (sized_range<_Range2>) {
      auto __size2 = ranges::size(__range2);
      if (__size2 == 0)
        return {__first1, __first1};
      if constexpr (sized_range<_Range1>) {
        auto __size1 = ranges::size(__range1);
        if (__size1 < __size2) {
          ranges::advance(__first1, ranges::end(__range1));
          return {__first1, __first1};
        }
      }
    }

    return __ranges_search_impl(
        ranges::begin(__range1),
        ranges::end(__range1),
        ranges::begin(__range2),
        ranges::end(__range2),
        __pred,
        __proj1,
        __proj2);
  }
};
} // namespace __search

inline namespace __cpo {
inline constexpr auto search = __search::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_SEARCH_H
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search.h" 3
#endif /* ranges_search.h expanded by -frewrite-includes */
# 1912 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_search_n.h expanded by -frewrite-includes */
#include <__algorithm/ranges_search_n.h>
#else /* ranges_search_n.h expanded by -frewrite-includes */
# 1912 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_SEARCH_N_H
#define _LIBCPP___ALGORITHM_RANGES_SEARCH_N_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* search_n.h expanded by -frewrite-includes */
#include <__algorithm/search_n.h>
#else /* search_n.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_SEARCH_N_H
#define _LIBCPP___ALGORITHM_SEARCH_N_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_callable.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/convert_to_integral.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Pred, class _Iter, class _Sent, class _SizeT, class _Type, class _Proj>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter, _Iter> __search_n_forward_impl(_Iter __first, _Sent __last,
                                           _SizeT __count,
                                           const _Type& __value,
                                           _Pred& __pred,
                                           _Proj& __proj) {
  if (__count <= 0)
    return std::make_pair(__first, __first);
  while (true) {
    // Find first element in sequence that matchs __value, with a mininum of loop checks
    while (true) {
      if (__first == __last) { // return __last if no element matches __value
        _IterOps<_AlgPolicy>::__advance_to(__first, __last);
        return std::make_pair(__first, __first);
      }
      if (std::__invoke(__pred, std::__invoke(__proj, *__first), __value))
        break;
      ++__first;
    }
    // *__first matches __value, now match elements after here
    _Iter __m = __first;
    _SizeT __c(0);
    while (true) {
      if (++__c == __count) // If pattern exhausted, __first is the answer (works for 1 element pattern)
        return std::make_pair(__first, ++__m);
      if (++__m == __last) { // Otherwise if source exhaused, pattern not found
        _IterOps<_AlgPolicy>::__advance_to(__first, __last);
        return std::make_pair(__first, __first);
      }

      // if there is a mismatch, restart with a new __first
      if (!std::__invoke(__pred, std::__invoke(__proj, *__m), __value))
      {
        __first = __m;
        ++__first;
        break;
      } // else there is a match, check next elements
    }
  }
}

template <class _AlgPolicy, class _Pred, class _Iter, class _Sent, class _SizeT, class _Type, class _Proj, class _DiffT>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
std::pair<_Iter, _Iter> __search_n_random_access_impl(_Iter __first, _Sent __last,
                                                      _SizeT __count,
                                                      const _Type& __value,
                                                      _Pred& __pred,
                                                      _Proj& __proj,
                                                      _DiffT __size1) {
  using difference_type = typename iterator_traits<_Iter>::difference_type;
  if (__count == 0)
    return std::make_pair(__first, __first);
  if (__size1 < static_cast<_DiffT>(__count)) {
    _IterOps<_AlgPolicy>::__advance_to(__first, __last);
    return std::make_pair(__first, __first);
  }

  const auto __s = __first + __size1 - difference_type(__count - 1); // Start of pattern match can't go beyond here
  while (true) {
    // Find first element in sequence that matchs __value, with a mininum of loop checks
    while (true) {
      if (__first >= __s) { // return __last if no element matches __value
        _IterOps<_AlgPolicy>::__advance_to(__first, __last);
        return std::make_pair(__first, __first);
      }
      if (std::__invoke(__pred, std::__invoke(__proj, *__first), __value))
        break;
      ++__first;
    }
    // *__first matches __value_, now match elements after here
    auto __m = __first;
    _SizeT __c(0);
    while (true) {
      if (++__c == __count) // If pattern exhausted, __first is the answer (works for 1 element pattern)
        return std::make_pair(__first, __first + _DiffT(__count));
      ++__m; // no need to check range on __m because __s guarantees we have enough source

      // if there is a mismatch, restart with a new __first
      if (!std::__invoke(__pred, std::__invoke(__proj, *__m), __value))
      {
        __first = __m;
        ++__first;
        break;
      } // else there is a match, check next elements
    }
  }
}

template <class _Iter, class _Sent,
          class _DiffT,
          class _Type,
          class _Pred,
          class _Proj>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter, _Iter> __search_n_impl(_Iter __first, _Sent __last,
                                   _DiffT __count,
                                   const _Type& __value,
                                   _Pred& __pred,
                                   _Proj& __proj,
                                   __enable_if_t<__has_random_access_iterator_category<_Iter>::value>* = nullptr) {
  return std::__search_n_random_access_impl<_ClassicAlgPolicy>(__first, __last,
                                                               __count,
                                                               __value,
                                                               __pred,
                                                               __proj,
                                                               __last - __first);
}

template <class _Iter1, class _Sent1,
          class _DiffT,
          class _Type,
          class _Pred,
          class _Proj>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
pair<_Iter1, _Iter1> __search_n_impl(_Iter1 __first, _Sent1 __last,
                                     _DiffT __count,
                                     const _Type& __value,
                                     _Pred& __pred,
                                     _Proj& __proj,
                                     __enable_if_t<__has_forward_iterator_category<_Iter1>::value
                                               && !__has_random_access_iterator_category<_Iter1>::value>* = nullptr) {
  return std::__search_n_forward_impl<_ClassicAlgPolicy>(__first, __last,
                                                         __count,
                                                         __value,
                                                         __pred,
                                                         __proj);
}

template <class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last,
                          _Size __count,
                          const _Tp& __value,
                          _BinaryPredicate __pred) {
  static_assert(__is_callable<_BinaryPredicate, decltype(*__first), const _Tp&>::value,
                "BinaryPredicate has to be callable");
  auto __proj = __identity();
  return std::__search_n_impl(__first, __last, std::__convert_to_integral(__count), __value, __pred, __proj).first;
}

template <class _ForwardIterator, class _Size, class _Tp>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
_ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last, _Size __count, const _Tp& __value) {
  return std::search_n(__first, __last, std::__convert_to_integral(__count), __value, __equal_to());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_SEARCH_N_H
# 183 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/search_n.h" 3
#endif /* search_n.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/indirectly_comparable.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __search_n {
struct __fn {
  template <class _Iter1, class _Sent1, class _SizeT, class _Type, class _Pred, class _Proj>
  _LIBCPP_HIDE_FROM_ABI static constexpr subrange<_Iter1> __ranges_search_n_impl(
      _Iter1 __first, _Sent1 __last, _SizeT __count, const _Type& __value, _Pred& __pred, _Proj& __proj) {
    if (__count == 0)
      return {__first, __first};

    if constexpr (sized_sentinel_for<_Sent1, _Iter1>) {
      auto __size = ranges::distance(__first, __last);
      if (__size < __count) {
        ranges::advance(__first, __last);
        return {__first, __first};
      }

      if constexpr (random_access_iterator<_Iter1>) {
        auto __ret = std::__search_n_random_access_impl<_RangeAlgPolicy>(
            __first, __last, __count, __value, __pred, __proj, __size);
        return {std::move(__ret.first), std::move(__ret.second)};
      }
    }

    auto __ret = std::__search_n_forward_impl<_RangeAlgPolicy>(__first, __last, __count, __value, __pred, __proj);
    return {std::move(__ret.first), std::move(__ret.second)};
  }

  template <forward_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Type,
            class _Pred = ranges::equal_to,
            class _Proj = identity>
    requires indirectly_comparable<_Iter, const _Type*, _Pred, _Proj>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter>
  operator()(_Iter __first,
             _Sent __last,
             iter_difference_t<_Iter> __count,
             const _Type& __value,
             _Pred __pred = {},
             _Proj __proj = _Proj{}) const {
    return __ranges_search_n_impl(__first, __last, __count, __value, __pred, __proj);
  }

  template <forward_range _Range, class _Type, class _Pred = ranges::equal_to, class _Proj = identity>
    requires indirectly_comparable<iterator_t<_Range>, const _Type*, _Pred, _Proj>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range> operator()(
      _Range&& __range, range_difference_t<_Range> __count, const _Type& __value, _Pred __pred = {}, _Proj __proj = {})
      const {
    auto __first = ranges::begin(__range);
    if (__count <= 0)
      return {__first, __first};
    if constexpr (sized_range<_Range>) {
      auto __size1 = ranges::size(__range);
      if (__size1 < static_cast<range_size_t<_Range>>(__count)) {
        ranges::advance(__first, ranges::end(__range));
        return {__first, __first};
      }
    }

    return __ranges_search_n_impl(ranges::begin(__range), ranges::end(__range), __count, __value, __pred, __proj);
  }
};
} // namespace __search_n

inline namespace __cpo {
inline constexpr auto search_n = __search_n::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_SEARCH_N_H
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_search_n.h" 3
#endif /* ranges_search_n.h expanded by -frewrite-includes */
# 1913 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_set_difference.h expanded by -frewrite-includes */
#include <__algorithm/ranges_set_difference.h>
#else /* ranges_set_difference.h expanded by -frewrite-includes */
# 1913 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_SET_DIFFERENCE_H
#define _LIBCPP___ALGORITHM_RANGES_SET_DIFFERENCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* set_difference.h expanded by -frewrite-includes */
#include <__algorithm/set_difference.h>
#else /* set_difference.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_SET_DIFFERENCE_H
#define _LIBCPP___ALGORITHM_SET_DIFFERENCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Comp, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<__remove_cvref_t<_InIter1>, __remove_cvref_t<_OutIter> >
__set_difference(
    _InIter1&& __first1, _Sent1&& __last1, _InIter2&& __first2, _Sent2&& __last2, _OutIter&& __result, _Comp&& __comp) {
  while (__first1 != __last1 && __first2 != __last2) {
    if (__comp(*__first1, *__first2)) {
      *__result = *__first1;
      ++__first1;
      ++__result;
    } else if (__comp(*__first2, *__first1)) {
      ++__first2;
    } else {
      ++__first1;
      ++__first2;
    }
  }
  return std::__copy<_AlgPolicy>(std::move(__first1), std::move(__last1), std::move(__result));
}

template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_difference(
    _InputIterator1 __first1,
    _InputIterator1 __last1,
    _InputIterator2 __first2,
    _InputIterator2 __last2,
    _OutputIterator __result,
    _Compare __comp) {
  return std::__set_difference<_ClassicAlgPolicy, __comp_ref_type<_Compare> >(
      __first1, __last1, __first2, __last2, __result, __comp)
      .second;
}

template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_difference(
    _InputIterator1 __first1,
    _InputIterator1 __last1,
    _InputIterator2 __first2,
    _InputIterator2 __last2,
    _OutputIterator __result) {
  return std::__set_difference<_ClassicAlgPolicy>(__first1, __last1, __first2, __last2, __result, __less<>()).second;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_SET_DIFFERENCE_H
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_difference.h" 3
#endif /* set_difference.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/mergeable.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter, class _OutIter>
using set_difference_result = in_out_result<_InIter, _OutIter>;

namespace __set_difference {

struct __fn {
  template <input_iterator _InIter1,
            sentinel_for<_InIter1> _Sent1,
            input_iterator _InIter2,
            sentinel_for<_InIter2> _Sent2,
            weakly_incrementable _OutIter,
            class _Comp  = less,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires mergeable<_InIter1, _InIter2, _OutIter, _Comp, _Proj1, _Proj2>
  _LIBCPP_HIDE_FROM_ABI constexpr set_difference_result<_InIter1, _OutIter> operator()(
      _InIter1 __first1,
      _Sent1 __last1,
      _InIter2 __first2,
      _Sent2 __last2,
      _OutIter __result,
      _Comp __comp   = {},
      _Proj1 __proj1 = {},
      _Proj2 __proj2 = {}) const {
    auto __ret = std::__set_difference<_RangeAlgPolicy>(
        __first1, __last1, __first2, __last2, __result, ranges::__make_projected_comp(__comp, __proj1, __proj2));
    return {std::move(__ret.first), std::move(__ret.second)};
  }

  template <input_range _Range1,
            input_range _Range2,
            weakly_incrementable _OutIter,
            class _Comp  = less,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires mergeable<iterator_t<_Range1>, iterator_t<_Range2>, _OutIter, _Comp, _Proj1, _Proj2>
  _LIBCPP_HIDE_FROM_ABI constexpr set_difference_result<borrowed_iterator_t<_Range1>, _OutIter>
  operator()(_Range1&& __range1,
             _Range2&& __range2,
             _OutIter __result,
             _Comp __comp   = {},
             _Proj1 __proj1 = {},
             _Proj2 __proj2 = {}) const {
    auto __ret = std::__set_difference<_RangeAlgPolicy>(
        ranges::begin(__range1),
        ranges::end(__range1),
        ranges::begin(__range2),
        ranges::end(__range2),
        __result,
        ranges::__make_projected_comp(__comp, __proj1, __proj2));
    return {std::move(__ret.first), std::move(__ret.second)};
  }
};

} // namespace __set_difference

inline namespace __cpo {
inline constexpr auto set_difference = __set_difference::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#endif // _LIBCPP___ALGORITHM_RANGES_SET_DIFFERENCE_H
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_difference.h" 3
#endif /* ranges_set_difference.h expanded by -frewrite-includes */
# 1914 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_set_intersection.h expanded by -frewrite-includes */
#include <__algorithm/ranges_set_intersection.h>
#else /* ranges_set_intersection.h expanded by -frewrite-includes */
# 1914 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_SET_INTERSECTION_H
#define _LIBCPP___ALGORITHM_RANGES_SET_INTERSECTION_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* set_intersection.h expanded by -frewrite-includes */
#include <__algorithm/set_intersection.h>
#else /* set_intersection.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_SET_INTERSECTION_H
#define _LIBCPP___ALGORITHM_SET_INTERSECTION_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InIter1, class _InIter2, class _OutIter>
struct __set_intersection_result {
  _InIter1 __in1_;
  _InIter2 __in2_;
  _OutIter __out_;

  // need a constructor as C++03 aggregate init is hard
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
  __set_intersection_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
      : __in1_(std::move(__in_iter1)), __in2_(std::move(__in_iter2)), __out_(std::move(__out_iter)) {}
};

template <class _AlgPolicy, class _Compare, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __set_intersection_result<_InIter1, _InIter2, _OutIter>
__set_intersection(
    _InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&& __comp) {
  while (__first1 != __last1 && __first2 != __last2) {
    if (__comp(*__first1, *__first2))
      ++__first1;
    else {
      if (!__comp(*__first2, *__first1)) {
        *__result = *__first1;
        ++__result;
        ++__first1;
      }
      ++__first2;
    }
  }

  return __set_intersection_result<_InIter1, _InIter2, _OutIter>(
      _IterOps<_AlgPolicy>::next(std::move(__first1), std::move(__last1)),
      _IterOps<_AlgPolicy>::next(std::move(__first2), std::move(__last2)),
      std::move(__result));
}

template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_intersection(
    _InputIterator1 __first1,
    _InputIterator1 __last1,
    _InputIterator2 __first2,
    _InputIterator2 __last2,
    _OutputIterator __result,
    _Compare __comp) {
  return std::__set_intersection<_ClassicAlgPolicy, __comp_ref_type<_Compare> >(
             std::move(__first1),
             std::move(__last1),
             std::move(__first2),
             std::move(__last2),
             std::move(__result),
             __comp)
      .__out_;
}

template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_intersection(
    _InputIterator1 __first1,
    _InputIterator1 __last1,
    _InputIterator2 __first2,
    _InputIterator2 __last2,
    _OutputIterator __result) {
  return std::__set_intersection<_ClassicAlgPolicy>(
             std::move(__first1),
             std::move(__last1),
             std::move(__first2),
             std::move(__last2),
             std::move(__result),
             __less<>())
      .__out_;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_SET_INTERSECTION_H
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_intersection.h" 3
#endif /* set_intersection.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/mergeable.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter1, class _InIter2, class _OutIter>
using set_intersection_result = in_in_out_result<_InIter1, _InIter2, _OutIter>;

namespace __set_intersection {

struct __fn {
  template <input_iterator _InIter1,
            sentinel_for<_InIter1> _Sent1,
            input_iterator _InIter2,
            sentinel_for<_InIter2> _Sent2,
            weakly_incrementable _OutIter,
            class _Comp  = less,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires mergeable<_InIter1, _InIter2, _OutIter, _Comp, _Proj1, _Proj2>
  _LIBCPP_HIDE_FROM_ABI constexpr set_intersection_result<_InIter1, _InIter2, _OutIter> operator()(
      _InIter1 __first1,
      _Sent1 __last1,
      _InIter2 __first2,
      _Sent2 __last2,
      _OutIter __result,
      _Comp __comp   = {},
      _Proj1 __proj1 = {},
      _Proj2 __proj2 = {}) const {
    auto __ret = std::__set_intersection<_RangeAlgPolicy>(
        std::move(__first1),
        std::move(__last1),
        std::move(__first2),
        std::move(__last2),
        std::move(__result),
        ranges::__make_projected_comp(__comp, __proj1, __proj2));
    return {std::move(__ret.__in1_), std::move(__ret.__in2_), std::move(__ret.__out_)};
  }

  template <input_range _Range1,
            input_range _Range2,
            weakly_incrementable _OutIter,
            class _Comp  = less,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires mergeable<iterator_t<_Range1>, iterator_t<_Range2>, _OutIter, _Comp, _Proj1, _Proj2>
  _LIBCPP_HIDE_FROM_ABI constexpr set_intersection_result<borrowed_iterator_t<_Range1>,
                                                          borrowed_iterator_t<_Range2>,
                                                          _OutIter>
  operator()(_Range1&& __range1,
             _Range2&& __range2,
             _OutIter __result,
             _Comp __comp   = {},
             _Proj1 __proj1 = {},
             _Proj2 __proj2 = {}) const {
    auto __ret = std::__set_intersection<_RangeAlgPolicy>(
        ranges::begin(__range1),
        ranges::end(__range1),
        ranges::begin(__range2),
        ranges::end(__range2),
        std::move(__result),
        ranges::__make_projected_comp(__comp, __proj1, __proj2));
    return {std::move(__ret.__in1_), std::move(__ret.__in2_), std::move(__ret.__out_)};
  }
};

} // namespace __set_intersection

inline namespace __cpo {
inline constexpr auto set_intersection = __set_intersection::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#endif // _LIBCPP___ALGORITHM_RANGES_SET_INTERSECTION_H
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_intersection.h" 3
#endif /* ranges_set_intersection.h expanded by -frewrite-includes */
# 1915 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_set_symmetric_difference.h expanded by -frewrite-includes */
#include <__algorithm/ranges_set_symmetric_difference.h>
#else /* ranges_set_symmetric_difference.h expanded by -frewrite-includes */
# 1915 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_SET_SYMMETRIC_DIFFERENCE_H
#define _LIBCPP___ALGORITHM_RANGES_SET_SYMMETRIC_DIFFERENCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* set_symmetric_difference.h expanded by -frewrite-includes */
#include <__algorithm/set_symmetric_difference.h>
#else /* set_symmetric_difference.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_SET_SYMMETRIC_DIFFERENCE_H
#define _LIBCPP___ALGORITHM_SET_SYMMETRIC_DIFFERENCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InIter1, class _InIter2, class _OutIter>
struct __set_symmetric_difference_result {
  _InIter1 __in1_;
  _InIter2 __in2_;
  _OutIter __out_;

  // need a constructor as C++03 aggregate init is hard
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
  __set_symmetric_difference_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
      : __in1_(std::move(__in_iter1)), __in2_(std::move(__in_iter2)), __out_(std::move(__out_iter)) {}
};

template <class _AlgPolicy, class _Compare, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __set_symmetric_difference_result<_InIter1, _InIter2, _OutIter>
__set_symmetric_difference(
    _InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&& __comp) {
  while (__first1 != __last1) {
    if (__first2 == __last2) {
      auto __ret1 = std::__copy<_AlgPolicy>(std::move(__first1), std::move(__last1), std::move(__result));
      return __set_symmetric_difference_result<_InIter1, _InIter2, _OutIter>(
          std::move(__ret1.first), std::move(__first2), std::move((__ret1.second)));
    }
    if (__comp(*__first1, *__first2)) {
      *__result = *__first1;
      ++__result;
      ++__first1;
    } else {
      if (__comp(*__first2, *__first1)) {
        *__result = *__first2;
        ++__result;
      } else {
        ++__first1;
      }
      ++__first2;
    }
  }
  auto __ret2 = std::__copy<_AlgPolicy>(std::move(__first2), std::move(__last2), std::move(__result));
  return __set_symmetric_difference_result<_InIter1, _InIter2, _OutIter>(
      std::move(__first1), std::move(__ret2.first), std::move((__ret2.second)));
}

template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_symmetric_difference(
    _InputIterator1 __first1,
    _InputIterator1 __last1,
    _InputIterator2 __first2,
    _InputIterator2 __last2,
    _OutputIterator __result,
    _Compare __comp) {
  return std::__set_symmetric_difference<_ClassicAlgPolicy, __comp_ref_type<_Compare> >(
             std::move(__first1),
             std::move(__last1),
             std::move(__first2),
             std::move(__last2),
             std::move(__result),
             __comp)
      .__out_;
}

template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_symmetric_difference(
    _InputIterator1 __first1,
    _InputIterator1 __last1,
    _InputIterator2 __first2,
    _InputIterator2 __last2,
    _OutputIterator __result) {
  return std::set_symmetric_difference(
      std::move(__first1),
      std::move(__last1),
      std::move(__first2),
      std::move(__last2),
      std::move(__result),
      __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_SET_SYMMETRIC_DIFFERENCE_H
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_symmetric_difference.h" 3
#endif /* set_symmetric_difference.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/mergeable.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter1, class _InIter2, class _OutIter>
using set_symmetric_difference_result = in_in_out_result<_InIter1, _InIter2, _OutIter>;

namespace __set_symmetric_difference {

struct __fn {
  template <input_iterator _InIter1,
            sentinel_for<_InIter1> _Sent1,
            input_iterator _InIter2,
            sentinel_for<_InIter2> _Sent2,
            weakly_incrementable _OutIter,
            class _Comp  = ranges::less,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires mergeable<_InIter1, _InIter2, _OutIter, _Comp, _Proj1, _Proj2>
  _LIBCPP_HIDE_FROM_ABI constexpr set_symmetric_difference_result<_InIter1, _InIter2, _OutIter> operator()(
      _InIter1 __first1,
      _Sent1 __last1,
      _InIter2 __first2,
      _Sent2 __last2,
      _OutIter __result,
      _Comp __comp   = {},
      _Proj1 __proj1 = {},
      _Proj2 __proj2 = {}) const {
    auto __ret = std::__set_symmetric_difference<_RangeAlgPolicy>(
        std::move(__first1),
        std::move(__last1),
        std::move(__first2),
        std::move(__last2),
        std::move(__result),
        ranges::__make_projected_comp(__comp, __proj1, __proj2));
    return {std::move(__ret.__in1_), std::move(__ret.__in2_), std::move(__ret.__out_)};
  }

  template <input_range _Range1,
            input_range _Range2,
            weakly_incrementable _OutIter,
            class _Comp  = ranges::less,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires mergeable<iterator_t<_Range1>, iterator_t<_Range2>, _OutIter, _Comp, _Proj1, _Proj2>
  _LIBCPP_HIDE_FROM_ABI constexpr set_symmetric_difference_result<borrowed_iterator_t<_Range1>,
                                                                  borrowed_iterator_t<_Range2>,
                                                                  _OutIter>
  operator()(_Range1&& __range1,
             _Range2&& __range2,
             _OutIter __result,
             _Comp __comp   = {},
             _Proj1 __proj1 = {},
             _Proj2 __proj2 = {}) const {
    auto __ret = std::__set_symmetric_difference<_RangeAlgPolicy>(
        ranges::begin(__range1),
        ranges::end(__range1),
        ranges::begin(__range2),
        ranges::end(__range2),
        std::move(__result),
        ranges::__make_projected_comp(__comp, __proj1, __proj2));
    return {std::move(__ret.__in1_), std::move(__ret.__in2_), std::move(__ret.__out_)};
  }
};

} // namespace __set_symmetric_difference

inline namespace __cpo {
inline constexpr auto set_symmetric_difference = __set_symmetric_difference::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#endif // _LIBCPP___ALGORITHM_RANGES_SET_SYMMETRIC_DIFFERENCE_H
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_symmetric_difference.h" 3
#endif /* ranges_set_symmetric_difference.h expanded by -frewrite-includes */
# 1916 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_set_union.h expanded by -frewrite-includes */
#include <__algorithm/ranges_set_union.h>
#else /* ranges_set_union.h expanded by -frewrite-includes */
# 1916 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_SET_UNION_H
#define _LIBCPP___ALGORITHM_RANGES_SET_UNION_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* set_union.h expanded by -frewrite-includes */
#include <__algorithm/set_union.h>
#else /* set_union.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_SET_UNION_H
#define _LIBCPP___ALGORITHM_SET_UNION_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp_ref_type.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InIter1, class _InIter2, class _OutIter>
struct __set_union_result {
  _InIter1 __in1_;
  _InIter2 __in2_;
  _OutIter __out_;

  // need a constructor as C++03 aggregate init is hard
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
  __set_union_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
      : __in1_(std::move(__in_iter1)), __in2_(std::move(__in_iter2)), __out_(std::move(__out_iter)) {}
};

template <class _AlgPolicy, class _Compare, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __set_union_result<_InIter1, _InIter2, _OutIter> __set_union(
    _InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&& __comp) {
  for (; __first1 != __last1; ++__result) {
    if (__first2 == __last2) {
      auto __ret1 = std::__copy<_AlgPolicy>(std::move(__first1), std::move(__last1), std::move(__result));
      return __set_union_result<_InIter1, _InIter2, _OutIter>(
          std::move(__ret1.first), std::move(__first2), std::move((__ret1.second)));
    }
    if (__comp(*__first2, *__first1)) {
      *__result = *__first2;
      ++__first2;
    } else {
      if (!__comp(*__first1, *__first2)) {
        ++__first2;
      }
      *__result = *__first1;
      ++__first1;
    }
  }
  auto __ret2 = std::__copy<_AlgPolicy>(std::move(__first2), std::move(__last2), std::move(__result));
  return __set_union_result<_InIter1, _InIter2, _OutIter>(
      std::move(__first1), std::move(__ret2.first), std::move((__ret2.second)));
}

template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_union(
    _InputIterator1 __first1,
    _InputIterator1 __last1,
    _InputIterator2 __first2,
    _InputIterator2 __last2,
    _OutputIterator __result,
    _Compare __comp) {
  return std::__set_union<_ClassicAlgPolicy, __comp_ref_type<_Compare> >(
             std::move(__first1),
             std::move(__last1),
             std::move(__first2),
             std::move(__last2),
             std::move(__result),
             __comp)
      .__out_;
}

template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_union(
    _InputIterator1 __first1,
    _InputIterator1 __last1,
    _InputIterator2 __first2,
    _InputIterator2 __last2,
    _OutputIterator __result) {
  return std::set_union(
      std::move(__first1),
      std::move(__last1),
      std::move(__first2),
      std::move(__last2),
      std::move(__result),
      __less<>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_SET_UNION_H
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/set_union.h" 3
#endif /* set_union.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/mergeable.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter1, class _InIter2, class _OutIter>
using set_union_result = in_in_out_result<_InIter1, _InIter2, _OutIter>;

namespace __set_union {

struct __fn {
  template <input_iterator _InIter1,
            sentinel_for<_InIter1> _Sent1,
            input_iterator _InIter2,
            sentinel_for<_InIter2> _Sent2,
            weakly_incrementable _OutIter,
            class _Comp  = ranges::less,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires mergeable<_InIter1, _InIter2, _OutIter, _Comp, _Proj1, _Proj2>
  _LIBCPP_HIDE_FROM_ABI constexpr set_union_result<_InIter1, _InIter2, _OutIter> operator()(
      _InIter1 __first1,
      _Sent1 __last1,
      _InIter2 __first2,
      _Sent2 __last2,
      _OutIter __result,
      _Comp __comp   = {},
      _Proj1 __proj1 = {},
      _Proj2 __proj2 = {}) const {
    auto __ret = std::__set_union<_RangeAlgPolicy>(
        std::move(__first1),
        std::move(__last1),
        std::move(__first2),
        std::move(__last2),
        std::move(__result),
        ranges::__make_projected_comp(__comp, __proj1, __proj2));
    return {std::move(__ret.__in1_), std::move(__ret.__in2_), std::move(__ret.__out_)};
  }

  template <input_range _Range1,
            input_range _Range2,
            weakly_incrementable _OutIter,
            class _Comp  = ranges::less,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires mergeable<iterator_t<_Range1>, iterator_t<_Range2>, _OutIter, _Comp, _Proj1, _Proj2>
  _LIBCPP_HIDE_FROM_ABI constexpr set_union_result<borrowed_iterator_t<_Range1>, borrowed_iterator_t<_Range2>, _OutIter>
  operator()(_Range1&& __range1,
             _Range2&& __range2,
             _OutIter __result,
             _Comp __comp   = {},
             _Proj1 __proj1 = {},
             _Proj2 __proj2 = {}) const {
    auto __ret = std::__set_union<_RangeAlgPolicy>(
        ranges::begin(__range1),
        ranges::end(__range1),
        ranges::begin(__range2),
        ranges::end(__range2),
        std::move(__result),
        ranges::__make_projected_comp(__comp, __proj1, __proj2));
    return {std::move(__ret.__in1_), std::move(__ret.__in2_), std::move(__ret.__out_)};
  }
};

} // namespace __set_union

inline namespace __cpo {
inline constexpr auto set_union = __set_union::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_SET_UNION_H
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_set_union.h" 3
#endif /* ranges_set_union.h expanded by -frewrite-includes */
# 1917 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_shuffle.h expanded by -frewrite-includes */
#include <__algorithm/ranges_shuffle.h>
#else /* ranges_shuffle.h expanded by -frewrite-includes */
# 1917 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_SHUFFLE_H
#define _LIBCPP___ALGORITHM_RANGES_SHUFFLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* shuffle.h expanded by -frewrite-includes */
#include <__algorithm/shuffle.h>
#else /* shuffle.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_SHUFFLE_H
#define _LIBCPP___ALGORITHM_SHUFFLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__random/uniform_int_distribution.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

class _LIBCPP_EXPORTED_FROM_ABI __libcpp_debug_randomizer {
public:
  _LIBCPP_HIDE_FROM_ABI __libcpp_debug_randomizer() {
    __state_ = __seed();
    __inc_ = __state_ + 0xda3e39cb94b95bdbULL;
    __inc_ = (__inc_ << 1) | 1;
  }
  typedef uint_fast32_t result_type;

  static const result_type _Min = 0;
  static const result_type _Max = 0xFFFFFFFF;

  _LIBCPP_HIDE_FROM_ABI result_type operator()() {
    uint_fast64_t __oldstate = __state_;
    __state_ = __oldstate * 6364136223846793005ULL + __inc_;
    return __oldstate >> 32;
  }

  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR result_type min() { return _Min; }
  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR result_type max() { return _Max; }

private:
  uint_fast64_t __state_;
  uint_fast64_t __inc_;
  _LIBCPP_HIDE_FROM_ABI static uint_fast64_t __seed() {
#ifdef _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY_SEED
    return _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY_SEED;
#else
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
    static char __x;
    return reinterpret_cast<uintptr_t>(&__x);
#endif
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
  }
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE) \
  || defined(_LIBCPP_BUILDING_LIBRARY)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
class _LIBCPP_EXPORTED_FROM_ABI __rs_default;

_LIBCPP_EXPORTED_FROM_ABI __rs_default __rs_get();

class _LIBCPP_EXPORTED_FROM_ABI __rs_default
{
    static unsigned __c_;

    __rs_default();
public:
    typedef uint_fast32_t result_type;

    static const result_type _Min = 0;
    static const result_type _Max = 0xFFFFFFFF;

    __rs_default(const __rs_default&);
    ~__rs_default();

    result_type operator()();

    static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR result_type min() {return _Min;}
    static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR result_type max() {return _Max;}

    friend _LIBCPP_EXPORTED_FROM_ABI __rs_default __rs_get();
};

_LIBCPP_EXPORTED_FROM_ABI __rs_default __rs_get();

template <class _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX14 void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
    typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
    typedef uniform_int_distribution<ptrdiff_t> _Dp;
    typedef typename _Dp::param_type _Pp;
    difference_type __d = __last - __first;
    if (__d > 1)
    {
        _Dp __uid;
        __rs_default __g = __rs_get();
        for (--__last, (void) --__d; __first < __last; ++__first, (void) --__d)
        {
            difference_type __i = __uid(__g, _Pp(0, __d));
            if (__i != difference_type(0))
                swap(*__first, *(__first + __i));
        }
    }
}

template <class _RandomAccessIterator, class _RandomNumberGenerator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX14 void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
#ifndef _LIBCPP_CXX03_LANG
               _RandomNumberGenerator&& __rand)
#else
# 122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
               _RandomNumberGenerator& __rand)
#endif
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
{
    typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
    difference_type __d = __last - __first;
    if (__d > 1)
    {
        for (--__last; __first < __last; ++__first, (void) --__d)
        {
            difference_type __i = __rand(__d);
            if (__i != difference_type(0))
              swap(*__first, *(__first + __i));
        }
    }
}
#endif
# 138 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3

template <class _AlgPolicy, class _RandomAccessIterator, class _Sentinel, class _UniformRandomNumberGenerator>
_LIBCPP_HIDE_FROM_ABI _RandomAccessIterator __shuffle(
    _RandomAccessIterator __first, _Sentinel __last_sentinel, _UniformRandomNumberGenerator&& __g) {
    typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
    typedef uniform_int_distribution<ptrdiff_t> _Dp;
    typedef typename _Dp::param_type _Pp;

    auto __original_last = _IterOps<_AlgPolicy>::next(__first, __last_sentinel);
    auto __last = __original_last;
    difference_type __d = __last - __first;
    if (__d > 1)
    {
        _Dp __uid;
        for (--__last, (void) --__d; __first < __last; ++__first, (void) --__d)
        {
            difference_type __i = __uid(__g, _Pp(0, __d));
            if (__i != difference_type(0))
                _IterOps<_AlgPolicy>::iter_swap(__first, __first + __i);
        }
    }

    return __original_last;
}

template <class _RandomAccessIterator, class _UniformRandomNumberGenerator>
_LIBCPP_HIDE_FROM_ABI void
shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, _UniformRandomNumberGenerator&& __g) {
  (void)std::__shuffle<_ClassicAlgPolicy>(
      std::move(__first), std::move(__last), std::forward<_UniformRandomNumberGenerator>(__g));
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_SHUFFLE_H
# 175 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shuffle.h" 3
#endif /* shuffle.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/uniform_random_bit_generator_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/permutable.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__random/uniform_random_bit_generator.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __shuffle {

struct __fn {
  template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Gen>
    requires permutable<_Iter> && uniform_random_bit_generator<remove_reference_t<_Gen>>
  _LIBCPP_HIDE_FROM_ABI _Iter operator()(_Iter __first, _Sent __last, _Gen&& __gen) const {
    _ClassicGenAdaptor<_Gen> __adapted_gen(__gen);
    return std::__shuffle<_RangeAlgPolicy>(std::move(__first), std::move(__last), __adapted_gen);
  }

  template <random_access_range _Range, class _Gen>
    requires permutable<iterator_t<_Range>> && uniform_random_bit_generator<remove_reference_t<_Gen>>
  _LIBCPP_HIDE_FROM_ABI borrowed_iterator_t<_Range> operator()(_Range&& __range, _Gen&& __gen) const {
    return (*this)(ranges::begin(__range), ranges::end(__range), std::forward<_Gen>(__gen));
  }
};

} // namespace __shuffle

inline namespace __cpo {
inline constexpr auto shuffle = __shuffle::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_SHUFFLE_H
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_shuffle.h" 3
#endif /* ranges_shuffle.h expanded by -frewrite-includes */
# 1918 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_sort.h expanded by -frewrite-includes */
#include <__algorithm/ranges_sort.h>
#else /* ranges_sort.h expanded by -frewrite-includes */
# 1918 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_SORT_H
#define _LIBCPP___ALGORITHM_RANGES_SORT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/sort.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/sortable.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __sort {

struct __fn {
  template <class _Iter, class _Sent, class _Comp, class _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr static _Iter
  __sort_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
    auto __last_iter = ranges::next(__first, __last);

    auto&& __projected_comp = std::__make_projected(__comp, __proj);
    std::__sort_impl<_RangeAlgPolicy>(std::move(__first), __last_iter, __projected_comp);

    return __last_iter;
  }

  template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<_Iter, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr _Iter
  operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    return __sort_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
  }

  template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<iterator_t<_Range>, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
  operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
    return __sort_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
  }
};

} // namespace __sort

inline namespace __cpo {
inline constexpr auto sort = __sort::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_SORT_H
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort.h" 3
#endif /* ranges_sort.h expanded by -frewrite-includes */
# 1919 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_sort_heap.h expanded by -frewrite-includes */
#include <__algorithm/ranges_sort_heap.h>
#else /* ranges_sort_heap.h expanded by -frewrite-includes */
# 1919 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_SORT_HEAP_H
#define _LIBCPP___ALGORITHM_RANGES_SORT_HEAP_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/sort_heap.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/sortable.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __sort_heap {

struct __fn {
  template <class _Iter, class _Sent, class _Comp, class _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr static _Iter
  __sort_heap_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
    auto __last_iter = ranges::next(__first, __last);

    auto&& __projected_comp = std::__make_projected(__comp, __proj);
    std::__sort_heap<_RangeAlgPolicy>(std::move(__first), __last_iter, __projected_comp);

    return __last_iter;
  }

  template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<_Iter, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr _Iter
  operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    return __sort_heap_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
  }

  template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<iterator_t<_Range>, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
  operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
    return __sort_heap_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
  }
};

} // namespace __sort_heap

inline namespace __cpo {
inline constexpr auto sort_heap = __sort_heap::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_SORT_HEAP_H
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_sort_heap.h" 3
#endif /* ranges_sort_heap.h expanded by -frewrite-includes */
# 1920 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_stable_partition.h expanded by -frewrite-includes */
#include <__algorithm/ranges_stable_partition.h>
#else /* ranges_stable_partition.h expanded by -frewrite-includes */
# 1920 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_STABLE_PARTITION_H
#define _LIBCPP___ALGORITHM_RANGES_STABLE_PARTITION_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_iterator_concept.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stable_partition.h expanded by -frewrite-includes */
#include <__algorithm/stable_partition.h>
#else /* stable_partition.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_STABLE_PARTITION_H
#define _LIBCPP___ALGORITHM_STABLE_PARTITION_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/rotate.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/destruct_n.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/temporary_buffer.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/unique_ptr.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Predicate, class _ForwardIterator, class _Distance, class _Pair>
_LIBCPP_HIDE_FROM_ABI _ForwardIterator
__stable_partition_impl(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred,
                   _Distance __len, _Pair __p, forward_iterator_tag __fit)
{
    using _Ops = _IterOps<_AlgPolicy>;

    // *__first is known to be false
    // __len >= 1
    if (__len == 1)
        return __first;
    if (__len == 2)
    {
        _ForwardIterator __m = __first;
        if (__pred(*++__m))
        {
            _Ops::iter_swap(__first, __m);
            return __m;
        }
        return __first;
    }
    if (__len <= __p.second)
    {   // The buffer is big enough to use
        typedef typename iterator_traits<_ForwardIterator>::value_type value_type;
        __destruct_n __d(0);
        unique_ptr<value_type, __destruct_n&> __h(__p.first, __d);
        // Move the falses into the temporary buffer, and the trues to the front of the line
        // Update __first to always point to the end of the trues
        value_type* __t = __p.first;
        ::new ((void*)__t) value_type(_Ops::__iter_move(__first));
        __d.template __incr<value_type>();
        ++__t;
        _ForwardIterator __i = __first;
        while (++__i != __last)
        {
            if (__pred(*__i))
            {
                *__first = _Ops::__iter_move(__i);
                ++__first;
            }
            else
            {
                ::new ((void*)__t) value_type(_Ops::__iter_move(__i));
                __d.template __incr<value_type>();
                ++__t;
            }
        }
        // All trues now at start of range, all falses in buffer
        // Move falses back into range, but don't mess up __first which points to first false
        __i = __first;
        for (value_type* __t2 = __p.first; __t2 < __t; ++__t2, (void) ++__i)
            *__i = _Ops::__iter_move(__t2);
        // __h destructs moved-from values out of the temp buffer, but doesn't deallocate buffer
        return __first;
    }
    // Else not enough buffer, do in place
    // __len >= 3
    _ForwardIterator __m = __first;
    _Distance __len2 = __len / 2;  // __len2 >= 2
    _Ops::advance(__m, __len2);
    // recurse on [__first, __m), *__first know to be false
    // F?????????????????
    // f       m         l
    _ForwardIterator __first_false = std::__stable_partition_impl<_AlgPolicy, _Predicate&>(
        __first, __m, __pred, __len2, __p, __fit);
    // TTTFFFFF??????????
    // f  ff   m         l
    // recurse on [__m, __last], except increase __m until *(__m) is false, *__last know to be true
    _ForwardIterator __m1 = __m;
    _ForwardIterator __second_false = __last;
    _Distance __len_half = __len - __len2;
    while (__pred(*__m1))
    {
        if (++__m1 == __last)
            goto __second_half_done;
        --__len_half;
    }
    // TTTFFFFFTTTF??????
    // f  ff   m  m1     l
    __second_false = std::__stable_partition_impl<_AlgPolicy, _Predicate&>(
        __m1, __last, __pred, __len_half, __p, __fit);
__second_half_done:
    // TTTFFFFFTTTTTFFFFF
    // f  ff   m    sf   l
    return std::__rotate<_AlgPolicy>(__first_false, __m, __second_false).first;
    // TTTTTTTTFFFFFFFFFF
    //         |
}

template <class _AlgPolicy, class _Predicate, class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI _ForwardIterator
__stable_partition_impl(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred,
                   forward_iterator_tag)
{
    typedef typename iterator_traits<_ForwardIterator>::difference_type difference_type;
    typedef typename iterator_traits<_ForwardIterator>::value_type value_type;

    const difference_type __alloc_limit = 3;  // might want to make this a function of trivial assignment
    // Either prove all true and return __first or point to first false
    while (true)
    {
        if (__first == __last)
            return __first;
        if (!__pred(*__first))
            break;
        ++__first;
    }
    // We now have a reduced range [__first, __last)
    // *__first is known to be false
    difference_type __len = _IterOps<_AlgPolicy>::distance(__first, __last);
    pair<value_type*, ptrdiff_t> __p(0, 0);
    unique_ptr<value_type, __return_temporary_buffer> __h;
    if (__len >= __alloc_limit)
    {
// TODO: Remove the use of std::get_temporary_buffer
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
        __p = _VSTD::get_temporary_buffer<value_type>(__len);
_LIBCPP_SUPPRESS_DEPRECATED_POP
        __h.reset(__p.first);
    }
    return std::__stable_partition_impl<_AlgPolicy, _Predicate&>(
        std::move(__first), std::move(__last), __pred, __len, __p, forward_iterator_tag());
}

template <class _AlgPolicy, class _Predicate, class _BidirectionalIterator, class _Distance, class _Pair>
_BidirectionalIterator
__stable_partition_impl(_BidirectionalIterator __first, _BidirectionalIterator __last, _Predicate __pred,
                   _Distance __len, _Pair __p, bidirectional_iterator_tag __bit)
{
    using _Ops = _IterOps<_AlgPolicy>;

    // *__first is known to be false
    // *__last is known to be true
    // __len >= 2
    if (__len == 2)
    {
        _Ops::iter_swap(__first, __last);
        return __last;
    }
    if (__len == 3)
    {
        _BidirectionalIterator __m = __first;
        if (__pred(*++__m))
        {
            _Ops::iter_swap(__first, __m);
            _Ops::iter_swap(__m, __last);
            return __last;
        }
        _Ops::iter_swap(__m, __last);
        _Ops::iter_swap(__first, __m);
        return __m;
    }
    if (__len <= __p.second)
    {   // The buffer is big enough to use
        typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
        __destruct_n __d(0);
        unique_ptr<value_type, __destruct_n&> __h(__p.first, __d);
        // Move the falses into the temporary buffer, and the trues to the front of the line
        // Update __first to always point to the end of the trues
        value_type* __t = __p.first;
        ::new ((void*)__t) value_type(_Ops::__iter_move(__first));
        __d.template __incr<value_type>();
        ++__t;
        _BidirectionalIterator __i = __first;
        while (++__i != __last)
        {
            if (__pred(*__i))
            {
                *__first = _Ops::__iter_move(__i);
                ++__first;
            }
            else
            {
                ::new ((void*)__t) value_type(_Ops::__iter_move(__i));
                __d.template __incr<value_type>();
                ++__t;
            }
        }
        // move *__last, known to be true
        *__first = _Ops::__iter_move(__i);
        __i = ++__first;
        // All trues now at start of range, all falses in buffer
        // Move falses back into range, but don't mess up __first which points to first false
        for (value_type* __t2 = __p.first; __t2 < __t; ++__t2, (void) ++__i)
            *__i = _Ops::__iter_move(__t2);
        // __h destructs moved-from values out of the temp buffer, but doesn't deallocate buffer
        return __first;
    }
    // Else not enough buffer, do in place
    // __len >= 4
    _BidirectionalIterator __m = __first;
    _Distance __len2 = __len / 2;  // __len2 >= 2
    _Ops::advance(__m, __len2);
    // recurse on [__first, __m-1], except reduce __m-1 until *(__m-1) is true, *__first know to be false
    // F????????????????T
    // f       m        l
    _BidirectionalIterator __m1 = __m;
    _BidirectionalIterator __first_false = __first;
    _Distance __len_half = __len2;
    while (!__pred(*--__m1))
    {
        if (__m1 == __first)
            goto __first_half_done;
        --__len_half;
    }
    // F???TFFF?????????T
    // f   m1  m        l
    __first_false = std::__stable_partition_impl<_AlgPolicy, _Predicate&>(
        __first, __m1, __pred, __len_half, __p, __bit);
__first_half_done:
    // TTTFFFFF?????????T
    // f  ff   m        l
    // recurse on [__m, __last], except increase __m until *(__m) is false, *__last know to be true
    __m1 = __m;
    _BidirectionalIterator __second_false = __last;
    ++__second_false;
    __len_half = __len - __len2;
    while (__pred(*__m1))
    {
        if (++__m1 == __last)
            goto __second_half_done;
        --__len_half;
    }
    // TTTFFFFFTTTF?????T
    // f  ff   m  m1    l
    __second_false = std::__stable_partition_impl<_AlgPolicy, _Predicate&>(
        __m1, __last, __pred, __len_half, __p, __bit);
__second_half_done:
    // TTTFFFFFTTTTTFFFFF
    // f  ff   m    sf  l
    return std::__rotate<_AlgPolicy>(__first_false, __m, __second_false).first;
    // TTTTTTTTFFFFFFFFFF
    //         |
}

template <class _AlgPolicy, class _Predicate, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI _BidirectionalIterator
__stable_partition_impl(_BidirectionalIterator __first, _BidirectionalIterator __last, _Predicate __pred,
                   bidirectional_iterator_tag)
{
    typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type;
    typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
    const difference_type __alloc_limit = 4;  // might want to make this a function of trivial assignment
    // Either prove all true and return __first or point to first false
    while (true)
    {
        if (__first == __last)
            return __first;
        if (!__pred(*__first))
            break;
        ++__first;
    }
    // __first points to first false, everything prior to __first is already set.
    // Either prove [__first, __last) is all false and return __first, or point __last to last true
    do
    {
        if (__first == --__last)
            return __first;
    } while (!__pred(*__last));
    // We now have a reduced range [__first, __last]
    // *__first is known to be false
    // *__last is known to be true
    // __len >= 2
    difference_type __len = _IterOps<_AlgPolicy>::distance(__first, __last) + 1;
    pair<value_type*, ptrdiff_t> __p(0, 0);
    unique_ptr<value_type, __return_temporary_buffer> __h;
    if (__len >= __alloc_limit)
    {
// TODO: Remove the use of std::get_temporary_buffer
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
        __p = _VSTD::get_temporary_buffer<value_type>(__len);
_LIBCPP_SUPPRESS_DEPRECATED_POP
        __h.reset(__p.first);
    }
    return std::__stable_partition_impl<_AlgPolicy, _Predicate&>(
        std::move(__first), std::move(__last), __pred, __len, __p, bidirectional_iterator_tag());
}

template <class _AlgPolicy, class _Predicate, class _ForwardIterator, class _IterCategory>
_LIBCPP_HIDE_FROM_ABI
_ForwardIterator __stable_partition(
    _ForwardIterator __first, _ForwardIterator __last, _Predicate&& __pred, _IterCategory __iter_category) {
  return std::__stable_partition_impl<_AlgPolicy, __remove_cvref_t<_Predicate>&>(
      std::move(__first), std::move(__last), __pred, __iter_category);
}

template <class _ForwardIterator, class _Predicate>
inline _LIBCPP_INLINE_VISIBILITY
_ForwardIterator
stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
{
  using _IterCategory = typename iterator_traits<_ForwardIterator>::iterator_category;
  return std::__stable_partition<_ClassicAlgPolicy, _Predicate&>(
      std::move(__first), std::move(__last), __pred, _IterCategory());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_STABLE_PARTITION_H
# 330 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/stable_partition.h" 3
#endif /* stable_partition.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/permutable.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#endif
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __stable_partition {

struct __fn {
  template <class _Iter, class _Sent, class _Proj, class _Pred>
  _LIBCPP_HIDE_FROM_ABI static subrange<__remove_cvref_t<_Iter>>
  __stable_partition_fn_impl(_Iter&& __first, _Sent&& __last, _Pred&& __pred, _Proj&& __proj) {
    auto __last_iter = ranges::next(__first, __last);

    auto&& __projected_pred = std::__make_projected(__pred, __proj);
    auto __result           = std::__stable_partition<_RangeAlgPolicy>(
        std::move(__first), __last_iter, __projected_pred, __iterator_concept<_Iter>());

    return {std::move(__result), std::move(__last_iter)};
  }

  template <bidirectional_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj = identity,
            indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
    requires permutable<_Iter>
  _LIBCPP_HIDE_FROM_ABI subrange<_Iter> operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const {
    return __stable_partition_fn_impl(__first, __last, __pred, __proj);
  }

  template <bidirectional_range _Range,
            class _Proj = identity,
            indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
    requires permutable<iterator_t<_Range>>
  _LIBCPP_HIDE_FROM_ABI borrowed_subrange_t<_Range>
  operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
    return __stable_partition_fn_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
  }
};

} // namespace __stable_partition

inline namespace __cpo {
inline constexpr auto stable_partition = __stable_partition::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_STABLE_PARTITION_H
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_partition.h" 3
#endif /* ranges_stable_partition.h expanded by -frewrite-includes */
# 1921 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_stable_sort.h expanded by -frewrite-includes */
#include <__algorithm/ranges_stable_sort.h>
#else /* ranges_stable_sort.h expanded by -frewrite-includes */
# 1921 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_STABLE_SORT_H
#define _LIBCPP___ALGORITHM_RANGES_STABLE_SORT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/stable_sort.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/sortable.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __stable_sort {

struct __fn {
  template <class _Iter, class _Sent, class _Comp, class _Proj>
  _LIBCPP_HIDE_FROM_ABI static _Iter __stable_sort_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
    auto __last_iter = ranges::next(__first, __last);

    auto&& __projected_comp = std::__make_projected(__comp, __proj);
    std::__stable_sort_impl<_RangeAlgPolicy>(std::move(__first), __last_iter, __projected_comp);

    return __last_iter;
  }

  template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<_Iter, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    return __stable_sort_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
  }

  template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
    requires sortable<iterator_t<_Range>, _Comp, _Proj>
  _LIBCPP_HIDE_FROM_ABI borrowed_iterator_t<_Range>
  operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
    return __stable_sort_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
  }
};

} // namespace __stable_sort

inline namespace __cpo {
inline constexpr auto stable_sort = __stable_sort::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_STABLE_SORT_H
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_stable_sort.h" 3
#endif /* ranges_stable_sort.h expanded by -frewrite-includes */
# 1922 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_starts_with.h>
#endif /* expanded by -frewrite-includes */
# 1922 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1923 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_swap_ranges.h expanded by -frewrite-includes */
#include <__algorithm/ranges_swap_ranges.h>
#else /* ranges_swap_ranges.h expanded by -frewrite-includes */
# 1923 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_SWAP_RANGES_H
#define _LIBCPP___ALGORITHM_RANGES_SWAP_RANGES_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_in_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/swap_ranges.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _I1, class _I2>
using swap_ranges_result = in_in_result<_I1, _I2>;

namespace __swap_ranges {
struct __fn {
  template <input_iterator _I1, sentinel_for<_I1> _S1, input_iterator _I2, sentinel_for<_I2> _S2>
    requires indirectly_swappable<_I1, _I2>
  _LIBCPP_HIDE_FROM_ABI constexpr swap_ranges_result<_I1, _I2>
  operator()(_I1 __first1, _S1 __last1, _I2 __first2, _S2 __last2) const {
    auto __ret = std::__swap_ranges<_RangeAlgPolicy>(
        std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2));
    return {std::move(__ret.first), std::move(__ret.second)};
  }

  template <input_range _R1, input_range _R2>
    requires indirectly_swappable<iterator_t<_R1>, iterator_t<_R2>>
  _LIBCPP_HIDE_FROM_ABI constexpr swap_ranges_result<borrowed_iterator_t<_R1>, borrowed_iterator_t<_R2>>
  operator()(_R1&& __r1, _R2&& __r2) const {
    return operator()(ranges::begin(__r1), ranges::end(__r1), ranges::begin(__r2), ranges::end(__r2));
  }
};
} // namespace __swap_ranges

inline namespace __cpo {
inline constexpr auto swap_ranges = __swap_ranges::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_SWAP_RANGES_H
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_swap_ranges.h" 3
#endif /* ranges_swap_ranges.h expanded by -frewrite-includes */
# 1924 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_transform.h expanded by -frewrite-includes */
#include <__algorithm/ranges_transform.h>
#else /* ranges_transform.h expanded by -frewrite-includes */
# 1924 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_TRANSFORM_H
#define _LIBCPP___ALGORITHM_RANGES_TRANSFORM_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _Ip, class _Op>
using unary_transform_result = in_out_result<_Ip, _Op>;

template <class _I1, class _I2, class _O1>
using binary_transform_result = in_in_out_result<_I1, _I2, _O1>;

namespace __transform {
struct __fn {
private:
  template <class _InIter, class _Sent, class _OutIter, class _Func, class _Proj>
  _LIBCPP_HIDE_FROM_ABI static constexpr unary_transform_result<_InIter, _OutIter>
  __unary(_InIter __first, _Sent __last, _OutIter __result, _Func& __operation, _Proj& __projection) {
    while (__first != __last) {
      *__result = std::invoke(__operation, std::invoke(__projection, *__first));
      ++__first;
      ++__result;
    }

    return {std::move(__first), std::move(__result)};
  }

  template <class _InIter1,
            class _Sent1,
            class _InIter2,
            class _Sent2,
            class _OutIter,
            class _Func,
            class _Proj1,
            class _Proj2>
  _LIBCPP_HIDE_FROM_ABI static constexpr binary_transform_result<_InIter1, _InIter2, _OutIter>
  __binary(_InIter1 __first1,
           _Sent1 __last1,
           _InIter2 __first2,
           _Sent2 __last2,
           _OutIter __result,
           _Func& __binary_operation,
           _Proj1& __projection1,
           _Proj2& __projection2) {
    while (__first1 != __last1 && __first2 != __last2) {
      *__result =
          std::invoke(__binary_operation, std::invoke(__projection1, *__first1), std::invoke(__projection2, *__first2));
      ++__first1;
      ++__first2;
      ++__result;
    }
    return {std::move(__first1), std::move(__first2), std::move(__result)};
  }

public:
  template <input_iterator _InIter,
            sentinel_for<_InIter> _Sent,
            weakly_incrementable _OutIter,
            copy_constructible _Func,
            class _Proj = identity>
    requires indirectly_writable<_OutIter, indirect_result_t<_Func&, projected<_InIter, _Proj>>>
  _LIBCPP_HIDE_FROM_ABI constexpr unary_transform_result<_InIter, _OutIter>
  operator()(_InIter __first, _Sent __last, _OutIter __result, _Func __operation, _Proj __proj = {}) const {
    return __unary(std::move(__first), std::move(__last), std::move(__result), __operation, __proj);
  }

  template <input_range _Range, weakly_incrementable _OutIter, copy_constructible _Func, class _Proj = identity>
    requires indirectly_writable<_OutIter, indirect_result_t<_Func, projected<iterator_t<_Range>, _Proj>>>
  _LIBCPP_HIDE_FROM_ABI constexpr unary_transform_result<borrowed_iterator_t<_Range>, _OutIter>
  operator()(_Range&& __range, _OutIter __result, _Func __operation, _Proj __projection = {}) const {
    return __unary(ranges::begin(__range), ranges::end(__range), std::move(__result), __operation, __projection);
  }

  template <input_iterator _InIter1,
            sentinel_for<_InIter1> _Sent1,
            input_iterator _InIter2,
            sentinel_for<_InIter2> _Sent2,
            weakly_incrementable _OutIter,
            copy_constructible _Func,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_writable<_OutIter,
                                 indirect_result_t<_Func&, projected<_InIter1, _Proj1>, projected<_InIter2, _Proj2>>>
  _LIBCPP_HIDE_FROM_ABI constexpr binary_transform_result<_InIter1, _InIter2, _OutIter> operator()(
      _InIter1 __first1,
      _Sent1 __last1,
      _InIter2 __first2,
      _Sent2 __last2,
      _OutIter __result,
      _Func __binary_operation,
      _Proj1 __projection1 = {},
      _Proj2 __projection2 = {}) const {
    return __binary(
        std::move(__first1),
        std::move(__last1),
        std::move(__first2),
        std::move(__last2),
        std::move(__result),
        __binary_operation,
        __projection1,
        __projection2);
  }

  template <input_range _Range1,
            input_range _Range2,
            weakly_incrementable _OutIter,
            copy_constructible _Func,
            class _Proj1 = identity,
            class _Proj2 = identity>
    requires indirectly_writable<
        _OutIter,
        indirect_result_t<_Func&, projected<iterator_t<_Range1>, _Proj1>, projected<iterator_t<_Range2>, _Proj2>>>
  _LIBCPP_HIDE_FROM_ABI constexpr binary_transform_result<borrowed_iterator_t<_Range1>,
                                                          borrowed_iterator_t<_Range2>,
                                                          _OutIter>
  operator()(_Range1&& __range1,
             _Range2&& __range2,
             _OutIter __result,
             _Func __binary_operation,
             _Proj1 __projection1 = {},
             _Proj2 __projection2 = {}) const {
    return __binary(
        ranges::begin(__range1),
        ranges::end(__range1),
        ranges::begin(__range2),
        ranges::end(__range2),
        std::move(__result),
        __binary_operation,
        __projection1,
        __projection2);
  }
};
} // namespace __transform

inline namespace __cpo {
inline constexpr auto transform = __transform::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 171 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_TRANSFORM_H
# 173 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_transform.h" 3
#endif /* ranges_transform.h expanded by -frewrite-includes */
# 1925 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_unique.h expanded by -frewrite-includes */
#include <__algorithm/ranges_unique.h>
#else /* ranges_unique.h expanded by -frewrite-includes */
# 1925 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_UNIQUE_H
#define _LIBCPP___ALGORITHM_RANGES_UNIQUE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* unique.h expanded by -frewrite-includes */
#include <__algorithm/unique.h>
#else /* unique.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_UNIQUE_H
#define _LIBCPP___ALGORITHM_UNIQUE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/adjacent_find.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// unique

template <class _AlgPolicy, class _Iter, class _Sent, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 std::pair<_Iter, _Iter>
__unique(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
  __first = std::__adjacent_find(__first, __last, __pred);
  if (__first != __last) {
    // ...  a  a  ?  ...
    //      f     i
    _Iter __i = __first;
    for (++__i; ++__i != __last;)
      if (!__pred(*__first, *__i))
        *++__first = _IterOps<_AlgPolicy>::__iter_move(__i);
    ++__first;
    return std::pair<_Iter, _Iter>(std::move(__first), std::move(__i));
  }
  return std::pair<_Iter, _Iter>(__first, __first);
}

template <class _ForwardIterator, class _BinaryPredicate>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
unique(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred) {
  return std::__unique<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __pred).first;
}

template <class _ForwardIterator>
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
unique(_ForwardIterator __first, _ForwardIterator __last) {
  return std::unique(__first, __last, __equal_to());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_UNIQUE_H
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique.h" 3
#endif /* unique.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/permutable.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __unique {

struct __fn {
  template <permutable _Iter,
            sentinel_for<_Iter> _Sent,
            class _Proj                                                  = identity,
            indirect_equivalence_relation<projected<_Iter, _Proj>> _Comp = ranges::equal_to>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter>
  operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __ret =
        std::__unique<_RangeAlgPolicy>(std::move(__first), std::move(__last), std::__make_projected(__comp, __proj));
    return {std::move(__ret.first), std::move(__ret.second)};
  }

  template <forward_range _Range,
            class _Proj                                                               = identity,
            indirect_equivalence_relation<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::equal_to>
    requires permutable<iterator_t<_Range>>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range>
  operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __ret = std::__unique<_RangeAlgPolicy>(
        ranges::begin(__range), ranges::end(__range), std::__make_projected(__comp, __proj));
    return {std::move(__ret.first), std::move(__ret.second)};
  }
};

} // namespace __unique

inline namespace __cpo {
inline constexpr auto unique = __unique::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_UNIQUE_H
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique.h" 3
#endif /* ranges_unique.h expanded by -frewrite-includes */
# 1926 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_unique_copy.h expanded by -frewrite-includes */
#include <__algorithm/ranges_unique_copy.h>
#else /* ranges_unique_copy.h expanded by -frewrite-includes */
# 1926 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_UNIQUE_COPY_H
#define _LIBCPP___ALGORITHM_RANGES_UNIQUE_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/in_out_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/make_projected.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* unique_copy.h expanded by -frewrite-includes */
#include <__algorithm/unique_copy.h>
#else /* unique_copy.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_UNIQUE_COPY_H
#define _LIBCPP___ALGORITHM_UNIQUE_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/comp.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_base_of.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace __unique_copy_tags {

struct __reread_from_input_tag {};
struct __reread_from_output_tag {};
struct __read_from_tmp_value_tag {};

} // namespace __unique_copy_tags

template <class _AlgPolicy, class _BinaryPredicate, class _InputIterator, class _Sent, class _OutputIterator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _OutputIterator>
__unique_copy(_InputIterator __first,
              _Sent __last,
              _OutputIterator __result,
              _BinaryPredicate&& __pred,
              __unique_copy_tags::__read_from_tmp_value_tag) {
  if (__first != __last) {
    typename _IterOps<_AlgPolicy>::template __value_type<_InputIterator> __t(*__first);
    *__result = __t;
    ++__result;
    while (++__first != __last) {
      if (!__pred(__t, *__first)) {
        __t       = *__first;
        *__result = __t;
        ++__result;
      }
    }
  }
  return pair<_InputIterator, _OutputIterator>(std::move(__first), std::move(__result));
}

template <class _AlgPolicy, class _BinaryPredicate, class _ForwardIterator, class _Sent, class _OutputIterator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator, _OutputIterator>
__unique_copy(_ForwardIterator __first,
              _Sent __last,
              _OutputIterator __result,
              _BinaryPredicate&& __pred,
              __unique_copy_tags::__reread_from_input_tag) {
  if (__first != __last) {
    _ForwardIterator __i = __first;
    *__result            = *__i;
    ++__result;
    while (++__first != __last) {
      if (!__pred(*__i, *__first)) {
        *__result = *__first;
        ++__result;
        __i = __first;
      }
    }
  }
  return pair<_ForwardIterator, _OutputIterator>(std::move(__first), std::move(__result));
}

template <class _AlgPolicy, class _BinaryPredicate, class _InputIterator, class _Sent, class _InputAndOutputIterator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _InputAndOutputIterator>
__unique_copy(_InputIterator __first,
              _Sent __last,
              _InputAndOutputIterator __result,
              _BinaryPredicate&& __pred,
              __unique_copy_tags::__reread_from_output_tag) {
  if (__first != __last) {
    *__result = *__first;
    while (++__first != __last)
      if (!__pred(*__result, *__first))
        *++__result = *__first;
    ++__result;
  }
  return pair<_InputIterator, _InputAndOutputIterator>(std::move(__first), std::move(__result));
}

template <class _InputIterator, class _OutputIterator, class _BinaryPredicate>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryPredicate __pred) {
  using __algo_tag = __conditional_t<
      is_base_of<forward_iterator_tag, typename iterator_traits<_InputIterator>::iterator_category>::value,
      __unique_copy_tags::__reread_from_input_tag,
      __conditional_t<
          is_base_of<forward_iterator_tag, typename iterator_traits<_OutputIterator>::iterator_category>::value &&
              is_same< typename iterator_traits<_InputIterator>::value_type,
                       typename iterator_traits<_OutputIterator>::value_type>::value,
          __unique_copy_tags::__reread_from_output_tag,
          __unique_copy_tags::__read_from_tmp_value_tag> >;
  return std::__unique_copy<_ClassicAlgPolicy>(
             std::move(__first), std::move(__last), std::move(__result), __pred, __algo_tag())
      .second;
}

template <class _InputIterator, class _OutputIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
  return std::unique_copy(std::move(__first), std::move(__last), std::move(__result), __equal_to());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_UNIQUE_COPY_H
# 123 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/unique_copy.h" 3
#endif /* unique_copy.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _InIter, class _OutIter>
using unique_copy_result = in_out_result<_InIter, _OutIter>;

namespace __unique_copy {

template <class _InIter, class _OutIter>
concept __can_reread_from_output = (input_iterator<_OutIter> && same_as<iter_value_t<_InIter>, iter_value_t<_OutIter>>);

struct __fn {
  template <class _InIter, class _OutIter>
  static consteval auto __get_algo_tag() {
    if constexpr (forward_iterator<_InIter>) {
      return __unique_copy_tags::__reread_from_input_tag{};
    } else if constexpr (__can_reread_from_output<_InIter, _OutIter>) {
      return __unique_copy_tags::__reread_from_output_tag{};
    } else if constexpr (indirectly_copyable_storable<_InIter, _OutIter>) {
      return __unique_copy_tags::__read_from_tmp_value_tag{};
    }
  }

  template <class _InIter, class _OutIter>
  using __algo_tag_t = decltype(__get_algo_tag<_InIter, _OutIter>());

  template <input_iterator _InIter,
            sentinel_for<_InIter> _Sent,
            weakly_incrementable _OutIter,
            class _Proj                                                    = identity,
            indirect_equivalence_relation<projected<_InIter, _Proj>> _Comp = ranges::equal_to>
    requires indirectly_copyable<_InIter, _OutIter> &&
             (forward_iterator<_InIter> ||
              (input_iterator<_OutIter> && same_as<iter_value_t<_InIter>, iter_value_t<_OutIter>>) ||
              indirectly_copyable_storable<_InIter, _OutIter>)
  _LIBCPP_HIDE_FROM_ABI constexpr unique_copy_result<_InIter, _OutIter>
  operator()(_InIter __first, _Sent __last, _OutIter __result, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __ret = std::__unique_copy<_RangeAlgPolicy>(
        std::move(__first),
        std::move(__last),
        std::move(__result),
        std::__make_projected(__comp, __proj),
        __algo_tag_t<_InIter, _OutIter>());
    return {std::move(__ret.first), std::move(__ret.second)};
  }

  template <input_range _Range,
            weakly_incrementable _OutIter,
            class _Proj                                                               = identity,
            indirect_equivalence_relation<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::equal_to>
    requires indirectly_copyable<iterator_t<_Range>, _OutIter> &&
             (forward_iterator<iterator_t<_Range>> ||
              (input_iterator<_OutIter> && same_as<range_value_t<_Range>, iter_value_t<_OutIter>>) ||
              indirectly_copyable_storable<iterator_t<_Range>, _OutIter>)
  _LIBCPP_HIDE_FROM_ABI constexpr unique_copy_result<borrowed_iterator_t<_Range>, _OutIter>
  operator()(_Range&& __range, _OutIter __result, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __ret = std::__unique_copy<_RangeAlgPolicy>(
        ranges::begin(__range),
        ranges::end(__range),
        std::move(__result),
        std::__make_projected(__comp, __proj),
        __algo_tag_t<iterator_t<_Range>, _OutIter>());
    return {std::move(__ret.first), std::move(__ret.second)};
  }
};

} // namespace __unique_copy

inline namespace __cpo {
inline constexpr auto unique_copy = __unique_copy::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 114 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_UNIQUE_COPY_H
# 116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_unique_copy.h" 3
#endif /* ranges_unique_copy.h expanded by -frewrite-includes */
# 1927 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_upper_bound.h expanded by -frewrite-includes */
#include <__algorithm/ranges_upper_bound.h>
#else /* ranges_upper_bound.h expanded by -frewrite-includes */
# 1927 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_RANGES_UPPER_BOUND_H
#define _LIBCPP___ALGORITHM_RANGES_UPPER_BOUND_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/lower_bound.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/projected.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
namespace __upper_bound {
struct __fn {
  template <forward_iterator _Iter,
            sentinel_for<_Iter> _Sent,
            class _Type,
            class _Proj                                                             = identity,
            indirect_strict_weak_order<const _Type*, projected<_Iter, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Iter
  operator()(_Iter __first, _Sent __last, const _Type& __value, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __comp_lhs_rhs_swapped = [&](const auto& __lhs, const auto& __rhs) {
      return !std::invoke(__comp, __rhs, __lhs);
    };

    return std::__lower_bound<_RangeAlgPolicy>(__first, __last, __value, __comp_lhs_rhs_swapped, __proj);
  }

  template <forward_range _Range,
            class _Type,
            class _Proj                                                                          = identity,
            indirect_strict_weak_order<const _Type*, projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
  operator()(_Range&& __r, const _Type& __value, _Comp __comp = {}, _Proj __proj = {}) const {
    auto __comp_lhs_rhs_swapped = [&](const auto& __lhs, const auto& __rhs) {
      return !std::invoke(__comp, __rhs, __lhs);
    };

    return std::__lower_bound<_RangeAlgPolicy>(
        ranges::begin(__r), ranges::end(__r), __value, __comp_lhs_rhs_swapped, __proj);
  }
};
} // namespace __upper_bound

inline namespace __cpo {
inline constexpr auto upper_bound = __upper_bound::__fn{};
} // namespace __cpo
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3

#endif // _LIBCPP___ALGORITHM_RANGES_UPPER_BOUND_H
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h" 3
#endif /* ranges_upper_bound.h expanded by -frewrite-includes */
# 1928 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* remove.h expanded by -frewrite-includes */
#include <__algorithm/remove.h>
#else /* remove.h expanded by -frewrite-includes */
# 1928 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_REMOVE_H
#define _LIBCPP___ALGORITHM_REMOVE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/find.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/find_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ForwardIterator, class _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
{
    __first = _VSTD::find(__first, __last, __value);
    if (__first != __last)
    {
        _ForwardIterator __i = __first;
        while (++__i != __last)
        {
            if (!(*__i == __value))
            {
                *__first = _VSTD::move(*__i);
                ++__first;
            }
        }
    }
    return __first;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_REMOVE_H
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove.h" 3
#endif /* remove.h expanded by -frewrite-includes */
# 1929 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* remove_copy.h expanded by -frewrite-includes */
#include <__algorithm/remove_copy.h>
#else /* remove_copy.h expanded by -frewrite-includes */
# 1929 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_REMOVE_COPY_H
#define _LIBCPP___ALGORITHM_REMOVE_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_copy.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _OutputIterator, class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
remove_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __value)
{
    for (; __first != __last; ++__first)
    {
        if (!(*__first == __value))
        {
            *__result = *__first;
            ++__result;
        }
    }
    return __result;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_REMOVE_COPY_H
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_copy.h" 3
#endif /* remove_copy.h expanded by -frewrite-includes */
# 1930 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/remove_copy_if.h>
#endif /* expanded by -frewrite-includes */
# 1930 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1931 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* remove_if.h expanded by -frewrite-includes */
#include <__algorithm/remove_if.h>
#else /* remove_if.h expanded by -frewrite-includes */
# 1931 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_if.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_REMOVE_IF_H
#define _LIBCPP___ALGORITHM_REMOVE_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/find_if.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_if.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_if.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_if.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_if.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ForwardIterator, class _Predicate>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
{
    __first = _VSTD::find_if<_ForwardIterator, _Predicate&>(__first, __last, __pred);
    if (__first != __last)
    {
        _ForwardIterator __i = __first;
        while (++__i != __last)
        {
            if (!__pred(*__i))
            {
                *__first = _VSTD::move(*__i);
                ++__first;
            }
        }
    }
    return __first;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_REMOVE_IF_H
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/remove_if.h" 3
#endif /* remove_if.h expanded by -frewrite-includes */
# 1932 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* replace.h expanded by -frewrite-includes */
#include <__algorithm/replace.h>
#else /* replace.h expanded by -frewrite-includes */
# 1932 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_REPLACE_H
#define _LIBCPP___ALGORITHM_REPLACE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ForwardIterator, class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
replace(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value, const _Tp& __new_value)
{
    for (; __first != __last; ++__first)
        if (*__first == __old_value)
            *__first = __new_value;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_REPLACE_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace.h" 3
#endif /* replace.h expanded by -frewrite-includes */
# 1933 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* replace_copy.h expanded by -frewrite-includes */
#include <__algorithm/replace_copy.h>
#else /* replace_copy.h expanded by -frewrite-includes */
# 1933 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_REPLACE_COPY_H
#define _LIBCPP___ALGORITHM_REPLACE_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_copy.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _OutputIterator, class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
replace_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result,
             const _Tp& __old_value, const _Tp& __new_value)
{
    for (; __first != __last; ++__first, (void) ++__result)
        if (*__first == __old_value)
            *__result = __new_value;
        else
            *__result = *__first;
    return __result;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_REPLACE_COPY_H
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_copy.h" 3
#endif /* replace_copy.h expanded by -frewrite-includes */
# 1934 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* replace_copy_if.h expanded by -frewrite-includes */
#include <__algorithm/replace_copy_if.h>
#else /* replace_copy_if.h expanded by -frewrite-includes */
# 1934 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_copy_if.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_REPLACE_COPY_IF_H
#define _LIBCPP___ALGORITHM_REPLACE_COPY_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_copy_if.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_copy_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_copy_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_copy_if.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_copy_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _OutputIterator, class _Predicate, class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
replace_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result,
                _Predicate __pred, const _Tp& __new_value)
{
    for (; __first != __last; ++__first, (void) ++__result)
        if (__pred(*__first))
            *__result = __new_value;
        else
            *__result = *__first;
    return __result;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_REPLACE_COPY_IF_H
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_copy_if.h" 3
#endif /* replace_copy_if.h expanded by -frewrite-includes */
# 1935 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* replace_if.h expanded by -frewrite-includes */
#include <__algorithm/replace_if.h>
#else /* replace_if.h expanded by -frewrite-includes */
# 1935 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_if.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_REPLACE_IF_H
#define _LIBCPP___ALGORITHM_REPLACE_IF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_if.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_if.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_if.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_if.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_if.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ForwardIterator, class _Predicate, class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
void
replace_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, const _Tp& __new_value)
{
    for (; __first != __last; ++__first)
        if (__pred(*__first))
            *__first = __new_value;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_REPLACE_IF_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/replace_if.h" 3
#endif /* replace_if.h expanded by -frewrite-includes */
# 1936 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/reverse.h>
#endif /* expanded by -frewrite-includes */
# 1936 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1937 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* reverse_copy.h expanded by -frewrite-includes */
#include <__algorithm/reverse_copy.h>
#else /* reverse_copy.h expanded by -frewrite-includes */
# 1937 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_REVERSE_COPY_H
#define _LIBCPP___ALGORITHM_REVERSE_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse_copy.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _BidirectionalIterator, class _OutputIterator>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result)
{
    for (; __first != __last; ++__result)
        *__result = *--__last;
    return __result;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_REVERSE_COPY_H
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/reverse_copy.h" 3
#endif /* reverse_copy.h expanded by -frewrite-includes */
# 1938 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/rotate.h>
#endif /* expanded by -frewrite-includes */
# 1938 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1939 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* rotate_copy.h expanded by -frewrite-includes */
#include <__algorithm/rotate_copy.h>
#else /* rotate_copy.h expanded by -frewrite-includes */
# 1939 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate_copy.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_ROTATE_COPY_H
#define _LIBCPP___ALGORITHM_ROTATE_COPY_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate_copy.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate_copy.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate_copy.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate_copy.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate_copy.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate_copy.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ForwardIterator, class _OutputIterator>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_OutputIterator
rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, _OutputIterator __result)
{
    return _VSTD::copy(__first, __middle, _VSTD::copy(__middle, __last, __result));
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_ROTATE_COPY_H
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/rotate_copy.h" 3
#endif /* rotate_copy.h expanded by -frewrite-includes */
# 1940 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/sample.h>
#endif /* expanded by -frewrite-includes */
# 1940 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1941 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/search.h>
#endif /* expanded by -frewrite-includes */
# 1941 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1942 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/search_n.h>
#endif /* expanded by -frewrite-includes */
# 1942 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1943 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/set_difference.h>
#endif /* expanded by -frewrite-includes */
# 1943 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1944 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/set_intersection.h>
#endif /* expanded by -frewrite-includes */
# 1944 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1945 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/set_symmetric_difference.h>
#endif /* expanded by -frewrite-includes */
# 1945 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1946 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/set_union.h>
#endif /* expanded by -frewrite-includes */
# 1946 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1947 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* shift_left.h expanded by -frewrite-includes */
#include <__algorithm/shift_left.h>
#else /* shift_left.h expanded by -frewrite-includes */
# 1947 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_left.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_SHIFT_LEFT_H
#define _LIBCPP___ALGORITHM_SHIFT_LEFT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/move.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_left.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_left.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_left.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_left.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_left.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_left.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_left.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_left.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_left.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_left.h" 3

template <class _ForwardIterator>
inline _LIBCPP_INLINE_VISIBILITY constexpr
_ForwardIterator
shift_left(_ForwardIterator __first, _ForwardIterator __last,
           typename iterator_traits<_ForwardIterator>::difference_type __n)
{
    if (__n == 0) {
        return __last;
    }

    _ForwardIterator __m = __first;
    if constexpr (__has_random_access_iterator_category<_ForwardIterator>::value) {
        if (__n >= __last - __first) {
            return __first;
        }
        __m += __n;
    } else {
        for (; __n > 0; --__n) {
            if (__m == __last) {
                return __first;
            }
            ++__m;
        }
    }
    return _VSTD::move(__m, __last, __first);
}

#endif // _LIBCPP_STD_VER >= 20
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_left.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_SHIFT_LEFT_H
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_left.h" 3
#endif /* shift_left.h expanded by -frewrite-includes */
# 1948 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* shift_right.h expanded by -frewrite-includes */
#include <__algorithm/shift_right.h>
#else /* shift_right.h expanded by -frewrite-includes */
# 1948 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ALGORITHM_SHIFT_RIGHT_H
#define _LIBCPP___ALGORITHM_SHIFT_RIGHT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/move.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/move_backward.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/swap_ranges.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3

template <class _ForwardIterator>
inline _LIBCPP_INLINE_VISIBILITY constexpr
_ForwardIterator
shift_right(_ForwardIterator __first, _ForwardIterator __last,
            typename iterator_traits<_ForwardIterator>::difference_type __n)
{
    if (__n == 0) {
        return __first;
    }

    if constexpr (__has_random_access_iterator_category<_ForwardIterator>::value) {
        decltype(__n) __d = __last - __first;
        if (__n >= __d) {
            return __last;
        }
        _ForwardIterator __m = __first + (__d - __n);
        return _VSTD::move_backward(__first, __m, __last);
    } else if constexpr (__has_bidirectional_iterator_category<_ForwardIterator>::value) {
        _ForwardIterator __m = __last;
        for (; __n > 0; --__n) {
            if (__m == __first) {
                return __last;
            }
            --__m;
        }
        return _VSTD::move_backward(__first, __m, __last);
    } else {
        _ForwardIterator __ret = __first;
        for (; __n > 0; --__n) {
            if (__ret == __last) {
                return __last;
            }
            ++__ret;
        }

        // We have an __n-element scratch space from __first to __ret.
        // Slide an __n-element window [__trail, __lead) from left to right.
        // We're essentially doing swap_ranges(__first, __ret, __trail, __lead)
        // over and over; but once __lead reaches __last we needn't bother
        // to save the values of elements [__trail, __last).

        auto __trail = __first;
        auto __lead = __ret;
        while (__trail != __ret) {
            if (__lead == __last) {
                _VSTD::move(__first, __trail, __ret);
                return __ret;
            }
            ++__trail;
            ++__lead;
        }

        _ForwardIterator __mid = __first;
        while (true) {
            if (__lead == __last) {
                __trail = _VSTD::move(__mid, __ret, __trail);
                _VSTD::move(__first, __mid, __trail);
                return __ret;
            }
            swap(*__mid, *__trail);
            ++__mid;
            ++__trail;
            ++__lead;
            if (__mid == __ret) {
                __mid = __first;
            }
        }
    }
}

#endif // _LIBCPP_STD_VER >= 20
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ALGORITHM_SHIFT_RIGHT_H
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__algorithm/shift_right.h" 3
#endif /* shift_right.h expanded by -frewrite-includes */
# 1949 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/shuffle.h>
#endif /* expanded by -frewrite-includes */
# 1949 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1950 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/sift_down.h>
#endif /* expanded by -frewrite-includes */
# 1950 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1951 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/sort.h>
#endif /* expanded by -frewrite-includes */
# 1951 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1952 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/sort_heap.h>
#endif /* expanded by -frewrite-includes */
# 1952 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1953 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/stable_partition.h>
#endif /* expanded by -frewrite-includes */
# 1953 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1954 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/stable_sort.h>
#endif /* expanded by -frewrite-includes */
# 1954 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1955 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/swap_ranges.h>
#endif /* expanded by -frewrite-includes */
# 1955 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1956 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/transform.h>
#endif /* expanded by -frewrite-includes */
# 1956 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1957 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/unique.h>
#endif /* expanded by -frewrite-includes */
# 1957 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1958 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/unique_copy.h>
#endif /* expanded by -frewrite-includes */
# 1958 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1959 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/unwrap_iter.h>
#endif /* expanded by -frewrite-includes */
# 1959 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1960 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/upper_bound.h>
#endif /* expanded by -frewrite-includes */
# 1960 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1961 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3

// standard-mandated includes

// [algorithm.syn]
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 1965 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1966 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1968 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 1969 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#endif
# 1970 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1972 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#  include <atomic>
#endif /* expanded by -frewrite-includes */
# 1972 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1973 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#  include <bit>
#endif /* expanded by -frewrite-includes */
# 1973 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1974 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 1974 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1975 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 1975 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1976 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstring>
#endif /* expanded by -frewrite-includes */
# 1976 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1977 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iterator>
#endif /* expanded by -frewrite-includes */
# 1977 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1978 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#  include <memory>
#endif /* expanded by -frewrite-includes */
# 1978 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1979 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#  include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 1979 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1980 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 1980 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1981 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#if 0 /* expanded by -frewrite-includes */
#  include <utility>
#endif /* expanded by -frewrite-includes */
# 1981 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
# 1982 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#endif
# 1983 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3

#endif // _LIBCPP_ALGORITHM
# 1985 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/algorithm" 3
#endif /* algorithm expanded by -frewrite-includes */
# 11 "../../sdk/lib/ld/include/lib/ld/internal/filter-view.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges expanded by -frewrite-includes */
#include <ranges>
#else /* ranges expanded by -frewrite-includes */
# 11 "../../sdk/lib/ld/include/lib/ld/internal/filter-view.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_RANGES
#define _LIBCPP_RANGES

/*

#include <compare>              // see [compare.syn]
#include <initializer_list>     // see [initializer.list.syn]
#include <iterator>             // see [iterator.synopsis]

namespace std::ranges {
  inline namespace unspecified {
    // [range.access], range access
    inline constexpr unspecified begin = unspecified;
    inline constexpr unspecified end = unspecified;
    inline constexpr unspecified cbegin = unspecified;
    inline constexpr unspecified cend = unspecified;

    inline constexpr unspecified size = unspecified;
    inline constexpr unspecified ssize = unspecified;
  }

  // [range.range], ranges
  template<class T>
    concept range = see below;

  template<class T>
    inline constexpr bool enable_borrowed_range = false;

  template<class T>
    using iterator_t = decltype(ranges::begin(declval<T&>()));
  template<range R>
    using sentinel_t = decltype(ranges::end(declval<R&>()));
  template<range R>
    using range_difference_t = iter_difference_t<iterator_t<R>>;
  template<sized_range R>
    using range_size_t = decltype(ranges::size(declval<R&>()));
  template<range R>
    using range_value_t = iter_value_t<iterator_t<R>>;
  template<range R>
    using range_reference_t = iter_reference_t<iterator_t<R>>;
  template<range R>
    using range_rvalue_reference_t = iter_rvalue_reference_t<iterator_t<R>>;
  template <range R>
    using range_common_reference_t = iter_common_reference_t<iterator_t<R>>;

  // [range.sized], sized ranges
  template<class>
    inline constexpr bool disable_sized_range = false;

  template<class T>
    concept sized_range = ...;

  // [range.view], views
  template<class T>
    inline constexpr bool enable_view = ...;

  struct view_base { };

  template<class T>
    concept view = ...;

  // [range.refinements], other range refinements
  template<class R, class T>
    concept output_range = see below;

  template<class T>
    concept input_range = see below;

  template<class T>
    concept forward_range = see below;

  template<class T>
  concept bidirectional_range = see below;

  template<class T>
  concept random_access_range = see below;

  template<class T>
  concept contiguous_range = see below;

  template <class _Tp>
    concept common_range = see below;

  template<class T>
  concept viewable_range = see below;

  // [view.interface], class template view_interface
  template<class D>
    requires is_class_v<D> && same_as<D, remove_cv_t<D>>
  class view_interface;

  // [range.subrange], sub-ranges
  enum class subrange_kind : bool { unsized, sized };

  template<input_or_output_iterator I, sentinel_for<I> S = I, subrange_kind K = see below>
    requires (K == subrange_kind::sized || !sized_sentinel_for<S, I>)
  class subrange;

  template<class I, class S, subrange_kind K>
    inline constexpr bool enable_borrowed_range<subrange<I, S, K>> = true;

  // [range.dangling], dangling iterator handling
  struct dangling;

  template<range R>
    using borrowed_iterator_t = see below;

  template<range R>
    using borrowed_subrange_t = see below;

  // [range.elements], elements view
  template<input_range V, size_t N>
    requires see below
  class elements_view;

  template<class T, size_t N>
    inline constexpr bool enable_borrowed_range<elements_view<T, N>> =
      enable_borrowed_range<T>;

  template<class R>
    using keys_view = elements_view<R, 0>;
  template<class R>
    using values_view = elements_view<R, 1>;

  namespace views {
    template<size_t N>
      inline constexpr unspecified elements = unspecified;
    inline constexpr auto keys = elements<0>;
    inline constexpr auto values = elements<1>;
  }

  // [range.utility.conv], range conversions
  template<class C, input_range R, class... Args> requires (!view<C>)
    constexpr C to(R&& r, Args&&... args);     // Since C++23
  template<template<class...> class C, input_range R, class... Args>
    constexpr auto to(R&& r, Args&&... args);  // Since C++23
  template<class C, class... Args> requires (!view<C>)
    constexpr auto to(Args&&... args);         // Since C++23
  template<template<class...> class C, class... Args>
    constexpr auto to(Args&&... args);         // Since C++23

  // [range.empty], empty view
  template<class T>
    requires is_object_v<T>
  class empty_view;

  template<class T>
    inline constexpr bool enable_borrowed_range<empty_view<T>> = true;

  namespace views {
    template<class T>
      inline constexpr empty_view<T> empty{};
  }

  // [range.all], all view
  namespace views {
    inline constexpr unspecified all = unspecified;

    template<viewable_range R>
      using all_t = decltype(all(declval<R>()));
  }

  template<range R>
    requires is_object_v<R>
  class ref_view;

  template<class T>
    inline constexpr bool enable_borrowed_range<ref_view<T>> = true;

  template<range R>
    requires see below
  class owning_view;

  template<class T>
    inline constexpr bool enable_borrowed_range<owning_view<T>> = enable_borrowed_range<T>;

  // [range.filter], filter view
  template<input_range V, indirect_unary_predicate<iterator_t<V>> Pred>
    requires view<V> && is_object_v<Pred>
  class filter_view;

  namespace views {
    inline constexpr unspecified filter = unspecified;
  }

  // [range.drop], drop view
  template<view V>
    class drop_view;

  template<class T>
    inline constexpr bool enable_borrowed_range<drop_view<T>> = enable_borrowed_range<T>;

  // [range.drop.while], drop while view
  template<view V, class Pred>
    requires input_range<V> && is_object_v<Pred> &&
             indirect_unary_predicate<const Pred, iterator_t<V>>
    class drop_while_view;

  template<class T, class Pred>
    inline constexpr bool enable_borrowed_range<drop_while_view<T, Pred>> =
      enable_borrowed_range<T>;

  namespace views { inline constexpr unspecified drop_while = unspecified; }

  // [range.transform], transform view
  template<input_range V, copy_constructible F>
    requires view<V> && is_object_v<F> &&
             regular_invocable<F&, range_reference_t<V>> &&
             can-reference<invoke_result_t<F&, range_reference_t<V>>>
  class transform_view;

  // [range.counted], counted view
  namespace views { inline constexpr unspecified counted = unspecified; }

  // [range.common], common view
  template<view V>
    requires (!common_range<V> && copyable<iterator_t<V>>)
  class common_view;

 // [range.reverse], reverse view
  template<view V>
    requires bidirectional_range<V>
  class reverse_view;

  template<class T>
    inline constexpr bool enable_borrowed_range<reverse_view<T>> = enable_borrowed_range<T>;

  template<class T>
  inline constexpr bool enable_borrowed_range<common_view<T>> = enable_borrowed_range<T>;

   // [range.take], take view
  template<view> class take_view;

  template<class T>
  inline constexpr bool enable_borrowed_range<take_view<T>> = enable_borrowed_range<T>;

    // [range.take.while], take while view
  template<view V, class Pred>
    requires input_range<V> && is_object_v<Pred> &&
             indirect_unary_predicate<const Pred, iterator_t<V>>
    class take_while_view;

  namespace views { inline constexpr unspecified take_while = unspecified; }

  template<copy_constructible T>
    requires is_object_v<T>
  class single_view;

  template<weakly_incrementable W, semiregular Bound = unreachable_sentinel_t>
    requires weakly-equality-comparable-with<W, Bound> && copyable<W>
  class iota_view;

  template<class W, class Bound>
    inline constexpr bool enable_borrowed_range<iota_view<W, Bound>> = true;

  // [range.repeat], repeat view
  template<class T>
    concept integer-like-with-usable-difference-type =  // exposition only
      is-signed-integer-like<T> || (is-integer-like<T> && weakly_incrementable<T>);

  template<move_constructible T, semiregular Bound = unreachable_sentinel_t>
    requires (is_object_v<T> && same_as<T, remove_cv_t<T>> &&
              (integer-like-with-usable-difference-type<Bound> ||
               same_as<Bound, unreachable_sentinel_t>))
  class repeat_view;

  namespace views { inline constexpr unspecified repeat = unspecified; }

  // [range.join], join view
  template<input_range V>
    requires view<V> && input_range<range_reference_t<V>>
  class join_view;

  // [range.lazy.split], lazy split view
  template<class R>
    concept tiny-range = see below;   // exposition only

  template<input_range V, forward_range Pattern>
    requires view<V> && view<Pattern> &&
             indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> &&
             (forward_range<V> || tiny-range<Pattern>)
  class lazy_split_view;

  // [range.split], split view
  template<forward_range V, forward_range Pattern>
    requires view<V> && view<Pattern> &&
             indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to>
  class split_view;

  namespace views {
    inline constexpr unspecified lazy_split = unspecified;
    inline constexpr unspecified split = unspecified;
  }

  // [range.istream], istream view
  template<movable Val, class CharT, class Traits = char_traits<CharT>>
    requires see below
  class basic_istream_view;

  template<class Val>
    using istream_view = basic_istream_view<Val, char>;

  template<class Val>
    using wistream_view = basic_istream_view<Val, wchar_t>;

  namespace views { template<class T> inline constexpr unspecified istream = unspecified; }

  // [range.zip], zip view
  template<input_range... Views>
    requires (view<Views> && ...) && (sizeof...(Views) > 0)
  class zip_view;        // C++23

  template<class... Views>
    inline constexpr bool enable_borrowed_range<zip_view<Views...>> =       // C++23
      (enable_borrowed_range<Views> && ...);

  namespace views { inline constexpr unspecified zip = unspecified; }       // C++23

  // [range.as.rvalue]
  template <view V>
    requires input_range<V>
  class as_rvalue_view;                                                     // C++23

  namespace views { inline constexpr unspecified as_rvalue ) unspecified; } // C++23

  [range.chunk.by]
  template<forward_range V, indirect_binary_predicate<iterator_t<V>, iterator_t<V>> Pred>
    requires view<V> && is_object_v<Pred>
  class chunk_by_view;                                                      // C++23

  namespace views { inline constexpr unspecified chunk_by = unspecified; }  // C++23
}

namespace std {
  namespace views = ranges::views;

  template<class T> struct tuple_size;
  template<size_t I, class T> struct tuple_element;

  template<class I, class S, ranges::subrange_kind K>
  struct tuple_size<ranges::subrange<I, S, K>>
    : integral_constant<size_t, 2> {};

  template<class I, class S, ranges::subrange_kind K>
  struct tuple_element<0, ranges::subrange<I, S, K>> {
    using type = I;
  };

  template<class I, class S, ranges::subrange_kind K>
  struct tuple_element<1, ranges::subrange<I, S, K>> {
    using type = S;
  };

  template<class I, class S, ranges::subrange_kind K>
  struct tuple_element<0, const ranges::subrange<I, S, K>> {
    using type = I;
  };

  template<class I, class S, ranges::subrange_kind K>
  struct tuple_element<1, const ranges::subrange<I, S, K>> {
    using type = S;
  };

  struct from_range_t { explicit from_range_t() = default; };  // Since C++23
  inline constexpr from_range_t from_range{};                  // Since C++23
}
*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 378 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 379 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 379 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 380 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 380 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 381 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* all.h expanded by -frewrite-includes */
#include <__ranges/all.h>
#else /* all.h expanded by -frewrite-includes */
# 381 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_ALL_H
#define _LIBCPP___RANGES_ALL_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* compose.h expanded by -frewrite-includes */
#include <__functional/compose.h>         // TODO(modules): Those should not be required
#else /* compose.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_COMPOSE_H
#define _LIBCPP___FUNCTIONAL_COMPOSE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* perfect_forward.h expanded by -frewrite-includes */
#include <__functional/perfect_forward.h>
#else /* perfect_forward.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_PERFECT_FORWARD_H
#define _LIBCPP___FUNCTIONAL_PERFECT_FORWARD_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/integer_sequence.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3

template <class _Op, class _Indices, class... _BoundArgs>
struct __perfect_forward_impl;

template <class _Op, size_t... _Idx, class... _BoundArgs>
struct __perfect_forward_impl<_Op, index_sequence<_Idx...>, _BoundArgs...> {
private:
  tuple<_BoundArgs...> __bound_args_;

public:
  template <class... _Args, class = enable_if_t<
    is_constructible_v<tuple<_BoundArgs...>, _Args&&...>
  >>
  _LIBCPP_HIDE_FROM_ABI explicit constexpr __perfect_forward_impl(_Args&&... __bound_args)
    : __bound_args_(_VSTD::forward<_Args>(__bound_args)...) {}

  _LIBCPP_HIDE_FROM_ABI __perfect_forward_impl(__perfect_forward_impl const&) = default;
  _LIBCPP_HIDE_FROM_ABI __perfect_forward_impl(__perfect_forward_impl&&) = default;

  _LIBCPP_HIDE_FROM_ABI __perfect_forward_impl& operator=(__perfect_forward_impl const&) = default;
  _LIBCPP_HIDE_FROM_ABI __perfect_forward_impl& operator=(__perfect_forward_impl&&) = default;

  template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs&..., _Args...>>>
  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) &
    noexcept(noexcept(_Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...)))
    -> decltype(      _Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...))
    { return          _Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...); }

  template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs&..., _Args...>>>
  auto operator()(_Args&&...) & = delete;

  template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs const&..., _Args...>>>
  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const&
    noexcept(noexcept(_Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...)))
    -> decltype(      _Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...))
    { return          _Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...); }

  template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs const&..., _Args...>>>
  auto operator()(_Args&&...) const& = delete;

  template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs..., _Args...>>>
  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) &&
    noexcept(noexcept(_Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...)))
    -> decltype(      _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...))
    { return          _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...); }

  template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs..., _Args...>>>
  auto operator()(_Args&&...) && = delete;

  template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs const..., _Args...>>>
  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const&&
    noexcept(noexcept(_Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...)))
    -> decltype(      _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...))
    { return          _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...); }

  template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs const..., _Args...>>>
  auto operator()(_Args&&...) const&& = delete;
};

// __perfect_forward implements a perfect-forwarding call wrapper as explained in [func.require].
template <class _Op, class ..._Args>
using __perfect_forward = __perfect_forward_impl<_Op, index_sequence_for<_Args...>, _Args...>;

#endif // _LIBCPP_STD_VER >= 17
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___FUNCTIONAL_PERFECT_FORWARD_H
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/perfect_forward.h" 3
#endif /* perfect_forward.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 3

struct __compose_op {
    template<class _Fn1, class _Fn2, class ..._Args>
    _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Fn1&& __f1, _Fn2&& __f2, _Args&&... __args) const
        noexcept(noexcept(_VSTD::invoke(_VSTD::forward<_Fn1>(__f1), _VSTD::invoke(_VSTD::forward<_Fn2>(__f2), _VSTD::forward<_Args>(__args)...))))
        -> decltype(      _VSTD::invoke(_VSTD::forward<_Fn1>(__f1), _VSTD::invoke(_VSTD::forward<_Fn2>(__f2), _VSTD::forward<_Args>(__args)...)))
        { return          _VSTD::invoke(_VSTD::forward<_Fn1>(__f1), _VSTD::invoke(_VSTD::forward<_Fn2>(__f2), _VSTD::forward<_Args>(__args)...)); }
};

template <class _Fn1, class _Fn2>
struct __compose_t : __perfect_forward<__compose_op, _Fn1, _Fn2> {
    using __perfect_forward<__compose_op, _Fn1, _Fn2>::__perfect_forward;
};

template <class _Fn1, class _Fn2>
_LIBCPP_HIDE_FROM_ABI
constexpr auto __compose(_Fn1&& __f1, _Fn2&& __f2)
    noexcept(noexcept(__compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(_VSTD::forward<_Fn1>(__f1), _VSTD::forward<_Fn2>(__f2))))
    -> decltype(      __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(_VSTD::forward<_Fn1>(__f1), _VSTD::forward<_Fn2>(__f2)))
    { return          __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(_VSTD::forward<_Fn1>(__f1), _VSTD::forward<_Fn2>(__f2)); }

#endif // _LIBCPP_STD_VER >= 20
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_COMPOSE_H
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/compose.h" 3
#endif /* compose.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/perfect_forward.h> //
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* owning_view.h expanded by -frewrite-includes */
#include <__ranges/owning_view.h>
#else /* owning_view.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_OWNING_VIEW_H
#define _LIBCPP___RANGES_OWNING_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/movable.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/data.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/empty.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3

namespace ranges {
  template<range _Rp>
    requires movable<_Rp> && (!__is_std_initializer_list<remove_cvref_t<_Rp>>)
  class owning_view : public view_interface<owning_view<_Rp>> {
    _Rp __r_ = _Rp();

public:
    _LIBCPP_HIDE_FROM_ABI owning_view() requires default_initializable<_Rp> = default;
    _LIBCPP_HIDE_FROM_ABI constexpr owning_view(_Rp&& __r) : __r_(std::move(__r)) {}

    _LIBCPP_HIDE_FROM_ABI owning_view(owning_view&&) = default;
    _LIBCPP_HIDE_FROM_ABI owning_view& operator=(owning_view&&) = default;

    _LIBCPP_HIDE_FROM_ABI constexpr _Rp& base() & noexcept { return __r_; }
    _LIBCPP_HIDE_FROM_ABI constexpr const _Rp& base() const& noexcept { return __r_; }
    _LIBCPP_HIDE_FROM_ABI constexpr _Rp&& base() && noexcept { return std::move(__r_); }
    _LIBCPP_HIDE_FROM_ABI constexpr const _Rp&& base() const&& noexcept { return std::move(__r_); }

    _LIBCPP_HIDE_FROM_ABI constexpr iterator_t<_Rp> begin() { return ranges::begin(__r_); }
    _LIBCPP_HIDE_FROM_ABI constexpr sentinel_t<_Rp> end() { return ranges::end(__r_); }
    _LIBCPP_HIDE_FROM_ABI constexpr auto begin() const requires range<const _Rp> { return ranges::begin(__r_); }
    _LIBCPP_HIDE_FROM_ABI constexpr auto end() const requires range<const _Rp> { return ranges::end(__r_); }

    _LIBCPP_HIDE_FROM_ABI constexpr bool empty() requires requires { ranges::empty(__r_); }
      { return ranges::empty(__r_); }
    _LIBCPP_HIDE_FROM_ABI constexpr bool empty() const requires requires { ranges::empty(__r_); }
      { return ranges::empty(__r_); }

    _LIBCPP_HIDE_FROM_ABI constexpr auto size() requires sized_range<_Rp>
      { return ranges::size(__r_); }
    _LIBCPP_HIDE_FROM_ABI constexpr auto size() const requires sized_range<const _Rp>
      { return ranges::size(__r_); }

    _LIBCPP_HIDE_FROM_ABI constexpr auto data() requires contiguous_range<_Rp>
      { return ranges::data(__r_); }
    _LIBCPP_HIDE_FROM_ABI constexpr auto data() const requires contiguous_range<const _Rp>
      { return ranges::data(__r_); }
  };
  _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(owning_view);

  template<class _Tp>
  inline constexpr bool enable_borrowed_range<owning_view<_Tp>> = enable_borrowed_range<_Tp>;

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___RANGES_OWNING_VIEW_H
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/owning_view.h" 3
#endif /* owning_view.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* range_adaptor.h expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#else /* range_adaptor.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_RANGE_ADAPTOR_H
#define _LIBCPP___RANGES_RANGE_ADAPTOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/derived_from.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/invocable.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/compose.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3

// CRTP base that one can derive from in order to be considered a range adaptor closure
// by the library. When deriving from this class, a pipe operator will be provided to
// make the following hold:
// - `x | f` is equivalent to `f(x)`
// - `f1 | f2` is an adaptor closure `g` such that `g(x)` is equivalent to `f2(f1(x))`
template <class _Tp>
struct __range_adaptor_closure;

// Type that wraps an arbitrary function object and makes it into a range adaptor closure,
// i.e. something that can be called via the `x | f` notation.
template <class _Fn>
struct __range_adaptor_closure_t : _Fn, __range_adaptor_closure<__range_adaptor_closure_t<_Fn>> {
    _LIBCPP_HIDE_FROM_ABI constexpr explicit __range_adaptor_closure_t(_Fn&& __f) : _Fn(std::move(__f)) { }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(__range_adaptor_closure_t);

template <class _Tp>
concept _RangeAdaptorClosure = derived_from<remove_cvref_t<_Tp>, __range_adaptor_closure<remove_cvref_t<_Tp>>>;

template <class _Tp>
struct __range_adaptor_closure {
    template <ranges::viewable_range _View, _RangeAdaptorClosure _Closure>
        requires same_as<_Tp, remove_cvref_t<_Closure>> &&
                 invocable<_Closure, _View>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    friend constexpr decltype(auto) operator|(_View&& __view, _Closure&& __closure)
        noexcept(is_nothrow_invocable_v<_Closure, _View>)
    { return std::invoke(std::forward<_Closure>(__closure), std::forward<_View>(__view)); }

    template <_RangeAdaptorClosure _Closure, _RangeAdaptorClosure _OtherClosure>
        requires same_as<_Tp, remove_cvref_t<_Closure>> &&
                 constructible_from<decay_t<_Closure>, _Closure> &&
                 constructible_from<decay_t<_OtherClosure>, _OtherClosure>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    friend constexpr auto operator|(_Closure&& __c1, _OtherClosure&& __c2)
        noexcept(is_nothrow_constructible_v<decay_t<_Closure>, _Closure> &&
                 is_nothrow_constructible_v<decay_t<_OtherClosure>, _OtherClosure>)
    { return __range_adaptor_closure_t(std::__compose(std::forward<_OtherClosure>(__c2), std::forward<_Closure>(__c1))); }
};

#endif // _LIBCPP_STD_VER >= 20
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___RANGES_RANGE_ADAPTOR_H
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/range_adaptor.h" 3
#endif /* range_adaptor.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ref_view.h expanded by -frewrite-includes */
#include <__ranges/ref_view.h>
#else /* ref_view.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_REF_VIEW_H
#define _LIBCPP___RANGES_REF_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/different_from.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/data.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/empty.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3

namespace ranges {
  template<range _Range>
    requires is_object_v<_Range>
  class ref_view : public view_interface<ref_view<_Range>> {
    _Range *__range_;

    static void __fun(_Range&);
    static void __fun(_Range&&) = delete;

public:
    template<class _Tp>
      requires __different_from<_Tp, ref_view> &&
        convertible_to<_Tp, _Range&> && requires { __fun(std::declval<_Tp>()); }
    _LIBCPP_HIDE_FROM_ABI
    constexpr ref_view(_Tp&& __t)
      : __range_(std::addressof(static_cast<_Range&>(std::forward<_Tp>(__t))))
    {}

    _LIBCPP_HIDE_FROM_ABI constexpr _Range& base() const { return *__range_; }

    _LIBCPP_HIDE_FROM_ABI constexpr iterator_t<_Range> begin() const { return ranges::begin(*__range_); }
    _LIBCPP_HIDE_FROM_ABI constexpr sentinel_t<_Range> end() const { return ranges::end(*__range_); }

    _LIBCPP_HIDE_FROM_ABI
    constexpr bool empty() const
      requires requires { ranges::empty(*__range_); }
    { return ranges::empty(*__range_); }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto size() const
      requires sized_range<_Range>
    { return ranges::size(*__range_); }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto data() const
      requires contiguous_range<_Range>
    { return ranges::data(*__range_); }
  };

  template<class _Range>
  ref_view(_Range&) -> ref_view<_Range>;

  template<class _Tp>
  inline constexpr bool enable_borrowed_range<ref_view<_Tp>> = true;
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_REF_VIEW_H
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/ref_view.h" 3
#endif /* ref_view.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/auto_cast.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3

namespace ranges::views {

namespace __all {
  struct __fn : __range_adaptor_closure<__fn> {
    template<class _Tp>
      requires ranges::view<decay_t<_Tp>>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Tp&& __t) const
      noexcept(noexcept(_LIBCPP_AUTO_CAST(std::forward<_Tp>(__t))))
      -> decltype(_LIBCPP_AUTO_CAST(std::forward<_Tp>(__t)))
    {
      return _LIBCPP_AUTO_CAST(std::forward<_Tp>(__t));
    }

    template<class _Tp>
      requires (!ranges::view<decay_t<_Tp>>) &&
               requires (_Tp&& __t) { ranges::ref_view{std::forward<_Tp>(__t)}; }
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Tp&& __t) const
      noexcept(noexcept(ranges::ref_view{std::forward<_Tp>(__t)}))
    {
      return ranges::ref_view{std::forward<_Tp>(__t)};
    }

    template<class _Tp>
      requires (!ranges::view<decay_t<_Tp>> &&
                !requires (_Tp&& __t) { ranges::ref_view{std::forward<_Tp>(__t)}; } &&
                 requires (_Tp&& __t) { ranges::owning_view{std::forward<_Tp>(__t)}; })
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Tp&& __t) const
      noexcept(noexcept(ranges::owning_view{std::forward<_Tp>(__t)}))
    {
      return ranges::owning_view{std::forward<_Tp>(__t)};
    }
  };
} // namespace __all

inline namespace __cpo {
  inline constexpr auto all = __all::__fn{};
} // namespace __cpo

template<ranges::viewable_range _Range>
using all_t = decltype(views::all(std::declval<_Range>()));

} // namespace ranges::views

#endif // _LIBCPP_STD_VER >= 20
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_ALL_H
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/all.h" 3
#endif /* all.h expanded by -frewrite-includes */
# 382 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* as_rvalue_view.h expanded by -frewrite-includes */
#include <__ranges/as_rvalue_view.h>
#else /* as_rvalue_view.h expanded by -frewrite-includes */
# 382 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_AS_RVALUE_H
#define _LIBCPP___RANGES_AS_RVALUE_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/move_iterator.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/move_sentinel.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/all.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {
template <view _View>
  requires input_range<_View>
class as_rvalue_view : public view_interface<as_rvalue_view<_View>> {
  _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();

public:
  _LIBCPP_HIDE_FROM_ABI as_rvalue_view()
    requires default_initializable<_View>
  = default;

  _LIBCPP_HIDE_FROM_ABI constexpr explicit as_rvalue_view(_View __base) : __base_(std::move(__base)) {}

  _LIBCPP_HIDE_FROM_ABI constexpr _View base() const&
    requires copy_constructible<_View>
  {
    return __base_;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__base_); }

  _LIBCPP_HIDE_FROM_ABI constexpr auto begin()
    requires(!__simple_view<_View>)
  {
    return move_iterator(ranges::begin(__base_));
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto begin() const
    requires range<const _View>
  {
    return move_iterator(ranges::begin(__base_));
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto end()
    requires(!__simple_view<_View>)
  {
    if constexpr (common_range<_View>) {
      return move_iterator(ranges::end(__base_));
    } else {
      return move_sentinel(ranges::end(__base_));
    }
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto end() const
    requires range<const _View>
  {
    if constexpr (common_range<const _View>) {
      return move_iterator(ranges::end(__base_));
    } else {
      return move_sentinel(ranges::end(__base_));
    }
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto size()
    requires sized_range<_View>
  {
    return ranges::size(__base_);
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto size() const
    requires sized_range<const _View>
  {
    return ranges::size(__base_);
  }
};

template <class _Range>
as_rvalue_view(_Range&&) -> as_rvalue_view<views::all_t<_Range>>;

template <class _View>
inline constexpr bool enable_borrowed_range<as_rvalue_view<_View>> = enable_borrowed_range<_View>;

namespace views {
namespace __as_rvalue {
struct __fn : __range_adaptor_closure<__fn> {
  template <class _Range>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range) const
      noexcept(noexcept(/**/ as_rvalue_view(std::forward<_Range>(__range))))
          -> decltype(/*--*/ as_rvalue_view(std::forward<_Range>(__range))) {
    return /*-------------*/ as_rvalue_view(std::forward<_Range>(__range));
  }

  template <class _Range>
    requires same_as<range_rvalue_reference_t<_Range>, range_reference_t<_Range>>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range) const
      noexcept(noexcept(/**/ views::all(std::forward<_Range>(__range))))
          -> decltype(/*--*/ views::all(std::forward<_Range>(__range))) {
    return /*-------------*/ views::all(std::forward<_Range>(__range));
  }
};
} // namespace __as_rvalue

inline namespace __cpo {
inline constexpr auto as_rvalue = __as_rvalue::__fn{};
} // namespace __cpo
} // namespace views
} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 23
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3

_LIBCPP_POP_MACROS

#endif // _LIBCPP___RANGES_AS_RVALUE_H
# 143 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/as_rvalue_view.h" 3
#endif /* as_rvalue_view.h expanded by -frewrite-includes */
# 383 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* chunk_by_view.h expanded by -frewrite-includes */
#include <__ranges/chunk_by_view.h>
#else /* chunk_by_view.h expanded by -frewrite-includes */
# 383 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_CHUNK_BY_VIEW_H
#define _LIBCPP___RANGES_CHUNK_BY_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_adjacent_find.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* bind_back.h expanded by -frewrite-includes */
#include <__functional/bind_back.h>
#else /* bind_back.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_BIND_BACK_H
#define _LIBCPP___FUNCTIONAL_BIND_BACK_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/perfect_forward.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/integer_sequence.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3

template <size_t _NBound, class = make_index_sequence<_NBound>>
struct __bind_back_op;

template <size_t _NBound, size_t ..._Ip>
struct __bind_back_op<_NBound, index_sequence<_Ip...>> {
    template <class _Fn, class _BoundArgs, class... _Args>
    _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Fn&& __f, _BoundArgs&& __bound_args, _Args&&... __args) const
        noexcept(noexcept(_VSTD::invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)..., _VSTD::get<_Ip>(_VSTD::forward<_BoundArgs>(__bound_args))...)))
        -> decltype(      _VSTD::invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)..., _VSTD::get<_Ip>(_VSTD::forward<_BoundArgs>(__bound_args))...))
        { return          _VSTD::invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)..., _VSTD::get<_Ip>(_VSTD::forward<_BoundArgs>(__bound_args))...); }
};

template <class _Fn, class _BoundArgs>
struct __bind_back_t : __perfect_forward<__bind_back_op<tuple_size_v<_BoundArgs>>, _Fn, _BoundArgs> {
    using __perfect_forward<__bind_back_op<tuple_size_v<_BoundArgs>>, _Fn, _BoundArgs>::__perfect_forward;
};

template <class _Fn, class... _Args>
  requires is_constructible_v<decay_t<_Fn>, _Fn> && is_move_constructible_v<decay_t<_Fn>> &&
           (is_constructible_v<decay_t<_Args>, _Args> && ...) && (is_move_constructible_v<decay_t<_Args>> && ...)
_LIBCPP_HIDE_FROM_ABI
constexpr auto __bind_back(_Fn&& __f, _Args&&... __args)
    noexcept(noexcept(__bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(_VSTD::forward<_Fn>(__f), _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...))))
    -> decltype(      __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(_VSTD::forward<_Fn>(__f), _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)))
    { return          __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(_VSTD::forward<_Fn>(__f), _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)); }

#endif // _LIBCPP_STD_VER >= 20
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_BIND_BACK_H
# 60 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_back.h" 3
#endif /* bind_back.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* not_fn.h expanded by -frewrite-includes */
#include <__functional/not_fn.h>
#else /* not_fn.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_NOT_FN_H
#define _LIBCPP___FUNCTIONAL_NOT_FN_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/perfect_forward.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3

struct __not_fn_op {
    template <class... _Args>
    _LIBCPP_HIDE_FROM_ABI
    _LIBCPP_CONSTEXPR_SINCE_CXX20 auto operator()(_Args&&... __args) const
        noexcept(noexcept(!_VSTD::invoke(_VSTD::forward<_Args>(__args)...)))
        -> decltype(      !_VSTD::invoke(_VSTD::forward<_Args>(__args)...))
        { return          !_VSTD::invoke(_VSTD::forward<_Args>(__args)...); }
};

template <class _Fn>
struct __not_fn_t : __perfect_forward<__not_fn_op, _Fn> {
    using __perfect_forward<__not_fn_op, _Fn>::__perfect_forward;
};

template <class _Fn, class = enable_if_t<
    is_constructible_v<decay_t<_Fn>, _Fn> &&
    is_move_constructible_v<decay_t<_Fn>>
>>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_SINCE_CXX20 auto not_fn(_Fn&& __f) {
    return __not_fn_t<decay_t<_Fn>>(_VSTD::forward<_Fn>(__f));
}

#endif // _LIBCPP_STD_VER >= 17
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_NOT_FN_H
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/not_fn.h" 3
#endif /* not_fn.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/reference_wrapper.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/default_sentinel.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/prev.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/all.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* movable_box.h expanded by -frewrite-includes */
#include <__ranges/movable_box.h>
#else /* movable_box.h expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_MOVABLE_BOX_H
#define _LIBCPP___RANGES_MOVABLE_BOX_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/movable.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/construct_at.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3

// __movable_box allows turning a type that is move-constructible (but maybe not move-assignable) into
// a type that is both move-constructible and move-assignable. It does that by introducing an empty state
// and basically doing destroy-then-copy-construct in the assignment operator. The empty state is necessary
// to handle the case where the copy construction fails after destroying the object.
//
// In some cases, we can completely avoid the use of an empty state; we provide a specialization of
// __movable_box that does this, see below for the details.

// until C++23, `__movable_box` was named `__copyable_box` and required the stored type to be copy-constructible, not
// just move-constructible; we preserve the old behavior in pre-C++23 modes.
template <class _Tp>
concept __movable_box_object =
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
    move_constructible<_Tp>
#  else
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
    copy_constructible<_Tp>
#  endif
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
    && is_object_v<_Tp>;

namespace ranges {
// Primary template - uses std::optional and introduces an empty state in case assignment fails.
template <__movable_box_object _Tp>
class __movable_box {
  _LIBCPP_NO_UNIQUE_ADDRESS optional<_Tp> __val_;

public:
  template <class... _Args>
    requires is_constructible_v<_Tp, _Args...>
  _LIBCPP_HIDE_FROM_ABI constexpr explicit __movable_box(in_place_t, _Args&&... __args) noexcept(
      is_nothrow_constructible_v<_Tp, _Args...>)
      : __val_(in_place, std::forward<_Args>(__args)...) {}

  _LIBCPP_HIDE_FROM_ABI constexpr __movable_box() noexcept(is_nothrow_default_constructible_v<_Tp>)
    requires default_initializable<_Tp>
      : __val_(in_place) {}

  _LIBCPP_HIDE_FROM_ABI __movable_box(__movable_box const&) = default;
  _LIBCPP_HIDE_FROM_ABI __movable_box(__movable_box&&)      = default;

  _LIBCPP_HIDE_FROM_ABI constexpr __movable_box&
  operator=(__movable_box const& __other) noexcept(is_nothrow_copy_constructible_v<_Tp>)
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
    requires copy_constructible<_Tp>
#  endif
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
  {
    if (this != std::addressof(__other)) {
      if (__other.__has_value())
        __val_.emplace(*__other);
      else
        __val_.reset();
    }
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI __movable_box& operator=(__movable_box&&)
    requires movable<_Tp>
  = default;

  _LIBCPP_HIDE_FROM_ABI constexpr __movable_box&
  operator=(__movable_box&& __other) noexcept(is_nothrow_move_constructible_v<_Tp>) {
    if (this != std::addressof(__other)) {
      if (__other.__has_value())
        __val_.emplace(std::move(*__other));
      else
        __val_.reset();
    }
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr _Tp const& operator*() const noexcept { return *__val_; }
  _LIBCPP_HIDE_FROM_ABI constexpr _Tp& operator*() noexcept { return *__val_; }

  _LIBCPP_HIDE_FROM_ABI constexpr const _Tp* operator->() const noexcept { return __val_.operator->(); }
  _LIBCPP_HIDE_FROM_ABI constexpr _Tp* operator->() noexcept { return __val_.operator->(); }

  _LIBCPP_HIDE_FROM_ABI constexpr bool __has_value() const noexcept { return __val_.has_value(); }
};

// This partial specialization implements an optimization for when we know we don't need to store
// an empty state to represent failure to perform an assignment. For copy-assignment, this happens:
//
// 1. If the type is copyable (which includes copy-assignment), we can use the type's own assignment operator
//    directly and avoid using std::optional.
// 2. If the type is not copyable, but it is nothrow-copy-constructible, then we can implement assignment as
//    destroy-and-then-construct and we know it will never fail, so we don't need an empty state.
//
// The exact same reasoning can be applied for move-assignment, with copyable replaced by movable and
// nothrow-copy-constructible replaced by nothrow-move-constructible. This specialization is enabled
// whenever we can apply any of these optimizations for both the copy assignment and the move assignment
// operator.

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
template <class _Tp>
concept __doesnt_need_empty_state =
    (copy_constructible<_Tp>
         // 1. If copy_constructible<T> is true, movable-box<T> should store only a T if either T models
         //    copyable, or is_nothrow_move_constructible_v<T> && is_nothrow_copy_constructible_v<T> is true.
         ? copyable<_Tp> || (is_nothrow_move_constructible_v<_Tp> && is_nothrow_copy_constructible_v<_Tp>)
         // 2. Otherwise, movable-box<T> should store only a T if either T models movable or
         //    is_nothrow_move_constructible_v<T> is true.
         : movable<_Tp> || is_nothrow_move_constructible_v<_Tp>);
#  else
# 138 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3

template <class _Tp>
concept __doesnt_need_empty_state_for_copy = copyable<_Tp> || is_nothrow_copy_constructible_v<_Tp>;

template <class _Tp>
concept __doesnt_need_empty_state_for_move = movable<_Tp> || is_nothrow_move_constructible_v<_Tp>;

template <class _Tp>
concept __doesnt_need_empty_state = __doesnt_need_empty_state_for_copy<_Tp> && __doesnt_need_empty_state_for_move<_Tp>;
#  endif
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3

template <__movable_box_object _Tp>
  requires __doesnt_need_empty_state<_Tp>
class __movable_box<_Tp> {
  _LIBCPP_NO_UNIQUE_ADDRESS _Tp __val_;

public:
  template <class... _Args>
    requires is_constructible_v<_Tp, _Args...>
  _LIBCPP_HIDE_FROM_ABI constexpr explicit __movable_box(in_place_t, _Args&&... __args) noexcept(
      is_nothrow_constructible_v<_Tp, _Args...>)
      : __val_(std::forward<_Args>(__args)...) {}

  _LIBCPP_HIDE_FROM_ABI constexpr __movable_box() noexcept(is_nothrow_default_constructible_v<_Tp>)
    requires default_initializable<_Tp>
      : __val_() {}

  _LIBCPP_HIDE_FROM_ABI __movable_box(__movable_box const&) = default;
  _LIBCPP_HIDE_FROM_ABI __movable_box(__movable_box&&)      = default;

  // Implementation of assignment operators in case we perform optimization (1)
  _LIBCPP_HIDE_FROM_ABI __movable_box& operator=(__movable_box const&)
    requires copyable<_Tp>
  = default;
  _LIBCPP_HIDE_FROM_ABI __movable_box& operator=(__movable_box&&)
    requires movable<_Tp>
  = default;

  // Implementation of assignment operators in case we perform optimization (2)
  _LIBCPP_HIDE_FROM_ABI constexpr __movable_box& operator=(__movable_box const& __other) noexcept {
    static_assert(is_nothrow_copy_constructible_v<_Tp>);
    if (this != std::addressof(__other)) {
      std::destroy_at(std::addressof(__val_));
      std::construct_at(std::addressof(__val_), __other.__val_);
    }
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __movable_box& operator=(__movable_box&& __other) noexcept {
    static_assert(is_nothrow_move_constructible_v<_Tp>);
    if (this != std::addressof(__other)) {
      std::destroy_at(std::addressof(__val_));
      std::construct_at(std::addressof(__val_), std::move(__other.__val_));
    }
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr _Tp const& operator*() const noexcept { return __val_; }
  _LIBCPP_HIDE_FROM_ABI constexpr _Tp& operator*() noexcept { return __val_; }

  _LIBCPP_HIDE_FROM_ABI constexpr const _Tp* operator->() const noexcept { return std::addressof(__val_); }
  _LIBCPP_HIDE_FROM_ABI constexpr _Tp* operator->() noexcept { return std::addressof(__val_); }

  _LIBCPP_HIDE_FROM_ABI constexpr bool __has_value() const noexcept { return true; }
};
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___RANGES_MOVABLE_BOX_H
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/movable_box.h" 3
#endif /* movable_box.h expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* non_propagating_cache.h expanded by -frewrite-includes */
#include <__ranges/non_propagating_cache.h>
#else /* non_propagating_cache.h expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_NON_PROPAGATING_CACHE_H
#define _LIBCPP___RANGES_NON_PROPAGATING_CACHE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>        // indirectly_readable
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h> // iter_reference_t
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3

namespace ranges {
  // __non_propagating_cache is a helper type that allows storing an optional value in it,
  // but which does not copy the source's value when it is copy constructed/assigned to,
  // and which resets the source's value when it is moved-from.
  //
  // This type is used as an implementation detail of some views that need to cache the
  // result of `begin()` in order to provide an amortized O(1) begin() method. Typically,
  // we don't want to propagate the value of the cache upon copy because the cached iterator
  // may refer to internal details of the source view.
  template<class _Tp>
    requires is_object_v<_Tp>
  class _LIBCPP_TEMPLATE_VIS __non_propagating_cache {
    struct __from_tag { };
    struct __forward_tag { };

    // This helper class is needed to perform copy and move elision when
    // constructing the contained type from an iterator.
    struct __wrapper {
      template <class... _Args>
      _LIBCPP_HIDE_FROM_ABI constexpr explicit __wrapper(__forward_tag, _Args&&... __args)
          : __t_(std::forward<_Args>(__args)...) {}
      template <class _Fn>
      _LIBCPP_HIDE_FROM_ABI constexpr explicit __wrapper(__from_tag, _Fn const& __f) : __t_(__f()) {}
      _Tp __t_;
    };

    optional<__wrapper> __value_ = nullopt;

  public:
    _LIBCPP_HIDE_FROM_ABI __non_propagating_cache() = default;

    _LIBCPP_HIDE_FROM_ABI
    constexpr __non_propagating_cache(__non_propagating_cache const&) noexcept
      : __value_(nullopt)
    { }

    _LIBCPP_HIDE_FROM_ABI
    constexpr __non_propagating_cache(__non_propagating_cache&& __other) noexcept
      : __value_(nullopt)
    {
      __other.__value_.reset();
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr __non_propagating_cache& operator=(__non_propagating_cache const& __other) noexcept {
      if (this != std::addressof(__other)) {
        __value_.reset();
      }
      return *this;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr __non_propagating_cache& operator=(__non_propagating_cache&& __other) noexcept {
      __value_.reset();
      __other.__value_.reset();
      return *this;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr _Tp& operator*() { return __value_->__t_; }
    _LIBCPP_HIDE_FROM_ABI
    constexpr _Tp const& operator*() const { return __value_->__t_; }

    _LIBCPP_HIDE_FROM_ABI
    constexpr bool __has_value() const { return __value_.has_value(); }

    template<class _Fn>
    _LIBCPP_HIDE_FROM_ABI
    constexpr _Tp& __emplace_from(_Fn const& __f) {
      return __value_.emplace(__from_tag{}, __f).__t_;
    }

    template<class ..._Args>
    _LIBCPP_HIDE_FROM_ABI
    constexpr _Tp& __emplace(_Args&& ...__args) {
      return __value_.emplace(__forward_tag{}, std::forward<_Args>(__args)...).__t_;
    }
  };

  struct __empty_cache { };
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_NON_PROPAGATING_CACHE_H
# 115 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/non_propagating_cache.h" 3
#endif /* non_propagating_cache.h expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* reverse_view.h expanded by -frewrite-includes */
#include <__ranges/reverse_view.h>
#else /* reverse_view.h expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_REVERSE_VIEW_H
#define _LIBCPP___RANGES_REVERSE_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/all.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/non_propagating_cache.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#endif
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3

namespace ranges {
  template<view _View>
    requires bidirectional_range<_View>
  class reverse_view : public view_interface<reverse_view<_View>> {
    // We cache begin() whenever ranges::next is not guaranteed O(1) to provide an
    // amortized O(1) begin() method.
    static constexpr bool _UseCache = !random_access_range<_View> && !common_range<_View>;
    using _Cache = _If<_UseCache, __non_propagating_cache<reverse_iterator<iterator_t<_View>>>, __empty_cache>;
    _LIBCPP_NO_UNIQUE_ADDRESS _Cache __cached_begin_ = _Cache();
    _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();

  public:
    _LIBCPP_HIDE_FROM_ABI
    reverse_view() requires default_initializable<_View> = default;

    _LIBCPP_HIDE_FROM_ABI
    constexpr explicit reverse_view(_View __view) : __base_(std::move(__view)) {}

    _LIBCPP_HIDE_FROM_ABI
    constexpr _View base() const& requires copy_constructible<_View> { return __base_; }

    _LIBCPP_HIDE_FROM_ABI
    constexpr _View base() && { return std::move(__base_); }

    _LIBCPP_HIDE_FROM_ABI
    constexpr reverse_iterator<iterator_t<_View>> begin() {
      if constexpr (_UseCache)
        if (__cached_begin_.__has_value())
          return *__cached_begin_;

      auto __tmp = std::make_reverse_iterator(ranges::next(ranges::begin(__base_), ranges::end(__base_)));
      if constexpr (_UseCache)
        __cached_begin_.__emplace(__tmp);
      return __tmp;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr reverse_iterator<iterator_t<_View>> begin() requires common_range<_View> {
      return std::make_reverse_iterator(ranges::end(__base_));
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto begin() const requires common_range<const _View> {
      return std::make_reverse_iterator(ranges::end(__base_));
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr reverse_iterator<iterator_t<_View>> end() {
      return std::make_reverse_iterator(ranges::begin(__base_));
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto end() const requires common_range<const _View> {
      return std::make_reverse_iterator(ranges::begin(__base_));
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto size() requires sized_range<_View> {
      return ranges::size(__base_);
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto size() const requires sized_range<const _View> {
      return ranges::size(__base_);
    }
  };

  template<class _Range>
  reverse_view(_Range&&) -> reverse_view<views::all_t<_Range>>;

  template<class _Tp>
  inline constexpr bool enable_borrowed_range<reverse_view<_Tp>> = enable_borrowed_range<_Tp>;

  namespace views {
  namespace __reverse {
    template<class _Tp>
    inline constexpr bool __is_reverse_view = false;

    template<class _Tp>
    inline constexpr bool __is_reverse_view<reverse_view<_Tp>> = true;

    template<class _Tp>
    inline constexpr bool __is_sized_reverse_subrange = false;

    template<class _Iter>
    inline constexpr bool __is_sized_reverse_subrange<subrange<reverse_iterator<_Iter>, reverse_iterator<_Iter>, subrange_kind::sized>> = true;

    template<class _Tp>
    inline constexpr bool __is_unsized_reverse_subrange = false;

    template<class _Iter, subrange_kind _Kind>
    inline constexpr bool __is_unsized_reverse_subrange<subrange<reverse_iterator<_Iter>, reverse_iterator<_Iter>, _Kind>> = _Kind == subrange_kind::unsized;

    template<class _Tp>
    struct __unwrapped_reverse_subrange {
      using type = void; // avoid SFINAE-ing out the overload below -- let the concept requirements do it for better diagnostics
    };

    template<class _Iter, subrange_kind _Kind>
    struct __unwrapped_reverse_subrange<subrange<reverse_iterator<_Iter>, reverse_iterator<_Iter>, _Kind>> {
      using type = subrange<_Iter, _Iter, _Kind>;
    };

    struct __fn : __range_adaptor_closure<__fn> {
      template<class _Range>
        requires __is_reverse_view<remove_cvref_t<_Range>>
      [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
      constexpr auto operator()(_Range&& __range) const
        noexcept(noexcept(std::forward<_Range>(__range).base()))
        -> decltype(      std::forward<_Range>(__range).base())
        { return          std::forward<_Range>(__range).base(); }

      template<class _Range,
               class _UnwrappedSubrange = typename __unwrapped_reverse_subrange<remove_cvref_t<_Range>>::type>
        requires __is_sized_reverse_subrange<remove_cvref_t<_Range>>
      [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
      constexpr auto operator()(_Range&& __range) const
        noexcept(noexcept(_UnwrappedSubrange(__range.end().base(), __range.begin().base(), __range.size())))
        -> decltype(      _UnwrappedSubrange(__range.end().base(), __range.begin().base(), __range.size()))
        { return          _UnwrappedSubrange(__range.end().base(), __range.begin().base(), __range.size()); }

      template<class _Range,
               class _UnwrappedSubrange = typename __unwrapped_reverse_subrange<remove_cvref_t<_Range>>::type>
        requires __is_unsized_reverse_subrange<remove_cvref_t<_Range>>
      [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
      constexpr auto operator()(_Range&& __range) const
        noexcept(noexcept(_UnwrappedSubrange(__range.end().base(), __range.begin().base())))
        -> decltype(      _UnwrappedSubrange(__range.end().base(), __range.begin().base()))
        { return          _UnwrappedSubrange(__range.end().base(), __range.begin().base()); }

      template<class _Range>
        requires (!__is_reverse_view<remove_cvref_t<_Range>> &&
                  !__is_sized_reverse_subrange<remove_cvref_t<_Range>> &&
                  !__is_unsized_reverse_subrange<remove_cvref_t<_Range>>)
      [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
      constexpr auto operator()(_Range&& __range) const
        noexcept(noexcept(reverse_view{std::forward<_Range>(__range)}))
        -> decltype(      reverse_view{std::forward<_Range>(__range)})
        { return          reverse_view{std::forward<_Range>(__range)}; }
    };
  } // namespace __reverse

  inline namespace __cpo {
    inline constexpr auto reverse = __reverse::__fn{};
  } // namespace __cpo
  } // namespace views
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 189 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_REVERSE_VIEW_H
# 193 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/reverse_view.h" 3
#endif /* reverse_view.h expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/in_place.h>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#endif
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3

namespace ranges {

template <forward_range _View, indirect_binary_predicate<iterator_t<_View>, iterator_t<_View>> _Pred>
  requires view<_View> && is_object_v<_Pred>
class chunk_by_view : public view_interface<chunk_by_view<_View, _Pred>> {
  _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
  _LIBCPP_NO_UNIQUE_ADDRESS __movable_box<_Pred> __pred_;

  // We cache the result of begin() to allow providing an amortized O(1).
  using _Cache = __non_propagating_cache<iterator_t<_View>>;
  _Cache __cached_begin_;

  class __iterator;

  _LIBCPP_HIDE_FROM_ABI constexpr iterator_t<_View> __find_next(iterator_t<_View> __current) {
    _LIBCPP_ASSERT_UNCATEGORIZED(
        __pred_.__has_value(), "Trying to call __find_next() on a chunk_by_view that does not have a valid predicate.");

    return ranges::next(ranges::adjacent_find(__current, ranges::end(__base_), std::not_fn(std::ref(*__pred_))),
                        1,
                        ranges::end(__base_));
  }

  _LIBCPP_HIDE_FROM_ABI constexpr iterator_t<_View> __find_prev(iterator_t<_View> __current)
    requires bidirectional_range<_View>
  {
    _LIBCPP_ASSERT_UNCATEGORIZED(
        __current != ranges::begin(__base_), "Trying to call __find_prev() on a begin iterator.");
    _LIBCPP_ASSERT_UNCATEGORIZED(
        __pred_.__has_value(), "Trying to call __find_prev() on a chunk_by_view that does not have a valid predicate.");

    auto __first = ranges::begin(__base_);
    reverse_view __reversed{subrange{__first, __current}};
    auto __reversed_pred = [this]<class _Tp, class _Up>(_Tp&& __x, _Up&& __y) {
      return !std::invoke(*__pred_, std::forward<_Up>(__y), std::forward<_Tp>(__x));
    };
    return ranges::prev(ranges::adjacent_find(__reversed, __reversed_pred).base(), 1, std::move(__first));
  }

public:
  _LIBCPP_HIDE_FROM_ABI chunk_by_view()
    requires default_initializable<_View> && default_initializable<_Pred>
  = default;

  _LIBCPP_HIDE_FROM_ABI constexpr explicit chunk_by_view(_View __base, _Pred __pred)
      : __base_(std::move(__base)), __pred_(in_place, std::move(__pred)) {}

  _LIBCPP_HIDE_FROM_ABI constexpr _View base() const&
    requires copy_constructible<_View>
  {
    return __base_;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__base_); }

  _LIBCPP_HIDE_FROM_ABI constexpr const _Pred& pred() const { return *__pred_; }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator begin() {
    _LIBCPP_ASSERT_UNCATEGORIZED(
        __pred_.__has_value(), "Trying to call begin() on a chunk_by_view that does not have a valid predicate.");

    auto __first = ranges::begin(__base_);
    if (!__cached_begin_.__has_value()) {
      __cached_begin_.__emplace(__find_next(__first));
    }
    return {*this, std::move(__first), *__cached_begin_};
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto end() {
    if constexpr (common_range<_View>) {
      return __iterator{*this, ranges::end(__base_), ranges::end(__base_)};
    } else {
      return default_sentinel;
    }
  }
};

template <class _Range, class _Pred>
chunk_by_view(_Range&&, _Pred) -> chunk_by_view<views::all_t<_Range>, _Pred>;

template <forward_range _View, indirect_binary_predicate<iterator_t<_View>, iterator_t<_View>> _Pred>
  requires view<_View> && is_object_v<_Pred>
class chunk_by_view<_View, _Pred>::__iterator {
  friend chunk_by_view;

  chunk_by_view* __parent_                               = nullptr;
  _LIBCPP_NO_UNIQUE_ADDRESS iterator_t<_View> __current_ = iterator_t<_View>();
  _LIBCPP_NO_UNIQUE_ADDRESS iterator_t<_View> __next_    = iterator_t<_View>();

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator(
      chunk_by_view& __parent, iterator_t<_View> __current, iterator_t<_View> __next)
      : __parent_(std::addressof(__parent)), __current_(__current), __next_(__next) {}

public:
  using value_type        = subrange<iterator_t<_View>>;
  using difference_type   = range_difference_t<_View>;
  using iterator_category = input_iterator_tag;
  using iterator_concept  = conditional_t<bidirectional_range<_View>, bidirectional_iterator_tag, forward_iterator_tag>;

  _LIBCPP_HIDE_FROM_ABI __iterator() = default;

  _LIBCPP_HIDE_FROM_ABI constexpr value_type operator*() const {
    _LIBCPP_ASSERT_UNCATEGORIZED(__current_ != __next_, "Trying to dereference past-the-end chunk_by_view iterator.");
    return {__current_, __next_};
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator++() {
    _LIBCPP_ASSERT_UNCATEGORIZED(__current_ != __next_, "Trying to increment past end chunk_by_view iterator.");
    __current_ = __next_;
    __next_    = __parent_->__find_next(__current_);
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator operator++(int) {
    auto __tmp = *this;
    ++*this;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator--()
    requires bidirectional_range<_View>
  {
    __next_    = __current_;
    __current_ = __parent_->__find_prev(__next_);
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator operator--(int)
    requires bidirectional_range<_View>
  {
    auto __tmp = *this;
    --*this;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const __iterator& __x, const __iterator& __y) {
    return __x.__current_ == __y.__current_;
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const __iterator& __x, default_sentinel_t) {
    return __x.__current_ == __x.__next_;
  }
};

namespace views {
namespace __chunk_by {
struct __fn {
  template <class _Range, class _Pred>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range, _Pred&& __pred) const
      noexcept(noexcept(/**/ chunk_by_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred))))
          -> decltype(/*--*/ chunk_by_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred))) {
    return /*-------------*/ chunk_by_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred));
  }

  template <class _Pred>
    requires constructible_from<decay_t<_Pred>, _Pred>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Pred&& __pred) const
      noexcept(is_nothrow_constructible_v<decay_t<_Pred>, _Pred>) {
    return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Pred>(__pred)));
  }
};
} // namespace __chunk_by

inline namespace __cpo {
inline constexpr auto chunk_by = __chunk_by::__fn{};
} // namespace __cpo
} // namespace views
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 23
# 225 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___RANGES_CHUNK_BY_VIEW_H
# 231 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/chunk_by_view.h" 3
#endif /* chunk_by_view.h expanded by -frewrite-includes */
# 384 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* common_view.h expanded by -frewrite-includes */
#include <__ranges/common_view.h>
#else /* common_view.h expanded by -frewrite-includes */
# 384 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_COMMON_VIEW_H
#define _LIBCPP___RANGES_COMMON_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/common_iterator.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/all.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3

namespace ranges {

template<view _View>
  requires (!common_range<_View> && copyable<iterator_t<_View>>)
class common_view : public view_interface<common_view<_View>> {
  _View __base_ = _View();

public:
  _LIBCPP_HIDE_FROM_ABI
  common_view() requires default_initializable<_View> = default;

  _LIBCPP_HIDE_FROM_ABI
  constexpr explicit common_view(_View __v) : __base_(std::move(__v)) { }

  _LIBCPP_HIDE_FROM_ABI
  constexpr _View base() const& requires copy_constructible<_View> { return __base_; }

  _LIBCPP_HIDE_FROM_ABI
  constexpr _View base() && { return std::move(__base_); }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto begin() {
    if constexpr (random_access_range<_View> && sized_range<_View>)
      return ranges::begin(__base_);
    else
      return common_iterator<iterator_t<_View>, sentinel_t<_View>>(ranges::begin(__base_));
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto begin() const requires range<const _View> {
    if constexpr (random_access_range<const _View> && sized_range<const _View>)
      return ranges::begin(__base_);
    else
      return common_iterator<iterator_t<const _View>, sentinel_t<const _View>>(ranges::begin(__base_));
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto end() {
    if constexpr (random_access_range<_View> && sized_range<_View>)
      return ranges::begin(__base_) + ranges::size(__base_);
    else
      return common_iterator<iterator_t<_View>, sentinel_t<_View>>(ranges::end(__base_));
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto end() const requires range<const _View> {
    if constexpr (random_access_range<const _View> && sized_range<const _View>)
      return ranges::begin(__base_) + ranges::size(__base_);
    else
      return common_iterator<iterator_t<const _View>, sentinel_t<const _View>>(ranges::end(__base_));
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto size() requires sized_range<_View> {
    return ranges::size(__base_);
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto size() const requires sized_range<const _View> {
    return ranges::size(__base_);
  }
};

template<class _Range>
common_view(_Range&&)
  -> common_view<views::all_t<_Range>>;

template<class _View>
inline constexpr bool enable_borrowed_range<common_view<_View>> = enable_borrowed_range<_View>;

namespace views {
namespace __common {
  struct __fn : __range_adaptor_closure<__fn> {
    template<class _Range>
      requires common_range<_Range>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Range&& __range) const
      noexcept(noexcept(views::all(std::forward<_Range>(__range))))
      -> decltype(      views::all(std::forward<_Range>(__range)))
      { return          views::all(std::forward<_Range>(__range)); }

    template<class _Range>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Range&& __range) const
      noexcept(noexcept(common_view{std::forward<_Range>(__range)}))
      -> decltype(      common_view{std::forward<_Range>(__range)})
      { return          common_view{std::forward<_Range>(__range)}; }
  };
} // namespace __common

inline namespace __cpo {
  inline constexpr auto common = __common::__fn{};
} // namespace __cpo
} // namespace views
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___RANGES_COMMON_VIEW_H
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/common_view.h" 3
#endif /* common_view.h expanded by -frewrite-includes */
# 385 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 385 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 386 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* counted.h expanded by -frewrite-includes */
#include <__ranges/counted.h>
#else /* counted.h expanded by -frewrite-includes */
# 386 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_COUNTED_H
#define _LIBCPP___RANGES_COUNTED_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/counted_iterator.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/default_sentinel.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* span expanded by -frewrite-includes */
#include <span>
#else /* span expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#ifndef _LIBCPP_SPAN
#define _LIBCPP_SPAN

/*
    span synopsis

namespace std {

// constants
inline constexpr size_t dynamic_extent = numeric_limits<size_t>::max();

// [views.span], class template span
template <class ElementType, size_t Extent = dynamic_extent>
    class span;

template<class ElementType, size_t Extent>
  inline constexpr bool ranges::enable_view<span<ElementType, Extent>> = true;

template<class ElementType, size_t Extent>
    inline constexpr bool ranges::enable_borrowed_range<span<ElementType, Extent>> = true;

// [span.objectrep], views of object representation
template <class ElementType, size_t Extent>
    span<const byte, ((Extent == dynamic_extent) ? dynamic_extent :
        (sizeof(ElementType) * Extent))> as_bytes(span<ElementType, Extent> s) noexcept;

template <class ElementType, size_t Extent>
    span<      byte, ((Extent == dynamic_extent) ? dynamic_extent :
        (sizeof(ElementType) * Extent))> as_writable_bytes(span<ElementType, Extent> s) noexcept;


template <class ElementType, size_t Extent = dynamic_extent>
class span {
public:
    // constants and types
    using element_type = ElementType;
    using value_type = remove_cv_t<ElementType>;
    using size_type = size_t;
    using difference_type = ptrdiff_t;
    using pointer = element_type*;
    using const_pointer = const element_type*;
    using reference = element_type&;
    using const_reference = const element_type&;
    using iterator = implementation-defined;
    using reverse_iterator = std::reverse_iterator<iterator>;
    static constexpr size_type extent = Extent;

    // [span.cons], span constructors, copy, assignment, and destructor
    constexpr span() noexcept;
    template <class It>
    constexpr explicit(Extent != dynamic_extent) span(It first, size_type count);
    template <class It, class End>
    constexpr explicit(Extent != dynamic_extent) span(It first, End last);
    template <size_t N>
        constexpr span(type_identity_t<element_type> (&arr)[N]) noexcept;
    template <size_t N>
        constexpr span(array<value_type, N>& arr) noexcept;
    template <size_t N>
        constexpr span(const array<value_type, N>& arr) noexcept;
    template<class R>
      constexpr explicit(Extent != dynamic_extent) span(R&& r);
    constexpr span(const span& other) noexcept = default;
    template <class OtherElementType, size_t OtherExtent>
        constexpr explicit(Extent != dynamic_extent) span(const span<OtherElementType, OtherExtent>& s) noexcept;
    constexpr span& operator=(const span& other) noexcept = default;

    // [span.sub], span subviews
    template <size_t Count>
        constexpr span<element_type, Count> first() const;
    template <size_t Count>
        constexpr span<element_type, Count> last() const;
    template <size_t Offset, size_t Count = dynamic_extent>
        constexpr span<element_type, see below> subspan() const;

    constexpr span<element_type, dynamic_extent> first(size_type count) const;
    constexpr span<element_type, dynamic_extent> last(size_type count) const;
    constexpr span<element_type, dynamic_extent> subspan(size_type offset, size_type count = dynamic_extent) const;

    // [span.obs], span observers
    constexpr size_type size() const noexcept;
    constexpr size_type size_bytes() const noexcept;
    [[nodiscard]] constexpr bool empty() const noexcept;

    // [span.elem], span element access
    constexpr reference operator[](size_type idx) const;
    constexpr reference front() const;
    constexpr reference back() const;
    constexpr pointer data() const noexcept;

    // [span.iterators], span iterator support
    constexpr iterator begin() const noexcept;
    constexpr iterator end() const noexcept;
    constexpr reverse_iterator rbegin() const noexcept;
    constexpr reverse_iterator rend() const noexcept;

private:
    pointer data_;    // exposition only
    size_type size_;  // exposition only
};

template<class It, class EndOrSize>
    span(It, EndOrSize) -> span<remove_reference_t<iter_reference_t<_It>>>;

template<class T, size_t N>
    span(T (&)[N]) -> span<T, N>;

template<class T, size_t N>
    span(array<T, N>&) -> span<T, N>;

template<class T, size_t N>
    span(const array<T, N>&) -> span<const T, N>;

template<class R>
    span(R&&) -> span<remove_reference_t<ranges::range_reference_t<R>>>;

} // namespace std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* span.h expanded by -frewrite-includes */
#include <__fwd/span.h>
#else /* span.h expanded by -frewrite-includes */
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/span.h" 1 3
// -*- C++ -*-
//===---------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//

#ifndef _LIBCPP___FWD_SPAN_H
#define _LIBCPP___FWD_SPAN_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/span.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/span.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/span.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/span.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/span.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/span.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/span.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/span.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/span.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/span.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/span.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/span.h" 3

inline constexpr size_t dynamic_extent = numeric_limits<size_t>::max();
template <typename _Tp, size_t _Extent = dynamic_extent> class span;

#endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/span.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___FWD_SPAN_H
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__fwd/span.h" 3
#endif /* span.h expanded by -frewrite-includes */
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/bounded_iter.h>
#endif /* expanded by -frewrite-includes */
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/wrap_iter.h>
#endif /* expanded by -frewrite-includes */
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 137 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 137 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 138 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/data.h>
#endif /* expanded by -frewrite-includes */
# 138 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 140 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_view.h>
#endif /* expanded by -frewrite-includes */
# 140 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 141 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 141 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 143 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 143 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 144 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 144 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/type_identity.h>
#endif /* expanded by -frewrite-includes */
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 147 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <array>        // for array
#endif /* expanded by -frewrite-includes */
# 147 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>      // for byte
#endif /* expanded by -frewrite-includes */
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 149 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 149 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 150 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 150 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 151 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3

// standard-mandated includes

// [iterator.range]
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/access.h>
#endif /* expanded by -frewrite-includes */
# 155 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 156 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/data.h>
#endif /* expanded by -frewrite-includes */
# 156 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 157 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/empty.h>
#endif /* expanded by -frewrite-includes */
# 157 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_access.h>
#endif /* expanded by -frewrite-includes */
# 158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 159 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/size.h>
#endif /* expanded by -frewrite-includes */
# 159 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 160 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 163 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#endif
# 164 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 166 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 167 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 171 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3

template <class _Tp>
struct __is_std_array : false_type {};

template <class _Tp, size_t _Sz>
struct __is_std_array<array<_Tp, _Sz>> : true_type {};

template <class _Tp>
struct __is_std_span : false_type {};

template <class _Tp, size_t _Sz>
struct __is_std_span<span<_Tp, _Sz>> : true_type {};

template <class _Range, class _ElementType>
concept __span_compatible_range =
  ranges::contiguous_range<_Range> &&
  ranges::sized_range<_Range> &&
  (ranges::borrowed_range<_Range> || is_const_v<_ElementType>) &&
  !__is_std_span<remove_cvref_t<_Range>>::value  &&
  !__is_std_array<remove_cvref_t<_Range>>::value &&
  !is_array_v<remove_cvref_t<_Range>> &&
  is_convertible_v<remove_reference_t<ranges::range_reference_t<_Range>>(*)[], _ElementType(*)[]>;

template <class _From, class _To>
concept __span_array_convertible = is_convertible_v<_From(*)[], _To(*)[]>;

template <class _It, class _Tp>
concept __span_compatible_iterator = contiguous_iterator<_It> && __span_array_convertible<remove_reference_t<iter_reference_t<_It>>, _Tp>;

template <class _Sentinel, class _It>
concept __span_compatible_sentinel_for = sized_sentinel_for<_Sentinel, _It> && !is_convertible_v<_Sentinel, size_t>;

template <typename _Tp, size_t _Extent>
class _LIBCPP_TEMPLATE_VIS span {
public:
//  constants and types
    using element_type           = _Tp;
    using value_type             = remove_cv_t<_Tp>;
    using size_type              = size_t;
    using difference_type        = ptrdiff_t;
    using pointer                = _Tp *;
    using const_pointer          = const _Tp *;
    using reference              = _Tp &;
    using const_reference        = const _Tp &;
#ifdef _LIBCPP_ABI_BOUNDED_ITERATORS
    using iterator               = __bounded_iter<pointer>;
#else
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
    using iterator               = __wrap_iter<pointer>;
#endif
# 220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
    using reverse_iterator       = _VSTD::reverse_iterator<iterator>;

    static constexpr size_type extent = _Extent;

// [span.cons], span constructors, copy, assignment, and destructor
    template <size_t _Sz = _Extent> requires(_Sz == 0)
    _LIBCPP_INLINE_VISIBILITY constexpr span() noexcept : __data_{nullptr} {}

    constexpr span           (const span&) noexcept = default;
    constexpr span& operator=(const span&) noexcept = default;

    template <__span_compatible_iterator<element_type> _It>
    _LIBCPP_INLINE_VISIBILITY
    constexpr explicit span(_It __first, size_type __count)
        : __data_{_VSTD::to_address(__first)} {
      (void)__count;
      _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(_Extent == __count, "size mismatch in span's constructor (iterator, len)");
    }

    template <__span_compatible_iterator<element_type> _It, __span_compatible_sentinel_for<_It> _End>
    _LIBCPP_INLINE_VISIBILITY
    constexpr explicit span(_It __first, _End __last) : __data_{_VSTD::to_address(__first)} {
      // [span.cons]/10
      // Throws: When and what last - first throws.
      [[maybe_unused]] auto __dist = __last - __first;
      _LIBCPP_ASSERT_VALID_INPUT_RANGE(__dist >= 0, "invalid range in span's constructor (iterator, sentinel)");
      _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
          __dist == _Extent, "invalid range in span's constructor (iterator, sentinel): last - first != extent");
    }

    _LIBCPP_INLINE_VISIBILITY constexpr span(type_identity_t<element_type> (&__arr)[_Extent]) noexcept : __data_{__arr} {}

    template <__span_array_convertible<element_type> _OtherElementType>
    _LIBCPP_INLINE_VISIBILITY
    constexpr span(array<_OtherElementType, _Extent>& __arr) noexcept : __data_{__arr.data()} {}

    template <class _OtherElementType>
        requires __span_array_convertible<const _OtherElementType, element_type>
    _LIBCPP_INLINE_VISIBILITY
    constexpr span(const array<_OtherElementType, _Extent>& __arr) noexcept : __data_{__arr.data()} {}

    template <__span_compatible_range<element_type> _Range>
    _LIBCPP_INLINE_VISIBILITY
    constexpr explicit span(_Range&& __r) : __data_{ranges::data(__r)} {
      _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
          ranges::size(__r) == _Extent, "size mismatch in span's constructor (range)");
    }

    template <__span_array_convertible<element_type> _OtherElementType>
    _LIBCPP_INLINE_VISIBILITY
        constexpr span(const span<_OtherElementType, _Extent>& __other)
        : __data_{__other.data()} {}

    template <__span_array_convertible<element_type> _OtherElementType>
    _LIBCPP_INLINE_VISIBILITY
        constexpr explicit span(const span<_OtherElementType, dynamic_extent>& __other) noexcept
        : __data_{__other.data()} {
      _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
          _Extent == __other.size(), "size mismatch in span's constructor (other span)");
        }

    template <size_t _Count>
    _LIBCPP_INLINE_VISIBILITY
    constexpr span<element_type, _Count> first() const noexcept
    {
        static_assert(_Count <= _Extent, "span<T, N>::first<Count>(): Count out of range");
        return span<element_type, _Count>{data(), _Count};
    }

    template <size_t _Count>
    _LIBCPP_INLINE_VISIBILITY
    constexpr span<element_type, _Count> last() const noexcept
    {
        static_assert(_Count <= _Extent, "span<T, N>::last<Count>(): Count out of range");
        return span<element_type, _Count>{data() + size() - _Count, _Count};
    }

    _LIBCPP_INLINE_VISIBILITY
    constexpr span<element_type, dynamic_extent> first(size_type __count) const noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__count <= size(), "span<T, N>::first(count): count out of range");
        return {data(), __count};
    }

    _LIBCPP_INLINE_VISIBILITY
    constexpr span<element_type, dynamic_extent> last(size_type __count) const noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__count <= size(), "span<T, N>::last(count): count out of range");
        return {data() + size() - __count, __count};
    }

    template <size_t _Offset, size_t _Count = dynamic_extent>
    _LIBCPP_INLINE_VISIBILITY
    constexpr auto subspan() const noexcept
        -> span<element_type, _Count != dynamic_extent ? _Count : _Extent - _Offset>
    {
        static_assert(_Offset <= _Extent, "span<T, N>::subspan<Offset, Count>(): Offset out of range");
        static_assert(_Count == dynamic_extent || _Count <= _Extent - _Offset, "span<T, N>::subspan<Offset, Count>(): Offset + Count out of range");

        using _ReturnType = span<element_type, _Count != dynamic_extent ? _Count : _Extent - _Offset>;
        return _ReturnType{data() + _Offset, _Count == dynamic_extent ? size() - _Offset : _Count};
    }


    _LIBCPP_INLINE_VISIBILITY
    constexpr span<element_type, dynamic_extent>
       subspan(size_type __offset, size_type __count = dynamic_extent) const noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
            __offset <= size(), "span<T, N>::subspan(offset, count): offset out of range");
        if (__count == dynamic_extent)
            return {data() + __offset, size() - __offset};
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
            __count <= size() - __offset, "span<T, N>::subspan(offset, count): offset + count out of range");
        return {data() + __offset, __count};
    }

    _LIBCPP_INLINE_VISIBILITY constexpr size_type size()           const noexcept { return _Extent; }
    _LIBCPP_INLINE_VISIBILITY constexpr size_type size_bytes()     const noexcept { return _Extent * sizeof(element_type); }
    [[nodiscard]] _LIBCPP_INLINE_VISIBILITY constexpr bool empty() const noexcept { return _Extent == 0; }

    _LIBCPP_INLINE_VISIBILITY constexpr reference operator[](size_type __idx) const noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__idx < size(), "span<T, N>::operator[](index): index out of range");
        return __data_[__idx];
    }

    _LIBCPP_INLINE_VISIBILITY constexpr reference front() const noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "span<T, N>::front() on empty span");
        return __data_[0];
    }

    _LIBCPP_INLINE_VISIBILITY constexpr reference back() const noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "span<T, N>::back() on empty span");
        return __data_[size()-1];
    }

    _LIBCPP_INLINE_VISIBILITY constexpr pointer data()                         const noexcept { return __data_; }

// [span.iter], span iterator support
    _LIBCPP_INLINE_VISIBILITY constexpr iterator begin() const noexcept {
#ifdef _LIBCPP_ABI_BOUNDED_ITERATORS
        return std::__make_bounded_iter(data(), data(), data() + size());
#else
# 366 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
        return iterator(data());
#endif
# 368 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
    }
    _LIBCPP_INLINE_VISIBILITY constexpr iterator end() const noexcept {
#ifdef _LIBCPP_ABI_BOUNDED_ITERATORS
        return std::__make_bounded_iter(data() + size(), data(), data() + size());
#else
# 373 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
        return iterator(data() + size());
#endif
# 375 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
    }
    _LIBCPP_INLINE_VISIBILITY constexpr reverse_iterator        rbegin() const noexcept { return reverse_iterator(end()); }
    _LIBCPP_INLINE_VISIBILITY constexpr reverse_iterator          rend() const noexcept { return reverse_iterator(begin()); }

    _LIBCPP_INLINE_VISIBILITY span<const byte, _Extent * sizeof(element_type)> __as_bytes() const noexcept
    { return span<const byte, _Extent * sizeof(element_type)>{reinterpret_cast<const byte *>(data()), size_bytes()}; }

    _LIBCPP_INLINE_VISIBILITY span<byte, _Extent * sizeof(element_type)> __as_writable_bytes() const noexcept
    { return span<byte, _Extent * sizeof(element_type)>{reinterpret_cast<byte *>(data()), size_bytes()}; }

private:
    pointer    __data_;
};


template <typename _Tp>
class _LIBCPP_TEMPLATE_VIS span<_Tp, dynamic_extent> {
public:
//  constants and types
    using element_type           = _Tp;
    using value_type             = remove_cv_t<_Tp>;
    using size_type              = size_t;
    using difference_type        = ptrdiff_t;
    using pointer                = _Tp *;
    using const_pointer          = const _Tp *;
    using reference              = _Tp &;
    using const_reference        = const _Tp &;
#ifdef _LIBCPP_ABI_BOUNDED_ITERATORS
    using iterator               = __bounded_iter<pointer>;
#else
# 405 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
    using iterator               = __wrap_iter<pointer>;
#endif
# 407 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
    using reverse_iterator       = _VSTD::reverse_iterator<iterator>;

    static constexpr size_type extent = dynamic_extent;

// [span.cons], span constructors, copy, assignment, and destructor
    _LIBCPP_INLINE_VISIBILITY constexpr span() noexcept : __data_{nullptr}, __size_{0} {}

    constexpr span           (const span&) noexcept = default;
    constexpr span& operator=(const span&) noexcept = default;

    template <__span_compatible_iterator<element_type> _It>
    _LIBCPP_INLINE_VISIBILITY
    constexpr span(_It __first, size_type __count)
        : __data_{_VSTD::to_address(__first)}, __size_{__count} {}

    template <__span_compatible_iterator<element_type> _It, __span_compatible_sentinel_for<_It> _End>
    _LIBCPP_INLINE_VISIBILITY constexpr span(_It __first, _End __last)
        : __data_(_VSTD::to_address(__first)), __size_(__last - __first) {
        _LIBCPP_ASSERT_VALID_INPUT_RANGE(
            __last - __first >= 0, "invalid range in span's constructor (iterator, sentinel)");
    }

    template <size_t _Sz>
    _LIBCPP_INLINE_VISIBILITY
    constexpr span(type_identity_t<element_type> (&__arr)[_Sz]) noexcept : __data_{__arr}, __size_{_Sz} {}

    template <__span_array_convertible<element_type> _OtherElementType, size_t _Sz>
    _LIBCPP_INLINE_VISIBILITY
    constexpr span(array<_OtherElementType, _Sz>& __arr) noexcept : __data_{__arr.data()}, __size_{_Sz} {}

    template <class _OtherElementType, size_t _Sz>
        requires __span_array_convertible<const _OtherElementType, element_type>
    _LIBCPP_INLINE_VISIBILITY
    constexpr span(const array<_OtherElementType, _Sz>& __arr) noexcept : __data_{__arr.data()}, __size_{_Sz} {}

    template <__span_compatible_range<element_type> _Range>
    _LIBCPP_INLINE_VISIBILITY
    constexpr span(_Range&& __r) : __data_(ranges::data(__r)), __size_{ranges::size(__r)} {}

    template <__span_array_convertible<element_type> _OtherElementType, size_t _OtherExtent>
    _LIBCPP_INLINE_VISIBILITY
        constexpr span(const span<_OtherElementType, _OtherExtent>& __other)  noexcept
        : __data_{__other.data()}, __size_{__other.size()} {}

    template <size_t _Count>
    _LIBCPP_INLINE_VISIBILITY
    constexpr span<element_type, _Count> first() const noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(_Count <= size(), "span<T>::first<Count>(): Count out of range");
        return span<element_type, _Count>{data(), _Count};
    }

    template <size_t _Count>
    _LIBCPP_INLINE_VISIBILITY
    constexpr span<element_type, _Count> last() const noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(_Count <= size(), "span<T>::last<Count>(): Count out of range");
        return span<element_type, _Count>{data() + size() - _Count, _Count};
    }

    _LIBCPP_INLINE_VISIBILITY
    constexpr span<element_type, dynamic_extent> first(size_type __count) const noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__count <= size(), "span<T>::first(count): count out of range");
        return {data(), __count};
    }

    _LIBCPP_INLINE_VISIBILITY
    constexpr span<element_type, dynamic_extent> last (size_type __count) const noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__count <= size(), "span<T>::last(count): count out of range");
        return {data() + size() - __count, __count};
    }

    template <size_t _Offset, size_t _Count = dynamic_extent>
    _LIBCPP_INLINE_VISIBILITY
    constexpr span<element_type, _Count> subspan() const noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
            _Offset <= size(), "span<T>::subspan<Offset, Count>(): Offset out of range");
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(_Count == dynamic_extent || _Count <= size() - _Offset,
                                            "span<T>::subspan<Offset, Count>(): Offset + Count out of range");
        return span<element_type, _Count>{data() + _Offset, _Count == dynamic_extent ? size() - _Offset : _Count};
    }

    constexpr span<element_type, dynamic_extent>
    _LIBCPP_INLINE_VISIBILITY
    subspan(size_type __offset, size_type __count = dynamic_extent) const noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__offset <= size(), "span<T>::subspan(offset, count): offset out of range");
        if (__count == dynamic_extent)
            return {data() + __offset, size() - __offset};
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
            __count <= size() - __offset, "span<T>::subspan(offset, count): offset + count out of range");
        return {data() + __offset, __count};
    }

    _LIBCPP_INLINE_VISIBILITY constexpr size_type size()           const noexcept { return __size_; }
    _LIBCPP_INLINE_VISIBILITY constexpr size_type size_bytes()     const noexcept { return __size_ * sizeof(element_type); }
    [[nodiscard]] _LIBCPP_INLINE_VISIBILITY constexpr bool empty() const noexcept { return __size_ == 0; }

    _LIBCPP_INLINE_VISIBILITY constexpr reference operator[](size_type __idx) const noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__idx < size(), "span<T>::operator[](index): index out of range");
        return __data_[__idx];
    }

    _LIBCPP_INLINE_VISIBILITY constexpr reference front() const noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "span<T>::front() on empty span");
        return __data_[0];
    }

    _LIBCPP_INLINE_VISIBILITY constexpr reference back() const noexcept
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "span<T>::back() on empty span");
        return __data_[size()-1];
    }


    _LIBCPP_INLINE_VISIBILITY constexpr pointer data()                         const noexcept { return __data_; }

// [span.iter], span iterator support
    _LIBCPP_INLINE_VISIBILITY constexpr iterator begin() const noexcept {
#ifdef _LIBCPP_ABI_BOUNDED_ITERATORS
        return std::__make_bounded_iter(data(), data(), data() + size());
#else
# 534 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
        return iterator(data());
#endif
# 536 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
    }
    _LIBCPP_INLINE_VISIBILITY constexpr iterator end() const noexcept {
#ifdef _LIBCPP_ABI_BOUNDED_ITERATORS
        return std::__make_bounded_iter(data() + size(), data(), data() + size());
#else
# 541 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
        return iterator(data() + size());
#endif
# 543 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
    }
    _LIBCPP_INLINE_VISIBILITY constexpr reverse_iterator        rbegin() const noexcept { return reverse_iterator(end()); }
    _LIBCPP_INLINE_VISIBILITY constexpr reverse_iterator          rend() const noexcept { return reverse_iterator(begin()); }

    _LIBCPP_INLINE_VISIBILITY span<const byte, dynamic_extent> __as_bytes() const noexcept
    { return {reinterpret_cast<const byte *>(data()), size_bytes()}; }

    _LIBCPP_INLINE_VISIBILITY span<byte, dynamic_extent> __as_writable_bytes() const noexcept
    { return {reinterpret_cast<byte *>(data()), size_bytes()}; }

private:
    pointer   __data_;
    size_type __size_;
};

template <class _Tp, size_t _Extent>
inline constexpr bool ranges::enable_borrowed_range<span<_Tp, _Extent> > = true;

template <class _ElementType, size_t _Extent>
inline constexpr bool ranges::enable_view<span<_ElementType, _Extent>> = true;

//  as_bytes & as_writable_bytes
template <class _Tp, size_t _Extent>
_LIBCPP_INLINE_VISIBILITY
auto as_bytes(span<_Tp, _Extent> __s) noexcept
{ return __s.__as_bytes(); }

template <class _Tp, size_t _Extent> requires(!is_const_v<_Tp>)
_LIBCPP_INLINE_VISIBILITY
auto as_writable_bytes(span<_Tp, _Extent> __s) noexcept
{ return __s.__as_writable_bytes(); }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 576 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
template<contiguous_iterator _It, class _EndOrSize>
    span(_It, _EndOrSize) -> span<remove_reference_t<iter_reference_t<_It>>>;
#endif // _LIBCPP_STD_VER >= 20
# 579 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3

template<class _Tp, size_t _Sz>
    span(_Tp (&)[_Sz]) -> span<_Tp, _Sz>;

template<class _Tp, size_t _Sz>
    span(array<_Tp, _Sz>&) -> span<_Tp, _Sz>;

template<class _Tp, size_t _Sz>
    span(const array<_Tp, _Sz>&) -> span<const _Tp, _Sz>;

template<ranges::contiguous_range _Range>
    span(_Range&&) -> span<remove_reference_t<ranges::range_reference_t<_Range>>>;

#endif // _LIBCPP_STD_VER >= 20
# 593 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 599 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 599 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 600 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#  include <functional>
#endif /* expanded by -frewrite-includes */
# 600 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 601 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iterator>
#endif /* expanded by -frewrite-includes */
# 601 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 602 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 602 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
# 603 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#endif
# 604 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3

#endif // _LIBCPP_SPAN
# 606 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/span" 3
#endif /* span expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3

namespace ranges::views {

namespace __counted {

  struct __fn {
    template<contiguous_iterator _It>
    _LIBCPP_HIDE_FROM_ABI
    static constexpr auto __go(_It __it, iter_difference_t<_It> __count)
      noexcept(noexcept(span(std::to_address(__it), static_cast<size_t>(__count))))
      // Deliberately omit return-type SFINAE, because to_address is not SFINAE-friendly
      { return          span(std::to_address(__it), static_cast<size_t>(__count)); }

    template<random_access_iterator _It>
    _LIBCPP_HIDE_FROM_ABI
    static constexpr auto __go(_It __it, iter_difference_t<_It> __count)
      noexcept(noexcept(subrange(__it, __it + __count)))
      -> decltype(      subrange(__it, __it + __count))
      { return          subrange(__it, __it + __count); }

    template<class _It>
    _LIBCPP_HIDE_FROM_ABI
    static constexpr auto __go(_It __it, iter_difference_t<_It> __count)
      noexcept(noexcept(subrange(counted_iterator(std::move(__it), __count), default_sentinel)))
      -> decltype(      subrange(counted_iterator(std::move(__it), __count), default_sentinel))
      { return          subrange(counted_iterator(std::move(__it), __count), default_sentinel); }

    template<class _It, convertible_to<iter_difference_t<_It>> _Diff>
      requires input_or_output_iterator<decay_t<_It>>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_It&& __it, _Diff&& __count) const
      noexcept(noexcept(__go(std::forward<_It>(__it), std::forward<_Diff>(__count))))
      -> decltype(      __go(std::forward<_It>(__it), std::forward<_Diff>(__count)))
      { return          __go(std::forward<_It>(__it), std::forward<_Diff>(__count)); }
  };

} // namespace __counted

inline namespace __cpo {
  inline constexpr auto counted = __counted::__fn{};
} // namespace __cpo

} // namespace ranges::views

#endif // _LIBCPP_STD_VER >= 20
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_COUNTED_H
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/counted.h" 3
#endif /* counted.h expanded by -frewrite-includes */
# 387 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/dangling.h>
#endif /* expanded by -frewrite-includes */
# 387 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 388 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/data.h>
#endif /* expanded by -frewrite-includes */
# 388 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 389 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* drop_view.h expanded by -frewrite-includes */
#include <__ranges/drop_view.h>
#else /* drop_view.h expanded by -frewrite-includes */
# 389 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_DROP_VIEW_H
#define _LIBCPP___RANGES_DROP_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/bind_back.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/span.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/string_view.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/all.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* empty_view.h expanded by -frewrite-includes */
#include <__ranges/empty_view.h>
#else /* empty_view.h expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_EMPTY_VIEW_H
#define _LIBCPP___RANGES_EMPTY_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3

namespace ranges {
  template<class _Tp>
    requires is_object_v<_Tp>
  class empty_view : public view_interface<empty_view<_Tp>> {
  public:
    _LIBCPP_HIDE_FROM_ABI static constexpr _Tp* begin() noexcept { return nullptr; }
    _LIBCPP_HIDE_FROM_ABI static constexpr _Tp* end() noexcept { return nullptr; }
    _LIBCPP_HIDE_FROM_ABI static constexpr _Tp* data() noexcept { return nullptr; }
    _LIBCPP_HIDE_FROM_ABI static constexpr size_t size() noexcept { return 0; }
    _LIBCPP_HIDE_FROM_ABI static constexpr bool empty() noexcept { return true; }
  };

  template<class _Tp>
  inline constexpr bool enable_borrowed_range<empty_view<_Tp>> = true;

  namespace views {

  template <class _Tp>
  inline constexpr empty_view<_Tp> empty{};

  } // namespace views
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_EMPTY_VIEW_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/empty_view.h" 3
#endif /* empty_view.h expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* iota_view.h expanded by -frewrite-includes */
#include <__ranges/iota_view.h>
#else /* iota_view.h expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_IOTA_VIEW_H
#define _LIBCPP___RANGES_IOTA_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/three_way_comparable.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/equality_comparable.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/invocable.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/semiregular.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/totally_ordered.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/unreachable_sentinel.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/movable_box.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/type_identity.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#endif
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3

namespace ranges {
  template<class _Int>
  struct __get_wider_signed {
    consteval static auto __call() {
           if constexpr (sizeof(_Int) < sizeof(short)) return type_identity<short>{};
      else if constexpr (sizeof(_Int) < sizeof(int))   return type_identity<int>{};
      else if constexpr (sizeof(_Int) < sizeof(long))  return type_identity<long>{};
      else                                             return type_identity<long long>{};

      static_assert(sizeof(_Int) <= sizeof(long long),
        "Found integer-like type that is bigger than largest integer like type.");
    }

    using type = typename decltype(__call())::type;
  };

  template<class _Start>
  using _IotaDiffT = typename _If<
      (!integral<_Start> || sizeof(iter_difference_t<_Start>) > sizeof(_Start)),
      type_identity<iter_difference_t<_Start>>,
      __get_wider_signed<_Start>
    >::type;

  template<class _Iter>
  concept __decrementable = incrementable<_Iter> && requires(_Iter __i) {
    { --__i } -> same_as<_Iter&>;
    { __i-- } -> same_as<_Iter>;
  };

  template<class _Iter>
  concept __advanceable =
    __decrementable<_Iter> && totally_ordered<_Iter> &&
    requires(_Iter __i, const _Iter __j, const _IotaDiffT<_Iter> __n) {
      { __i += __n } -> same_as<_Iter&>;
      { __i -= __n } -> same_as<_Iter&>;
      _Iter(__j + __n);
      _Iter(__n + __j);
      _Iter(__j - __n);
      { __j - __j } -> convertible_to<_IotaDiffT<_Iter>>;
    };

  template<class>
  struct __iota_iterator_category {};

  template<incrementable _Tp>
  struct __iota_iterator_category<_Tp> {
    using iterator_category = input_iterator_tag;
  };

  template <weakly_incrementable _Start, semiregular _BoundSentinel = unreachable_sentinel_t>
    requires __weakly_equality_comparable_with<_Start, _BoundSentinel> && copyable<_Start>
  class iota_view : public view_interface<iota_view<_Start, _BoundSentinel>> {
    struct __iterator : public __iota_iterator_category<_Start> {
      friend class iota_view;

      using iterator_concept =
        _If<__advanceable<_Start>,   random_access_iterator_tag,
        _If<__decrementable<_Start>, bidirectional_iterator_tag,
        _If<incrementable<_Start>,   forward_iterator_tag,
        /*Else*/                     input_iterator_tag>>>;

      using value_type = _Start;
      using difference_type = _IotaDiffT<_Start>;

      _Start __value_ = _Start();

      _LIBCPP_HIDE_FROM_ABI
      __iterator() requires default_initializable<_Start> = default;

      _LIBCPP_HIDE_FROM_ABI
      constexpr explicit __iterator(_Start __value) : __value_(std::move(__value)) {}

      _LIBCPP_HIDE_FROM_ABI
      constexpr _Start operator*() const noexcept(is_nothrow_copy_constructible_v<_Start>) {
        return __value_;
      }

      _LIBCPP_HIDE_FROM_ABI
      constexpr __iterator& operator++() {
        ++__value_;
        return *this;
      }

      _LIBCPP_HIDE_FROM_ABI
      constexpr void operator++(int) { ++*this; }

      _LIBCPP_HIDE_FROM_ABI
      constexpr __iterator operator++(int) requires incrementable<_Start> {
        auto __tmp = *this;
        ++*this;
        return __tmp;
      }

      _LIBCPP_HIDE_FROM_ABI
      constexpr __iterator& operator--() requires __decrementable<_Start> {
        --__value_;
        return *this;
      }

      _LIBCPP_HIDE_FROM_ABI
      constexpr __iterator  operator--(int) requires __decrementable<_Start> {
        auto __tmp = *this;
        --*this;
        return __tmp;
      }

      _LIBCPP_HIDE_FROM_ABI
      constexpr __iterator& operator+=(difference_type __n)
        requires __advanceable<_Start>
      {
        if constexpr (__integer_like<_Start> && !__signed_integer_like<_Start>) {
          if (__n >= difference_type(0)) {
            __value_ += static_cast<_Start>(__n);
          } else {
            __value_ -= static_cast<_Start>(-__n);
          }
        } else {
          __value_ += __n;
        }
        return *this;
      }

      _LIBCPP_HIDE_FROM_ABI
      constexpr __iterator& operator-=(difference_type __n)
        requires __advanceable<_Start>
      {
        if constexpr (__integer_like<_Start> && !__signed_integer_like<_Start>) {
          if (__n >= difference_type(0)) {
            __value_ -= static_cast<_Start>(__n);
          } else {
            __value_ += static_cast<_Start>(-__n);
          }
        } else {
          __value_ -= __n;
        }
        return *this;
      }

      _LIBCPP_HIDE_FROM_ABI
      constexpr _Start operator[](difference_type __n) const
        requires __advanceable<_Start>
      {
        return _Start(__value_ + __n);
      }

      _LIBCPP_HIDE_FROM_ABI
      friend constexpr bool operator==(const __iterator& __x, const __iterator& __y)
        requires equality_comparable<_Start>
      {
        return __x.__value_ == __y.__value_;
      }

      _LIBCPP_HIDE_FROM_ABI
      friend constexpr bool operator<(const __iterator& __x, const __iterator& __y)
        requires totally_ordered<_Start>
      {
        return __x.__value_ < __y.__value_;
      }

      _LIBCPP_HIDE_FROM_ABI
      friend constexpr bool operator>(const __iterator& __x, const __iterator& __y)
        requires totally_ordered<_Start>
      {
        return __y < __x;
      }

      _LIBCPP_HIDE_FROM_ABI
      friend constexpr bool operator<=(const __iterator& __x, const __iterator& __y)
        requires totally_ordered<_Start>
      {
        return !(__y < __x);
      }

      _LIBCPP_HIDE_FROM_ABI
      friend constexpr bool operator>=(const __iterator& __x, const __iterator& __y)
        requires totally_ordered<_Start>
      {
        return !(__x < __y);
      }

      _LIBCPP_HIDE_FROM_ABI
      friend constexpr auto operator<=>(const __iterator& __x, const __iterator& __y)
        requires totally_ordered<_Start> && three_way_comparable<_Start>
      {
        return __x.__value_ <=> __y.__value_;
      }

      _LIBCPP_HIDE_FROM_ABI
      friend constexpr __iterator operator+(__iterator __i, difference_type __n)
        requires __advanceable<_Start>
      {
        __i += __n;
        return __i;
      }

      _LIBCPP_HIDE_FROM_ABI
      friend constexpr __iterator operator+(difference_type __n, __iterator __i)
        requires __advanceable<_Start>
      {
        return __i + __n;
      }

      _LIBCPP_HIDE_FROM_ABI
      friend constexpr __iterator operator-(__iterator __i, difference_type __n)
        requires __advanceable<_Start>
      {
        __i -= __n;
        return __i;
      }

      _LIBCPP_HIDE_FROM_ABI
      friend constexpr difference_type operator-(const __iterator& __x, const __iterator& __y)
        requires __advanceable<_Start>
      {
        if constexpr (__integer_like<_Start>) {
          if constexpr (__signed_integer_like<_Start>) {
            return difference_type(difference_type(__x.__value_) - difference_type(__y.__value_));
          }
          if (__y.__value_ > __x.__value_) {
            return difference_type(-difference_type(__y.__value_ - __x.__value_));
          }
          return difference_type(__x.__value_ - __y.__value_);
        }
        return __x.__value_ - __y.__value_;
      }
    };

    struct __sentinel {
      friend class iota_view;

    private:
      _BoundSentinel __bound_sentinel_ = _BoundSentinel();

    public:
      _LIBCPP_HIDE_FROM_ABI
      __sentinel() = default;
      _LIBCPP_HIDE_FROM_ABI constexpr explicit __sentinel(_BoundSentinel __bound_sentinel)
          : __bound_sentinel_(std::move(__bound_sentinel)) {}

      _LIBCPP_HIDE_FROM_ABI
      friend constexpr bool operator==(const __iterator& __x, const __sentinel& __y) {
        return __x.__value_ == __y.__bound_sentinel_;
      }

      _LIBCPP_HIDE_FROM_ABI
      friend constexpr iter_difference_t<_Start> operator-(const __iterator& __x, const __sentinel& __y)
        requires sized_sentinel_for<_BoundSentinel, _Start>
      {
        return __x.__value_ - __y.__bound_sentinel_;
      }

      _LIBCPP_HIDE_FROM_ABI
      friend constexpr iter_difference_t<_Start> operator-(const __sentinel& __x, const __iterator& __y)
        requires sized_sentinel_for<_BoundSentinel, _Start>
      {
        return -(__y - __x);
      }
    };

    _Start __value_ = _Start();
    _BoundSentinel __bound_sentinel_ = _BoundSentinel();

  public:
    _LIBCPP_HIDE_FROM_ABI
    iota_view() requires default_initializable<_Start> = default;

    _LIBCPP_HIDE_FROM_ABI
    constexpr explicit iota_view(_Start __value) : __value_(std::move(__value)) { }

    _LIBCPP_HIDE_FROM_ABI
    constexpr _LIBCPP_EXPLICIT_SINCE_CXX23 iota_view(type_identity_t<_Start> __value, type_identity_t<_BoundSentinel> __bound_sentinel)
        : __value_(std::move(__value)), __bound_sentinel_(std::move(__bound_sentinel)) {
      // Validate the precondition if possible.
      if constexpr (totally_ordered_with<_Start, _BoundSentinel>) {
        _LIBCPP_ASSERT_UNCATEGORIZED(ranges::less_equal()(__value_, __bound_sentinel_),
                                     "Precondition violated: value is greater than bound.");
      }
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr _LIBCPP_EXPLICIT_SINCE_CXX23 iota_view(__iterator __first, __iterator __last)
      requires same_as<_Start, _BoundSentinel>
    : iota_view(std::move(__first.__value_), std::move(__last.__value_)) {}

    _LIBCPP_HIDE_FROM_ABI
    constexpr _LIBCPP_EXPLICIT_SINCE_CXX23 iota_view(__iterator __first, _BoundSentinel __last)
      requires same_as<_BoundSentinel, unreachable_sentinel_t>
    : iota_view(std::move(__first.__value_), std::move(__last)) {}

    _LIBCPP_HIDE_FROM_ABI
    constexpr _LIBCPP_EXPLICIT_SINCE_CXX23 iota_view(__iterator __first, __sentinel __last)
      requires(!same_as<_Start, _BoundSentinel> && !same_as<_BoundSentinel, unreachable_sentinel_t>)
    : iota_view(std::move(__first.__value_), std::move(__last.__bound_sentinel_)) {}

    _LIBCPP_HIDE_FROM_ABI
    constexpr __iterator begin() const { return __iterator{__value_}; }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto end() const {
      if constexpr (same_as<_BoundSentinel, unreachable_sentinel_t>)
        return unreachable_sentinel;
      else
        return __sentinel{__bound_sentinel_};
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr __iterator end() const
      requires same_as<_Start, _BoundSentinel>
    {
      return __iterator{__bound_sentinel_};
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto size() const
      requires(same_as<_Start, _BoundSentinel> && __advanceable<_Start>) ||
              (integral<_Start> && integral<_BoundSentinel>) || sized_sentinel_for<_BoundSentinel, _Start>
    {
      if constexpr (__integer_like<_Start> && __integer_like<_BoundSentinel>) {
        return (__value_ < 0)
                 ? ((__bound_sentinel_ < 0)
                        ? std::__to_unsigned_like(-__value_) - std::__to_unsigned_like(-__bound_sentinel_)
                        : std::__to_unsigned_like(__bound_sentinel_) + std::__to_unsigned_like(-__value_))
                 : std::__to_unsigned_like(__bound_sentinel_) - std::__to_unsigned_like(__value_);
      } else {
        return std::__to_unsigned_like(__bound_sentinel_ - __value_);
      }
    }
  };

  template <class _Start, class _BoundSentinel>
    requires(!__integer_like<_Start> || !__integer_like<_BoundSentinel> ||
             (__signed_integer_like<_Start> == __signed_integer_like<_BoundSentinel>))
  iota_view(_Start, _BoundSentinel) -> iota_view<_Start, _BoundSentinel>;

  template <class _Start, class _BoundSentinel>
  inline constexpr bool enable_borrowed_range<iota_view<_Start, _BoundSentinel>> = true;

 namespace views {
 namespace __iota {
  struct __fn {
    template<class _Start>
    _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Start&& __start) const
      noexcept(noexcept(ranges::iota_view(std::forward<_Start>(__start))))
      -> decltype(      ranges::iota_view(std::forward<_Start>(__start)))
      { return          ranges::iota_view(std::forward<_Start>(__start)); }

    template <class _Start, class _BoundSentinel>
    _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Start&& __start, _BoundSentinel&& __bound_sentinel) const
      noexcept(noexcept(ranges::iota_view(std::forward<_Start>(__start), std::forward<_BoundSentinel>(__bound_sentinel))))
      -> decltype(      ranges::iota_view(std::forward<_Start>(__start), std::forward<_BoundSentinel>(__bound_sentinel)))
      { return          ranges::iota_view(std::forward<_Start>(__start), std::forward<_BoundSentinel>(__bound_sentinel)); }
  };
} // namespace __iota

inline namespace __cpo {
  inline constexpr auto iota = __iota::__fn{};
} // namespace __cpo
} // namespace views
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 410 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_IOTA_VIEW_H
# 414 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/iota_view.h" 3
#endif /* iota_view.h expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/non_propagating_cache.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* repeat_view.h expanded by -frewrite-includes */
#include <__ranges/repeat_view.h>
#else /* repeat_view.h expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_REPEAT_VIEW_H
#define _LIBCPP___RANGES_REPEAT_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/semiregular.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/unreachable_sentinel.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/iota_view.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/movable_box.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/in_place.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/piecewise_construct.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#endif
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3

namespace ranges {

template <class _Tp>
concept __integer_like_with_usable_difference_type =
    __signed_integer_like<_Tp> || (__integer_like<_Tp> && weakly_incrementable<_Tp>);

template <class _Tp>
struct __repeat_view_iterator_difference {
  using type = _IotaDiffT<_Tp>;
};

template <__signed_integer_like _Tp>
struct __repeat_view_iterator_difference<_Tp> {
  using type = _Tp;
};

template <class _Tp>
using __repeat_view_iterator_difference_t = typename __repeat_view_iterator_difference<_Tp>::type;

namespace views::__drop {
struct __fn;
} // namespace views::__drop

namespace views::__take {
struct __fn;
} // namespace views::__take

template <move_constructible _Tp, semiregular _Bound = unreachable_sentinel_t>
  requires(is_object_v<_Tp> && same_as<_Tp, remove_cv_t<_Tp>> &&
           (__integer_like_with_usable_difference_type<_Bound> || same_as<_Bound, unreachable_sentinel_t>))
class repeat_view : public view_interface<repeat_view<_Tp, _Bound>> {
  friend struct views::__take::__fn;
  friend struct views::__drop::__fn;
  class __iterator;

public:
  _LIBCPP_HIDE_FROM_ABI repeat_view()
    requires default_initializable<_Tp>
  = default;

  _LIBCPP_HIDE_FROM_ABI constexpr explicit repeat_view(const _Tp& __value, _Bound __bound_sentinel = _Bound())
    requires copy_constructible<_Tp>
      : __value_(in_place, __value), __bound_(__bound_sentinel) {
    if constexpr (!same_as<_Bound, unreachable_sentinel_t>)
      _LIBCPP_ASSERT_UNCATEGORIZED(__bound_ >= 0, "The value of bound must be greater than or equal to 0");
  }

  _LIBCPP_HIDE_FROM_ABI constexpr explicit repeat_view(_Tp&& __value, _Bound __bound_sentinel = _Bound())
      : __value_(in_place, std::move(__value)), __bound_(__bound_sentinel) {
    if constexpr (!same_as<_Bound, unreachable_sentinel_t>)
      _LIBCPP_ASSERT_UNCATEGORIZED(__bound_ >= 0, "The value of bound must be greater than or equal to 0");
  }

  template <class... _TpArgs, class... _BoundArgs>
    requires(constructible_from<_Tp, _TpArgs...> && constructible_from<_Bound, _BoundArgs...>)
  _LIBCPP_HIDE_FROM_ABI constexpr explicit repeat_view(
      piecewise_construct_t, tuple<_TpArgs...> __value_args, tuple<_BoundArgs...> __bound_args = tuple<>{})
      : __value_(in_place, std::make_from_tuple<_Tp>(std::move(__value_args))),
        __bound_(std::make_from_tuple<_Bound>(std::move(__bound_args))) {
    if constexpr (!same_as<_Bound, unreachable_sentinel_t>)
      _LIBCPP_ASSERT_UNCATEGORIZED(
          __bound_ >= 0, "The behavior is undefined if Bound is not unreachable_sentinel_t and bound is negative");
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator begin() const { return __iterator(std::addressof(*__value_)); }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator end() const
    requires(!same_as<_Bound, unreachable_sentinel_t>)
  {
    return __iterator(std::addressof(*__value_), __bound_);
  }

  _LIBCPP_HIDE_FROM_ABI constexpr unreachable_sentinel_t end() const noexcept { return unreachable_sentinel; }

  _LIBCPP_HIDE_FROM_ABI constexpr auto size() const
    requires(!same_as<_Bound, unreachable_sentinel_t>)
  {
    return std::__to_unsigned_like(__bound_);
  }

private:
  __movable_box<_Tp> __value_;
  _LIBCPP_NO_UNIQUE_ADDRESS _Bound __bound_ = _Bound();
};

template <class _Tp, class _Bound>
repeat_view(_Tp, _Bound) -> repeat_view<_Tp, _Bound>;

// [range.repeat.iterator]
template <move_constructible _Tp, semiregular _Bound>
  requires(is_object_v<_Tp> && same_as<_Tp, remove_cv_t<_Tp>> &&
           (__integer_like_with_usable_difference_type<_Bound> || same_as<_Bound, unreachable_sentinel_t>))
class repeat_view<_Tp, _Bound>::__iterator {
  friend class repeat_view;

  using _IndexT = conditional_t<same_as<_Bound, unreachable_sentinel_t>, ptrdiff_t, _Bound>;

  _LIBCPP_HIDE_FROM_ABI constexpr explicit __iterator(const _Tp* __value, _IndexT __bound_sentinel = _IndexT())
      : __value_(__value), __current_(__bound_sentinel) {}

public:
  using iterator_concept  = random_access_iterator_tag;
  using iterator_category = random_access_iterator_tag;
  using value_type        = _Tp;
  using difference_type   = __repeat_view_iterator_difference_t<_IndexT>;

  _LIBCPP_HIDE_FROM_ABI __iterator() = default;

  _LIBCPP_HIDE_FROM_ABI constexpr const _Tp& operator*() const noexcept { return *__value_; }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator++() {
    ++__current_;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator operator++(int) {
    auto __tmp = *this;
    ++*this;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator--() {
    if constexpr (!same_as<_Bound, unreachable_sentinel_t>)
      _LIBCPP_ASSERT_UNCATEGORIZED(__current_ > 0, "The value of bound must be greater than or equal to 0");
    --__current_;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator operator--(int) {
    auto __tmp = *this;
    --*this;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator+=(difference_type __n) {
    if constexpr (!same_as<_Bound, unreachable_sentinel_t>)
      _LIBCPP_ASSERT_UNCATEGORIZED(__current_ + __n >= 0, "The value of bound must be greater than or equal to 0");
    __current_ += __n;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator-=(difference_type __n) {
    if constexpr (!same_as<_Bound, unreachable_sentinel_t>)
      _LIBCPP_ASSERT_UNCATEGORIZED(__current_ - __n >= 0, "The value of bound must be greater than or equal to 0");
    __current_ -= __n;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr const _Tp& operator[](difference_type __n) const noexcept { return *(*this + __n); }

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const __iterator& __x, const __iterator& __y) {
    return __x.__current_ == __y.__current_;
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr auto operator<=>(const __iterator& __x, const __iterator& __y) {
    return __x.__current_ <=> __y.__current_;
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr __iterator operator+(__iterator __i, difference_type __n) {
    __i += __n;
    return __i;
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr __iterator operator+(difference_type __n, __iterator __i) {
    __i += __n;
    return __i;
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr __iterator operator-(__iterator __i, difference_type __n) {
    __i -= __n;
    return __i;
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr difference_type operator-(const __iterator& __x, const __iterator& __y) {
    return static_cast<difference_type>(__x.__current_) - static_cast<difference_type>(__y.__current_);
  }

private:
  const _Tp* __value_ = nullptr;
  _IndexT __current_  = _IndexT();
};

// clang-format off
namespace views {
namespace __repeat {
struct __fn {
  template <class _Tp>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __value) const
    noexcept(noexcept(ranges::repeat_view(std::forward<_Tp>(__value))))
    -> decltype(      ranges::repeat_view(std::forward<_Tp>(__value)))
    { return          ranges::repeat_view(std::forward<_Tp>(__value)); }


  template <class _Tp, class _Bound>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __value, _Bound&& __bound_sentinel) const
    noexcept(noexcept(ranges::repeat_view(std::forward<_Tp>(__value), std::forward<_Bound>(__bound_sentinel))))
    -> decltype(      ranges::repeat_view(std::forward<_Tp>(__value), std::forward<_Bound>(__bound_sentinel)))
    { return          ranges::repeat_view(std::forward<_Tp>(__value), std::forward<_Bound>(__bound_sentinel)); }
};
} // namespace __repeat
// clang-format on

inline namespace __cpo {
inline constexpr auto repeat = __repeat::__fn{};
} // namespace __cpo
} // namespace views

template <class _Tp>
inline constexpr bool __is_repeat_specialization = false;

template <class _Tp, class _Bound>
inline constexpr bool __is_repeat_specialization<repeat_view<_Tp, _Bound>> = true;

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 23
# 257 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_REPEAT_VIEW_H
# 261 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/repeat_view.h" 3
#endif /* repeat_view.h expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/auto_cast.h>
#endif /* expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#endif
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3

namespace ranges {
  template<view _View>
  class drop_view
    : public view_interface<drop_view<_View>>
  {
    // We cache begin() whenever ranges::next is not guaranteed O(1) to provide an
    // amortized O(1) begin() method. If this is an input_range, then we cannot cache
    // begin because begin is not equality preserving.
    // Note: drop_view<input-range>::begin() is still trivially amortized O(1) because
    // one can't call begin() on it more than once.
    static constexpr bool _UseCache = forward_range<_View> && !(random_access_range<_View> && sized_range<_View>);
    using _Cache = _If<_UseCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
    _LIBCPP_NO_UNIQUE_ADDRESS _Cache __cached_begin_ = _Cache();
    range_difference_t<_View> __count_ = 0;
    _View __base_ = _View();

public:
    _LIBCPP_HIDE_FROM_ABI drop_view() requires default_initializable<_View> = default;

    _LIBCPP_HIDE_FROM_ABI
    constexpr _LIBCPP_EXPLICIT_SINCE_CXX23 drop_view(_View __base, range_difference_t<_View> __count)
      : __count_(__count)
      , __base_(std::move(__base))
    {
      _LIBCPP_ASSERT_UNCATEGORIZED(__count_ >= 0, "count must be greater than or equal to zero.");
    }

    _LIBCPP_HIDE_FROM_ABI constexpr _View base() const& requires copy_constructible<_View> { return __base_; }
    _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__base_); }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto begin()
      requires (!(__simple_view<_View> &&
                  random_access_range<const _View> && sized_range<const _View>))
    {
      if constexpr (_UseCache)
        if (__cached_begin_.__has_value())
          return *__cached_begin_;

      auto __tmp = ranges::next(ranges::begin(__base_), __count_, ranges::end(__base_));
      if constexpr (_UseCache)
        __cached_begin_.__emplace(__tmp);
      return __tmp;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto begin() const
      requires random_access_range<const _View> && sized_range<const _View>
    {
      return ranges::next(ranges::begin(__base_), __count_, ranges::end(__base_));
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto end()
      requires (!__simple_view<_View>)
    { return ranges::end(__base_); }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto end() const
      requires range<const _View>
    { return ranges::end(__base_); }

    _LIBCPP_HIDE_FROM_ABI
    static constexpr auto __size(auto& __self) {
      const auto __s = ranges::size(__self.__base_);
      const auto __c = static_cast<decltype(__s)>(__self.__count_);
      return __s < __c ? 0 : __s - __c;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto size()
      requires sized_range<_View>
    { return __size(*this); }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto size() const
      requires sized_range<const _View>
    { return __size(*this); }
  };

template<class _Range>
drop_view(_Range&&, range_difference_t<_Range>) -> drop_view<views::all_t<_Range>>;

template<class _Tp>
inline constexpr bool enable_borrowed_range<drop_view<_Tp>> = enable_borrowed_range<_Tp>;

namespace views {
namespace __drop {

template <class _Tp>
inline constexpr bool __is_empty_view = false;

template <class _Tp>
inline constexpr bool __is_empty_view<empty_view<_Tp>> = true;

template <class _Tp>
inline constexpr bool __is_passthrough_specialization = false;

template <class _Tp, size_t _Extent>
inline constexpr bool __is_passthrough_specialization<span<_Tp, _Extent>> = true;

template <class _CharT, class _Traits>
inline constexpr bool __is_passthrough_specialization<basic_string_view<_CharT, _Traits>> = true;

template <class _Np, class _Bound>
inline constexpr bool __is_passthrough_specialization<iota_view<_Np, _Bound>> = true;

template <class _Iter, class _Sent, subrange_kind _Kind>
inline constexpr bool __is_passthrough_specialization<subrange<_Iter, _Sent, _Kind>> =
    !subrange<_Iter, _Sent, _Kind>::_StoreSize;

template <class _Tp>
inline constexpr bool __is_subrange_specialization_with_store_size = false;

template <class _Iter, class _Sent, subrange_kind _Kind>
inline constexpr bool __is_subrange_specialization_with_store_size<subrange<_Iter, _Sent, _Kind>> =
    subrange<_Iter, _Sent, _Kind>::_StoreSize;

template <class _Tp>
struct __passthrough_type;

template <class _Tp, size_t _Extent>
struct __passthrough_type<span<_Tp, _Extent>> {
  using type = span<_Tp>;
};

template <class _CharT, class _Traits>
struct __passthrough_type<basic_string_view<_CharT, _Traits>> {
  using type = basic_string_view<_CharT, _Traits>;
};

template <class _Np, class _Bound>
struct __passthrough_type<iota_view<_Np, _Bound>> {
  using type = iota_view<_Np, _Bound>;
};

template <class _Iter, class _Sent, subrange_kind _Kind>
struct __passthrough_type<subrange<_Iter, _Sent, _Kind>> {
  using type = subrange<_Iter, _Sent, _Kind>;
};

template <class _Tp>
using __passthrough_type_t = typename __passthrough_type<_Tp>::type;

struct __fn {
  // [range.drop.overview]: the `empty_view` case.
  template <class _Range, convertible_to<range_difference_t<_Range>> _Np>
    requires __is_empty_view<remove_cvref_t<_Range>>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Range&& __range, _Np&&) const
    noexcept(noexcept(_LIBCPP_AUTO_CAST(std::forward<_Range>(__range))))
    -> decltype(      _LIBCPP_AUTO_CAST(std::forward<_Range>(__range)))
    { return          _LIBCPP_AUTO_CAST(std::forward<_Range>(__range)); }

  // [range.drop.overview]: the `span | basic_string_view | iota_view | subrange (StoreSize == false)` case.
  template <class _Range,
            convertible_to<range_difference_t<_Range>> _Np,
            class _RawRange = remove_cvref_t<_Range>,
            class _Dist = range_difference_t<_Range>>
    requires (!__is_empty_view<_RawRange> &&
              random_access_range<_RawRange> &&
              sized_range<_RawRange> &&
              __is_passthrough_specialization<_RawRange>)
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Range&& __rng, _Np&& __n) const
    noexcept(noexcept(__passthrough_type_t<_RawRange>(
                              ranges::begin(__rng) + std::min<_Dist>(ranges::distance(__rng), std::forward<_Np>(__n)),
                              ranges::end(__rng)
                              )))
    -> decltype(      __passthrough_type_t<_RawRange>(
                              // Note: deliberately not forwarding `__rng` to guard against double moves.
                              ranges::begin(__rng) + std::min<_Dist>(ranges::distance(__rng), std::forward<_Np>(__n)),
                              ranges::end(__rng)
                              ))
    { return          __passthrough_type_t<_RawRange>(
                              ranges::begin(__rng) + std::min<_Dist>(ranges::distance(__rng), std::forward<_Np>(__n)),
                              ranges::end(__rng)
                              ); }

  // [range.drop.overview]: the `subrange (StoreSize == true)` case.
  template <class _Range,
            convertible_to<range_difference_t<_Range>> _Np,
            class _RawRange = remove_cvref_t<_Range>,
            class _Dist = range_difference_t<_Range>>
    requires (!__is_empty_view<_RawRange> &&
              random_access_range<_RawRange> &&
              sized_range<_RawRange> &&
              __is_subrange_specialization_with_store_size<_RawRange>)
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Range&& __rng, _Np&& __n) const
    noexcept(noexcept(_RawRange(
                              ranges::begin(__rng) + std::min<_Dist>(ranges::distance(__rng), std::forward<_Np>(__n)),
                              ranges::end(__rng),
                              std::__to_unsigned_like(ranges::distance(__rng) -
                                  std::min<_Dist>(ranges::distance(__rng), std::forward<_Np>(__n)))
                              )))
    -> decltype(      _RawRange(
                              // Note: deliberately not forwarding `__rng` to guard against double moves.
                              ranges::begin(__rng) + std::min<_Dist>(ranges::distance(__rng), std::forward<_Np>(__n)),
                              ranges::end(__rng),
                              std::__to_unsigned_like(ranges::distance(__rng) -
                                  std::min<_Dist>(ranges::distance(__rng), std::forward<_Np>(__n)))
                              ))
    {
      // Introducing local variables avoids calculating `min` and `distance` twice (at the cost of diverging from the
      // expression used in the `noexcept` clause and the return statement).
      auto __dist = ranges::distance(__rng);
      auto __clamped = std::min<_Dist>(__dist, std::forward<_Np>(__n));
      return          _RawRange(
                              ranges::begin(__rng) + __clamped,
                              ranges::end(__rng),
                              std::__to_unsigned_like(__dist - __clamped)
                              );}
// clang-format off
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 273 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
  // [range.drop.overview]: the `repeat_view` "_RawRange models sized_range" case.
  template <class _Range,
            convertible_to<range_difference_t<_Range>> _Np,
            class _RawRange = remove_cvref_t<_Range>,
            class _Dist     = range_difference_t<_Range>>
    requires (__is_repeat_specialization<_RawRange> && sized_range<_RawRange>)
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range, _Np&& __n) const
    noexcept(noexcept(views::repeat(*__range.__value_, ranges::distance(__range) - std::min<_Dist>(ranges::distance(__range), std::forward<_Np>(__n)))))
    -> decltype(      views::repeat(*__range.__value_, ranges::distance(__range) - std::min<_Dist>(ranges::distance(__range), std::forward<_Np>(__n))))
    { return          views::repeat(*__range.__value_, ranges::distance(__range) - std::min<_Dist>(ranges::distance(__range), std::forward<_Np>(__n))); }

  // [range.drop.overview]: the `repeat_view` "otherwise" case.
  template <class _Range,
            convertible_to<range_difference_t<_Range>> _Np,
            class _RawRange = remove_cvref_t<_Range>,
            class _Dist     = range_difference_t<_Range>>
    requires (__is_repeat_specialization<_RawRange> && !sized_range<_RawRange>)
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Range&& __range, _Np&&) const
    noexcept(noexcept(_LIBCPP_AUTO_CAST(std::forward<_Range>(__range))))
    -> decltype(      _LIBCPP_AUTO_CAST(std::forward<_Range>(__range)))
    { return          _LIBCPP_AUTO_CAST(std::forward<_Range>(__range)); }
#endif
# 296 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
// clang-format on

  // [range.drop.overview]: the "otherwise" case.
  template <class _Range, convertible_to<range_difference_t<_Range>> _Np,
            class _RawRange = remove_cvref_t<_Range>>
    // Note: without specifically excluding the other cases, GCC sees this overload as ambiguous with the other
    // overloads.
    requires (!(__is_empty_view<_RawRange> ||
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 305 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
                __is_repeat_specialization<_RawRange> ||
#endif
# 307 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
               (__is_subrange_specialization_with_store_size<_RawRange> &&
               sized_range<_RawRange> &&
                random_access_range<_RawRange>) ||
               (__is_passthrough_specialization<_RawRange> &&
                sized_range<_RawRange> &&
                random_access_range<_RawRange>)
             ))
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Range&& __range, _Np&& __n) const
    noexcept(noexcept(drop_view(std::forward<_Range>(__range), std::forward<_Np>(__n))))
    -> decltype(      drop_view(std::forward<_Range>(__range), std::forward<_Np>(__n)))
    { return          drop_view(std::forward<_Range>(__range), std::forward<_Np>(__n)); }

  template <class _Np>
    requires constructible_from<decay_t<_Np>, _Np>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Np&& __n) const
    noexcept(is_nothrow_constructible_v<decay_t<_Np>, _Np>)
  { return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Np>(__n))); }
};

} // namespace __drop

inline namespace __cpo {
  inline constexpr auto drop = __drop::__fn{};
} // namespace __cpo
} // namespace views

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 338 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___RANGES_DROP_VIEW_H
# 344 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_view.h" 3
#endif /* drop_view.h expanded by -frewrite-includes */
# 390 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* drop_while_view.h expanded by -frewrite-includes */
#include <__ranges/drop_while_view.h>
#else /* drop_while_view.h expanded by -frewrite-includes */
# 390 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_DROP_WHILE_VIEW_H
#define _LIBCPP___RANGES_DROP_WHILE_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_find_if_not.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/bind_back.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/reference_wrapper.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/all.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/movable_box.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/non_propagating_cache.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/in_place.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#endif
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3

namespace ranges {

template <view _View, class _Pred>
  requires input_range<_View> && is_object_v<_Pred> && indirect_unary_predicate<const _Pred, iterator_t<_View>>
class drop_while_view : public view_interface<drop_while_view<_View, _Pred>> {
public:
  _LIBCPP_HIDE_FROM_ABI drop_while_view()
    requires default_initializable<_View> && default_initializable<_Pred>
  = default;

  _LIBCPP_HIDE_FROM_ABI constexpr _LIBCPP_EXPLICIT_SINCE_CXX23 drop_while_view(_View __base, _Pred __pred)
      : __base_(std::move(__base)), __pred_(std::in_place, std::move(__pred)) {}

  _LIBCPP_HIDE_FROM_ABI constexpr _View base() const&
    requires copy_constructible<_View>
  {
    return __base_;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__base_); }

  _LIBCPP_HIDE_FROM_ABI constexpr const _Pred& pred() const { return *__pred_; }

  _LIBCPP_HIDE_FROM_ABI constexpr auto begin() {
    _LIBCPP_ASSERT_UNCATEGORIZED(
        __pred_.__has_value(),
        "drop_while_view needs to have a non-empty predicate before calling begin() -- did a previous "
        "assignment to this drop_while_view fail?");
    if constexpr (_UseCache) {
      if (!__cached_begin_.__has_value()) {
        __cached_begin_.__emplace(ranges::find_if_not(__base_, std::cref(*__pred_)));
      }
      return *__cached_begin_;
    } else {
      return ranges::find_if_not(__base_, std::cref(*__pred_));
    }
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto end() { return ranges::end(__base_); }

private:
  _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
  _LIBCPP_NO_UNIQUE_ADDRESS __movable_box<_Pred> __pred_;

  static constexpr bool _UseCache = forward_range<_View>;
  using _Cache                    = _If<_UseCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
  _LIBCPP_NO_UNIQUE_ADDRESS _Cache __cached_begin_ = _Cache();
};

template <class _View, class _Pred>
inline constexpr bool enable_borrowed_range<drop_while_view<_View, _Pred>> = enable_borrowed_range<_View>;

template <class _Range, class _Pred>
drop_while_view(_Range&&, _Pred) -> drop_while_view<views::all_t<_Range>, _Pred>;

namespace views {
namespace __drop_while {

struct __fn {
  template <class _Range, class _Pred>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range, _Pred&& __pred) const
      noexcept(noexcept(/**/ drop_while_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred))))
          -> decltype(/*--*/ drop_while_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred))) {
    return /*-------------*/ drop_while_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred));
  }

  template <class _Pred>
    requires constructible_from<decay_t<_Pred>, _Pred>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Pred&& __pred) const
      noexcept(is_nothrow_constructible_v<decay_t<_Pred>, _Pred>) {
    return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Pred>(__pred)));
  }
};

} // namespace __drop_while

inline namespace __cpo {
inline constexpr auto drop_while = __drop_while::__fn{};
} // namespace __cpo
} // namespace views
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 127 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_DROP_WHILE_VIEW_H
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/drop_while_view.h" 3
#endif /* drop_while_view.h expanded by -frewrite-includes */
# 391 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* elements_view.h expanded by -frewrite-includes */
#include <__ranges/elements_view.h>
#else /* elements_view.h expanded by -frewrite-includes */
# 391 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_ELEMENTS_VIEW_H
#define _LIBCPP___RANGES_ELEMENTS_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/three_way_comparable.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/derived_from.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/equality_comparable.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/get.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/all.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_element.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_like.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_size.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/maybe_const.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#endif
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3

namespace ranges {

template <class _Tp, size_t _Np>
concept __has_tuple_element = __tuple_like<_Tp> && _Np < tuple_size<_Tp>::value;

template <class _Tp, size_t _Np>
concept __returnable_element = is_reference_v<_Tp> || move_constructible<tuple_element_t<_Np, _Tp>>;

template <input_range _View, size_t _Np>
  requires view<_View> && __has_tuple_element<range_value_t<_View>, _Np> &&
           __has_tuple_element<remove_reference_t<range_reference_t<_View>>, _Np> &&
           __returnable_element<range_reference_t<_View>, _Np>
class elements_view : public view_interface<elements_view<_View, _Np>> {
private:
  template <bool>
  class __iterator;

  template <bool>
  class __sentinel;

public:
  _LIBCPP_HIDE_FROM_ABI elements_view()
    requires default_initializable<_View>
  = default;

  _LIBCPP_HIDE_FROM_ABI constexpr explicit elements_view(_View __base) : __base_(std::move(__base)) {}

  _LIBCPP_HIDE_FROM_ABI constexpr _View base() const&
    requires copy_constructible<_View>
  {
    return __base_;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__base_); }

  _LIBCPP_HIDE_FROM_ABI constexpr auto begin()
    requires(!__simple_view<_View>)
  {
    return __iterator</*_Const=*/false>(ranges::begin(__base_));
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto begin() const
    requires range<const _View>
  {
    return __iterator</*_Const=*/true>(ranges::begin(__base_));
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto end()
    requires(!__simple_view<_View> && !common_range<_View>)
  {
    return __sentinel</*_Const=*/false>{ranges::end(__base_)};
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto end()
    requires(!__simple_view<_View> && common_range<_View>)
  {
    return __iterator</*_Const=*/false>{ranges::end(__base_)};
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto end() const
    requires range<const _View>
  {
    return __sentinel</*_Const=*/true>{ranges::end(__base_)};
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto end() const
    requires common_range<const _View>
  {
    return __iterator</*_Const=*/true>{ranges::end(__base_)};
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto size()
    requires sized_range<_View>
  {
    return ranges::size(__base_);
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto size() const
    requires sized_range<const _View>
  {
    return ranges::size(__base_);
  }

private:
  _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
};

template <class, size_t>
struct __elements_view_iterator_category_base {};

template <forward_range _Base, size_t _Np>
struct __elements_view_iterator_category_base<_Base, _Np> {
  static consteval auto __get_iterator_category() {
    using _Result = decltype(std::get<_Np>(*std::declval<iterator_t<_Base>>()));
    using _Cat    = typename iterator_traits<iterator_t<_Base>>::iterator_category;

    if constexpr (!is_lvalue_reference_v<_Result>) {
      return input_iterator_tag{};
    } else if constexpr (derived_from<_Cat, random_access_iterator_tag>) {
      return random_access_iterator_tag{};
    } else {
      return _Cat{};
    }
  }

  using iterator_category = decltype(__get_iterator_category());
};

template <input_range _View, size_t _Np>
  requires view<_View> && __has_tuple_element<range_value_t<_View>, _Np> &&
           __has_tuple_element<remove_reference_t<range_reference_t<_View>>, _Np> &&
           __returnable_element<range_reference_t<_View>, _Np>
template <bool _Const>
class elements_view<_View, _Np>::__iterator
    : public __elements_view_iterator_category_base<__maybe_const<_Const, _View>, _Np> {
  template <bool>
  friend class __iterator;

  template <bool>
  friend class __sentinel;

  using _Base = __maybe_const<_Const, _View>;

  iterator_t<_Base> __current_ = iterator_t<_Base>();

  _LIBCPP_HIDE_FROM_ABI static constexpr decltype(auto) __get_element(const iterator_t<_Base>& __i) {
    if constexpr (is_reference_v<range_reference_t<_Base>>) {
      return std::get<_Np>(*__i);
    } else {
      using _Element = remove_cv_t<tuple_element_t<_Np, range_reference_t<_Base>>>;
      return static_cast<_Element>(std::get<_Np>(*__i));
    }
  }

  static consteval auto __get_iterator_concept() {
    if constexpr (random_access_range<_Base>) {
      return random_access_iterator_tag{};
    } else if constexpr (bidirectional_range<_Base>) {
      return bidirectional_iterator_tag{};
    } else if constexpr (forward_range<_Base>) {
      return forward_iterator_tag{};
    } else {
      return input_iterator_tag{};
    }
  }

public:
  using iterator_concept = decltype(__get_iterator_concept());
  using value_type       = remove_cvref_t<tuple_element_t<_Np, range_value_t<_Base>>>;
  using difference_type  = range_difference_t<_Base>;

  _LIBCPP_HIDE_FROM_ABI __iterator()
    requires default_initializable<iterator_t<_Base>>
  = default;

  _LIBCPP_HIDE_FROM_ABI constexpr explicit __iterator(iterator_t<_Base> __current) : __current_(std::move(__current)) {}

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator(__iterator<!_Const> __i)
    requires _Const && convertible_to<iterator_t<_View>, iterator_t<_Base>>
      : __current_(std::move(__i.__current_)) {}

  _LIBCPP_HIDE_FROM_ABI constexpr const iterator_t<_Base>& base() const& noexcept { return __current_; }

  _LIBCPP_HIDE_FROM_ABI constexpr iterator_t<_Base> base() && { return std::move(__current_); }

  _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator*() const { return __get_element(__current_); }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator++() {
    ++__current_;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr void operator++(int) { ++__current_; }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator operator++(int)
    requires forward_range<_Base>
  {
    auto __temp = *this;
    ++__current_;
    return __temp;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator--()
    requires bidirectional_range<_Base>
  {
    --__current_;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator operator--(int)
    requires bidirectional_range<_Base>
  {
    auto __temp = *this;
    --__current_;
    return __temp;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator+=(difference_type __n)
    requires random_access_range<_Base>
  {
    __current_ += __n;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator-=(difference_type __n)
    requires random_access_range<_Base>
  {
    __current_ -= __n;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator[](difference_type __n) const
    requires random_access_range<_Base>
  {
    return __get_element(__current_ + __n);
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const __iterator& __x, const __iterator& __y)
    requires equality_comparable<iterator_t<_Base>>
  {
    return __x.__current_ == __y.__current_;
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator<(const __iterator& __x, const __iterator& __y)
    requires random_access_range<_Base>
  {
    return __x.__current_ < __y.__current_;
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator>(const __iterator& __x, const __iterator& __y)
    requires random_access_range<_Base>
  {
    return __y < __x;
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator<=(const __iterator& __x, const __iterator& __y)
    requires random_access_range<_Base>
  {
    return !(__y < __x);
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator>=(const __iterator& __x, const __iterator& __y)
    requires random_access_range<_Base>
  {
    return !(__x < __y);
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr auto operator<=>(const __iterator& __x, const __iterator& __y)
    requires random_access_range<_Base> && three_way_comparable<iterator_t<_Base>>
  {
    return __x.__current_ <=> __y.__current_;
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr __iterator operator+(const __iterator& __x, difference_type __y)
    requires random_access_range<_Base>
  {
    return __iterator{__x} += __y;
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr __iterator operator+(difference_type __x, const __iterator& __y)
    requires random_access_range<_Base>
  {
    return __y + __x;
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr __iterator operator-(const __iterator& __x, difference_type __y)
    requires random_access_range<_Base>
  {
    return __iterator{__x} -= __y;
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr difference_type operator-(const __iterator& __x, const __iterator& __y)
    requires sized_sentinel_for<iterator_t<_Base>, iterator_t<_Base>>
  {
    return __x.__current_ - __y.__current_;
  }
};

template <input_range _View, size_t _Np>
  requires view<_View> && __has_tuple_element<range_value_t<_View>, _Np> &&
           __has_tuple_element<remove_reference_t<range_reference_t<_View>>, _Np> &&
           __returnable_element<range_reference_t<_View>, _Np>
template <bool _Const>
class elements_view<_View, _Np>::__sentinel {
private:
  using _Base                                        = __maybe_const<_Const, _View>;
  _LIBCPP_NO_UNIQUE_ADDRESS sentinel_t<_Base> __end_ = sentinel_t<_Base>();

  template <bool>
  friend class __sentinel;

  template <bool _AnyConst>
  _LIBCPP_HIDE_FROM_ABI static constexpr decltype(auto) __get_current(const __iterator<_AnyConst>& __iter) {
    return (__iter.__current_);
  }

public:
  _LIBCPP_HIDE_FROM_ABI __sentinel() = default;

  _LIBCPP_HIDE_FROM_ABI constexpr explicit __sentinel(sentinel_t<_Base> __end) : __end_(std::move(__end)) {}

  _LIBCPP_HIDE_FROM_ABI constexpr __sentinel(__sentinel<!_Const> __other)
    requires _Const && convertible_to<sentinel_t<_View>, sentinel_t<_Base>>
      : __end_(std::move(__other.__end_)) {}

  _LIBCPP_HIDE_FROM_ABI constexpr sentinel_t<_Base> base() const { return __end_; }

  template <bool _OtherConst>
    requires sentinel_for<sentinel_t<_Base>, iterator_t<__maybe_const<_OtherConst, _View>>>
  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const __iterator<_OtherConst>& __x, const __sentinel& __y) {
    return __get_current(__x) == __y.__end_;
  }

  template <bool _OtherConst>
    requires sized_sentinel_for<sentinel_t<_Base>, iterator_t<__maybe_const<_OtherConst, _View>>>
  _LIBCPP_HIDE_FROM_ABI friend constexpr range_difference_t<__maybe_const<_OtherConst, _View>>
  operator-(const __iterator<_OtherConst>& __x, const __sentinel& __y) {
    return __get_current(__x) - __y.__end_;
  }

  template <bool _OtherConst>
    requires sized_sentinel_for<sentinel_t<_Base>, iterator_t<__maybe_const<_OtherConst, _View>>>
  _LIBCPP_HIDE_FROM_ABI friend constexpr range_difference_t<__maybe_const<_OtherConst, _View>>
  operator-(const __sentinel& __x, const __iterator<_OtherConst>& __y) {
    return __x.__end_ - __get_current(__y);
  }
};

template <class _Tp, size_t _Np>
inline constexpr bool enable_borrowed_range<elements_view<_Tp, _Np>> = enable_borrowed_range<_Tp>;

template <class _Tp>
using keys_view = elements_view<_Tp, 0>;
template <class _Tp>
using values_view = elements_view<_Tp, 1>;

namespace views {
namespace __elements {

template <size_t _Np>
struct __fn : __range_adaptor_closure<__fn<_Np>> {
  template <class _Range>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range) const
      /**/ noexcept(noexcept(elements_view<all_t<_Range&&>, _Np>(std::forward<_Range>(__range))))
      /*------*/ -> decltype(elements_view<all_t<_Range&&>, _Np>(std::forward<_Range>(__range))) {
    /*-------------*/ return elements_view<all_t<_Range&&>, _Np>(std::forward<_Range>(__range));
  }
};
} // namespace __elements

inline namespace __cpo {
template <size_t _Np>
inline constexpr auto elements = __elements::__fn<_Np>{};
inline constexpr auto keys     = elements<0>;
inline constexpr auto values   = elements<1>;
} // namespace __cpo
} // namespace views
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 410 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_ELEMENTS_VIEW_H
# 414 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/elements_view.h" 3
#endif /* elements_view.h expanded by -frewrite-includes */
# 392 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/empty.h>
#endif /* expanded by -frewrite-includes */
# 392 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 393 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/empty_view.h>
#endif /* expanded by -frewrite-includes */
# 393 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 394 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 394 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 395 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_view.h>
#endif /* expanded by -frewrite-includes */
# 395 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 396 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* filter_view.h expanded by -frewrite-includes */
#include <__ranges/filter_view.h>
#else /* filter_view.h expanded by -frewrite-includes */
# 396 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_FILTER_VIEW_H
#define _LIBCPP___RANGES_FILTER_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_find_if.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/derived_from.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/equality_comparable.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/bind_back.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/reference_wrapper.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/all.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/movable_box.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/non_propagating_cache.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/in_place.h>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#endif
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3

namespace ranges {
  template<input_range _View, indirect_unary_predicate<iterator_t<_View>> _Pred>
    requires view<_View> && is_object_v<_Pred>
  class filter_view : public view_interface<filter_view<_View, _Pred>> {
    _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
    _LIBCPP_NO_UNIQUE_ADDRESS __movable_box<_Pred> __pred_;

    // We cache the result of begin() to allow providing an amortized O(1) begin() whenever
    // the underlying range is at least a forward_range.
    static constexpr bool _UseCache = forward_range<_View>;
    using _Cache = _If<_UseCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
    _LIBCPP_NO_UNIQUE_ADDRESS _Cache __cached_begin_ = _Cache();

    class __iterator;
    class __sentinel;

  public:
    _LIBCPP_HIDE_FROM_ABI
    filter_view() requires default_initializable<_View> && default_initializable<_Pred> = default;

    _LIBCPP_HIDE_FROM_ABI constexpr _LIBCPP_EXPLICIT_SINCE_CXX23 filter_view(_View __base, _Pred __pred)
        : __base_(std::move(__base)), __pred_(in_place, std::move(__pred)) {}

    template<class _Vp = _View>
    _LIBCPP_HIDE_FROM_ABI
    constexpr _View base() const& requires copy_constructible<_Vp> { return __base_; }
    _LIBCPP_HIDE_FROM_ABI
    constexpr _View base() && { return std::move(__base_); }

    _LIBCPP_HIDE_FROM_ABI
    constexpr _Pred const& pred() const { return *__pred_; }

    _LIBCPP_HIDE_FROM_ABI
    constexpr __iterator begin() {
      _LIBCPP_ASSERT_UNCATEGORIZED(
          __pred_.__has_value(),
          "Trying to call begin() on a filter_view that does not have a valid predicate.");
      if constexpr (_UseCache) {
        if (!__cached_begin_.__has_value()) {
          __cached_begin_.__emplace(ranges::find_if(__base_, std::ref(*__pred_)));
        }
        return {*this, *__cached_begin_};
      } else {
        return {*this, ranges::find_if(__base_, std::ref(*__pred_))};
      }
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto end() {
      if constexpr (common_range<_View>)
        return __iterator{*this, ranges::end(__base_)};
      else
        return __sentinel{*this};
    }
  };

  template<class _Range, class _Pred>
  filter_view(_Range&&, _Pred) -> filter_view<views::all_t<_Range>, _Pred>;

  template<class _View>
  struct __filter_iterator_category { };

  template<forward_range _View>
  struct __filter_iterator_category<_View> {
    using _Cat = typename iterator_traits<iterator_t<_View>>::iterator_category;
    using iterator_category =
      _If<derived_from<_Cat, bidirectional_iterator_tag>, bidirectional_iterator_tag,
      _If<derived_from<_Cat, forward_iterator_tag>,       forward_iterator_tag,
      /* else */                                          _Cat
    >>;
  };

  template<input_range _View, indirect_unary_predicate<iterator_t<_View>> _Pred>
    requires view<_View> && is_object_v<_Pred>
  class filter_view<_View, _Pred>::__iterator : public __filter_iterator_category<_View> {

  public:
    _LIBCPP_NO_UNIQUE_ADDRESS iterator_t<_View> __current_ = iterator_t<_View>();
    _LIBCPP_NO_UNIQUE_ADDRESS filter_view* __parent_ = nullptr;

    using iterator_concept =
      _If<bidirectional_range<_View>, bidirectional_iterator_tag,
      _If<forward_range<_View>,       forward_iterator_tag,
      /* else */                      input_iterator_tag
    >>;
    // using iterator_category = inherited;
    using value_type = range_value_t<_View>;
    using difference_type = range_difference_t<_View>;

    _LIBCPP_HIDE_FROM_ABI
    __iterator() requires default_initializable<iterator_t<_View>> = default;

    _LIBCPP_HIDE_FROM_ABI
    constexpr __iterator(filter_view& __parent, iterator_t<_View> __current)
      : __current_(std::move(__current)), __parent_(std::addressof(__parent))
    { }

    _LIBCPP_HIDE_FROM_ABI
    constexpr iterator_t<_View> const& base() const& noexcept { return __current_; }
    _LIBCPP_HIDE_FROM_ABI
    constexpr iterator_t<_View> base() && { return std::move(__current_); }

    _LIBCPP_HIDE_FROM_ABI
    constexpr range_reference_t<_View> operator*() const { return *__current_; }
    _LIBCPP_HIDE_FROM_ABI
    constexpr iterator_t<_View> operator->() const
      requires __has_arrow<iterator_t<_View>> && copyable<iterator_t<_View>>
    {
      return __current_;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr __iterator& operator++() {
      __current_ = ranges::find_if(std::move(++__current_), ranges::end(__parent_->__base_),
                                   std::ref(*__parent_->__pred_));
      return *this;
    }
    _LIBCPP_HIDE_FROM_ABI
    constexpr void operator++(int) { ++*this; }
    _LIBCPP_HIDE_FROM_ABI
    constexpr __iterator operator++(int) requires forward_range<_View> {
      auto __tmp = *this;
      ++*this;
      return __tmp;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr __iterator& operator--() requires bidirectional_range<_View> {
      do {
        --__current_;
      } while (!std::invoke(*__parent_->__pred_, *__current_));
      return *this;
    }
    _LIBCPP_HIDE_FROM_ABI
    constexpr __iterator operator--(int) requires bidirectional_range<_View> {
      auto __tmp = *this;
      --*this;
      return __tmp;
    }

    _LIBCPP_HIDE_FROM_ABI
    friend constexpr bool operator==(__iterator const& __x, __iterator const& __y)
      requires equality_comparable<iterator_t<_View>>
    {
      return __x.__current_ == __y.__current_;
    }

    _LIBCPP_HIDE_FROM_ABI
    friend constexpr range_rvalue_reference_t<_View> iter_move(__iterator const& __it)
      noexcept(noexcept(ranges::iter_move(__it.__current_)))
    {
      return ranges::iter_move(__it.__current_);
    }

    _LIBCPP_HIDE_FROM_ABI
    friend constexpr void iter_swap(__iterator const& __x, __iterator const& __y)
      noexcept(noexcept(ranges::iter_swap(__x.__current_, __y.__current_)))
      requires indirectly_swappable<iterator_t<_View>>
    {
      return ranges::iter_swap(__x.__current_, __y.__current_);
    }
  };

  template<input_range _View, indirect_unary_predicate<iterator_t<_View>> _Pred>
    requires view<_View> && is_object_v<_Pred>
  class filter_view<_View, _Pred>::__sentinel {
  public:
    sentinel_t<_View> __end_ = sentinel_t<_View>();

    _LIBCPP_HIDE_FROM_ABI
    __sentinel() = default;

    _LIBCPP_HIDE_FROM_ABI
    constexpr explicit __sentinel(filter_view& __parent)
      : __end_(ranges::end(__parent.__base_))
    { }

    _LIBCPP_HIDE_FROM_ABI
    constexpr sentinel_t<_View> base() const { return __end_; }

    _LIBCPP_HIDE_FROM_ABI friend constexpr bool
    operator==(__iterator const& __x, __sentinel const& __y) {
      return __x.__current_ == __y.__end_;
    }
  };

namespace views {
namespace __filter {
  struct __fn {
    template<class _Range, class _Pred>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Range&& __range, _Pred&& __pred) const
      noexcept(noexcept(filter_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred))))
      -> decltype(      filter_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred)))
      { return          filter_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred)); }

    template<class _Pred>
      requires constructible_from<decay_t<_Pred>, _Pred>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Pred&& __pred) const
      noexcept(is_nothrow_constructible_v<decay_t<_Pred>, _Pred>)
    { return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Pred>(__pred))); }
  };
} // namespace __filter

inline namespace __cpo {
  inline constexpr auto filter = __filter::__fn{};
} // namespace __cpo
} // namespace views

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 264 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_FILTER_VIEW_H
# 268 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/filter_view.h" 3
#endif /* filter_view.h expanded by -frewrite-includes */
# 397 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* from_range.h expanded by -frewrite-includes */
#include <__ranges/from_range.h>
#else /* from_range.h expanded by -frewrite-includes */
# 397 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/from_range.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_FROM_RANGE_H
#define _LIBCPP___RANGES_FROM_RANGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/from_range.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/from_range.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/from_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/from_range.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/from_range.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/from_range.h" 3

struct from_range_t {
  explicit from_range_t() = default;
};

inline constexpr from_range_t from_range{};

#endif // _LIBCPP_STD_VER >= 23
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/from_range.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_FROM_RANGE_H
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/from_range.h" 3
#endif /* from_range.h expanded by -frewrite-includes */
# 398 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/iota_view.h>
#endif /* expanded by -frewrite-includes */
# 398 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 399 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* join_view.h expanded by -frewrite-includes */
#include <__ranges/join_view.h>
#else /* join_view.h expanded by -frewrite-includes */
# 399 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_JOIN_VIEW_H
#define _LIBCPP___RANGES_JOIN_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/derived_from.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/equality_comparable.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* iterator_with_data.h expanded by -frewrite-includes */
#include <__iterator/iterator_with_data.h>
#else /* iterator_with_data.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_ITERATOR_WITH_DATA_H
#define _LIBCPP___ITERATOR_ITERATOR_WITH_DATA_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/compare_three_way_result.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/three_way_comparable.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <forward_iterator _Iterator, class _Data>
class __iterator_with_data {
  _Iterator __iter_{};
  _Data __data_{};

public:
  using value_type      = iter_value_t<_Iterator>;
  using difference_type = iter_difference_t<_Iterator>;

  _LIBCPP_HIDE_FROM_ABI __iterator_with_data() = default;

  constexpr _LIBCPP_HIDE_FROM_ABI __iterator_with_data(_Iterator __iter, _Data __data)
      : __iter_(std::move(__iter)), __data_(std::move(__data)) {}

  constexpr _LIBCPP_HIDE_FROM_ABI _Iterator __get_iter() const { return __iter_; }

  constexpr _LIBCPP_HIDE_FROM_ABI _Data __get_data() && { return std::move(__data_); }

  friend constexpr _LIBCPP_HIDE_FROM_ABI bool
  operator==(const __iterator_with_data& __lhs, const __iterator_with_data& __rhs) {
    return __lhs.__iter_ == __rhs.__iter_;
  }

  constexpr _LIBCPP_HIDE_FROM_ABI __iterator_with_data& operator++() {
    ++__iter_;
    return *this;
  }

  constexpr _LIBCPP_HIDE_FROM_ABI __iterator_with_data operator++(int) {
    auto __tmp = *this;
    __iter_++;
    return __tmp;
  }

  constexpr _LIBCPP_HIDE_FROM_ABI __iterator_with_data& operator--()
    requires bidirectional_iterator<_Iterator>
  {
    --__iter_;
    return *this;
  }

  constexpr _LIBCPP_HIDE_FROM_ABI __iterator_with_data operator--(int)
    requires bidirectional_iterator<_Iterator>
  {
    auto __tmp = *this;
    --__iter_;
    return __tmp;
  }

  constexpr _LIBCPP_HIDE_FROM_ABI iter_reference_t<_Iterator> operator*() const { return *__iter_; }

  _LIBCPP_HIDE_FROM_ABI friend constexpr iter_rvalue_reference_t<_Iterator>
  iter_move(const __iterator_with_data& __iter) noexcept(noexcept(ranges::iter_move(__iter.__iter_))) {
    return ranges::iter_move(__iter.__iter_);
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr void
  iter_swap(const __iterator_with_data& __lhs,
            const __iterator_with_data& __rhs) noexcept(noexcept(ranges::iter_swap(__lhs.__iter_, __rhs.__iter_)))
    requires indirectly_swappable<_Iterator>
  {
    return ranges::iter_swap(__lhs.__data_, __rhs.__iter_);
  }
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3

#endif // _LIBCPP___ITERATOR_ITERATOR_WITH_DATA_H
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/iterator_with_data.h" 3
#endif /* iterator_with_data.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/segmented_iterator.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/all.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/empty.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/non_propagating_cache.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/maybe_const.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Note: `join_view` is still marked experimental because there is an ABI-breaking change that affects `join_view` in
// the pipeline (https://isocpp.org/files/papers/D2770R0.html).
// TODO: make `join_view` non-experimental once D2770 is implemented.
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20 && defined(_LIBCPP_ENABLE_EXPERIMENTAL)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3

namespace ranges {
  template<class>
  struct __join_view_iterator_category {};

  template<class _View>
    requires is_reference_v<range_reference_t<_View>> &&
             forward_range<_View> &&
             forward_range<range_reference_t<_View>>
  struct __join_view_iterator_category<_View> {
    using _OuterC = typename iterator_traits<iterator_t<_View>>::iterator_category;
    using _InnerC = typename iterator_traits<iterator_t<range_reference_t<_View>>>::iterator_category;

    using iterator_category = _If<
      derived_from<_OuterC, bidirectional_iterator_tag> && derived_from<_InnerC, bidirectional_iterator_tag> &&
        common_range<range_reference_t<_View>>,
      bidirectional_iterator_tag,
      _If<
        derived_from<_OuterC, forward_iterator_tag> && derived_from<_InnerC, forward_iterator_tag>,
        forward_iterator_tag,
        input_iterator_tag
      >
    >;
  };

  template<input_range _View>
    requires view<_View> && input_range<range_reference_t<_View>>
  class join_view
    : public view_interface<join_view<_View>> {
  private:
    using _InnerRange = range_reference_t<_View>;

    template<bool> struct __iterator;

    template<bool> struct __sentinel;

    template <class>
    friend struct std::__segmented_iterator_traits;

    static constexpr bool _UseCache = !is_reference_v<_InnerRange>;
    using _Cache = _If<_UseCache, __non_propagating_cache<remove_cvref_t<_InnerRange>>, __empty_cache>;
    _LIBCPP_NO_UNIQUE_ADDRESS _Cache __cache_;
    _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();

  public:
    _LIBCPP_HIDE_FROM_ABI
    join_view() requires default_initializable<_View> = default;

    _LIBCPP_HIDE_FROM_ABI
    constexpr explicit join_view(_View __base)
      : __base_(std::move(__base)) {}

    _LIBCPP_HIDE_FROM_ABI
    constexpr _View base() const& requires copy_constructible<_View> { return __base_; }

    _LIBCPP_HIDE_FROM_ABI
    constexpr _View base() && { return std::move(__base_); }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto begin() {
      constexpr bool __use_const = __simple_view<_View> &&
                                   is_reference_v<range_reference_t<_View>>;
      return __iterator<__use_const>{*this, ranges::begin(__base_)};
    }

    template<class _V2 = _View>
    _LIBCPP_HIDE_FROM_ABI
    constexpr auto begin() const
      requires input_range<const _V2> &&
               is_reference_v<range_reference_t<const _V2>>
    {
      return __iterator<true>{*this, ranges::begin(__base_)};
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr auto end() {
      if constexpr (forward_range<_View> &&
                    is_reference_v<_InnerRange> &&
                    forward_range<_InnerRange> &&
                    common_range<_View> &&
                    common_range<_InnerRange>)
        return __iterator<__simple_view<_View>>{*this, ranges::end(__base_)};
      else
        return __sentinel<__simple_view<_View>>{*this};
    }

    template<class _V2 = _View>
    _LIBCPP_HIDE_FROM_ABI
    constexpr auto end() const
      requires input_range<const _V2> &&
               is_reference_v<range_reference_t<const _V2>>
    {
      using _ConstInnerRange = range_reference_t<const _View>;
      if constexpr (forward_range<const _View> &&
                    is_reference_v<_ConstInnerRange> &&
                    forward_range<_ConstInnerRange> &&
                    common_range<const _View> &&
                    common_range<_ConstInnerRange>) {
        return __iterator<true>{*this, ranges::end(__base_)};
      } else {
        return __sentinel<true>{*this};
      }
    }
  };

  template<input_range _View>
    requires view<_View> && input_range<range_reference_t<_View>>
  template<bool _Const>
  struct join_view<_View>::__sentinel {
  template<bool>
    friend struct __sentinel;

  private:
    using _Parent = __maybe_const<_Const, join_view<_View>>;
    using _Base = __maybe_const<_Const, _View>;
    sentinel_t<_Base> __end_ = sentinel_t<_Base>();

  public:
    _LIBCPP_HIDE_FROM_ABI
    __sentinel() = default;

    _LIBCPP_HIDE_FROM_ABI
    constexpr explicit __sentinel(_Parent& __parent)
      : __end_(ranges::end(__parent.__base_)) {}

    _LIBCPP_HIDE_FROM_ABI
    constexpr __sentinel(__sentinel<!_Const> __s)
      requires _Const && convertible_to<sentinel_t<_View>, sentinel_t<_Base>>
      : __end_(std::move(__s.__end_)) {}

    template<bool _OtherConst>
      requires sentinel_for<sentinel_t<_Base>, iterator_t<__maybe_const<_OtherConst, _View>>>
    _LIBCPP_HIDE_FROM_ABI
    friend constexpr bool operator==(const __iterator<_OtherConst>& __x, const __sentinel& __y) {
      return __x.__outer_ == __y.__end_;
    }
  };

  // https://reviews.llvm.org/D142811#inline-1383022
  // To simplify the segmented iterator traits specialization,
  // make the iterator `final`
  template<input_range _View>
    requires view<_View> && input_range<range_reference_t<_View>>
  template<bool _Const>
  struct join_view<_View>::__iterator final
    : public __join_view_iterator_category<__maybe_const<_Const, _View>> {

    template<bool>
    friend struct __iterator;

    template <class>
    friend struct std::__segmented_iterator_traits;

    static constexpr bool __is_join_view_iterator = true;

  private:
    using _Parent = __maybe_const<_Const, join_view<_View>>;
    using _Base = __maybe_const<_Const, _View>;
    using _Outer = iterator_t<_Base>;
    using _Inner = iterator_t<range_reference_t<_Base>>;
    using _InnerRange = range_reference_t<_View>;

    static constexpr bool __ref_is_glvalue = is_reference_v<range_reference_t<_Base>>;

  public:
    _Outer __outer_ = _Outer();

  private:
    optional<_Inner> __inner_;
    _Parent *__parent_ = nullptr;

    _LIBCPP_HIDE_FROM_ABI
    constexpr void __satisfy() {
      for (; __outer_ != ranges::end(__parent_->__base_); ++__outer_) {
        auto&& __inner = [&]() -> auto&& {
          if constexpr (__ref_is_glvalue)
            return *__outer_;
          else
            return __parent_->__cache_.__emplace_from([&]() -> decltype(auto) { return *__outer_; });
        }();
        __inner_ = ranges::begin(__inner);
        if (*__inner_ != ranges::end(__inner))
          return;
      }

      if constexpr (__ref_is_glvalue)
        __inner_.reset();
    }

    _LIBCPP_HIDE_FROM_ABI constexpr __iterator(_Parent* __parent, _Outer __outer, _Inner __inner)
      : __outer_(std::move(__outer)), __inner_(std::move(__inner)), __parent_(__parent) {}

  public:
    using iterator_concept = _If<
      __ref_is_glvalue && bidirectional_range<_Base> && bidirectional_range<range_reference_t<_Base>> &&
          common_range<range_reference_t<_Base>>,
      bidirectional_iterator_tag,
      _If<
        __ref_is_glvalue && forward_range<_Base> && forward_range<range_reference_t<_Base>>,
        forward_iterator_tag,
        input_iterator_tag
      >
    >;

    using value_type = range_value_t<range_reference_t<_Base>>;

    using difference_type = common_type_t<
      range_difference_t<_Base>, range_difference_t<range_reference_t<_Base>>>;

    _LIBCPP_HIDE_FROM_ABI
    __iterator() requires default_initializable<_Outer> = default;

    _LIBCPP_HIDE_FROM_ABI
    constexpr __iterator(_Parent& __parent, _Outer __outer)
      : __outer_(std::move(__outer))
      , __parent_(std::addressof(__parent)) {
      __satisfy();
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr __iterator(__iterator<!_Const> __i)
      requires _Const &&
               convertible_to<iterator_t<_View>, _Outer> &&
               convertible_to<iterator_t<_InnerRange>, _Inner>
      : __outer_(std::move(__i.__outer_))
      , __inner_(std::move(__i.__inner_))
      , __parent_(__i.__parent_) {}

    _LIBCPP_HIDE_FROM_ABI
    constexpr decltype(auto) operator*() const {
      return **__inner_;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr _Inner operator->() const
      requires __has_arrow<_Inner> && copyable<_Inner>
    {
      return *__inner_;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr __iterator& operator++() {
      auto&& __inner = [&]() -> auto&& {
        if constexpr (__ref_is_glvalue)
          return *__outer_;
        else
          return *__parent_->__cache_;
      }();
      if (++*__inner_ == ranges::end(__inner)) {
        ++__outer_;
        __satisfy();
      }
      return *this;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr void operator++(int) {
      ++*this;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr __iterator operator++(int)
      requires __ref_is_glvalue &&
               forward_range<_Base> &&
               forward_range<range_reference_t<_Base>>
    {
      auto __tmp = *this;
      ++*this;
      return __tmp;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr __iterator& operator--()
      requires __ref_is_glvalue &&
               bidirectional_range<_Base> &&
               bidirectional_range<range_reference_t<_Base>> &&
               common_range<range_reference_t<_Base>>
    {
      if (__outer_ == ranges::end(__parent_->__base_))
        __inner_ = ranges::end(*--__outer_);

      // Skip empty inner ranges when going backwards.
      while (*__inner_ == ranges::begin(*__outer_)) {
        __inner_ = ranges::end(*--__outer_);
      }

      --*__inner_;
      return *this;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr __iterator operator--(int)
      requires __ref_is_glvalue &&
               bidirectional_range<_Base> &&
               bidirectional_range<range_reference_t<_Base>> &&
               common_range<range_reference_t<_Base>>
    {
      auto __tmp = *this;
      --*this;
      return __tmp;
    }

    _LIBCPP_HIDE_FROM_ABI
    friend constexpr bool operator==(const __iterator& __x, const __iterator& __y)
      requires __ref_is_glvalue &&
               equality_comparable<iterator_t<_Base>> &&
               equality_comparable<iterator_t<range_reference_t<_Base>>>
    {
      return __x.__outer_ == __y.__outer_ && __x.__inner_ == __y.__inner_;
    }

    _LIBCPP_HIDE_FROM_ABI
    friend constexpr decltype(auto) iter_move(const __iterator& __i)
      noexcept(noexcept(ranges::iter_move(*__i.__inner_)))
    {
      return ranges::iter_move(*__i.__inner_);
    }

    _LIBCPP_HIDE_FROM_ABI
    friend constexpr void iter_swap(const __iterator& __x, const __iterator& __y)
      noexcept(noexcept(ranges::iter_swap(*__x.__inner_, *__y.__inner_)))
      requires indirectly_swappable<_Inner>
    {
      return ranges::iter_swap(*__x.__inner_, *__y.__inner_);
    }
  };

  template<class _Range>
  explicit join_view(_Range&&) -> join_view<views::all_t<_Range>>;

namespace views {
namespace __join_view {
struct __fn : __range_adaptor_closure<__fn> {
  template<class _Range>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Range&& __range) const
    noexcept(noexcept(join_view<all_t<_Range&&>>(std::forward<_Range>(__range))))
    -> decltype(      join_view<all_t<_Range&&>>(std::forward<_Range>(__range)))
    { return          join_view<all_t<_Range&&>>(std::forward<_Range>(__range)); }
};
} // namespace __join_view
inline namespace __cpo {
  inline constexpr auto join = __join_view::__fn{};
} // namespace __cpo
} // namespace views
} // namespace ranges

template <class _JoinViewIterator>
  requires(_JoinViewIterator::__is_join_view_iterator &&
           ranges::common_range<typename _JoinViewIterator::_Parent> &&
           __has_random_access_iterator_category<typename _JoinViewIterator::_Outer>::value &&
           __has_random_access_iterator_category<typename _JoinViewIterator::_Inner>::value)
struct __segmented_iterator_traits<_JoinViewIterator> {

  using __segment_iterator =
      _LIBCPP_NODEBUG __iterator_with_data<typename _JoinViewIterator::_Outer, typename _JoinViewIterator::_Parent*>;
  using __local_iterator = typename _JoinViewIterator::_Inner;

  // TODO: Would it make sense to enable the optimization for other iterator types?

  static constexpr _LIBCPP_HIDE_FROM_ABI __segment_iterator __segment(_JoinViewIterator __iter) {
      if (ranges::empty(__iter.__parent_->__base_))
        return {};
      if (!__iter.__inner_.has_value())
        return __segment_iterator(--__iter.__outer_, __iter.__parent_);
      return __segment_iterator(__iter.__outer_, __iter.__parent_);
  }

  static constexpr _LIBCPP_HIDE_FROM_ABI __local_iterator __local(_JoinViewIterator __iter) {
      if (ranges::empty(__iter.__parent_->__base_))
        return {};
      if (!__iter.__inner_.has_value())
        return ranges::end(*--__iter.__outer_);
      return *__iter.__inner_;
  }

  static constexpr _LIBCPP_HIDE_FROM_ABI __local_iterator __begin(__segment_iterator __iter) {
      return ranges::begin(*__iter.__get_iter());
  }

  static constexpr _LIBCPP_HIDE_FROM_ABI __local_iterator __end(__segment_iterator __iter) {
      return ranges::end(*__iter.__get_iter());
  }

  static constexpr _LIBCPP_HIDE_FROM_ABI _JoinViewIterator
  __compose(__segment_iterator __seg_iter, __local_iterator __local_iter) {
      return _JoinViewIterator(
          std::move(__seg_iter).__get_data(), std::move(__seg_iter).__get_iter(), std::move(__local_iter));
  }
};

#endif // #if _LIBCPP_STD_VER >= 20 && defined(_LIBCPP_ENABLE_EXPERIMENTAL)
# 440 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_JOIN_VIEW_H
# 444 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/join_view.h" 3
#endif /* join_view.h expanded by -frewrite-includes */
# 400 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* lazy_split_view.h expanded by -frewrite-includes */
#include <__ranges/lazy_split_view.h>
#else /* lazy_split_view.h expanded by -frewrite-includes */
# 400 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_LAZY_SPLIT_VIEW_H
#define _LIBCPP___RANGES_LAZY_SPLIT_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_find.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_mismatch.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/derived_from.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/bind_back.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/default_sentinel.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/indirectly_comparable.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/all.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/non_propagating_cache.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* single_view.h expanded by -frewrite-includes */
#include <__ranges/single_view.h>
#else /* single_view.h expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_SINGLE_VIEW_H
#define _LIBCPP___RANGES_SINGLE_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/movable_box.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/in_place.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3

namespace ranges {
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
template <move_constructible _Tp>
#  else
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
template <copy_constructible _Tp>
#  endif
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
  requires is_object_v<_Tp>
class single_view : public view_interface<single_view<_Tp>> {
  __movable_box<_Tp> __value_;

public:
  _LIBCPP_HIDE_FROM_ABI single_view()
    requires default_initializable<_Tp>
  = default;

  _LIBCPP_HIDE_FROM_ABI constexpr explicit single_view(const _Tp& __t)
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
    requires copy_constructible<_Tp>
#  endif
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
      : __value_(in_place, __t) {
  }

  _LIBCPP_HIDE_FROM_ABI constexpr explicit single_view(_Tp&& __t) : __value_(in_place, std::move(__t)) {}

  template <class... _Args>
    requires constructible_from<_Tp, _Args...>
  _LIBCPP_HIDE_FROM_ABI constexpr explicit single_view(in_place_t, _Args&&... __args)
      : __value_{in_place, std::forward<_Args>(__args)...} {}

  _LIBCPP_HIDE_FROM_ABI constexpr _Tp* begin() noexcept { return data(); }

  _LIBCPP_HIDE_FROM_ABI constexpr const _Tp* begin() const noexcept { return data(); }

  _LIBCPP_HIDE_FROM_ABI constexpr _Tp* end() noexcept { return data() + 1; }

  _LIBCPP_HIDE_FROM_ABI constexpr const _Tp* end() const noexcept { return data() + 1; }

  _LIBCPP_HIDE_FROM_ABI static constexpr size_t size() noexcept { return 1; }

  _LIBCPP_HIDE_FROM_ABI constexpr _Tp* data() noexcept { return __value_.operator->(); }

  _LIBCPP_HIDE_FROM_ABI constexpr const _Tp* data() const noexcept { return __value_.operator->(); }
};

template<class _Tp>
single_view(_Tp) -> single_view<_Tp>;

namespace views {
namespace __single_view {

struct __fn : __range_adaptor_closure<__fn> {
  template<class _Range>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Range&& __range) const
    noexcept(noexcept(single_view<decay_t<_Range&&>>(std::forward<_Range>(__range))))
    -> decltype(      single_view<decay_t<_Range&&>>(std::forward<_Range>(__range)))
    { return          single_view<decay_t<_Range&&>>(std::forward<_Range>(__range)); }
};
} // namespace __single_view

inline namespace __cpo {
  inline constexpr auto single = __single_view::__fn{};
} // namespace __cpo

} // namespace views
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_SINGLE_VIEW_H
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/single_view.h" 3
#endif /* single_view.h expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/maybe_const.h>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#endif
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3

namespace ranges {

template <auto> struct __require_constant;

template <class _Range>
concept __tiny_range =
  sized_range<_Range> &&
  requires { typename __require_constant<remove_reference_t<_Range>::size()>; } &&
  (remove_reference_t<_Range>::size() <= 1);

template <input_range _View, forward_range _Pattern>
  requires view<_View> && view<_Pattern> &&
           indirectly_comparable<iterator_t<_View>, iterator_t<_Pattern>, ranges::equal_to> &&
           (forward_range<_View> || __tiny_range<_Pattern>)
class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>> {

  _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
  _LIBCPP_NO_UNIQUE_ADDRESS _Pattern __pattern_ = _Pattern();

  using _MaybeCurrent = _If<!forward_range<_View>, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
  _LIBCPP_NO_UNIQUE_ADDRESS _MaybeCurrent __current_ = _MaybeCurrent();

  template <bool> struct __outer_iterator;
  template <bool> struct __inner_iterator;

public:
  _LIBCPP_HIDE_FROM_ABI
  lazy_split_view()
    requires default_initializable<_View> && default_initializable<_Pattern> = default;

  _LIBCPP_HIDE_FROM_ABI
  constexpr _LIBCPP_EXPLICIT_SINCE_CXX23 lazy_split_view(_View __base, _Pattern __pattern)
    : __base_(std::move(__base)), __pattern_(std::move(__pattern)) {}

  template <input_range _Range>
    requires constructible_from<_View, views::all_t<_Range>> &&
             constructible_from<_Pattern, single_view<range_value_t<_Range>>>
  _LIBCPP_HIDE_FROM_ABI
  constexpr _LIBCPP_EXPLICIT_SINCE_CXX23 lazy_split_view(_Range&& __r, range_value_t<_Range> __e)
    : __base_(views::all(std::forward<_Range>(__r)))
    , __pattern_(views::single(std::move(__e))) {}

  _LIBCPP_HIDE_FROM_ABI
  constexpr _View base() const& requires copy_constructible<_View> { return __base_; }
  _LIBCPP_HIDE_FROM_ABI
  constexpr _View base() && { return std::move(__base_); }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto begin() {
    if constexpr (forward_range<_View>) {
      return __outer_iterator<__simple_view<_View> && __simple_view<_Pattern>>{*this, ranges::begin(__base_)};
    } else {
      __current_.__emplace(ranges::begin(__base_));
      return __outer_iterator<false>{*this};
    }
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto begin() const requires forward_range<_View> && forward_range<const _View> {
    return __outer_iterator<true>{*this, ranges::begin(__base_)};
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto end() requires forward_range<_View> && common_range<_View> {
    return __outer_iterator<__simple_view<_View> && __simple_view<_Pattern>>{*this, ranges::end(__base_)};
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto end() const {
    if constexpr (forward_range<_View> && forward_range<const _View> && common_range<const _View>) {
      return __outer_iterator<true>{*this, ranges::end(__base_)};
    } else {
      return default_sentinel;
    }
  }

private:

  template <class>
  struct __outer_iterator_category {};

  template <forward_range _Tp>
  struct __outer_iterator_category<_Tp> {
    using iterator_category = input_iterator_tag;
  };

  template <bool _Const>
  struct __outer_iterator : __outer_iterator_category<__maybe_const<_Const, _View>> {
  private:
    template <bool>
    friend struct __inner_iterator;
    friend __outer_iterator<true>;

    using _Parent = __maybe_const<_Const, lazy_split_view>;
    using _Base = __maybe_const<_Const, _View>;

    _Parent* __parent_ = nullptr;
    using _MaybeCurrent = _If<forward_range<_View>, iterator_t<_Base>, __empty_cache>;
    _LIBCPP_NO_UNIQUE_ADDRESS _MaybeCurrent __current_ = _MaybeCurrent();
    bool __trailing_empty_ = false;

    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto& __current() noexcept {
      if constexpr (forward_range<_View>) {
        return __current_;
      } else {
        return *__parent_->__current_;
      }
    }

    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr const auto& __current() const noexcept {
      if constexpr (forward_range<_View>) {
        return __current_;
      } else {
        return *__parent_->__current_;
      }
    }

    // Workaround for the GCC issue that doesn't allow calling `__parent_->__base_` from friend functions (because
    // `__base_` is private).
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto& __parent_base() const noexcept {
      return __parent_->__base_;
    }

  public:
    // using iterator_category = inherited;
    using iterator_concept = conditional_t<forward_range<_Base>, forward_iterator_tag, input_iterator_tag>;
    using difference_type = range_difference_t<_Base>;

    struct value_type : view_interface<value_type> {
    private:
      __outer_iterator __i_ = __outer_iterator();

    public:
      _LIBCPP_HIDE_FROM_ABI
      value_type() = default;
      _LIBCPP_HIDE_FROM_ABI
      constexpr explicit value_type(__outer_iterator __i)
        : __i_(std::move(__i)) {}

      _LIBCPP_HIDE_FROM_ABI
      constexpr __inner_iterator<_Const> begin() const { return __inner_iterator<_Const>{__i_}; }
      _LIBCPP_HIDE_FROM_ABI
      constexpr default_sentinel_t end() const noexcept { return default_sentinel; }
    };

    _LIBCPP_HIDE_FROM_ABI
    __outer_iterator() = default;

    _LIBCPP_HIDE_FROM_ABI
    constexpr explicit __outer_iterator(_Parent& __parent)
      requires (!forward_range<_Base>)
      : __parent_(std::addressof(__parent)) {}

    _LIBCPP_HIDE_FROM_ABI
    constexpr __outer_iterator(_Parent& __parent, iterator_t<_Base> __current)
      requires forward_range<_Base>
      : __parent_(std::addressof(__parent)), __current_(std::move(__current)) {}

    _LIBCPP_HIDE_FROM_ABI
    constexpr __outer_iterator(__outer_iterator<!_Const> __i)
      requires _Const && convertible_to<iterator_t<_View>, iterator_t<_Base>>
      : __parent_(__i.__parent_), __current_(std::move(__i.__current_)) {}

    _LIBCPP_HIDE_FROM_ABI
    constexpr value_type operator*() const { return value_type{*this}; }

    _LIBCPP_HIDE_FROM_ABI
    constexpr __outer_iterator& operator++() {
      const auto __end = ranges::end(__parent_->__base_);
      if (__current() == __end) {
        __trailing_empty_ = false;
        return *this;
      }

      const auto [__pbegin, __pend] = ranges::subrange{__parent_->__pattern_};
      if (__pbegin == __pend) {
        // Empty pattern: split on every element in the input range
        ++__current();

      } else if constexpr (__tiny_range<_Pattern>) {
        // One-element pattern: we can use `ranges::find`.
        __current() = ranges::find(std::move(__current()), __end, *__pbegin);
        if (__current() != __end) {
          // Make sure we point to after the separator we just found.
          ++__current();
          if (__current() == __end)
            __trailing_empty_ = true;
        }

      } else {
        // General case for n-element pattern.
        do {
          const auto [__b, __p] = ranges::mismatch(__current(), __end, __pbegin, __pend);
          if (__p == __pend) {
            __current() = __b;
            if (__current() == __end) {
              __trailing_empty_ = true;
            }
            break; // The pattern matched; skip it.
          }
        } while (++__current() != __end);
      }

      return *this;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr decltype(auto) operator++(int) {
      if constexpr (forward_range<_Base>) {
        auto __tmp = *this;
        ++*this;
        return __tmp;

      } else {
        ++*this;
      }
    }

    _LIBCPP_HIDE_FROM_ABI
    friend constexpr bool operator==(const __outer_iterator& __x, const __outer_iterator& __y)
      requires forward_range<_Base> {
      return __x.__current_ == __y.__current_ && __x.__trailing_empty_ == __y.__trailing_empty_;
    }

    _LIBCPP_HIDE_FROM_ABI
    friend constexpr bool operator==(const __outer_iterator& __x, default_sentinel_t) {
      _LIBCPP_ASSERT_UNCATEGORIZED(__x.__parent_, "Cannot call comparison on a default-constructed iterator.");
      return __x.__current() == ranges::end(__x.__parent_base()) && !__x.__trailing_empty_;
    }
  };

  template <class>
  struct __inner_iterator_category {};

  template <forward_range _Tp>
  struct __inner_iterator_category<_Tp> {
    using iterator_category = _If<
      derived_from<typename iterator_traits<iterator_t<_Tp>>::iterator_category, forward_iterator_tag>,
      forward_iterator_tag,
      typename iterator_traits<iterator_t<_Tp>>::iterator_category
    >;
  };

  template <bool _Const>
  struct __inner_iterator : __inner_iterator_category<__maybe_const<_Const, _View>> {
  private:
    using _Base = __maybe_const<_Const, _View>;
    // Workaround for a GCC issue.
    static constexpr bool _OuterConst = _Const;
    __outer_iterator<_Const> __i_ = __outer_iterator<_OuterConst>();
    bool __incremented_ = false;

    // Note: these private functions are necessary because GCC doesn't allow calls to private members of `__i_` from
    // free functions that are friends of `inner-iterator`.

    _LIBCPP_HIDE_FROM_ABI
    constexpr bool __is_done() const {
      _LIBCPP_ASSERT_UNCATEGORIZED(__i_.__parent_, "Cannot call comparison on a default-constructed iterator.");

      auto [__pcur, __pend] = ranges::subrange{__i_.__parent_->__pattern_};
      auto __end = ranges::end(__i_.__parent_->__base_);

      if constexpr (__tiny_range<_Pattern>) {
        const auto& __cur = __i_.__current();
        if (__cur == __end)
          return true;
        if (__pcur == __pend)
          return __incremented_;

        return *__cur == *__pcur;

      } else {
        auto __cur = __i_.__current();
        if (__cur == __end)
          return true;
        if (__pcur == __pend)
          return __incremented_;

        do {
          if (*__cur != *__pcur)
            return false;
          if (++__pcur == __pend)
            return true;
        } while (++__cur != __end);

        return false;
      }
    }

    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto& __outer_current() noexcept {
      return __i_.__current();
    }

    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr const auto& __outer_current() const noexcept {
      return __i_.__current();
    }

  public:
    // using iterator_category = inherited;
    using iterator_concept = typename __outer_iterator<_Const>::iterator_concept;
    using value_type = range_value_t<_Base>;
    using difference_type = range_difference_t<_Base>;

    _LIBCPP_HIDE_FROM_ABI
    __inner_iterator() = default;

    _LIBCPP_HIDE_FROM_ABI
    constexpr explicit __inner_iterator(__outer_iterator<_Const> __i)
      : __i_(std::move(__i)) {}

    _LIBCPP_HIDE_FROM_ABI
    constexpr const iterator_t<_Base>& base() const& noexcept { return __i_.__current(); }
    _LIBCPP_HIDE_FROM_ABI
    constexpr iterator_t<_Base> base() &&
      requires forward_range<_View> { return std::move(__i_.__current()); }

    _LIBCPP_HIDE_FROM_ABI
    constexpr decltype(auto) operator*() const { return *__i_.__current(); }

    _LIBCPP_HIDE_FROM_ABI
    constexpr __inner_iterator& operator++() {
      __incremented_ = true;

      if constexpr (!forward_range<_Base>) {
        if constexpr (_Pattern::size() == 0) {
          return *this;
        }
      }

      ++__i_.__current();
      return *this;
    }

    _LIBCPP_HIDE_FROM_ABI
    constexpr decltype(auto) operator++(int) {
      if constexpr (forward_range<_Base>) {
        auto __tmp = *this;
        ++*this;
        return __tmp;

      } else {
        ++*this;
      }
    }

    _LIBCPP_HIDE_FROM_ABI
    friend constexpr bool operator==(const __inner_iterator& __x, const __inner_iterator& __y)
      requires forward_range<_Base> {
      return __x.__outer_current() == __y.__outer_current();
    }

    _LIBCPP_HIDE_FROM_ABI
    friend constexpr bool operator==(const __inner_iterator& __x, default_sentinel_t) {
      return __x.__is_done();
    }

    _LIBCPP_HIDE_FROM_ABI
    friend constexpr decltype(auto) iter_move(const __inner_iterator& __i)
        noexcept(noexcept(ranges::iter_move(__i.__outer_current()))) {
      return ranges::iter_move(__i.__outer_current());
    }

    _LIBCPP_HIDE_FROM_ABI
    friend constexpr void iter_swap(const __inner_iterator& __x, const __inner_iterator& __y)
        noexcept(noexcept(ranges::iter_swap(__x.__outer_current(), __y.__outer_current())))
        requires indirectly_swappable<iterator_t<_Base>> {
      ranges::iter_swap(__x.__outer_current(), __y.__outer_current());
    }
  };

};

template <class _Range, class _Pattern>
lazy_split_view(_Range&&, _Pattern&&) -> lazy_split_view<views::all_t<_Range>, views::all_t<_Pattern>>;

template <input_range _Range>
lazy_split_view(_Range&&, range_value_t<_Range>)
  -> lazy_split_view<views::all_t<_Range>, single_view<range_value_t<_Range>>>;

namespace views {
namespace __lazy_split_view {
struct __fn : __range_adaptor_closure<__fn> {
  template <class _Range, class _Pattern>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Range&& __range, _Pattern&& __pattern) const
    noexcept(noexcept(lazy_split_view(std::forward<_Range>(__range), std::forward<_Pattern>(__pattern))))
    -> decltype(      lazy_split_view(std::forward<_Range>(__range), std::forward<_Pattern>(__pattern)))
    { return          lazy_split_view(std::forward<_Range>(__range), std::forward<_Pattern>(__pattern)); }

  template <class _Pattern>
    requires constructible_from<decay_t<_Pattern>, _Pattern>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Pattern&& __pattern) const
      noexcept(is_nothrow_constructible_v<decay_t<_Pattern>, _Pattern>) {
    return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Pattern>(__pattern)));
  }
};
} // namespace __lazy_split_view

inline namespace __cpo {
  inline constexpr auto lazy_split = __lazy_split_view::__fn{};
} // namespace __cpo
} // namespace views

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 466 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_LAZY_SPLIT_VIEW_H
# 470 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/lazy_split_view.h" 3
#endif /* lazy_split_view.h expanded by -frewrite-includes */
# 401 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* rbegin.h expanded by -frewrite-includes */
#include <__ranges/rbegin.h>
#else /* rbegin.h expanded by -frewrite-includes */
# 401 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_RBEGIN_H
#define _LIBCPP___RANGES_RBEGIN_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/class_or_enum.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/auto_cast.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3

// [ranges.access.rbegin]

namespace ranges {
namespace __rbegin {
template <class _Tp>
concept __member_rbegin =
  __can_borrow<_Tp> &&
  __workaround_52970<_Tp> &&
  requires(_Tp&& __t) {
    { _LIBCPP_AUTO_CAST(__t.rbegin()) } -> input_or_output_iterator;
  };

void rbegin(auto&) = delete;
void rbegin(const auto&) = delete;

template <class _Tp>
concept __unqualified_rbegin =
  !__member_rbegin<_Tp> &&
  __can_borrow<_Tp> &&
  __class_or_enum<remove_cvref_t<_Tp>> &&
  requires(_Tp&& __t) {
    { _LIBCPP_AUTO_CAST(rbegin(__t)) } -> input_or_output_iterator;
  };

template <class _Tp>
concept __can_reverse =
  __can_borrow<_Tp> &&
  !__member_rbegin<_Tp> &&
  !__unqualified_rbegin<_Tp> &&
  requires(_Tp&& __t) {
    { ranges::begin(__t) } -> same_as<decltype(ranges::end(__t))>;
    { ranges::begin(__t) } -> bidirectional_iterator;
  };

struct __fn {
  template <class _Tp>
    requires __member_rbegin<_Tp>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
    noexcept(noexcept(_LIBCPP_AUTO_CAST(__t.rbegin())))
  {
    return _LIBCPP_AUTO_CAST(__t.rbegin());
  }

  template <class _Tp>
    requires __unqualified_rbegin<_Tp>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
    noexcept(noexcept(_LIBCPP_AUTO_CAST(rbegin(__t))))
  {
    return _LIBCPP_AUTO_CAST(rbegin(__t));
  }

  template <class _Tp>
    requires __can_reverse<_Tp>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
    noexcept(noexcept(ranges::end(__t)))
  {
    return std::make_reverse_iterator(ranges::end(__t));
  }

  void operator()(auto&&) const = delete;
};
} // namespace __rbegin

inline namespace __cpo {
  inline constexpr auto rbegin = __rbegin::__fn{};
} // namespace __cpo
} // namespace ranges

// [range.access.crbegin]

namespace ranges {
namespace __crbegin {
struct __fn {
  template <class _Tp>
    requires is_lvalue_reference_v<_Tp&&>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Tp&& __t) const
    noexcept(noexcept(ranges::rbegin(static_cast<const remove_reference_t<_Tp>&>(__t))))
    -> decltype(      ranges::rbegin(static_cast<const remove_reference_t<_Tp>&>(__t)))
    { return          ranges::rbegin(static_cast<const remove_reference_t<_Tp>&>(__t)); }

  template <class _Tp>
    requires is_rvalue_reference_v<_Tp&&>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Tp&& __t) const
    noexcept(noexcept(ranges::rbegin(static_cast<const _Tp&&>(__t))))
    -> decltype(      ranges::rbegin(static_cast<const _Tp&&>(__t)))
    { return          ranges::rbegin(static_cast<const _Tp&&>(__t)); }
};
} // namespace __crbegin

inline namespace __cpo {
  inline constexpr auto crbegin = __crbegin::__fn{};
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_RBEGIN_H
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rbegin.h" 3
#endif /* rbegin.h expanded by -frewrite-includes */
# 402 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/ref_view.h>
#endif /* expanded by -frewrite-includes */
# 402 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 403 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* rend.h expanded by -frewrite-includes */
#include <__ranges/rend.h>
#else /* rend.h expanded by -frewrite-includes */
# 403 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_REND_H
#define _LIBCPP___RANGES_REND_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/class_or_enum.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/rbegin.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/auto_cast.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
#endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3

// [range.access.rend]

namespace ranges {
namespace __rend {
template <class _Tp>
concept __member_rend =
  __can_borrow<_Tp> &&
  __workaround_52970<_Tp> &&
  requires(_Tp&& __t) {
    ranges::rbegin(__t);
    { _LIBCPP_AUTO_CAST(__t.rend()) } -> sentinel_for<decltype(ranges::rbegin(__t))>;
  };

void rend(auto&) = delete;
void rend(const auto&) = delete;

template <class _Tp>
concept __unqualified_rend =
  !__member_rend<_Tp> &&
  __can_borrow<_Tp> &&
  __class_or_enum<remove_cvref_t<_Tp>> &&
  requires(_Tp&& __t) {
    ranges::rbegin(__t);
    { _LIBCPP_AUTO_CAST(rend(__t)) } -> sentinel_for<decltype(ranges::rbegin(__t))>;
  };

template <class _Tp>
concept __can_reverse =
  __can_borrow<_Tp> &&
  !__member_rend<_Tp> &&
  !__unqualified_rend<_Tp> &&
  requires(_Tp&& __t) {
    { ranges::begin(__t) } -> same_as<decltype(ranges::end(__t))>;
    { ranges::begin(__t) } -> bidirectional_iterator;
  };

class __fn {
public:
  template <class _Tp>
    requires __member_rend<_Tp>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
    noexcept(noexcept(_LIBCPP_AUTO_CAST(__t.rend())))
  {
    return _LIBCPP_AUTO_CAST(__t.rend());
  }

  template <class _Tp>
    requires __unqualified_rend<_Tp>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
    noexcept(noexcept(_LIBCPP_AUTO_CAST(rend(__t))))
  {
    return _LIBCPP_AUTO_CAST(rend(__t));
  }

  template <class _Tp>
    requires __can_reverse<_Tp>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
    noexcept(noexcept(ranges::begin(__t)))
  {
    return std::make_reverse_iterator(ranges::begin(__t));
  }

  void operator()(auto&&) const = delete;
};
} // namespace __rend

inline namespace __cpo {
  inline constexpr auto rend = __rend::__fn{};
} // namespace __cpo
} // namespace ranges

// [range.access.crend]

namespace ranges {
namespace __crend {
struct __fn {
  template <class _Tp>
    requires is_lvalue_reference_v<_Tp&&>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Tp&& __t) const
    noexcept(noexcept(ranges::rend(static_cast<const remove_reference_t<_Tp>&>(__t))))
    -> decltype(      ranges::rend(static_cast<const remove_reference_t<_Tp>&>(__t)))
    { return          ranges::rend(static_cast<const remove_reference_t<_Tp>&>(__t)); }

  template <class _Tp>
    requires is_rvalue_reference_v<_Tp&&>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Tp&& __t) const
    noexcept(noexcept(ranges::rend(static_cast<const _Tp&&>(__t))))
    -> decltype(      ranges::rend(static_cast<const _Tp&&>(__t)))
    { return          ranges::rend(static_cast<const _Tp&&>(__t)); }
};
} // namespace __crend

inline namespace __cpo {
  inline constexpr auto crend = __crend::__fn{};
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_REND_H
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/rend.h" 3
#endif /* rend.h expanded by -frewrite-includes */
# 404 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/repeat_view.h>
#endif /* expanded by -frewrite-includes */
# 404 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 405 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/reverse_view.h>
#endif /* expanded by -frewrite-includes */
# 405 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 406 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/single_view.h>
#endif /* expanded by -frewrite-includes */
# 406 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 407 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 407 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 408 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* split_view.h expanded by -frewrite-includes */
#include <__ranges/split_view.h>
#else /* split_view.h expanded by -frewrite-includes */
# 408 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_SPLIT_VIEW_H
#define _LIBCPP___RANGES_SPLIT_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_search.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/bind_back.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/indirectly_comparable.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/all.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/empty.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/non_propagating_cache.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/single_view.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#endif
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3

namespace ranges {

template <forward_range _View, forward_range _Pattern>
  requires view<_View> && view<_Pattern> &&
           indirectly_comparable<iterator_t<_View>, iterator_t<_Pattern>, ranges::equal_to>
class split_view : public view_interface<split_view<_View, _Pattern>> {
private:
  _LIBCPP_NO_UNIQUE_ADDRESS _View __base_       = _View();
  _LIBCPP_NO_UNIQUE_ADDRESS _Pattern __pattern_ = _Pattern();
  using _Cache                                  = __non_propagating_cache<subrange<iterator_t<_View>>>;
  _Cache __cached_begin_                        = _Cache();

  template <class, class>
  friend struct __iterator;

  template <class, class>
  friend struct __sentinel;

  struct __iterator;
  struct __sentinel;

  _LIBCPP_HIDE_FROM_ABI constexpr subrange<iterator_t<_View>> __find_next(iterator_t<_View> __it) {
    auto [__begin, __end] = ranges::search(subrange(__it, ranges::end(__base_)), __pattern_);
    if (__begin != ranges::end(__base_) && ranges::empty(__pattern_)) {
      ++__begin;
      ++__end;
    }
    return {__begin, __end};
  }

public:
  _LIBCPP_HIDE_FROM_ABI split_view()
    requires default_initializable<_View> && default_initializable<_Pattern>
  = default;

  _LIBCPP_HIDE_FROM_ABI constexpr _LIBCPP_EXPLICIT_SINCE_CXX23 split_view(_View __base, _Pattern __pattern)
      : __base_(std::move(__base)), __pattern_(std::move((__pattern))) {}

  template <forward_range _Range>
    requires constructible_from<_View, views::all_t<_Range>> &&
                 constructible_from<_Pattern, single_view<range_value_t<_Range>>>
  _LIBCPP_HIDE_FROM_ABI constexpr _LIBCPP_EXPLICIT_SINCE_CXX23
  split_view(_Range&& __range, range_value_t<_Range> __elem)
      : __base_(views::all(std::forward<_Range>(__range))), __pattern_(views::single(std::move(__elem))) {}

  _LIBCPP_HIDE_FROM_ABI constexpr _View base() const&
    requires copy_constructible<_View>
  {
    return __base_;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__base_); }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator begin() {
    if (!__cached_begin_.__has_value()) {
      __cached_begin_.__emplace(__find_next(ranges::begin(__base_)));
    }
    return {*this, ranges::begin(__base_), *__cached_begin_};
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto end() {
    if constexpr (common_range<_View>) {
      return __iterator{*this, ranges::end(__base_), {}};
    } else {
      return __sentinel{*this};
    }
  }
};

template <class _Range, class _Pattern>
split_view(_Range&&, _Pattern&&) -> split_view<views::all_t<_Range>, views::all_t<_Pattern>>;

template <forward_range _Range>
split_view(_Range&&, range_value_t<_Range>) -> split_view<views::all_t<_Range>, single_view<range_value_t<_Range>>>;

template <forward_range _View, forward_range _Pattern>
  requires view<_View> && view<_Pattern> &&
           indirectly_comparable<iterator_t<_View>, iterator_t<_Pattern>, ranges::equal_to>
struct split_view<_View, _Pattern>::__iterator {
private:
  split_view* __parent_                                         = nullptr;
  _LIBCPP_NO_UNIQUE_ADDRESS iterator_t<_View> __cur_            = iterator_t<_View>();
  _LIBCPP_NO_UNIQUE_ADDRESS subrange<iterator_t<_View>> __next_ = subrange<iterator_t<_View>>();
  bool __trailing_empty_                                        = false;

  friend struct __sentinel;

public:
  using iterator_concept  = forward_iterator_tag;
  using iterator_category = input_iterator_tag;
  using value_type        = subrange<iterator_t<_View>>;
  using difference_type   = range_difference_t<_View>;

  _LIBCPP_HIDE_FROM_ABI __iterator() = default;

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator(
      split_view<_View, _Pattern>& __parent, iterator_t<_View> __current, subrange<iterator_t<_View>> __next)
      : __parent_(std::addressof(__parent)), __cur_(std::move(__current)), __next_(std::move(__next)) {}

  _LIBCPP_HIDE_FROM_ABI constexpr iterator_t<_View> base() const { return __cur_; }

  _LIBCPP_HIDE_FROM_ABI constexpr value_type operator*() const { return {__cur_, __next_.begin()}; }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator++() {
    __cur_ = __next_.begin();
    if (__cur_ != ranges::end(__parent_->__base_)) {
      __cur_ = __next_.end();
      if (__cur_ == ranges::end(__parent_->__base_)) {
        __trailing_empty_ = true;
        __next_           = {__cur_, __cur_};
      } else {
        __next_ = __parent_->__find_next(__cur_);
      }
    } else {
      __trailing_empty_ = false;
    }
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr __iterator operator++(int) {
    auto __tmp = *this;
    ++*this;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const __iterator& __x, const __iterator& __y) {
    return __x.__cur_ == __y.__cur_ && __x.__trailing_empty_ == __y.__trailing_empty_;
  }
};

template <forward_range _View, forward_range _Pattern>
  requires view<_View> && view<_Pattern> &&
           indirectly_comparable<iterator_t<_View>, iterator_t<_Pattern>, ranges::equal_to>
struct split_view<_View, _Pattern>::__sentinel {
private:
  _LIBCPP_NO_UNIQUE_ADDRESS sentinel_t<_View> __end_ = sentinel_t<_View>();

  _LIBCPP_HIDE_FROM_ABI static constexpr bool __equals(const __iterator& __x, const __sentinel& __y) {
    return __x.__cur_ == __y.__end_ && !__x.__trailing_empty_;
  }

public:
  _LIBCPP_HIDE_FROM_ABI __sentinel() = default;

  _LIBCPP_HIDE_FROM_ABI constexpr explicit __sentinel(split_view<_View, _Pattern>& __parent)
      : __end_(ranges::end(__parent.__base_)) {}

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const __iterator& __x, const __sentinel& __y) {
    return __equals(__x, __y);
  }
};

namespace views {
namespace __split_view {
struct __fn : __range_adaptor_closure<__fn> {
  // clang-format off
  template <class _Range, class _Pattern>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Range&& __range, _Pattern&& __pattern) const
    noexcept(noexcept(split_view(std::forward<_Range>(__range), std::forward<_Pattern>(__pattern))))
    -> decltype(      split_view(std::forward<_Range>(__range), std::forward<_Pattern>(__pattern)))
    { return          split_view(std::forward<_Range>(__range), std::forward<_Pattern>(__pattern)); }
  // clang-format on

  template <class _Pattern>
    requires constructible_from<decay_t<_Pattern>, _Pattern>
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Pattern&& __pattern) const
      noexcept(is_nothrow_constructible_v<decay_t<_Pattern>, _Pattern>) {
    return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Pattern>(__pattern)));
  }
};
} // namespace __split_view

inline namespace __cpo {
inline constexpr auto split = __split_view::__fn{};
} // namespace __cpo
} // namespace views

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_SPLIT_VIEW_H
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/split_view.h" 3
#endif /* split_view.h expanded by -frewrite-includes */
# 409 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 409 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 410 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* take_view.h expanded by -frewrite-includes */
#include <__ranges/take_view.h>
#else /* take_view.h expanded by -frewrite-includes */
# 410 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_TAKE_VIEW_H
#define _LIBCPP___RANGES_TAKE_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_min.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/bind_back.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/span.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/string_view.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/counted_iterator.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/default_sentinel.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/all.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/empty_view.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/iota_view.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/repeat_view.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/subrange.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/maybe_const.h>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/auto_cast.h>
#endif /* expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#endif
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3

namespace ranges {

template<view _View>
class take_view : public view_interface<take_view<_View>> {
  _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
  range_difference_t<_View> __count_ = 0;

  template<bool> class __sentinel;

public:
  _LIBCPP_HIDE_FROM_ABI
  take_view() requires default_initializable<_View> = default;

  _LIBCPP_HIDE_FROM_ABI
  constexpr _LIBCPP_EXPLICIT_SINCE_CXX23 take_view(_View __base, range_difference_t<_View> __count)
      : __base_(std::move(__base)), __count_(__count) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__count >= 0, "count has to be greater than or equal to zero");
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr _View base() const& requires copy_constructible<_View> { return __base_; }

  _LIBCPP_HIDE_FROM_ABI
  constexpr _View base() && { return std::move(__base_); }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto begin() requires (!__simple_view<_View>) {
    if constexpr (sized_range<_View>) {
      if constexpr (random_access_range<_View>) {
        return ranges::begin(__base_);
      } else {
        using _DifferenceT = range_difference_t<_View>;
        auto __size = size();
        return counted_iterator(ranges::begin(__base_), static_cast<_DifferenceT>(__size));
      }
    } else {
      return counted_iterator(ranges::begin(__base_), __count_);
    }
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto begin() const requires range<const _View> {
    if constexpr (sized_range<const _View>) {
      if constexpr (random_access_range<const _View>) {
        return ranges::begin(__base_);
      } else {
        using _DifferenceT = range_difference_t<const _View>;
        auto __size = size();
        return counted_iterator(ranges::begin(__base_), static_cast<_DifferenceT>(__size));
      }
    } else {
      return counted_iterator(ranges::begin(__base_), __count_);
    }
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto end() requires (!__simple_view<_View>) {
    if constexpr (sized_range<_View>) {
      if constexpr (random_access_range<_View>) {
        return ranges::begin(__base_) + size();
      } else {
        return default_sentinel;
      }
    } else {
      return __sentinel<false>{ranges::end(__base_)};
    }
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto end() const requires range<const _View> {
    if constexpr (sized_range<const _View>) {
      if constexpr (random_access_range<const _View>) {
        return ranges::begin(__base_) + size();
      } else {
        return default_sentinel;
      }
    } else {
      return __sentinel<true>{ranges::end(__base_)};
    }
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto size() requires sized_range<_View> {
    auto __n = ranges::size(__base_);
    return ranges::min(__n, static_cast<decltype(__n)>(__count_));
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto size() const requires sized_range<const _View> {
    auto __n = ranges::size(__base_);
    return ranges::min(__n, static_cast<decltype(__n)>(__count_));
  }
};

template<view _View>
template<bool _Const>
class take_view<_View>::__sentinel {
  using _Base = __maybe_const<_Const, _View>;
  template<bool _OtherConst>
  using _Iter = counted_iterator<iterator_t<__maybe_const<_OtherConst, _View>>>;
  _LIBCPP_NO_UNIQUE_ADDRESS sentinel_t<_Base> __end_ = sentinel_t<_Base>();

  template<bool>
  friend class take_view<_View>::__sentinel;

public:
  _LIBCPP_HIDE_FROM_ABI
  __sentinel() = default;

  _LIBCPP_HIDE_FROM_ABI
  constexpr explicit __sentinel(sentinel_t<_Base> __end) : __end_(std::move(__end)) {}

  _LIBCPP_HIDE_FROM_ABI
  constexpr __sentinel(__sentinel<!_Const> __s)
    requires _Const && convertible_to<sentinel_t<_View>, sentinel_t<_Base>>
    : __end_(std::move(__s.__end_)) {}

  _LIBCPP_HIDE_FROM_ABI
  constexpr sentinel_t<_Base> base() const { return __end_; }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(const _Iter<_Const>& __lhs, const __sentinel& __rhs) {
    return __lhs.count() == 0 || __lhs.base() == __rhs.__end_;
  }

  template<bool _OtherConst = !_Const>
    requires sentinel_for<sentinel_t<_Base>, iterator_t<__maybe_const<_OtherConst, _View>>>
  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(const _Iter<_Const>& __lhs, const __sentinel& __rhs) {
    return __lhs.count() == 0 || __lhs.base() == __rhs.__end_;
  }
};

template<class _Range>
take_view(_Range&&, range_difference_t<_Range>) -> take_view<views::all_t<_Range>>;

template<class _Tp>
inline constexpr bool enable_borrowed_range<take_view<_Tp>> = enable_borrowed_range<_Tp>;

namespace views {
namespace __take {

template <class _Tp>
inline constexpr bool __is_empty_view = false;

template <class _Tp>
inline constexpr bool __is_empty_view<empty_view<_Tp>> = true;

template <class _Tp>
inline constexpr bool __is_passthrough_specialization = false;

template <class _Tp, size_t _Extent>
inline constexpr bool __is_passthrough_specialization<span<_Tp, _Extent>> = true;

template <class _CharT, class _Traits>
inline constexpr bool __is_passthrough_specialization<basic_string_view<_CharT, _Traits>> = true;

template <class _Iter, class _Sent, subrange_kind _Kind>
inline constexpr bool __is_passthrough_specialization<subrange<_Iter, _Sent, _Kind>> = true;

template <class _Tp>
inline constexpr bool __is_iota_specialization = false;

template <class _Np, class _Bound>
inline constexpr bool __is_iota_specialization<iota_view<_Np, _Bound>> = true;

template <class _Tp>
struct __passthrough_type;

template <class _Tp, size_t _Extent>
struct __passthrough_type<span<_Tp, _Extent>> {
  using type = span<_Tp>;
};

template <class _CharT, class _Traits>
struct __passthrough_type<basic_string_view<_CharT, _Traits>> {
  using type = basic_string_view<_CharT, _Traits>;
};

template <class _Iter, class _Sent, subrange_kind _Kind>
  requires requires{typename subrange<_Iter>;}
struct __passthrough_type<subrange<_Iter, _Sent, _Kind>> {
  using type = subrange<_Iter>;
};

template <class _Tp>
using __passthrough_type_t = typename __passthrough_type<_Tp>::type;

struct __fn {
  // [range.take.overview]: the `empty_view` case.
  template <class _Range, convertible_to<range_difference_t<_Range>> _Np>
    requires __is_empty_view<remove_cvref_t<_Range>>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Range&& __range, _Np&&) const
    noexcept(noexcept(_LIBCPP_AUTO_CAST(std::forward<_Range>(__range))))
    -> decltype(      _LIBCPP_AUTO_CAST(std::forward<_Range>(__range)))
    { return          _LIBCPP_AUTO_CAST(std::forward<_Range>(__range)); }

  // [range.take.overview]: the `span | basic_string_view | subrange` case.
  template <class _Range,
            convertible_to<range_difference_t<_Range>> _Np,
            class _RawRange = remove_cvref_t<_Range>,
            class _Dist = range_difference_t<_Range>>
    requires (!__is_empty_view<_RawRange> &&
              random_access_range<_RawRange> &&
              sized_range<_RawRange> &&
              __is_passthrough_specialization<_RawRange>)
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Range&& __rng, _Np&& __n) const
    noexcept(noexcept(__passthrough_type_t<_RawRange>(
                              ranges::begin(__rng),
                              ranges::begin(__rng) + std::min<_Dist>(ranges::distance(__rng), std::forward<_Np>(__n))
                              )))
    -> decltype(      __passthrough_type_t<_RawRange>(
                              // Note: deliberately not forwarding `__rng` to guard against double moves.
                              ranges::begin(__rng),
                              ranges::begin(__rng) + std::min<_Dist>(ranges::distance(__rng), std::forward<_Np>(__n))
                              ))
    { return          __passthrough_type_t<_RawRange>(
                              ranges::begin(__rng),
                              ranges::begin(__rng) + std::min<_Dist>(ranges::distance(__rng), std::forward<_Np>(__n))
                              ); }

  // [range.take.overview]: the `iota_view` case.
  template <class _Range,
            convertible_to<range_difference_t<_Range>> _Np,
            class _RawRange = remove_cvref_t<_Range>,
            class _Dist = range_difference_t<_Range>>
    requires (!__is_empty_view<_RawRange> &&
              random_access_range<_RawRange> &&
              sized_range<_RawRange> &&
              __is_iota_specialization<_RawRange>)
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Range&& __rng, _Np&& __n) const
    noexcept(noexcept(ranges::iota_view(
                              *ranges::begin(__rng),
                              *ranges::begin(__rng) + std::min<_Dist>(ranges::distance(__rng), std::forward<_Np>(__n))
                              )))
    -> decltype(      ranges::iota_view(
                              // Note: deliberately not forwarding `__rng` to guard against double moves.
                              *ranges::begin(__rng),
                              *ranges::begin(__rng) + std::min<_Dist>(ranges::distance(__rng), std::forward<_Np>(__n))
                              ))
    { return          ranges::iota_view(
                              *ranges::begin(__rng),
                              *ranges::begin(__rng) + std::min<_Dist>(ranges::distance(__rng), std::forward<_Np>(__n))
                              ); }
// clang-format off
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
  // [range.take.overview]: the `repeat_view` "_RawRange models sized_range" case.
  template <class _Range,
            convertible_to<range_difference_t<_Range>> _Np,
            class _RawRange = remove_cvref_t<_Range>,
            class _Dist     = range_difference_t<_Range>>
    requires(__is_repeat_specialization<_RawRange> && sized_range<_RawRange>)
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range, _Np&& __n) const
    noexcept(noexcept(views::repeat(*__range.__value_, std::min<_Dist>(ranges::distance(__range), std::forward<_Np>(__n)))))
    -> decltype(      views::repeat(*__range.__value_, std::min<_Dist>(ranges::distance(__range), std::forward<_Np>(__n))))
    { return          views::repeat(*__range.__value_, std::min<_Dist>(ranges::distance(__range), std::forward<_Np>(__n))); }

  // [range.take.overview]: the `repeat_view` "otherwise" case.
  template <class _Range,
            convertible_to<range_difference_t<_Range>> _Np,
            class _RawRange = remove_cvref_t<_Range>,
            class _Dist     = range_difference_t<_Range>>
    requires(__is_repeat_specialization<_RawRange> && !sized_range<_RawRange>)
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range, _Np&& __n) const
    noexcept(noexcept(views::repeat(*__range.__value_, static_cast<_Dist>(__n))))
    -> decltype(      views::repeat(*__range.__value_, static_cast<_Dist>(__n)))
    { return          views::repeat(*__range.__value_, static_cast<_Dist>(__n)); }
#endif
# 329 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
// clang-format on

  // [range.take.overview]: the "otherwise" case.
  template <class _Range, convertible_to<range_difference_t<_Range>> _Np,
            class _RawRange = remove_cvref_t<_Range>>
    // Note: without specifically excluding the other cases, GCC sees this overload as ambiguous with the other
    // overloads.
    requires (!(__is_empty_view<_RawRange> ||
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 338 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
                __is_repeat_specialization<_RawRange> ||
#endif
# 340 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
               (__is_iota_specialization<_RawRange> &&
                sized_range<_RawRange> &&
                random_access_range<_RawRange>) ||
               (__is_passthrough_specialization<_RawRange> &&
                sized_range<_RawRange> &&
                random_access_range<_RawRange>)
             ))
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Range&& __range, _Np&& __n) const
    noexcept(noexcept(take_view(std::forward<_Range>(__range), std::forward<_Np>(__n))))
    -> decltype(      take_view(std::forward<_Range>(__range), std::forward<_Np>(__n)))
    { return          take_view(std::forward<_Range>(__range), std::forward<_Np>(__n)); }

  template <class _Np>
    requires constructible_from<decay_t<_Np>, _Np>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator()(_Np&& __n) const
    noexcept(is_nothrow_constructible_v<decay_t<_Np>, _Np>)
  { return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Np>(__n))); }
};

} // namespace __take

inline namespace __cpo {
  inline constexpr auto take = __take::__fn{};
} // namespace __cpo
} // namespace views

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 371 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___RANGES_TAKE_VIEW_H
# 377 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_view.h" 3
#endif /* take_view.h expanded by -frewrite-includes */
# 411 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* take_while_view.h expanded by -frewrite-includes */
#include <__ranges/take_while_view.h>
#else /* take_while_view.h expanded by -frewrite-includes */
# 411 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_TAKE_WHILE_VIEW_H
#define _LIBCPP___RANGES_TAKE_WHILE_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/bind_back.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/all.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/movable_box.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/maybe_const.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/in_place.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#endif
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3

namespace ranges {

template <view _View, class _Pred>
  requires input_range<_View> && is_object_v<_Pred> && indirect_unary_predicate<const _Pred, iterator_t<_View>>
class take_while_view : public view_interface<take_while_view<_View, _Pred>> {
  template <bool>
  class __sentinel;

  _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
  _LIBCPP_NO_UNIQUE_ADDRESS __movable_box<_Pred> __pred_;

public:
  _LIBCPP_HIDE_FROM_ABI take_while_view()
    requires default_initializable<_View> && default_initializable<_Pred>
  = default;

  _LIBCPP_HIDE_FROM_ABI constexpr _LIBCPP_EXPLICIT_SINCE_CXX23 take_while_view(_View __base, _Pred __pred)
      : __base_(std::move(__base)), __pred_(std::in_place, std::move(__pred)) {}

  _LIBCPP_HIDE_FROM_ABI constexpr _View base() const&
    requires copy_constructible<_View>
  {
    return __base_;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__base_); }

  _LIBCPP_HIDE_FROM_ABI constexpr const _Pred& pred() const { return *__pred_; }

  _LIBCPP_HIDE_FROM_ABI constexpr auto begin()
    requires(!__simple_view<_View>)
  {
    return ranges::begin(__base_);
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto begin() const
    requires range<const _View> && indirect_unary_predicate<const _Pred, iterator_t<const _View>>
  {
    return ranges::begin(__base_);
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto end()
    requires(!__simple_view<_View>)
  {
    return __sentinel</*_Const=*/false>(ranges::end(__base_), std::addressof(*__pred_));
  }

  _LIBCPP_HIDE_FROM_ABI constexpr auto end() const
    requires range<const _View> && indirect_unary_predicate<const _Pred, iterator_t<const _View>>
  {
    return __sentinel</*_Const=*/true>(ranges::end(__base_), std::addressof(*__pred_));
  }
};

template <class _Range, class _Pred>
take_while_view(_Range&&, _Pred) -> take_while_view<views::all_t<_Range>, _Pred>;

template <view _View, class _Pred>
  requires input_range<_View> && is_object_v<_Pred> && indirect_unary_predicate<const _Pred, iterator_t<_View>>
template <bool _Const>
class take_while_view<_View, _Pred>::__sentinel {
  using _Base = __maybe_const<_Const, _View>;

  sentinel_t<_Base> __end_ = sentinel_t<_Base>();
  const _Pred* __pred_     = nullptr;

  friend class __sentinel<!_Const>;

public:
  _LIBCPP_HIDE_FROM_ABI __sentinel() = default;

  _LIBCPP_HIDE_FROM_ABI constexpr explicit __sentinel(sentinel_t<_Base> __end, const _Pred* __pred)
      : __end_(std::move(__end)), __pred_(__pred) {}

  _LIBCPP_HIDE_FROM_ABI constexpr __sentinel(__sentinel<!_Const> __s)
    requires _Const && convertible_to<sentinel_t<_View>, sentinel_t<_Base>>
      : __end_(std::move(__s.__end_)), __pred_(__s.__pred_) {}

  _LIBCPP_HIDE_FROM_ABI constexpr sentinel_t<_Base> base() const { return __end_; }

  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const iterator_t<_Base>& __x, const __sentinel& __y) {
    return __x == __y.__end_ || !std::invoke(*__y.__pred_, *__x);
  }

  template <bool _OtherConst = !_Const>
    requires sentinel_for<sentinel_t<_Base>, iterator_t<__maybe_const<_OtherConst, _View>>>
  _LIBCPP_HIDE_FROM_ABI friend constexpr bool
  operator==(const iterator_t<__maybe_const<_OtherConst, _View>>& __x, const __sentinel& __y) {
    return __x == __y.__end_ || !std::invoke(*__y.__pred_, *__x);
  }
};

namespace views {
namespace __take_while {

struct __fn {
  template <class _Range, class _Pred>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range, _Pred&& __pred) const
      noexcept(noexcept(/**/ take_while_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred))))
          -> decltype(/*--*/ take_while_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred))) {
    return /*-------------*/ take_while_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred));
  }

  template <class _Pred>
    requires constructible_from<decay_t<_Pred>, _Pred>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Pred&& __pred) const
      noexcept(is_nothrow_constructible_v<decay_t<_Pred>, _Pred>) {
    return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Pred>(__pred)));
  }
};

} // namespace __take_while

inline namespace __cpo {
inline constexpr auto take_while = __take_while::__fn{};
} // namespace __cpo
} // namespace views
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_TAKE_WHILE_VIEW_H
# 166 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/take_while_view.h" 3
#endif /* take_while_view.h expanded by -frewrite-includes */
# 412 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* to.h expanded by -frewrite-includes */
#include <__ranges/to.h>
#else /* to.h expanded by -frewrite-includes */
# 412 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_TO_H
#define _LIBCPP___RANGES_TO_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_copy.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/derived_from.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/bind_back.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/back_insert_iterator.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/insert_iterator.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/from_range.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* transform_view.h expanded by -frewrite-includes */
#include <__ranges/transform_view.h>
#else /* transform_view.h expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_TRANSFORM_VIEW_H
#define _LIBCPP___RANGES_TRANSFORM_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/three_way_comparable.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/copyable.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/derived_from.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/equality_comparable.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/invocable.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/bind_back.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/perfect_forward.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/all.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/empty.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/movable_box.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/range_adaptor.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_object.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/maybe_const.h>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/in_place.h>
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#endif
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3

namespace ranges {

template<class _Fn, class _View>
concept __regular_invocable_with_range_ref =
  regular_invocable<_Fn, range_reference_t<_View>>;

template<class _View, class _Fn>
concept __transform_view_constraints =
  view<_View> && is_object_v<_Fn> &&
  regular_invocable<_Fn&, range_reference_t<_View>> &&
  __can_reference<invoke_result_t<_Fn&, range_reference_t<_View>>>;

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
template <input_range _View, move_constructible _Fn>
#  else
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
template <input_range _View, copy_constructible _Fn>
#  endif
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
  requires __transform_view_constraints<_View, _Fn>
class transform_view : public view_interface<transform_view<_View, _Fn>> {
  template<bool> class __iterator;
  template<bool> class __sentinel;

  _LIBCPP_NO_UNIQUE_ADDRESS __movable_box<_Fn> __func_;
  _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();

public:
  _LIBCPP_HIDE_FROM_ABI
  transform_view()
    requires default_initializable<_View> && default_initializable<_Fn> = default;

  _LIBCPP_HIDE_FROM_ABI
  constexpr _LIBCPP_EXPLICIT_SINCE_CXX23 transform_view(_View __base, _Fn __func)
    : __func_(std::in_place, std::move(__func)), __base_(std::move(__base)) {}

  _LIBCPP_HIDE_FROM_ABI
  constexpr _View base() const& requires copy_constructible<_View> { return __base_; }
  _LIBCPP_HIDE_FROM_ABI
  constexpr _View base() && { return std::move(__base_); }

  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator<false> begin() {
    return __iterator<false>{*this, ranges::begin(__base_)};
  }
  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator<true> begin() const
    requires range<const _View> &&
             __regular_invocable_with_range_ref<const _Fn&, const _View>
  {
    return __iterator<true>(*this, ranges::begin(__base_));
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr __sentinel<false> end() {
    return __sentinel<false>(ranges::end(__base_));
  }
  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator<false> end()
    requires common_range<_View>
  {
    return __iterator<false>(*this, ranges::end(__base_));
  }
  _LIBCPP_HIDE_FROM_ABI
  constexpr __sentinel<true> end() const
    requires range<const _View> &&
             __regular_invocable_with_range_ref<const _Fn&, const _View>
  {
    return __sentinel<true>(ranges::end(__base_));
  }
  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator<true> end() const
    requires common_range<const _View> &&
             __regular_invocable_with_range_ref<const _Fn&, const _View>
  {
    return __iterator<true>(*this, ranges::end(__base_));
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto size() requires sized_range<_View> { return ranges::size(__base_); }
  _LIBCPP_HIDE_FROM_ABI
  constexpr auto size() const requires sized_range<const _View> { return ranges::size(__base_); }
};

template<class _Range, class _Fn>
transform_view(_Range&&, _Fn) -> transform_view<views::all_t<_Range>, _Fn>;

template<class _View>
struct __transform_view_iterator_concept { using type = input_iterator_tag; };

template<random_access_range _View>
struct __transform_view_iterator_concept<_View> { using type = random_access_iterator_tag; };

template<bidirectional_range _View>
struct __transform_view_iterator_concept<_View> { using type = bidirectional_iterator_tag; };

template<forward_range _View>
struct __transform_view_iterator_concept<_View> { using type = forward_iterator_tag; };

template<class, class>
struct __transform_view_iterator_category_base {};

template<forward_range _View, class _Fn>
struct __transform_view_iterator_category_base<_View, _Fn> {
  using _Cat = typename iterator_traits<iterator_t<_View>>::iterator_category;

  using iterator_category = conditional_t<
    is_reference_v<invoke_result_t<_Fn&, range_reference_t<_View>>>,
    conditional_t<
      derived_from<_Cat, contiguous_iterator_tag>,
      random_access_iterator_tag,
      _Cat
    >,
    input_iterator_tag
  >;
};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
template <input_range _View, move_constructible _Fn>
#  else
# 172 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
template <input_range _View, copy_constructible _Fn>
#  endif
# 174 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
  requires __transform_view_constraints<_View, _Fn>
template <bool _Const>
class transform_view<_View, _Fn>::__iterator : public __transform_view_iterator_category_base<_View, _Fn> {

  using _Parent = __maybe_const<_Const, transform_view>;
  using _Base = __maybe_const<_Const, _View>;

  _Parent *__parent_ = nullptr;

  template<bool>
  friend class transform_view<_View, _Fn>::__iterator;

  template<bool>
  friend class transform_view<_View, _Fn>::__sentinel;

public:
  iterator_t<_Base> __current_ = iterator_t<_Base>();

  using iterator_concept = typename __transform_view_iterator_concept<_View>::type;
  using value_type = remove_cvref_t<invoke_result_t<_Fn&, range_reference_t<_Base>>>;
  using difference_type = range_difference_t<_Base>;

  _LIBCPP_HIDE_FROM_ABI
  __iterator() requires default_initializable<iterator_t<_Base>> = default;

  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator(_Parent& __parent, iterator_t<_Base> __current)
    : __parent_(std::addressof(__parent)), __current_(std::move(__current)) {}

  // Note: `__i` should always be `__iterator<false>`, but directly using
  // `__iterator<false>` is ill-formed when `_Const` is false
  // (see http://wg21.link/class.copy.ctor#5).
  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator(__iterator<!_Const> __i)
    requires _Const && convertible_to<iterator_t<_View>, iterator_t<_Base>>
    : __parent_(__i.__parent_), __current_(std::move(__i.__current_)) {}

  _LIBCPP_HIDE_FROM_ABI
  constexpr const iterator_t<_Base>& base() const& noexcept {
    return __current_;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr iterator_t<_Base> base() && {
    return std::move(__current_);
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr decltype(auto) operator*() const
    noexcept(noexcept(std::invoke(*__parent_->__func_, *__current_)))
  {
    return std::invoke(*__parent_->__func_, *__current_);
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator& operator++() {
    ++__current_;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr void operator++(int) { ++__current_; }

  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator operator++(int)
    requires forward_range<_Base>
  {
    auto __tmp = *this;
    ++*this;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator& operator--()
    requires bidirectional_range<_Base>
  {
    --__current_;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator operator--(int)
    requires bidirectional_range<_Base>
  {
    auto __tmp = *this;
    --*this;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator& operator+=(difference_type __n)
    requires random_access_range<_Base>
  {
    __current_ += __n;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator& operator-=(difference_type __n)
    requires random_access_range<_Base>
  {
    __current_ -= __n;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr decltype(auto) operator[](difference_type __n) const
    noexcept(noexcept(std::invoke(*__parent_->__func_, __current_[__n])))
    requires random_access_range<_Base>
  {
    return std::invoke(*__parent_->__func_, __current_[__n]);
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(const __iterator& __x, const __iterator& __y)
    requires equality_comparable<iterator_t<_Base>>
  {
    return __x.__current_ == __y.__current_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator<(const __iterator& __x, const __iterator& __y)
    requires random_access_range<_Base>
  {
    return __x.__current_ < __y.__current_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator>(const __iterator& __x, const __iterator& __y)
    requires random_access_range<_Base>
  {
    return __x.__current_ > __y.__current_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator<=(const __iterator& __x, const __iterator& __y)
    requires random_access_range<_Base>
  {
    return __x.__current_ <= __y.__current_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator>=(const __iterator& __x, const __iterator& __y)
    requires random_access_range<_Base>
  {
    return __x.__current_ >= __y.__current_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr auto operator<=>(const __iterator& __x, const __iterator& __y)
    requires random_access_range<_Base> && three_way_comparable<iterator_t<_Base>>
  {
    return __x.__current_ <=> __y.__current_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr __iterator operator+(__iterator __i, difference_type __n)
    requires random_access_range<_Base>
  {
    return __iterator{*__i.__parent_, __i.__current_ + __n};
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr __iterator operator+(difference_type __n, __iterator __i)
    requires random_access_range<_Base>
  {
    return __iterator{*__i.__parent_, __i.__current_ + __n};
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr __iterator operator-(__iterator __i, difference_type __n)
    requires random_access_range<_Base>
  {
    return __iterator{*__i.__parent_, __i.__current_ - __n};
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr difference_type operator-(const __iterator& __x, const __iterator& __y)
    requires sized_sentinel_for<iterator_t<_Base>, iterator_t<_Base>>
  {
    return __x.__current_ - __y.__current_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr decltype(auto) iter_move(const __iterator& __i)
    noexcept(noexcept(*__i))
  {
    if constexpr (is_lvalue_reference_v<decltype(*__i)>)
      return std::move(*__i);
    else
      return *__i;
  }
};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 369 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
template <input_range _View, move_constructible _Fn>
#  else
# 371 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
template <input_range _View, copy_constructible _Fn>
#  endif
# 373 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
  requires __transform_view_constraints<_View, _Fn>
template <bool _Const>
class transform_view<_View, _Fn>::__sentinel {
  using _Parent = __maybe_const<_Const, transform_view>;
  using _Base = __maybe_const<_Const, _View>;

  sentinel_t<_Base> __end_ = sentinel_t<_Base>();

  template<bool>
  friend class transform_view<_View, _Fn>::__iterator;

  template<bool>
  friend class transform_view<_View, _Fn>::__sentinel;

public:
  _LIBCPP_HIDE_FROM_ABI
  __sentinel() = default;

  _LIBCPP_HIDE_FROM_ABI
  constexpr explicit __sentinel(sentinel_t<_Base> __end) : __end_(__end) {}

  // Note: `__i` should always be `__sentinel<false>`, but directly using
  // `__sentinel<false>` is ill-formed when `_Const` is false
  // (see http://wg21.link/class.copy.ctor#5).
  _LIBCPP_HIDE_FROM_ABI
  constexpr __sentinel(__sentinel<!_Const> __i)
    requires _Const && convertible_to<sentinel_t<_View>, sentinel_t<_Base>>
    : __end_(std::move(__i.__end_)) {}

  _LIBCPP_HIDE_FROM_ABI
  constexpr sentinel_t<_Base> base() const { return __end_; }

  template<bool _OtherConst>
    requires sentinel_for<sentinel_t<_Base>, iterator_t<__maybe_const<_OtherConst, _View>>>
  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(const __iterator<_OtherConst>& __x, const __sentinel& __y) {
    return __x.__current_ == __y.__end_;
  }

  template<bool _OtherConst>
    requires sized_sentinel_for<sentinel_t<_Base>, iterator_t<__maybe_const<_OtherConst, _View>>>
  _LIBCPP_HIDE_FROM_ABI
  friend constexpr range_difference_t<__maybe_const<_OtherConst, _View>>
  operator-(const __iterator<_OtherConst>& __x, const __sentinel& __y) {
    return __x.__current_ - __y.__end_;
  }

  template<bool _OtherConst>
    requires sized_sentinel_for<sentinel_t<_Base>, iterator_t<__maybe_const<_OtherConst, _View>>>
  _LIBCPP_HIDE_FROM_ABI
  friend constexpr range_difference_t<__maybe_const<_OtherConst, _View>>
  operator-(const __sentinel& __x, const __iterator<_OtherConst>& __y) {
    return __x.__end_ - __y.__current_;
  }
};

namespace views {
namespace __transform {
  struct __fn {
    template<class _Range, class _Fn>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Range&& __range, _Fn&& __f) const
      noexcept(noexcept(transform_view(std::forward<_Range>(__range), std::forward<_Fn>(__f))))
      -> decltype(      transform_view(std::forward<_Range>(__range), std::forward<_Fn>(__f)))
      { return          transform_view(std::forward<_Range>(__range), std::forward<_Fn>(__f)); }

    template<class _Fn>
      requires constructible_from<decay_t<_Fn>, _Fn>
    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Fn&& __f) const
      noexcept(is_nothrow_constructible_v<decay_t<_Fn>, _Fn>)
    { return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Fn>(__f))); }
  };
} // namespace __transform

inline namespace __cpo {
  inline constexpr auto transform = __transform::__fn{};
} // namespace __cpo
} // namespace views

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 20
# 456 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_TRANSFORM_VIEW_H
# 460 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/transform_view.h" 3
#endif /* transform_view.h expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_pointer.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_const.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_volatile.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/type_identity.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#endif
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3

namespace ranges {

template <class _Container>
constexpr bool __reservable_container =
    sized_range<_Container> && requires(_Container& __c, range_size_t<_Container> __n) {
      __c.reserve(__n);
      { __c.capacity() } -> same_as<decltype(__n)>;
      { __c.max_size() } -> same_as<decltype(__n)>;
    };

template <class _Container, class _Ref>
constexpr bool __container_insertable = requires(_Container& __c, _Ref&& __ref) {
  requires(
      requires { __c.push_back(std::forward<_Ref>(__ref)); } ||
      requires { __c.insert(__c.end(), std::forward<_Ref>(__ref)); });
};

template <class _Ref, class _Container>
_LIBCPP_HIDE_FROM_ABI constexpr auto __container_inserter(_Container& __c) {
  if constexpr (requires { __c.push_back(std::declval<_Ref>()); }) {
    return std::back_inserter(__c);
  } else {
    return std::inserter(__c, __c.end());
  }
}

// Note: making this a concept allows short-circuiting the second condition.
template <class _Container, class _Range>
concept __try_non_recursive_conversion =
    !input_range<_Container> || convertible_to<range_reference_t<_Range>, range_value_t<_Container>>;

template <class _Container, class _Range, class... _Args>
concept __constructible_from_iter_pair =
    common_range<_Range> && requires { typename iterator_traits<iterator_t<_Range>>::iterator_category; } &&
    derived_from<typename iterator_traits<iterator_t<_Range>>::iterator_category, input_iterator_tag> &&
    constructible_from<_Container, iterator_t<_Range>, sentinel_t<_Range>, _Args...>;

template <class>
concept __always_false = false;

// `ranges::to` base template -- the `_Container` type is a simple type template parameter.
template <class _Container, input_range _Range, class... _Args>
  requires(!view<_Container>)
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Container to(_Range&& __range, _Args&&... __args) {
  // Mandates: C is a cv-unqualified class type.
  static_assert(!is_const_v<_Container>, "The target container cannot be const-qualified, please remove the const");
  static_assert(
      !is_volatile_v<_Container>, "The target container cannot be volatile-qualified, please remove the volatile");

  // First see if the non-recursive case applies -- the conversion target is either:
  // - a range with a convertible value type;
  // - a non-range type which might support being created from the input argument(s) (e.g. an `optional`).
  if constexpr (__try_non_recursive_conversion<_Container, _Range>) {
    // Case 1 -- construct directly from the given range.
    if constexpr (constructible_from<_Container, _Range, _Args...>) {
      return _Container(std::forward<_Range>(__range), std::forward<_Args>(__args)...);
    }

    // Case 2 -- construct using the `from_range_t` tagged constructor.
    else if constexpr (constructible_from<_Container, from_range_t, _Range, _Args...>) {
      return _Container(from_range, std::forward<_Range>(__range), std::forward<_Args>(__args)...);
    }

    // Case 3 -- construct from a begin-end iterator pair.
    else if constexpr (__constructible_from_iter_pair<_Container, _Range, _Args...>) {
      return _Container(ranges::begin(__range), ranges::end(__range), std::forward<_Args>(__args)...);
    }

    // Case 4 -- default-construct (or construct from the extra arguments) and insert, reserving the size if possible.
    else if constexpr (constructible_from<_Container, _Args...> &&
                       __container_insertable<_Container, range_reference_t<_Range>>) {
      _Container __result(std::forward<_Args>(__args)...);
      if constexpr (sized_range<_Range> && __reservable_container<_Container>) {
        __result.reserve(static_cast<range_size_t<_Container>>(ranges::size(__range)));
      }

      ranges::copy(__range, ranges::__container_inserter<range_reference_t<_Range>>(__result));

      return __result;

    } else {
      static_assert(__always_false<_Container>, "ranges::to: unable to convert to the given container type.");
    }

    // Try the recursive case.
  } else if constexpr (input_range<range_reference_t<_Range>>) {
    return ranges::to<_Container>(
        __range | views::transform([](auto&& __elem) {
          return ranges::to<range_value_t<_Container>>(std::forward<decltype(__elem)>(__elem));
        }),
        std::forward<_Args>(__args)...);

  } else {
    static_assert(__always_false<_Container>, "ranges::to: unable to convert to the given container type.");
  }
}

template <class _Range>
struct __minimal_input_iterator {
  using iterator_category = input_iterator_tag;
  using value_type        = range_value_t<_Range>;
  using difference_type   = ptrdiff_t;
  using pointer           = add_pointer_t<range_reference_t<_Range>>;
  using reference         = range_reference_t<_Range>;

  reference operator*() const;
  pointer operator->() const;
  __minimal_input_iterator& operator++();
  __minimal_input_iterator operator++(int);
  bool operator==(const __minimal_input_iterator&) const;
};

// Deduces the full type of the container from the given template template parameter.
template <template <class...> class _Container, input_range _Range, class... _Args>
struct _Deducer {
  _LIBCPP_HIDE_FROM_ABI static constexpr auto __deduce_func() {
    using _InputIter = __minimal_input_iterator<_Range>;

    // Case 1 -- can construct directly from the given range.
    if constexpr (requires { _Container(std::declval<_Range>(), std::declval<_Args>()...); }) {
      using _Result = decltype( //
          _Container(std::declval<_Range>(), std::declval<_Args>()...));
      return type_identity<_Result>{};

      // Case 2 -- can construct from the given range using the `from_range_t` tagged constructor.
    } else if constexpr ( //
        requires { _Container(from_range, std::declval<_Range>(), std::declval<_Args>()...); }) {
      using _Result = //
          decltype(_Container(from_range, std::declval<_Range>(), std::declval<_Args>()...));
      return type_identity<_Result>{};

      // Case 3 -- can construct from a begin-end iterator pair.
    } else if constexpr ( //
        requires { _Container(std::declval<_InputIter>(), std::declval<_InputIter>(), std::declval<_Args>()...); }) {
      using _Result =
          decltype(_Container(std::declval<_InputIter>(), std::declval<_InputIter>(), std::declval<_Args>()...));
      return type_identity<_Result>{};

    } else {
      static_assert(__always_false<_Range>,
                    "ranges::to: unable to deduce the container type from the template template argument.");
    }
  }

  using type = typename decltype(__deduce_func())::type;
};

// `ranges::to` specialization -- `_Container` is a template template parameter requiring deduction to figure out the
// container element type.
template <template <class...> class _Container, input_range _Range, class... _Args>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto to(_Range&& __range, _Args&&... __args) {
  using _DeduceExpr = typename _Deducer<_Container, _Range, _Args...>::type;
  return ranges::to<_DeduceExpr>(std::forward<_Range>(__range), std::forward<_Args>(__args)...);
}

// Range adaptor closure object 1 -- wrapping the `ranges::to` version where `_Container` is a simple type template
// parameter.
template <class _Container, class... _Args>
  requires(!view<_Container>)
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto to(_Args&&... __args) {
  // Mandates: C is a cv-unqualified class type.
  static_assert(!is_const_v<_Container>, "The target container cannot be const-qualified, please remove the const");
  static_assert(
      !is_volatile_v<_Container>, "The target container cannot be volatile-qualified, please remove the volatile");

  auto __to_func = []<input_range _Range, class... _Tail>(_Range&& __range, _Tail&&... __tail)
    requires requires { //
      /**/ ranges::to<_Container>(std::forward<_Range>(__range), std::forward<_Tail>(__tail)...);
    }
  { return ranges::to<_Container>(std::forward<_Range>(__range), std::forward<_Tail>(__tail)...); };

  return __range_adaptor_closure_t(std::__bind_back(__to_func, std::forward<_Args>(__args)...));
}

// Range adaptor closure object 2 -- wrapping the `ranges::to` version where `_Container` is a template template
// parameter.
template <template <class...> class _Container, class... _Args>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto to(_Args&&... __args) {
  // clang-format off
  auto __to_func = []<input_range _Range, class... _Tail,
                      class _DeducedExpr = typename _Deducer<_Container, _Range, _Tail...>::type>
    (_Range&& __range, _Tail&& ... __tail)
      requires requires { //
      /**/ ranges::to<_DeducedExpr>(std::forward<_Range>(__range), std::forward<_Tail>(__tail)...);
    }
  {
    return ranges::to<_DeducedExpr>(std::forward<_Range>(__range), std::forward<_Tail>(__tail)...);
  };
  // clang-format on

  return __range_adaptor_closure_t(std::__bind_back(__to_func, std::forward<_Args>(__args)...));
}

} // namespace ranges

#endif // _LIBCPP_STD_VER >= 23
# 241 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_TO_H
# 245 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/to.h" 3
#endif /* to.h expanded by -frewrite-includes */
# 413 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/transform_view.h>
#endif /* expanded by -frewrite-includes */
# 413 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 414 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 414 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 415 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* views.h expanded by -frewrite-includes */
#include <__ranges/views.h>
#else /* views.h expanded by -frewrite-includes */
# 415 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/views.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_VIEWS
#define _LIBCPP___RANGES_VIEWS

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/views.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/views.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/views.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/views.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/views.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/views.h" 3

namespace ranges {

namespace views { }

} // namespace ranges

namespace views = ranges::views;

#endif // _LIBCPP_STD_VER >= 20
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/views.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_VIEWS
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/views.h" 3
#endif /* views.h expanded by -frewrite-includes */
# 416 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* zip_view.h expanded by -frewrite-includes */
#include <__ranges/zip_view.h>
#else /* zip_view.h expanded by -frewrite-includes */
# 416 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_ZIP_VIEW_H
#define _LIBCPP___RANGES_ZIP_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_min.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/three_way_comparable.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/equality_comparable.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iter_swap.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/all.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/empty_view.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/enable_borrowed_range.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/integer_sequence.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3

namespace ranges {

template <class... _Ranges>
concept __zip_is_common = (sizeof...(_Ranges) == 1 && (common_range<_Ranges> && ...)) ||
                          (!(bidirectional_range<_Ranges> && ...) && (common_range<_Ranges> && ...)) ||
                          ((random_access_range<_Ranges> && ...) && (sized_range<_Ranges> && ...));

template <typename _Tp, typename _Up>
auto __tuple_or_pair_test() -> pair<_Tp, _Up>;

template <typename... _Types>
  requires(sizeof...(_Types) != 2)
auto __tuple_or_pair_test() -> tuple<_Types...>;

template <class... _Types>
using __tuple_or_pair = decltype(__tuple_or_pair_test<_Types...>());

template <class _Fun, class _Tuple>
_LIBCPP_HIDE_FROM_ABI constexpr auto __tuple_transform(_Fun&& __f, _Tuple&& __tuple) {
  return std::apply(
      [&]<class... _Types>(_Types&&... __elements) {
        return __tuple_or_pair<invoke_result_t<_Fun&, _Types>...>(
            std::invoke(__f, std::forward<_Types>(__elements))...);
      },
      std::forward<_Tuple>(__tuple));
}

template <class _Fun, class _Tuple>
_LIBCPP_HIDE_FROM_ABI constexpr void __tuple_for_each(_Fun&& __f, _Tuple&& __tuple) {
  std::apply(
      [&]<class... _Types>(_Types&&... __elements) {
        (static_cast<void>(std::invoke(__f, std::forward<_Types>(__elements))), ...);
      },
      std::forward<_Tuple>(__tuple));
}

template <class _Fun, class _Tuple1, class _Tuple2, size_t... _Indices>
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_or_pair<
    invoke_result_t<_Fun&, typename tuple_element<_Indices, remove_cvref_t<_Tuple1>>::type,
                    typename tuple_element<_Indices, remove_cvref_t<_Tuple2>>::type>...>
__tuple_zip_transform(_Fun&& __f, _Tuple1&& __tuple1, _Tuple2&& __tuple2, index_sequence<_Indices...>) {
  return {std::invoke(__f, std::get<_Indices>(std::forward<_Tuple1>(__tuple1)),
                      std::get<_Indices>(std::forward<_Tuple2>(__tuple2)))...};
}

template <class _Fun, class _Tuple1, class _Tuple2>
_LIBCPP_HIDE_FROM_ABI constexpr auto __tuple_zip_transform(_Fun&& __f, _Tuple1&& __tuple1, _Tuple2&& __tuple2) {
  return ranges::__tuple_zip_transform(__f, std::forward<_Tuple1>(__tuple1), std::forward<_Tuple2>(__tuple2),
                                       std::make_index_sequence<tuple_size<remove_cvref_t<_Tuple1>>::value>());
}

template <class _Fun, class _Tuple1, class _Tuple2, size_t... _Indices>
_LIBCPP_HIDE_FROM_ABI constexpr void __tuple_zip_for_each(_Fun&& __f, _Tuple1&& __tuple1, _Tuple2&& __tuple2,
                                                          index_sequence<_Indices...>) {
  (std::invoke(__f, std::get<_Indices>(std::forward<_Tuple1>(__tuple1)),
               std::get<_Indices>(std::forward<_Tuple2>(__tuple2))),
   ...);
}

template <class _Fun, class _Tuple1, class _Tuple2>
_LIBCPP_HIDE_FROM_ABI constexpr auto __tuple_zip_for_each(_Fun&& __f, _Tuple1&& __tuple1, _Tuple2&& __tuple2) {
  return ranges::__tuple_zip_for_each(__f, std::forward<_Tuple1>(__tuple1), std::forward<_Tuple2>(__tuple2),
                                      std::make_index_sequence<tuple_size<remove_cvref_t<_Tuple1>>::value>());
}

template <class _Tuple1, class _Tuple2>
_LIBCPP_HIDE_FROM_ABI constexpr bool __tuple_any_equals(const _Tuple1& __tuple1, const _Tuple2& __tuple2) {
  const auto __equals = ranges::__tuple_zip_transform(std::equal_to<>(), __tuple1, __tuple2);
  return std::apply([](auto... __bools) { return (__bools || ...); }, __equals);
}

// abs in cstdlib is not constexpr
// TODO : remove __abs once P0533R9 is implemented.
template <class _Tp>
_LIBCPP_HIDE_FROM_ABI constexpr _Tp __abs(_Tp __t) {
  return __t < 0 ? -__t : __t;
}

template <input_range... _Views>
  requires(view<_Views> && ...) && (sizeof...(_Views) > 0)
class zip_view : public view_interface<zip_view<_Views...>> {

  _LIBCPP_NO_UNIQUE_ADDRESS tuple<_Views...> __views_;

  template <bool>
  class __iterator;

  template <bool>
  class __sentinel;

public:
  _LIBCPP_HIDE_FROM_ABI
  zip_view() = default;

  _LIBCPP_HIDE_FROM_ABI
  constexpr explicit zip_view(_Views... __views) : __views_(std::move(__views)...) {}

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto begin()
    requires(!(__simple_view<_Views> && ...)) {
    return __iterator<false>(ranges::__tuple_transform(ranges::begin, __views_));
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto begin() const
    requires(range<const _Views> && ...) {
    return __iterator<true>(ranges::__tuple_transform(ranges::begin, __views_));
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto end()
    requires(!(__simple_view<_Views> && ...)) {
    if constexpr (!__zip_is_common<_Views...>) {
      return __sentinel<false>(ranges::__tuple_transform(ranges::end, __views_));
    } else if constexpr ((random_access_range<_Views> && ...)) {
      return begin() + iter_difference_t<__iterator<false>>(size());
    } else {
      return __iterator<false>(ranges::__tuple_transform(ranges::end, __views_));
    }
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto end() const
    requires(range<const _Views> && ...) {
    if constexpr (!__zip_is_common<const _Views...>) {
      return __sentinel<true>(ranges::__tuple_transform(ranges::end, __views_));
    } else if constexpr ((random_access_range<const _Views> && ...)) {
      return begin() + iter_difference_t<__iterator<true>>(size());
    } else {
      return __iterator<true>(ranges::__tuple_transform(ranges::end, __views_));
    }
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto size()
    requires(sized_range<_Views> && ...) {
    return std::apply(
        [](auto... __sizes) {
          using _CT = make_unsigned_t<common_type_t<decltype(__sizes)...>>;
          return ranges::min({_CT(__sizes)...});
        },
        ranges::__tuple_transform(ranges::size, __views_));
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto size() const
    requires(sized_range<const _Views> && ...) {
    return std::apply(
        [](auto... __sizes) {
          using _CT = make_unsigned_t<common_type_t<decltype(__sizes)...>>;
          return ranges::min({_CT(__sizes)...});
        },
        ranges::__tuple_transform(ranges::size, __views_));
  }
};

template <class... _Ranges>
zip_view(_Ranges&&...) -> zip_view<views::all_t<_Ranges>...>;

template <bool _Const, class... _Views>
concept __zip_all_random_access = (random_access_range<__maybe_const<_Const, _Views>> && ...);

template <bool _Const, class... _Views>
concept __zip_all_bidirectional = (bidirectional_range<__maybe_const<_Const, _Views>> && ...);

template <bool _Const, class... _Views>
concept __zip_all_forward = (forward_range<__maybe_const<_Const, _Views>> && ...);

template <bool _Const, class... _Views>
consteval auto __get_zip_view_iterator_tag() {
  if constexpr (__zip_all_random_access<_Const, _Views...>) {
    return random_access_iterator_tag();
  } else if constexpr (__zip_all_bidirectional<_Const, _Views...>) {
    return bidirectional_iterator_tag();
  } else if constexpr (__zip_all_forward<_Const, _Views...>) {
    return forward_iterator_tag();
  } else {
    return input_iterator_tag();
  }
}

template <bool _Const, class... _Views>
struct __zip_view_iterator_category_base {};

template <bool _Const, class... _Views>
  requires __zip_all_forward<_Const, _Views...>
struct __zip_view_iterator_category_base<_Const, _Views...> {
  using iterator_category = input_iterator_tag;
};

template <input_range... _Views>
  requires(view<_Views> && ...) && (sizeof...(_Views) > 0)
template <bool _Const>
class zip_view<_Views...>::__iterator : public __zip_view_iterator_category_base<_Const, _Views...> {

  __tuple_or_pair<iterator_t<__maybe_const<_Const, _Views>>...> __current_;

  _LIBCPP_HIDE_FROM_ABI
  constexpr explicit __iterator(__tuple_or_pair<iterator_t<__maybe_const<_Const, _Views>>...> __current)
      : __current_(std::move(__current)) {}

  template <bool>
  friend class zip_view<_Views...>::__iterator;

  template <bool>
  friend class zip_view<_Views...>::__sentinel;

  friend class zip_view<_Views...>;

public:
  using iterator_concept = decltype(__get_zip_view_iterator_tag<_Const, _Views...>());
  using value_type = __tuple_or_pair<range_value_t<__maybe_const<_Const, _Views>>...>;
  using difference_type = common_type_t<range_difference_t<__maybe_const<_Const, _Views>>...>;

  _LIBCPP_HIDE_FROM_ABI
  __iterator() = default;

  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator(__iterator<!_Const> __i)
    requires _Const && (convertible_to<iterator_t<_Views>, iterator_t<__maybe_const<_Const, _Views>>> && ...)
  : __current_(std::move(__i.__current_)) {}

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator*() const {
    return ranges::__tuple_transform([](auto& __i) -> decltype(auto) { return *__i; }, __current_);
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator& operator++() {
    ranges::__tuple_for_each([](auto& __i) { ++__i; }, __current_);
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr void operator++(int) { ++*this; }

  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator operator++(int)
    requires __zip_all_forward<_Const, _Views...> {
    auto __tmp = *this;
    ++*this;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator& operator--()
    requires __zip_all_bidirectional<_Const, _Views...> {
    ranges::__tuple_for_each([](auto& __i) { --__i; }, __current_);
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator operator--(int)
    requires __zip_all_bidirectional<_Const, _Views...> {
    auto __tmp = *this;
    --*this;
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator& operator+=(difference_type __x)
    requires __zip_all_random_access<_Const, _Views...> {
    ranges::__tuple_for_each([&]<class _Iter>(_Iter& __i) { __i += iter_difference_t<_Iter>(__x); }, __current_);
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr __iterator& operator-=(difference_type __x)
    requires __zip_all_random_access<_Const, _Views...> {
    ranges::__tuple_for_each([&]<class _Iter>(_Iter& __i) { __i -= iter_difference_t<_Iter>(__x); }, __current_);
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI
  constexpr auto operator[](difference_type __n) const
    requires __zip_all_random_access<_Const, _Views...> {
    return ranges::__tuple_transform(
        [&]<class _Iter>(_Iter& __i) -> decltype(auto) { return __i[iter_difference_t<_Iter>(__n)]; }, __current_);
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator==(const __iterator& __x, const __iterator& __y)
    requires(equality_comparable<iterator_t<__maybe_const<_Const, _Views>>> && ...) {
    if constexpr (__zip_all_bidirectional<_Const, _Views...>) {
      return __x.__current_ == __y.__current_;
    } else {
      return ranges::__tuple_any_equals(__x.__current_, __y.__current_);
    }
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator<(const __iterator& __x, const __iterator& __y)
    requires __zip_all_random_access<_Const, _Views...> {
    return __x.__current_ < __y.__current_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator>(const __iterator& __x, const __iterator& __y)
    requires __zip_all_random_access<_Const, _Views...> {
    return __y < __x;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator<=(const __iterator& __x, const __iterator& __y)
    requires __zip_all_random_access<_Const, _Views...> {
    return !(__y < __x);
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr bool operator>=(const __iterator& __x, const __iterator& __y)
    requires __zip_all_random_access<_Const, _Views...> {
    return !(__x < __y);
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr auto operator<=>(const __iterator& __x, const __iterator& __y)
    requires __zip_all_random_access<_Const, _Views...> &&
             (three_way_comparable<iterator_t<__maybe_const<_Const, _Views>>> && ...) {
    return __x.__current_ <=> __y.__current_;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr __iterator operator+(const __iterator& __i, difference_type __n)
    requires __zip_all_random_access<_Const, _Views...> {
    auto __r = __i;
    __r += __n;
    return __r;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr __iterator operator+(difference_type __n, const __iterator& __i)
    requires __zip_all_random_access<_Const, _Views...> {
    return __i + __n;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr __iterator operator-(const __iterator& __i, difference_type __n)
    requires __zip_all_random_access<_Const, _Views...> {
    auto __r = __i;
    __r -= __n;
    return __r;
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr difference_type operator-(const __iterator& __x, const __iterator& __y)
    requires(sized_sentinel_for<iterator_t<__maybe_const<_Const, _Views>>, iterator_t<__maybe_const<_Const, _Views>>> &&
             ...) {
    const auto __diffs = ranges::__tuple_zip_transform(minus<>(), __x.__current_, __y.__current_);
    return std::apply(
        [](auto... __ds) {
          return ranges::min({difference_type(__ds)...},
                             [](auto __a, auto __b) { return ranges::__abs(__a) < ranges::__abs(__b); });
        },
        __diffs);
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr auto iter_move(const __iterator& __i) noexcept(
      (noexcept(ranges::iter_move(std::declval<const iterator_t<__maybe_const<_Const, _Views>>&>())) && ...) &&
      (is_nothrow_move_constructible_v<range_rvalue_reference_t<__maybe_const<_Const, _Views>>> && ...)) {
    return ranges::__tuple_transform(ranges::iter_move, __i.__current_);
  }

  _LIBCPP_HIDE_FROM_ABI
  friend constexpr void iter_swap(const __iterator& __l, const __iterator& __r) noexcept(
      (noexcept(ranges::iter_swap(std::declval<const iterator_t<__maybe_const<_Const, _Views>>&>(),
                                  std::declval<const iterator_t<__maybe_const<_Const, _Views>>&>())) &&
       ...))
    requires(indirectly_swappable<iterator_t<__maybe_const<_Const, _Views>>> && ...) {
    ranges::__tuple_zip_for_each(ranges::iter_swap, __l.__current_, __r.__current_);
  }
};

template <input_range... _Views>
  requires(view<_Views> && ...) && (sizeof...(_Views) > 0)
template <bool _Const>
class zip_view<_Views...>::__sentinel {

  __tuple_or_pair<sentinel_t<__maybe_const<_Const, _Views>>...> __end_;

  _LIBCPP_HIDE_FROM_ABI
  constexpr explicit __sentinel(__tuple_or_pair<sentinel_t<__maybe_const<_Const, _Views>>...> __end) : __end_(__end) {}

  friend class zip_view<_Views...>;

  // hidden friend cannot access private member of iterator because they are friends of friends
  template <bool _OtherConst>
  _LIBCPP_HIDE_FROM_ABI static constexpr decltype(auto)
  __iter_current(zip_view<_Views...>::__iterator<_OtherConst> const& __it) {
    return (__it.__current_);
  }

public:
  _LIBCPP_HIDE_FROM_ABI
  __sentinel() = default;

  _LIBCPP_HIDE_FROM_ABI
  constexpr __sentinel(__sentinel<!_Const> __i)
    requires _Const && (convertible_to<sentinel_t<_Views>, sentinel_t<__maybe_const<_Const, _Views>>> && ...)
  : __end_(std::move(__i.__end_)) {}

  template <bool _OtherConst>
    requires(sentinel_for<sentinel_t<__maybe_const<_Const, _Views>>, iterator_t<__maybe_const<_OtherConst, _Views>>> &&
             ...)
  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const __iterator<_OtherConst>& __x, const __sentinel& __y) {
    return ranges::__tuple_any_equals(__iter_current(__x), __y.__end_);
  }

  template <bool _OtherConst>
    requires(
        sized_sentinel_for<sentinel_t<__maybe_const<_Const, _Views>>, iterator_t<__maybe_const<_OtherConst, _Views>>> &&
        ...)
  _LIBCPP_HIDE_FROM_ABI friend constexpr common_type_t<range_difference_t<__maybe_const<_OtherConst, _Views>>...>
  operator-(const __iterator<_OtherConst>& __x, const __sentinel& __y) {
    const auto __diffs = ranges::__tuple_zip_transform(minus<>(), __iter_current(__x), __y.__end_);
    return std::apply(
        [](auto... __ds) {
          using _Diff = common_type_t<range_difference_t<__maybe_const<_OtherConst, _Views>>...>;
          return ranges::min({_Diff(__ds)...},
                             [](auto __a, auto __b) { return ranges::__abs(__a) < ranges::__abs(__b); });
        },
        __diffs);
  }

  template <bool _OtherConst>
    requires(
        sized_sentinel_for<sentinel_t<__maybe_const<_Const, _Views>>, iterator_t<__maybe_const<_OtherConst, _Views>>> &&
        ...)
  _LIBCPP_HIDE_FROM_ABI friend constexpr common_type_t<range_difference_t<__maybe_const<_OtherConst, _Views>>...>
  operator-(const __sentinel& __y, const __iterator<_OtherConst>& __x) {
    return -(__x - __y);
  }
};

template <class... _Views>
inline constexpr bool enable_borrowed_range<zip_view<_Views...>> = (enable_borrowed_range<_Views> && ...);

namespace views {
namespace __zip {

struct __fn {
  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()() const noexcept { return empty_view<tuple<>>{}; }

  template <class... _Ranges>
  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Ranges&&... __rs) const
      noexcept(noexcept(zip_view<all_t<_Ranges&&>...>(std::forward<_Ranges>(__rs)...)))
          -> decltype(zip_view<all_t<_Ranges&&>...>(std::forward<_Ranges>(__rs)...)) {
    return zip_view<all_t<_Ranges>...>(std::forward<_Ranges>(__rs)...);
  }
};

} // namespace __zip
inline namespace __cpo {
  inline constexpr auto zip = __zip::__fn{};
} // namespace __cpo
} // namespace views
} // namespace ranges

#endif // _LIBCPP_STD_VER >= 23
# 511 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___RANGES_ZIP_VIEW_H
# 517 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/zip_view.h" 3
#endif /* zip_view.h expanded by -frewrite-includes */
# 417 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 417 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 418 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 420 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* istream_view.h expanded by -frewrite-includes */
#include <__ranges/istream_view.h>
#else /* istream_view.h expanded by -frewrite-includes */
# 420 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_ISTREAM_VIEW_H
#define _LIBCPP___RANGES_ISTREAM_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/constructible.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/derived_from.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/movable.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/default_sentinel.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/view_interface.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace ranges {

template <class _Val, class _CharT, class _Traits>
concept __stream_extractable = requires(basic_istream<_CharT, _Traits>& __is, _Val& __t) { __is >> __t; };

template <movable _Val, class _CharT, class _Traits = char_traits<_CharT>>
  requires default_initializable<_Val> && __stream_extractable<_Val, _CharT, _Traits>
class basic_istream_view : public view_interface<basic_istream_view<_Val, _CharT, _Traits>> {
  class __iterator;

public:
  _LIBCPP_HIDE_FROM_ABI constexpr explicit basic_istream_view(basic_istream<_CharT, _Traits>& __stream)
      : __stream_(std::addressof(__stream)) {}

  _LIBCPP_HIDE_FROM_ABI constexpr auto begin() {
    *__stream_ >> __value_;
    return __iterator{*this};
  }

  _LIBCPP_HIDE_FROM_ABI constexpr default_sentinel_t end() const noexcept { return default_sentinel; }

private:
  basic_istream<_CharT, _Traits>* __stream_;
  _LIBCPP_NO_UNIQUE_ADDRESS _Val __value_ = _Val();
};

template <movable _Val, class _CharT, class _Traits>
  requires default_initializable<_Val> && __stream_extractable<_Val, _CharT, _Traits>
class basic_istream_view<_Val, _CharT, _Traits>::__iterator {
public:
  using iterator_concept = input_iterator_tag;
  using difference_type  = ptrdiff_t;
  using value_type       = _Val;

  _LIBCPP_HIDE_FROM_ABI constexpr explicit __iterator(
      basic_istream_view<_Val, _CharT, _Traits>& __parent) noexcept
      : __parent_(std::addressof(__parent)) {}

  __iterator(const __iterator&)                  = delete;
  _LIBCPP_HIDE_FROM_ABI __iterator(__iterator&&) = default;

  __iterator& operator=(const __iterator&)                  = delete;
  _LIBCPP_HIDE_FROM_ABI __iterator& operator=(__iterator&&) = default;

  _LIBCPP_HIDE_FROM_ABI __iterator& operator++() {
    *__parent_->__stream_ >> __parent_->__value_;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI void operator++(int) { ++*this; }

  _LIBCPP_HIDE_FROM_ABI _Val& operator*() const { return __parent_->__value_; }

  _LIBCPP_HIDE_FROM_ABI friend bool operator==(const __iterator& __x, default_sentinel_t) {
    return !*__x.__get_parent_stream();
  }

private:
  basic_istream_view<_Val, _CharT, _Traits>* __parent_;

  _LIBCPP_HIDE_FROM_ABI constexpr basic_istream<_CharT, _Traits>* __get_parent_stream() const {
    return __parent_->__stream_;
  }
};

template <class _Val>
using istream_view = basic_istream_view<_Val, char>;

#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <class _Val>
using wistream_view = basic_istream_view<_Val, wchar_t>;
#  endif
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3

namespace views {
namespace __istream {

// clang-format off
template <class _Tp>
struct __fn {
  template <class _Up, class _UnCVRef = remove_cvref_t<_Up>>
    requires derived_from<_UnCVRef, basic_istream<typename _UnCVRef::char_type,
                                                  typename _UnCVRef::traits_type>>
  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Up&& __u) const
    noexcept(noexcept(basic_istream_view<_Tp, typename _UnCVRef::char_type,
                                              typename _UnCVRef::traits_type>(std::forward<_Up>(__u))))
    -> decltype(      basic_istream_view<_Tp, typename _UnCVRef::char_type,
                                              typename _UnCVRef::traits_type>(std::forward<_Up>(__u)))
    {   return        basic_istream_view<_Tp, typename _UnCVRef::char_type,
                                              typename _UnCVRef::traits_type>(std::forward<_Up>(__u));
    }
};
// clang-format on

} // namespace __istream

inline namespace __cpo {
template <class _Tp>
inline constexpr auto istream = __istream::__fn<_Tp>{};
} // namespace __cpo
} // namespace views

} // namespace ranges

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 20
# 140 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3

#endif // _LIBCPP___RANGES_ISTREAM_VIEW_H
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/istream_view.h" 3
#endif /* istream_view.h expanded by -frewrite-includes */
# 421 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 2 3
#endif
# 422 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3

// standard-mandated includes

// [ranges.syn]
#if 0 /* expanded by -frewrite-includes */
#include <compare>
#endif /* expanded by -frewrite-includes */
# 426 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 427 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 427 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 428 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#include <iterator>
#endif /* expanded by -frewrite-includes */
# 428 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 429 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3

// [tuple.helper]
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_element.h>
#endif /* expanded by -frewrite-includes */
# 431 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 432 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_size.h>
#endif /* expanded by -frewrite-includes */
# 432 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 433 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 435 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 436 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#endif
# 437 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 439 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 439 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 440 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 440 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
# 441 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#endif
# 442 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3

#endif // _LIBCPP_RANGES
# 444 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ranges" 3
#endif /* ranges expanded by -frewrite-includes */
# 12 "../../sdk/lib/ld/include/lib/ld/internal/filter-view.h" 2

namespace ld::internal {

#if 0 /* disabled by -frewrite-includes */
#if __cpp_lib_ranges >= 201911L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 16 "../../sdk/lib/ld/include/lib/ld/internal/filter-view.h"

using std::ranges::filter_view;

#else
# 20 "../../sdk/lib/ld/include/lib/ld/internal/filter-view.h"

// only std::ranges::find_if will use std::invoke, so we just write this ourselves.
template <class It, typename Pred>
It find_if(It begin, It end, Pred pred) {
  for (; begin != end; ++begin) {
    if (std::invoke(pred, *begin)) {
      return begin;
    }
  }
  return end;
}

template <class Range, typename Pred>
class filter_view {
 public:
  using value_type = typename Range::value_type;

  filter_view(Range range, Pred pred) : range_{std::move(range)}, filter_{pred} {}

  template <class Iter>
  class filter_iterator : public std::iterator_traits<Iter> {
   public:
    using difference_type = ptrdiff_t;
    using value_type = std::remove_reference_t<decltype(*std::declval<Iter>())>;
    using reference = value_type&;
    using iterator_category = std::conditional_t<
        std::is_base_of_v<std::bidirectional_iterator_tag,
                          typename std::iterator_traits<Iter>::iterator_category>,
        std::bidirectional_iterator_tag, std::forward_iterator_tag>;

    filter_iterator(filter_view& parent, Iter iter) : iter_{iter}, parent_{parent} {}
    filter_iterator(const filter_iterator&) = default;

    filter_iterator& operator++() {
      iter_ = find_if(++iter_, parent_.range_.end(), parent_.filter_);
      return *this;
    }

    filter_iterator operator++(int) {
      filter_iterator old = *this;
      ++*this;
      return old;
    }

    template <bool BiDir = std::is_same_v<iterator_category, std::bidirectional_iterator_tag>,
              typename = std::enable_if_t<BiDir>>
    filter_iterator& operator--() {
      while (!std::invoke(parent_.filter_, *--iter_))
        ;
      return *this;
    }
    template <bool BiDir = std::is_same_v<iterator_category, std::bidirectional_iterator_tag>,
              typename = std::enable_if_t<BiDir>>
    filter_iterator operator--(int) {
      filter_iterator old = *this;
      --*this;
      return old;
    }

    bool operator==(const filter_iterator& other) const { return iter_ == other.iter_; }
    bool operator!=(const filter_iterator& other) const { return iter_ != other.iter_; }

    auto& operator*() { return *iter_; }
    auto* operator->() { return iter_.operator->(); }

   private:
    Iter iter_;
    filter_view& parent_;
  };

  template <class Iter>
  filter_iterator(const filter_view&, Iter) -> filter_iterator<Iter>;

  using iterator = filter_iterator<typename Range::iterator>;

  iterator begin() { return {*this, find_if(range_.begin(), range_.end(), filter_)}; }
  iterator end() { return {*this, range_.end()}; }

 private:
  Range range_;
  [[no_unique_address]] Pred filter_;
};

#endif
# 104 "../../sdk/lib/ld/include/lib/ld/internal/filter-view.h"

}  // namespace ld::internal

#endif  // LIB_LD_INTERNAL_FILTER_VIEW_H_
# 108 "../../sdk/lib/ld/include/lib/ld/internal/filter-view.h"
#endif /* filter-view.h expanded by -frewrite-includes */
# 7 "../../sdk/lib/ld/test/filter-view-tests.cc" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) /* module.h expanded by -frewrite-includes */
#include <lib/ld/module.h>
#else /* module.h expanded by -frewrite-includes */
# 7 "../../sdk/lib/ld/test/filter-view-tests.cc"
# 1 "../../sdk/lib/ld/include/lib/ld/module.h" 1
// Copyright 2023 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIB_LD_MODULE_H_
#define LIB_LD_MODULE_H_

#if defined(__CLANG_REWRITTEN_INCLUDES) /* init-fini.h expanded by -frewrite-includes */
#include <lib/elfldltl/init-fini.h>
#else /* init-fini.h expanded by -frewrite-includes */
# 8 "../../sdk/lib/ld/include/lib/ld/module.h"
# 1 "../../src/lib/elfldltl/include/lib/elfldltl/init-fini.h" 1
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_INIT_FINI_H_
#define SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_INIT_FINI_H_

#if defined(__CLANG_REWRITTEN_INCLUDES) /* span.h expanded by -frewrite-includes */
#include <lib/stdcompat/span.h>
#else /* span.h expanded by -frewrite-includes */
# 8 "../../src/lib/elfldltl/include/lib/elfldltl/init-fini.h"
# 1 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h" 1
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIB_STDCOMPAT_SPAN_H_
#define LIB_STDCOMPAT_SPAN_H_

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cassert expanded by -frewrite-includes */
#include <cassert>
#else /* cassert expanded by -frewrite-includes */
# 8 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

/*
    cassert synopsis

Macros:

    assert

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3

// <assert.h> is not provided by libc++
#if 0 /* disabled by -frewrite-includes */
#if __has_include(<assert.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* assert.h expanded by -frewrite-includes */
#  include <assert.h>
#else /* assert.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
# 1 "gen/zircon/public/sysroot/cpp/include/assert.h" 1 3 4
#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 1 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
# 2 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

#undef assert

#ifdef NDEBUG
#define assert(x) (void)0
#else
# 8 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__), 0)))
#endif
# 10 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus) && !defined(static_assert)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 12 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
#define static_assert _Static_assert
#endif
# 14 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

#ifdef __cplusplus
extern "C" {
#endif
# 18 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

void __assert_fail(const char*, const char*, int, const char*);

#ifdef __cplusplus
}
#endif
# 24 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
#endif /* assert.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 2 3
#  ifdef _LIBCPP_ASSERT_H
#    error "If libc++ starts defining <assert.h>, the __has_include check should move to libc++'s <assert.h>"
#  endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#endif /* cassert expanded by -frewrite-includes */
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"
# 10 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 10 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"
# 11 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) /* cstddef.h expanded by -frewrite-includes */
#include "cstddef.h"
#else /* cstddef.h expanded by -frewrite-includes */
# 12 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"
# 1 "../../sdk/lib/stdcompat/include/lib/stdcompat/cstddef.h" 1
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIB_STDCOMPAT_CSTDDEF_H_
#define LIB_STDCOMPAT_CSTDDEF_H_

#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 8 "../../sdk/lib/stdcompat/include/lib/stdcompat/cstddef.h"
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/cstddef.h"
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/cstddef.h"
# 10 "../../sdk/lib/stdcompat/include/lib/stdcompat/cstddef.h"

#if 0 /* expanded by -frewrite-includes */
#include "version.h"
#endif /* expanded by -frewrite-includes */
# 11 "../../sdk/lib/stdcompat/include/lib/stdcompat/cstddef.h"
# 12 "../../sdk/lib/stdcompat/include/lib/stdcompat/cstddef.h"

namespace cpp17 {

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../sdk/lib/stdcompat/include/lib/stdcompat/cstddef.h"

using std::byte;
using std::operator<<=;
using std::operator<<;
using std::operator>>=;
using std::operator>>;
using std::operator|=;
using std::operator|;
using std::operator&=;
using std::operator&;
using std::operator^=;
using std::operator^;
using std::operator~;
using std::to_integer;

#else  // Provide polyfill for byte and related functions.
# 32 "../../sdk/lib/stdcompat/include/lib/stdcompat/cstddef.h"

enum class byte : unsigned char {};

template <class IntegerType>
constexpr std::enable_if_t<std::is_integral<IntegerType>::value, byte> operator>>(
    byte b, IntegerType shift) noexcept {
  return static_cast<cpp17::byte>(static_cast<unsigned char>(b) >> shift);
}

template <class IntegerType>
constexpr std::enable_if_t<std::is_integral<IntegerType>::value, byte&> operator>>=(
    byte& b, IntegerType shift) noexcept {
  return b = b >> shift;
}

template <class IntegerType>
constexpr std::enable_if_t<std::is_integral<IntegerType>::value, byte> operator<<(
    byte b, IntegerType shift) noexcept {
  return static_cast<cpp17::byte>(static_cast<unsigned char>(b) << shift);
}

template <class IntegerType>
constexpr std::enable_if_t<std::is_integral<IntegerType>::value, byte&> operator<<=(
    byte& b, IntegerType shift) noexcept {
  return b = b << shift;
}

constexpr byte operator|(byte l, byte r) noexcept {
  return static_cast<byte>(static_cast<unsigned char>(l) | static_cast<unsigned char>(r));
}

constexpr byte& operator|=(byte& l, byte r) noexcept { return l = l | r; }

constexpr byte operator&(byte l, byte r) noexcept {
  return static_cast<byte>(static_cast<unsigned char>(l) & static_cast<unsigned char>(r));
}

constexpr byte& operator&=(byte& l, byte r) noexcept { return l = l & r; }

constexpr byte operator^(byte l, byte r) noexcept {
  return static_cast<byte>(static_cast<unsigned char>(l) ^ static_cast<unsigned char>(r));
}

constexpr byte& operator^=(byte& l, byte r) noexcept { return l = l ^ r; }

constexpr byte operator~(byte b) noexcept {
  return static_cast<byte>(~static_cast<unsigned char>(b));
}

template <typename IntegerType>
constexpr std::enable_if_t<std::is_integral<IntegerType>::value, IntegerType> to_integer(
    byte b) noexcept {
  return static_cast<IntegerType>(b);
}

#endif  // __cpp_lib_byte >= 201603L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 88 "../../sdk/lib/stdcompat/include/lib/stdcompat/cstddef.h"

}  // namespace cpp17

#endif  // LIB_STDCOMPAT_CSTDDEF_H_
# 92 "../../sdk/lib/stdcompat/include/lib/stdcompat/cstddef.h"
#endif /* cstddef.h expanded by -frewrite-includes */
# 13 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) /* iterator.h expanded by -frewrite-includes */
#include "iterator.h"
#else /* iterator.h expanded by -frewrite-includes */
# 13 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"
# 1 "../../sdk/lib/stdcompat/include/lib/stdcompat/iterator.h" 1
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIB_STDCOMPAT_ITERATOR_H_
#define LIB_STDCOMPAT_ITERATOR_H_

#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 8 "../../sdk/lib/stdcompat/include/lib/stdcompat/iterator.h"
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/iterator.h"
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/iterator.h"
# 10 "../../sdk/lib/stdcompat/include/lib/stdcompat/iterator.h"
#if 0 /* expanded by -frewrite-includes */
#include <iterator>
#endif /* expanded by -frewrite-includes */
# 10 "../../sdk/lib/stdcompat/include/lib/stdcompat/iterator.h"
# 11 "../../sdk/lib/stdcompat/include/lib/stdcompat/iterator.h"

#if 0 /* expanded by -frewrite-includes */
#include "version.h"
#endif /* expanded by -frewrite-includes */
# 12 "../../sdk/lib/stdcompat/include/lib/stdcompat/iterator.h"
# 13 "../../sdk/lib/stdcompat/include/lib/stdcompat/iterator.h"

namespace cpp17 {

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_nonmember_container_access) && \
    __cpp_lib_nonmember_container_access >= 201411L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../sdk/lib/stdcompat/include/lib/stdcompat/iterator.h"

using std::data;
using std::size;

#else  // Polyfill for data, size.
# 23 "../../sdk/lib/stdcompat/include/lib/stdcompat/iterator.h"

template <typename C>
constexpr auto data(C& c) -> decltype(c.data()) {
  return c.data();
}

template <typename C>
constexpr auto data(const C& c) -> decltype(c.data()) {
  return c.data();
}

template <typename T, std::size_t N>
constexpr T* data(T (&array)[N]) {
  return array;
}

template <typename E>
constexpr const E* data(std::initializer_list<E> il) noexcept {
  return il.begin();
}

template <typename C>
constexpr auto size(const C& c) -> decltype(c.size()) {
  return c.size();
}

template <typename T, std::size_t N>
constexpr std::size_t size(const T (&array)[N]) {
  return N;
}

#endif
# 55 "../../sdk/lib/stdcompat/include/lib/stdcompat/iterator.h"

}  // namespace cpp17

#endif  // LIB_STDCOMPAT_ITERATOR_H_
# 59 "../../sdk/lib/stdcompat/include/lib/stdcompat/iterator.h"
#endif /* iterator.h expanded by -frewrite-includes */
# 14 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "memory.h"
#endif /* expanded by -frewrite-includes */
# 14 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"
# 15 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"
#if 0 /* expanded by -frewrite-includes */
#include "version.h"
#endif /* expanded by -frewrite-includes */
# 15 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"
# 16 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_span) && __cpp_lib_span >= 202002L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"

#if 0 /* expanded by -frewrite-includes */
#include <span>
#endif /* expanded by -frewrite-includes */
# 19 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"
# 20 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"

namespace cpp20 {

using std::dynamic_extent;
using std::span;

using std::as_bytes;
using std::as_writable_bytes;

}  // namespace cpp20

#else  // Provide span polyfill.
# 32 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) /* span.h expanded by -frewrite-includes */
#include "internal/span.h"
#else /* span.h expanded by -frewrite-includes */
# 33 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"
# 1 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h" 1
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIB_STDCOMPAT_INTERNAL_SPAN_H_
#define LIB_STDCOMPAT_INTERNAL_SPAN_H_

#if 0 /* expanded by -frewrite-includes */
#include <array>
#endif /* expanded by -frewrite-includes */
# 8 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 9 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
# 10 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
#if 0 /* expanded by -frewrite-includes */
#include <iterator>
#endif /* expanded by -frewrite-includes */
# 10 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
# 11 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 11 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
# 12 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 12 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
# 13 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
#if 0 /* expanded by -frewrite-includes */
#include <utility>
#endif /* expanded by -frewrite-includes */
# 13 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
# 14 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_span) && __cpp_lib_span >= 202002L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 16 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
#if 0 /* expanded by -frewrite-includes */
#include <span>
#endif /* expanded by -frewrite-includes */
# 16 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
# 17 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
#endif  // __cpp_lib_span >= 202002L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 18 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"

#if 0 /* expanded by -frewrite-includes */
#include "../iterator.h"
#endif /* expanded by -frewrite-includes */
# 19 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
# 20 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
#if 0 /* expanded by -frewrite-includes */
#include "../type_traits.h"
#endif /* expanded by -frewrite-includes */
# 20 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
# 21 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
#if 0 /* expanded by -frewrite-includes */
#include "utility.h"
#endif /* expanded by -frewrite-includes */
# 21 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
# 22 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"

namespace cpp20 {
namespace internal {

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_inline_variables) && __cpp_inline_variables >= 201606L && \
    !defined(LIB_STDCOMPAT_NO_INLINE_VARIABLES)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"

static constexpr inline std::size_t dynamic_extent = std::numeric_limits<std::size_t>::max();

#else
# 32 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"

struct dynamic_extent_tag {};

// define dynamic extent.
static constexpr const std::size_t& dynamic_extent =
    cpp17::internal::inline_storage<dynamic_extent_tag, std::size_t,
                                    std::numeric_limits<std::size_t>::max()>::storage;

#endif
# 41 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"

// Specialization for different extent types, simplifies span implementation and duplication.
template <typename T, std::size_t Extent>
class extent {
 public:
  explicit constexpr extent(T* data, std::size_t) : data_(data) {}
  constexpr T* data() const { return data_; }
  constexpr std::size_t size() const { return Extent; }

 private:
  T* data_;
};

template <typename T>
class extent<T, dynamic_extent> {
 public:
  explicit constexpr extent(T* data, std::size_t size) : data_(data), size_(size) {}
  constexpr T* data() const { return data_; }
  constexpr std::size_t size() const { return size_; }

 private:
  T* data_;
  std::size_t size_;
};

// Iterator implementation that hides the pointer-based implementation behind an opaque type.
template <typename T>
class span_iterator {
 public:
  using difference_type = ptrdiff_t;
  using value_type = std::remove_cv_t<T>;
  using pointer = T*;
  using reference = T&;
  using iterator_category = std::random_access_iterator_tag;

  constexpr explicit span_iterator() : span_iterator(nullptr) {}
  constexpr explicit span_iterator(T* t) : ptr_(t) {}

  constexpr span_iterator(const span_iterator<T>& other) : ptr_(other.ptr_) {}
  constexpr span_iterator(span_iterator<T>&& other) noexcept : ptr_(other.ptr_) {}

  span_iterator& operator=(span_iterator<T> other) {
    if (this != &other) {
      ptr_ = other.ptr_;
    }
    return *this;
  }

  // Allow implicit conversion of span_iterator<V> to span_iterator<const V>.
  // NOLINTNEXTLINE(google-explicit-constructor)
  constexpr operator span_iterator<const T>() const {
    return span_iterator<const T>(static_cast<const T*>(ptr_));
  }

  constexpr reference operator*() const { return *ptr_; }
  constexpr pointer operator->() const { return ptr_; }
  constexpr reference operator[](difference_type offset) { return *(ptr_ + offset); }

  constexpr bool operator==(span_iterator<T> other) const { return ptr_ == other.ptr_; }
  constexpr bool operator!=(span_iterator<T> other) const { return ptr_ != other.ptr_; }
  constexpr bool operator<(span_iterator<T> other) const { return ptr_ < other.ptr_; }
  constexpr bool operator<=(span_iterator<T> other) const { return ptr_ <= other.ptr_; }
  constexpr bool operator>(span_iterator<T> other) const { return ptr_ > other.ptr_; }
  constexpr bool operator>=(span_iterator<T> other) const { return ptr_ >= other.ptr_; }

  constexpr span_iterator<T>& operator++() {
    ptr_ += 1;
    return *this;
  }
  constexpr span_iterator<T> operator++(int) {
    span_iterator<T> before = *this;
    ++(*this);
    return before;
  }
  constexpr span_iterator<T>& operator--() {
    ptr_ -= 1;
    return *this;
  }
  constexpr span_iterator<T>& operator--(int) {
    *this -= 1;
    return *this;
  }
  constexpr span_iterator<T> operator+=(difference_type n) {
    ptr_ += n;
    return *this;
  }
  constexpr span_iterator<T> operator-=(difference_type n) {
    ptr_ -= n;
    return *this;
  }
  constexpr span_iterator<T> operator-(difference_type n) const { return span_iterator(ptr_ - n); }
  constexpr span_iterator<T> operator+(difference_type n) const { return span_iterator(ptr_ + n); }

  constexpr difference_type operator-(span_iterator<T> other) { return ptr_ - other.ptr_; }

 private:
  T* ptr_;
};

}  // namespace internal

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_lib_span) && __cpp_lib_span >= 202002L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"

using std::span;

#else  // Provide forward declaration for traits below
# 147 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"

template <typename T, std::size_t Extent>
class span;

#endif  // __cpp_lib_span >= 202002L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 152 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"

namespace internal {

template <class T>
struct is_span_internal : std::false_type {};

template <class T, std::size_t Extent>
struct is_span_internal<span<T, Extent>> : std::true_type {};

template <class T>
struct is_span : is_span_internal<std::remove_cv_t<T>> {};

template <class T>
struct is_array_internal : std::is_array<T> {};

template <class T, std::size_t S>
struct is_array_internal<std::array<T, S>> : std::true_type {};

template <typename T, typename U>
using is_qualification_conversion = std::is_convertible<T (*)[], U (*)[]>;

template <class T>
struct is_array_type : is_array_internal<std::remove_cv_t<T>> {};

template <typename T, typename ElementType, typename = void>
struct is_well_formed_data_and_size : std::false_type {};

template <typename T, typename ElementType>
struct is_well_formed_data_and_size<
    T, ElementType,
    cpp17::void_t<decltype(cpp17::data(std::declval<T&>()), cpp17::size(std::declval<T&>()))>>
    : is_qualification_conversion<std::remove_pointer_t<decltype(cpp17::data(std::declval<T&>()))>,
                                  ElementType>::type {};

template <typename T, typename = void>
struct has_range_begin_and_end : std::false_type {};

template <typename T>
struct has_range_begin_and_end<T, std::void_t<decltype(std::begin(std::declval<T>())),
                                              decltype(std::begin(std::declval<T>()))>>
    : std::is_same<decltype(std::begin(std::declval<T>())),
                   decltype(std::begin(std::declval<T>()))> {};

template <typename T, class ElementType>
static constexpr bool is_span_compatible_v =
    cpp17::conjunction_v<cpp17::negation<is_span<T>>, cpp17::negation<is_array_type<T>>,
                         has_range_begin_and_end<T>, is_well_formed_data_and_size<T, ElementType>>;

template <typename SizeType, SizeType Extent, SizeType Offset, SizeType Count>
struct subspan_extent
    : std::conditional_t<Count != dynamic_extent, std::integral_constant<SizeType, Count>,
                         std::conditional_t<Extent != dynamic_extent,
                                            std::integral_constant<SizeType, Extent - Offset>,
                                            std::integral_constant<SizeType, dynamic_extent>>> {};

template <typename T, std::size_t Extent>
using byte_span_size =
    std::integral_constant<std::size_t,
                           Extent == dynamic_extent ? dynamic_extent : Extent * sizeof(T)>;

}  // namespace internal
}  // namespace cpp20

#ifdef _LIBCPP_STD_VER
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 217 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"

// Indicate to libc++ that our `span_iterator` points to elements that are
// contiguous in memory, which enables copy and move optimizations. In C++20,
// this would be done in a standard way by implementing the
// `std::contiguous_iterator_tag` concept. Since that's not present in C++17,
// hook into the libc++ marker template type instead.

_LIBCPP_BEGIN_NAMESPACE_STD

// Different libc++ versions use one of these class names to determine if an
// iterator is contiguous. We define both so that this works regardless of the
// libc++ version. We have to forward declare these types for the case that
// the other is not already defined.
template <class It>
struct __is_cpp17_contiguous_iterator;
template <typename T>
struct __is_cpp17_contiguous_iterator<cpp20::internal::span_iterator<T>> : true_type {};
template <class It>
struct __libcpp_is_contiguous_iterator;
template <typename T>
struct __libcpp_is_contiguous_iterator<cpp20::internal::span_iterator<T>> : true_type {};

_LIBCPP_END_NAMESPACE_STD

#endif
# 242 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
#endif
# 243 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"

#endif  // LIB_STDCOMPAT_INTERNAL_SPAN_H_
# 245 "../../sdk/lib/stdcompat/include/lib/stdcompat/internal/span.h"
#endif /* span.h expanded by -frewrite-includes */
# 34 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "internal/utility.h"
#endif /* expanded by -frewrite-includes */
# 34 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"
# 35 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"
#if 0 /* expanded by -frewrite-includes */
#include "type_traits.h"
#endif /* expanded by -frewrite-includes */
# 35 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"
# 36 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"

namespace cpp20 {

using internal::dynamic_extent;

template <typename T, size_t Extent = dynamic_extent>
class span {
 public:
  using element_type = T;
  using value_type = std::remove_cv_t<T>;
  using size_type = size_t;
  using difference_type = ptrdiff_t;
  using pointer = T*;
  using const_pointer = const T*;
  using reference = T&;
  using const_reference = const T&;
  using iterator = internal::span_iterator<T>;
  using reverse_iterator = std::reverse_iterator<iterator>;

  static constexpr size_t extent = Extent;

  template <size_t Extent_ = Extent,
            std::enable_if_t<Extent_ == 0 || Extent_ == dynamic_extent, bool> = true>
  constexpr span() noexcept : extent_(nullptr, 0) {}

  template <typename It, size_t Extent_ = Extent,
            std::enable_if_t<Extent_ != dynamic_extent, bool> = true>
  constexpr explicit span(It first, size_type count) : extent_(to_address(first), count) {
    assert((extent == dynamic_extent || count == size()));
  }

  template <typename It, size_t Extent_ = Extent,
            std::enable_if_t<Extent_ == dynamic_extent, bool> = true>
  constexpr span(It first, size_type count) : extent_(cpp20::to_address(first), count) {
    assert((extent == dynamic_extent || count == size()));
  }

  template <
      typename It, typename End, size_type Extent_ = Extent,
      std::enable_if_t<Extent_ != dynamic_extent && !std::is_convertible<End, size_type>::value,
                       bool> = true>
  constexpr explicit span(It first, End end)
      : extent_(to_address(first), std::distance(first, end)) {
    assert(
        (static_cast<size_type>(std::distance(first, end)) == extent || extent == dynamic_extent));
  }

  template <
      typename It, typename End, size_type Extent_ = Extent,
      std::enable_if_t<Extent_ == dynamic_extent && !std::is_convertible<End, size_type>::value,
                       bool> = true>
  constexpr span(It first, End end) : extent_(to_address(first), std::distance(first, end)) {
    assert(
        (static_cast<size_type>(std::distance(first, end)) == extent || extent == dynamic_extent));
  }

  template <size_t N, size_type Extent_ = Extent,
            std::enable_if_t<Extent_ == dynamic_extent || N == Extent_, bool> = true>
  // NOLINTNEXTLINE(google-explicit-constructor) Intentionally implicit
  constexpr span(element_type (&arr)[N]) noexcept : extent_(cpp17::data(arr), cpp17::size(arr)) {}

  template <typename U, size_t N, size_type Extent_ = Extent,
            std::enable_if_t<(Extent_ == dynamic_extent || N == Extent_) &&
                                 internal::is_qualification_conversion<U, element_type>::value,
                             bool> = true>
  // NOLINTNEXTLINE(google-explicit-constructor) Intentionally implicit
  constexpr span(U (&arr)[N]) noexcept : extent_(cpp17::data(arr), cpp17::size(arr)) {}

  template <typename U, size_t N, size_type Extent_ = Extent,
            std::enable_if_t<(Extent_ == dynamic_extent || N == Extent_) &&
                                 internal::is_qualification_conversion<U, element_type>::value,
                             bool> = true>
  // NOLINTNEXTLINE(google-explicit-constructor) Intentionally implicit
  constexpr span(std::array<U, N>& arr) noexcept : extent_(cpp17::data(arr), cpp17::size(arr)) {}

  template <typename U, size_t N, size_type Extent_ = Extent,
            std::enable_if_t<(Extent_ == dynamic_extent || N == Extent_) &&
                                 internal::is_qualification_conversion<U, element_type>::value,
                             bool> = true>
  // NOLINTNEXTLINE(google-explicit-constructor) Intentionally implicit
  constexpr span(const std::array<U, N>& arr) noexcept
      : extent_(cpp17::data(arr), cpp17::size(arr)) {}

  template <typename R, size_type Extent_ = Extent,
            std::enable_if_t<Extent_ != dynamic_extent && internal::is_span_compatible_v<R, T>,
                             bool> = true>
  explicit constexpr span(R&& r) : extent_(cpp17::data(r), cpp17::size(r)) {
    assert((cpp17::size(r) == size() || Extent_ == dynamic_extent));
  }

  template <typename R, size_type Extent_ = Extent,
            std::enable_if_t<Extent_ == dynamic_extent && internal::is_span_compatible_v<R, T>,
                             bool> = true>
  // NOLINTNEXTLINE(google-explicit-constructor) Intentionally implicit
  constexpr span(R&& r) : extent_(cpp17::data(r), cpp17::size(r)) {
    assert((cpp17::size(r) == size() || extent == dynamic_extent));
  }

  template <typename U, size_t N, size_type Extent_ = Extent,
            std::enable_if_t<Extent_ != dynamic_extent && N == dynamic_extent &&
                                 internal::is_qualification_conversion<U, T>::value,
                             bool> = true>
  explicit constexpr span(const cpp20::span<U, N>& s) noexcept : extent_(s.data(), s.size()) {
    assert((s.size() == size() || extent == dynamic_extent));
  }

  template <typename U, size_t N, size_type Extent_ = Extent,
            std::enable_if_t<(Extent_ == dynamic_extent || N == Extent_) &&
                                 internal::is_qualification_conversion<U, T>::value,
                             bool> = true>
  // NOLINTNEXTLINE(google-explicit-constructor) Intentionally implicit
  constexpr span(const cpp20::span<U, N>& s) noexcept : extent_(s.data(), s.size()) {
    assert((s.size() == size() || extent == dynamic_extent));
  }

  constexpr span(const span& s) noexcept = default;
  constexpr span& operator=(const span& s) noexcept = default;

  ~span() noexcept = default;

  constexpr reference operator[](size_type index) const {
    assert(index < size());
    return data()[index];
  }

  constexpr iterator begin() const noexcept { return iterator(extent_.data()); }
  constexpr iterator end() const noexcept { return iterator(extent_.data() + size()); }

  constexpr reverse_iterator rbegin() const noexcept { return std::make_reverse_iterator(end()); }
  constexpr reverse_iterator rend() const noexcept { return std::make_reverse_iterator(begin()); }

  constexpr reference front() const { return (*this)[0]; }
  constexpr reference back() const { return (*this)[size() - 1]; }

  constexpr pointer data() const noexcept { return extent_.data(); }

  constexpr size_type size() const noexcept { return extent_.size(); }
  constexpr size_type size_bytes() const noexcept { return sizeof(T) * size(); }

  constexpr bool empty() const { return size() == 0; }

  constexpr span<element_type, dynamic_extent> subspan(size_type offset,
                                                       size_type count = dynamic_extent) const {
    assert(offset <= size() && (count == dynamic_extent || count <= size() - offset));
    return span<element_type, dynamic_extent>(data() + offset, count_to_size(offset, count));
  }

  template <size_t Offset, size_t Count = dynamic_extent,
            size_type E = internal::subspan_extent<size_type, Extent, Offset, Count>::value,
            size_type Extent_ = Extent,
            std::enable_if_t<(Offset <= Extent_) &&
                                 (Count == dynamic_extent || Count <= Extent_ - Offset),
                             bool> = true>
  constexpr span<element_type, E> subspan() const {
    assert(Offset <= size() && (Count == dynamic_extent || Count <= size() - Offset));
    return span<element_type, E>(data() + Offset, count_to_size(Offset, Count));
  }

  template <size_t Count, size_type Extent_ = Extent,
            std::enable_if_t<Count <= Extent_, bool> = true>
  constexpr span<element_type, Count> first() const {
    assert(Count <= size());
    return subspan<0, Count>();
  }

  constexpr span<element_type, dynamic_extent> first(size_type count) const {
    assert(count <= size());
    return subspan(0, count);
  }

  template <size_t Count, size_type Extent_ = Extent,
            std::enable_if_t<Count <= Extent_, bool> = true>
  constexpr span<element_type, Count> last() const {
    assert(Count <= size());
    return span<element_type, Count>(data() + (size() - Count), Count);
  }

  constexpr span<element_type, dynamic_extent> last(size_type count) const {
    assert(count <= size());
    return span<element_type, dynamic_extent>(data() + (size() - count), count);
  }

 private:
  constexpr size_type count_to_size(size_type offset, size_type count) const {
    if (count == dynamic_extent) {
      return size() - offset;
    }
    return count;
  }

  internal::extent<element_type, Extent> extent_;
};

#if 0 /* disabled by -frewrite-includes */
#if defined(__cpp_deduction_guides) && __cpp_deduction_guides >= 201703L
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 230 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"

template <class It, class EndOrSize>
span(It, EndOrSize) -> span<std::remove_reference_t<decltype(*std::declval<It&>())>>;

template <typename T, size_t N>
span(T (&)[N]) -> span<T, N>;

template <typename T, size_t N>
span(std::array<T, N>&) -> span<T, N>;

template <typename T, size_t N>
span(const std::array<T, N>&) -> span<const T, N>;

template <class R>
span(R&&) -> span<std::remove_reference_t<decltype(*cpp17::data(std::declval<R>()))>>;

#endif  // __cpp_deduction_guides >= 201703L
# 247 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"

template <typename T, size_t N, size_t S = internal::byte_span_size<T, N>::value>
cpp20::span<cpp17::byte, S> as_writable_bytes(cpp20::span<T, N> s) noexcept {
  return cpp20::span<cpp17::byte, S>(reinterpret_cast<cpp17::byte*>(s.data()), s.size_bytes());
}

template <typename T, size_t N, size_t S = internal::byte_span_size<T, N>::value>
cpp20::span<const cpp17::byte, S> as_bytes(cpp20::span<T, N> s) noexcept {
  return cpp20::span<const cpp17::byte, S>(reinterpret_cast<const cpp17::byte*>(s.data()),
                                           s.size_bytes());
}

}  // namespace cpp20

#endif  // __cpp_lib_span >= 202002L && !defined(LIB_STDCOMPAT_USE_POLYFILLS)
# 262 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"

#endif  // LIB_STDCOMPAT_SPAN_H_
# 264 "../../sdk/lib/stdcompat/include/lib/stdcompat/span.h"
#endif /* span.h expanded by -frewrite-includes */
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/init-fini.h" 2

#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 10 "../../src/lib/elfldltl/include/lib/elfldltl/init-fini.h"
# 11 "../../src/lib/elfldltl/include/lib/elfldltl/init-fini.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) /* abi-span.h expanded by -frewrite-includes */
#include "abi-span.h"
#else /* abi-span.h expanded by -frewrite-includes */
# 12 "../../src/lib/elfldltl/include/lib/elfldltl/init-fini.h"
# 1 "../../src/lib/elfldltl/include/lib/elfldltl/abi-span.h" 1
// Copyright 2023 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_ABI_SPAN_H_
#define SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_ABI_SPAN_H_

#if defined(__CLANG_REWRITTEN_INCLUDES) /* abi-span.h expanded by -frewrite-includes */
#include "internal/abi-span.h"
#else /* abi-span.h expanded by -frewrite-includes */
# 8 "../../src/lib/elfldltl/include/lib/elfldltl/abi-span.h"
# 1 "../../src/lib/elfldltl/include/lib/elfldltl/internal/abi-span.h" 1
// Copyright 2023 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_INTERNAL_ABI_SPAN_H_
#define SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_INTERNAL_ABI_SPAN_H_

#if 0 /* expanded by -frewrite-includes */
#include <lib/stdcompat/span.h>
#endif /* expanded by -frewrite-includes */
# 8 "../../src/lib/elfldltl/include/lib/elfldltl/internal/abi-span.h"
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/internal/abi-span.h"

#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 10 "../../src/lib/elfldltl/include/lib/elfldltl/internal/abi-span.h"
# 11 "../../src/lib/elfldltl/include/lib/elfldltl/internal/abi-span.h"

#if 0 /* expanded by -frewrite-includes */
#include "../abi-ptr.h"
#endif /* expanded by -frewrite-includes */
# 12 "../../src/lib/elfldltl/include/lib/elfldltl/internal/abi-span.h"
# 13 "../../src/lib/elfldltl/include/lib/elfldltl/internal/abi-span.h"

namespace elfldltl {

// Forward declaration.
template <typename T, size_t N, class Elf, class Traits>
class AbiSpan;

namespace internal {

// This is the common base type for all AbiSpan instantiations.
// It's separately instantiated for each one, but then different
// subclasses are defined for different instantiations.
template <typename T, size_t N, class Elf, class Traits>
class AbiSpanImplBase {
 public:
  using Ptr = AbiPtr<T, Elf, Traits>;
  using Addr = typename Ptr::Addr;
  using size_type = typename Ptr::size_type;

  using element_type = T;
  using value_type = std::remove_cv_t<T>;
  using difference_type = std::make_signed_t<size_type>;

  constexpr AbiSpanImplBase() = default;

  constexpr AbiSpanImplBase(const AbiSpanImplBase&) = default;

  constexpr explicit AbiSpanImplBase(const Ptr& ptr) : ptr_(ptr) {}

  constexpr AbiSpanImplBase& operator=(const AbiSpanImplBase&) = default;

  static constexpr size_t extent = N;

  constexpr const Ptr& ptr() const { return ptr_; }

  // These are the basic methods always available.  They rely on the size()
  // method defined by the final AbiSpan instantiation.

  constexpr bool empty() const { return AsSpan().size() == 0; }

  constexpr size_t size_bytes() const { return AsSpan().size() * sizeof(T); }

  template <size_t Count>
  constexpr auto first() const {
    assert(Count <= AsSpan().size());
    return Span<Count>{ptr_, Count};
  }

  constexpr auto first(size_type n) const {
    assert(n <= AsSpan().size());
    return Span<>{ptr_, n};
  }

  template <size_t Count>
  constexpr auto last() const {
    assert(Count <= AsSpan().size());
    return Span<Count>{ptr_ + (AsSpan().size() - Count), Count};
  }

  constexpr auto last(size_type n) const {
    assert(n <= AsSpan().size());
    return Span<>{ptr_ + (AsSpan().size() - n), n};
  }

  template <size_t Offset, size_t Count = cpp20::dynamic_extent>
  constexpr auto subspan() const {
    static_assert(Offset <= N);
    assert(Offset <= AsSpan().size());
    if constexpr (Count == cpp20::dynamic_extent) {
      if constexpr (N == cpp20::dynamic_extent) {
        return Span<>{
            ptr_ + Offset,
            static_cast<size_type>(AsSpan().size() - Offset),
        };
      } else {
        constexpr size_t SubCount = std::min(Count, N - Offset);
        return Span<SubCount>{ptr_ + Offset, static_cast<size_type>(SubCount)};
      }
    } else {
      assert(Count <= AsSpan().size() - Offset);
      return Span<Count>{ptr_ + Offset, static_cast<size_type>(Count)};
    }
  }

  constexpr auto subspan(size_type offset,
                         size_type count = static_cast<size_type>(cpp20::dynamic_extent)) const {
    assert(offset <= AsSpan().size());
    if (count == static_cast<size_type>(cpp20::dynamic_extent)) {
      count = AsSpan().size() - offset;
    } else {
      assert(count <= AsSpan().size() - offset);
    }
    return Span<>{ptr_ + offset, count};
  }

 protected:
  // This is the actual end-user instantiation being created.
  template <size_t Extent = N>
  using Span = AbiSpan<T, Extent, Elf, Traits>;

  constexpr auto& AsSpan() const { return *static_cast<const Span<>*>(this); }

 private:
  Ptr ptr_;
};

// If AbiPtr::get() isn't supported, no access methods are provided.
template <typename T, size_t N, class Elf, class Traits, typename = void>
class AbiSpanImpl : public AbiSpanImplBase<T, N, Elf, Traits> {
 public:
  using AbiSpanImplBase<T, N, Elf, Traits>::AbiSpanImplBase;
  using AbiSpanImplBase<T, N, Elf, Traits>::operator=;
};

// This specialization kicks in when AbiPtr::get() is available.
template <typename T, size_t N, class Elf, class Traits>
class AbiSpanImpl<T, N, Elf, Traits, std::void_t<decltype(AbiPtr<T, Elf, Traits>{}.get())>>
    : public AbiSpanImplBase<T, N, Elf, Traits> {
 public:
  using pointer = T*;
  using const_pointer = const T*;
  using reference = T&;
  using const_reference = const T&;
  using iterator = typename cpp20::span<T, N>::iterator;
  using reverse_iterator = typename cpp20::span<T, N>::reverse_iterator;

  using AbiSpanImplBase<T, N, Elf, Traits>::AbiSpanImplBase;
  using AbiSpanImplBase<T, N, Elf, Traits>::operator=;

  constexpr T* data() const { return this->AsSpan().ptr().get(); }

  constexpr cpp20::span<T> get() const {
    const auto count = this->AsSpan().size();
    return cpp20::span<T, N>{data(), count};
  }

  constexpr decltype(auto) front() const { return get().front(); }

  constexpr decltype(auto) back() const { return get().back(); }

  constexpr decltype(auto) operator[](size_t i) const { return get()[i]; }

  constexpr iterator begin() const { return get().begin(); }

  constexpr iterator end() const { return get().end(); }

  constexpr reverse_iterator rbegin() const { return get().rbegin(); }

  constexpr reverse_iterator rend() const { return get().rend(); }
};

}  // namespace internal
}  // namespace elfldltl

#endif  // SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_INTERNAL_ABI_SPAN_H_
# 168 "../../src/lib/elfldltl/include/lib/elfldltl/internal/abi-span.h"
#endif /* abi-span.h expanded by -frewrite-includes */
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/abi-span.h" 2

namespace elfldltl {

// elfldltl::AbiSpan<T> is like a C++20 std::span<T> but with the same
// properties as elfldltl::AbiPtr<T> (see <lib/elfldltl/abi-ptr.h>): it can be
// used to store pointers and lengths that use a different byte order, address
// size, or address space, than the current process.
//
// It always supports the std::span constructors and operations that don't use
// take T* pointers or dereference into the span (size, subspan, etc.), but
// not the iterator methods (begin, end, etc.).
//
// When instantiated for the native byte order, address size, and address
// space, it supports all the other std::span<T> methods (though not all the
// fancy constructors), can be copy-constructed from std::span<T>, and also has
// an explicit `get()` method to return it.  The iterator methods (begin, end,
// etc.) return the std::span<T> iterator types directly.
template <typename T, size_t N = cpp20::dynamic_extent, class Elf = elfldltl::Elf<>,
          class Traits = LocalAbiTraits>
class AbiSpan : public internal::AbiSpanImpl<T, N, Elf, Traits> {
 public:
  using typename internal::AbiSpanImpl<T, N, Elf, Traits>::Ptr;
  using typename internal::AbiSpanImpl<T, N, Elf, Traits>::size_type;

  constexpr AbiSpan() = default;

  constexpr AbiSpan(const AbiSpan&) = default;

  constexpr AbiSpan(Ptr ptr, size_type size) noexcept
      : internal::AbiSpanImpl<T, N, Elf, Traits>{ptr} {
    assert(size == N);
  }

  // Allow copy-construction from the corresponding span type if it admits
  // construction from a pointer.  Note that span's "range" copy-constructor
  // already allows the other direction because AbiSpan has data() and size().
  template <typename P = T*, typename = std::enable_if_t<std::is_constructible_v<Ptr, P>>>
  constexpr AbiSpan(cpp20::span<T, N> other)
      : internal::AbiSpanImpl<T, N, Elf, Traits>{Ptr{other.data()}} {}

  constexpr size_type size() const { return static_cast<size_type>(N); }
};

template <typename T, class Elf, class Traits>
class AbiSpan<T, cpp20::dynamic_extent, Elf, Traits>
    : public internal::AbiSpanImpl<T, cpp20::dynamic_extent, Elf, Traits> {
 public:
  using typename internal::AbiSpanImpl<T, cpp20::dynamic_extent, Elf, Traits>::Ptr;
  using typename internal::AbiSpanImpl<T, cpp20::dynamic_extent, Elf, Traits>::Addr;
  using typename internal::AbiSpanImpl<T, cpp20::dynamic_extent, Elf, Traits>::size_type;

  constexpr AbiSpan() = default;

  constexpr AbiSpan(const AbiSpan&) = default;

  constexpr AbiSpan(Ptr ptr, size_type size) noexcept
      : internal::AbiSpanImpl<T, cpp20::dynamic_extent, Elf, Traits>{ptr}, size_(size) {}

  // See comment above.
  template <typename TT = T, typename = std::enable_if_t<std::is_constructible_v<Ptr, TT*>>>
  constexpr AbiSpan(cpp20::span<T> other)
      : internal::AbiSpanImpl<T, cpp20::dynamic_extent, Elf, Traits>{Ptr{other.data()}},
        size_{static_cast<size_type>(other.size())} {}

  constexpr AbiSpan& operator=(const AbiSpan&) = default;

  constexpr size_type size() const { return size_; }

 private:
  Addr size_ = 0;
};

// elfldltl::AbiStringView stands in for std::string_view, but is actually
// based on elfldltl::AbiSpan<const char>.
//
// It only replicates the most basic methods of std::string_view.  When
// dereferencing is supported by the Traits type, it just provides a `get()`
// method and implicit conversion to and from std::string_view so it can be
// copied into a std::string_view to call the various methods.
template <class Elf = elfldltl::Elf<>, class Traits = LocalAbiTraits>
class AbiStringView {
 public:
  using Span = AbiSpan<const char, cpp20::dynamic_extent, Elf, Traits>;
  using Ptr = typename Span::Ptr;
  using size_type = typename Span::size_type;

  constexpr AbiStringView() = default;

  constexpr AbiStringView(const AbiStringView&) = default;

  constexpr explicit AbiStringView(Span contents) : contents_(contents) {}

  constexpr AbiStringView(Ptr ptr, size_type length) : contents_{ptr, length} {}

  template <typename S = Span,
            typename = std::enable_if_t<std::is_constructible_v<S, cpp20::span<const char>>>>
  constexpr AbiStringView(std::string_view str) : contents_{cpp20::span{str}} {}

  constexpr AbiStringView& operator=(const AbiStringView&) = default;

  constexpr bool empty() const { return contents_.empty(); }

  constexpr size_t size() const { return contents_.size(); }
  constexpr size_t length() const { return contents_.size(); }

  template <typename S = Span, typename = decltype(S{}.get())>
  constexpr operator std::string_view() const {
    return get();
  }

  template <typename S = Span, typename = decltype(S{}.data())>
  constexpr std::string_view get() const {
    return {data(), size()};
  }

  template <typename S = Span, typename = decltype(S{}.data())>
  constexpr const char* data() const {
    return contents_.data();
  }

 private:
  Span contents_;
};

}  // namespace elfldltl

#endif  // SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_ABI_SPAN_H_
# 136 "../../src/lib/elfldltl/include/lib/elfldltl/abi-span.h"
#endif /* abi-span.h expanded by -frewrite-includes */
# 13 "../../src/lib/elfldltl/include/lib/elfldltl/init-fini.h" 2

namespace elfldltl {

// A module initializer or finalizer function has type void().
using InitFiniFunction = void();

// This represents the information about either initializers or finalizers for
// one ELF module.  Two separate InitFiniInfo objects are used for a module's
// initializers and finalizers.
//
// This is normally populated by a call to elfldltl::DecodeDynamic using an
// elfldltl::DynamicInitObserver or elfldltl::DynamicFiniObserver observer.
//
// The VisitInit or VisitFini methods provide general ordered access to the
// function addresses in each list.  The correct method should be used for each
// kind of list to get the appropriate ordering of elements.
//
// The CallInit and CallFini methods directly call each function in order, for
// immediate in-process uses.
template <class Elf, class AbiTraits = LocalAbiTraits>
struct InitFiniInfo {
 public:
  using Addr = typename Elf::Addr;
  using size_type = typename Elf::size_type;

  // An array of function pointers, in the .init_array or .fini_array section,
  // which is normally part of the RELRO segment.  So the pointers here are
  // unrelocated in the file, but dynamic relocation records apply simple
  // fixup.  As this points directly into the load image in the Memory object,
  // if that image is being relocated in place, then these values will be
  // absolute function pointers after relocation.  If the original file data
  // (or the load image before relocation) is being read, the these addresses
  // need the load bias added.
  constexpr cpp20::span<const Addr> array() const { return array_; }

  // A single function pointer, from the legacy DT_INIT or DT_FINI entry.  This
  // is not contiguous with the array and is stored separately in the ELF
  // headers where no relocation records apply.  So this address always needs
  // the load bias added to yield a runtime function pointer.
  constexpr std::optional<Addr> legacy() const {
    if (legacy_ != 0) {
      return legacy_;
    }
    return std::nullopt;
  }

  constexpr InitFiniInfo& set_array(cpp20::span<const Addr> array) {
    array_ = array;
    return *this;
  }

  constexpr InitFiniInfo& set_legacy(Addr legacy) {
    legacy_ = legacy;
    return *this;
  }

  // Return the number of function pointers present.
  constexpr size_t size() const { return array_.size() + (legacy_ != 0 ? 1 : 0); }

  constexpr bool empty() const { return size() == 0; }

  // Call init(Addr, bool) exactly size() times.  The flag in each callback is
  // true iff Addr has already been relocated.  The argument flag should be
  // true iff relocations affecting RELRO data have already been applied.
  template <typename T>
  constexpr void VisitInit(T&& init, bool relocated) const {
    if (legacy_ != 0) {
      init(legacy_, false);
    }
    for (const auto& addr : array_) {
      init(addr, relocated);
    }
  }

  // Same as VisitInit, but in the reverse order.
  template <typename T>
  constexpr void VisitFini(T&& fini, bool relocated) const {
    for (auto it = array_.rbegin(); it != array_.rend(); ++it) {
      fini(*it, relocated);
    }
    if (legacy_ != 0) {
      fini(legacy_, false);
    }
  }

  // This returns a callback suitable to pass to VisitInit or VisitFini to
  // directly call the functions right here.
  static constexpr auto RelocatedCall(size_type bias) {
    return [bias](const Addr& addr, bool relocated) {
      uintptr_t fnaddr = addr;
      if (!relocated) {
        fnaddr += bias;
      }
      auto fn = reinterpret_cast<InitFiniFunction*>(fnaddr);
      (*fn)();
    };
  }

  // Call all the functions in initialization order.
  void CallInit(size_type bias, bool relocated = true) const {
    VisitInit(RelocatedCall(bias), relocated);
  }

  // Call all the functions in finalization order.
  void CallFini(size_type bias, bool relocated = true) const {
    VisitFini(RelocatedCall(bias), relocated);
  }

 private:
  AbiSpan<const Addr, cpp20::dynamic_extent, Elf, AbiTraits> array_;
  Addr legacy_ = 0;
};

}  // namespace elfldltl

#endif  // SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_INIT_FINI_H_
# 129 "../../src/lib/elfldltl/include/lib/elfldltl/init-fini.h"
#endif /* init-fini.h expanded by -frewrite-includes */
# 9 "../../sdk/lib/ld/include/lib/ld/module.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <lib/elfldltl/link-map-list.h>
#endif /* expanded by -frewrite-includes */
# 9 "../../sdk/lib/ld/include/lib/ld/module.h"
# 10 "../../sdk/lib/ld/include/lib/ld/module.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) /* symbol.h expanded by -frewrite-includes */
#include <lib/elfldltl/symbol.h>
#else /* symbol.h expanded by -frewrite-includes */
# 10 "../../sdk/lib/ld/include/lib/ld/module.h"
# 1 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h" 1
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_SYMBOL_H_
#define SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_SYMBOL_H_

#if 0 /* expanded by -frewrite-includes */
#include <lib/stdcompat/span.h>
#endif /* expanded by -frewrite-includes */
# 8 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"
#if 0 /* expanded by -frewrite-includes */
#include <lib/stdcompat/type_traits.h>
#endif /* expanded by -frewrite-includes */
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"
# 10 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"

#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 11 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"
# 12 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 12 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"
# 13 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"
#if 0 /* expanded by -frewrite-includes */
#include <string_view>
#endif /* expanded by -frewrite-includes */
# 13 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"
# 14 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"

#if 0 /* expanded by -frewrite-includes */
#include "abi-span.h"
#endif /* expanded by -frewrite-includes */
# 15 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"
# 16 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) /* compat-hash.h expanded by -frewrite-includes */
#include "compat-hash.h"
#else /* compat-hash.h expanded by -frewrite-includes */
# 16 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"
# 1 "../../src/lib/elfldltl/include/lib/elfldltl/compat-hash.h" 1
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_COMPAT_HASH_H_
#define SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_COMPAT_HASH_H_

#if 0 /* expanded by -frewrite-includes */
#include <lib/stdcompat/bit.h>
#endif /* expanded by -frewrite-includes */
# 8 "../../src/lib/elfldltl/include/lib/elfldltl/compat-hash.h"
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/compat-hash.h"
#if 0 /* expanded by -frewrite-includes */
#include <lib/stdcompat/span.h>
#endif /* expanded by -frewrite-includes */
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/compat-hash.h"
# 10 "../../src/lib/elfldltl/include/lib/elfldltl/compat-hash.h"

#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 11 "../../src/lib/elfldltl/include/lib/elfldltl/compat-hash.h"
# 12 "../../src/lib/elfldltl/include/lib/elfldltl/compat-hash.h"
#if 0 /* expanded by -frewrite-includes */
#include <string_view>
#endif /* expanded by -frewrite-includes */
# 12 "../../src/lib/elfldltl/include/lib/elfldltl/compat-hash.h"
# 13 "../../src/lib/elfldltl/include/lib/elfldltl/compat-hash.h"

#if 0 /* expanded by -frewrite-includes */
#include "abi-span.h"
#endif /* expanded by -frewrite-includes */
# 14 "../../src/lib/elfldltl/include/lib/elfldltl/compat-hash.h"
# 15 "../../src/lib/elfldltl/include/lib/elfldltl/compat-hash.h"

namespace elfldltl {

// This handles the DT_HASH format, which is mostly obsolete but is the
// official ELF standard format.  This interface matches GnuHash (gnu-hash.h).
// See SymbolInfo (symbol.h) for details.

inline constexpr uint32_t CompatHashString(std::string_view name) {
  uint_fast32_t hash = 0;
  for (char c : name) {
    hash = (hash << 4) + cpp20::bit_cast<unsigned char>(c);
    hash ^= (hash >> 24) & 0xf0;
  }
  return hash & 0x0fffffff;
}

constexpr uint32_t kCompatNoHash = ~uint32_t{};

// In DT_HASH format, there is a table mapping hash buckets to indices of the
// first symbol table entry in the bucket.  A second "chain" table maps the
// symbol table index of each symbol to the next symbol in the same bucket.
// Empty buckets and the end of a chain are identified by index 0 (STN_UNDEF),
// which is always a null entry.  The first two words of the DT_HASH data are
// the number of buckets and the number of chain entries (i.e. the number of
// symbol table entries).  Then the bucket words follow, then the chain words.

template <class Elf, class AbiTraits = LocalAbiTraits>
class CompatHash {
 public:
  using Word = typename Elf::Word;

  class iterator;

  class BucketIterator;

  constexpr explicit CompatHash(cpp20::span<const Word> table)
      : buckets_(table.subspan(2, table[0])), chain_(table.subspan(2 + table[0], table[1])) {}

  static constexpr bool Valid(cpp20::span<const Word> table) {
    if (table.size() < 2) {
      return false;
    }
    const uint32_t nbucket = table[0], nchain = table[1];
    return table.size() - 2 > nbucket && table.size() - 2 - nbucket >= nchain;
  }

  constexpr uint32_t symtab_size() const { return static_cast<uint32_t>(chain_.size()); }

  constexpr uint32_t Bucket(uint32_t hash) const {
    if (buckets_.empty()) [[unlikely]] {
      return 0;
    }
    return buckets_[hash % buckets_.size()];
  }

  constexpr iterator begin() const;
  constexpr iterator end() const;

  constexpr size_t size() const { return buckets_.size(); }

 private:
  AbiSpan<const Word, cpp20::dynamic_extent, Elf, AbiTraits> buckets_, chain_;
};

// This is only actually used when AbiTraits supports direct memory access, so
// it doesn't need to work with other instantiations.
template <class Elf, class AbiTraits>
class CompatHash<Elf, AbiTraits>::BucketIterator {
 public:
  constexpr BucketIterator() = default;
  constexpr BucketIterator(const BucketIterator&) = default;
  constexpr BucketIterator& operator=(const BucketIterator&) = default;

  // This creates a begin() iterator for the bucket and hash value.
  constexpr explicit BucketIterator(const CompatHash& table, uint32_t bucket, uint32_t hash)
      : chain_(table.chain_), i_(BucketIndex(bucket)) {}

  // This creates an end() iterator.
  constexpr explicit BucketIterator(const CompatHash& table) : chain_(table.chain_) {}

  constexpr bool operator==(const BucketIterator& other) const { return i_ == other.i_; }

  constexpr bool operator!=(const BucketIterator& other) const { return !(*this == other); }

  constexpr BucketIterator& operator++() {  // prefix
    // The chain table might encode an infinite loop here.  So cut short
    // iteration when the total number of entries has been enumerated.  In
    // corrupt data, this may not have covered all the entries because it hit a
    // loop.  In valid data, the natural end will always be reached first.
    if (++count_ > chain_.size()) [[unlikely]] {
      i_ = 0;
    } else {
      i_ = BucketIndex(chain_[i_]);
    }
    return *this;
  }

  constexpr BucketIterator& operator++(int) {  // postfix
    auto old = *this;
    ++*this;
    return old;
  }

  constexpr uint32_t operator*() const { return i_; }

 private:
  // If a bogus index came out of the table, reset to end() state.
  constexpr uint32_t BucketIndex(uint32_t symndx) {
    if (symndx < chain_.size()) [[likely]] {
      return symndx;
    }
    return 0;
  }

  cpp20::span<const typename Elf::Word> chain_;
  uint32_t i_ = 0;
  uint32_t count_ = 0;
};

// Iterate over the hash buckets to yield a BucketIerator for each bucket.
// Together this allows for exhaustive iteration over the whole table.
template <class Elf, class AbiTraits>
class CompatHash<Elf, AbiTraits>::iterator {
 public:
  constexpr bool operator==(const iterator& other) const { return it_ == other.it_; }
  constexpr bool operator!=(const iterator& other) const { return it_ != other.it_; }

  constexpr iterator& operator++() {  // prefix
    ++it_;
    return *this;
  }

  constexpr iterator operator++(int) {  // postfix
    iterator old = *this;
    ++*this;
    return old;
  }

  constexpr BucketIterator operator*() const { return BucketIterator(*table_, *it_, 0); }

 private:
  friend CompatHash<Elf, AbiTraits>;

  const CompatHash<Elf, AbiTraits>* table_ = nullptr;
  typename cpp20::span<const typename Elf::Word>::iterator it_;
};

template <class Elf, class AbiTraits>
constexpr auto CompatHash<Elf, AbiTraits>::begin() const -> iterator {
  iterator it;
  it.table_ = this;
  it.it_ = buckets_.begin();
  return it;
}

template <class Elf, class AbiTraits>
constexpr auto CompatHash<Elf, AbiTraits>::end() const -> iterator {
  iterator it;
  it.table_ = this;
  it.it_ = buckets_.end();
  return it;
}

}  // namespace elfldltl

#endif  // SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_COMPAT_HASH_H_
# 181 "../../src/lib/elfldltl/include/lib/elfldltl/compat-hash.h"
#endif /* compat-hash.h expanded by -frewrite-includes */
# 17 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) /* gnu-hash.h expanded by -frewrite-includes */
#include "gnu-hash.h"
#else /* gnu-hash.h expanded by -frewrite-includes */
# 17 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"
# 1 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h" 1
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_GNU_HASH_H_
#define SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_GNU_HASH_H_

#if 0 /* expanded by -frewrite-includes */
#include <lib/stdcompat/bit.h>
#endif /* expanded by -frewrite-includes */
# 8 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
#if 0 /* expanded by -frewrite-includes */
#include <lib/stdcompat/span.h>
#endif /* expanded by -frewrite-includes */
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
# 10 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"

#if 0 /* expanded by -frewrite-includes */
#include <algorithm>
#endif /* expanded by -frewrite-includes */
# 11 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
# 12 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 12 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
# 13 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 13 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
# 14 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
#if 0 /* expanded by -frewrite-includes */
#include <string_view>
#endif /* expanded by -frewrite-includes */
# 14 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
# 15 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
#if 0 /* expanded by -frewrite-includes */
#include <utility>
#endif /* expanded by -frewrite-includes */
# 15 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
# 16 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"

#if 0 /* expanded by -frewrite-includes */
#include "abi-span.h"
#endif /* expanded by -frewrite-includes */
# 17 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
# 18 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
#if 0 /* expanded by -frewrite-includes */
#include "layout.h"
#endif /* expanded by -frewrite-includes */
# 18 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
# 19 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"

namespace elfldltl {

// This handles the DT_GNU_HASH format, which is the de facto standard format.
// This interface matches CompatHash (compat-hash.h).
// See SymbolInfo (symbol.h) for details.

inline constexpr uint32_t GnuHashString(std::string_view name) {
  uint_fast32_t hash = 5381;
  for (char c : name) {
    hash *= 33;
    hash += cpp20::bit_cast<unsigned char>(c);
  }
  return static_cast<uint32_t>(hash);
}

constexpr uint32_t kGnuNoHash = uint32_t{};

// The DT_GNU_HASH format provides a Bloom filter and a hash table.  The data
// is always aligned to address size but starts with a header of four uint32_t
// words regardless of address size:
//
//  * nbucket: number of hash buckets
//  * bias: chain table index bias
//  * nfilter: power-of-two number of Bloom filter array elements
//  * shift: Bloom filter shift count
//
// After the header is an array of address-size words that forms the Bloom
// filter.  The string hash value divided by address-size in bits (i.e. 32 or
// 64), modulo the size of the array (which is required to be a power of two)
// is used as the index into this array, yielding an address-sized bitmask.
// Two bit indices are derived from the string hash value: the hash value
// modulo address-size in bits; and the hash value right-shifted by the shift
// count, modulo address-size in bits.  The bits at both indices are set in
// the bitmask to indicate that this hash value may be present in the table;
// if either bit is clear, no string with this hash value is present.
//
// Then comes the array of uint32_t hash buckets, indexed by the string hash
// value modulo the number of buckets.  Zero indicates an empty hash bucket,
// and other values are symbol table indices.  This points to the first symbol
// in that hash bucket.  Additional symbols in the same bucket are consecutive
// in the symbol table.
//
// The remainder of the data forms an uint32_t array called the "chain table",
// indexed by the index into the symbol table minus the chain table index bias.
// The chain table element corresponding to a symbol table element holds the
// high 31 bits of that symbol's name string's hash value.  The low bit is zero
// if the subsequent element resides in the same hash bucket and one if not.
//
// So the lookup procedure is as follows:
//
//  * Compute the string hash value.
//
//  * Compute the index to the Bloom filter element.
//
//  * Check the filter element.  If it says the hash value is definitely
//    not present in the table, the lookup has failed.
//
//  * Find the first candidate symbol table index in the hash bucket.
//    If this is zero, the lookup has failed.
//
//  * Find the corresponding chain table element (symtab index - bias).
//
//  * Compare the high 31 bits of the hash value to table element's high bits.
//    If those match, then compare the name strings.  (The element's index
//    into the chain table + bias gives the symtab index.)  If the name
//    strings match, the lookup has succeeded, yielding the symtab index.
//
//  * If the low bit of the table element is zero, advance to the next
//    table element and repeat the last step.  If this reaches the end
//    of the table, the table's format is invalid (there must be an entry
//    with the low bit set to terminate each hash bucket's run).
//
//  * Otherwise (i.e. the low bit is one), the lookup has failed.
//

template <class Elf, class AbiTraits = elfldltl::LocalAbiTraits>
class GnuHash {
 public:
  using Addr = typename Elf::Addr;
  using Word = typename Elf::Word;
  using size_type = typename Elf::size_type;

  class iterator;

  class BucketIterator;

  constexpr explicit GnuHash(cpp20::span<const Addr> table) : GnuHash(table, *GetSizes(table)) {}

  static constexpr bool Valid(cpp20::span<const Addr> table) { return GetSizes(table).has_value(); }

  constexpr uint32_t symtab_size() const {
    // First run through the buckets to find the largest symbol table index.
    uint32_t max_symndx = 0;

    if constexpr (sizeof(Addr) == sizeof(uint32_t)) {
      auto buckets = tables_.subspan(filter_index_mask_ + 1, bucket_count_);
      for (uint32_t symndx : buckets) {
        max_symndx = std::max(symndx, max_symndx);
      }
    } else {
      size_t word_count = bucket_count_ / kBucketsPerAddr;
      auto words = tables_.subspan(filter_index_mask_ + 1, word_count);
      for (uint64_t word : words) {
        uint32_t first = static_cast<uint32_t>(word >> Shift(0));
        uint32_t second = static_cast<uint32_t>(word >> Shift(1));
        max_symndx = std::max(std::max(first, second), max_symndx);
      }
      if (bucket_count_ & 1) {
        // The last bucket shares a word with the start of the chain table.
        uint64_t word = tables_[filter_index_mask_ + 1 + word_count];
        uint32_t symndx = static_cast<uint32_t>(word >> Shift(0));
        max_symndx = std::max(symndx, max_symndx);
      }
    }

    if (max_symndx == 0) {
      return 0;
    }

    // Now start at that place in the chain table and count how many remain.

    if constexpr (sizeof(Addr) == sizeof(uint32_t)) {
      auto chain = tables_.subspan(filter_index_mask_ + 1 + bucket_count_);
      if (max_symndx > chain_index_bias_ ||  // Check for bogus index.
          max_symndx - chain_index_bias_ >= chain.size()) [[unlikely]] {
        return 0;
      }
      for (uint32_t hash : chain.subspan(max_symndx - chain_index_bias_)) {
        ++max_symndx;
        if (hash & 1) {
          return max_symndx;
        }
      }
    } else {
      if (max_symndx > chain_index_bias_) [[unlikely]] {
        return 0;
      }

      auto words = tables_.subspan(filter_index_mask_ + 1);

      uint32_t offset = BucketChainStart(max_symndx);

      if ((offset >> 1) >= words.size()) [[unlikely]] {
        return 0;
      }

      if (offset & 1) {
        // The first element of interest shares a word with the previous one.
        ++max_symndx;
        if (words[offset >> 1] & kSecondEnd) {
          return max_symndx;
        }
        ++offset;
      }

      // Check the remaining words two at a time for the end marker.
      offset >>= 1;
      if (offset >= words.size()) [[unlikely]] {
        return 0;
      }

      for (uint64_t word : words.subspan(offset)) {
        ++max_symndx;
        if (word & kFirstEnd) {
          return max_symndx;
        }
        ++max_symndx;
        if (word & kSecondEnd) {
          return max_symndx;
        }
      }
    }

    return 0;  // Table didn't end with an end marker.
  }

  constexpr uint32_t Bucket(uint32_t hash) const {
    size_type filter = tables_[(hash / kAddrBits) & filter_index_mask_];
    uint32_t bit1 = hash % kAddrBits;
    uint32_t bit2 = (hash >> filter_hash_shift_) % kAddrBits;
    if ((filter >> bit1) & (filter >> bit2) & 1) {
      uint32_t bucket = hash % bucket_count_;
      if constexpr (sizeof(Addr) == sizeof(uint32_t)) {
        return tables_[filter_index_mask_ + 1 + bucket];
      } else {
        uint64_t word = tables_[filter_index_mask_ + 1 + (bucket >> 1)];
        return static_cast<uint32_t>(word >> Shift(bucket));
      }
    }
    return 0;
  }

  constexpr iterator begin() const;
  constexpr iterator end() const;

  // This is roughly the size of the hash table, though not exactly equivalent to
  // std::distance(begin(), end()).
  constexpr size_t size() const {
    return tables_.size() * kBucketsPerAddr - AbsoluteBucketChainStart(chain_index_bias_);
  }

 private:
  // The DT_GNU_HASH data is always a whole number of Addr-aligned units, and
  // so comes in as span<const Addr>.  The actual encoding uses Addr-sized
  // elements for the Bloom filter array but Word-sized (i.e. always 32-bit)
  // elements for the symtab index tables and the header fields.
  //
  // The data begins with this four-word header (all 32-bit fields):
  //  * nbucket
  //  * bias
  //  * nfilter
  //  * shift
  // Next follows the Bloom filter array: Addr filter[nfilter].
  // Then comes the array of hash buckets: Word[nbucket].
  // Finally the rest of the words are the "chain" array: Word[].

  struct Sizes {
    uint32_t nbucket;  // Number of buckets.
    uint32_t bias;     // Lowest symtab index representable in the table.
    uint32_t nfilter;  // Number of filter words.
    uint32_t shift;    // Bit-shift on hash values for the Bloom filter.
  };
  static constexpr uint32_t kAddrPerSizes = sizeof(Sizes) / sizeof(Addr);
  static constexpr uint32_t kWordPerSizes = sizeof(Sizes) / sizeof(Word);
  static constexpr uint32_t kBucketsPerAddr = sizeof(Addr) / sizeof(Word);

  static constexpr uint32_t kAddrBits = sizeof(Addr) * 8;

  static constexpr bool kLittle = std::is_same_v<Word, typename Elf32<ElfData::k2Lsb>::Word>;

  // End marker bit in the first or second uint32_t within the word.
  static constexpr uint64_t kFirstEnd = uint64_t{1} << (kLittle ? 0 : 32);
  static constexpr uint64_t kSecondEnd = uint64_t{1} << (kLittle ? 32 : 0);

  // Right-shift applied to a table Addr for the Word at the given index.
  static constexpr uint32_t Shift(uint32_t idx) {
    if constexpr (sizeof(Addr) == sizeof(uint32_t)) {
      return 0;
    }
    return 32 * (kLittle ? (idx & 1) : (~idx & 1));
  }

  constexpr GnuHash(cpp20::span<const Addr> table, const Sizes& sizes)
      : tables_(table.subspan(kAddrPerSizes)),
        bucket_count_(sizes.nbucket),
        chain_index_bias_(sizes.bias),
        filter_index_mask_(sizes.nfilter - 1),
        filter_hash_shift_(sizes.shift) {}

  static constexpr std::optional<Sizes> GetSizes(cpp20::span<const Addr> table) {
    if (table.size() >= kAddrPerSizes) [[likely]] {
      Sizes sizes;
      if constexpr (sizeof(Addr) == sizeof(Word)) {
        sizes = {
            .nbucket = table[0],
            .bias = table[1],
            .nfilter = table[2],
            .shift = table[3],
        };
      } else {
        uint64_t first = table[0];
        uint64_t second = table[1];
        sizes = {
            .nbucket = static_cast<uint32_t>(first >> Shift(0)),
            .bias = static_cast<uint32_t>(first >> Shift(1)),
            .nfilter = static_cast<uint32_t>(second >> Shift(0)),
            .shift = static_cast<uint32_t>(second >> Shift(1)),
        };
      }

      const size_t total_addrs = table.size() - kAddrPerSizes;

      // There must be one slot for each bucket, followed by at least one more
      // slot for the chain table.  This minimum number of slots can be rounded
      // up to the number of slots per Addr, since there is always a whole
      // number of Addr words in the overall table.
      const uint32_t bucket_slots = (sizes.nbucket + 1 + kBucketsPerAddr - 1) / kBucketsPerAddr;
      const uint32_t max_buckets = bucket_slots * kBucketsPerAddr;

      if (sizes.nbucket > 0 &&                     // Cannot be empty.
          sizes.nbucket <= max_buckets &&          // Check for overflow.
          sizes.shift < 32 &&                      // Must be plausible.
          cpp20::has_single_bit(sizes.nfilter) &&  // Must be power of two.
          total_addrs >= sizes.nfilter &&          // Space for the filters.
          // There must be space for the buckets and the chain table.  We can't
          // really tell how much space is needed for the chain table without
          // examining all the buckets, so those indices can't be presumed
          // valid later.
          total_addrs - sizes.nfilter >= bucket_slots) [[likely]] {
        return sizes;
      }
    }
    return std::nullopt;
  }

  // Return Word index for the start of the bucket's chain table, relative to
  // the start of the bucket table.
  constexpr uint32_t BucketChainStart(uint32_t symndx) const {
    return symndx - chain_index_bias_ + bucket_count_;
  }

  // Return Word index into tables_ for the start of the bucket's chain table.
  constexpr uint32_t AbsoluteBucketChainStart(uint32_t symndx) const {
    return ((filter_index_mask_ + 1) * kBucketsPerAddr) + BucketChainStart(symndx);
  }

  AbiSpan<const Addr, cpp20::dynamic_extent, Elf, AbiTraits> tables_;
  Word bucket_count_ = 0;
  Word chain_index_bias_ = 0;
  Word filter_index_mask_ = 0;
  Word filter_hash_shift_ = 0;
};

template <class Elf, class AbiTraits>
class GnuHash<Elf, AbiTraits>::BucketIterator {
 public:
  constexpr BucketIterator() = default;
  constexpr BucketIterator(const BucketIterator&) = default;
  constexpr BucketIterator& operator=(const BucketIterator&) = default;

  // This creates a begin() iterator for the bucket and hash value.
  constexpr explicit BucketIterator(const GnuHash& table, uint32_t bucket, uint32_t hash)
      : table_(&table),
        i_(table.AbsoluteBucketChainStart(bucket)),
        // Store with the low bit set for quick comparisons to the chain table.
        hash_(hash | 1) {
    // Check for a bogus index coming from the bucket table.
    const uint32_t idx = i_ / kBucketsPerAddr;  // Word index -> tables_ index.
    if (bucket < table_->chain_index_bias_ || idx >= table_->tables_.size()) [[unlikely]] {
      GoToEnd();
    } else {
      // We're now pointing to the start of the bucket.
      // Advance to the first symbol matching the hash value.
      AdvanceToNextHashMatch(table_->tables_[idx]);
    }
  }

  // This creates an end() iterator.
  constexpr explicit BucketIterator(const GnuHash& table)
      : table_(&table), i_(static_cast<uint32_t>(table.tables_.size() * kBucketsPerAddr)) {}

  constexpr bool operator==(const BucketIterator& other) const { return i_ == other.i_; }

  constexpr bool operator!=(const BucketIterator& other) const { return !(*this == other); }

  constexpr BucketIterator& operator++() {  // prefix
    // The current chain word was the previous match for hash_.
    size_type current = table_->tables_[i_ / kBucketsPerAddr];

    // Check the current entry for the end marker.
    if ((current >> Shift(i_)) & 1) {
      GoToEnd();
    } else {
      // Look at the rest of the bucket.
      ++i_;
      AdvanceToNextHashMatch(current);
    }

    return *this;
  }

  constexpr BucketIterator& operator++(int) {  // postfix
    auto old = *this;
    ++*this;
    return old;
  }

  constexpr uint32_t operator*() const { return i_ - table_->AbsoluteBucketChainStart(0); }

 private:
  constexpr void GoToEnd() { i_ = static_cast<uint32_t>(table_->tables_.size() * kBucketsPerAddr); }

  constexpr void AdvanceToNextHashMatch(size_type current) {
    if constexpr (sizeof(Addr) == sizeof(uint32_t)) {
      for (uint32_t chain : table_->tables_.subspan(i_)) {
        if ((chain | 1) == hash_) {
          // Found a matching entry.
          return;
        }

        if (chain & 1) {
          // Hit the end marker with no matches.
          GoToEnd();
          return;
        }

        // Advance to the next entry.
        ++i_;
      }
    } else {
      if (i_ & 1) {
        // Check the second half of the current word.
        uint32_t chain = static_cast<uint32_t>(current >> Shift(1));
        if ((chain | 1) == hash_) {
          // Found a matching entry.
          return;
        }

        if (chain & 1) {
          // Hit the end marker with no matches.
          GoToEnd();
          return;
        }

        // Advance to the next (aligned) entry.
        ++i_;
      }

      // Now check two words at a time.
      for (uint64_t word : table_->tables_.subspan(i_ >> 1)) {
        uint32_t chain = static_cast<uint32_t>(word >> Shift(0));
        if ((chain | 1) == hash_) {
          // Found a matching entry.
          return;
        }

        if (chain & 1) {
          // Hit the end marker with no matches.
          GoToEnd();
          return;
        }

        // Advance to the second entry of the pair.
        ++i_;
        chain = static_cast<uint32_t>(word >> Shift(1));

        if ((chain | 1) == hash_) {
          // Found a matching entry.
          return;
        }

        if (chain & 1) {
          // Hit the end marker with no matches.
          GoToEnd();
          return;
        }

        // Advance to the next pair of entries.
        ++i_;
      }
    }
  }

  const GnuHash* table_ = nullptr;
  uint32_t i_ = -1;
  uint32_t hash_ = 0;
};

// Iterate over the hash buckets to yield a BucketIerator for each bucket.
// Together this allows for exhaustive iteration over the whole table.
// Here each "bucket" is not actually a hash bucket in the DT_GNU_HASH
// primary hash table used for lookup, but is instead a run within a bucket
// of entries with the same full hash value (ignoring the low bit), since
// that's what a BucketIterator covers.  So this is useful for exhaustive
// iteration over the hash table, and for detecting actual hash collisions,
// but is not useful for counting bucket depth and the like.
template <class Elf, class AbiTraits>
class GnuHash<Elf, AbiTraits>::iterator {
 public:
  constexpr iterator() = default;
  constexpr iterator(const iterator&) = default;
  constexpr iterator& operator=(const iterator&) = default;

  constexpr bool operator==(const iterator& other) const { return i_ == other.i_; }

  constexpr bool operator!=(const iterator& other) const { return !(*this == other); }

  constexpr iterator& operator++() {  // prefix
    const uint32_t hash = CurrentHash();
    if constexpr (sizeof(Addr) == sizeof(uint32_t)) {
      // Advance past each word that matches the current hash value.
      do {
        ++i_;
      } while (i_ < table_->tables_.size() && table_->tables_[i_] == hash);
    } else {
      // If the current entry is in the second half of its word-pair, skip
      // it first.  Then check two words at a time.  If the current entry
      // is in the first half, then it's harmless to check it again.
      if (i_ & 1) {
        ++i_;
      }

      const uint64_t hash_twice = (static_cast<uint64_t>(hash) << 32) | hash;
      for (uint64_t word : table_->tables_.subspan(i_ >> 1)) {
        word |= (uint64_t{1} << 32) | 1;
        if (word != hash_twice) {
          if (static_cast<uint32_t>(word >> Shift(0)) == hash) {
            // The first word matched though the second didn't.  Skip just one.
            ++i_;
          }
          break;
        }

        // Both words matched.  Advance to the next pair of entries.
        i_ += 2;
      }
    }
    return *this;
  }

  constexpr iterator operator++(int) {  // postfix
    iterator old = *this;
    ++*this;
    return old;
  }

  constexpr BucketIterator operator*() const {
    return BucketIterator(*table_, CurrentBucket(), CurrentHash());
  }

 private:
  friend GnuHash;

  constexpr uint32_t CurrentBucket() const { return i_ - table_->AbsoluteBucketChainStart(0); }

  constexpr uint32_t CurrentHash() const {
    return static_cast<uint32_t>(table_->tables_[i_ / kBucketsPerAddr] >> Shift(i_)) | 1;
  }

  const GnuHash* table_ = nullptr;
  uint32_t i_ = -1;
};

template <class Elf, class AbiTraits>
constexpr auto GnuHash<Elf, AbiTraits>::begin() const -> iterator {
  iterator it;
  it.table_ = this;
  it.i_ = AbsoluteBucketChainStart(chain_index_bias_);
  return it;
}

template <class Elf, class AbiTraits>
constexpr auto GnuHash<Elf, AbiTraits>::end() const -> iterator {
  iterator it;
  it.table_ = this;
  it.i_ = static_cast<uint32_t>(tables_.size() * kBucketsPerAddr);
  return it;
}

}  // namespace elfldltl

#endif  // SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_GNU_HASH_H_
# 562 "../../src/lib/elfldltl/include/lib/elfldltl/gnu-hash.h"
#endif /* gnu-hash.h expanded by -frewrite-includes */
# 18 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "layout.h"
#endif /* expanded by -frewrite-includes */
# 18 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"
# 19 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"

namespace elfldltl {

// SymbolName represents an identifier to be looked up in a symbol table.  It's
// really just a string_view with a cache of the string's hash value(s).  The
// type is constexpr friendly and when used in a constexpr context with a
// string literal, it can precompute at compile time to optimize.
//
// The Lookup calls are just front-ends that take a SymbolInfo object and call
// its Lookup method (see below).
//
// Note that though this is a cheaply-copyable type, it's always best to pass
// it by mutable reference so its cache can be updated as needed (outside
// constexpr context).  Lookup has both const and non-const overloads, but the
// const overload has to recompute every time if the hash isn't already cached.
//
// ELF symbol names cannot contain NUL characters, so it's an invariant that
// SymbolName cannot contain embedded NULs (unlike std::string_view, which can).
// Construction and assignment enforce this by turning a std::string_view argument
// that contains embedded NULs into the empty string.
//
class SymbolName : public std::string_view {
 public:
  using std::string_view::string_view;

  constexpr SymbolName() = default;

  constexpr SymbolName(const SymbolName&) = default;

  // When constructing from a constant, precompute the hashes since it can be
  // done entirely in constexpr context.
  template <size_t N>
  constexpr explicit SymbolName(const char (&name)[N])
      : std::string_view(name),
        compat_hash_(CompatHashString(*this)),
        gnu_hash_(GnuHashString(*this)) {}

  // This will precompute the hashes in constexpr context, see below.
  constexpr explicit SymbolName(std::string_view name) { *this = name; }

  constexpr explicit SymbolName(const char* name) { *this = name; }

  // Convenient constructor using a symbol table entry (see below).
  template <class SymbolInfo, class Sym>
  constexpr SymbolName(const SymbolInfo& si, const Sym& sym) : SymbolName(si.string(sym.name)) {}

  constexpr SymbolName& operator=(const SymbolName&) = default;

  constexpr SymbolName& operator=(std::string_view name) {
    // No valid symbol will have an embedded NUL character, in which case just yield an empty
    // symbol.
    if (!name.empty() && name.find_first_of('\0') != std::string_view::npos) [[unlikely]] {
      name = {};
    }
    return ChangeName(name);
  }

  constexpr SymbolName& operator=(const char* name) {
    // Implicit const char* -> std::string_view conversion makes it impossible
    // for there to be an embedded NUL, so no need to check that invariant.
    return ChangeName(name);
  }

  constexpr uint32_t compat_hash() {
    if (compat_hash_ == kCompatNoHash) {
      compat_hash_ = CompatHashString(*this);
    }
    return compat_hash_;
  }

  constexpr uint32_t compat_hash() const { return SymbolName(*this).compat_hash(); }

  constexpr uint32_t gnu_hash() {
    if (gnu_hash_ == kGnuNoHash) {
      gnu_hash_ = GnuHashString(*this);
    }
    return gnu_hash_;
  }

  constexpr uint32_t gnu_hash() const { return SymbolName(*this).gnu_hash(); }

  template <class SymbolInfoType, typename Filter>
  constexpr const typename SymbolInfoType::Sym* Lookup(const SymbolInfoType& si, Filter&& filter) {
    // DT_GNU_HASH format is superior when available.  Modern systems should
    // default to --hash-style=gnu or --hash-style=both so it's available.
    if (auto gnu = si.gnu_hash()) {
      return si.Lookup(*gnu, *this, gnu_hash(), std::forward<Filter>(filter));
    }

    // But it's easy enough to support the old format (--hash-style=sysv) too.
    if (auto compat = si.compat_hash()) {
      return si.Lookup(*compat, *this, compat_hash(), std::forward<Filter>(filter));
    }

    return nullptr;
  }

  // A const object can't update its cache, but constexpr will already have it.
  template <class SymbolInfoType, typename Filter>
  constexpr const typename SymbolInfoType::Sym* Lookup(const SymbolInfoType& si,
                                                       Filter&& filter) const {
    // The copy is mutable in case we don't already have cached hash values.
    return SymbolName(*this).Lookup(si, std::forward<Filter>(filter));
  }

  template <class SymbolInfoType>
  constexpr auto Lookup(const SymbolInfoType& si) {
    return Lookup(si, SymbolInfoType::DefinedSymbol);
  }

  template <class SymbolInfoType>
  constexpr auto Lookup(const SymbolInfoType& si) const {
    return Lookup(si, SymbolInfoType::DefinedSymbol);
  }

 private:
  constexpr SymbolName& ChangeName(std::string_view name) {
    std::string_view::operator=(name);
    compat_hash_ = kCompatNoHash;
    gnu_hash_ = kGnuNoHash;
    if (cpp20::is_constant_evaluated()) {  // Precompute in constexpr.
      compat_hash();
      gnu_hash();
    }
    return *this;
  }

  uint32_t compat_hash_ =  // Precompute in constexpr.
      cpp20::is_constant_evaluated() ? CompatHashString(*this) : kCompatNoHash;
  uint32_t gnu_hash_ =  // Precompute in constexpr.
      cpp20::is_constant_evaluated() ? GnuHashString(*this) : kGnuNoHash;
};

// This type can be used as a constructor tag to zero-construct an object whose
// default constructor would otherwise not be zero initializable. This can
// allow and object to be placed in bss. See
// `SymbolInfo::SymbolInfo(LinkerZeroInitialized)` for more.
struct LinkerZeroInitialized {};
inline constexpr LinkerZeroInitialized kLinkerZeroInitialized{};

// This represents all the dynamic symbol table information for one ELF file.
// It's primarily used for hash table lookup via SymbolName::Lookup, but can
// also be used to enumerate the symbol table or the hash tables.  It holds
// non-owning pointers into target data normally found in the RODATA segment.
//
template <class Elf, class AbiTraits = LocalAbiTraits>
class SymbolInfo {
 public:
  using Word = typename Elf::Word;
  using Addr = typename Elf::Addr;
  using size_type = typename Elf::size_type;
  using Sym = typename Elf::Sym;

  constexpr SymbolInfo() = default;

  // This constructor can be used to zero-initialize a SymbolInfo object.
  // This can be useful for performance reasons. Note, a SymbolInfo object in
  // this state must never be used until `InitLinkerZeroInitialized` has been
  // called.
  constexpr explicit SymbolInfo(LinkerZeroInitialized) : strtab_{} {}

  constexpr void InitLinkerZeroInitialized() { strtab_ = kEmptyStrtab; }

  // Each flavor of hash table has a support class with a compatible API,
  // except for the argument to the constructor and Valid, which is a
  // span<Word> for DT_HASH and a span<Addr> for DT_GNU_HASH.
  //
  // * `static bool Valid(span table);` returns true if the table is usable.
  //   If this returns true, it's safe to pass `table` to the constructor.
  //
  // * `uint32_t symtab_size() const;` computes the maximum size of the symbol
  //   table.  This is not normally needed for plain lookups; it may be costly.
  //
  // * `uint32_t Bucket(uint32_t hash) const;` returns the hash bucket for
  //   symbol names with the given hash value.  Bucket number zero is invalid.
  //   This can be returned if no buckets contain this hash value.
  //
  // * `BucketIterator` is a forward-iterator type that has a three-argument
  //   constructor `(const Table&, uint32_t bucket, uint32_t hash)` that yields
  //   a "begin" iterator for the hash bucket and a two-argument constructor
  //   that yields an "end" iterator for the hash bucket.  The iterator yields
  //   a nonzero uint32_t symbol table index.
  //
  // * `<some type> begin(); const` and `<some type> end(); const` return
  //   iterators over the set of buckets, whose operator*() returns a
  //   BucketIterator, such that iterating through from begin() to end() with
  //   an inner iteration through each BucketIterator to its end state from
  //   there exhaustively visits every symbol in the whole hash table exactly
  //   once.  This is only used for diagnostic purposes.
  //
  using CompatHash = ::elfldltl::CompatHash<Elf, AbiTraits>;  // compat-hash.h
  using GnuHash = ::elfldltl::GnuHash<Elf, AbiTraits>;        // gnu-hash.h

  // This is a forward-iterable container view of a symbol table hash bucket.
  // Each uint32_t element is a symbol table index.
  template <class HashTable>
  class HashBucket {
   public:
    using iterator = typename HashTable::BucketIterator;
    using const_iterator = iterator;

    constexpr explicit HashBucket(const HashTable& table, iterator first)
        : begin_(first), end_(table) {}

    constexpr explicit HashBucket(const HashTable& table, uint32_t bucket, uint32_t hash)
        : HashBucket(table, iterator(table, bucket, hash)) {}

    constexpr iterator begin() const { return begin_; }
    constexpr iterator end() const { return end_; }

   private:
    iterator begin_, end_;
  };

  // This is the degenerate (always true) filter predicate for Lookup.
  static constexpr bool AnySymbol(const Sym& sym) { return true; }

  // This is the default filter predicate for Lookup to match defined symbols.
  static constexpr bool DefinedSymbol(const Sym& sym) {
    if (sym.shndx != 0) {
      switch (sym.type()) {
        case ElfSymType::kNoType:
        case ElfSymType::kObject:
        case ElfSymType::kFunc:
        case ElfSymType::kCommon:
        case ElfSymType::kTls:
        case ElfSymType::kIfunc:
          return true;
        default:
          break;
      }
    }
    return false;
  }

  // Look up a symbol in one of the hash tables.  The filter is a predicate to
  // accept or reject symbols before name matching.
  // This takes a SymbolName to enforce the invariant that there are no embedded NUL characters.
  // It's hash fields are not used.
  template <class HashTable, typename Filter>
  constexpr const Sym* Lookup(const HashTable& table, const SymbolName& name, uint32_t hash,
                              Filter&& filter = DefinedSymbol) const {
    static_assert(std::is_invocable_r_v<bool, Filter, const Sym&>);
    const uint32_t bucket = table.Bucket(hash);
    if (bucket != 0 && name.size() && name.size() < strtab().size()) {
      for (uint32_t i : HashBucket<HashTable>(table, bucket, hash)) {
        if (i >= symtab_.size()) [[unlikely]] {
          break;
        }
        const Sym& sym = symtab_[i];
        // TODO(mcgrathr): diag for bad st_name
        if (filter(sym) && sym.name < strtab().size() && strtab().size() - name.size() > sym.name &&
            strtab()[sym.name + name.size()] == '\0' &&
            strtab().substr(sym.name, name.size()) == name) {
          return &sym;
        }
      }
    }
    return nullptr;
  }

  // Fetch the raw string table.
  constexpr std::string_view strtab() const { return strtab_; }

  // Fetch a NUL-terminated string from the string table by offset,
  // e.g. as stored in st_name or DT_SONAME.
  constexpr const char* string(size_t offset) const {
    if (strtab().size() && offset < strtab().size() - 1) [[likely]] {
      return strtab().data() + offset;
    }
    return "";
  }

  // Fetch the raw symbol table.  Note this size may be an upper bound.  It's
  // all valid memory to read, but there might be garbage data past the last
  // actual valid symbol table index.
  constexpr cpp20::span<const Sym> symtab() const { return symtab_; }

  // Fetch the symbol table and try to reduce its apparent size to its real
  // size or at least a better approximation.  This provides no guarantee that
  // the size will be smaller than the raw symtab() size, but does a bit more
  // work to try to ensure it.  If using only indices that are presumed to be
  // valid, such as those in relocation entries, just use symtab() instead.
  // This is better for blind enumeration.
  cpp20::span<const Sym> safe_symtab() const { return symtab_.subspan(0, safe_symtab_size()); }

  // Return the CompatHash object (see compat-hash.h) if DT_HASH is present.
  constexpr std::optional<CompatHash> compat_hash() const {
    if (CompatHash::Valid(compat_hash_)) {
      return CompatHash(compat_hash_);
    }
    return {};
  }

  constexpr std::optional<GnuHash> gnu_hash() const {
    if (GnuHash::Valid(gnu_hash_)) {
      return GnuHash(gnu_hash_);
    }
    return {};
  }

  constexpr std::string_view soname() const {
    if (soname_ != 0) {
      return string(soname_);
    }
    return {};
  }

  // Install data for the various tables.  These return *this so they can be
  // called in fluent style, e.g. in a constexpr initializer.

  constexpr SymbolInfo& set_strtab(std::string_view strtab) {
    if (strtab.empty() || strtab.back() != '\0') {
      // Invalid string table has no NUL terminator; don't use it at all.
      strtab = kEmptyStrtab;
    }
    strtab_ = strtab;
    return *this;
  }

  constexpr SymbolInfo& set_strtab_as_span(cpp20::span<const char> strtab) {
    return set_strtab({strtab.data(), strtab.size()});
  }

  constexpr SymbolInfo& set_symtab(cpp20::span<const Sym> symtab) {
    symtab_ = symtab;
    return *this;
  }

  constexpr SymbolInfo& set_compat_hash(cpp20::span<const Word> table) {
    compat_hash_ = table;
    return *this;
  }

  constexpr SymbolInfo& set_gnu_hash(cpp20::span<const Addr> table) {
    gnu_hash_ = table;
    return *this;
  }

  constexpr SymbolInfo& set_soname(size_type soname) {
    soname_ = soname;
    return *this;
  }

 private:
  template <typename T>
  using Span = AbiSpan<const T, cpp20::dynamic_extent, Elf, AbiTraits>;

  // In directly-usable instantiations, ensure that the empty state is
  // guaranteed NUL terminated.  In remoting instantiations, the values will
  // always be reset from known-valid local instantiations so the zero-length
  // view will never be used.
  static constexpr AbiStringView<Elf, AbiTraits> kEmptyStrtab = []() {
    AbiStringView<Elf, AbiTraits> empty;
    if constexpr (std::is_constructible_v<AbiStringView<Elf, AbiTraits>, std::string_view>) {
      empty = std::string_view{"", 1};
    }
    return empty;
  }();

  size_type safe_symtab_size() const {
    if (symtab_.empty()) {
      return 0;
    }

    // The old format makes it very cheap to detect, so prefer that.
    if (CompatHash::Valid(compat_hash_)) {
      size_type hash_max = CompatHash(compat_hash_).symtab_size();
      return std::min(symtab_.size(), hash_max);
    }

    // The DT_GNU_HASH format has to be fully scanned to determine the size.
    if (GnuHash::Valid(gnu_hash_)) {
      size_type hash_max = GnuHash(gnu_hash_).symtab_size();
      return std::min(symtab_.size(), hash_max);
    }

    // With neither format available, there is no way to know the constraint
    // directly.  DT_STRTAB is usually right after, so that might be an upper
    // bound, but that's only a (likely) heuristic and not guaranteed.
    auto base = reinterpret_cast<const char*>(symtab_.data());
    auto limit = reinterpret_cast<const char*>(symtab_.data() + symtab_.size());
    if (base < strtab_.data() && limit > strtab_.data()) {
      return static_cast<size_type>(strtab_.data() - base) / sizeof(Sym);
    }

    // Worst case, there might still be some garbage entries at the end.  We
    // could scan through them all looking for invalid data (st_name out of
    // bounds, unsupported st_info bits, etc.), but that seems excessive.
    return symtab_.size();
  }

 public:
  AbiStringView<Elf, AbiTraits> strtab_ = kEmptyStrtab;
  Span<Sym> symtab_;
  Span<Word> compat_hash_;
  Span<Addr> gnu_hash_;
  Addr soname_ = 0;
};

// This constructs a SymbolInfo that just contains a single undefined symbol.
// It can be used with a resolver function (see link.h and resolve.h).
template <class Elf>
class SymbolInfoForSingleLookup : public SymbolInfo<Elf> {
 public:
  using typename SymbolInfo<Elf>::Sym;

  constexpr SymbolInfoForSingleLookup() = default;

  constexpr SymbolInfoForSingleLookup(const SymbolInfoForSingleLookup&) = default;

  explicit constexpr SymbolInfoForSingleLookup(const char* name,
                                               ElfSymType type = ElfSymType::kNoType,
                                               ElfSymBind bind = ElfSymBind::kGlobal)
      : symbol_{.info = Sym::MakeInfo(bind, type)} {
    this->set_strtab({name, std::string_view{name}.size() + 1});
    this->set_symtab(cpp20::span{&symbol_, 1});
  }

  const Sym& symbol() const { return symbol_; }

 private:
  Sym symbol_;
};

}  // namespace elfldltl

#endif  // SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_SYMBOL_H_
# 447 "../../src/lib/elfldltl/include/lib/elfldltl/symbol.h"
#endif /* symbol.h expanded by -frewrite-includes */
# 11 "../../sdk/lib/ld/include/lib/ld/module.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <lib/stdcompat/span.h>
#endif /* expanded by -frewrite-includes */
# 11 "../../sdk/lib/ld/include/lib/ld/module.h"
# 12 "../../sdk/lib/ld/include/lib/ld/module.h"

#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 13 "../../sdk/lib/ld/include/lib/ld/module.h"
# 14 "../../sdk/lib/ld/include/lib/ld/module.h"
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 14 "../../sdk/lib/ld/include/lib/ld/module.h"
# 15 "../../sdk/lib/ld/include/lib/ld/module.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) /* abi.h expanded by -frewrite-includes */
#include "abi.h"
#else /* abi.h expanded by -frewrite-includes */
# 16 "../../sdk/lib/ld/include/lib/ld/module.h"
# 1 "../../sdk/lib/ld/include/lib/ld/abi.h" 1
// Copyright 2023 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef LIB_LD_ABI_H_
#define LIB_LD_ABI_H_

// This defines a common "passive" ABI that runtime code like a C library can
// use to interrogate basic dynamic linking details.  It's called a "passive"
// ABI because it exports almost no entry points, but only some immutable data
// structures and the ELF symbol names by which to find them.
//
// The traditional PT_INTERP dynamic linker sets up this data in memory while
// doing the initial-exec dynamic linking, and then makes it all read-only so
// it's guaranteed never to change again.  The runtime dynamic linking support
// (-ldl) can ingest this data into its own data structures and manage those
// to provide a richer runtime ABI.  Basic fallback implementations of simple
// support calls like dl_iterate_phdr and dlsym can be provided by the C
// library when libdl.so is not linked in.
//
// For out-of-process dynamic linking, a simple stub implementation of this
// same ABI can be loaded in lieu of the traditional dynamic linker, giving
// the same simple runtime ABI for data that is populated out of process.

#if 0 /* expanded by -frewrite-includes */
#include <lib/elfldltl/abi-ptr.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../sdk/lib/ld/include/lib/ld/abi.h"
# 26 "../../sdk/lib/ld/include/lib/ld/abi.h"
#if 0 /* expanded by -frewrite-includes */
#include <lib/elfldltl/abi-span.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../sdk/lib/ld/include/lib/ld/abi.h"
# 27 "../../sdk/lib/ld/include/lib/ld/abi.h"
#if 0 /* expanded by -frewrite-includes */
#include <lib/elfldltl/layout.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../sdk/lib/ld/include/lib/ld/abi.h"
# 28 "../../sdk/lib/ld/include/lib/ld/abi.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) /* soname.h expanded by -frewrite-includes */
#include <lib/elfldltl/soname.h>
#else /* soname.h expanded by -frewrite-includes */
# 28 "../../sdk/lib/ld/include/lib/ld/abi.h"
# 1 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h" 1
// Copyright 2022 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_SONAME_H_
#define SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_SONAME_H_

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cassert expanded by -frewrite-includes */
#include <cassert>
#else /* cassert expanded by -frewrite-includes */
# 8 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

/*
    cassert synopsis

Macros:

    assert

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3

// <assert.h> is not provided by libc++
#if 0 /* disabled by -frewrite-includes */
#if __has_include(<assert.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* assert.h expanded by -frewrite-includes */
#  include <assert.h>
#else /* assert.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
# 1 "gen/zircon/public/sysroot/cpp/include/assert.h" 1 3 4
#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 1 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
# 2 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

#undef assert

#ifdef NDEBUG
#define assert(x) (void)0
#else
# 8 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__), 0)))
#endif
# 10 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus) && !defined(static_assert)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 12 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
#define static_assert _Static_assert
#endif
# 14 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

#ifdef __cplusplus
extern "C" {
#endif
# 18 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

void __assert_fail(const char*, const char*, int, const char*);

#ifdef __cplusplus
}
#endif
# 24 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
#endif /* assert.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 2 3
#  ifdef _LIBCPP_ASSERT_H
#    error "If libc++ starts defining <assert.h>, the __has_include check should move to libc++'s <assert.h>"
#  endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#endif /* cassert expanded by -frewrite-includes */
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 9 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"
# 10 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"
#if 0 /* expanded by -frewrite-includes */
#include <string_view>
#endif /* expanded by -frewrite-includes */
# 10 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"
# 11 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 11 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"
# 12 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"

#if 0 /* expanded by -frewrite-includes */
#include "abi-ptr.h"
#endif /* expanded by -frewrite-includes */
# 13 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"
# 14 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"
#if 0 /* expanded by -frewrite-includes */
#include "abi-span.h"
#endif /* expanded by -frewrite-includes */
# 14 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"
# 15 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"
#if 0 /* expanded by -frewrite-includes */
#include "gnu-hash.h"
#endif /* expanded by -frewrite-includes */
# 15 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"
# 16 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"

namespace elfldltl {

// This provides an optimized type for holding a DT_SONAME / DT_NEEDED string.
// It always hashes the string to make equality comparisons faster.
template <class Elf = Elf<>, class AbiTraits = LocalAbiTraits>
class Soname {
 public:
  constexpr Soname() = default;

  constexpr Soname(const Soname&) = default;

  template <typename Ptr = AbiPtr<const char, Elf, AbiTraits>,
            typename = std::enable_if_t<std::is_constructible_v<Ptr, const char*>>>
  constexpr explicit Soname(std::string_view name)
      : name_(name.data()), size_(static_cast<uint32_t>(name.size())), hash_(GnuHashString(name)) {
    assert(size_ == name.size());
  }

  constexpr Soname& operator=(const Soname&) noexcept = default;

  template <typename Ptr = AbiPtr<const char, Elf, AbiTraits>,
            typename = std::enable_if_t<std::is_constructible_v<Ptr, const char*>>>
  constexpr Soname& operator=(std::string_view name) noexcept {
    *this = Soname{name};
    return *this;
  }

  template <typename Ptr = AbiPtr<const char, Elf, AbiTraits>, typename = decltype(Ptr{}.get())>
  constexpr std::string_view str() const {
    return {name_.get(), size_};
  }

  // This can only be used if the std::string_view used in construction is
  // known to point to a NUL-terminated string, such as a string literal or a
  // DT_STRTAB entry.
  template <typename Ptr = AbiPtr<const char, Elf, AbiTraits>, typename = decltype(Ptr{}.get())>
  constexpr const char* c_str() const {
    assert(name_.get()[size_] == '\0');
    return name_.get();
  }

  constexpr uint32_t hash() const { return hash_; }

  template <typename Ptr = AbiPtr<const char, Elf, AbiTraits>, typename = decltype(Ptr{}.get())>
  constexpr bool operator==(const Soname& other) const {
    return other.hash_ == hash_ && other.str() == str();
  }

  template <typename Ptr = AbiPtr<const char, Elf, AbiTraits>, typename = decltype(Ptr{}.get())>
  constexpr bool operator!=(const Soname& other) const {
    return other.hash_ != hash_ || other.str() != str();
  }

#if 0 /* disabled by -frewrite-includes */
#if __cpp_impl_three_way_comparison >= 201907L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 71 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"

  template <typename Ptr = AbiPtr<const char, Elf, AbiTraits>, typename = decltype(Ptr{}.get())>
  constexpr auto operator<=>(const Soname& other) const {
    return str() <=> other.str();
  }

#else  // No operator<=>.
# 78 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"

  template <typename Ptr = AbiPtr<const char, Elf, AbiTraits>, typename = decltype(Ptr{}.get())>
  constexpr bool operator<(const Soname& other) const {
    return str() < other.str();
  }

  template <typename Ptr = AbiPtr<const char, Elf, AbiTraits>, typename = decltype(Ptr{}.get())>
  constexpr bool operator<=(const Soname& other) const {
    return str() <= other.str();
  }

  template <typename Ptr = AbiPtr<const char, Elf, AbiTraits>, typename = decltype(Ptr{}.get())>
  constexpr bool operator>(const Soname& other) const {
    return str() > other.str();
  }

  template <typename Ptr = AbiPtr<const char, Elf, AbiTraits>, typename = decltype(Ptr{}.get())>
  constexpr bool operator>=(const Soname& other) const {
    return str() >= other.str();
  }

#endif  // operator<=>
# 100 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"

 private:
  // This stores a pointer and 32-bit length directly rather than just using
  // std::string_view so that the whole object is still only two 64-bit words.
  // Crucially, both x86-64 and AArch64 ABIs pass and return trivial two-word
  // objects in registers but anything larger in memory, so this keeps passing
  // Soname as cheap as passing std::string_view.  This limits lengths to 4GiB,
  // which is far more than the practical limit.
  AbiPtr<const char, Elf, AbiTraits> name_;
  typename Elf::Word size_ = 0;
  typename Elf::Word hash_ = 0;
};

}  // namespace elfldltl

#endif  // SRC_LIB_ELFLDLTL_INCLUDE_LIB_ELFLDLTL_SONAME_H_
# 116 "../../src/lib/elfldltl/include/lib/elfldltl/soname.h"
#endif /* soname.h expanded by -frewrite-includes */
# 29 "../../sdk/lib/ld/include/lib/ld/abi.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <lib/elfldltl/svr4-abi.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../sdk/lib/ld/include/lib/ld/abi.h"
# 30 "../../sdk/lib/ld/include/lib/ld/abi.h"
#if 0 /* expanded by -frewrite-includes */
#include <lib/elfldltl/symbol.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../sdk/lib/ld/include/lib/ld/abi.h"
# 31 "../../sdk/lib/ld/include/lib/ld/abi.h"

#if 0 /* expanded by -frewrite-includes */
#include <string_view>
#endif /* expanded by -frewrite-includes */
# 32 "../../sdk/lib/ld/include/lib/ld/abi.h"
# 33 "../../sdk/lib/ld/include/lib/ld/abi.h"

namespace ld::abi {

template <class Elf = elfldltl::Elf<>, class AbiTraits = elfldltl::LocalAbiTraits>
struct Abi {
  // Aliases to avoid using `typename` all over the place.
  using Word = typename Elf::Word;
  using Addr = typename Elf::Addr;
  using Phdr = typename Elf::Phdr;
  using LinkMap = typename Elf::template LinkMap<AbiTraits>;
  using RDebug = typename Elf::template RDebug<AbiTraits>;

  // All pointer members in Abi and inner types must use Ptr<T> in place of T*.
  template <typename T>
  using Ptr = elfldltl::AbiPtr<T, Elf, AbiTraits>;

  // Members in Abi and inner types use Span<T> in place of std::span<T>.
  template <typename T, size_t N = cpp20::dynamic_extent>
  using Span = elfldltl::AbiSpan<T, N, Elf, AbiTraits>;

  // This is a shorthand for instantiating the elfldltl types that take Elf and
  // AbiTraits template parameters, such as elfldltl::SymbolInfo.
  template <template <class, class> class Class>
  using Type = Class<Elf, AbiTraits>;

  // Forward declaration for type declared in module.h.
  struct Module;

  // This lists all the initial-exec modules.  Embedded `link_map::l_prev` and
  // `link_map::l_next` form a doubly-linked list in load order, which is a
  // breadth-first pre-order of the DT_NEEDED dependencies where the main
  // executable is always first and dependents always precede dependencies
  // (except for any redundancies).
  Ptr<const Module> loaded_modules;

  // TODO(fxbug.dev/128502): TLS layout details
};

// This is the DT_SONAME value representing the ABI declared in this file.
inline constexpr elfldltl::Soname<> kSoname{"ld.so.1"};

// This is the standard PT_INTERP value for using a compatible dynamic linker
// as the startup dynamic linker.  The actual PT_INTERP value in an executable
// ET_DYN file might have a prefix to select a particular implementation.
inline constexpr std::string_view kInterp = kSoname.str();

// These are the sole exported symbols, with hash values cached statically.
inline constexpr elfldltl::SymbolName kAbiSymbol{"_ld_abi"};
inline constexpr elfldltl::SymbolName kRDebugSymbol{"_r_debug"};

// These are the sole exported symbols in the ld.so ABI.  They should be used
// in C++ via their scoped names such as ld::_ld_abi normally.  But the ld.so
// symbolic ABI does not include any C++ name mangling, so they use simple C
// linkage names in the name space reserved for the implementation.

extern "C" {

// This is the single hook to find the ld.so passive ABI described above.
extern const Abi<> _ld_abi;

// This is not meant to be used as part of the passive ABI, really.  However,
// traditionally debuggers expect to find it as a symbol in the dynamic linker,
// and exporting it makes sure they can even without debugging symbols.
extern const Abi<>::RDebug _r_debug;

}  // extern "C"

}  // namespace ld::abi

#endif  // LIB_LD_ABI_H_
# 103 "../../sdk/lib/ld/include/lib/ld/abi.h"
#endif /* abi.h expanded by -frewrite-includes */
# 17 "../../sdk/lib/ld/include/lib/ld/module.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "internal/filter-view.h"
#endif /* expanded by -frewrite-includes */
# 17 "../../sdk/lib/ld/include/lib/ld/module.h"
# 18 "../../sdk/lib/ld/include/lib/ld/module.h"

namespace ld {
namespace abi {

// ld::abi::Abi::Module holds all the information about an ELF module that's
// still relevant at runtime after it's been loaded and dynamically linked.
// This is enough for basic dl_iterate_phdr and dlsym implementations and the
// like to interrogate the iniital-exec set of modules.  A runtime loading
// implementation can also provide data about runtime modules in this format.
//
// This type is defined in the ld::abi namespace because these layouts form
// part of the quasi-public, quasi-stable "passive" data ABI between startup or
// OOP dynamic linking and other runtime dynamic linking support code that
// might live in libc.so or libdl.so.  Note that this brings a few toolkit API
// types, which are not otherwise presumed ABI stable nor even public outside a
// single module, into the ld::abi regime for quasi-public, quasi-stable ABI.
//
// The leading portion of ld::abi::Abi::Module matches the long-standing de
// facto standard ABI layout of `struct link_map` from SVR4.  The doubly-linked
// list structure of `link_map::l_prev` and `link_map::l_next` is maintained to
// navigate the initial-exec set in load order (which is also symbol resolution
// precedence order for standard initial-exec symbol resolution).  The pointers
// are actually to ld::abi::Module structures with leading `link_map` portions.
// Maintaining this traditional format for all loaded modules in the process
// memory image can enable debuggers that know the de facto standard format to
// decode the `link_map` list found in the traditional `struct r_debug`.

template <class Elf, class AbiTraits>
struct Abi<Elf, AbiTraits>::Module {
  constexpr Module() = default;

  constexpr explicit Module(elfldltl::LinkerZeroInitialized)
      : symbols(elfldltl::kLinkerZeroInitialized) {}

  constexpr void InitLinkerZeroInitialized() { symbols.InitLinkerZeroInitialized(); }

  // This is known to be the first member in the struct layout.  It forms the
  // old de facto ABI from SVR4 (traditionally `struct link_map` in <link.h>)
  // for enumerating the modules and their load/symbol-resolution order through
  // its doubly-linked list structure.  It also holds the load bias (.addr); a
  // pointer (.name) to the NUL-terminated DT_SONAME (or other) name string by
  // which the module was loaded; and a pointer (.ld) to the absolute runtime
  // address of the PT_DYNAMIC segment (aka .dynamic section) in this module's
  // load image.  The .dynamic data has already been parsed and validated so
  // it's safe to rely on the DT_NULL terminator being found by iteration.
  //
  // It's traditional for dynamic linkers to use this well-known format as the
  // leading portion of their own internal data structure.  For example, some
  // users may assume that the void* value returned by `dlopen` is in fact the
  // `struct link_map*` for the module just fetched.  This is not good practice
  // and no standard or documentation has ever made guarantees about the void*
  // values used in <dlfcn.h> interfaces being used in any such ways.  But it
  // makes sense that we follow suit here.  The `struct link_map` list serves
  // as the ld::abi::Module list as well.
  LinkMap link_map;

  // The rest of the ld::abi::Module layout is a distinct extension that doesdsy
  // not overlap with any historical ABI.  (Traditional uses that have longer
  // data structures prefixed with `struct link_map` are all private formats.)
  //
  // However, it does form the core of the quasi-public, quasi-stable ABI for
  // ld.so; see <lib/ld/abi.h> for full details on the ABI stability model.

  // This module's whole-page load image occupies the absolute virtual address
  // range [vaddr_start, vaddr_end).  The vaddr_start value is most often
  // redundant with link_map.addr (the load bias), but is not required to be.
  Addr vaddr_start = 0;
  Addr vaddr_end = 0;

  // This points to the module's program headers in some read-only memory,
  // usually in its own load image as located by PT_PHDR.  (The span may be
  // empty if the program headers are not visible in memory, and this won't
  // always prevent a module from being loaded.  But any such unusual modules
  // with that limitation may have unexpected behavior due to their metadata
  // pointers such as PT_GNU_EH_FRAME not being found at runtime.)
  Span<const Phdr> phdrs;

  // This collects information about the dynamic symbol table and can be
  // used to look up symbols.  See <lib/elfldltl/symbol.h> for details.
  Type<elfldltl::SymbolInfo> symbols;

  // Cached and hashed for quick comparison; possibly empty.
  Type<elfldltl::Soname> soname;

  // This lists the initializer functions this module expects to have run after
  // it's loaded.  This information isn't really needed after startup (or later
  // dynamic module loading).  But some means is needed to communicate this
  // information from the dynamic linker that gleans (and relocates) it to the
  // runtime code that calls initializers after C library setup.  The read-only
  // module data here is the means already at hand, and this data is only a few
  // words.  So it's just kept here permanently with everything else.
  Type<elfldltl::InitFiniInfo> init;

  // This lists the finalizer functions this module expects to have run at
  // program exit or when it's dynamically unloaded (if that's possible).
  Type<elfldltl::InitFiniInfo> fini;

  // TODO(fxbug.dev/128502): TLS module ID

  // This is true if the module participates in symbolic resolution. If false,
  // the module will still be part of the unwinding domain, and therefore will
  // still be visible to dl_iterate_phdr.
  bool symbols_visible = false;

  // Each and every module gets a "module ID" number that's used in symbolizer
  // markup contextual elements describing the module.  These are expected to
  // be arbitrary integers, probably small, that are unique within the process
  // at a given moment.  The initial-exec dynamic linker assigns monotonically
  // increasing numbers to each module in the order they're loaded and linked
  // via the `link_map` member above, from zero.  For additional runtime-loaded
  // modules, it's reasonable to take the tail initial-exec module's ID and
  // increase from there for every new module loaded, without reusing old IDs
  // when modules are unloaded.
  Word symbolizer_modid = 0;

  // If nonempty, this is the (first) NT_GNU_BUILD_ID note payload (not
  // including Elf::Nhdr or name parts): just the build ID bytes themselves.
  // This is simply the result of parsing PT_NOTE segments in the phdrs that
  // presumably point to read-only data in the module's load image, which can
  // always be repeated; this just caches the parsing result from load time.
  Span<const std::byte> build_id;
};

}  // namespace abi

// This provides a container-like view on the doubly-linked list of modules.
template <class Elf = elfldltl::Elf<>>
using AbiModuleList = elfldltl::LinkMapList<
    const typename abi::Abi<Elf>::Module,
    elfldltl::LinkMapListInFirstMemberTraits<const typename abi::Abi<Elf>::Module>>;

// This returns the ld::AbiModuleList for an ld::Abi::Abi<>.
template <class Elf = elfldltl::Elf<>>
constexpr AbiModuleList<Elf> AbiLoadedModules(const abi::Abi<Elf>& abi) {
  return AbiModuleList<Elf>(abi.loaded_modules.get());
}

// This returns a view similar to AbiModuleList, but only for modules where
// symbols_visible is true.
template <class Elf = elfldltl::Elf<>>
constexpr auto AbiLoadedSymbolModules(const abi::Abi<Elf>& abi) {
  using Module = typename abi::Abi<Elf>::Module;
  return ld::internal::filter_view{AbiLoadedModules(abi), &Module::symbols_visible};
}

}  // namespace ld

#endif  // LIB_LD_MODULE_H_
# 166 "../../sdk/lib/ld/include/lib/ld/module.h"
#endif /* module.h expanded by -frewrite-includes */
# 8 "../../sdk/lib/ld/test/filter-view-tests.cc" 2

#if 0 /* expanded by -frewrite-includes */
#include <iterator>
#endif /* expanded by -frewrite-includes */
# 9 "../../sdk/lib/ld/test/filter-view-tests.cc"
# 10 "../../sdk/lib/ld/test/filter-view-tests.cc"
#if 0 /* expanded by -frewrite-includes */
#include <ranges>
#endif /* expanded by -frewrite-includes */
# 10 "../../sdk/lib/ld/test/filter-view-tests.cc"
# 11 "../../sdk/lib/ld/test/filter-view-tests.cc"
#if 0 /* expanded by -frewrite-includes */
#include <utility>
#endif /* expanded by -frewrite-includes */
# 11 "../../sdk/lib/ld/test/filter-view-tests.cc"
# 12 "../../sdk/lib/ld/test/filter-view-tests.cc"

#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest.h expanded by -frewrite-includes */
#include <gtest/gtest.h>
#else /* gtest.h expanded by -frewrite-includes */
# 13 "../../sdk/lib/ld/test/filter-view-tests.cc"
# 1 "../../third_party/googletest/src/googletest/include/gtest/gtest.h" 1
// Copyright 2005, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// The Google C++ Testing and Mocking Framework (Google Test)
//
// This header file defines the public API for Google Test.  It should be
// included by any test program that uses Google Test.
//
// IMPORTANT NOTE: Due to limitation of the C++ language, we have to
// leave some internal implementation details in this header file.
// They are clearly marked by comments like this:
//
//   // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
//
// Such code is NOT meant to be used by a user directly, and is subject
// to CHANGE WITHOUT NOTICE.  Therefore DO NOT DEPEND ON IT in a user
// program!
//
// Acknowledgment: Google Test borrowed the idea of automatic test
// registration from Barthelemy Dagenais' (barthelemy@prologique.com)
// easyUnit framework.

#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_H_
#define GOOGLETEST_INCLUDE_GTEST_GTEST_H_

#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 52 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 53 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 53 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 54 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#if 0 /* expanded by -frewrite-includes */
#include <memory>
#endif /* expanded by -frewrite-includes */
# 54 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 55 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ostream expanded by -frewrite-includes */
#include <ostream>
#else /* ostream expanded by -frewrite-includes */
# 55 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_OSTREAM
#define _LIBCPP_OSTREAM

/*
    ostream synopsis

template <class charT, class traits = char_traits<charT> >
class basic_ostream
    : virtual public basic_ios<charT,traits>
{
public:
    // types (inherited from basic_ios (27.5.4)):
    typedef charT                          char_type;
    typedef traits                         traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;

    // 27.7.2.2 Constructor/destructor:
    explicit basic_ostream(basic_streambuf<char_type,traits>* sb);
    basic_ostream(basic_ostream&& rhs);
    virtual ~basic_ostream();

    // 27.7.2.3 Assign/swap
    basic_ostream& operator=(const basic_ostream& rhs) = delete; // C++14
    basic_ostream& operator=(basic_ostream&& rhs);
    void swap(basic_ostream& rhs);

    // 27.7.2.4 Prefix/suffix:
    class sentry;

    // 27.7.2.6 Formatted output:
    basic_ostream& operator<<(basic_ostream& (*pf)(basic_ostream&));
    basic_ostream& operator<<(basic_ios<charT, traits>& (*pf)(basic_ios<charT,traits>&));
    basic_ostream& operator<<(ios_base& (*pf)(ios_base&));
    basic_ostream& operator<<(bool n);
    basic_ostream& operator<<(short n);
    basic_ostream& operator<<(unsigned short n);
    basic_ostream& operator<<(int n);
    basic_ostream& operator<<(unsigned int n);
    basic_ostream& operator<<(long n);
    basic_ostream& operator<<(unsigned long n);
    basic_ostream& operator<<(long long n);
    basic_ostream& operator<<(unsigned long long n);
    basic_ostream& operator<<(float f);
    basic_ostream& operator<<(double f);
    basic_ostream& operator<<(long double f);
    basic_ostream& operator<<(const void* p);
    basic_ostream& operator<<(const volatile void* val); // C++23
    basic_ostream& operator<<(basic_streambuf<char_type,traits>* sb);
    basic_ostream& operator<<(nullptr_t);

    // 27.7.2.7 Unformatted output:
    basic_ostream& put(char_type c);
    basic_ostream& write(const char_type* s, streamsize n);
    basic_ostream& flush();

    // 27.7.2.5 seeks:
    pos_type tellp();
    basic_ostream& seekp(pos_type);
    basic_ostream& seekp(off_type, ios_base::seekdir);
protected:
    basic_ostream(const basic_ostream& rhs) = delete;
    basic_ostream(basic_ostream&& rhs);
    // 27.7.3.3 Assign/swap
    basic_ostream& operator=(basic_ostream& rhs) = delete;
    basic_ostream& operator=(const basic_ostream&& rhs);
    void swap(basic_ostream& rhs);
};

// 27.7.2.6.4 character inserters

template<class charT, class traits>
  basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&, charT);

template<class charT, class traits>
  basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&, char);

template<class traits>
  basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, char);

// signed and unsigned

template<class traits>
  basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, signed char);

template<class traits>
  basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, unsigned char);

// NTBS
template<class charT, class traits>
  basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&, const charT*);

template<class charT, class traits>
  basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&, const char*);

template<class traits>
  basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, const char*);

// signed and unsigned
template<class traits>
basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, const signed char*);

template<class traits>
  basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, const unsigned char*);

// swap:
template <class charT, class traits>
  void swap(basic_ostream<charT, traits>& x, basic_ostream<charT, traits>& y);

template <class charT, class traits>
  basic_ostream<charT,traits>& endl(basic_ostream<charT,traits>& os);

template <class charT, class traits>
  basic_ostream<charT,traits>& ends(basic_ostream<charT,traits>& os);

template <class charT, class traits>
  basic_ostream<charT,traits>& flush(basic_ostream<charT,traits>& os);

// rvalue stream insertion
template <class Stream, class T>
  Stream&& operator<<(Stream&& os, const T& x);

template<class traits>
basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, wchar_t) = delete;               // since C++20
template<class traits>
basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, char8_t) = delete;               // since C++20
template<class traits>
basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, char16_t) = delete;              // since C++20
template<class traits>
basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, char32_t) = delete;              // since C++20
template<class traits>
basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, char8_t) = delete;         // since C++20
template<class traits>
basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, char16_t) = delete;        // since C++20
template<class traits>
basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, char32_t) = delete;        // since C++20
template<class traits>
basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const wchar_t*) = delete;        // since C++20
template<class traits>
basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const char8_t*) = delete;        // since C++20
template<class traits>
basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const char16_t*) = delete;       // since C++20
template<class traits>
basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const char32_t*) = delete;       // since C++20
template<class traits>
basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, const char8_t*) = delete;  // since C++20
template<class traits>
basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, const char16_t*) = delete; // since C++20
template<class traits>
basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, const char32_t*) = delete; // since C++20

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 166 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 167 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 167 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 168 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* operations.h expanded by -frewrite-includes */
#include <__exception/operations.h>
#else /* operations.h expanded by -frewrite-includes */
# 168 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/operations.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___EXCEPTION_OPERATIONS_H
#define _LIBCPP___EXCEPTION_OPERATIONS_H

#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/operations.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/operations.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/operations.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/operations.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/operations.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/operations.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/operations.h" 3

namespace std { // purposefully not using versioning namespace
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS) ||                             \
    defined(_LIBCPP_BUILDING_LIBRARY)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/operations.h" 3
using unexpected_handler = void (*)();
_LIBCPP_EXPORTED_FROM_ABI unexpected_handler set_unexpected(unexpected_handler) _NOEXCEPT;
_LIBCPP_EXPORTED_FROM_ABI unexpected_handler get_unexpected() _NOEXCEPT;
_LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void unexpected();
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/operations.h" 3

using terminate_handler = void (*)();
_LIBCPP_EXPORTED_FROM_ABI terminate_handler set_terminate(terminate_handler) _NOEXCEPT;
_LIBCPP_EXPORTED_FROM_ABI terminate_handler get_terminate() _NOEXCEPT;

_LIBCPP_EXPORTED_FROM_ABI bool uncaught_exception() _NOEXCEPT;
_LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS int uncaught_exceptions() _NOEXCEPT;

class _LIBCPP_EXPORTED_FROM_ABI exception_ptr;

_LIBCPP_EXPORTED_FROM_ABI exception_ptr current_exception() _NOEXCEPT;
_LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void rethrow_exception(exception_ptr);
} // namespace std

#endif // _LIBCPP___EXCEPTION_OPERATIONS_H
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__exception/operations.h" 3
#endif /* operations.h expanded by -frewrite-includes */
# 169 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/ostream.h>
#endif /* expanded by -frewrite-includes */
# 169 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 170 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/shared_ptr.h>
#endif /* expanded by -frewrite-includes */
# 170 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 171 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/unique_ptr.h>
#endif /* expanded by -frewrite-includes */
# 171 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 172 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* error_code.h expanded by -frewrite-includes */
#include <__system_error/error_code.h>
#else /* error_code.h expanded by -frewrite-includes */
# 172 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___SYSTEM_ERROR_ERROR_CODE_H
#define _LIBCPP___SYSTEM_ERROR_ERROR_CODE_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/hash.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* errc.h expanded by -frewrite-includes */
#include <__system_error/errc.h>
#else /* errc.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ERRC
#define _LIBCPP___ERRC

/*
    system_error synopsis

namespace std
{

enum class errc
{
    address_family_not_supported,       // EAFNOSUPPORT
    address_in_use,                     // EADDRINUSE
    address_not_available,              // EADDRNOTAVAIL
    already_connected,                  // EISCONN
    argument_list_too_long,             // E2BIG
    argument_out_of_domain,             // EDOM
    bad_address,                        // EFAULT
    bad_file_descriptor,                // EBADF
    bad_message,                        // EBADMSG
    broken_pipe,                        // EPIPE
    connection_aborted,                 // ECONNABORTED
    connection_already_in_progress,     // EALREADY
    connection_refused,                 // ECONNREFUSED
    connection_reset,                   // ECONNRESET
    cross_device_link,                  // EXDEV
    destination_address_required,       // EDESTADDRREQ
    device_or_resource_busy,            // EBUSY
    directory_not_empty,                // ENOTEMPTY
    executable_format_error,            // ENOEXEC
    file_exists,                        // EEXIST
    file_too_large,                     // EFBIG
    filename_too_long,                  // ENAMETOOLONG
    function_not_supported,             // ENOSYS
    host_unreachable,                   // EHOSTUNREACH
    identifier_removed,                 // EIDRM
    illegal_byte_sequence,              // EILSEQ
    inappropriate_io_control_operation, // ENOTTY
    interrupted,                        // EINTR
    invalid_argument,                   // EINVAL
    invalid_seek,                       // ESPIPE
    io_error,                           // EIO
    is_a_directory,                     // EISDIR
    message_size,                       // EMSGSIZE
    network_down,                       // ENETDOWN
    network_reset,                      // ENETRESET
    network_unreachable,                // ENETUNREACH
    no_buffer_space,                    // ENOBUFS
    no_child_process,                   // ECHILD
    no_link,                            // ENOLINK
    no_lock_available,                  // ENOLCK
    no_message_available,               // ENODATA
    no_message,                         // ENOMSG
    no_protocol_option,                 // ENOPROTOOPT
    no_space_on_device,                 // ENOSPC
    no_stream_resources,                // ENOSR
    no_such_device_or_address,          // ENXIO
    no_such_device,                     // ENODEV
    no_such_file_or_directory,          // ENOENT
    no_such_process,                    // ESRCH
    not_a_directory,                    // ENOTDIR
    not_a_socket,                       // ENOTSOCK
    not_a_stream,                       // ENOSTR
    not_connected,                      // ENOTCONN
    not_enough_memory,                  // ENOMEM
    not_supported,                      // ENOTSUP
    operation_canceled,                 // ECANCELED
    operation_in_progress,              // EINPROGRESS
    operation_not_permitted,            // EPERM
    operation_not_supported,            // EOPNOTSUPP
    operation_would_block,              // EWOULDBLOCK
    owner_dead,                         // EOWNERDEAD
    permission_denied,                  // EACCES
    protocol_error,                     // EPROTO
    protocol_not_supported,             // EPROTONOSUPPORT
    read_only_file_system,              // EROFS
    resource_deadlock_would_occur,      // EDEADLK
    resource_unavailable_try_again,     // EAGAIN
    result_out_of_range,                // ERANGE
    state_not_recoverable,              // ENOTRECOVERABLE
    stream_timeout,                     // ETIME
    text_file_busy,                     // ETXTBSY
    timed_out,                          // ETIMEDOUT
    too_many_files_open_in_system,      // ENFILE
    too_many_files_open,                // EMFILE
    too_many_links,                     // EMLINK
    too_many_symbolic_link_levels,      // ELOOP
    value_too_large,                    // EOVERFLOW
    wrong_protocol_type                 // EPROTOTYPE
};

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 3
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cerrno expanded by -frewrite-includes */
#include <cerrno>
#else /* cerrno expanded by -frewrite-includes */
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cerrno" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CERRNO
#define _LIBCPP_CERRNO

/*
    cerrno synopsis

Macros:

    EDOM
    EILSEQ  // C99
    ERANGE
    errno

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cerrno" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cerrno" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cerrno" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cerrno" 3

#if 0 /* expanded by -frewrite-includes */
#include <errno.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cerrno" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cerrno" 3

#ifndef _LIBCPP_ERRNO_H
#   error <cerrno> tried including <errno.h> but didn't find libc++'s <errno.h> header. \
          This usually means that your header search paths are not configured properly. \
          The header search paths should contain the C++ Standard Library headers before \
          any C Standard Library, and you are probably using compiler flags that make that \
          not be the case.
#endif
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cerrno" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cerrno" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cerrno" 3
#endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cerrno" 3

#endif // _LIBCPP_CERRNO
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cerrno" 3
#endif /* cerrno expanded by -frewrite-includes */
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 3
#endif
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Some error codes are not present on all platforms, so we provide equivalents
// for them:

//enum class errc
_LIBCPP_DECLARE_STRONG_ENUM(errc)
{
    address_family_not_supported        = EAFNOSUPPORT,
    address_in_use                      = EADDRINUSE,
    address_not_available               = EADDRNOTAVAIL,
    already_connected                   = EISCONN,
    argument_list_too_long              = E2BIG,
    argument_out_of_domain              = EDOM,
    bad_address                         = EFAULT,
    bad_file_descriptor                 = EBADF,
    bad_message                         = EBADMSG,
    broken_pipe                         = EPIPE,
    connection_aborted                  = ECONNABORTED,
    connection_already_in_progress      = EALREADY,
    connection_refused                  = ECONNREFUSED,
    connection_reset                    = ECONNRESET,
    cross_device_link                   = EXDEV,
    destination_address_required        = EDESTADDRREQ,
    device_or_resource_busy             = EBUSY,
    directory_not_empty                 = ENOTEMPTY,
    executable_format_error             = ENOEXEC,
    file_exists                         = EEXIST,
    file_too_large                      = EFBIG,
    filename_too_long                   = ENAMETOOLONG,
    function_not_supported              = ENOSYS,
    host_unreachable                    = EHOSTUNREACH,
    identifier_removed                  = EIDRM,
    illegal_byte_sequence               = EILSEQ,
    inappropriate_io_control_operation  = ENOTTY,
    interrupted                         = EINTR,
    invalid_argument                    = EINVAL,
    invalid_seek                        = ESPIPE,
    io_error                            = EIO,
    is_a_directory                      = EISDIR,
    message_size                        = EMSGSIZE,
    network_down                        = ENETDOWN,
    network_reset                       = ENETRESET,
    network_unreachable                 = ENETUNREACH,
    no_buffer_space                     = ENOBUFS,
    no_child_process                    = ECHILD,
    no_link                             = ENOLINK,
    no_lock_available                   = ENOLCK,
#ifdef ENODATA
    no_message_available                = ENODATA,
#else
# 161 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 3
    no_message_available                = ENOMSG,
#endif
# 163 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 3
    no_message                          = ENOMSG,
    no_protocol_option                  = ENOPROTOOPT,
    no_space_on_device                  = ENOSPC,
#ifdef ENOSR
    no_stream_resources                 = ENOSR,
#else
# 169 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 3
    no_stream_resources                 = ENOMEM,
#endif
# 171 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 3
    no_such_device_or_address           = ENXIO,
    no_such_device                      = ENODEV,
    no_such_file_or_directory           = ENOENT,
    no_such_process                     = ESRCH,
    not_a_directory                     = ENOTDIR,
    not_a_socket                        = ENOTSOCK,
#ifdef ENOSTR
    not_a_stream                        = ENOSTR,
#else
# 180 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 3
    not_a_stream                        = EINVAL,
#endif
# 182 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 3
    not_connected                       = ENOTCONN,
    not_enough_memory                   = ENOMEM,
    not_supported                       = ENOTSUP,
    operation_canceled                  = ECANCELED,
    operation_in_progress               = EINPROGRESS,
    operation_not_permitted             = EPERM,
    operation_not_supported             = EOPNOTSUPP,
    operation_would_block               = EWOULDBLOCK,
    owner_dead                          = EOWNERDEAD,
    permission_denied                   = EACCES,
    protocol_error                      = EPROTO,
    protocol_not_supported              = EPROTONOSUPPORT,
    read_only_file_system               = EROFS,
    resource_deadlock_would_occur       = EDEADLK,
    resource_unavailable_try_again      = EAGAIN,
    result_out_of_range                 = ERANGE,
    state_not_recoverable               = ENOTRECOVERABLE,
#ifdef ETIME
    stream_timeout                      = ETIME,
#else
# 202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 3
    stream_timeout                      = ETIMEDOUT,
#endif
# 204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 3
    text_file_busy                      = ETXTBSY,
    timed_out                           = ETIMEDOUT,
    too_many_files_open_in_system       = ENFILE,
    too_many_files_open                 = EMFILE,
    too_many_links                      = EMLINK,
    too_many_symbolic_link_levels       = ELOOP,
    value_too_large                     = EOVERFLOW,
    wrong_protocol_type                 = EPROTOTYPE
};
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(errc)

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ERRC
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/errc.h" 3
#endif /* errc.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* error_category.h expanded by -frewrite-includes */
#include <__system_error/error_category.h>
#else /* error_category.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___SYSTEM_ERROR_ERROR_CATEGORY_H
#define _LIBCPP___SYSTEM_ERROR_ERROR_CATEGORY_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* string expanded by -frewrite-includes */
#include <string>
#else /* string expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_STRING
#define _LIBCPP_STRING

/*
    string synopsis

#include <compare>
#include <initializer_list>

namespace std
{

template <class stateT>
class fpos
{
private:
    stateT st;
public:
    fpos(streamoff = streamoff());

    operator streamoff() const;

    stateT state() const;
    void state(stateT);

    fpos& operator+=(streamoff);
    fpos  operator+ (streamoff) const;
    fpos& operator-=(streamoff);
    fpos  operator- (streamoff) const;
};

template <class stateT> streamoff operator-(const fpos<stateT>& x, const fpos<stateT>& y);

template <class stateT> bool operator==(const fpos<stateT>& x, const fpos<stateT>& y);
template <class stateT> bool operator!=(const fpos<stateT>& x, const fpos<stateT>& y);

template <class charT>
struct char_traits
{
    using char_type           = charT;
    using int_type            = ...;
    using off_type            = streamoff;
    using pos_type            = streampos;
    using state_type          = mbstate_t;
    using comparison_category = strong_ordering; // Since C++20 only for the specializations
                                                 // char, wchar_t, char8_t, char16_t, and char32_t.

    static void assign(char_type& c1, const char_type& c2) noexcept;
    static constexpr bool eq(char_type c1, char_type c2) noexcept;
    static constexpr bool lt(char_type c1, char_type c2) noexcept;

    static int              compare(const char_type* s1, const char_type* s2, size_t n);
    static size_t           length(const char_type* s);
    static const char_type* find(const char_type* s, size_t n, const char_type& a);
    static char_type*       move(char_type* s1, const char_type* s2, size_t n);
    static char_type*       copy(char_type* s1, const char_type* s2, size_t n);
    static char_type*       assign(char_type* s, size_t n, char_type a);

    static constexpr int_type  not_eof(int_type c) noexcept;
    static constexpr char_type to_char_type(int_type c) noexcept;
    static constexpr int_type  to_int_type(char_type c) noexcept;
    static constexpr bool      eq_int_type(int_type c1, int_type c2) noexcept;
    static constexpr int_type  eof() noexcept;
};

template <> struct char_traits<char>;
template <> struct char_traits<wchar_t>;
template <> struct char_traits<char8_t>;  // C++20
template <> struct char_traits<char16_t>;
template <> struct char_traits<char32_t>;

template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
class basic_string
{
public:
// types:
    typedef traits traits_type;
    typedef typename traits_type::char_type value_type;
    typedef Allocator allocator_type;
    typedef typename allocator_type::size_type size_type;
    typedef typename allocator_type::difference_type difference_type;
    typedef typename allocator_type::reference reference;
    typedef typename allocator_type::const_reference const_reference;
    typedef typename allocator_type::pointer pointer;
    typedef typename allocator_type::const_pointer const_pointer;
    typedef implementation-defined iterator;
    typedef implementation-defined const_iterator;
    typedef std::reverse_iterator<iterator> reverse_iterator;
    typedef std::reverse_iterator<const_iterator> const_reverse_iterator;

    static const size_type npos = -1;

    basic_string()
        noexcept(is_nothrow_default_constructible<allocator_type>::value);                      // constexpr since C++20
    explicit basic_string(const allocator_type& a);                                             // constexpr since C++20
    basic_string(const basic_string& str);                                                      // constexpr since C++20
    basic_string(basic_string&& str)
        noexcept(is_nothrow_move_constructible<allocator_type>::value);                         // constexpr since C++20
    basic_string(const basic_string& str, size_type pos,
                 const allocator_type& a = allocator_type());                                   // constexpr since C++20
    basic_string(const basic_string& str, size_type pos, size_type n,
                 const Allocator& a = Allocator());                                             // constexpr since C++20
    constexpr basic_string(
        basic_string&& str, size_type pos, const Allocator& a = Allocator());                   // since C++23
    constexpr basic_string(
        basic_string&& str, size_type pos, size_type n, const Allocator& a = Allocator());      // since C++23
    template<class T>
        basic_string(const T& t, size_type pos, size_type n, const Allocator& a = Allocator()); // C++17, constexpr since C++20
    template <class T>
        explicit basic_string(const T& t, const Allocator& a = Allocator());                    // C++17, constexpr since C++20
    basic_string(const value_type* s, const allocator_type& a = allocator_type());              // constexpr since C++20
    basic_string(const value_type* s, size_type n, const allocator_type& a = allocator_type()); // constexpr since C++20
    basic_string(nullptr_t) = delete; // C++23
    basic_string(size_type n, value_type c, const allocator_type& a = allocator_type());        // constexpr since C++20
    template<class InputIterator>
        basic_string(InputIterator begin, InputIterator end,
                     const allocator_type& a = allocator_type());                               // constexpr since C++20
    template<container-compatible-range<charT> R>
      constexpr basic_string(from_range_t, R&& rg, const Allocator& a = Allocator());           // since C++23
    basic_string(initializer_list<value_type>, const Allocator& = Allocator());                 // constexpr since C++20
    basic_string(const basic_string&, const Allocator&);                                        // constexpr since C++20
    basic_string(basic_string&&, const Allocator&);                                             // constexpr since C++20

    ~basic_string();                                                                            // constexpr since C++20

    operator basic_string_view<charT, traits>() const noexcept;                                 // constexpr since C++20

    basic_string& operator=(const basic_string& str);                                           // constexpr since C++20
    template <class T>
        basic_string& operator=(const T& t);                                                    // C++17, constexpr since C++20
    basic_string& operator=(basic_string&& str)
        noexcept(
             allocator_type::propagate_on_container_move_assignment::value ||
             allocator_type::is_always_equal::value );                                          // C++17, constexpr since C++20
    basic_string& operator=(const value_type* s);                                               // constexpr since C++20
    basic_string& operator=(nullptr_t) = delete; // C++23
    basic_string& operator=(value_type c);                                                      // constexpr since C++20
    basic_string& operator=(initializer_list<value_type>);                                      // constexpr since C++20

    iterator       begin() noexcept;                                                            // constexpr since C++20
    const_iterator begin() const noexcept;                                                      // constexpr since C++20
    iterator       end() noexcept;                                                              // constexpr since C++20
    const_iterator end() const noexcept;                                                        // constexpr since C++20

    reverse_iterator       rbegin() noexcept;                                                   // constexpr since C++20
    const_reverse_iterator rbegin() const noexcept;                                             // constexpr since C++20
    reverse_iterator       rend() noexcept;                                                     // constexpr since C++20
    const_reverse_iterator rend() const noexcept;                                               // constexpr since C++20

    const_iterator         cbegin() const noexcept;                                             // constexpr since C++20
    const_iterator         cend() const noexcept;                                               // constexpr since C++20
    const_reverse_iterator crbegin() const noexcept;                                            // constexpr since C++20
    const_reverse_iterator crend() const noexcept;                                              // constexpr since C++20

    size_type size() const noexcept;                                                            // constexpr since C++20
    size_type length() const noexcept;                                                          // constexpr since C++20
    size_type max_size() const noexcept;                                                        // constexpr since C++20
    size_type capacity() const noexcept;                                                        // constexpr since C++20

    void resize(size_type n, value_type c);                                                     // constexpr since C++20
    void resize(size_type n);                                                                   // constexpr since C++20

    template<class Operation>
    constexpr void resize_and_overwrite(size_type n, Operation op); // since C++23

    void reserve(size_type res_arg);                                                            // constexpr since C++20
    void reserve(); // deprecated in C++20
    void shrink_to_fit();                                                                       // constexpr since C++20
    void clear() noexcept;                                                                      // constexpr since C++20
    bool empty() const noexcept;                                                                // constexpr since C++20

    const_reference operator[](size_type pos) const;                                            // constexpr since C++20
    reference       operator[](size_type pos);                                                  // constexpr since C++20

    const_reference at(size_type n) const;                                                      // constexpr since C++20
    reference       at(size_type n);                                                            // constexpr since C++20

    basic_string& operator+=(const basic_string& str);                                          // constexpr since C++20
    template <class T>
        basic_string& operator+=(const T& t);                                                   // C++17, constexpr since C++20
    basic_string& operator+=(const value_type* s);                                              // constexpr since C++20
    basic_string& operator+=(value_type c);                                                     // constexpr since C++20
    basic_string& operator+=(initializer_list<value_type>);                                     // constexpr since C++20

    basic_string& append(const basic_string& str);                                              // constexpr since C++20
    template <class T>
        basic_string& append(const T& t);                                                       // C++17, constexpr since C++20
    basic_string& append(const basic_string& str, size_type pos, size_type n=npos);             // C++14, constexpr since C++20
    template <class T>
        basic_string& append(const T& t, size_type pos, size_type n=npos);                      // C++17, constexpr since C++20
    basic_string& append(const value_type* s, size_type n);                                     // constexpr since C++20
    basic_string& append(const value_type* s);                                                  // constexpr since C++20
    basic_string& append(size_type n, value_type c);                                            // constexpr since C++20
    template<class InputIterator>
        basic_string& append(InputIterator first, InputIterator last);                          // constexpr since C++20
    template<container-compatible-range<charT> R>
      constexpr basic_string& append_range(R&& rg);                                             // C++23
    basic_string& append(initializer_list<value_type>);                                         // constexpr since C++20

    void push_back(value_type c);                                                               // constexpr since C++20
    void pop_back();                                                                            // constexpr since C++20
    reference       front();                                                                    // constexpr since C++20
    const_reference front() const;                                                              // constexpr since C++20
    reference       back();                                                                     // constexpr since C++20
    const_reference back() const;                                                               // constexpr since C++20

    basic_string& assign(const basic_string& str);                                              // constexpr since C++20
    template <class T>
        basic_string& assign(const T& t);                                                       // C++17, constexpr since C++20
    basic_string& assign(basic_string&& str);                                                   // constexpr since C++20
    basic_string& assign(const basic_string& str, size_type pos, size_type n=npos);             // C++14, constexpr since C++20
    template <class T>
        basic_string& assign(const T& t, size_type pos, size_type n=npos);                      // C++17, constexpr since C++20
    basic_string& assign(const value_type* s, size_type n);                                     // constexpr since C++20
    basic_string& assign(const value_type* s);                                                  // constexpr since C++20
    basic_string& assign(size_type n, value_type c);                                            // constexpr since C++20
    template<class InputIterator>
        basic_string& assign(InputIterator first, InputIterator last);                          // constexpr since C++20
    template<container-compatible-range<charT> R>
      constexpr basic_string& assign_range(R&& rg);                                             // C++23
    basic_string& assign(initializer_list<value_type>);                                         // constexpr since C++20

    basic_string& insert(size_type pos1, const basic_string& str);                              // constexpr since C++20
    template <class T>
        basic_string& insert(size_type pos1, const T& t);                                       // constexpr since C++20
    basic_string& insert(size_type pos1, const basic_string& str,
                         size_type pos2, size_type n);                                          // constexpr since C++20
    template <class T>
        basic_string& insert(size_type pos1, const T& t, size_type pos2, size_type n);          // C++17, constexpr since C++20
    basic_string& insert(size_type pos, const value_type* s, size_type n=npos);                 // C++14, constexpr since C++20
    basic_string& insert(size_type pos, const value_type* s);                                   // constexpr since C++20
    basic_string& insert(size_type pos, size_type n, value_type c);                             // constexpr since C++20
    iterator      insert(const_iterator p, value_type c);                                       // constexpr since C++20
    iterator      insert(const_iterator p, size_type n, value_type c);                          // constexpr since C++20
    template<class InputIterator>
        iterator insert(const_iterator p, InputIterator first, InputIterator last);             // constexpr since C++20
    template<container-compatible-range<charT> R>
      constexpr iterator insert_range(const_iterator p, R&& rg);                                // C++23
    iterator      insert(const_iterator p, initializer_list<value_type>);                       // constexpr since C++20

    basic_string& erase(size_type pos = 0, size_type n = npos);                                 // constexpr since C++20
    iterator      erase(const_iterator position);                                               // constexpr since C++20
    iterator      erase(const_iterator first, const_iterator last);                             // constexpr since C++20

    basic_string& replace(size_type pos1, size_type n1, const basic_string& str);               // constexpr since C++20
    template <class T>
    basic_string& replace(size_type pos1, size_type n1, const T& t);                            // C++17, constexpr since C++20
    basic_string& replace(size_type pos1, size_type n1, const basic_string& str,
                          size_type pos2, size_type n2=npos);                                   // C++14, constexpr since C++20
    template <class T>
        basic_string& replace(size_type pos1, size_type n1, const T& t,
                              size_type pos2, size_type n);                                     // C++17, constexpr since C++20
    basic_string& replace(size_type pos, size_type n1, const value_type* s, size_type n2);      // constexpr since C++20
    basic_string& replace(size_type pos, size_type n1, const value_type* s);                    // constexpr since C++20
    basic_string& replace(size_type pos, size_type n1, size_type n2, value_type c);             // constexpr since C++20
    basic_string& replace(const_iterator i1, const_iterator i2, const basic_string& str);       // constexpr since C++20
    template <class T>
        basic_string& replace(const_iterator i1, const_iterator i2, const T& t);                // C++17, constexpr since C++20
    basic_string& replace(const_iterator i1, const_iterator i2, const value_type* s, size_type n); // constexpr since C++20
    basic_string& replace(const_iterator i1, const_iterator i2, const value_type* s);           // constexpr since C++20
    basic_string& replace(const_iterator i1, const_iterator i2, size_type n, value_type c);     // constexpr since C++20
    template<class InputIterator>
        basic_string& replace(const_iterator i1, const_iterator i2, InputIterator j1, InputIterator j2); // constexpr since C++20
    template<container-compatible-range<charT> R>
      constexpr basic_string& replace_with_range(const_iterator i1, const_iterator i2, R&& rg); // C++23
    basic_string& replace(const_iterator i1, const_iterator i2, initializer_list<value_type>);  // constexpr since C++20

    size_type copy(value_type* s, size_type n, size_type pos = 0) const;                        // constexpr since C++20
    basic_string substr(size_type pos = 0, size_type n = npos) const;                           // constexpr in C++20, removed in C++23
    basic_string substr(size_type pos = 0, size_type n = npos) const&;                          // since C++23
    constexpr basic_string substr(size_type pos = 0, size_type n = npos) &&;                    // since C++23
    void swap(basic_string& str)
        noexcept(allocator_traits<allocator_type>::propagate_on_container_swap::value ||
                 allocator_traits<allocator_type>::is_always_equal::value);                     // C++17, constexpr since C++20

    const value_type* c_str() const noexcept;                                                   // constexpr since C++20
    const value_type* data() const noexcept;                                                    // constexpr since C++20
          value_type* data()       noexcept;                                                    // C++17, constexpr since C++20

    allocator_type get_allocator() const noexcept;                                              // constexpr since C++20

    size_type find(const basic_string& str, size_type pos = 0) const noexcept;                  // constexpr since C++20
    template <class T>
        size_type find(const T& t, size_type pos = 0) const noexcept;                           // C++17, noexcept as an extension, constexpr since C++20
    size_type find(const value_type* s, size_type pos, size_type n) const noexcept;             // constexpr since C++20
    size_type find(const value_type* s, size_type pos = 0) const noexcept;                      // constexpr since C++20
    size_type find(value_type c, size_type pos = 0) const noexcept;                             // constexpr since C++20

    size_type rfind(const basic_string& str, size_type pos = npos) const noexcept;              // constexpr since C++20
    template <class T>
        size_type rfind(const T& t, size_type pos = npos) const noexcept;                       // C++17, noexcept as an extension, constexpr since C++20
    size_type rfind(const value_type* s, size_type pos, size_type n) const noexcept;            // constexpr since C++20
    size_type rfind(const value_type* s, size_type pos = npos) const noexcept;                  // constexpr since C++20
    size_type rfind(value_type c, size_type pos = npos) const noexcept;                         // constexpr since C++20

    size_type find_first_of(const basic_string& str, size_type pos = 0) const noexcept;         // constexpr since C++20
    template <class T>
        size_type find_first_of(const T& t, size_type pos = 0) const noexcept;                  // C++17, noexcept as an extension, constexpr since C++20
    size_type find_first_of(const value_type* s, size_type pos, size_type n) const noexcept;    // constexpr since C++20
    size_type find_first_of(const value_type* s, size_type pos = 0) const noexcept;             // constexpr since C++20
    size_type find_first_of(value_type c, size_type pos = 0) const noexcept;                    // constexpr since C++20

    size_type find_last_of(const basic_string& str, size_type pos = npos) const noexcept;       // constexpr since C++20
    template <class T>
        size_type find_last_of(const T& t, size_type pos = npos) const noexcept noexcept;       // C++17, noexcept as an extension, constexpr since C++20
    size_type find_last_of(const value_type* s, size_type pos, size_type n) const noexcept;     // constexpr since C++20
    size_type find_last_of(const value_type* s, size_type pos = npos) const noexcept;           // constexpr since C++20
    size_type find_last_of(value_type c, size_type pos = npos) const noexcept;                  // constexpr since C++20

    size_type find_first_not_of(const basic_string& str, size_type pos = 0) const noexcept;     // constexpr since C++20
    template <class T>
        size_type find_first_not_of(const T& t, size_type pos = 0) const noexcept;              // C++17, noexcept as an extension, constexpr since C++20
    size_type find_first_not_of(const value_type* s, size_type pos, size_type n) const noexcept; // constexpr since C++20
    size_type find_first_not_of(const value_type* s, size_type pos = 0) const noexcept;         // constexpr since C++20
    size_type find_first_not_of(value_type c, size_type pos = 0) const noexcept;                // constexpr since C++20

    size_type find_last_not_of(const basic_string& str, size_type pos = npos) const noexcept;   // constexpr since C++20
    template <class T>
        size_type find_last_not_of(const T& t, size_type pos = npos) const noexcept;            // C++17, noexcept as an extension, constexpr since C++20
    size_type find_last_not_of(const value_type* s, size_type pos, size_type n) const noexcept; // constexpr since C++20
    size_type find_last_not_of(const value_type* s, size_type pos = npos) const noexcept;       // constexpr since C++20
    size_type find_last_not_of(value_type c, size_type pos = npos) const noexcept;              // constexpr since C++20

    int compare(const basic_string& str) const noexcept;                                        // constexpr since C++20
    template <class T>
        int compare(const T& t) const noexcept;                                                 // C++17, noexcept as an extension, constexpr since C++20
    int compare(size_type pos1, size_type n1, const basic_string& str) const;                   // constexpr since C++20
    template <class T>
        int compare(size_type pos1, size_type n1, const T& t) const;                            // C++17, constexpr since C++20
    int compare(size_type pos1, size_type n1, const basic_string& str,
                size_type pos2, size_type n2=npos) const;                                       // C++14, constexpr since C++20
    template <class T>
        int compare(size_type pos1, size_type n1, const T& t,
                    size_type pos2, size_type n2=npos) const;                                   // C++17, constexpr since C++20
    int compare(const value_type* s) const noexcept;                                            // constexpr since C++20
    int compare(size_type pos1, size_type n1, const value_type* s) const;                       // constexpr since C++20
    int compare(size_type pos1, size_type n1, const value_type* s, size_type n2) const;         // constexpr since C++20

    constexpr bool starts_with(basic_string_view<charT, traits> sv) const noexcept;             // C++20
    constexpr bool starts_with(charT c) const noexcept;                                         // C++20
    constexpr bool starts_with(const charT* s) const;                                           // C++20
    constexpr bool ends_with(basic_string_view<charT, traits> sv) const noexcept;               // C++20
    constexpr bool ends_with(charT c) const noexcept;                                           // C++20
    constexpr bool ends_with(const charT* s) const;                                             // C++20

    constexpr bool contains(basic_string_view<charT, traits> sv) const noexcept;                // C++23
    constexpr bool contains(charT c) const noexcept;                                            // C++23
    constexpr bool contains(const charT* s) const;                                              // C++23
};

template<class InputIterator,
         class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
basic_string(InputIterator, InputIterator, Allocator = Allocator())
   -> basic_string<typename iterator_traits<InputIterator>::value_type,
                  char_traits<typename iterator_traits<InputIterator>::value_type>,
                  Allocator>;   // C++17

template<ranges::input_range R,
         class Allocator = allocator<ranges::range_value_t<R>>>
  basic_string(from_range_t, R&&, Allocator = Allocator())
    -> basic_string<ranges::range_value_t<R>, char_traits<ranges::range_value_t<R>>,
                    Allocator>; // C++23

template<class charT,
         class traits,
         class Allocator = allocator<charT>>
  explicit basic_string(basic_string_view<charT, traits>, const Allocator& = Allocator())
    -> basic_string<charT, traits, Allocator>; // C++17

template<class charT,
         class traits,
         class Allocator = allocator<charT>>
  basic_string(basic_string_view<charT, traits>,
                typename see below::size_type, typename see below::size_type,
                const Allocator& = Allocator())
    -> basic_string<charT, traits, Allocator>; // C++17

template<class charT, class traits, class Allocator>
basic_string<charT, traits, Allocator>
operator+(const basic_string<charT, traits, Allocator>& lhs,
          const basic_string<charT, traits, Allocator>& rhs);                                   // constexpr since C++20

template<class charT, class traits, class Allocator>
basic_string<charT, traits, Allocator>
operator+(const charT* lhs , const basic_string<charT,traits,Allocator>&rhs);                   // constexpr since C++20

template<class charT, class traits, class Allocator>
basic_string<charT, traits, Allocator>
operator+(charT lhs, const basic_string<charT,traits,Allocator>& rhs);                          // constexpr since C++20

template<class charT, class traits, class Allocator>
basic_string<charT, traits, Allocator>
operator+(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs);                 // constexpr since C++20

template<class charT, class traits, class Allocator>
basic_string<charT, traits, Allocator>
operator+(const basic_string<charT, traits, Allocator>& lhs, charT rhs);                        // constexpr since C++20

template<class charT, class traits, class Allocator>
bool operator==(const basic_string<charT, traits, Allocator>& lhs,
                const basic_string<charT, traits, Allocator>& rhs) noexcept;                    // constexpr since C++20

template<class charT, class traits, class Allocator>
bool operator==(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept;  // removed in C++20

template<class charT, class traits, class Allocator>
bool operator==(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs) noexcept;    // constexpr since C++20

template<class charT, class traits, class Allocator>
bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
                const basic_string<charT, traits, Allocator>& rhs) noexcept;                    // removed in C++20

template<class charT, class traits, class Allocator>
bool operator!=(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept;  // removed in C++20

template<class charT, class traits, class Allocator>
bool operator!=(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept;  // removed in C++20

template<class charT, class traits, class Allocator>
bool operator< (const basic_string<charT, traits, Allocator>& lhs,
                const basic_string<charT, traits, Allocator>& rhs) noexcept;                    // removed in C++20

template<class charT, class traits, class Allocator>
bool operator< (const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept;  // removed in C++20

template<class charT, class traits, class Allocator>
bool operator< (const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept;  // removed in C++20

template<class charT, class traits, class Allocator>
bool operator> (const basic_string<charT, traits, Allocator>& lhs,
                const basic_string<charT, traits, Allocator>& rhs) noexcept;                    // removed in C++20

template<class charT, class traits, class Allocator>
bool operator> (const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept;  // removed in C++20

template<class charT, class traits, class Allocator>
bool operator> (const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept;  // removed in C++20

template<class charT, class traits, class Allocator>
bool operator<=(const basic_string<charT, traits, Allocator>& lhs,
                const basic_string<charT, traits, Allocator>& rhs) noexcept;                    // removed in C++20

template<class charT, class traits, class Allocator>
bool operator<=(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept;  // removed in C++20

template<class charT, class traits, class Allocator>
bool operator<=(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept;  // removed in C++20

template<class charT, class traits, class Allocator>
bool operator>=(const basic_string<charT, traits, Allocator>& lhs,
                const basic_string<charT, traits, Allocator>& rhs) noexcept;                    // removed in C++20

template<class charT, class traits, class Allocator>
bool operator>=(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept;  // removed in C++20

template<class charT, class traits, class Allocator>
bool operator>=(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept;  // removed in C++20

template<class charT, class traits, class Allocator>                                            // since C++20
constexpr see below operator<=>(const basic_string<charT, traits, Allocator>& lhs,
                                const basic_string<charT, traits, Allocator>& rhs) noexcept;

template<class charT, class traits, class Allocator>                                            // since C++20
constexpr see below operator<=>(const basic_string<charT, traits, Allocator>& lhs,
                                const charT* rhs) noexcept;

template<class charT, class traits, class Allocator>
void swap(basic_string<charT, traits, Allocator>& lhs,
          basic_string<charT, traits, Allocator>& rhs)
            noexcept(noexcept(lhs.swap(rhs)));                                                  // constexpr since C++20

template<class charT, class traits, class Allocator>
basic_istream<charT, traits>&
operator>>(basic_istream<charT, traits>& is, basic_string<charT, traits, Allocator>& str);

template<class charT, class traits, class Allocator>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const basic_string<charT, traits, Allocator>& str);

template<class charT, class traits, class Allocator>
basic_istream<charT, traits>&
getline(basic_istream<charT, traits>& is, basic_string<charT, traits, Allocator>& str,
        charT delim);

template<class charT, class traits, class Allocator>
basic_istream<charT, traits>&
getline(basic_istream<charT, traits>& is, basic_string<charT, traits, Allocator>& str);

template<class charT, class traits, class Allocator, class U>
typename basic_string<charT, traits, Allocator>::size_type
erase(basic_string<charT, traits, Allocator>& c, const U& value);    // C++20
template<class charT, class traits, class Allocator, class Predicate>
typename basic_string<charT, traits, Allocator>::size_type
erase_if(basic_string<charT, traits, Allocator>& c, Predicate pred); // C++20

typedef basic_string<char>    string;
typedef basic_string<wchar_t> wstring;
typedef basic_string<char8_t> u8string; // C++20
typedef basic_string<char16_t> u16string;
typedef basic_string<char32_t> u32string;

int                stoi  (const string& str, size_t* idx = nullptr, int base = 10);
long               stol  (const string& str, size_t* idx = nullptr, int base = 10);
unsigned long      stoul (const string& str, size_t* idx = nullptr, int base = 10);
long long          stoll (const string& str, size_t* idx = nullptr, int base = 10);
unsigned long long stoull(const string& str, size_t* idx = nullptr, int base = 10);

float       stof (const string& str, size_t* idx = nullptr);
double      stod (const string& str, size_t* idx = nullptr);
long double stold(const string& str, size_t* idx = nullptr);

string to_string(int val);
string to_string(unsigned val);
string to_string(long val);
string to_string(unsigned long val);
string to_string(long long val);
string to_string(unsigned long long val);
string to_string(float val);
string to_string(double val);
string to_string(long double val);

int                stoi  (const wstring& str, size_t* idx = nullptr, int base = 10);
long               stol  (const wstring& str, size_t* idx = nullptr, int base = 10);
unsigned long      stoul (const wstring& str, size_t* idx = nullptr, int base = 10);
long long          stoll (const wstring& str, size_t* idx = nullptr, int base = 10);
unsigned long long stoull(const wstring& str, size_t* idx = nullptr, int base = 10);

float       stof (const wstring& str, size_t* idx = nullptr);
double      stod (const wstring& str, size_t* idx = nullptr);
long double stold(const wstring& str, size_t* idx = nullptr);

wstring to_wstring(int val);
wstring to_wstring(unsigned val);
wstring to_wstring(long val);
wstring to_wstring(unsigned long val);
wstring to_wstring(long long val);
wstring to_wstring(unsigned long long val);
wstring to_wstring(float val);
wstring to_wstring(double val);
wstring to_wstring(long double val);

template <> struct hash<string>;
template <> struct hash<u8string>; // C++20
template <> struct hash<u16string>;
template <> struct hash<u32string>;
template <> struct hash<wstring>;

basic_string<char>     operator""s( const char *str,     size_t len );           // C++14, constexpr since C++20
basic_string<wchar_t>  operator""s( const wchar_t *str,  size_t len );           // C++14, constexpr since C++20
constexpr basic_string<char8_t>  operator""s( const char8_t *str,  size_t len ); // C++20
basic_string<char16_t> operator""s( const char16_t *str, size_t len );           // C++14, constexpr since C++20
basic_string<char32_t> operator""s( const char32_t *str, size_t len );           // C++14, constexpr since C++20

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/max.h>
#endif /* expanded by -frewrite-includes */
# 567 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 568 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 568 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 569 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/remove.h>
#endif /* expanded by -frewrite-includes */
# 569 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 570 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/remove_if.h>
#endif /* expanded by -frewrite-includes */
# 570 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 571 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 571 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 572 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 572 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 573 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* enable_insertable.h expanded by -frewrite-includes */
#include <__format/enable_insertable.h>
#else /* enable_insertable.h expanded by -frewrite-includes */
# 573 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/enable_insertable.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FORMAT_ENABLE_INSERTABLE_H
#define _LIBCPP___FORMAT_ENABLE_INSERTABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/enable_insertable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/enable_insertable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/enable_insertable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/enable_insertable.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/enable_insertable.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/enable_insertable.h" 3

namespace __format {

/// Opt-in to enable \ref __insertable for a \a _Container.
template <class _Container>
inline constexpr bool __enable_insertable = false;

} // namespace __format

#endif //_LIBCPP_STD_VER >= 20
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/enable_insertable.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FORMAT_ENABLE_INSERTABLE_H
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/enable_insertable.h" 3
#endif /* enable_insertable.h expanded by -frewrite-includes */
# 574 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/hash.h>
#endif /* expanded by -frewrite-includes */
# 574 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 575 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 575 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 576 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/string.h>
#endif /* expanded by -frewrite-includes */
# 576 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 577 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* fpos.h expanded by -frewrite-includes */
#include <__ios/fpos.h>
#else /* fpos.h expanded by -frewrite-includes */
# 577 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ios/fpos.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___IOS_FPOS_H
#define _LIBCPP___IOS_FPOS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ios/fpos.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ios/fpos.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ios/fpos.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ios/fpos.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ios/fpos.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ios/fpos.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ios/fpos.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _StateT>
class _LIBCPP_TEMPLATE_VIS fpos {
private:
  _StateT __st_;
  streamoff __off_;

public:
  _LIBCPP_HIDE_FROM_ABI fpos(streamoff __off = streamoff()) : __st_(), __off_(__off) {}

  _LIBCPP_HIDE_FROM_ABI operator streamoff() const { return __off_; }

  _LIBCPP_HIDE_FROM_ABI _StateT state() const { return __st_; }
  _LIBCPP_HIDE_FROM_ABI void state(_StateT __st) { __st_ = __st; }

  _LIBCPP_HIDE_FROM_ABI fpos& operator+=(streamoff __off) {
    __off_ += __off;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI fpos operator+(streamoff __off) const {
    fpos __t(*this);
    __t += __off;
    return __t;
  }

  _LIBCPP_HIDE_FROM_ABI fpos& operator-=(streamoff __off) {
    __off_ -= __off;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI fpos operator-(streamoff __off) const {
    fpos __t(*this);
    __t -= __off;
    return __t;
  }
};

template <class _StateT>
inline _LIBCPP_HIDE_FROM_ABI
streamoff operator-(const fpos<_StateT>& __x, const fpos<_StateT>& __y) {
  return streamoff(__x) - streamoff(__y);
}

template <class _StateT>
inline _LIBCPP_HIDE_FROM_ABI
bool operator==(const fpos<_StateT>& __x, const fpos<_StateT>& __y) {
  return streamoff(__x) == streamoff(__y);
}

template <class _StateT>
inline _LIBCPP_HIDE_FROM_ABI
bool operator!=(const fpos<_StateT>& __x, const fpos<_StateT>& __y) {
  return streamoff(__x) != streamoff(__y);
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___IOS_FPOS_H
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ios/fpos.h" 3
#endif /* fpos.h expanded by -frewrite-includes */
# 578 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 578 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 579 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 579 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 580 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 580 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 581 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/wrap_iter.h>
#endif /* expanded by -frewrite-includes */
# 581 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 582 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 582 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 583 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocate_at_least.h>
#endif /* expanded by -frewrite-includes */
# 583 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 584 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator.h>
#endif /* expanded by -frewrite-includes */
# 584 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 585 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 585 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 586 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/compressed_pair.h>
#endif /* expanded by -frewrite-includes */
# 586 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 587 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/construct_at.h>
#endif /* expanded by -frewrite-includes */
# 587 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 588 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 588 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 589 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* swap_allocator.h expanded by -frewrite-includes */
#include <__memory/swap_allocator.h>
#else /* swap_allocator.h expanded by -frewrite-includes */
# 589 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_SWAP_ALLOCATOR_H
#define _LIBCPP___MEMORY_SWAP_ALLOCATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_swappable.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <typename _Alloc>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __swap_allocator(_Alloc& __a1, _Alloc& __a2, true_type)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
    _NOEXCEPT
#else
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
    _NOEXCEPT_(__is_nothrow_swappable<_Alloc>::value)
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
{
  using _VSTD::swap;
  swap(__a1, __a2);
}

template <typename _Alloc>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
__swap_allocator(_Alloc&, _Alloc&, false_type) _NOEXCEPT {}

template <typename _Alloc>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __swap_allocator(_Alloc& __a1, _Alloc& __a2)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
    _NOEXCEPT
#else
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
    _NOEXCEPT_(__is_nothrow_swappable<_Alloc>::value)
#endif
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
{
  _VSTD::__swap_allocator(
      __a1, __a2, integral_constant<bool, allocator_traits<_Alloc>::propagate_on_container_swap::value>());
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_SWAP_ALLOCATOR_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/swap_allocator.h" 3
#endif /* swap_allocator.h expanded by -frewrite-includes */
# 590 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* polymorphic_allocator.h expanded by -frewrite-includes */
#include <__memory_resource/polymorphic_allocator.h>
#else /* polymorphic_allocator.h expanded by -frewrite-includes */
# 590 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_RESOURCE_POLYMORPHIC_ALLOCATOR_H
#define _LIBCPP___MEMORY_RESOURCE_POLYMORPHIC_ALLOCATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* memory_resource.h expanded by -frewrite-includes */
#include <__memory_resource/memory_resource.h>
#else /* memory_resource.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_RESOURCE_MEMORY_RESOURCE_H
#define _LIBCPP___MEMORY_RESOURCE_MEMORY_RESOURCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/memory_resource.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace pmr {

// [mem.res.class]

class _LIBCPP_AVAILABILITY_PMR _LIBCPP_EXPORTED_FROM_ABI memory_resource {
  static const size_t __max_align = alignof(max_align_t);

public:
  virtual ~memory_resource();

  _LIBCPP_NODISCARD_AFTER_CXX17
  [[using __gnu__: __returns_nonnull__, __alloc_size__(2), __alloc_align__(3)]] _LIBCPP_HIDE_FROM_ABI void*
  allocate(size_t __bytes, size_t __align = __max_align) {
    return do_allocate(__bytes, __align);
  }

  [[__gnu__::__nonnull__]] _LIBCPP_HIDE_FROM_ABI void
  deallocate(void* __p, size_t __bytes, size_t __align = __max_align) {
    do_deallocate(__p, __bytes, __align);
  }

  _LIBCPP_HIDE_FROM_ABI bool is_equal(const memory_resource& __other) const noexcept { return do_is_equal(__other); }

private:
  virtual void* do_allocate(size_t, size_t)                       = 0;
  virtual void do_deallocate(void*, size_t, size_t)               = 0;
  virtual bool do_is_equal(memory_resource const&) const noexcept = 0;
};

// [mem.res.eq]

inline _LIBCPP_AVAILABILITY_PMR _LIBCPP_HIDE_FROM_ABI bool
operator==(const memory_resource& __lhs, const memory_resource& __rhs) noexcept {
  return &__lhs == &__rhs || __lhs.is_equal(__rhs);
}

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3

inline _LIBCPP_AVAILABILITY_PMR _LIBCPP_HIDE_FROM_ABI bool
operator!=(const memory_resource& __lhs, const memory_resource& __rhs) noexcept {
  return !(__lhs == __rhs);
}

#  endif
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3

// [mem.res.global]

[[__gnu__::__returns_nonnull__]] _LIBCPP_AVAILABILITY_PMR _LIBCPP_EXPORTED_FROM_ABI memory_resource*
get_default_resource() noexcept;

[[__gnu__::__returns_nonnull__]] _LIBCPP_AVAILABILITY_PMR _LIBCPP_EXPORTED_FROM_ABI memory_resource*
set_default_resource(memory_resource*) noexcept;

[[using __gnu__: __returns_nonnull__, __const__]] _LIBCPP_AVAILABILITY_PMR _LIBCPP_EXPORTED_FROM_ABI memory_resource*
new_delete_resource() noexcept;

[[using __gnu__: __returns_nonnull__, __const__]] _LIBCPP_AVAILABILITY_PMR _LIBCPP_EXPORTED_FROM_ABI memory_resource*
null_memory_resource() noexcept;

} // namespace pmr

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 17
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3

#endif // _LIBCPP___MEMORY_RESOURCE_MEMORY_RESOURCE_H
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/memory_resource.h" 3
#endif /* memory_resource.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/exception_guard.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

namespace pmr {

// [mem.poly.allocator.class]

template <class _ValueType
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
          = byte
#  endif
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
          >
class _LIBCPP_AVAILABILITY_PMR _LIBCPP_TEMPLATE_VIS polymorphic_allocator {

public:
  using value_type = _ValueType;

  // [mem.poly.allocator.ctor]

  _LIBCPP_HIDE_FROM_ABI polymorphic_allocator() noexcept : __res_(std::pmr::get_default_resource()) {}

  _LIBCPP_HIDE_FROM_ABI polymorphic_allocator(memory_resource* __r) noexcept : __res_(__r) {}

  _LIBCPP_HIDE_FROM_ABI polymorphic_allocator(const polymorphic_allocator&) = default;

  template <class _Tp>
  _LIBCPP_HIDE_FROM_ABI polymorphic_allocator(const polymorphic_allocator<_Tp>& __other) noexcept
      : __res_(__other.resource()) {}

  polymorphic_allocator& operator=(const polymorphic_allocator&) = delete;

  // [mem.poly.allocator.mem]

  _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI _ValueType* allocate(size_t __n) {
    if (__n > __max_size()) {
      __throw_bad_array_new_length();
    }
    return static_cast<_ValueType*>(__res_->allocate(__n * sizeof(_ValueType), alignof(_ValueType)));
  }

  _LIBCPP_HIDE_FROM_ABI void deallocate(_ValueType* __p, size_t __n) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__n <= __max_size(), "deallocate called for size which exceeds max_size()");
    __res_->deallocate(__p, __n * sizeof(_ValueType), alignof(_ValueType));
  }

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3

  [[nodiscard]] [[using __gnu__: __alloc_size__(2), __alloc_align__(3)]] _LIBCPP_HIDE_FROM_ABI void*
  allocate_bytes(size_t __nbytes, size_t __alignment = alignof(max_align_t)) {
    return __res_->allocate(__nbytes, __alignment);
  }

  _LIBCPP_HIDE_FROM_ABI void deallocate_bytes(void* __ptr, size_t __nbytes, size_t __alignment = alignof(max_align_t)) {
    __res_->deallocate(__ptr, __nbytes, __alignment);
  }

  template <class _Type>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _Type* allocate_object(size_t __n = 1) {
    if (numeric_limits<size_t>::max() / sizeof(_Type) < __n)
      std::__throw_bad_array_new_length();
    return static_cast<_Type*>(allocate_bytes(__n * sizeof(_Type), alignof(_Type)));
  }

  template <class _Type>
  _LIBCPP_HIDE_FROM_ABI void deallocate_object(_Type* __ptr, size_t __n = 1) {
    deallocate_bytes(__ptr, __n * sizeof(_Type), alignof(_Type));
  }

  template <class _Type, class... _CtorArgs>
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _Type* new_object(_CtorArgs&&... __ctor_args) {
    _Type* __ptr = allocate_object<_Type>();
    auto __guard = std::__make_exception_guard([&] { deallocate_object(__ptr); });
    construct(__ptr, std::forward<_CtorArgs>(__ctor_args)...);
    __guard.__complete();
    return __ptr;
  }

  template <class _Type>
  _LIBCPP_HIDE_FROM_ABI void delete_object(_Type* __ptr) {
    destroy(__ptr);
    deallocate_object(__ptr);
  }

#  endif // _LIBCPP_STD_VER >= 20
# 115 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3

  template <class _Tp, class... _Ts>
  _LIBCPP_HIDE_FROM_ABI void construct(_Tp* __p, _Ts&&... __args) {
    std::__user_alloc_construct_impl(
        typename __uses_alloc_ctor<_Tp, polymorphic_allocator&, _Ts...>::type(),
        __p,
        *this,
        std::forward<_Ts>(__args)...);
  }

  template <class _T1, class _T2, class... _Args1, class... _Args2>
  _LIBCPP_HIDE_FROM_ABI void
  construct(pair<_T1, _T2>* __p, piecewise_construct_t, tuple<_Args1...> __x, tuple<_Args2...> __y) {
    ::new ((void*)__p) pair<_T1, _T2>(
        piecewise_construct,
        __transform_tuple(typename __uses_alloc_ctor< _T1, polymorphic_allocator&, _Args1... >::type(),
                          std::move(__x),
                          typename __make_tuple_indices<sizeof...(_Args1)>::type{}),
        __transform_tuple(typename __uses_alloc_ctor< _T2, polymorphic_allocator&, _Args2... >::type(),
                          std::move(__y),
                          typename __make_tuple_indices<sizeof...(_Args2)>::type{}));
  }

  template <class _T1, class _T2>
  _LIBCPP_HIDE_FROM_ABI void construct(pair<_T1, _T2>* __p) {
    construct(__p, piecewise_construct, tuple<>(), tuple<>());
  }

  template <class _T1, class _T2, class _Up, class _Vp>
  _LIBCPP_HIDE_FROM_ABI void construct(pair<_T1, _T2>* __p, _Up&& __u, _Vp&& __v) {
    construct(__p,
              piecewise_construct,
              std::forward_as_tuple(std::forward<_Up>(__u)),
              std::forward_as_tuple(std::forward<_Vp>(__v)));
  }

  template <class _T1, class _T2, class _U1, class _U2>
  _LIBCPP_HIDE_FROM_ABI void construct(pair<_T1, _T2>* __p, const pair<_U1, _U2>& __pr) {
    construct(__p, piecewise_construct, std::forward_as_tuple(__pr.first), std::forward_as_tuple(__pr.second));
  }

  template <class _T1, class _T2, class _U1, class _U2>
  _LIBCPP_HIDE_FROM_ABI void construct(pair<_T1, _T2>* __p, pair<_U1, _U2>&& __pr) {
    construct(__p,
              piecewise_construct,
              std::forward_as_tuple(std::forward<_U1>(__pr.first)),
              std::forward_as_tuple(std::forward<_U2>(__pr.second)));
  }

  template <class _Tp>
  _LIBCPP_HIDE_FROM_ABI void destroy(_Tp* __p) {
    __p->~_Tp();
  }

  _LIBCPP_HIDE_FROM_ABI polymorphic_allocator select_on_container_copy_construction() const noexcept {
    return polymorphic_allocator();
  }

  _LIBCPP_HIDE_FROM_ABI memory_resource* resource() const noexcept { return __res_; }

private:
  template <class... _Args, size_t... _Is>
  _LIBCPP_HIDE_FROM_ABI tuple<_Args&&...>
  __transform_tuple(integral_constant<int, 0>, tuple<_Args...>&& __t, __tuple_indices<_Is...>) {
    return std::forward_as_tuple(std::get<_Is>(std::move(__t))...);
  }

  template <class... _Args, size_t... _Is>
  _LIBCPP_HIDE_FROM_ABI tuple<allocator_arg_t const&, polymorphic_allocator&, _Args&&...>
  __transform_tuple(integral_constant<int, 1>, tuple<_Args...>&& __t, __tuple_indices<_Is...>) {
    using _Tup = tuple<allocator_arg_t const&, polymorphic_allocator&, _Args&&...>;
    return _Tup(allocator_arg, *this, std::get<_Is>(std::move(__t))...);
  }

  template <class... _Args, size_t... _Is>
  _LIBCPP_HIDE_FROM_ABI tuple<_Args&&..., polymorphic_allocator&>
  __transform_tuple(integral_constant<int, 2>, tuple<_Args...>&& __t, __tuple_indices<_Is...>) {
    using _Tup = tuple<_Args&&..., polymorphic_allocator&>;
    return _Tup(std::get<_Is>(std::move(__t))..., *this);
  }

  _LIBCPP_HIDE_FROM_ABI size_t __max_size() const noexcept {
    return numeric_limits<size_t>::max() / sizeof(value_type);
  }

  memory_resource* __res_;
};

// [mem.poly.allocator.eq]

template <class _Tp, class _Up>
inline _LIBCPP_HIDE_FROM_ABI bool
operator==(const polymorphic_allocator<_Tp>& __lhs, const polymorphic_allocator<_Up>& __rhs) noexcept {
  return *__lhs.resource() == *__rhs.resource();
}

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3

template <class _Tp, class _Up>
inline _LIBCPP_HIDE_FROM_ABI bool
operator!=(const polymorphic_allocator<_Tp>& __lhs, const polymorphic_allocator<_Up>& __rhs) noexcept {
  return !(__lhs == __rhs);
}

#  endif
# 220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3

} // namespace pmr

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 17
# 226 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3

_LIBCPP_POP_MACROS

#endif // _LIBCPP___MEMORY_RESOURCE_POLYMORPHIC_ALLOCATOR_H
# 230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h" 3
#endif /* polymorphic_allocator.h expanded by -frewrite-includes */
# 591 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 591 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 592 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 592 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 593 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* container_compatible_range.h expanded by -frewrite-includes */
#include <__ranges/container_compatible_range.h>
#else /* container_compatible_range.h expanded by -frewrite-includes */
# 593 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/container_compatible_range.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANGES_CONTAINER_COMPATIBLE_RANGE_H
#define _LIBCPP___RANGES_CONTAINER_COMPATIBLE_RANGE_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/convertible_to.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/container_compatible_range.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/container_compatible_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/container_compatible_range.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/container_compatible_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/container_compatible_range.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/container_compatible_range.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/container_compatible_range.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/container_compatible_range.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/container_compatible_range.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/container_compatible_range.h" 3

template <class _Range, class _Tp>
concept _ContainerCompatibleRange =
    ranges::input_range<_Range> && convertible_to<ranges::range_reference_t<_Range>, _Tp>;

#endif // _LIBCPP_STD_VER >= 23
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/container_compatible_range.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANGES_CONTAINER_COMPATIBLE_RANGE_H
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__ranges/container_compatible_range.h" 3
#endif /* container_compatible_range.h expanded by -frewrite-includes */
# 594 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/from_range.h>
#endif /* expanded by -frewrite-includes */
# 594 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 595 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 595 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 596 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__string/char_traits.h>
#endif /* expanded by -frewrite-includes */
# 596 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 597 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* extern_template_lists.h expanded by -frewrite-includes */
#include <__string/extern_template_lists.h>
#else /* extern_template_lists.h expanded by -frewrite-includes */
# 597 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/extern_template_lists.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___STRING_EXTERN_TEMPLATE_LISTS_H
#define _LIBCPP___STRING_EXTERN_TEMPLATE_LISTS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/extern_template_lists.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/extern_template_lists.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/extern_template_lists.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/extern_template_lists.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/extern_template_lists.h" 3

// We maintain 2 ABI lists:
// - _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST
// - _LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST
// As the name implies, the ABI lists define the V1 (Stable) and unstable ABI.
//
// For unstable, we may explicitly remove function that are external in V1,
// and add (new) external functions to better control inlining and compiler
// optimization opportunities.
//
// For stable, the ABI list should rarely change, except for adding new
// functions supporting new c++ version / API changes. Typically entries
// must never be removed from the stable list.
#define _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_Func, _CharType) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type const*, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__init(value_type const*, size_type, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::basic_string(basic_string const&)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::basic_string(basic_string const&, allocator<_CharType> const&)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_last_not_of(value_type const*, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::~basic_string()) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_first_not_of(value_type const*, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, size_type, value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::operator=(value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__init(value_type const*, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI const _CharType& basic_string<_CharType>::at(size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_first_of(value_type const*, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, size_type, value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::assign(value_type const*, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::reserve(size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__init(size_type, value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_last_of(value_type const*, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__grow_by(size_type, size_type, size_type, size_type, size_type, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__grow_by_and_replace(size_type, size_type, size_type, size_type, size_type, size_type, value_type const*)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::push_back(value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(size_type, value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI const basic_string<_CharType>::size_type basic_string<_CharType>::npos) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::assign(size_type, value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::erase(size_type, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(basic_string const&, size_type, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(value_type const*) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(size_type, size_type, value_type const*) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI _CharType& basic_string<_CharType>::at(size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::assign(value_type const*)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type const*, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(size_type, size_type, basic_string const&, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(size_type, size_type, value_type const*, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::operator=(basic_string const&)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(value_type const*)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, basic_string const&, size_type, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::iterator basic_string<_CharType>::insert(basic_string::const_iterator, value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::resize(size_type, value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, basic_string const&, size_type, size_type))

#define _LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_Func, _CharType) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type const*, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__init(value_type const*, size_type, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_last_not_of(value_type const*, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::~basic_string()) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_first_not_of(value_type const*, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, size_type, value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::operator=(value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__init(value_type const*, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__init_copy_ctor_external(value_type const*, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI const _CharType& basic_string<_CharType>::at(size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_first_of(value_type const*, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, size_type, value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::__assign_external(value_type const*, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::__assign_external(value_type const*)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::reserve(size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__init(size_type, value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_last_of(value_type const*, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__grow_by_and_replace(size_type, size_type, size_type, size_type, size_type, size_type, value_type const*)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::__assign_no_alias<false>(value_type const*, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::__assign_no_alias<true>(value_type const*, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::push_back(value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(size_type, value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI const basic_string<_CharType>::size_type basic_string<_CharType>::npos) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::assign(size_type, value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__erase_external_with_move(size_type, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(basic_string const&, size_type, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(value_type const*) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(size_type, size_type, value_type const*) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI _CharType& basic_string<_CharType>::at(size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type const*, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(size_type, size_type, basic_string const&, size_type, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(size_type, size_type, value_type const*, size_type) const) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(value_type const*)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, basic_string const&, size_type, size_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::iterator basic_string<_CharType>::insert(basic_string::const_iterator, value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::resize(size_type, value_type)) \
  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, basic_string const&, size_type, size_type))


#endif // _LIBCPP___STRING_EXTERN_TEMPLATE_LISTS_H
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__string/extern_template_lists.h" 3
#endif /* extern_template_lists.h expanded by -frewrite-includes */
# 598 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_allocator.h expanded by -frewrite-includes */
#include <__type_traits/is_allocator.h>
#else /* is_allocator.h expanded by -frewrite-includes */
# 598 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_allocator.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_IS_ALLOCATOR_H
#define _LIBCPP___TYPE_IS_ALLOCATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_allocator.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_allocator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/void_t.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_allocator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_allocator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_allocator.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_allocator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_allocator.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_allocator.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <typename _Alloc, typename = void, typename = void>
struct __is_allocator : false_type {};

template <typename _Alloc>
struct __is_allocator<_Alloc,
                      __void_t<typename _Alloc::value_type>,
                      __void_t<decltype(std::declval<_Alloc&>().allocate(size_t(0)))> > : true_type {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_IS_ALLOCATOR_H
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/is_allocator.h" 3
#endif /* is_allocator.h expanded by -frewrite-includes */
# 599 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_array.h>
#endif /* expanded by -frewrite-includes */
# 599 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 600 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_convertible.h>
#endif /* expanded by -frewrite-includes */
# 600 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 601 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 601 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 602 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 602 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 603 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 603 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 604 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_standard_layout.h>
#endif /* expanded by -frewrite-includes */
# 604 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 605 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivial.h>
#endif /* expanded by -frewrite-includes */
# 605 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 606 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* noexcept_move_assign_container.h expanded by -frewrite-includes */
#include <__type_traits/noexcept_move_assign_container.h>
#else /* noexcept_move_assign_container.h expanded by -frewrite-includes */
# 606 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_NOEXCEPT_MOVE_ASSIGN_CONTAINER_H
#define _LIBCPP___TYPE_TRAITS_NOEXCEPT_MOVE_ASSIGN_CONTAINER_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <typename _Alloc, typename _Traits = allocator_traits<_Alloc> >
struct __noexcept_move_assign_container
    : public integral_constant<bool,
                               _Traits::propagate_on_container_move_assignment::value
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 3
                                   || _Traits::is_always_equal::value
#else
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 3
                                   && is_nothrow_move_assignable<_Alloc>::value
#endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 3
                               > {
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_NOEXCEPT_MOVE_ASSIGN_CONTAINER_H
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/noexcept_move_assign_container.h" 3
#endif /* noexcept_move_assign_container.h expanded by -frewrite-includes */
# 607 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 607 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 608 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/void_t.h>
#endif /* expanded by -frewrite-includes */
# 608 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 609 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/auto_cast.h>
#endif /* expanded by -frewrite-includes */
# 609 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 610 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 610 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 611 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 611 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 612 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/is_pointer_in_range.h>
#endif /* expanded by -frewrite-includes */
# 612 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 613 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 613 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 614 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 614 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 615 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/unreachable.h>
#endif /* expanded by -frewrite-includes */
# 615 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 616 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <climits>
#endif /* expanded by -frewrite-includes */
# 616 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 617 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 617 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 618 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdio>  // EOF
#endif /* expanded by -frewrite-includes */
# 618 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 619 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstring>
#endif /* expanded by -frewrite-includes */
# 619 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 620 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 620 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 621 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 621 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 622 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <string_view>
#endif /* expanded by -frewrite-includes */
# 622 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 623 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 623 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 624 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
#if 0 /* expanded by -frewrite-includes */
#  include <cwchar>
#endif /* expanded by -frewrite-includes */
# 626 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 627 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#endif
# 628 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

// standard-mandated includes

// [iterator.range]
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/access.h>
#endif /* expanded by -frewrite-includes */
# 632 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 633 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/data.h>
#endif /* expanded by -frewrite-includes */
# 633 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 634 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/empty.h>
#endif /* expanded by -frewrite-includes */
# 634 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 635 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_access.h>
#endif /* expanded by -frewrite-includes */
# 635 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 636 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/size.h>
#endif /* expanded by -frewrite-includes */
# 636 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 637 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

// [string.syn]
#if 0 /* expanded by -frewrite-includes */
#include <compare>
#endif /* expanded by -frewrite-includes */
# 639 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 640 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 640 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 641 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 643 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 644 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#endif
# 645 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 647 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 648 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 2 3


_LIBCPP_BEGIN_NAMESPACE_STD

// basic_string

template<class _CharT, class _Traits, class _Allocator>
basic_string<_CharT, _Traits, _Allocator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
operator+(const basic_string<_CharT, _Traits, _Allocator>& __x,
          const basic_string<_CharT, _Traits, _Allocator>& __y);

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDDEN _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const _CharT* __x, const basic_string<_CharT,_Traits,_Allocator>& __y);

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(_CharT __x, const basic_string<_CharT,_Traits,_Allocator>& __y);

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, const _CharT* __y);

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, _CharT __y);

extern template _LIBCPP_EXPORTED_FROM_ABI string operator+
    <char, char_traits<char>, allocator<char> >(char const*, string const&);

template <class _Iter>
struct __string_is_trivial_iterator : public false_type {};

template <class _Tp>
struct __string_is_trivial_iterator<_Tp*>
    : public is_arithmetic<_Tp> {};

template <class _Iter>
struct __string_is_trivial_iterator<__wrap_iter<_Iter> >
    : public __string_is_trivial_iterator<_Iter> {};

template <class _CharT, class _Traits, class _Tp>
struct __can_be_converted_to_string_view : public _BoolConstant<
      is_convertible<const _Tp&, basic_string_view<_CharT, _Traits> >::value &&
     !is_convertible<const _Tp&, const _CharT*>::value
    > {};

struct __uninitialized_size_tag {};
struct __init_with_sentinel_tag {};

template<class _CharT, class _Traits, class _Allocator>
class basic_string
{
public:
    typedef basic_string                                 __self;
    typedef basic_string_view<_CharT, _Traits>           __self_view;
    typedef _Traits                                      traits_type;
    typedef _CharT                                       value_type;
    typedef _Allocator                                   allocator_type;
    typedef allocator_traits<allocator_type>             __alloc_traits;
    typedef typename __alloc_traits::size_type           size_type;
    typedef typename __alloc_traits::difference_type     difference_type;
    typedef value_type&                                  reference;
    typedef const value_type&                            const_reference;
    typedef typename __alloc_traits::pointer             pointer;
    typedef typename __alloc_traits::const_pointer       const_pointer;

    static_assert((!is_array<value_type>::value), "Character type of basic_string must not be an array");
    static_assert(( is_standard_layout<value_type>::value), "Character type of basic_string must be standard-layout");
    static_assert(( is_trivial<value_type>::value), "Character type of basic_string must be trivial");
    static_assert(( is_same<_CharT, typename traits_type::char_type>::value),
                  "traits_type::char_type must be the same type as CharT");
    static_assert(( is_same<typename allocator_type::value_type, value_type>::value),
                  "Allocator::value_type must be same type as value_type");

    static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
                  "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
                  "original allocator");

    // TODO: Implement iterator bounds checking without requiring the global database.
    typedef __wrap_iter<pointer>                         iterator;
    typedef __wrap_iter<const_pointer>                   const_iterator;
    typedef std::reverse_iterator<iterator>              reverse_iterator;
    typedef std::reverse_iterator<const_iterator>        const_reverse_iterator;

private:
    static_assert(CHAR_BIT == 8, "This implementation assumes that one byte contains 8 bits");

#ifdef _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT

    struct __long
    {
        pointer   __data_;
        size_type __size_;
        size_type __cap_ : sizeof(size_type) * CHAR_BIT - 1;
        size_type __is_long_ : 1;
    };

    enum {__min_cap = (sizeof(__long) - 1)/sizeof(value_type) > 2 ?
                      (sizeof(__long) - 1)/sizeof(value_type) : 2};

    struct __short
    {
        value_type __data_[__min_cap];
        unsigned char __padding_[sizeof(value_type) - 1];
        unsigned char __size_ : 7;
        unsigned char __is_long_ : 1;
    };

// The __endian_factor is required because the field we use to store the size
// has one fewer bit than it would if it were not a bitfield.
//
// If the LSB is used to store the short-flag in the short string representation,
// we have to multiply the size by two when it is stored and divide it by two when
// it is loaded to make sure that we always store an even number. In the long string
// representation, we can ignore this because we can assume that we always allocate
// an even amount of value_types.
//
// If the MSB is used for the short-flag, the max_size() is numeric_limits<size_type>::max() / 2.
// This does not impact the short string representation, since we never need the MSB
// for representing the size of a short string anyway.

#ifdef _LIBCPP_BIG_ENDIAN
    static const size_type __endian_factor = 2;
#else
# 778 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    static const size_type __endian_factor = 1;
#endif
# 780 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

#else // _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
# 782 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

#ifdef _LIBCPP_BIG_ENDIAN
    static const size_type __endian_factor = 1;
#else
# 786 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    static const size_type __endian_factor = 2;
#endif
# 788 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

    // Attribute 'packed' is used to keep the layout compatible with the
    // previous definition that did not use bit fields. This is because on
    // some platforms bit fields have a default size rather than the actual
    // size used, e.g., it is 4 bytes on AIX. See D128285 for details.
    struct __long
    {
        struct _LIBCPP_PACKED {
            size_type __is_long_ : 1;
            size_type __cap_ : sizeof(size_type) * CHAR_BIT - 1;
        };
        size_type __size_;
        pointer   __data_;
    };

    enum {__min_cap = (sizeof(__long) - 1)/sizeof(value_type) > 2 ?
                      (sizeof(__long) - 1)/sizeof(value_type) : 2};

    struct __short
    {
        struct _LIBCPP_PACKED {
            unsigned char __is_long_ : 1;
            unsigned char __size_ : 7;
        };
        char __padding_[sizeof(value_type) - 1];
        value_type __data_[__min_cap];
    };

#endif // _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
# 817 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

    static_assert(sizeof(__short) == (sizeof(value_type) * (__min_cap + 1)), "__short has an unexpected size.");

    union __ulx{__long __lx; __short __lxx;};

    enum {__n_words = sizeof(__ulx) / sizeof(size_type)};

    struct __raw
    {
        size_type __words[__n_words];
    };

    struct __rep
    {
        union
        {
            __short __s;
            __long  __l;
            __raw   __r;
        };
    };

    __compressed_pair<__rep, allocator_type> __r_;

    // Construct a string with the given allocator and enough storage to hold `__size` characters, but
    // don't initialize the characters. The contents of the string, including the null terminator, must be
    // initialized separately.
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    explicit basic_string(__uninitialized_size_tag, size_type __size, const allocator_type& __a)
            : __r_(__default_init_tag(), __a) {
        if (__size > max_size())
            __throw_length_error();
        if (__fits_in_sso(__size)) {
            __r_.first() = __rep();
            __set_short_size(__size);
        } else {
            auto __capacity = __recommend(__size) + 1;
            auto __allocation = __alloc_traits::allocate(__alloc(), __capacity);
            __begin_lifetime(__allocation, __capacity);
            __set_long_cap(__capacity);
            __set_long_pointer(__allocation);
            __set_long_size(__size);
        }
    }

    template <class _Iter, class _Sent>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    basic_string(__init_with_sentinel_tag, _Iter __first, _Sent __last, const allocator_type& __a)
        : __r_(__default_init_tag(), __a) {
      __init_with_sentinel(std::move(__first), std::move(__last));
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator __make_iterator(pointer __p) {
        return iterator(__p);
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_iterator __make_const_iterator(const_pointer __p) const {
        return const_iterator(__p);
    }

public:
  _LIBCPP_TEMPLATE_DATA_VIS static const size_type npos = -1;

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string()
      _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
      : __r_(__value_init_tag(), __default_init_tag()) {}

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const allocator_type& __a)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 886 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
      _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
#else
# 888 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
      _NOEXCEPT
#endif
# 890 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
      : __r_(__value_init_tag(), __a) {}

  _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const basic_string& __str)
      : __r_(__default_init_tag(), __alloc_traits::select_on_container_copy_construction(__str.__alloc())) {
    if (!__str.__is_long())
      __r_.first() = __str.__r_.first();
    else
      __init_copy_ctor_external(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size());
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const basic_string& __str, const allocator_type& __a)
      : __r_(__default_init_tag(), __a) {
    if (!__str.__is_long())
      __r_.first() = __str.__r_.first();
    else
      __init_copy_ctor_external(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size());
  }

#ifndef _LIBCPP_CXX03_LANG
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(basic_string&& __str)
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER <= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 911 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
      _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
#  else
# 913 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
      _NOEXCEPT
#  endif
# 915 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
      : __r_(std::move(__str.__r_)) {
    __str.__r_.first() = __rep();
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(basic_string&& __str, const allocator_type& __a)
      : __r_(__default_init_tag(), __a) {
    if (__str.__is_long() && __a != __str.__alloc()) // copy, not move
      __init(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size());
    else {
      if (__libcpp_is_constant_evaluated())
        __r_.first() = __rep();
      __r_.first() = __str.__r_.first();
      __str.__r_.first() = __rep();
    }
  }
#endif // _LIBCPP_CXX03_LANG
# 931 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

  template <__enable_if_t<__is_allocator<_Allocator>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s)
      : __r_(__default_init_tag(), __default_init_tag()) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "basic_string(const char*) detected nullptr");
    __init(__s, traits_type::length(__s));
  }

  template <__enable_if_t<__is_allocator<_Allocator>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s, const _Allocator& __a)
      : __r_(__default_init_tag(), __a) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "basic_string(const char*, allocator) detected nullptr");
    __init(__s, traits_type::length(__s));
  }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 947 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
  basic_string(nullptr_t) = delete;
#endif
# 949 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s, size_type __n)
      : __r_(__default_init_tag(), __default_init_tag()) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "basic_string(const char*, n) detected nullptr");
    __init(__s, __n);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
  basic_string(const _CharT* __s, size_type __n, const _Allocator& __a)
      : __r_(__default_init_tag(), __a) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr,
                                 "basic_string(const char*, n, allocator) detected nullptr");
    __init(__s, __n);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(size_type __n, _CharT __c)
      : __r_(__default_init_tag(), __default_init_tag()) {
    __init(__n, __c);
  }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 970 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
  _LIBCPP_HIDE_FROM_ABI constexpr
  basic_string(basic_string&& __str, size_type __pos, const _Allocator& __alloc = _Allocator())
      : basic_string(std::move(__str), __pos, npos, __alloc) {}

  _LIBCPP_HIDE_FROM_ABI constexpr
  basic_string(basic_string&& __str, size_type __pos, size_type __n, const _Allocator& __alloc = _Allocator())
      : __r_(__default_init_tag(), __alloc) {
    if (__pos > __str.size())
      __throw_out_of_range();

    auto __len = std::min<size_type>(__n, __str.size() - __pos);
    if (__alloc_traits::is_always_equal::value || __alloc == __str.__alloc()) {
      __r_.first() = __str.__r_.first();
      __str.__r_.first() = __rep();

      _Traits::move(data(), data() + __pos, __len);
      __set_size(__len);
      _Traits::assign(data()[__len], value_type());
    } else {
      // Perform a copy because the allocators are not compatible.
      __init(__str.data() + __pos, __len);
    }
  }
#endif
# 994 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

  template <__enable_if_t<__is_allocator<_Allocator>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(size_type __n, _CharT __c, const _Allocator& __a)
      : __r_(__default_init_tag(), __a) {
    __init(__n, __c);
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20
  basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Allocator& __a = _Allocator())
      : __r_(__default_init_tag(), __a) {
    size_type __str_sz = __str.size();
    if (__pos > __str_sz)
      __throw_out_of_range();
    __init(__str.data() + __pos, std::min(__n, __str_sz - __pos));
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
  basic_string(const basic_string& __str, size_type __pos, const _Allocator& __a = _Allocator())
      : __r_(__default_init_tag(), __a) {
    size_type __str_sz = __str.size();
    if (__pos > __str_sz)
      __throw_out_of_range();
    __init(__str.data() + __pos, __str_sz - __pos);
  }

  template <class _Tp,
            __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                              !__is_same_uncvref<_Tp, basic_string>::value,
                          int> = 0>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20
  basic_string(const _Tp& __t, size_type __pos, size_type __n, const allocator_type& __a = allocator_type())
      : __r_(__default_init_tag(), __a) {
    __self_view __sv0 = __t;
    __self_view __sv  = __sv0.substr(__pos, __n);
    __init(__sv.data(), __sv.size());
  }

  template <class _Tp,
            __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                              !__is_same_uncvref<_Tp, basic_string>::value,
                          int> = 0>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t)
      : __r_(__default_init_tag(), __default_init_tag()) {
    __self_view __sv = __t;
    __init(__sv.data(), __sv.size());
  }

  template <class _Tp,
            __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                              !__is_same_uncvref<_Tp, basic_string>::value,
                          int> = 0>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(
      const _Tp& __t, const allocator_type& __a)
      : __r_(__default_init_tag(), __a) {
    __self_view __sv = __t;
    __init(__sv.data(), __sv.size());
  }

  template <class _InputIterator, __enable_if_t<__has_input_iterator_category<_InputIterator>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(_InputIterator __first, _InputIterator __last)
      : __r_(__default_init_tag(), __default_init_tag()) {
    __init(__first, __last);
  }

  template <class _InputIterator, __enable_if_t<__has_input_iterator_category<_InputIterator>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
  basic_string(_InputIterator __first, _InputIterator __last, const allocator_type& __a)
      : __r_(__default_init_tag(), __a) {
    __init(__first, __last);
  }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1066 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
  template <_ContainerCompatibleRange<_CharT> _Range>
  _LIBCPP_HIDE_FROM_ABI constexpr
  basic_string(from_range_t, _Range&& __range, const allocator_type& __a = allocator_type())
      : __r_(__default_init_tag(), __a) {
    if constexpr (ranges::forward_range<_Range> || ranges::sized_range<_Range>) {
      __init_with_size(ranges::begin(__range), ranges::end(__range), ranges::distance(__range));
    } else {
      __init_with_sentinel(ranges::begin(__range), ranges::end(__range));
    }
  }
#endif
# 1077 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

#ifndef _LIBCPP_CXX03_LANG
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(initializer_list<_CharT> __il)
      : __r_(__default_init_tag(), __default_init_tag()) {
    __init(__il.begin(), __il.end());
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(initializer_list<_CharT> __il, const _Allocator& __a)
      : __r_(__default_init_tag(), __a) {
    __init(__il.begin(), __il.end());
  }
#endif // _LIBCPP_CXX03_LANG
# 1089 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

  inline _LIBCPP_CONSTEXPR_SINCE_CXX20 ~basic_string() {
    if (__is_long())
      __alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap());
  }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    operator __self_view() const _NOEXCEPT { return __self_view(data(), size()); }

    _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(const basic_string& __str);

    template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                                           !__is_same_uncvref<_Tp, basic_string>::value, int> = 0>
    _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(const _Tp& __t) {
      __self_view __sv = __t;
      return assign(__sv);
    }

#ifndef _LIBCPP_CXX03_LANG
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(basic_string&& __str)
      _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value)) {
    __move_assign(__str, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignment::value>());
    return *this;
  }

     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    basic_string& operator=(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
#endif
# 1117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    basic_string& operator=(const value_type* __s) {return assign(__s);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    basic_string& operator=(nullptr_t) = delete;
#endif
# 1122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(value_type __c);

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    iterator begin() _NOEXCEPT
        {return __make_iterator(__get_pointer());}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_iterator begin() const _NOEXCEPT
        {return __make_const_iterator(__get_pointer());}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    iterator end() _NOEXCEPT
        {return __make_iterator(__get_pointer() + size());}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_iterator end() const _NOEXCEPT
        {return __make_const_iterator(__get_pointer() + size());}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    reverse_iterator rbegin() _NOEXCEPT
        {return reverse_iterator(end());}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_reverse_iterator rbegin() const _NOEXCEPT
        {return const_reverse_iterator(end());}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    reverse_iterator rend() _NOEXCEPT
        {return reverse_iterator(begin());}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_reverse_iterator rend() const _NOEXCEPT
        {return const_reverse_iterator(begin());}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_iterator cbegin() const _NOEXCEPT
        {return begin();}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_iterator cend() const _NOEXCEPT
        {return end();}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_reverse_iterator crbegin() const _NOEXCEPT
        {return rbegin();}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_reverse_iterator crend() const _NOEXCEPT
        {return rend();}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type size() const _NOEXCEPT
        {return __is_long() ? __get_long_size() : __get_short_size();}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type length() const _NOEXCEPT {return size();}

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type max_size() const _NOEXCEPT {
    size_type __m = __alloc_traits::max_size(__alloc());
    if (__m <= std::numeric_limits<size_type>::max() / 2) {
      return __m - __alignment;
    } else {
    bool __uses_lsb = __endian_factor == 2;
      return __uses_lsb ? __m - __alignment : (__m / 2) - __alignment;
    }
  }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type capacity() const _NOEXCEPT {
        return (__is_long() ? __get_long_cap() : static_cast<size_type>(__min_cap)) - 1;
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX20 void resize(size_type __n, value_type __c);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void resize(size_type __n) { resize(__n, value_type()); }

    _LIBCPP_CONSTEXPR_SINCE_CXX20 void reserve(size_type __requested_capacity);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1187 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    template <class _Op>
    _LIBCPP_HIDE_FROM_ABI constexpr
    void resize_and_overwrite(size_type __n, _Op __op) {
      __resize_default_init(__n);
      __erase_to_end(std::move(__op)(data(), _LIBCPP_AUTO_CAST(__n)));
    }
#endif
# 1194 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __resize_default_init(size_type __n);

    _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI void reserve() _NOEXCEPT { shrink_to_fit(); }
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void shrink_to_fit() _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void clear() _NOEXCEPT;

    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    bool empty() const _NOEXCEPT {return size() == 0;}

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference operator[](size_type __pos) const _NOEXCEPT {
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__pos <= size(), "string index out of bounds");
    return *(data() + __pos);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference operator[](size_type __pos) _NOEXCEPT {
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__pos <= size(), "string index out of bounds");
    return *(__get_pointer() + __pos);
  }

    _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference at(size_type __n) const;
    _LIBCPP_CONSTEXPR_SINCE_CXX20 reference       at(size_type __n);

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator+=(const basic_string& __str) {
        return append(__str);
    }

    template <class _Tp,
              __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                                !__is_same_uncvref<_Tp, basic_string >::value,
                            int> = 0>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
    operator+=(const _Tp& __t) {
        __self_view __sv = __t; return append(__sv);
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator+=(const value_type* __s) {
        return append(__s);
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator+=(value_type __c) {
        push_back(__c);
        return *this;
    }

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    basic_string& operator+=(initializer_list<value_type> __il) { return append(__il); }
#endif // _LIBCPP_CXX03_LANG
# 1243 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const basic_string& __str) {
        return append(__str.data(), __str.size());
  }

  template <class _Tp,
            __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                              !__is_same_uncvref<_Tp, basic_string>::value,
                          int> = 0>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  append(const _Tp& __t) {
        __self_view __sv = __t;
        return append(__sv.data(), __sv.size());
  }

    _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const basic_string& __str, size_type __pos, size_type __n=npos);

    template <class _Tp,
              __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                                !__is_same_uncvref<_Tp, basic_string>::value,
                            int> = 0>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20

        basic_string&
        append(const _Tp& __t, size_type __pos, size_type __n = npos);

    _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const value_type* __s, size_type __n);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const value_type* __s);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(size_type __n, value_type __c);

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __append_default_init(size_type __n);

    template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
    append(_InputIterator __first, _InputIterator __last) {
        const basic_string __temp(__first, __last, __alloc());
        append(__temp.data(), __temp.size());
        return *this;
    }

    template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
    append(_ForwardIterator __first, _ForwardIterator __last);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1289 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    template <_ContainerCompatibleRange<_CharT> _Range>
    _LIBCPP_HIDE_FROM_ABI
    constexpr basic_string& append_range(_Range&& __range) {
      insert_range(end(), std::forward<_Range>(__range));
      return *this;
    }
#endif
# 1296 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    basic_string& append(initializer_list<value_type> __il) {return append(__il.begin(), __il.size());}
#endif // _LIBCPP_CXX03_LANG
# 1301 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

    _LIBCPP_CONSTEXPR_SINCE_CXX20 void push_back(value_type __c);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void pop_back();

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference front() _NOEXCEPT {
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "string::front(): string is empty");
    return *__get_pointer();
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference front() const _NOEXCEPT {
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "string::front(): string is empty");
    return *data();
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference back() _NOEXCEPT {
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "string::back(): string is empty");
    return *(__get_pointer() + size() - 1);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference back() const _NOEXCEPT {
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "string::back(): string is empty");
    return *(data() + size() - 1);
  }

  template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  assign(const _Tp& __t) {
    __self_view __sv = __t;
    return assign(__sv.data(), __sv.size());
  }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    basic_string& assign(const basic_string& __str) { return *this = __str; }
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    basic_string& assign(basic_string&& __str)
        _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value))
        {*this = std::move(__str); return *this;}
#endif
# 1340 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(const basic_string& __str, size_type __pos, size_type __n=npos);

    template <class _Tp,
              __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                                !__is_same_uncvref<_Tp, basic_string>::value,
                            int> = 0>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
    assign(const _Tp& __t, size_type __pos, size_type __n = npos);

    _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(const value_type* __s, size_type __n);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(const value_type* __s);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& assign(size_type __n, value_type __c);
    template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
    assign(_InputIterator __first, _InputIterator __last);

    template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
    assign(_ForwardIterator __first, _ForwardIterator __last);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1361 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    template <_ContainerCompatibleRange<_CharT> _Range>
    _LIBCPP_HIDE_FROM_ABI
    constexpr basic_string& assign_range(_Range&& __range) {
      if constexpr (__string_is_trivial_iterator<ranges::iterator_t<_Range>>::value &&
          (ranges::forward_range<_Range> || ranges::sized_range<_Range>)) {
        size_type __n = static_cast<size_type>(ranges::distance(__range));
        __assign_trivial(ranges::begin(__range), ranges::end(__range), __n);

      } else {
        __assign_with_sentinel(ranges::begin(__range), ranges::end(__range));
      }

      return *this;
    }
#endif
# 1376 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    basic_string& assign(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
#endif // _LIBCPP_CXX03_LANG
# 1381 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  insert(size_type __pos1, const basic_string& __str) {
    return insert(__pos1, __str.data(), __str.size());
  }

  template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  insert(size_type __pos1, const _Tp& __t) {
    __self_view __sv = __t;
    return insert(__pos1, __sv.data(), __sv.size());
  }

  template <class _Tp,
            __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                              !__is_same_uncvref<_Tp, basic_string>::value,
                          int> = 0>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  insert(size_type __pos1, const _Tp& __t, size_type __pos2, size_type __n = npos);

  _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n = npos);
  _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& insert(size_type __pos, const value_type* __s, size_type __n);
  _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& insert(size_type __pos, const value_type* __s);
  _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& insert(size_type __pos, size_type __n, value_type __c);
  _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator insert(const_iterator __pos, value_type __c);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1409 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    template <_ContainerCompatibleRange<_CharT> _Range>
    _LIBCPP_HIDE_FROM_ABI
    constexpr iterator insert_range(const_iterator __position, _Range&& __range) {
      if constexpr (ranges::forward_range<_Range> || ranges::sized_range<_Range>) {
        auto __n = static_cast<size_type>(ranges::distance(__range));
        return __insert_with_size(__position, ranges::begin(__range), ranges::end(__range), __n);

      } else {
        basic_string __temp(from_range, std::forward<_Range>(__range), __alloc());
        return insert(__position, __temp.data(), __temp.data() + __temp.size());
      }
    }
#endif
# 1422 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator
  insert(const_iterator __pos, size_type __n, value_type __c) {
    difference_type __p = __pos - begin();
    insert(static_cast<size_type>(__p), __n, __c);
    return begin() + __p;
  }

  template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator
  insert(const_iterator __pos, _InputIterator __first, _InputIterator __last);

  template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator
  insert(const_iterator __pos, _ForwardIterator __first, _ForwardIterator __last);

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    iterator insert(const_iterator __pos, initializer_list<value_type> __il)
                    {return insert(__pos, __il.begin(), __il.end());}
#endif // _LIBCPP_CXX03_LANG
# 1443 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

    _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& erase(size_type __pos = 0, size_type __n = npos);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    iterator      erase(const_iterator __pos);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    iterator      erase(const_iterator __first, const_iterator __last);

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  replace(size_type __pos1, size_type __n1, const basic_string& __str) {
    return replace(__pos1, __n1, __str.data(), __str.size());
  }

  template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  replace(size_type __pos1, size_type __n1, const _Tp& __t) {
    __self_view __sv = __t;
    return replace(__pos1, __n1, __sv.data(), __sv.size());
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2 = npos);

  template <class _Tp,
            __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                              !__is_same_uncvref<_Tp, basic_string>::value,
                          int> = 0>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  replace(size_type __pos1, size_type __n1, const _Tp& __t, size_type __pos2, size_type __n2 = npos);

  _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  replace(size_type __pos, size_type __n1, const value_type* __s, size_type __n2);
  _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& replace(size_type __pos, size_type __n1, const value_type* __s);
  _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& replace(size_type __pos, size_type __n1, size_type __n2, value_type __c);

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  replace(const_iterator __i1, const_iterator __i2, const basic_string& __str) {
    return replace(
        static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __str.data(), __str.size());
  }

  template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  replace(const_iterator __i1, const_iterator __i2, const _Tp& __t) {
    __self_view __sv = __t;
    return replace(__i1 - begin(), __i2 - __i1, __sv);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  replace(const_iterator __i1, const_iterator __i2, const value_type* __s, size_type __n) {
    return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __s, __n);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  replace(const_iterator __i1, const_iterator __i2, const value_type* __s) {
    return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __s);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c) {
    return replace(static_cast<size_type>(__i1 - begin()), static_cast<size_type>(__i2 - __i1), __n, __c);
  }

  template <class _InputIterator, __enable_if_t<__has_input_iterator_category<_InputIterator>::value, int> = 0>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string&
  replace(const_iterator __i1, const_iterator __i2, _InputIterator __j1, _InputIterator __j2);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1510 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
  template <_ContainerCompatibleRange<_CharT> _Range>
  _LIBCPP_HIDE_FROM_ABI
  constexpr basic_string& replace_with_range(const_iterator __i1, const_iterator __i2, _Range&& __range) {
    basic_string __temp(from_range, std::forward<_Range>(__range), __alloc());
    return replace(__i1, __i2, __temp);
  }
#endif
# 1517 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    basic_string& replace(const_iterator __i1, const_iterator __i2, initializer_list<value_type> __il)
        {return replace(__i1, __i2, __il.begin(), __il.end());}
#endif // _LIBCPP_CXX03_LANG
# 1523 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

    _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type copy(value_type* __s, size_type __n, size_type __pos = 0) const;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1527 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    basic_string substr(size_type __pos = 0, size_type __n = npos) const {
      return basic_string(*this, __pos, __n);
    }
#else
# 1532 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    _LIBCPP_HIDE_FROM_ABI constexpr
    basic_string substr(size_type __pos = 0, size_type __n = npos) const& {
      return basic_string(*this, __pos, __n);
    }

    _LIBCPP_HIDE_FROM_ABI constexpr
    basic_string substr(size_type __pos = 0, size_type __n = npos) && {
      return basic_string(std::move(*this), __pos, __n);
    }
#endif
# 1542 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void swap(basic_string& __str)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1546 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
        _NOEXCEPT;
#else
# 1548 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
        _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
                    __is_nothrow_swappable<allocator_type>::value);
#endif
# 1551 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const value_type* c_str() const _NOEXCEPT {return data();}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const value_type* data() const _NOEXCEPT  {return std::__to_address(__get_pointer());}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1557 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    value_type* data()             _NOEXCEPT  {return std::__to_address(__get_pointer());}
#endif
# 1560 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    allocator_type get_allocator() const _NOEXCEPT {return __alloc();}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;

    template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
    find(const _Tp& __t, size_type __pos = 0) const _NOEXCEPT;

    _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type find(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
    _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type find(value_type __c, size_type __pos = 0) const _NOEXCEPT;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type rfind(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;

    template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
    rfind(const _Tp& __t, size_type __pos = npos) const _NOEXCEPT;

    _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type rfind(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type rfind(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
    _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type rfind(value_type __c, size_type __pos = npos) const _NOEXCEPT;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_first_of(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;

    template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
    find_first_of(const _Tp& __t, size_type __pos = 0) const _NOEXCEPT;

    _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_first_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_first_of(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_first_of(value_type __c, size_type __pos = 0) const _NOEXCEPT;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_last_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;

    template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
    find_last_of(const _Tp& __t, size_type __pos = npos) const _NOEXCEPT;

    _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_last_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_last_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_last_of(value_type __c, size_type __pos = npos) const _NOEXCEPT;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;

    template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
    find_first_not_of(const _Tp& __t, size_type __pos = 0) const _NOEXCEPT;

    _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_first_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_first_not_of(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_first_not_of(value_type __c, size_type __pos = 0) const _NOEXCEPT;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;

    template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type
    find_last_not_of(const _Tp& __t, size_type __pos = npos) const _NOEXCEPT;

    _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_last_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_last_not_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type find_last_not_of(value_type __c, size_type __pos = npos) const _NOEXCEPT;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    int compare(const basic_string& __str) const _NOEXCEPT;

    template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 int
    compare(const _Tp& __t) const _NOEXCEPT;

    template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> = 0>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 int
    compare(size_type __pos1, size_type __n1, const _Tp& __t) const;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    int compare(size_type __pos1, size_type __n1, const basic_string& __str) const;
    _LIBCPP_CONSTEXPR_SINCE_CXX20
    int compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2,
                size_type __n2 = npos) const;

    template <class _Tp,
              __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                                !__is_same_uncvref<_Tp, basic_string>::value,
                            int> = 0>
    inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 int
    compare(size_type __pos1, size_type __n1, const _Tp& __t, size_type __pos2, size_type __n2 = npos) const;

    _LIBCPP_CONSTEXPR_SINCE_CXX20 int compare(const value_type* __s) const _NOEXCEPT;
    _LIBCPP_CONSTEXPR_SINCE_CXX20 int compare(size_type __pos1, size_type __n1, const value_type* __s) const;
    _LIBCPP_CONSTEXPR_SINCE_CXX20
    int compare(size_type __pos1, size_type __n1, const value_type* __s, size_type __n2) const;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1675 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    constexpr _LIBCPP_HIDE_FROM_ABI
    bool starts_with(__self_view __sv) const noexcept
    { return __self_view(data(), size()).starts_with(__sv); }

    constexpr _LIBCPP_HIDE_FROM_ABI
    bool starts_with(value_type __c) const noexcept
    { return !empty() && _Traits::eq(front(), __c); }

    constexpr _LIBCPP_HIDE_FROM_ABI
    bool starts_with(const value_type* __s) const noexcept
    { return starts_with(__self_view(__s)); }

    constexpr _LIBCPP_HIDE_FROM_ABI
    bool ends_with(__self_view __sv) const noexcept
    { return __self_view(data(), size()).ends_with( __sv); }

    constexpr _LIBCPP_HIDE_FROM_ABI
    bool ends_with(value_type __c) const noexcept
    { return !empty() && _Traits::eq(back(), __c); }

    constexpr _LIBCPP_HIDE_FROM_ABI
    bool ends_with(const value_type* __s) const noexcept
    { return ends_with(__self_view(__s)); }
#endif
# 1699 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1701 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    constexpr _LIBCPP_HIDE_FROM_ABI
    bool contains(__self_view __sv) const noexcept
    { return __self_view(data(), size()).contains(__sv); }

    constexpr _LIBCPP_HIDE_FROM_ABI
    bool contains(value_type __c) const noexcept
    { return __self_view(data(), size()).contains(__c); }

    constexpr _LIBCPP_HIDE_FROM_ABI
    bool contains(const value_type* __s) const
    { return __self_view(data(), size()).contains(__s); }
#endif
# 1713 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __invariants() const;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __clear_and_shrink() _NOEXCEPT;

private:
    template<class _Alloc>
    inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    bool friend operator==(const basic_string<char, char_traits<char>, _Alloc>& __lhs,
                           const basic_string<char, char_traits<char>, _Alloc>& __rhs) _NOEXCEPT;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __shrink_or_extend(size_type __target_capacity);

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    bool __is_long() const _NOEXCEPT {
        if (__libcpp_is_constant_evaluated() && __builtin_constant_p(__r_.first().__l.__is_long_)) {
            return __r_.first().__l.__is_long_;
        }
        return __r_.first().__s.__is_long_;
    }

    static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __begin_lifetime(pointer __begin, size_type __n) {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1736 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
        if (__libcpp_is_constant_evaluated()) {
            for (size_type __i = 0; __i != __n; ++__i)
                std::construct_at(std::addressof(__begin[__i]));
        }
#else
# 1741 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
        (void)__begin;
        (void)__n;
#endif // _LIBCPP_STD_VER >= 20
# 1744 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    }

    _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI static bool __fits_in_sso(size_type __sz) {
        return __sz < __min_cap;
    }

    template <class _Iterator, class _Sentinel>
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void __assign_trivial(_Iterator __first, _Sentinel __last, size_type __n);

    template <class _Iterator, class _Sentinel>
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void __assign_with_sentinel(_Iterator __first, _Sentinel __last);

    template <class _ForwardIterator, class _Sentinel>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
    iterator __insert_from_safe_copy(size_type __n, size_type __ip, _ForwardIterator __first, _Sentinel __last) {
        size_type __sz = size();
        size_type __cap = capacity();
        value_type* __p;
        if (__cap - __sz >= __n)
        {
            __p = std::__to_address(__get_pointer());
            size_type __n_move = __sz - __ip;
            if (__n_move != 0)
                traits_type::move(__p + __ip + __n, __p + __ip, __n_move);
        }
        else
        {
            __grow_by_without_replace(__cap, __sz + __n - __cap, __sz, __ip, 0, __n);
            __p = std::__to_address(__get_long_pointer());
        }
        __sz += __n;
        __set_size(__sz);
        traits_type::assign(__p[__sz], value_type());
        for (__p += __ip; __first != __last; ++__p, ++__first)
            traits_type::assign(*__p, *__first);

        return begin() + __ip;
    }

    template<class _Iterator, class _Sentinel>
    _LIBCPP_CONSTEXPR_SINCE_CXX20
    iterator __insert_with_size(const_iterator __pos, _Iterator __first, _Sentinel __last, size_type __n);

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 allocator_type& __alloc() _NOEXCEPT { return __r_.second(); }
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const allocator_type& __alloc() const _NOEXCEPT { return __r_.second(); }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __set_short_size(size_type __s) _NOEXCEPT {
        _LIBCPP_ASSERT_INTERNAL(
            __s < __min_cap, "__s should never be greater than or equal to the short string capacity");
        __r_.first().__s.__size_ = __s;
        __r_.first().__s.__is_long_ = false;
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type __get_short_size() const _NOEXCEPT {
        _LIBCPP_ASSERT_INTERNAL(
            !__r_.first().__s.__is_long_, "String has to be short when trying to get the short size");
        return __r_.first().__s.__size_;
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __set_long_size(size_type __s) _NOEXCEPT
        {__r_.first().__l.__size_ = __s;}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type __get_long_size() const _NOEXCEPT
        {return __r_.first().__l.__size_;}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __set_size(size_type __s) _NOEXCEPT
        {if (__is_long()) __set_long_size(__s); else __set_short_size(__s);}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __set_long_cap(size_type __s) _NOEXCEPT {
        __r_.first().__l.__cap_ = __s / __endian_factor;
        __r_.first().__l.__is_long_ = true;
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type __get_long_cap() const _NOEXCEPT {
        return __r_.first().__l.__cap_ * __endian_factor;
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __set_long_pointer(pointer __p) _NOEXCEPT
        {__r_.first().__l.__data_ = __p;}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    pointer __get_long_pointer() _NOEXCEPT
        {return __r_.first().__l.__data_;}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_pointer __get_long_pointer() const _NOEXCEPT
        {return __r_.first().__l.__data_;}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    pointer __get_short_pointer() _NOEXCEPT
        {return pointer_traits<pointer>::pointer_to(__r_.first().__s.__data_[0]);}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_pointer __get_short_pointer() const _NOEXCEPT
        {return pointer_traits<const_pointer>::pointer_to(__r_.first().__s.__data_[0]);}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    pointer __get_pointer() _NOEXCEPT
        {return __is_long() ? __get_long_pointer() : __get_short_pointer();}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_pointer __get_pointer() const _NOEXCEPT
        {return __is_long() ? __get_long_pointer() : __get_short_pointer();}

    template <size_type __a> static
        _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
        size_type __align_it(size_type __s) _NOEXCEPT
            {return (__s + (__a-1)) & ~(__a-1);}
    enum {
      __alignment =
#ifdef _LIBCPP_ABI_STRING_8_BYTE_ALIGNMENT
      8
#else
# 1859 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
      16
#endif
# 1861 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    };
    static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type __recommend(size_type __s) _NOEXCEPT
    {
        if (__s < __min_cap) {
            return static_cast<size_type>(__min_cap) - 1;
        }
        size_type __guess = __align_it<sizeof(value_type) < __alignment ?
                     __alignment/sizeof(value_type) : 1 > (__s+1) - 1;
        if (__guess == __min_cap) ++__guess;
        return __guess;
    }

    inline _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __init(const value_type* __s, size_type __sz, size_type __reserve);
    inline _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __init(const value_type* __s, size_type __sz);
    inline _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __init(size_type __n, value_type __c);

    // Slow path for the (inlined) copy constructor for 'long' strings.
    // Always externally instantiated and not inlined.
    // Requires that __s is zero terminated.
    // The main reason for this function to exist is because for unstable, we
    // want to allow inlining of the copy constructor. However, we don't want
    // to call the __init() functions as those are marked as inline which may
    // result in over-aggressive inlining by the compiler, where our aim is
    // to only inline the fast path code directly in the ctor.
    _LIBCPP_CONSTEXPR_SINCE_CXX20 void __init_copy_ctor_external(const value_type* __s, size_type __sz);

    template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
    inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void __init(_InputIterator __first, _InputIterator __last);

    template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
    inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void __init(_ForwardIterator __first, _ForwardIterator __last);

    template <class _InputIterator, class _Sentinel>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __init_with_sentinel(_InputIterator __first, _Sentinel __last);
    template <class _InputIterator, class _Sentinel>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __init_with_size(_InputIterator __first, _Sentinel __last, size_type __sz);

    _LIBCPP_CONSTEXPR_SINCE_CXX20
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_ABI_VERSION >= 2 //  We want to use the function in the dylib in ABIv1
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1906 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    _LIBCPP_HIDE_FROM_ABI
#endif
# 1908 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    _LIBCPP_DEPRECATED_("use __grow_by_without_replace")
    void __grow_by(size_type __old_cap, size_type __delta_cap, size_type __old_sz,
                   size_type __n_copy,  size_type __n_del,     size_type __n_add = 0);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void __grow_by_without_replace(size_type __old_cap, size_type __delta_cap, size_type __old_sz,
                   size_type __n_copy,  size_type __n_del,     size_type __n_add = 0);
    _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __grow_by_and_replace(size_type __old_cap, size_type __delta_cap, size_type __old_sz,
                               size_type __n_copy,  size_type __n_del,
                               size_type __n_add, const value_type* __p_new_stuff);

    // __assign_no_alias is invoked for assignment operations where we
    // have proof that the input does not alias the current instance.
    // For example, operator=(basic_string) performs a 'self' check.
    template <bool __is_short>
    _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& __assign_no_alias(const value_type* __s, size_type __n);

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __erase_to_end(size_type __pos) {
    __null_terminate_at(std::__to_address(__get_pointer()), __pos);
  }

    // __erase_external_with_move is invoked for erase() invocations where
    // `n ~= npos`, likely requiring memory moves on the string data.
    _LIBCPP_CONSTEXPR_SINCE_CXX20 void __erase_external_with_move(size_type __pos, size_type __n);

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __copy_assign_alloc(const basic_string& __str)
        {__copy_assign_alloc(__str, integral_constant<bool,
                      __alloc_traits::propagate_on_container_copy_assignment::value>());}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __copy_assign_alloc(const basic_string& __str, true_type)
        {
            if (__alloc() == __str.__alloc())
                __alloc() = __str.__alloc();
            else
            {
                if (!__str.__is_long())
                {
                    __clear_and_shrink();
                    __alloc() = __str.__alloc();
                }
                else
                {
                    allocator_type __a = __str.__alloc();
                    auto __allocation = std::__allocate_at_least(__a, __str.__get_long_cap());
                    __begin_lifetime(__allocation.ptr, __allocation.count);
                    if (__is_long())
                        __alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap());
                    __alloc() = std::move(__a);
                    __set_long_pointer(__allocation.ptr);
                    __set_long_cap(__allocation.count);
                    __set_long_size(__str.size());
                }
            }
        }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __copy_assign_alloc(const basic_string&, false_type) _NOEXCEPT
        {}

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __move_assign(basic_string& __str, false_type)
        _NOEXCEPT_(__alloc_traits::is_always_equal::value);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __move_assign(basic_string& __str, true_type)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1976 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
        _NOEXCEPT;
#else
# 1978 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
        _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
#endif
# 1980 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#endif
# 1981 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void
    __move_assign_alloc(basic_string& __str)
        _NOEXCEPT_(
            !__alloc_traits::propagate_on_container_move_assignment::value ||
            is_nothrow_move_assignable<allocator_type>::value)
    {__move_assign_alloc(__str, integral_constant<bool,
                      __alloc_traits::propagate_on_container_move_assignment::value>());}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __move_assign_alloc(basic_string& __c, true_type)
        _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
        {
            __alloc() = std::move(__c.__alloc());
        }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __move_assign_alloc(basic_string&, false_type)
        _NOEXCEPT
        {}

    _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& __assign_external(const value_type* __s);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& __assign_external(const value_type* __s, size_type __n);

    // Assigns the value in __s, guaranteed to be __n < __min_cap in length.
    inline _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& __assign_short(const value_type* __s, size_type __n) {
      pointer __p = __is_long()
                        ? (__set_long_size(__n), __get_long_pointer())
                        : (__set_short_size(__n), __get_short_pointer());
      traits_type::move(std::__to_address(__p), __s, __n);
      traits_type::assign(__p[__n], value_type());
      return *this;
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    basic_string& __null_terminate_at(value_type* __p, size_type __newsz) {
      __set_size(__newsz);
      traits_type::assign(__p[__newsz], value_type());
      return *this;
    }

    template <class _Tp>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __addr_in_range(const _Tp& __v) const {
      return std::__is_pointer_in_range(data(), data() + size() + 1, std::addressof(__v));
    }

    _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
    void __throw_length_error() const {
        std::__throw_length_error("basic_string");
    }

    _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
    void __throw_out_of_range() const {
        std::__throw_out_of_range("basic_string");
    }

    friend _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string operator+<>(const basic_string&, const basic_string&);
    friend _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string operator+<>(const value_type*, const basic_string&);
    friend _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string operator+<>(value_type, const basic_string&);
    friend _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string operator+<>(const basic_string&, const value_type*);
    friend _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string operator+<>(const basic_string&, value_type);
};

// These declarations must appear before any functions are implicitly used
// so that they have the correct visibility specifier.
#define _LIBCPP_DECLARE(...) extern template __VA_ARGS__;
#ifdef _LIBCPP_ABI_STRING_OPTIMIZED_EXTERNAL_INSTANTIATION
    _LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, char)
#   ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
        _LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, wchar_t)
#   endif
# 2053 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#else
# 2054 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, char)
#   ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
        _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, wchar_t)
#   endif
# 2058 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#endif
# 2059 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#undef _LIBCPP_DECLARE


#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2063 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
template<class _InputIterator,
         class _CharT = __iter_value_type<_InputIterator>,
         class _Allocator = allocator<_CharT>,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
         class = enable_if_t<__is_allocator<_Allocator>::value>
         >
basic_string(_InputIterator, _InputIterator, _Allocator = _Allocator())
  -> basic_string<_CharT, char_traits<_CharT>, _Allocator>;

template<class _CharT,
         class _Traits,
         class _Allocator = allocator<_CharT>,
         class = enable_if_t<__is_allocator<_Allocator>::value>
         >
explicit basic_string(basic_string_view<_CharT, _Traits>, const _Allocator& = _Allocator())
  -> basic_string<_CharT, _Traits, _Allocator>;

template<class _CharT,
         class _Traits,
         class _Allocator = allocator<_CharT>,
         class = enable_if_t<__is_allocator<_Allocator>::value>,
         class _Sz = typename allocator_traits<_Allocator>::size_type
         >
basic_string(basic_string_view<_CharT, _Traits>, _Sz, _Sz, const _Allocator& = _Allocator())
  -> basic_string<_CharT, _Traits, _Allocator>;
#endif
# 2089 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2091 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
template <ranges::input_range _Range,
          class _Allocator = allocator<ranges::range_value_t<_Range>>,
          class = enable_if_t<__is_allocator<_Allocator>::value>
          >
basic_string(from_range_t, _Range&&, _Allocator = _Allocator())
  -> basic_string<ranges::range_value_t<_Range>, char_traits<ranges::range_value_t<_Range>>, _Allocator>;
#endif
# 2098 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s,
                                                       size_type __sz,
                                                       size_type __reserve)
{
    if (__libcpp_is_constant_evaluated())
        __r_.first() = __rep();
    if (__reserve > max_size())
        __throw_length_error();
    pointer __p;
    if (__fits_in_sso(__reserve))
    {
        __set_short_size(__sz);
        __p = __get_short_pointer();
    }
    else
    {
        auto __allocation = std::__allocate_at_least(__alloc(), __recommend(__reserve) + 1);
        __p = __allocation.ptr;
        __begin_lifetime(__p, __allocation.count);
        __set_long_pointer(__p);
        __set_long_cap(__allocation.count);
        __set_long_size(__sz);
    }
    traits_type::copy(std::__to_address(__p), __s, __sz);
    traits_type::assign(__p[__sz], value_type());
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_type __sz)
{
    if (__libcpp_is_constant_evaluated())
        __r_.first() = __rep();
    if (__sz > max_size())
        __throw_length_error();
    pointer __p;
    if (__fits_in_sso(__sz))
    {
        __set_short_size(__sz);
        __p = __get_short_pointer();
    }
    else
    {
        auto __allocation = std::__allocate_at_least(__alloc(), __recommend(__sz) + 1);
        __p = __allocation.ptr;
        __begin_lifetime(__p, __allocation.count);
        __set_long_pointer(__p);
        __set_long_cap(__allocation.count);
        __set_long_size(__sz);
    }
    traits_type::copy(std::__to_address(__p), __s, __sz);
    traits_type::assign(__p[__sz], value_type());
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void basic_string<_CharT, _Traits, _Allocator>::__init_copy_ctor_external(
    const value_type* __s, size_type __sz) {
  if (__libcpp_is_constant_evaluated())
    __r_.first() = __rep();

  pointer __p;
  if (__fits_in_sso(__sz)) {
    __p = __get_short_pointer();
    __set_short_size(__sz);
  } else {
    if (__sz > max_size())
      __throw_length_error();
    auto __allocation = std::__allocate_at_least(__alloc(), __recommend(__sz) + 1);
    __p = __allocation.ptr;
    __begin_lifetime(__p, __allocation.count);
    __set_long_pointer(__p);
    __set_long_cap(__allocation.count);
    __set_long_size(__sz);
  }
  traits_type::copy(std::__to_address(__p), __s, __sz + 1);
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__init(size_type __n, value_type __c)
{
    if (__libcpp_is_constant_evaluated())
        __r_.first() = __rep();

    if (__n > max_size())
        __throw_length_error();
    pointer __p;
    if (__fits_in_sso(__n))
    {
        __set_short_size(__n);
        __p = __get_short_pointer();
    }
    else
    {
        auto __allocation = std::__allocate_at_least(__alloc(), __recommend(__n) + 1);
        __p = __allocation.ptr;
        __begin_lifetime(__p, __allocation.count);
        __set_long_pointer(__p);
        __set_long_cap(__allocation.count);
        __set_long_size(__n);
    }
    traits_type::assign(std::__to_address(__p), __n, __c);
    traits_type::assign(__p[__n], value_type());
}

template <class _CharT, class _Traits, class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20
void basic_string<_CharT, _Traits, _Allocator>::__init(_InputIterator __first, _InputIterator __last)
{
  __init_with_sentinel(std::move(__first), std::move(__last));
}

template <class _CharT, class _Traits, class _Allocator>
template <class _InputIterator, class _Sentinel>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void basic_string<_CharT, _Traits, _Allocator>::__init_with_sentinel(_InputIterator __first, _Sentinel __last) {
    __r_.first() = __rep();

#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 2227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    for (; __first != __last; ++__first)
        push_back(*__first);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        if (__is_long())
            __alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap());
        throw;
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 2238 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
}

template <class _CharT, class _Traits, class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
basic_string<_CharT, _Traits, _Allocator>::__init(_ForwardIterator __first, _ForwardIterator __last)
{
  size_type __sz = static_cast<size_type>(std::distance(__first, __last));
  __init_with_size(__first, __last, __sz);
}

template <class _CharT, class _Traits, class _Allocator>
template <class _InputIterator, class _Sentinel>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void basic_string<_CharT, _Traits, _Allocator>::__init_with_size(
    _InputIterator __first, _Sentinel __last, size_type __sz) {
    if (__libcpp_is_constant_evaluated())
        __r_.first() = __rep();

    if (__sz > max_size())
        __throw_length_error();

    pointer __p;
    if (__fits_in_sso(__sz))
    {
        __set_short_size(__sz);
        __p = __get_short_pointer();

    }
    else
    {
        auto __allocation = std::__allocate_at_least(__alloc(), __recommend(__sz) + 1);
        __p = __allocation.ptr;
        __begin_lifetime(__p, __allocation.count);
        __set_long_pointer(__p);
        __set_long_cap(__allocation.count);
        __set_long_size(__sz);
    }

#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif  // _LIBCPP_HAS_NO_EXCEPTIONS
# 2281 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    for (; __first != __last; ++__first, (void) ++__p)
        traits_type::assign(*__p, *__first);
    traits_type::assign(*__p, value_type());
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        if (__is_long())
            __alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap());
        throw;
    }
#endif  // _LIBCPP_HAS_NO_EXCEPTIONS
# 2293 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__grow_by_and_replace
    (size_type __old_cap, size_type __delta_cap, size_type __old_sz,
     size_type __n_copy,  size_type __n_del,     size_type __n_add, const value_type* __p_new_stuff)
{
    size_type __ms = max_size();
    if (__delta_cap > __ms - __old_cap - 1)
        __throw_length_error();
    pointer __old_p = __get_pointer();
    size_type __cap = __old_cap < __ms / 2 - __alignment ?
                          __recommend(std::max(__old_cap + __delta_cap, 2 * __old_cap)) :
                          __ms - 1;
    auto __allocation = std::__allocate_at_least(__alloc(), __cap + 1);
    pointer __p = __allocation.ptr;
    __begin_lifetime(__p, __allocation.count);
    if (__n_copy != 0)
        traits_type::copy(std::__to_address(__p),
                          std::__to_address(__old_p), __n_copy);
    if (__n_add != 0)
        traits_type::copy(std::__to_address(__p) + __n_copy, __p_new_stuff, __n_add);
    size_type __sec_cp_sz = __old_sz - __n_del - __n_copy;
    if (__sec_cp_sz != 0)
        traits_type::copy(std::__to_address(__p) + __n_copy + __n_add,
                          std::__to_address(__old_p) + __n_copy + __n_del, __sec_cp_sz);
    if (__old_cap+1 != __min_cap)
        __alloc_traits::deallocate(__alloc(), __old_p, __old_cap+1);
    __set_long_pointer(__p);
    __set_long_cap(__allocation.count);
    __old_sz = __n_copy + __n_add + __sec_cp_sz;
    __set_long_size(__old_sz);
    traits_type::assign(__p[__old_sz], value_type());
}

// __grow_by is deprecated because it does not set the size. It may not update the size when the size is changed, and it
// may also not set the size at all when the string was short initially. This leads to unpredictable size value. It is
// not removed or changed to avoid breaking the ABI.
template <class _CharT, class _Traits, class _Allocator>
void
_LIBCPP_CONSTEXPR_SINCE_CXX20
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_ABI_VERSION >= 2 // We want to use the function in the dylib in ABIv1
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2337 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    _LIBCPP_HIDE_FROM_ABI
#endif
# 2339 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    _LIBCPP_DEPRECATED_("use __grow_by_without_replace")
basic_string<_CharT, _Traits, _Allocator>::__grow_by(size_type __old_cap, size_type __delta_cap, size_type __old_sz,
                                                     size_type __n_copy,  size_type __n_del,     size_type __n_add)
{
    size_type __ms = max_size();
    if (__delta_cap > __ms - __old_cap)
        __throw_length_error();
    pointer __old_p = __get_pointer();
    size_type __cap = __old_cap < __ms / 2 - __alignment ?
                          __recommend(std::max(__old_cap + __delta_cap, 2 * __old_cap)) :
                          __ms - 1;
    auto __allocation = std::__allocate_at_least(__alloc(), __cap + 1);
    pointer __p = __allocation.ptr;
    __begin_lifetime(__p, __allocation.count);
    if (__n_copy != 0)
        traits_type::copy(std::__to_address(__p),
                          std::__to_address(__old_p), __n_copy);
    size_type __sec_cp_sz = __old_sz - __n_del - __n_copy;
    if (__sec_cp_sz != 0)
        traits_type::copy(std::__to_address(__p) + __n_copy + __n_add,
                          std::__to_address(__old_p) + __n_copy + __n_del,
                          __sec_cp_sz);
    if (__old_cap + 1 != __min_cap)
        __alloc_traits::deallocate(__alloc(), __old_p, __old_cap + 1);
    __set_long_pointer(__p);
    __set_long_cap(__allocation.count);
}

template <class _CharT, class _Traits, class _Allocator>
void _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
basic_string<_CharT, _Traits, _Allocator>::__grow_by_without_replace(
    size_type __old_cap,
    size_type __delta_cap,
    size_type __old_sz,
    size_type __n_copy,
    size_type __n_del,
    size_type __n_add) {
    _LIBCPP_SUPPRESS_DEPRECATED_PUSH
    __grow_by(__old_cap, __delta_cap, __old_sz, __n_copy, __n_del, __n_add);
    _LIBCPP_SUPPRESS_DEPRECATED_POP
    __set_long_size(__old_sz - __n_del + __n_add);
}

// assign

template <class _CharT, class _Traits, class _Allocator>
template <bool __is_short>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::__assign_no_alias(
    const value_type* __s, size_type __n) {
  size_type __cap = __is_short ? static_cast<size_type>(__min_cap) : __get_long_cap();
  if (__n < __cap) {
    pointer __p = __is_short ? __get_short_pointer() : __get_long_pointer();
    __is_short ? __set_short_size(__n) : __set_long_size(__n);
    traits_type::copy(std::__to_address(__p), __s, __n);
    traits_type::assign(__p[__n], value_type());
  } else {
    size_type __sz = __is_short ? __get_short_size() : __get_long_size();
    __grow_by_and_replace(__cap - 1, __n - __cap + 1, __sz, 0, __sz, __n, __s);
  }
  return *this;
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::__assign_external(
    const value_type* __s, size_type __n) {
  size_type __cap = capacity();
  if (__cap >= __n) {
    value_type* __p = std::__to_address(__get_pointer());
    traits_type::move(__p, __s, __n);
    return __null_terminate_at(__p, __n);
  } else {
    size_type __sz = size();
    __grow_by_and_replace(__cap, __n - __cap, __sz, 0, __sz, __n, __s);
    return *this;
  }
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s, size_type __n)
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "string::assign received nullptr");
    return (__builtin_constant_p(__n) && __fits_in_sso(__n))
               ? __assign_short(__s, __n)
               : __assign_external(__s, __n);
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(size_type __n, value_type __c)
{
    size_type __cap = capacity();
    if (__cap < __n)
    {
        size_type __sz = size();
        __grow_by_without_replace(__cap, __n - __cap, __sz, 0, __sz);
    }
    value_type* __p = std::__to_address(__get_pointer());
    traits_type::assign(__p, __n, __c);
    return __null_terminate_at(__p, __n);
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::operator=(value_type __c)
{
    pointer __p;
    if (__is_long())
    {
        __p = __get_long_pointer();
        __set_long_size(1);
    }
    else
    {
        __p = __get_short_pointer();
        __set_short_size(1);
    }
    traits_type::assign(*__p, __c);
    traits_type::assign(*++__p, value_type());
    return *this;
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::operator=(const basic_string& __str)
{
  if (this != std::addressof(__str)) {
    __copy_assign_alloc(__str);
    if (!__is_long()) {
      if (!__str.__is_long()) {
        __r_.first() = __str.__r_.first();
      } else {
        return __assign_no_alias<true>(__str.data(), __str.size());
      }
    } else {
      return __assign_no_alias<false>(__str.data(), __str.size());
    }
  }
  return *this;
}

#ifndef _LIBCPP_CXX03_LANG

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, false_type)
    _NOEXCEPT_(__alloc_traits::is_always_equal::value)
{
    if (__alloc() != __str.__alloc())
        assign(__str);
    else
        __move_assign(__str, true_type());
}

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, true_type)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2507 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    _NOEXCEPT
#else
# 2509 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
#endif
# 2511 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
{
  if (__is_long()) {
    __alloc_traits::deallocate(__alloc(), __get_long_pointer(),
                               __get_long_cap());
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2516 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    if (!is_nothrow_move_assignable<allocator_type>::value) {
      __set_short_size(0);
      traits_type::assign(__get_short_pointer()[0], value_type());
    }
#endif
# 2521 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
  }
  __move_assign_alloc(__str);
  __r_.first() = __str.__r_.first();
  __str.__set_short_size(0);
  traits_type::assign(__str.__get_short_pointer()[0], value_type());
}

#endif
# 2529 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

template <class _CharT, class _Traits, class _Allocator>
template<class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(_InputIterator __first, _InputIterator __last)
{
  __assign_with_sentinel(__first, __last);
  return *this;
}

template <class _CharT, class _Traits, class _Allocator>
template <class _InputIterator, class _Sentinel>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__assign_with_sentinel(_InputIterator __first, _Sentinel __last) {
  const basic_string __temp(__init_with_sentinel_tag(), std::move(__first), std::move(__last), __alloc());
  assign(__temp.data(), __temp.size());
}

template <class _CharT, class _Traits, class _Allocator>
template<class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last)
{
  if (__string_is_trivial_iterator<_ForwardIterator>::value) {
    size_type __n = static_cast<size_type>(std::distance(__first, __last));
    __assign_trivial(__first, __last, __n);
  } else {
    __assign_with_sentinel(__first, __last);
  }

  return *this;
}

template <class _CharT, class _Traits, class _Allocator>
template <class _Iterator, class _Sentinel>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void
basic_string<_CharT, _Traits, _Allocator>::__assign_trivial(_Iterator __first, _Sentinel __last, size_type __n) {
  _LIBCPP_ASSERT_INTERNAL(
      __string_is_trivial_iterator<_Iterator>::value, "The iterator type given to `__assign_trivial` must be trivial");

  size_type __cap = capacity();
  if (__cap < __n) {
    // Unlike `append` functions, if the input range points into the string itself, there is no case that the input
    // range could get invalidated by reallocation:
    // 1. If the input range is a subset of the string itself, its size cannot exceed the capacity of the string,
    //    thus no reallocation would happen.
    // 2. In the exotic case where the input range is the byte representation of the string itself, the string
    //    object itself stays valid even if reallocation happens.
    size_type __sz = size();
    __grow_by_without_replace(__cap, __n - __cap, __sz, 0, __sz);
    }
    pointer __p = __get_pointer();
    for (; __first != __last; ++__p, (void) ++__first)
        traits_type::assign(*__p, *__first);
    traits_type::assign(*__p, value_type());
    __set_size(__n);
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(const basic_string& __str, size_type __pos, size_type __n)
{
    size_type __sz = __str.size();
    if (__pos > __sz)
        __throw_out_of_range();
    return assign(__str.data() + __pos, std::min(__n, __sz - __pos));
}

template <class _CharT, class _Traits, class _Allocator>
template <class _Tp,
          __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                            !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
                        int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(const _Tp& __t, size_type __pos, size_type __n) {
    __self_view __sv = __t;
    size_type __sz = __sv.size();
    if (__pos > __sz)
        __throw_out_of_range();
    return assign(__sv.data() + __pos, std::min(__n, __sz - __pos));
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::__assign_external(const value_type* __s) {
  return __assign_external(__s, traits_type::length(__s));
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s)
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string::assign received nullptr");
    return __builtin_constant_p(*__s)
               ? (__fits_in_sso(traits_type::length(__s))
                      ? __assign_short(__s, traits_type::length(__s))
                      : __assign_external(__s, traits_type::length(__s)))
               : __assign_external(__s);
}
// append

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s, size_type __n)
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "string::append received nullptr");
    size_type __cap = capacity();
    size_type __sz = size();
    if (__cap - __sz >= __n)
    {
        if (__n)
        {
            value_type* __p = std::__to_address(__get_pointer());
            traits_type::copy(__p + __sz, __s, __n);
            __sz += __n;
            __set_size(__sz);
            traits_type::assign(__p[__sz], value_type());
        }
    }
    else
        __grow_by_and_replace(__cap, __sz + __n - __cap, __sz, __sz, 0, __n, __s);
    return *this;
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::append(size_type __n, value_type __c)
{
    if (__n)
    {
        size_type __cap = capacity();
        size_type __sz = size();
        if (__cap - __sz < __n)
            __grow_by_without_replace(__cap, __sz + __n - __cap, __sz, __sz, 0);
        pointer __p = __get_pointer();
        traits_type::assign(std::__to_address(__p) + __sz, __n, __c);
        __sz += __n;
        __set_size(__sz);
        traits_type::assign(__p[__sz], value_type());
    }
    return *this;
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 inline void
basic_string<_CharT, _Traits, _Allocator>::__append_default_init(size_type __n)
{
    if (__n)
    {
        size_type __cap = capacity();
        size_type __sz = size();
        if (__cap - __sz < __n)
            __grow_by_without_replace(__cap, __sz + __n - __cap, __sz, __sz, 0);
        pointer __p = __get_pointer();
        __sz += __n;
        __set_size(__sz);
        traits_type::assign(__p[__sz], value_type());
    }
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::push_back(value_type __c)
{
    bool __is_short = !__is_long();
    size_type __cap;
    size_type __sz;
    if (__is_short)
    {
        __cap = __min_cap - 1;
        __sz = __get_short_size();
    }
    else
    {
        __cap = __get_long_cap() - 1;
        __sz = __get_long_size();
    }
    if (__sz == __cap)
    {
        __grow_by_without_replace(__cap, 1, __sz, __sz, 0);
        __is_short = false; // the string is always long after __grow_by
    }
    pointer __p = __get_pointer();
    if (__is_short)
    {
        __p = __get_short_pointer() + __sz;
        __set_short_size(__sz+1);
    }
    else
    {
        __p = __get_long_pointer() + __sz;
        __set_long_size(__sz+1);
    }
    traits_type::assign(*__p, __c);
    traits_type::assign(*++__p, value_type());
}

template <class _CharT, class _Traits, class _Allocator>
template<class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::append(
    _ForwardIterator __first, _ForwardIterator __last)
{
    size_type __sz = size();
    size_type __cap = capacity();
    size_type __n = static_cast<size_type>(std::distance(__first, __last));
    if (__n)
    {
        if (__string_is_trivial_iterator<_ForwardIterator>::value &&
            !__addr_in_range(*__first))
        {
            if (__cap - __sz < __n)
              __grow_by_without_replace(__cap, __sz + __n - __cap, __sz, __sz, 0);
            pointer __p = __get_pointer() + __sz;
            for (; __first != __last; ++__p, (void) ++__first)
                traits_type::assign(*__p, *__first);
            traits_type::assign(*__p, value_type());
            __set_size(__sz + __n);
        }
        else
        {
            const basic_string __temp(__first, __last, __alloc());
            append(__temp.data(), __temp.size());
        }
    }
    return *this;
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::append(const basic_string& __str, size_type __pos, size_type __n)
{
    size_type __sz = __str.size();
    if (__pos > __sz)
        __throw_out_of_range();
    return append(__str.data() + __pos, std::min(__n, __sz - __pos));
}

template <class _CharT, class _Traits, class _Allocator>
template <class _Tp,
          __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                            !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
                        int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::append(const _Tp& __t, size_type __pos, size_type __n) {
    __self_view __sv = __t;
    size_type __sz = __sv.size();
    if (__pos > __sz)
        __throw_out_of_range();
    return append(__sv.data() + __pos, std::min(__n, __sz - __pos));
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s)
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string::append received nullptr");
    return append(__s, traits_type::length(__s));
}

// insert

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s, size_type __n)
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "string::insert received nullptr");
    size_type __sz = size();
    if (__pos > __sz)
        __throw_out_of_range();
    size_type __cap = capacity();
    if (__cap - __sz >= __n)
    {
        if (__n)
        {
            value_type* __p = std::__to_address(__get_pointer());
            size_type __n_move = __sz - __pos;
            if (__n_move != 0)
            {
                if (std::__is_pointer_in_range(__p + __pos, __p + __sz, __s))
                    __s += __n;
                traits_type::move(__p + __pos + __n, __p + __pos, __n_move);
            }
            traits_type::move(__p + __pos, __s, __n);
            __sz += __n;
            __set_size(__sz);
            traits_type::assign(__p[__sz], value_type());
        }
    }
    else
        __grow_by_and_replace(__cap, __sz + __n - __cap, __sz, __pos, 0, __n, __s);
    return *this;
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, size_type __n, value_type __c)
{
    size_type __sz = size();
    if (__pos > __sz)
        __throw_out_of_range();
    if (__n)
    {
        size_type __cap = capacity();
        value_type* __p;
        if (__cap - __sz >= __n)
        {
            __p = std::__to_address(__get_pointer());
            size_type __n_move = __sz - __pos;
            if (__n_move != 0)
                traits_type::move(__p + __pos + __n, __p + __pos, __n_move);
        }
        else
        {
            __grow_by_without_replace(__cap, __sz + __n - __cap, __sz, __pos, 0, __n);
            __p = std::__to_address(__get_long_pointer());
        }
        traits_type::assign(__p + __pos, __n, __c);
        __sz += __n;
        __set_size(__sz);
        traits_type::assign(__p[__sz], value_type());
    }
    return *this;
}

template <class _CharT, class _Traits, class _Allocator>
template<class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::iterator
basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _InputIterator __first, _InputIterator __last)
{
  const basic_string __temp(__first, __last, __alloc());
  return insert(__pos, __temp.data(), __temp.data() + __temp.size());
}

template <class _CharT, class _Traits, class _Allocator>
template<class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::iterator
basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _ForwardIterator __first, _ForwardIterator __last)
{
    auto __n = static_cast<size_type>(std::distance(__first, __last));
    return __insert_with_size(__pos, __first, __last, __n);
}

template <class _CharT, class _Traits, class _Allocator>
template<class _Iterator, class _Sentinel>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::iterator
basic_string<_CharT, _Traits, _Allocator>::__insert_with_size(
    const_iterator __pos, _Iterator __first, _Sentinel __last, size_type __n) {
    size_type __ip = static_cast<size_type>(__pos - begin());
    if (__n == 0)
        return begin() + __ip;

    if (__string_is_trivial_iterator<_Iterator>::value && !__addr_in_range(*__first))
    {
        return __insert_from_safe_copy(__n, __ip, __first, __last);
    }
    else
    {
        const basic_string __temp(__init_with_sentinel_tag(), __first, __last, __alloc());
        return __insert_from_safe_copy(__n, __ip, __temp.begin(), __temp.end());
    }
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos1, const basic_string& __str,
                                                  size_type __pos2, size_type __n)
{
    size_type __str_sz = __str.size();
    if (__pos2 > __str_sz)
        __throw_out_of_range();
    return insert(__pos1, __str.data() + __pos2, std::min(__n, __str_sz - __pos2));
}

template <class _CharT, class _Traits, class _Allocator>
template <class _Tp,
          __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                            !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
                        int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos1, const _Tp& __t, size_type __pos2, size_type __n) {
    __self_view __sv = __t;
    size_type __str_sz = __sv.size();
    if (__pos2 > __str_sz)
        __throw_out_of_range();
    return insert(__pos1, __sv.data() + __pos2, std::min(__n, __str_sz - __pos2));
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s)
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string::insert received nullptr");
    return insert(__pos, __s, traits_type::length(__s));
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::iterator
basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, value_type __c)
{
    size_type __ip = static_cast<size_type>(__pos - begin());
    size_type __sz = size();
    size_type __cap = capacity();
    value_type* __p;
    if (__cap == __sz)
    {
        __grow_by_without_replace(__cap, 1, __sz, __ip, 0, 1);
        __p = std::__to_address(__get_long_pointer());
    }
    else
    {
        __p = std::__to_address(__get_pointer());
        size_type __n_move = __sz - __ip;
        if (__n_move != 0)
            traits_type::move(__p + __ip + 1, __p + __ip, __n_move);
    }
    traits_type::assign(__p[__ip], __c);
    traits_type::assign(__p[++__sz], value_type());
    __set_size(__sz);
    return begin() + static_cast<difference_type>(__ip);
}

// replace

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, const value_type* __s, size_type __n2)
    _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__n2 == 0 || __s != nullptr, "string::replace received nullptr");
    size_type __sz = size();
    if (__pos > __sz)
        __throw_out_of_range();
    __n1 = std::min(__n1, __sz - __pos);
    size_type __cap = capacity();
    if (__cap - __sz + __n1 >= __n2)
    {
        value_type* __p = std::__to_address(__get_pointer());
        if (__n1 != __n2)
        {
            size_type __n_move = __sz - __pos - __n1;
            if (__n_move != 0)
            {
                if (__n1 > __n2)
                {
                    traits_type::move(__p + __pos, __s, __n2);
                    traits_type::move(__p + __pos + __n2, __p + __pos + __n1, __n_move);
                    return __null_terminate_at(__p, __sz + (__n2 - __n1));
                }
                if (std::__is_pointer_in_range(__p + __pos + 1, __p + __sz, __s))
                {
                    if (__p + __pos + __n1 <= __s)
                        __s += __n2 - __n1;
                    else // __p + __pos < __s < __p + __pos + __n1
                    {
                        traits_type::move(__p + __pos, __s, __n1);
                        __pos += __n1;
                        __s += __n2;
                        __n2 -= __n1;
                        __n1 = 0;
                    }
                }
                traits_type::move(__p + __pos + __n2, __p + __pos + __n1, __n_move);
            }
        }
        traits_type::move(__p + __pos, __s, __n2);
        return __null_terminate_at(__p, __sz + (__n2 - __n1));
    }
    else
        __grow_by_and_replace(__cap, __sz - __n1 + __n2 - __cap, __sz, __pos, __n1, __n2, __s);
    return *this;
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, size_type __n2, value_type __c)
{
    size_type __sz = size();
    if (__pos > __sz)
        __throw_out_of_range();
    __n1 = std::min(__n1, __sz - __pos);
    size_type __cap = capacity();
    value_type* __p;
    if (__cap - __sz + __n1 >= __n2)
    {
        __p = std::__to_address(__get_pointer());
        if (__n1 != __n2)
        {
            size_type __n_move = __sz - __pos - __n1;
            if (__n_move != 0)
                traits_type::move(__p + __pos + __n2, __p + __pos + __n1, __n_move);
        }
    }
    else
    {
        __grow_by_without_replace(__cap, __sz - __n1 + __n2 - __cap, __sz, __pos, __n1, __n2);
        __p = std::__to_address(__get_long_pointer());
    }
    traits_type::assign(__p + __pos, __n2, __c);
    return __null_terminate_at(__p, __sz - (__n1 - __n2));
}

template <class _CharT, class _Traits, class _Allocator>
template<class _InputIterator, __enable_if_t<__has_input_iterator_category<_InputIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::replace(const_iterator __i1, const_iterator __i2,
                                                   _InputIterator __j1, _InputIterator __j2)
{
    const basic_string __temp(__j1, __j2, __alloc());
    return replace(__i1, __i2, __temp);
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos1, size_type __n1, const basic_string& __str,
                                                   size_type __pos2, size_type __n2)
{
    size_type __str_sz = __str.size();
    if (__pos2 > __str_sz)
        __throw_out_of_range();
    return replace(__pos1, __n1, __str.data() + __pos2, std::min(__n2, __str_sz - __pos2));
}

template <class _CharT, class _Traits, class _Allocator>
template <class _Tp,
          __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                            !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
                        int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::replace(
    size_type __pos1, size_type __n1, const _Tp& __t, size_type __pos2, size_type __n2) {
    __self_view __sv = __t;
    size_type __str_sz = __sv.size();
    if (__pos2 > __str_sz)
        __throw_out_of_range();
    return replace(__pos1, __n1, __sv.data() + __pos2, std::min(__n2, __str_sz - __pos2));
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, const value_type* __s)
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string::replace received nullptr");
    return replace(__pos, __n1, __s, traits_type::length(__s));
}

// erase

// 'externally instantiated' erase() implementation, called when __n != npos.
// Does not check __pos against size()
template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__erase_external_with_move(
    size_type __pos, size_type __n)
{
    if (__n)
    {
        size_type __sz = size();
        value_type* __p = std::__to_address(__get_pointer());
        __n = std::min(__n, __sz - __pos);
        size_type __n_move = __sz - __pos - __n;
        if (__n_move != 0)
            traits_type::move(__p + __pos, __p + __pos + __n, __n_move);
        __null_terminate_at(__p, __sz - __n);
    }
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::erase(size_type __pos,
                                                 size_type __n) {
  if (__pos > size())
    __throw_out_of_range();
  if (__n == npos) {
    __erase_to_end(__pos);
  } else {
    __erase_external_with_move(__pos, __n);
  }
  return *this;
}

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::iterator
basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __pos)
{
  _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
      __pos != end(), "string::erase(iterator) called with a non-dereferenceable iterator");
  iterator __b = begin();
  size_type __r = static_cast<size_type>(__pos - __b);
  erase(__r, 1);
  return __b + static_cast<difference_type>(__r);
}

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::iterator
basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __first, const_iterator __last)
{
  _LIBCPP_ASSERT_VALID_INPUT_RANGE(__first <= __last, "string::erase(first, last) called with invalid range");
  iterator __b = begin();
  size_type __r = static_cast<size_type>(__first - __b);
  erase(__r, static_cast<size_type>(__last - __first));
  return __b + static_cast<difference_type>(__r);
}

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::pop_back()
{
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "string::pop_back(): string is already empty");
    __erase_to_end(size() - 1);
}

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::clear() _NOEXCEPT
{
    if (__is_long())
    {
        traits_type::assign(*__get_long_pointer(), value_type());
        __set_long_size(0);
    }
    else
    {
        traits_type::assign(*__get_short_pointer(), value_type());
        __set_short_size(0);
    }
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::resize(size_type __n, value_type __c)
{
    size_type __sz = size();
    if (__n > __sz)
        append(__n - __sz, __c);
    else
        __erase_to_end(__n);
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 inline void
basic_string<_CharT, _Traits, _Allocator>::__resize_default_init(size_type __n)
{
    size_type __sz = size();
    if (__n > __sz) {
       __append_default_init(__n - __sz);
    } else
        __erase_to_end(__n);
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::reserve(size_type __requested_capacity)
{
    if (__requested_capacity > max_size())
        __throw_length_error();

    // Make sure reserve(n) never shrinks. This is technically only required in C++20
    // and later (since P0966R1), however we provide consistent behavior in all Standard
    // modes because this function is instantiated in the shared library.
    if (__requested_capacity <= capacity())
        return;

    size_type __target_capacity = std::max(__requested_capacity, size());
    __target_capacity = __recommend(__target_capacity);
    if (__target_capacity == capacity()) return;

    __shrink_or_extend(__target_capacity);
}

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::shrink_to_fit() _NOEXCEPT
{
    size_type __target_capacity = __recommend(size());
    if (__target_capacity == capacity()) return;

    __shrink_or_extend(__target_capacity);
}

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__shrink_or_extend(size_type __target_capacity)
{
    size_type __cap = capacity();
    size_type __sz = size();

    pointer __new_data, __p;
    bool __was_long, __now_long;
    if (__fits_in_sso(__target_capacity))
    {
        __was_long = true;
        __now_long = false;
        __new_data = __get_short_pointer();
        __p = __get_long_pointer();
    }
    else
    {
        if (__target_capacity > __cap) {
            auto __allocation = std::__allocate_at_least(__alloc(), __target_capacity + 1);
            __new_data = __allocation.ptr;
            __target_capacity = __allocation.count - 1;
        }
        else
        {
        #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
            try
            {
        #endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 3268 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
                auto __allocation = std::__allocate_at_least(__alloc(), __target_capacity + 1);
                __new_data = __allocation.ptr;
                __target_capacity = __allocation.count - 1;
        #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
            }
            catch (...)
            {
                return;
            }
        #else  // _LIBCPP_HAS_NO_EXCEPTIONS
# 3278 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
            if (__new_data == nullptr)
                return;
        #endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 3281 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
        }
        __begin_lifetime(__new_data, __target_capacity + 1);
        __now_long = true;
        __was_long = __is_long();
        __p = __get_pointer();
    }
    traits_type::copy(std::__to_address(__new_data),
                      std::__to_address(__p), size()+1);
    if (__was_long)
        __alloc_traits::deallocate(__alloc(), __p, __cap+1);
    if (__now_long)
    {
        __set_long_cap(__target_capacity+1);
        __set_long_size(__sz);
        __set_long_pointer(__new_data);
    }
    else
        __set_short_size(__sz);
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::const_reference
basic_string<_CharT, _Traits, _Allocator>::at(size_type __n) const
{
    if (__n >= size())
        __throw_out_of_range();
    return (*this)[__n];
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::reference
basic_string<_CharT, _Traits, _Allocator>::at(size_type __n)
{
    if (__n >= size())
        __throw_out_of_range();
    return (*this)[__n];
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::copy(value_type* __s, size_type __n, size_type __pos) const
{
    size_type __sz = size();
    if (__pos > __sz)
        __throw_out_of_range();
    size_type __rlen = std::min(__n, __sz - __pos);
    traits_type::copy(__s, data() + __pos, __rlen);
    return __rlen;
}

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 3339 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
        _NOEXCEPT
#else
# 3341 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
        _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
                    __is_nothrow_swappable<allocator_type>::value)
#endif
# 3344 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
{
    _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(
        __alloc_traits::propagate_on_container_swap::value ||
        __alloc_traits::is_always_equal::value ||
        __alloc() == __str.__alloc(), "swapping non-equal allocators");
    std::swap(__r_.first(), __str.__r_.first());
    std::__swap_allocator(__alloc(), __str.__alloc());
}

// find

template <class _Traits>
struct _LIBCPP_HIDDEN __traits_eq
{
    typedef typename _Traits::char_type char_type;
    _LIBCPP_HIDE_FROM_ABI
    bool operator()(const char_type& __x, const char_type& __y) _NOEXCEPT
        {return _Traits::eq(__x, __y);}
};

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find(const value_type* __s,
                                                size_type __pos,
                                                size_type __n) const _NOEXCEPT
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "string::find(): received nullptr");
    return std::__str_find<value_type, size_type, traits_type, npos>
        (data(), size(), __s, __pos, __n);
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find(const basic_string& __str,
                                                size_type __pos) const _NOEXCEPT
{
    return std::__str_find<value_type, size_type, traits_type, npos>
        (data(), size(), __str.data(), __pos, __str.size());
}

template<class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find(const _Tp &__t,
                                                size_type __pos) const _NOEXCEPT
{
    __self_view __sv = __t;
    return std::__str_find<value_type, size_type, traits_type, npos>
        (data(), size(), __sv.data(), __pos, __sv.size());
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find(const value_type* __s,
                                                size_type __pos) const _NOEXCEPT
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string::find(): received nullptr");
    return std::__str_find<value_type, size_type, traits_type, npos>
        (data(), size(), __s, __pos, traits_type::length(__s));
}

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find(value_type __c,
                                                size_type __pos) const _NOEXCEPT
{
    return std::__str_find<value_type, size_type, traits_type, npos>
        (data(), size(), __c, __pos);
}

// rfind

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::rfind(const value_type* __s,
                                                 size_type __pos,
                                                 size_type __n) const _NOEXCEPT
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "string::rfind(): received nullptr");
    return std::__str_rfind<value_type, size_type, traits_type, npos>
        (data(), size(), __s, __pos, __n);
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::rfind(const basic_string& __str,
                                                 size_type __pos) const _NOEXCEPT
{
    return std::__str_rfind<value_type, size_type, traits_type, npos>
        (data(), size(), __str.data(), __pos, __str.size());
}

template<class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::rfind(const _Tp& __t,
                                                size_type __pos) const _NOEXCEPT
{
    __self_view __sv = __t;
    return std::__str_rfind<value_type, size_type, traits_type, npos>
        (data(), size(), __sv.data(), __pos, __sv.size());
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::rfind(const value_type* __s,
                                                 size_type __pos) const _NOEXCEPT
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string::rfind(): received nullptr");
    return std::__str_rfind<value_type, size_type, traits_type, npos>
        (data(), size(), __s, __pos, traits_type::length(__s));
}

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::rfind(value_type __c,
                                                 size_type __pos) const _NOEXCEPT
{
    return std::__str_rfind<value_type, size_type, traits_type, npos>
        (data(), size(), __c, __pos);
}

// find_first_of

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_of(const value_type* __s,
                                                         size_type __pos,
                                                         size_type __n) const _NOEXCEPT
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "string::find_first_of(): received nullptr");
    return std::__str_find_first_of<value_type, size_type, traits_type, npos>
        (data(), size(), __s, __pos, __n);
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_of(const basic_string& __str,
                                                         size_type __pos) const _NOEXCEPT
{
    return std::__str_find_first_of<value_type, size_type, traits_type, npos>
        (data(), size(), __str.data(), __pos, __str.size());
}

template<class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_of(const _Tp& __t,
                                                size_type __pos) const _NOEXCEPT
{
    __self_view __sv = __t;
    return std::__str_find_first_of<value_type, size_type, traits_type, npos>
        (data(), size(), __sv.data(), __pos, __sv.size());
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_of(const value_type* __s,
                                                         size_type __pos) const _NOEXCEPT
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string::find_first_of(): received nullptr");
    return std::__str_find_first_of<value_type, size_type, traits_type, npos>
        (data(), size(), __s, __pos, traits_type::length(__s));
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_of(value_type __c,
                                                         size_type __pos) const _NOEXCEPT
{
    return find(__c, __pos);
}

// find_last_of

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_of(const value_type* __s,
                                                        size_type __pos,
                                                        size_type __n) const _NOEXCEPT
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "string::find_last_of(): received nullptr");
    return std::__str_find_last_of<value_type, size_type, traits_type, npos>
        (data(), size(), __s, __pos, __n);
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_of(const basic_string& __str,
                                                        size_type __pos) const _NOEXCEPT
{
    return std::__str_find_last_of<value_type, size_type, traits_type, npos>
        (data(), size(), __str.data(), __pos, __str.size());
}

template<class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_of(const _Tp& __t,
                                                size_type __pos) const _NOEXCEPT
{
    __self_view __sv = __t;
    return std::__str_find_last_of<value_type, size_type, traits_type, npos>
        (data(), size(), __sv.data(), __pos, __sv.size());
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_of(const value_type* __s,
                                                        size_type __pos) const _NOEXCEPT
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string::find_last_of(): received nullptr");
    return std::__str_find_last_of<value_type, size_type, traits_type, npos>
        (data(), size(), __s, __pos, traits_type::length(__s));
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_of(value_type __c,
                                                        size_type __pos) const _NOEXCEPT
{
    return rfind(__c, __pos);
}

// find_first_not_of

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const value_type* __s,
                                                             size_type __pos,
                                                             size_type __n) const _NOEXCEPT
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "string::find_first_not_of(): received nullptr");
    return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>
        (data(), size(), __s, __pos, __n);
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const basic_string& __str,
                                                             size_type __pos) const _NOEXCEPT
{
    return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>
        (data(), size(), __str.data(), __pos, __str.size());
}

template<class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const _Tp& __t,
                                                size_type __pos) const _NOEXCEPT
{
    __self_view __sv = __t;
    return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>
        (data(), size(), __sv.data(), __pos, __sv.size());
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const value_type* __s,
                                                             size_type __pos) const _NOEXCEPT
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string::find_first_not_of(): received nullptr");
    return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>
        (data(), size(), __s, __pos, traits_type::length(__s));
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(value_type __c,
                                                             size_type __pos) const _NOEXCEPT
{
    return std::__str_find_first_not_of<value_type, size_type, traits_type, npos>
        (data(), size(), __c, __pos);
}

// find_last_not_of

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const value_type* __s,
                                                            size_type __pos,
                                                            size_type __n) const _NOEXCEPT
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__n == 0 || __s != nullptr, "string::find_last_not_of(): received nullptr");
    return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>
        (data(), size(), __s, __pos, __n);
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const basic_string& __str,
                                                            size_type __pos) const _NOEXCEPT
{
    return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>
        (data(), size(), __str.data(), __pos, __str.size());
}

template<class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const _Tp& __t,
                                                size_type __pos) const _NOEXCEPT
{
    __self_view __sv = __t;
    return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>
        (data(), size(), __sv.data(), __pos, __sv.size());
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const value_type* __s,
                                                            size_type __pos) const _NOEXCEPT
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string::find_last_not_of(): received nullptr");
    return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>
        (data(), size(), __s, __pos, traits_type::length(__s));
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
typename basic_string<_CharT, _Traits, _Allocator>::size_type
basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(value_type __c,
                                                            size_type __pos) const _NOEXCEPT
{
    return std::__str_find_last_not_of<value_type, size_type, traits_type, npos>
        (data(), size(), __c, __pos);
}

// compare

template <class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 int
basic_string<_CharT, _Traits, _Allocator>::compare(const _Tp& __t) const _NOEXCEPT
{
    __self_view __sv = __t;
    size_t __lhs_sz = size();
    size_t __rhs_sz = __sv.size();
    int __result = traits_type::compare(data(), __sv.data(),
                                        std::min(__lhs_sz, __rhs_sz));
    if (__result != 0)
        return __result;
    if (__lhs_sz < __rhs_sz)
        return -1;
    if (__lhs_sz > __rhs_sz)
        return 1;
    return 0;
}

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
int
basic_string<_CharT, _Traits, _Allocator>::compare(const basic_string& __str) const _NOEXCEPT
{
    return compare(__self_view(__str));
}

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
int
basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
                                                   size_type __n1,
                                                   const value_type* __s,
                                                   size_type __n2) const
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__n2 == 0 || __s != nullptr, "string::compare(): received nullptr");
    size_type __sz = size();
    if (__pos1 > __sz || __n2 == npos)
        __throw_out_of_range();
    size_type __rlen = std::min(__n1, __sz - __pos1);
    int __r = traits_type::compare(data() + __pos1, __s, std::min(__rlen, __n2));
    if (__r == 0)
    {
        if (__rlen < __n2)
            __r = -1;
        else if (__rlen > __n2)
            __r = 1;
    }
    return __r;
}

template <class _CharT, class _Traits, class _Allocator>
template <class _Tp, __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 int
basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
                                                   size_type __n1,
                                                   const _Tp& __t) const
{
    __self_view __sv = __t;
    return compare(__pos1, __n1, __sv.data(), __sv.size());
}

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
int
basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
                                                   size_type __n1,
                                                   const basic_string& __str) const
{
    return compare(__pos1, __n1, __str.data(), __str.size());
}

template <class _CharT, class _Traits, class _Allocator>
template <class _Tp,
          __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                            !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
                        int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 int basic_string<_CharT, _Traits, _Allocator>::compare(
    size_type __pos1, size_type __n1, const _Tp& __t, size_type __pos2, size_type __n2) const {
    __self_view __sv = __t;
    return __self_view(*this).substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2));
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
int
basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
                                                   size_type __n1,
                                                   const basic_string& __str,
                                                   size_type __pos2,
                                                   size_type __n2) const
{
    return compare(__pos1, __n1, __self_view(__str), __pos2, __n2);
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
int
basic_string<_CharT, _Traits, _Allocator>::compare(const value_type* __s) const _NOEXCEPT
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string::compare(): received nullptr");
    return compare(0, npos, __s, traits_type::length(__s));
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
int
basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
                                                   size_type __n1,
                                                   const value_type* __s) const
{
    _LIBCPP_ASSERT_UNCATEGORIZED(__s != nullptr, "string::compare(): received nullptr");
    return compare(__pos1, __n1, __s, traits_type::length(__s));
}

// __invariants

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
bool
basic_string<_CharT, _Traits, _Allocator>::__invariants() const
{
    if (size() > capacity())
        return false;
    if (capacity() < __min_cap - 1)
        return false;
    if (data() == nullptr)
        return false;
    if (!_Traits::eq(data()[size()], value_type()))
        return false;
    return true;
}

// __clear_and_shrink

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
void
basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink() _NOEXCEPT
{
    clear();
    if(__is_long())
    {
        __alloc_traits::deallocate(__alloc(), __get_long_pointer(), capacity() + 1);
        __r_.first() = __rep();
    }
}

// operator==

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
bool
operator==(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
           const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 3855 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    return basic_string_view<_CharT, _Traits>(__lhs) == basic_string_view<_CharT, _Traits>(__rhs);
#else
# 3857 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    size_t __lhs_sz = __lhs.size();
    return __lhs_sz == __rhs.size() && _Traits::compare(__lhs.data(),
                                                        __rhs.data(),
                                                        __lhs_sz) == 0;
#endif
# 3862 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
}

template<class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
bool
operator==(const basic_string<char, char_traits<char>, _Allocator>& __lhs,
           const basic_string<char, char_traits<char>, _Allocator>& __rhs) _NOEXCEPT
{
    size_t __lhs_sz = __lhs.size();
    if (__lhs_sz != __rhs.size())
        return false;
    const char* __lp = __lhs.data();
    const char* __rp = __rhs.data();
    if (__lhs.__is_long())
        return char_traits<char>::compare(__lp, __rp, __lhs_sz) == 0;
    for (; __lhs_sz != 0; --__lhs_sz, ++__lp, ++__rp)
        if (*__lp != *__rp)
            return false;
    return true;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 3884 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator==(const _CharT* __lhs,
           const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
{
    typedef basic_string<_CharT, _Traits, _Allocator> _String;
    _LIBCPP_ASSERT_UNCATEGORIZED(__lhs != nullptr, "operator==(char*, basic_string): received nullptr");
    size_t __lhs_len = _Traits::length(__lhs);
    if (__lhs_len != __rhs.size()) return false;
    return __rhs.compare(0, _String::npos, __lhs, __lhs_len) == 0;
}
#endif // _LIBCPP_STD_VER <= 17
# 3897 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
bool
operator==(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
           const _CharT* __rhs) _NOEXCEPT
{
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 3905 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    return basic_string_view<_CharT, _Traits>(__lhs) == basic_string_view<_CharT, _Traits>(__rhs);
#else
# 3907 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
    typedef basic_string<_CharT, _Traits, _Allocator> _String;
    _LIBCPP_ASSERT_UNCATEGORIZED(__rhs != nullptr, "operator==(basic_string, char*): received nullptr");
    size_t __rhs_len = _Traits::length(__rhs);
    if (__rhs_len != __lhs.size()) return false;
    return __lhs.compare(0, _String::npos, __rhs, __rhs_len) == 0;
#endif
# 3913 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 3916 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI constexpr auto operator<=>(
    const basic_string<_CharT, _Traits, _Allocator>& __lhs,
    const basic_string<_CharT, _Traits, _Allocator>& __rhs) noexcept {
    return basic_string_view<_CharT, _Traits>(__lhs) <=> basic_string_view<_CharT, _Traits>(__rhs);
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI constexpr auto
operator<=>(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT* __rhs) {
    return basic_string_view<_CharT, _Traits>(__lhs) <=> basic_string_view<_CharT, _Traits>(__rhs);
}

#else // _LIBCPP_STD_VER >= 20
# 3931 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator!=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
           const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
{
    return !(__lhs == __rhs);
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator!=(const _CharT* __lhs,
           const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
{
    return !(__lhs == __rhs);
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator!=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
           const _CharT* __rhs) _NOEXCEPT
{
    return !(__lhs == __rhs);
}

// operator<

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
           const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
{
    return __lhs.compare(__rhs) < 0;
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
           const _CharT* __rhs) _NOEXCEPT
{
    return __lhs.compare(__rhs) < 0;
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator< (const _CharT* __lhs,
           const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
{
    return __rhs.compare(__lhs) > 0;
}

// operator>

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator> (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
           const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
{
    return __rhs < __lhs;
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator> (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
           const _CharT* __rhs) _NOEXCEPT
{
    return __rhs < __lhs;
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator> (const _CharT* __lhs,
           const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
{
    return __rhs < __lhs;
}

// operator<=

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator<=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
           const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
{
    return !(__rhs < __lhs);
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator<=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
           const _CharT* __rhs) _NOEXCEPT
{
    return !(__rhs < __lhs);
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator<=(const _CharT* __lhs,
           const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
{
    return !(__rhs < __lhs);
}

// operator>=

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator>=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
           const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
{
    return !(__lhs < __rhs);
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator>=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
           const _CharT* __rhs) _NOEXCEPT
{
    return !(__lhs < __rhs);
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator>=(const _CharT* __lhs,
           const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
{
    return !(__lhs < __rhs);
}
#endif // _LIBCPP_STD_VER >= 20
# 4075 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

// operator +

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
          const basic_string<_CharT, _Traits, _Allocator>& __rhs)
{
    using _String = basic_string<_CharT, _Traits, _Allocator>;
    auto __lhs_sz = __lhs.size();
    auto __rhs_sz = __rhs.size();
    _String __r(__uninitialized_size_tag(),
                __lhs_sz + __rhs_sz,
                _String::__alloc_traits::select_on_container_copy_construction(__lhs.get_allocator()));
    auto __ptr = std::__to_address(__r.__get_pointer());
    _Traits::copy(__ptr, __lhs.data(), __lhs_sz);
    _Traits::copy(__ptr + __lhs_sz, __rhs.data(), __rhs_sz);
    _Traits::assign(__ptr + __lhs_sz + __rhs_sz, 1, _CharT());
    return __r;
}

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDDEN _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const _CharT* __lhs , const basic_string<_CharT,_Traits,_Allocator>& __rhs)
{
    using _String = basic_string<_CharT, _Traits, _Allocator>;
    auto __lhs_sz = _Traits::length(__lhs);
    auto __rhs_sz = __rhs.size();
    _String __r(__uninitialized_size_tag(),
                __lhs_sz + __rhs_sz,
                _String::__alloc_traits::select_on_container_copy_construction(__rhs.get_allocator()));
    auto __ptr = std::__to_address(__r.__get_pointer());
    _Traits::copy(__ptr, __lhs, __lhs_sz);
    _Traits::copy(__ptr + __lhs_sz, __rhs.data(), __rhs_sz);
    _Traits::assign(__ptr + __lhs_sz + __rhs_sz, 1, _CharT());
    return __r;
}

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Allocator>& __rhs)
{
    using _String = basic_string<_CharT, _Traits, _Allocator>;
    typename _String::size_type __rhs_sz = __rhs.size();
    _String __r(__uninitialized_size_tag(),
                __rhs_sz + 1,
                _String::__alloc_traits::select_on_container_copy_construction(__rhs.get_allocator()));
    auto __ptr = std::__to_address(__r.__get_pointer());
    _Traits::assign(__ptr, 1, __lhs);
    _Traits::copy(__ptr + 1, __rhs.data(), __rhs_sz);
    _Traits::assign(__ptr + 1 + __rhs_sz, 1, _CharT());
    return __r;
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT* __rhs)
{
    using _String = basic_string<_CharT, _Traits, _Allocator>;
    typename _String::size_type __lhs_sz = __lhs.size();
    typename _String::size_type __rhs_sz = _Traits::length(__rhs);
    _String __r(__uninitialized_size_tag(),
                __lhs_sz + __rhs_sz,
                _String::__alloc_traits::select_on_container_copy_construction(__lhs.get_allocator()));
    auto __ptr = std::__to_address(__r.__get_pointer());
    _Traits::copy(__ptr, __lhs.data(), __lhs_sz);
    _Traits::copy(__ptr + __lhs_sz, __rhs, __rhs_sz);
    _Traits::assign(__ptr + __lhs_sz + __rhs_sz, 1, _CharT());
    return __r;
}

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, _CharT __rhs)
{
    using _String = basic_string<_CharT, _Traits, _Allocator>;
    typename _String::size_type __lhs_sz = __lhs.size();
    _String __r(__uninitialized_size_tag(),
                __lhs_sz + 1,
                _String::__alloc_traits::select_on_container_copy_construction(__lhs.get_allocator()));
    auto __ptr = std::__to_address(__r.__get_pointer());
    _Traits::copy(__ptr, __lhs.data(), __lhs_sz);
    _Traits::assign(__ptr + __lhs_sz, 1, __rhs);
    _Traits::assign(__ptr + 1 + __lhs_sz, 1, _CharT());
    return __r;
}

#ifndef _LIBCPP_CXX03_LANG

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const basic_string<_CharT, _Traits, _Allocator>& __rhs)
{
    return std::move(__lhs.append(__rhs));
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, basic_string<_CharT, _Traits, _Allocator>&& __rhs)
{
    return std::move(__rhs.insert(0, __lhs));
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, basic_string<_CharT, _Traits, _Allocator>&& __rhs)
{
    return std::move(__lhs.append(__rhs));
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(const _CharT* __lhs , basic_string<_CharT,_Traits,_Allocator>&& __rhs)
{
    return std::move(__rhs.insert(0, __lhs));
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(_CharT __lhs, basic_string<_CharT,_Traits,_Allocator>&& __rhs)
{
    __rhs.insert(__rhs.begin(), __lhs);
    return std::move(__rhs);
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const _CharT* __rhs)
{
    return std::move(__lhs.append(__rhs));
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string<_CharT, _Traits, _Allocator>
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, _CharT __rhs)
{
    __lhs.push_back(__rhs);
    return std::move(__lhs);
}

#endif // _LIBCPP_CXX03_LANG
# 4228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

// swap

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void
swap(basic_string<_CharT, _Traits, _Allocator>& __lhs,
     basic_string<_CharT, _Traits, _Allocator>& __rhs)
     _NOEXCEPT_(_NOEXCEPT_(__lhs.swap(__rhs)))
{
    __lhs.swap(__rhs);
}

_LIBCPP_EXPORTED_FROM_ABI int                stoi  (const string& __str, size_t* __idx = nullptr, int __base = 10);
_LIBCPP_EXPORTED_FROM_ABI long               stol  (const string& __str, size_t* __idx = nullptr, int __base = 10);
_LIBCPP_EXPORTED_FROM_ABI unsigned long      stoul (const string& __str, size_t* __idx = nullptr, int __base = 10);
_LIBCPP_EXPORTED_FROM_ABI long long          stoll (const string& __str, size_t* __idx = nullptr, int __base = 10);
_LIBCPP_EXPORTED_FROM_ABI unsigned long long stoull(const string& __str, size_t* __idx = nullptr, int __base = 10);

_LIBCPP_EXPORTED_FROM_ABI float       stof (const string& __str, size_t* __idx = nullptr);
_LIBCPP_EXPORTED_FROM_ABI double      stod (const string& __str, size_t* __idx = nullptr);
_LIBCPP_EXPORTED_FROM_ABI long double stold(const string& __str, size_t* __idx = nullptr);

_LIBCPP_EXPORTED_FROM_ABI string to_string(int __val);
_LIBCPP_EXPORTED_FROM_ABI string to_string(unsigned __val);
_LIBCPP_EXPORTED_FROM_ABI string to_string(long __val);
_LIBCPP_EXPORTED_FROM_ABI string to_string(unsigned long __val);
_LIBCPP_EXPORTED_FROM_ABI string to_string(long long __val);
_LIBCPP_EXPORTED_FROM_ABI string to_string(unsigned long long __val);
_LIBCPP_EXPORTED_FROM_ABI string to_string(float __val);
_LIBCPP_EXPORTED_FROM_ABI string to_string(double __val);
_LIBCPP_EXPORTED_FROM_ABI string to_string(long double __val);

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
_LIBCPP_EXPORTED_FROM_ABI int                stoi  (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
_LIBCPP_EXPORTED_FROM_ABI long               stol  (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
_LIBCPP_EXPORTED_FROM_ABI unsigned long      stoul (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
_LIBCPP_EXPORTED_FROM_ABI long long          stoll (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
_LIBCPP_EXPORTED_FROM_ABI unsigned long long stoull(const wstring& __str, size_t* __idx = nullptr, int __base = 10);

_LIBCPP_EXPORTED_FROM_ABI float       stof (const wstring& __str, size_t* __idx = nullptr);
_LIBCPP_EXPORTED_FROM_ABI double      stod (const wstring& __str, size_t* __idx = nullptr);
_LIBCPP_EXPORTED_FROM_ABI long double stold(const wstring& __str, size_t* __idx = nullptr);

_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(int __val);
_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(unsigned __val);
_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(long __val);
_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(unsigned long __val);
_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(long long __val);
_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(unsigned long long __val);
_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(float __val);
_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(double __val);
_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(long double __val);
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 4282 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_TEMPLATE_DATA_VIS
const typename basic_string<_CharT, _Traits, _Allocator>::size_type
               basic_string<_CharT, _Traits, _Allocator>::npos;

template <class _CharT, class _Allocator>
struct __string_hash : public __unary_function<basic_string<_CharT, char_traits<_CharT>, _Allocator>, size_t> {
    _LIBCPP_HIDE_FROM_ABI size_t
    operator()(const basic_string<_CharT, char_traits<_CharT>, _Allocator>& __val) const _NOEXCEPT {
        return std::__do_string_hash(__val.data(), __val.data() + __val.size());
    }
};

template <class _Allocator>
struct hash<basic_string<char, char_traits<char>, _Allocator> > : __string_hash<char, _Allocator> {};

#ifndef _LIBCPP_HAS_NO_CHAR8_T
template <class _Allocator>
struct hash<basic_string<char8_t, char_traits<char8_t>, _Allocator> > : __string_hash<char8_t, _Allocator> {};
#endif
# 4303 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

template <class _Allocator>
struct hash<basic_string<char16_t, char_traits<char16_t>, _Allocator> > : __string_hash<char16_t, _Allocator> {};

template <class _Allocator>
struct hash<basic_string<char32_t, char_traits<char32_t>, _Allocator> > : __string_hash<char32_t, _Allocator> {};

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <class _Allocator>
struct hash<basic_string<wchar_t, char_traits<wchar_t>, _Allocator> > : __string_hash<wchar_t, _Allocator> {};
#endif
# 4314 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
           const basic_string<_CharT, _Traits, _Allocator>& __str);

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
           basic_string<_CharT, _Traits, _Allocator>& __str);

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>& __is,
        basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm);

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>& __is,
        basic_string<_CharT, _Traits, _Allocator>& __str);

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>&& __is,
        basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm);

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>&& __is,
        basic_string<_CharT, _Traits, _Allocator>& __str);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 4349 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
template <class _CharT, class _Traits, class _Allocator, class _Up>
inline _LIBCPP_HIDE_FROM_ABI
    typename basic_string<_CharT, _Traits, _Allocator>::size_type
    erase(basic_string<_CharT, _Traits, _Allocator>& __str, const _Up& __v) {
  auto __old_size = __str.size();
  __str.erase(std::remove(__str.begin(), __str.end(), __v), __str.end());
  return __old_size - __str.size();
}

template <class _CharT, class _Traits, class _Allocator, class _Predicate>
inline _LIBCPP_HIDE_FROM_ABI
    typename basic_string<_CharT, _Traits, _Allocator>::size_type
    erase_if(basic_string<_CharT, _Traits, _Allocator>& __str,
             _Predicate __pred) {
  auto __old_size = __str.size();
  __str.erase(std::remove_if(__str.begin(), __str.end(), __pred),
              __str.end());
  return __old_size - __str.size();
}
#endif
# 4369 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 4371 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
// Literal suffixes for basic_string [basic.string.literals]
inline namespace literals
{
  inline namespace string_literals
  {
    inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    basic_string<char> operator""s( const char *__str, size_t __len )
    {
        return basic_string<char> (__str, __len);
    }

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
    inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    basic_string<wchar_t> operator""s( const wchar_t *__str, size_t __len )
    {
        return basic_string<wchar_t> (__str, __len);
    }
#endif
# 4389 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

#ifndef _LIBCPP_HAS_NO_CHAR8_T
    inline _LIBCPP_HIDE_FROM_ABI constexpr
    basic_string<char8_t> operator""s(const char8_t *__str, size_t __len)
    {
        return basic_string<char8_t> (__str, __len);
    }
#endif
# 4397 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

    inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    basic_string<char16_t> operator""s( const char16_t *__str, size_t __len )
    {
        return basic_string<char16_t> (__str, __len);
    }

    inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    basic_string<char32_t> operator""s( const char32_t *__str, size_t __len )
    {
        return basic_string<char32_t> (__str, __len);
    }
  } // namespace string_literals
} // namespace literals

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 4413 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
template <>
inline constexpr bool __format::__enable_insertable<std::basic_string<char>> = true;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
inline constexpr bool __format::__enable_insertable<std::basic_string<wchar_t>> = true;
#endif
# 4419 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#endif
# 4420 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

#endif
# 4422 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 4428 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#  include <algorithm>
#endif /* expanded by -frewrite-includes */
# 4428 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 4429 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 4429 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 4430 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 4430 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 4431 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iterator>
#endif /* expanded by -frewrite-includes */
# 4431 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 4432 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#  include <new>
#endif /* expanded by -frewrite-includes */
# 4432 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 4433 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 4433 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 4434 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#  include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 4434 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 4435 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#if 0 /* expanded by -frewrite-includes */
#  include <utility>
#endif /* expanded by -frewrite-includes */
# 4435 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
# 4436 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#endif
# 4437 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3

#endif // _LIBCPP_STRING
# 4439 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/string" 3
#endif /* string expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

class _LIBCPP_EXPORTED_FROM_ABI error_condition;
class _LIBCPP_EXPORTED_FROM_ABI error_code;

class _LIBCPP_HIDDEN __do_message;

class _LIBCPP_EXPORTED_FROM_ABI error_category {
public:
  virtual ~error_category() _NOEXCEPT;

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_ERROR_CATEGORY_DEFINE_LEGACY_INLINE_FUNCTIONS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 3
  error_category() noexcept;
#else
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 3
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 error_category() _NOEXCEPT = default;
#endif
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 3
  error_category(const error_category&)            = delete;
  error_category& operator=(const error_category&) = delete;

  virtual const char* name() const _NOEXCEPT = 0;
  virtual error_condition default_error_condition(int __ev) const _NOEXCEPT;
  virtual bool equivalent(int __code, const error_condition& __condition) const _NOEXCEPT;
  virtual bool equivalent(const error_code& __code, int __condition) const _NOEXCEPT;
  virtual string message(int __ev) const = 0;

  _LIBCPP_HIDE_FROM_ABI bool operator==(const error_category& __rhs) const _NOEXCEPT { return this == &__rhs; }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 3

  _LIBCPP_HIDE_FROM_ABI strong_ordering operator<=>(const error_category& __rhs) const noexcept {
    return compare_three_way()(this, std::addressof(__rhs));
  }

#else // _LIBCPP_STD_VER >= 20
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 3

  _LIBCPP_HIDE_FROM_ABI bool operator!=(const error_category& __rhs) const _NOEXCEPT { return !(*this == __rhs); }

  _LIBCPP_HIDE_FROM_ABI bool operator<(const error_category& __rhs) const _NOEXCEPT { return this < &__rhs; }

#endif // _LIBCPP_STD_VER >= 20
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 3

  friend class _LIBCPP_HIDDEN __do_message;
};

class _LIBCPP_HIDDEN __do_message : public error_category {
public:
  string message(int __ev) const override;
};

_LIBCPP_EXPORTED_FROM_ABI const error_category& generic_category() _NOEXCEPT;
_LIBCPP_EXPORTED_FROM_ABI const error_category& system_category() _NOEXCEPT;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___SYSTEM_ERROR_ERROR_CATEGORY_H
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_category.h" 3
#endif /* error_category.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* error_condition.h expanded by -frewrite-includes */
#include <__system_error/error_condition.h>
#else /* error_condition.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___SYSTEM_ERROR_ERROR_CONDITION_H
#define _LIBCPP___SYSTEM_ERROR_ERROR_CONDITION_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/hash.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__system_error/errc.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__system_error/error_category.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <string>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum : public false_type {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
template <class _Tp>
inline constexpr bool is_error_condition_enum_v = is_error_condition_enum<_Tp>::value;
#endif
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3

template <>
struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum<errc> : true_type {};

#ifdef _LIBCPP_CXX03_LANG
template <>
struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum<errc::__lx> : true_type {};
#endif
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3

namespace __adl_only {
// Those cause ADL to trigger but they are not viable candidates,
// so they are never actually selected.
void make_error_condition() = delete;
} // namespace __adl_only

class _LIBCPP_EXPORTED_FROM_ABI error_condition {
  int __val_;
  const error_category* __cat_;

public:
  _LIBCPP_HIDE_FROM_ABI error_condition() _NOEXCEPT : __val_(0), __cat_(&generic_category()) {}

  _LIBCPP_HIDE_FROM_ABI error_condition(int __val, const error_category& __cat) _NOEXCEPT
      : __val_(__val),
        __cat_(&__cat) {}

  template <class _Ep, __enable_if_t<is_error_condition_enum<_Ep>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI error_condition(_Ep __e) _NOEXCEPT {
    using __adl_only::make_error_condition;
    *this = make_error_condition(__e);
  }

  _LIBCPP_HIDE_FROM_ABI void assign(int __val, const error_category& __cat) _NOEXCEPT {
    __val_ = __val;
    __cat_ = &__cat;
  }

  template <class _Ep, __enable_if_t<is_error_condition_enum<_Ep>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI error_condition& operator=(_Ep __e) _NOEXCEPT {
    using __adl_only::make_error_condition;
    *this = make_error_condition(__e);
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT {
    __val_ = 0;
    __cat_ = &generic_category();
  }

  _LIBCPP_HIDE_FROM_ABI int value() const _NOEXCEPT { return __val_; }

  _LIBCPP_HIDE_FROM_ABI const error_category& category() const _NOEXCEPT { return *__cat_; }
  string message() const;

  _LIBCPP_HIDE_FROM_ABI explicit operator bool() const _NOEXCEPT { return __val_ != 0; }
};

inline _LIBCPP_HIDE_FROM_ABI error_condition make_error_condition(errc __e) _NOEXCEPT {
  return error_condition(static_cast<int>(__e), generic_category());
}

inline _LIBCPP_HIDE_FROM_ABI bool operator==(const error_condition& __x, const error_condition& __y) _NOEXCEPT {
  return __x.category() == __y.category() && __x.value() == __y.value();
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3

inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const error_condition& __x, const error_condition& __y) _NOEXCEPT {
  return !(__x == __y);
}

inline _LIBCPP_HIDE_FROM_ABI bool operator<(const error_condition& __x, const error_condition& __y) _NOEXCEPT {
  return __x.category() < __y.category() || (__x.category() == __y.category() && __x.value() < __y.value());
}

#else // _LIBCPP_STD_VER <= 17
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3

inline _LIBCPP_HIDE_FROM_ABI strong_ordering
operator<=>(const error_condition& __x, const error_condition& __y) noexcept {
  if (auto __c = __x.category() <=> __y.category(); __c != 0)
    return __c;
  return __x.value() <=> __y.value();
}

#endif // _LIBCPP_STD_VER <= 17
# 120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3

template <>
struct _LIBCPP_TEMPLATE_VIS hash<error_condition> : public __unary_function<error_condition, size_t> {
  _LIBCPP_HIDE_FROM_ABI size_t operator()(const error_condition& __ec) const _NOEXCEPT {
    return static_cast<size_t>(__ec.value());
  }
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___SYSTEM_ERROR_ERROR_CONDITION_H
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_condition.h" 3
#endif /* error_condition.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <string>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_error_code_enum : public false_type {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
template <class _Tp>
inline constexpr bool is_error_code_enum_v = is_error_code_enum<_Tp>::value;
#endif
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3

namespace __adl_only {
// Those cause ADL to trigger but they are not viable candidates,
// so they are never actually selected.
void make_error_code() = delete;
} // namespace __adl_only

class _LIBCPP_EXPORTED_FROM_ABI error_code {
  int __val_;
  const error_category* __cat_;

public:
  _LIBCPP_HIDE_FROM_ABI error_code() _NOEXCEPT : __val_(0), __cat_(&system_category()) {}

  _LIBCPP_HIDE_FROM_ABI error_code(int __val, const error_category& __cat) _NOEXCEPT : __val_(__val), __cat_(&__cat) {}

  template <class _Ep, __enable_if_t<is_error_code_enum<_Ep>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI error_code(_Ep __e) _NOEXCEPT {
    using __adl_only::make_error_code;
    *this = make_error_code(__e);
  }

  _LIBCPP_HIDE_FROM_ABI void assign(int __val, const error_category& __cat) _NOEXCEPT {
    __val_ = __val;
    __cat_ = &__cat;
  }

  template <class _Ep, __enable_if_t<is_error_code_enum<_Ep>::value, int> = 0>
  _LIBCPP_HIDE_FROM_ABI error_code& operator=(_Ep __e) _NOEXCEPT {
    using __adl_only::make_error_code;
    *this = make_error_code(__e);
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT {
    __val_ = 0;
    __cat_ = &system_category();
  }

  _LIBCPP_HIDE_FROM_ABI int value() const _NOEXCEPT { return __val_; }

  _LIBCPP_HIDE_FROM_ABI const error_category& category() const _NOEXCEPT { return *__cat_; }

  _LIBCPP_HIDE_FROM_ABI error_condition default_error_condition() const _NOEXCEPT {
    return __cat_->default_error_condition(__val_);
  }

  string message() const;

  _LIBCPP_HIDE_FROM_ABI explicit operator bool() const _NOEXCEPT { return __val_ != 0; }
};

inline _LIBCPP_HIDE_FROM_ABI error_code make_error_code(errc __e) _NOEXCEPT {
  return error_code(static_cast<int>(__e), generic_category());
}

inline _LIBCPP_HIDE_FROM_ABI bool operator==(const error_code& __x, const error_code& __y) _NOEXCEPT {
  return __x.category() == __y.category() && __x.value() == __y.value();
}

inline _LIBCPP_HIDE_FROM_ABI bool operator==(const error_code& __x, const error_condition& __y) _NOEXCEPT {
  return __x.category().equivalent(__x.value(), __y) || __y.category().equivalent(__x, __y.value());
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
inline _LIBCPP_HIDE_FROM_ABI bool operator==(const error_condition& __x, const error_code& __y) _NOEXCEPT {
  return __y == __x;
}
#endif
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3

inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const error_code& __x, const error_code& __y) _NOEXCEPT {
  return !(__x == __y);
}

inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const error_code& __x, const error_condition& __y) _NOEXCEPT {
  return !(__x == __y);
}

inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const error_condition& __x, const error_code& __y) _NOEXCEPT {
  return !(__x == __y);
}

inline _LIBCPP_HIDE_FROM_ABI bool operator<(const error_code& __x, const error_code& __y) _NOEXCEPT {
  return __x.category() < __y.category() || (__x.category() == __y.category() && __x.value() < __y.value());
}

#else // _LIBCPP_STD_VER <= 17
# 125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3

inline _LIBCPP_HIDE_FROM_ABI strong_ordering operator<=>(const error_code& __x, const error_code& __y) noexcept {
  if (auto __c = __x.category() <=> __y.category(); __c != 0)
    return __c;
  return __x.value() <=> __y.value();
}

#endif // _LIBCPP_STD_VER <= 17
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3

template <>
struct _LIBCPP_TEMPLATE_VIS hash<error_code> : public __unary_function<error_code, size_t> {
  _LIBCPP_HIDE_FROM_ABI size_t operator()(const error_code& __ec) const _NOEXCEPT {
    return static_cast<size_t>(__ec.value());
  }
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___SYSTEM_ERROR_ERROR_CODE_H
# 144 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/error_code.h" 3
#endif /* error_code.h expanded by -frewrite-includes */
# 173 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conjunction.h>
#endif /* expanded by -frewrite-includes */
# 173 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 174 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 174 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 175 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_base_of.h>
#endif /* expanded by -frewrite-includes */
# 175 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 176 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/void_t.h>
#endif /* expanded by -frewrite-includes */
# 176 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 177 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 177 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 178 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* bitset expanded by -frewrite-includes */
#include <bitset>
#else /* bitset expanded by -frewrite-includes */
# 178 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_BITSET
#define _LIBCPP_BITSET

/*
    bitset synopsis

namespace std
{

namespace std {

template <size_t N>
class bitset
{
public:
    // bit reference:
    class reference
    {
        friend class bitset;
        reference() noexcept;
    public:
        ~reference() noexcept;
        reference& operator=(bool x) noexcept;           // for b[i] = x;
        reference& operator=(const reference&) noexcept; // for b[i] = b[j];
        bool operator~() const noexcept;                 // flips the bit
        operator bool() const noexcept;                  // for x = b[i];
        reference& flip() noexcept;                      // for b[i].flip();
    };

    // 23.3.5.1 constructors:
    constexpr bitset() noexcept;
    constexpr bitset(unsigned long long val) noexcept;
    template <class charT>
        constexpr explicit bitset(const charT* str,
            typename basic_string<charT>::size_type n = basic_string<charT>::npos,
            charT zero = charT('0'), charT one = charT('1'));                                // until C++26, constexpr since C++23
    template <class charT>
        constexpr explicit bitset(const charT* str,
            typename basic_string_view<charT>::size_type n = basic_string_view<charT>::npos,
            charT zero = charT('0'), charT one = charT('1'));                                // since C++26
    template<class charT, class traits>
        explicit bitset(
            const basic_string_view<charT,traits>& str,
            typename basic_string_view<charT,traits>::size_type pos = 0,
            typename basic_string_view<charT,traits>::size_type n = basic_string_view<charT,traits>::npos,
            charT zero = charT('0'), charT one = charT('1'));                                // since C++26
    template<class charT, class traits, class Allocator>
        constexpr explicit bitset(
            const basic_string<charT,traits,Allocator>& str,
            typename basic_string<charT,traits,Allocator>::size_type pos = 0,
            typename basic_string<charT,traits,Allocator>::size_type n = basic_string<charT,traits,Allocator>::npos,
            charT zero = charT('0'), charT one = charT('1'));                                // constexpr since C++23

    // 23.3.5.2 bitset operations:
    bitset& operator&=(const bitset& rhs) noexcept; // constexpr since C++23
    bitset& operator|=(const bitset& rhs) noexcept; // constexpr since C++23
    bitset& operator^=(const bitset& rhs) noexcept; // constexpr since C++23
    bitset& operator<<=(size_t pos) noexcept;       // constexpr since C++23
    bitset& operator>>=(size_t pos) noexcept;       // constexpr since C++23
    bitset& set() noexcept;                         // constexpr since C++23
    bitset& set(size_t pos, bool val = true);       // constexpr since C++23
    bitset& reset() noexcept;                       // constexpr since C++23
    bitset& reset(size_t pos);                      // constexpr since C++23
    bitset operator~() const noexcept;              // constexpr since C++23
    bitset& flip() noexcept;                        // constexpr since C++23
    bitset& flip(size_t pos);                       // constexpr since C++23

    // element access:
    constexpr bool operator[](size_t pos) const;
    reference operator[](size_t pos);            // constexpr since C++23
    unsigned long to_ulong() const;              // constexpr since C++23
    unsigned long long to_ullong() const;        // constexpr since C++23
    template <class charT, class traits, class Allocator> // constexpr since C++23
        basic_string<charT, traits, Allocator> to_string(charT zero = charT('0'), charT one = charT('1')) const;
    template <class charT, class traits> // constexpr since C++23
        basic_string<charT, traits, allocator<charT> > to_string(charT zero = charT('0'), charT one = charT('1')) const;
    template <class charT> // constexpr since C++23
        basic_string<charT, char_traits<charT>, allocator<charT> > to_string(charT zero = charT('0'), charT one = charT('1')) const;
    basic_string<char, char_traits<char>, allocator<char> > to_string(char zero = '0', char one = '1') const; // constexpr since C++23
    size_t count() const noexcept;                     // constexpr since C++23
    constexpr size_t size() const noexcept;            // constexpr since C++23
    bool operator==(const bitset& rhs) const noexcept; // constexpr since C++23
    bool operator!=(const bitset& rhs) const noexcept; // removed in C++20
    bool test(size_t pos) const;                       // constexpr since C++23
    bool all() const noexcept;                         // constexpr since C++23
    bool any() const noexcept;                         // constexpr since C++23
    bool none() const noexcept;                        // constexpr since C++23
    bitset<N> operator<<(size_t pos) const noexcept;   // constexpr since C++23
    bitset<N> operator>>(size_t pos) const noexcept;   // constexpr since C++23
};

// 23.3.5.3 bitset operators:
template <size_t N>
bitset<N> operator&(const bitset<N>&, const bitset<N>&) noexcept; // constexpr since C++23

template <size_t N>
bitset<N> operator|(const bitset<N>&, const bitset<N>&) noexcept; // constexpr since C++23

template <size_t N>
bitset<N> operator^(const bitset<N>&, const bitset<N>&) noexcept; // constexpr since C++23

template <class charT, class traits, size_t N>
basic_istream<charT, traits>&
operator>>(basic_istream<charT, traits>& is, bitset<N>& x);

template <class charT, class traits, size_t N>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const bitset<N>& x);

template <size_t N> struct hash<std::bitset<N>>;

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/count.h>
#endif /* expanded by -frewrite-includes */
# 125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/fill.h>
#endif /* expanded by -frewrite-includes */
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 127 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/find.h>
#endif /* expanded by -frewrite-includes */
# 127 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __bit_reference expanded by -frewrite-includes */
#include <__bit_reference>
#else /* __bit_reference expanded by -frewrite-includes */
# 129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___BIT_REFERENCE
#define _LIBCPP___BIT_REFERENCE

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy_n.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/fill_n.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/countr.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/invert_if.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/popcount.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/bit_reference.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/construct_at.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstring>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Cp>
class __bit_const_reference;

template <class _Tp>
struct __has_storage_type {
  static const bool value = false;
};

template <class _Cp, bool = __has_storage_type<_Cp>::value>
class __bit_reference {
  using __storage_type    = typename _Cp::__storage_type;
  using __storage_pointer = typename _Cp::__storage_pointer;

  __storage_pointer __seg_;
  __storage_type __mask_;

  friend typename _Cp::__self;

  friend class __bit_const_reference<_Cp>;
  friend class __bit_iterator<_Cp, false>;

public:
  using __container = typename _Cp::__self;

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_reference(const __bit_reference&) = default;

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 operator bool() const _NOEXCEPT {
    return static_cast<bool>(*__seg_ & __mask_);
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool operator~() const _NOEXCEPT {
    return !static_cast<bool>(*this);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_reference& operator=(bool __x) _NOEXCEPT {
    if (__x)
      *__seg_ |= __mask_;
    else
      *__seg_ &= ~__mask_;
    return *this;
  }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 79 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
  _LIBCPP_HIDE_FROM_ABI constexpr const __bit_reference& operator=(bool __x) const noexcept {
    if (__x)
      *__seg_ |= __mask_;
    else
      *__seg_ &= ~__mask_;
    return *this;
  }
#endif
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_reference& operator=(const __bit_reference& __x) _NOEXCEPT {
    return operator=(static_cast<bool>(__x));
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void flip() _NOEXCEPT { *__seg_ ^= __mask_; }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, false> operator&() const _NOEXCEPT {
    return __bit_iterator<_Cp, false>(__seg_, static_cast<unsigned>(std::__libcpp_ctz(__mask_)));
  }

private:
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __bit_reference(
      __storage_pointer __s, __storage_type __m) _NOEXCEPT
      : __seg_(__s),
        __mask_(__m) {}
};

template <class _Cp>
class __bit_reference<_Cp, false> {};

template <class _Cp>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
swap(__bit_reference<_Cp> __x, __bit_reference<_Cp> __y) _NOEXCEPT {
  bool __t = __x;
  __x      = __y;
  __y      = __t;
}

template <class _Cp, class _Dp>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
swap(__bit_reference<_Cp> __x, __bit_reference<_Dp> __y) _NOEXCEPT {
  bool __t = __x;
  __x      = __y;
  __y      = __t;
}

template <class _Cp>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(__bit_reference<_Cp> __x, bool& __y) _NOEXCEPT {
  bool __t = __x;
  __x      = __y;
  __y      = __t;
}

template <class _Cp>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(bool& __x, __bit_reference<_Cp> __y) _NOEXCEPT {
  bool __t = __x;
  __x      = __y;
  __y      = __t;
}

template <class _Cp>
class __bit_const_reference {
  using __storage_type    = typename _Cp::__storage_type;
  using __storage_pointer = typename _Cp::__const_storage_pointer;

  __storage_pointer __seg_;
  __storage_type __mask_;

  friend typename _Cp::__self;
  friend class __bit_iterator<_Cp, true>;

public:
  using __container = typename _Cp::__self;

  _LIBCPP_HIDE_FROM_ABI __bit_const_reference(const __bit_const_reference&) = default;

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT
      : __seg_(__x.__seg_),
        __mask_(__x.__mask_) {}

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR operator bool() const _NOEXCEPT {
    return static_cast<bool>(*__seg_ & __mask_);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, true> operator&() const _NOEXCEPT {
    return __bit_iterator<_Cp, true>(__seg_, static_cast<unsigned>(std::__libcpp_ctz(__mask_)));
  }

private:
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __bit_const_reference(
      __storage_pointer __s, __storage_type __m) _NOEXCEPT
      : __seg_(__s),
        __mask_(__m) {}

  __bit_const_reference& operator=(const __bit_const_reference&) = delete;
};

// fill_n

template <bool _FillValue, class _Cp>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
__fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) {
  using _It            = __bit_iterator<_Cp, false>;
  using __storage_type = typename _It::__storage_type;

  const int __bits_per_word = _It::__bits_per_word;
  // do first partial word
  if (__first.__ctz_ != 0) {
    __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
    __storage_type __dn    = std::min(__clz_f, __n);
    __storage_type __m     = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
    if (_FillValue)
      *__first.__seg_ |= __m;
    else
      *__first.__seg_ &= ~__m;
    __n -= __dn;
    ++__first.__seg_;
  }
  // do middle whole words
  __storage_type __nw = __n / __bits_per_word;
  std::fill_n(std::__to_address(__first.__seg_), __nw, _FillValue ? static_cast<__storage_type>(-1) : 0);
  __n -= __nw * __bits_per_word;
  // do last partial word
  if (__n > 0) {
    __first.__seg_ += __nw;
    __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
    if (_FillValue)
      *__first.__seg_ |= __m;
    else
      *__first.__seg_ &= ~__m;
  }
}

template <class _Cp>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n, bool __value) {
  if (__n > 0) {
    if (__value)
      std::__fill_n<true>(__first, __n);
    else
      std::__fill_n<false>(__first, __n);
  }
}

// fill

template <class _Cp>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
fill(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, bool __value) {
  std::fill_n(__first, static_cast<typename _Cp::size_type>(__last - __first), __value);
}

// copy

template <class _Cp, bool _IsConst>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> __copy_aligned(
    __bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) {
  using _In             = __bit_iterator<_Cp, _IsConst>;
  using difference_type = typename _In::difference_type;
  using __storage_type  = typename _In::__storage_type;

  const int __bits_per_word = _In::__bits_per_word;
  difference_type __n       = __last - __first;
  if (__n > 0) {
    // do first word
    if (__first.__ctz_ != 0) {
      unsigned __clz       = __bits_per_word - __first.__ctz_;
      difference_type __dn = std::min(static_cast<difference_type>(__clz), __n);
      __n -= __dn;
      __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz - __dn));
      __storage_type __b = *__first.__seg_ & __m;
      *__result.__seg_ &= ~__m;
      *__result.__seg_ |= __b;
      __result.__seg_ += (__dn + __result.__ctz_) / __bits_per_word;
      __result.__ctz_ = static_cast<unsigned>((__dn + __result.__ctz_) % __bits_per_word);
      ++__first.__seg_;
      // __first.__ctz_ = 0;
    }
    // __first.__ctz_ == 0;
    // do middle words
    __storage_type __nw = __n / __bits_per_word;
    std::copy_n(std::__to_address(__first.__seg_), __nw, std::__to_address(__result.__seg_));
    __n -= __nw * __bits_per_word;
    __result.__seg_ += __nw;
    // do last word
    if (__n > 0) {
      __first.__seg_ += __nw;
      __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
      __storage_type __b = *__first.__seg_ & __m;
      *__result.__seg_ &= ~__m;
      *__result.__seg_ |= __b;
      __result.__ctz_ = static_cast<unsigned>(__n);
    }
  }
  return __result;
}

template <class _Cp, bool _IsConst>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> __copy_unaligned(
    __bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) {
  using _In             = __bit_iterator<_Cp, _IsConst>;
  using difference_type = typename _In::difference_type;
  using __storage_type  = typename _In::__storage_type;

  const int __bits_per_word = _In::__bits_per_word;
  difference_type __n       = __last - __first;
  if (__n > 0) {
    // do first word
    if (__first.__ctz_ != 0) {
      unsigned __clz_f     = __bits_per_word - __first.__ctz_;
      difference_type __dn = std::min(static_cast<difference_type>(__clz_f), __n);
      __n -= __dn;
      __storage_type __m   = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
      __storage_type __b   = *__first.__seg_ & __m;
      unsigned __clz_r     = __bits_per_word - __result.__ctz_;
      __storage_type __ddn = std::min<__storage_type>(__dn, __clz_r);
      __m                  = (~__storage_type(0) << __result.__ctz_) & (~__storage_type(0) >> (__clz_r - __ddn));
      *__result.__seg_ &= ~__m;
      if (__result.__ctz_ > __first.__ctz_)
        *__result.__seg_ |= __b << (__result.__ctz_ - __first.__ctz_);
      else
        *__result.__seg_ |= __b >> (__first.__ctz_ - __result.__ctz_);
      __result.__seg_ += (__ddn + __result.__ctz_) / __bits_per_word;
      __result.__ctz_ = static_cast<unsigned>((__ddn + __result.__ctz_) % __bits_per_word);
      __dn -= __ddn;
      if (__dn > 0) {
        __m = ~__storage_type(0) >> (__bits_per_word - __dn);
        *__result.__seg_ &= ~__m;
        *__result.__seg_ |= __b >> (__first.__ctz_ + __ddn);
        __result.__ctz_ = static_cast<unsigned>(__dn);
      }
      ++__first.__seg_;
      // __first.__ctz_ = 0;
    }
    // __first.__ctz_ == 0;
    // do middle words
    unsigned __clz_r   = __bits_per_word - __result.__ctz_;
    __storage_type __m = ~__storage_type(0) << __result.__ctz_;
    for (; __n >= __bits_per_word; __n -= __bits_per_word, ++__first.__seg_) {
      __storage_type __b = *__first.__seg_;
      *__result.__seg_ &= ~__m;
      *__result.__seg_ |= __b << __result.__ctz_;
      ++__result.__seg_;
      *__result.__seg_ &= __m;
      *__result.__seg_ |= __b >> __clz_r;
    }
    // do last word
    if (__n > 0) {
      __m                 = ~__storage_type(0) >> (__bits_per_word - __n);
      __storage_type __b  = *__first.__seg_ & __m;
      __storage_type __dn = std::min(__n, static_cast<difference_type>(__clz_r));
      __m                 = (~__storage_type(0) << __result.__ctz_) & (~__storage_type(0) >> (__clz_r - __dn));
      *__result.__seg_ &= ~__m;
      *__result.__seg_ |= __b << __result.__ctz_;
      __result.__seg_ += (__dn + __result.__ctz_) / __bits_per_word;
      __result.__ctz_ = static_cast<unsigned>((__dn + __result.__ctz_) % __bits_per_word);
      __n -= __dn;
      if (__n > 0) {
        __m = ~__storage_type(0) >> (__bits_per_word - __n);
        *__result.__seg_ &= ~__m;
        *__result.__seg_ |= __b >> __dn;
        __result.__ctz_ = static_cast<unsigned>(__n);
      }
    }
  }
  return __result;
}

template <class _Cp, bool _IsConst>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, false>
copy(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) {
  if (__first.__ctz_ == __result.__ctz_)
    return std::__copy_aligned(__first, __last, __result);
  return std::__copy_unaligned(__first, __last, __result);
}

// copy_backward

template <class _Cp, bool _IsConst>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> __copy_backward_aligned(
    __bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) {
  using _In             = __bit_iterator<_Cp, _IsConst>;
  using difference_type = typename _In::difference_type;
  using __storage_type  = typename _In::__storage_type;

  const int __bits_per_word = _In::__bits_per_word;
  difference_type __n       = __last - __first;
  if (__n > 0) {
    // do first word
    if (__last.__ctz_ != 0) {
      difference_type __dn = std::min(static_cast<difference_type>(__last.__ctz_), __n);
      __n -= __dn;
      unsigned __clz     = __bits_per_word - __last.__ctz_;
      __storage_type __m = (~__storage_type(0) << (__last.__ctz_ - __dn)) & (~__storage_type(0) >> __clz);
      __storage_type __b = *__last.__seg_ & __m;
      *__result.__seg_ &= ~__m;
      *__result.__seg_ |= __b;
      __result.__ctz_ = static_cast<unsigned>(((-__dn & (__bits_per_word - 1)) + __result.__ctz_) % __bits_per_word);
      // __last.__ctz_ = 0
    }
    // __last.__ctz_ == 0 || __n == 0
    // __result.__ctz_ == 0 || __n == 0
    // do middle words
    __storage_type __nw = __n / __bits_per_word;
    __result.__seg_ -= __nw;
    __last.__seg_ -= __nw;
    std::copy_n(std::__to_address(__last.__seg_), __nw, std::__to_address(__result.__seg_));
    __n -= __nw * __bits_per_word;
    // do last word
    if (__n > 0) {
      __storage_type __m = ~__storage_type(0) << (__bits_per_word - __n);
      __storage_type __b = *--__last.__seg_ & __m;
      *--__result.__seg_ &= ~__m;
      *__result.__seg_ |= __b;
      __result.__ctz_ = static_cast<unsigned>(-__n & (__bits_per_word - 1));
    }
  }
  return __result;
}

template <class _Cp, bool _IsConst>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> __copy_backward_unaligned(
    __bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) {
  using _In             = __bit_iterator<_Cp, _IsConst>;
  using difference_type = typename _In::difference_type;
  using __storage_type  = typename _In::__storage_type;

  const int __bits_per_word = _In::__bits_per_word;
  difference_type __n       = __last - __first;
  if (__n > 0) {
    // do first word
    if (__last.__ctz_ != 0) {
      difference_type __dn = std::min(static_cast<difference_type>(__last.__ctz_), __n);
      __n -= __dn;
      unsigned __clz_l     = __bits_per_word - __last.__ctz_;
      __storage_type __m   = (~__storage_type(0) << (__last.__ctz_ - __dn)) & (~__storage_type(0) >> __clz_l);
      __storage_type __b   = *__last.__seg_ & __m;
      unsigned __clz_r     = __bits_per_word - __result.__ctz_;
      __storage_type __ddn = std::min(__dn, static_cast<difference_type>(__result.__ctz_));
      if (__ddn > 0) {
        __m = (~__storage_type(0) << (__result.__ctz_ - __ddn)) & (~__storage_type(0) >> __clz_r);
        *__result.__seg_ &= ~__m;
        if (__result.__ctz_ > __last.__ctz_)
          *__result.__seg_ |= __b << (__result.__ctz_ - __last.__ctz_);
        else
          *__result.__seg_ |= __b >> (__last.__ctz_ - __result.__ctz_);
        __result.__ctz_ = static_cast<unsigned>(((-__ddn & (__bits_per_word - 1)) + __result.__ctz_) % __bits_per_word);
        __dn -= __ddn;
      }
      if (__dn > 0) {
        // __result.__ctz_ == 0
        --__result.__seg_;
        __result.__ctz_ = static_cast<unsigned>(-__dn & (__bits_per_word - 1));
        __m             = ~__storage_type(0) << __result.__ctz_;
        *__result.__seg_ &= ~__m;
        __last.__ctz_ -= __dn + __ddn;
        *__result.__seg_ |= __b << (__result.__ctz_ - __last.__ctz_);
      }
      // __last.__ctz_ = 0
    }
    // __last.__ctz_ == 0 || __n == 0
    // __result.__ctz_ != 0 || __n == 0
    // do middle words
    unsigned __clz_r   = __bits_per_word - __result.__ctz_;
    __storage_type __m = ~__storage_type(0) >> __clz_r;
    for (; __n >= __bits_per_word; __n -= __bits_per_word) {
      __storage_type __b = *--__last.__seg_;
      *__result.__seg_ &= ~__m;
      *__result.__seg_ |= __b >> __clz_r;
      *--__result.__seg_ &= __m;
      *__result.__seg_ |= __b << __result.__ctz_;
    }
    // do last word
    if (__n > 0) {
      __m                 = ~__storage_type(0) << (__bits_per_word - __n);
      __storage_type __b  = *--__last.__seg_ & __m;
      __clz_r             = __bits_per_word - __result.__ctz_;
      __storage_type __dn = std::min(__n, static_cast<difference_type>(__result.__ctz_));
      __m                 = (~__storage_type(0) << (__result.__ctz_ - __dn)) & (~__storage_type(0) >> __clz_r);
      *__result.__seg_ &= ~__m;
      *__result.__seg_ |= __b >> (__bits_per_word - __result.__ctz_);
      __result.__ctz_ = static_cast<unsigned>(((-__dn & (__bits_per_word - 1)) + __result.__ctz_) % __bits_per_word);
      __n -= __dn;
      if (__n > 0) {
        // __result.__ctz_ == 0
        --__result.__seg_;
        __result.__ctz_ = static_cast<unsigned>(-__n & (__bits_per_word - 1));
        __m             = ~__storage_type(0) << __result.__ctz_;
        *__result.__seg_ &= ~__m;
        *__result.__seg_ |= __b << (__result.__ctz_ - (__bits_per_word - __n - __dn));
      }
    }
  }
  return __result;
}

template <class _Cp, bool _IsConst>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, false> copy_backward(
    __bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) {
  if (__last.__ctz_ == __result.__ctz_)
    return std::__copy_backward_aligned(__first, __last, __result);
  return std::__copy_backward_unaligned(__first, __last, __result);
}

// move

template <class _Cp, bool _IsConst>
inline _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
move(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) {
  return std::copy(__first, __last, __result);
}

// move_backward

template <class _Cp, bool _IsConst>
inline _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> move_backward(
    __bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) {
  return std::copy_backward(__first, __last, __result);
}

// swap_ranges

template <class _Cl, class _Cr>
_LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cr, false> __swap_ranges_aligned(
    __bit_iterator<_Cl, false> __first, __bit_iterator<_Cl, false> __last, __bit_iterator<_Cr, false> __result) {
  using _I1             = __bit_iterator<_Cl, false>;
  using difference_type = typename _I1::difference_type;
  using __storage_type  = typename _I1::__storage_type;

  const int __bits_per_word = _I1::__bits_per_word;
  difference_type __n       = __last - __first;
  if (__n > 0) {
    // do first word
    if (__first.__ctz_ != 0) {
      unsigned __clz       = __bits_per_word - __first.__ctz_;
      difference_type __dn = std::min(static_cast<difference_type>(__clz), __n);
      __n -= __dn;
      __storage_type __m  = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz - __dn));
      __storage_type __b1 = *__first.__seg_ & __m;
      *__first.__seg_ &= ~__m;
      __storage_type __b2 = *__result.__seg_ & __m;
      *__result.__seg_ &= ~__m;
      *__result.__seg_ |= __b1;
      *__first.__seg_ |= __b2;
      __result.__seg_ += (__dn + __result.__ctz_) / __bits_per_word;
      __result.__ctz_ = static_cast<unsigned>((__dn + __result.__ctz_) % __bits_per_word);
      ++__first.__seg_;
      // __first.__ctz_ = 0;
    }
    // __first.__ctz_ == 0;
    // do middle words
    for (; __n >= __bits_per_word; __n -= __bits_per_word, ++__first.__seg_, ++__result.__seg_)
      swap(*__first.__seg_, *__result.__seg_);
    // do last word
    if (__n > 0) {
      __storage_type __m  = ~__storage_type(0) >> (__bits_per_word - __n);
      __storage_type __b1 = *__first.__seg_ & __m;
      *__first.__seg_ &= ~__m;
      __storage_type __b2 = *__result.__seg_ & __m;
      *__result.__seg_ &= ~__m;
      *__result.__seg_ |= __b1;
      *__first.__seg_ |= __b2;
      __result.__ctz_ = static_cast<unsigned>(__n);
    }
  }
  return __result;
}

template <class _Cl, class _Cr>
_LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cr, false> __swap_ranges_unaligned(
    __bit_iterator<_Cl, false> __first, __bit_iterator<_Cl, false> __last, __bit_iterator<_Cr, false> __result) {
  using _I1             = __bit_iterator<_Cl, false>;
  using difference_type = typename _I1::difference_type;
  using __storage_type  = typename _I1::__storage_type;

  const int __bits_per_word = _I1::__bits_per_word;
  difference_type __n       = __last - __first;
  if (__n > 0) {
    // do first word
    if (__first.__ctz_ != 0) {
      unsigned __clz_f     = __bits_per_word - __first.__ctz_;
      difference_type __dn = std::min(static_cast<difference_type>(__clz_f), __n);
      __n -= __dn;
      __storage_type __m  = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
      __storage_type __b1 = *__first.__seg_ & __m;
      *__first.__seg_ &= ~__m;
      unsigned __clz_r     = __bits_per_word - __result.__ctz_;
      __storage_type __ddn = std::min<__storage_type>(__dn, __clz_r);
      __m                  = (~__storage_type(0) << __result.__ctz_) & (~__storage_type(0) >> (__clz_r - __ddn));
      __storage_type __b2  = *__result.__seg_ & __m;
      *__result.__seg_ &= ~__m;
      if (__result.__ctz_ > __first.__ctz_) {
        unsigned __s = __result.__ctz_ - __first.__ctz_;
        *__result.__seg_ |= __b1 << __s;
        *__first.__seg_ |= __b2 >> __s;
      } else {
        unsigned __s = __first.__ctz_ - __result.__ctz_;
        *__result.__seg_ |= __b1 >> __s;
        *__first.__seg_ |= __b2 << __s;
      }
      __result.__seg_ += (__ddn + __result.__ctz_) / __bits_per_word;
      __result.__ctz_ = static_cast<unsigned>((__ddn + __result.__ctz_) % __bits_per_word);
      __dn -= __ddn;
      if (__dn > 0) {
        __m  = ~__storage_type(0) >> (__bits_per_word - __dn);
        __b2 = *__result.__seg_ & __m;
        *__result.__seg_ &= ~__m;
        unsigned __s = __first.__ctz_ + __ddn;
        *__result.__seg_ |= __b1 >> __s;
        *__first.__seg_ |= __b2 << __s;
        __result.__ctz_ = static_cast<unsigned>(__dn);
      }
      ++__first.__seg_;
      // __first.__ctz_ = 0;
    }
    // __first.__ctz_ == 0;
    // do middle words
    __storage_type __m = ~__storage_type(0) << __result.__ctz_;
    unsigned __clz_r   = __bits_per_word - __result.__ctz_;
    for (; __n >= __bits_per_word; __n -= __bits_per_word, ++__first.__seg_) {
      __storage_type __b1 = *__first.__seg_;
      __storage_type __b2 = *__result.__seg_ & __m;
      *__result.__seg_ &= ~__m;
      *__result.__seg_ |= __b1 << __result.__ctz_;
      *__first.__seg_ = __b2 >> __result.__ctz_;
      ++__result.__seg_;
      __b2 = *__result.__seg_ & ~__m;
      *__result.__seg_ &= __m;
      *__result.__seg_ |= __b1 >> __clz_r;
      *__first.__seg_ |= __b2 << __clz_r;
    }
    // do last word
    if (__n > 0) {
      __m                 = ~__storage_type(0) >> (__bits_per_word - __n);
      __storage_type __b1 = *__first.__seg_ & __m;
      *__first.__seg_ &= ~__m;
      __storage_type __dn = std::min<__storage_type>(__n, __clz_r);
      __m                 = (~__storage_type(0) << __result.__ctz_) & (~__storage_type(0) >> (__clz_r - __dn));
      __storage_type __b2 = *__result.__seg_ & __m;
      *__result.__seg_ &= ~__m;
      *__result.__seg_ |= __b1 << __result.__ctz_;
      *__first.__seg_ |= __b2 >> __result.__ctz_;
      __result.__seg_ += (__dn + __result.__ctz_) / __bits_per_word;
      __result.__ctz_ = static_cast<unsigned>((__dn + __result.__ctz_) % __bits_per_word);
      __n -= __dn;
      if (__n > 0) {
        __m  = ~__storage_type(0) >> (__bits_per_word - __n);
        __b2 = *__result.__seg_ & __m;
        *__result.__seg_ &= ~__m;
        *__result.__seg_ |= __b1 >> __dn;
        *__first.__seg_ |= __b2 << __dn;
        __result.__ctz_ = static_cast<unsigned>(__n);
      }
    }
  }
  return __result;
}

template <class _Cl, class _Cr>
inline _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cr, false> swap_ranges(
    __bit_iterator<_Cl, false> __first1, __bit_iterator<_Cl, false> __last1, __bit_iterator<_Cr, false> __first2) {
  if (__first1.__ctz_ == __first2.__ctz_)
    return std::__swap_ranges_aligned(__first1, __last1, __first2);
  return std::__swap_ranges_unaligned(__first1, __last1, __first2);
}

// rotate

template <class _Cp>
struct __bit_array {
  using difference_type   = typename _Cp::difference_type;
  using __storage_type    = typename _Cp::__storage_type;
  using __storage_pointer = typename _Cp::__storage_pointer;
  using iterator          = typename _Cp::iterator;

  static const unsigned __bits_per_word = _Cp::__bits_per_word;
  static const unsigned _Np             = 4;

  difference_type __size_;
  __storage_type __word_[_Np];

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static difference_type capacity() {
    return static_cast<difference_type>(_Np * __bits_per_word);
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __bit_array(difference_type __s) : __size_(__s) {
    if (__libcpp_is_constant_evaluated()) {
      for (size_t __i = 0; __i != __bit_array<_Cp>::_Np; ++__i)
        std::__construct_at(__word_ + __i, 0);
    }
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator begin() {
    return iterator(pointer_traits<__storage_pointer>::pointer_to(__word_[0]), 0);
  }
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator end() {
    return iterator(pointer_traits<__storage_pointer>::pointer_to(__word_[0]) + __size_ / __bits_per_word,
                    static_cast<unsigned>(__size_ % __bits_per_word));
  }
};

template <class _Cp>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle, __bit_iterator<_Cp, false> __last) {
  using _I1             = __bit_iterator<_Cp, false>;
  using difference_type = typename _I1::difference_type;

  difference_type __d1 = __middle - __first;
  difference_type __d2 = __last - __middle;
  _I1 __r              = __first + __d2;
  while (__d1 != 0 && __d2 != 0) {
    if (__d1 <= __d2) {
      if (__d1 <= __bit_array<_Cp>::capacity()) {
        __bit_array<_Cp> __b(__d1);
        std::copy(__first, __middle, __b.begin());
        std::copy(__b.begin(), __b.end(), std::copy(__middle, __last, __first));
        break;
      } else {
        __bit_iterator<_Cp, false> __mp = std::swap_ranges(__first, __middle, __middle);
        __first                         = __middle;
        __middle                        = __mp;
        __d2 -= __d1;
      }
    } else {
      if (__d2 <= __bit_array<_Cp>::capacity()) {
        __bit_array<_Cp> __b(__d2);
        std::copy(__middle, __last, __b.begin());
        std::copy_backward(__b.begin(), __b.end(), std::copy_backward(__first, __middle, __last));
        break;
      } else {
        __bit_iterator<_Cp, false> __mp = __first + __d2;
        std::swap_ranges(__first, __mp, __middle);
        __first = __mp;
        __d1 -= __d2;
      }
    }
  }
  return __r;
}

// equal

template <class _Cp, bool _IC1, bool _IC2>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool __equal_unaligned(
    __bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, __bit_iterator<_Cp, _IC2> __first2) {
  using _It             = __bit_iterator<_Cp, _IC1>;
  using difference_type = typename _It::difference_type;
  using __storage_type  = typename _It::__storage_type;

  const int __bits_per_word = _It::__bits_per_word;
  difference_type __n       = __last1 - __first1;
  if (__n > 0) {
    // do first word
    if (__first1.__ctz_ != 0) {
      unsigned __clz_f     = __bits_per_word - __first1.__ctz_;
      difference_type __dn = std::min(static_cast<difference_type>(__clz_f), __n);
      __n -= __dn;
      __storage_type __m   = (~__storage_type(0) << __first1.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
      __storage_type __b   = *__first1.__seg_ & __m;
      unsigned __clz_r     = __bits_per_word - __first2.__ctz_;
      __storage_type __ddn = std::min<__storage_type>(__dn, __clz_r);
      __m                  = (~__storage_type(0) << __first2.__ctz_) & (~__storage_type(0) >> (__clz_r - __ddn));
      if (__first2.__ctz_ > __first1.__ctz_) {
        if ((*__first2.__seg_ & __m) != (__b << (__first2.__ctz_ - __first1.__ctz_)))
          return false;
      } else {
        if ((*__first2.__seg_ & __m) != (__b >> (__first1.__ctz_ - __first2.__ctz_)))
          return false;
      }
      __first2.__seg_ += (__ddn + __first2.__ctz_) / __bits_per_word;
      __first2.__ctz_ = static_cast<unsigned>((__ddn + __first2.__ctz_) % __bits_per_word);
      __dn -= __ddn;
      if (__dn > 0) {
        __m = ~__storage_type(0) >> (__bits_per_word - __dn);
        if ((*__first2.__seg_ & __m) != (__b >> (__first1.__ctz_ + __ddn)))
          return false;
        __first2.__ctz_ = static_cast<unsigned>(__dn);
      }
      ++__first1.__seg_;
      // __first1.__ctz_ = 0;
    }
    // __first1.__ctz_ == 0;
    // do middle words
    unsigned __clz_r   = __bits_per_word - __first2.__ctz_;
    __storage_type __m = ~__storage_type(0) << __first2.__ctz_;
    for (; __n >= __bits_per_word; __n -= __bits_per_word, ++__first1.__seg_) {
      __storage_type __b = *__first1.__seg_;
      if ((*__first2.__seg_ & __m) != (__b << __first2.__ctz_))
        return false;
      ++__first2.__seg_;
      if ((*__first2.__seg_ & ~__m) != (__b >> __clz_r))
        return false;
    }
    // do last word
    if (__n > 0) {
      __m                 = ~__storage_type(0) >> (__bits_per_word - __n);
      __storage_type __b  = *__first1.__seg_ & __m;
      __storage_type __dn = std::min(__n, static_cast<difference_type>(__clz_r));
      __m                 = (~__storage_type(0) << __first2.__ctz_) & (~__storage_type(0) >> (__clz_r - __dn));
      if ((*__first2.__seg_ & __m) != (__b << __first2.__ctz_))
        return false;
      __first2.__seg_ += (__dn + __first2.__ctz_) / __bits_per_word;
      __first2.__ctz_ = static_cast<unsigned>((__dn + __first2.__ctz_) % __bits_per_word);
      __n -= __dn;
      if (__n > 0) {
        __m = ~__storage_type(0) >> (__bits_per_word - __n);
        if ((*__first2.__seg_ & __m) != (__b >> __dn))
          return false;
      }
    }
  }
  return true;
}

template <class _Cp, bool _IC1, bool _IC2>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool __equal_aligned(
    __bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, __bit_iterator<_Cp, _IC2> __first2) {
  using _It             = __bit_iterator<_Cp, _IC1>;
  using difference_type = typename _It::difference_type;
  using __storage_type  = typename _It::__storage_type;

  const int __bits_per_word = _It::__bits_per_word;
  difference_type __n       = __last1 - __first1;
  if (__n > 0) {
    // do first word
    if (__first1.__ctz_ != 0) {
      unsigned __clz       = __bits_per_word - __first1.__ctz_;
      difference_type __dn = std::min(static_cast<difference_type>(__clz), __n);
      __n -= __dn;
      __storage_type __m = (~__storage_type(0) << __first1.__ctz_) & (~__storage_type(0) >> (__clz - __dn));
      if ((*__first2.__seg_ & __m) != (*__first1.__seg_ & __m))
        return false;
      ++__first2.__seg_;
      ++__first1.__seg_;
      // __first1.__ctz_ = 0;
      // __first2.__ctz_ = 0;
    }
    // __first1.__ctz_ == 0;
    // __first2.__ctz_ == 0;
    // do middle words
    for (; __n >= __bits_per_word; __n -= __bits_per_word, ++__first1.__seg_, ++__first2.__seg_)
      if (*__first2.__seg_ != *__first1.__seg_)
        return false;
    // do last word
    if (__n > 0) {
      __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
      if ((*__first2.__seg_ & __m) != (*__first1.__seg_ & __m))
        return false;
    }
  }
  return true;
}

template <class _Cp, bool _IC1, bool _IC2>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
equal(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, __bit_iterator<_Cp, _IC2> __first2) {
  if (__first1.__ctz_ == __first2.__ctz_)
    return std::__equal_aligned(__first1, __last1, __first2);
  return std::__equal_unaligned(__first1, __last1, __first2);
}

template <class _Cp, bool _IsConst, typename _Cp::__storage_type>
class __bit_iterator {
public:
  using difference_type = typename _Cp::difference_type;
  using value_type      = bool;
  using pointer         = __bit_iterator;
#ifndef _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
  using reference = __conditional_t<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> >;
#else
# 845 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
  using reference = __conditional_t<_IsConst, bool, __bit_reference<_Cp> >;
#endif
# 847 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
  using iterator_category = random_access_iterator_tag;

private:
  using __storage_type = typename _Cp::__storage_type;
  using __storage_pointer =
      __conditional_t<_IsConst, typename _Cp::__const_storage_pointer, typename _Cp::__storage_pointer>;

  static const unsigned __bits_per_word = _Cp::__bits_per_word;

  __storage_pointer __seg_;
  unsigned __ctz_;

public:
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator() _NOEXCEPT
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 862 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
      : __seg_(nullptr),
        __ctz_(0)
#endif
# 865 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
  {
  }

  // When _IsConst=false, this is the copy constructor.
  // It is non-trivial. Making it trivial would break ABI.
  // When _IsConst=true, this is a converting constructor;
  // the copy and move constructors are implicitly generated
  // and trivial.
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator(const __bit_iterator<_Cp, false>& __it) _NOEXCEPT
      : __seg_(__it.__seg_),
        __ctz_(__it.__ctz_) {}

  // When _IsConst=false, we have a user-provided copy constructor,
  // so we must also provide a copy assignment operator because
  // the implicit generation of a defaulted one is deprecated.
  // When _IsConst=true, the assignment operators are
  // implicitly generated and trivial.
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator&
  operator=(const _If<_IsConst, struct __private_nat, __bit_iterator>& __it) {
    __seg_ = __it.__seg_;
    __ctz_ = __it.__ctz_;
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference operator*() const _NOEXCEPT {
    return __conditional_t<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> >(
        __seg_, __storage_type(1) << __ctz_);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator++() {
    if (__ctz_ != __bits_per_word - 1)
      ++__ctz_;
    else {
      __ctz_ = 0;
      ++__seg_;
    }
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator++(int) {
    __bit_iterator __tmp = *this;
    ++(*this);
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator--() {
    if (__ctz_ != 0)
      --__ctz_;
    else {
      __ctz_ = __bits_per_word - 1;
      --__seg_;
    }
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator--(int) {
    __bit_iterator __tmp = *this;
    --(*this);
    return __tmp;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator+=(difference_type __n) {
    if (__n >= 0)
      __seg_ += (__n + __ctz_) / __bits_per_word;
    else
      __seg_ += static_cast<difference_type>(__n - __bits_per_word + __ctz_ + 1) /
                static_cast<difference_type>(__bits_per_word);
    __n &= (__bits_per_word - 1);
    __ctz_ = static_cast<unsigned>((__n + __ctz_) % __bits_per_word);
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator& operator-=(difference_type __n) {
    return *this += -__n;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator+(difference_type __n) const {
    __bit_iterator __t(*this);
    __t += __n;
    return __t;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator operator-(difference_type __n) const {
    __bit_iterator __t(*this);
    __t -= __n;
    return __t;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator
  operator+(difference_type __n, const __bit_iterator& __it) {
    return __it + __n;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend difference_type
  operator-(const __bit_iterator& __x, const __bit_iterator& __y) {
    return (__x.__seg_ - __y.__seg_) * __bits_per_word + __x.__ctz_ - __y.__ctz_;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference operator[](difference_type __n) const {
    return *(*this + __n);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
  operator==(const __bit_iterator& __x, const __bit_iterator& __y) {
    return __x.__seg_ == __y.__seg_ && __x.__ctz_ == __y.__ctz_;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
  operator!=(const __bit_iterator& __x, const __bit_iterator& __y) {
    return !(__x == __y);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
  operator<(const __bit_iterator& __x, const __bit_iterator& __y) {
    return __x.__seg_ < __y.__seg_ || (__x.__seg_ == __y.__seg_ && __x.__ctz_ < __y.__ctz_);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
  operator>(const __bit_iterator& __x, const __bit_iterator& __y) {
    return __y < __x;
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
  operator<=(const __bit_iterator& __x, const __bit_iterator& __y) {
    return !(__y < __x);
  }

  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
  operator>=(const __bit_iterator& __x, const __bit_iterator& __y) {
    return !(__x < __y);
  }

private:
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __bit_iterator(
      __storage_pointer __s, unsigned __ctz) _NOEXCEPT
      : __seg_(__s),
        __ctz_(__ctz) {}

  friend typename _Cp::__self;

  friend class __bit_reference<_Cp>;
  friend class __bit_const_reference<_Cp>;
  friend class __bit_iterator<_Cp, true>;
  template <class _Dp>
  friend struct __bit_array;
  template <bool _FillValue, class _Dp>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 friend void __fill_n(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n);

  template <class _Dp, bool _IC>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false> __copy_aligned(
      __bit_iterator<_Dp, _IC> __first, __bit_iterator<_Dp, _IC> __last, __bit_iterator<_Dp, false> __result);
  template <class _Dp, bool _IC>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false> __copy_unaligned(
      __bit_iterator<_Dp, _IC> __first, __bit_iterator<_Dp, _IC> __last, __bit_iterator<_Dp, false> __result);
  template <class _Dp, bool _IC>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false>
  copy(__bit_iterator<_Dp, _IC> __first, __bit_iterator<_Dp, _IC> __last, __bit_iterator<_Dp, false> __result);
  template <class _Dp, bool _IC>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false> __copy_backward_aligned(
      __bit_iterator<_Dp, _IC> __first, __bit_iterator<_Dp, _IC> __last, __bit_iterator<_Dp, false> __result);
  template <class _Dp, bool _IC>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false> __copy_backward_unaligned(
      __bit_iterator<_Dp, _IC> __first, __bit_iterator<_Dp, _IC> __last, __bit_iterator<_Dp, false> __result);
  template <class _Dp, bool _IC>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false>
  copy_backward(__bit_iterator<_Dp, _IC> __first, __bit_iterator<_Dp, _IC> __last, __bit_iterator<_Dp, false> __result);
  template <class _Cl, class _Cr>
  friend __bit_iterator<_Cr, false>
      __swap_ranges_aligned(__bit_iterator<_Cl, false>, __bit_iterator<_Cl, false>, __bit_iterator<_Cr, false>);
  template <class _Cl, class _Cr>
  friend __bit_iterator<_Cr, false>
      __swap_ranges_unaligned(__bit_iterator<_Cl, false>, __bit_iterator<_Cl, false>, __bit_iterator<_Cr, false>);
  template <class _Cl, class _Cr>
  friend __bit_iterator<_Cr, false>
      swap_ranges(__bit_iterator<_Cl, false>, __bit_iterator<_Cl, false>, __bit_iterator<_Cr, false>);
  template <class _Dp>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false>
      rotate(__bit_iterator<_Dp, false>, __bit_iterator<_Dp, false>, __bit_iterator<_Dp, false>);
  template <class _Dp, bool _IC1, bool _IC2>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
      __equal_aligned(__bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC2>);
  template <class _Dp, bool _IC1, bool _IC2>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
      __equal_unaligned(__bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC2>);
  template <class _Dp, bool _IC1, bool _IC2>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
      equal(__bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC2>);
  template <bool _ToFind, class _Dp, bool _IC>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, _IC>
      __find_bool(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
  template <bool _ToCount, class _Dp, bool _IC>
  friend typename __bit_iterator<_Dp, _IC>::difference_type _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
      __count_bool(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
};

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___BIT_REFERENCE
# 1065 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__bit_reference" 3
#endif /* __bit_reference expanded by -frewrite-includes */
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/hash.h>
#endif /* expanded by -frewrite-includes */
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_char_like_type.h>
#endif /* expanded by -frewrite-includes */
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#include <climits>
#endif /* expanded by -frewrite-includes */
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 137 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#include <string_view>
#endif /* expanded by -frewrite-includes */
# 137 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 138 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 138 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3

// standard-mandated includes

// [bitset.syn]
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 143 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 144 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#include <string>
#endif /* expanded by -frewrite-includes */
# 144 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 147 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#endif
# 149 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 151 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 2 3


_LIBCPP_BEGIN_NAMESPACE_STD

template <size_t _N_words, size_t _Size>
class __bitset;

template <size_t _N_words, size_t _Size>
struct __has_storage_type<__bitset<_N_words, _Size> >
{
    static const bool value = true;
};

template <size_t _N_words, size_t _Size>
class __bitset
{
public:
    typedef ptrdiff_t              difference_type;
    typedef size_t                 size_type;
    typedef size_type              __storage_type;
protected:
    typedef __bitset __self;
    typedef       __storage_type*  __storage_pointer;
    typedef const __storage_type*  __const_storage_pointer;
    static const unsigned __bits_per_word = static_cast<unsigned>(sizeof(__storage_type) * CHAR_BIT);

    friend class __bit_reference<__bitset>;
    friend class __bit_const_reference<__bitset>;
    friend class __bit_iterator<__bitset, false>;
    friend class __bit_iterator<__bitset, true>;
    friend struct __bit_array<__bitset>;

    __storage_type __first_[_N_words];

    typedef __bit_reference<__bitset>                  reference;
    typedef __bit_const_reference<__bitset>            const_reference;
    typedef __bit_iterator<__bitset, false>            iterator;
    typedef __bit_iterator<__bitset, true>             const_iterator;

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR __bitset() _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY
    explicit _LIBCPP_CONSTEXPR __bitset(unsigned long long __v) _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 reference __make_ref(size_t __pos) _NOEXCEPT
        {return reference(__first_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR const_reference __make_ref(size_t __pos) const _NOEXCEPT
        {return const_reference(__first_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 iterator __make_iter(size_t __pos) _NOEXCEPT
        {return iterator(__first_ + __pos / __bits_per_word, __pos % __bits_per_word);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 const_iterator __make_iter(size_t __pos) const _NOEXCEPT
        {return const_iterator(__first_ + __pos / __bits_per_word, __pos % __bits_per_word);}

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    void operator&=(const __bitset& __v) _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    void operator|=(const __bitset& __v) _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    void operator^=(const __bitset& __v) _NOEXCEPT;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void flip() _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong() const
        {return to_ulong(integral_constant<bool, _Size < sizeof(unsigned long) * CHAR_BIT>());}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong() const
        {return to_ullong(integral_constant<bool, _Size < sizeof(unsigned long long) * CHAR_BIT>());}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool all() const _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool any() const _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY
    size_t __hash_code() const _NOEXCEPT;
private:
#ifdef _LIBCPP_CXX03_LANG
    void __init(unsigned long long __v, false_type) _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY
    void __init(unsigned long long __v, true_type) _NOEXCEPT;
#endif // _LIBCPP_CXX03_LANG
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
    unsigned long to_ulong(false_type) const;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    unsigned long to_ulong(true_type) const;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
    unsigned long long to_ullong(false_type) const;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    unsigned long long to_ullong(true_type) const;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    unsigned long long to_ullong(true_type, false_type) const;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
    unsigned long long to_ullong(true_type, true_type) const;
};

template <size_t _N_words, size_t _Size>
inline
_LIBCPP_CONSTEXPR
__bitset<_N_words, _Size>::__bitset() _NOEXCEPT
#ifndef _LIBCPP_CXX03_LANG
    : __first_{0}
#endif
# 249 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
{
#ifdef _LIBCPP_CXX03_LANG
    _VSTD::fill_n(__first_, _N_words, __storage_type(0));
#endif
# 253 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
}

#ifdef _LIBCPP_CXX03_LANG

template <size_t _N_words, size_t _Size>
void
__bitset<_N_words, _Size>::__init(unsigned long long __v, false_type) _NOEXCEPT
{
    __storage_type __t[sizeof(unsigned long long) / sizeof(__storage_type)];
    size_t __sz = _Size;
    for (size_t __i = 0; __i < sizeof(__t)/sizeof(__t[0]); ++__i, __v >>= __bits_per_word, __sz -= __bits_per_word )
        if ( __sz < __bits_per_word)
            __t[__i] = static_cast<__storage_type>(__v) & ( 1ULL << __sz ) - 1;
        else
            __t[__i] = static_cast<__storage_type>(__v);

    _VSTD::copy(__t, __t + sizeof(__t)/sizeof(__t[0]), __first_);
    _VSTD::fill(__first_ + sizeof(__t)/sizeof(__t[0]), __first_ + sizeof(__first_)/sizeof(__first_[0]),
               __storage_type(0));
}

template <size_t _N_words, size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY
void
__bitset<_N_words, _Size>::__init(unsigned long long __v, true_type) _NOEXCEPT
{
    __first_[0] = __v;
    if (_Size < __bits_per_word)
        __first_[0] &= ( 1ULL << _Size ) - 1;

    _VSTD::fill(__first_ + 1, __first_ + sizeof(__first_)/sizeof(__first_[0]), __storage_type(0));
}

#endif // _LIBCPP_CXX03_LANG
# 287 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3

template <size_t _N_words, size_t _Size>
inline
_LIBCPP_CONSTEXPR
__bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
#ifndef _LIBCPP_CXX03_LANG
#if 0 /* disabled by -frewrite-includes */
#if __SIZEOF_SIZE_T__ == 8
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 294 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
    : __first_{__v}
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif __SIZEOF_SIZE_T__ == 4
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 296 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
    : __first_{static_cast<__storage_type>(__v),
                _Size >= 2 * __bits_per_word ? static_cast<__storage_type>(__v >> __bits_per_word)
                : static_cast<__storage_type>((__v >> __bits_per_word) & (__storage_type(1) << (_Size - __bits_per_word)) - 1)}
#else
# 300 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#error This constructor has not been ported to this platform
#endif
# 302 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#endif
# 303 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
{
#ifdef _LIBCPP_CXX03_LANG
    __init(__v, integral_constant<bool, sizeof(unsigned long long) == sizeof(__storage_type)>());
#endif
# 307 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
}

template <size_t _N_words, size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<_N_words, _Size>::operator&=(const __bitset& __v) _NOEXCEPT
{
    for (size_type __i = 0; __i < _N_words; ++__i)
        __first_[__i] &= __v.__first_[__i];
}

template <size_t _N_words, size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<_N_words, _Size>::operator|=(const __bitset& __v) _NOEXCEPT
{
    for (size_type __i = 0; __i < _N_words; ++__i)
        __first_[__i] |= __v.__first_[__i];
}

template <size_t _N_words, size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<_N_words, _Size>::operator^=(const __bitset& __v) _NOEXCEPT
{
    for (size_type __i = 0; __i < _N_words; ++__i)
        __first_[__i] ^= __v.__first_[__i];
}

template <size_t _N_words, size_t _Size>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<_N_words, _Size>::flip() _NOEXCEPT
{
    // do middle whole words
    size_type __n = _Size;
    __storage_pointer __p = __first_;
    for (; __n >= __bits_per_word; ++__p, __n -= __bits_per_word)
        *__p = ~*__p;
    // do last partial word
    if (__n > 0)
    {
        __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
        __storage_type __b = *__p & __m;
        *__p &= ~__m;
        *__p |= ~__b & __m;
    }
}

template <size_t _N_words, size_t _Size>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long
__bitset<_N_words, _Size>::to_ulong(false_type) const
{
    const_iterator __e = __make_iter(_Size);
    const_iterator __i = _VSTD::find(__make_iter(sizeof(unsigned long) * CHAR_BIT), __e, true);
    if (__i != __e)
        __throw_overflow_error("bitset to_ulong overflow error");

    return __first_[0];
}

template <size_t _N_words, size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long
__bitset<_N_words, _Size>::to_ulong(true_type) const
{
    return __first_[0];
}

template <size_t _N_words, size_t _Size>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long
__bitset<_N_words, _Size>::to_ullong(false_type) const
{
    const_iterator __e = __make_iter(_Size);
    const_iterator __i = _VSTD::find(__make_iter(sizeof(unsigned long long) * CHAR_BIT), __e, true);
    if (__i != __e)
        __throw_overflow_error("bitset to_ullong overflow error");

    return to_ullong(true_type());
}

template <size_t _N_words, size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long
__bitset<_N_words, _Size>::to_ullong(true_type) const
{
    return to_ullong(true_type(), integral_constant<bool, sizeof(__storage_type) < sizeof(unsigned long long)>());
}

template <size_t _N_words, size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long
__bitset<_N_words, _Size>::to_ullong(true_type, false_type) const
{
    return __first_[0];
}

template <size_t _N_words, size_t _Size>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long
__bitset<_N_words, _Size>::to_ullong(true_type, true_type) const
{
    unsigned long long __r = __first_[0];
    for (size_t __i = 1; __i < sizeof(unsigned long long) / sizeof(__storage_type); ++__i)
        __r |= static_cast<unsigned long long>(__first_[__i]) << (sizeof(__storage_type) * CHAR_BIT);
    return __r;
}

template <size_t _N_words, size_t _Size>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
__bitset<_N_words, _Size>::all() const _NOEXCEPT
{
    // do middle whole words
    size_type __n = _Size;
    __const_storage_pointer __p = __first_;
    for (; __n >= __bits_per_word; ++__p, __n -= __bits_per_word)
        if (~*__p)
            return false;
    // do last partial word
    if (__n > 0)
    {
        __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
        if (~*__p & __m)
            return false;
    }
    return true;
}

template <size_t _N_words, size_t _Size>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
__bitset<_N_words, _Size>::any() const _NOEXCEPT
{
    // do middle whole words
    size_type __n = _Size;
    __const_storage_pointer __p = __first_;
    for (; __n >= __bits_per_word; ++__p, __n -= __bits_per_word)
        if (*__p)
            return true;
    // do last partial word
    if (__n > 0)
    {
        __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
        if (*__p & __m)
            return true;
    }
    return false;
}

template <size_t _N_words, size_t _Size>
inline
size_t
__bitset<_N_words, _Size>::__hash_code() const _NOEXCEPT
{
    size_t __h = 0;
    for (size_type __i = 0; __i < _N_words; ++__i)
        __h ^= __first_[__i];
    return __h;
}

template <size_t _Size>
class __bitset<1, _Size>
{
public:
    typedef ptrdiff_t              difference_type;
    typedef size_t                 size_type;
    typedef size_type              __storage_type;
protected:
    typedef __bitset __self;
    typedef       __storage_type*  __storage_pointer;
    typedef const __storage_type*  __const_storage_pointer;
    static const unsigned __bits_per_word = static_cast<unsigned>(sizeof(__storage_type) * CHAR_BIT);

    friend class __bit_reference<__bitset>;
    friend class __bit_const_reference<__bitset>;
    friend class __bit_iterator<__bitset, false>;
    friend class __bit_iterator<__bitset, true>;
    friend struct __bit_array<__bitset>;

    __storage_type __first_;

    typedef __bit_reference<__bitset>                  reference;
    typedef __bit_const_reference<__bitset>            const_reference;
    typedef __bit_iterator<__bitset, false>            iterator;
    typedef __bit_iterator<__bitset, true>             const_iterator;

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR __bitset() _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY
    explicit _LIBCPP_CONSTEXPR __bitset(unsigned long long __v) _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 reference __make_ref(size_t __pos) _NOEXCEPT
        {return reference(&__first_, __storage_type(1) << __pos);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR const_reference __make_ref(size_t __pos) const _NOEXCEPT
        {return const_reference(&__first_, __storage_type(1) << __pos);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 iterator __make_iter(size_t __pos) _NOEXCEPT
        {return iterator(&__first_ + __pos / __bits_per_word, __pos % __bits_per_word);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 const_iterator __make_iter(size_t __pos) const _NOEXCEPT
        {return const_iterator(&__first_ + __pos / __bits_per_word, __pos % __bits_per_word);}

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    void operator&=(const __bitset& __v) _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    void operator|=(const __bitset& __v) _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    void operator^=(const __bitset& __v) _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    void flip() _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    unsigned long to_ulong() const;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    unsigned long long to_ullong() const;

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bool all() const _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bool any() const _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY
    size_t __hash_code() const _NOEXCEPT;
};

template <size_t _Size>
inline
_LIBCPP_CONSTEXPR
__bitset<1, _Size>::__bitset() _NOEXCEPT
    : __first_(0)
{
}

template <size_t _Size>
inline
_LIBCPP_CONSTEXPR
__bitset<1, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
    : __first_(
        _Size == __bits_per_word ? static_cast<__storage_type>(__v)
                                 : static_cast<__storage_type>(__v) & ((__storage_type(1) << _Size) - 1)
    )
{
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<1, _Size>::operator&=(const __bitset& __v) _NOEXCEPT
{
    __first_ &= __v.__first_;
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<1, _Size>::operator|=(const __bitset& __v) _NOEXCEPT
{
    __first_ |= __v.__first_;
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<1, _Size>::operator^=(const __bitset& __v) _NOEXCEPT
{
    __first_ ^= __v.__first_;
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
__bitset<1, _Size>::flip() _NOEXCEPT
{
    __storage_type __m = ~__storage_type(0) >> (__bits_per_word - _Size);
    __first_ = ~__first_;
    __first_ &= __m;
}

template <size_t _Size>
inline
_LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long
__bitset<1, _Size>::to_ulong() const
{
    return __first_;
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long
__bitset<1, _Size>::to_ullong() const
{
    return __first_;
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
__bitset<1, _Size>::all() const _NOEXCEPT
{
    __storage_type __m = ~__storage_type(0) >> (__bits_per_word - _Size);
    return !(~__first_ & __m);
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool
__bitset<1, _Size>::any() const _NOEXCEPT
{
    __storage_type __m = ~__storage_type(0) >> (__bits_per_word - _Size);
    return __first_ & __m;
}

template <size_t _Size>
inline
size_t
__bitset<1, _Size>::__hash_code() const _NOEXCEPT
{
    return __first_;
}

template <>
class __bitset<0, 0>
{
public:
    typedef ptrdiff_t              difference_type;
    typedef size_t                 size_type;
    typedef size_type              __storage_type;
protected:
    typedef __bitset __self;
    typedef       __storage_type*  __storage_pointer;
    typedef const __storage_type*  __const_storage_pointer;
    static const unsigned __bits_per_word = static_cast<unsigned>(sizeof(__storage_type) * CHAR_BIT);

    friend class __bit_reference<__bitset>;
    friend class __bit_const_reference<__bitset>;
    friend class __bit_iterator<__bitset, false>;
    friend class __bit_iterator<__bitset, true>;
    friend struct __bit_array<__bitset>;

    typedef __bit_reference<__bitset>                  reference;
    typedef __bit_const_reference<__bitset>            const_reference;
    typedef __bit_iterator<__bitset, false>            iterator;
    typedef __bit_iterator<__bitset, true>             const_iterator;

    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_CONSTEXPR __bitset() _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY
    explicit _LIBCPP_CONSTEXPR __bitset(unsigned long long) _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 reference __make_ref(size_t) _NOEXCEPT
        {return reference(nullptr, 1);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR const_reference __make_ref(size_t) const _NOEXCEPT
        {return const_reference(nullptr, 1);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 iterator __make_iter(size_t) _NOEXCEPT
        {return iterator(nullptr, 0);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 const_iterator __make_iter(size_t) const _NOEXCEPT
        {return const_iterator(nullptr, 0);}

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator&=(const __bitset&) _NOEXCEPT {}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator|=(const __bitset&) _NOEXCEPT {}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator^=(const __bitset&) _NOEXCEPT {}

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void flip() _NOEXCEPT {}

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong() const {return 0;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong() const {return 0;}

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool all() const _NOEXCEPT {return true;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool any() const _NOEXCEPT {return false;}

    _LIBCPP_INLINE_VISIBILITY size_t __hash_code() const _NOEXCEPT {return 0;}
};

inline
_LIBCPP_CONSTEXPR
__bitset<0, 0>::__bitset() _NOEXCEPT
{
}

inline
_LIBCPP_CONSTEXPR
__bitset<0, 0>::__bitset(unsigned long long) _NOEXCEPT
{
}

template <size_t _Size> class _LIBCPP_TEMPLATE_VIS bitset;
template <size_t _Size> struct hash<bitset<_Size> >;

template <size_t _Size>
class _LIBCPP_TEMPLATE_VIS bitset
    : private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1, _Size>
{
public:
    static const unsigned __n_words = _Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1;
    typedef __bitset<__n_words, _Size> base;

public:
    typedef typename base::reference       reference;
    typedef typename base::const_reference const_reference;

    // 23.3.5.1 constructors:
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bitset() _NOEXCEPT {}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
        bitset(unsigned long long __v) _NOEXCEPT : base(__v) {}
    template <class _CharT, class = __enable_if_t<_IsCharLikeType<_CharT>::value> >
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit bitset(
        const _CharT* __str,
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 26
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 711 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
        typename basic_string_view<_CharT>::size_type __n = basic_string_view<_CharT>::npos,
#  else
# 713 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
        typename basic_string<_CharT>::size_type __n = basic_string<_CharT>::npos,
#  endif
# 715 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
        _CharT __zero = _CharT('0'),
        _CharT __one  = _CharT('1')) {

        size_t __rlen = std::min(__n, char_traits<_CharT>::length(__str));
        __init_from_string_view(basic_string_view<_CharT>(__str, __rlen), __zero, __one);
    }
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 26
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 722 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
    template <class _CharT, class _Traits>
    _LIBCPP_HIDE_FROM_ABI constexpr explicit bitset(
        basic_string_view<_CharT, _Traits> __str,
        typename basic_string_view<_CharT, _Traits>::size_type __pos = 0,
        typename basic_string_view<_CharT, _Traits>::size_type __n   = basic_string_view<_CharT, _Traits>::npos,
        _CharT __zero                                                = _CharT('0'),
        _CharT __one                                                 = _CharT('1')) {
        if (__pos > __str.size())
            __throw_out_of_range("bitset string pos out of range");

        size_t __rlen = std::min(__n, __str.size() - __pos);
        __init_from_string_view(basic_string_view<_CharT, _Traits>(__str.data() + __pos, __rlen), __zero, __one);
    }
#endif
# 736 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
    template <class _CharT, class _Traits, class _Allocator>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 explicit bitset(
        const basic_string<_CharT, _Traits, _Allocator>& __str,
        typename basic_string<_CharT, _Traits, _Allocator>::size_type __pos = 0,
        typename basic_string<_CharT, _Traits, _Allocator>::size_type __n =
            basic_string<_CharT, _Traits, _Allocator>::npos,
        _CharT __zero = _CharT('0'),
        _CharT __one  = _CharT('1')) {
        if (__pos > __str.size())
            std::__throw_out_of_range("bitset string pos out of range");

        size_t __rlen = std::min(__n, __str.size() - __pos);
        __init_from_string_view(basic_string_view<_CharT, _Traits>(__str.data() + __pos, __rlen), __zero, __one);
    }

    // 23.3.5.2 bitset operations:
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bitset& operator&=(const bitset& __rhs) _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bitset& operator|=(const bitset& __rhs) _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bitset& operator^=(const bitset& __rhs) _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
    bitset& operator<<=(size_t __pos) _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
    bitset& operator>>=(size_t __pos) _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bitset& set() _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
    bitset& set(size_t __pos, bool __val = true);
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bitset& reset() _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
    bitset& reset(size_t __pos);
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bitset  operator~() const _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bitset& flip() _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
    bitset& flip(size_t __pos);

    // element access:
#ifdef _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR            bool operator[](size_t __p) const {return base::__make_ref(__p);}
#else
# 781 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference operator[](size_t __p) const {return base::__make_ref(__p);}
#endif
# 783 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 reference operator[](size_t __p)       {return base::__make_ref(__p);}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    unsigned long to_ulong() const;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    unsigned long long to_ullong() const;
    template <class _CharT, class _Traits, class _Allocator>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
        basic_string<_CharT, _Traits, _Allocator> to_string(_CharT __zero = _CharT('0'),
                                                            _CharT __one = _CharT('1')) const;
    template <class _CharT, class _Traits>
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
        basic_string<_CharT, _Traits, allocator<_CharT> > to_string(_CharT __zero = _CharT('0'),
                                                                    _CharT __one = _CharT('1')) const;
    template <class _CharT>
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
        basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > to_string(_CharT __zero = _CharT('0'),
                                                                                _CharT __one = _CharT('1')) const;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    basic_string<char, char_traits<char>, allocator<char> > to_string(char __zero = '0',
                                                                      char __one = '1') const;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    size_t count() const _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR size_t size() const _NOEXCEPT {return _Size;}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bool operator==(const bitset& __rhs) const _NOEXCEPT;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 809 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
    _LIBCPP_INLINE_VISIBILITY
    bool operator!=(const bitset& __rhs) const _NOEXCEPT;
#endif
# 812 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
    bool test(size_t __pos) const;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bool all() const _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bool any() const _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 bool none() const _NOEXCEPT {return !any();}
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bitset operator<<(size_t __pos) const _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
    bitset operator>>(size_t __pos) const _NOEXCEPT;

private:
    template <class _CharT, class _Traits>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
    __init_from_string_view(basic_string_view<_CharT, _Traits> __str, _CharT __zero, _CharT __one) {

        for (size_t __i = 0; __i < __str.size(); ++__i)
            if (!_Traits::eq(__str[__i], __zero) && !_Traits::eq(__str[__i], __one))
              std::__throw_invalid_argument("bitset string ctor has invalid argument");

        size_t __mp = std::min(__str.size(), _Size);
        size_t __i  = 0;
        for (; __i < __mp; ++__i) {
            _CharT __c   = __str[__mp - 1 - __i];
            (*this)[__i] = _Traits::eq(__c, __one);
        }
        std::fill(base::__make_iter(__i), base::__make_iter(_Size), false);
    }

    _LIBCPP_INLINE_VISIBILITY
    size_t __hash_code() const _NOEXCEPT {return base::__hash_code();}

    friend struct hash<bitset>;
};

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::operator&=(const bitset& __rhs) _NOEXCEPT
{
    base::operator&=(__rhs);
    return *this;
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::operator|=(const bitset& __rhs) _NOEXCEPT
{
    base::operator|=(__rhs);
    return *this;
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::operator^=(const bitset& __rhs) _NOEXCEPT
{
    base::operator^=(__rhs);
    return *this;
}

template <size_t _Size>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::operator<<=(size_t __pos) _NOEXCEPT
{
    __pos = _VSTD::min(__pos, _Size);
    _VSTD::copy_backward(base::__make_iter(0), base::__make_iter(_Size - __pos), base::__make_iter(_Size));
    _VSTD::fill_n(base::__make_iter(0), __pos, false);
    return *this;
}

template <size_t _Size>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::operator>>=(size_t __pos) _NOEXCEPT
{
    __pos = _VSTD::min(__pos, _Size);
    _VSTD::copy(base::__make_iter(__pos), base::__make_iter(_Size), base::__make_iter(0));
    _VSTD::fill_n(base::__make_iter(_Size - __pos), __pos, false);
    return *this;
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::set() _NOEXCEPT
{
    _VSTD::fill_n(base::__make_iter(0), _Size, true);
    return *this;
}

template <size_t _Size>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::set(size_t __pos, bool __val)
{
    if (__pos >= _Size)
        __throw_out_of_range("bitset set argument out of range");

    (*this)[__pos] = __val;
    return *this;
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::reset() _NOEXCEPT
{
    _VSTD::fill_n(base::__make_iter(0), _Size, false);
    return *this;
}

template <size_t _Size>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::reset(size_t __pos)
{
    if (__pos >= _Size)
        __throw_out_of_range("bitset reset argument out of range");

    (*this)[__pos] = false;
    return *this;
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>
bitset<_Size>::operator~() const _NOEXCEPT
{
    bitset __x(*this);
    __x.flip();
    return __x;
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::flip() _NOEXCEPT
{
    base::flip();
    return *this;
}

template <size_t _Size>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>&
bitset<_Size>::flip(size_t __pos)
{
    if (__pos >= _Size)
        __throw_out_of_range("bitset flip argument out of range");

    reference __r = base::__make_ref(__pos);
    __r = ~__r;
    return *this;
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
unsigned long
bitset<_Size>::to_ulong() const
{
    return base::to_ulong();
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
unsigned long long
bitset<_Size>::to_ullong() const
{
    return base::to_ullong();
}

template <size_t _Size>
template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
basic_string<_CharT, _Traits, _Allocator>
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
{
    basic_string<_CharT, _Traits, _Allocator> __r(_Size, __zero);
    for (size_t __i = 0; __i != _Size; ++__i)
    {
        if ((*this)[__i])
            __r[_Size - 1 - __i] = __one;
    }
    return __r;
}

template <size_t _Size>
template <class _CharT, class _Traits>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
basic_string<_CharT, _Traits, allocator<_CharT> >
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
{
    return to_string<_CharT, _Traits, allocator<_CharT> >(__zero, __one);
}

template <size_t _Size>
template <class _CharT>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
{
    return to_string<_CharT, char_traits<_CharT>, allocator<_CharT> >(__zero, __one);
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
basic_string<char, char_traits<char>, allocator<char> >
bitset<_Size>::to_string(char __zero, char __one) const
{
    return to_string<char, char_traits<char>, allocator<char> >(__zero, __one);
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
size_t
bitset<_Size>::count() const _NOEXCEPT
{
    return static_cast<size_t>(std::count(base::__make_iter(0), base::__make_iter(_Size), true));
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bool
bitset<_Size>::operator==(const bitset& __rhs) const _NOEXCEPT
{
    return _VSTD::equal(base::__make_iter(0), base::__make_iter(_Size), __rhs.__make_iter(0));
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1059 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI
bool
bitset<_Size>::operator!=(const bitset& __rhs) const _NOEXCEPT
{
    return !(*this == __rhs);
}

#endif
# 1070 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3

template <size_t _Size>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bool
bitset<_Size>::test(size_t __pos) const
{
    if (__pos >= _Size)
        __throw_out_of_range("bitset test argument out of range");

    return (*this)[__pos];
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bool
bitset<_Size>::all() const _NOEXCEPT
{
    return base::all();
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bool
bitset<_Size>::any() const _NOEXCEPT
{
    return base::any();
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>
bitset<_Size>::operator<<(size_t __pos) const _NOEXCEPT
{
    bitset __r = *this;
    __r <<= __pos;
    return __r;
}

template <size_t _Size>
inline
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>
bitset<_Size>::operator>>(size_t __pos) const _NOEXCEPT
{
    bitset __r = *this;
    __r >>= __pos;
    return __r;
}

template <size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>
operator&(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
{
    bitset<_Size> __r = __x;
    __r &= __y;
    return __r;
}

template <size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>
operator|(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
{
    bitset<_Size> __r = __x;
    __r |= __y;
    return __r;
}

template <size_t _Size>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23
bitset<_Size>
operator^(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
{
    bitset<_Size> __r = __x;
    __r ^= __y;
    return __r;
}

template <size_t _Size>
struct _LIBCPP_TEMPLATE_VIS hash<bitset<_Size> >
    : public __unary_function<bitset<_Size>, size_t>
{
    _LIBCPP_INLINE_VISIBILITY
    size_t operator()(const bitset<_Size>& __bs) const _NOEXCEPT
        {return __bs.__hash_code();}
};

template <class _CharT, class _Traits, size_t _Size>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x);

template <class _CharT, class _Traits, size_t _Size>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x);

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1174 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 1174 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 1175 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 1175 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 1176 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 1176 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
# 1177 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#endif
# 1178 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3

#endif // _LIBCPP_BITSET
# 1180 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/bitset" 3
#endif /* bitset expanded by -frewrite-includes */
# 179 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ios expanded by -frewrite-includes */
#include <ios>
#else /* ios expanded by -frewrite-includes */
# 179 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_IOS
#define _LIBCPP_IOS

/*
    ios synopsis

#include <iosfwd>

namespace std
{

typedef OFF_T streamoff;
typedef SZ_T streamsize;
template <class stateT> class fpos;

class ios_base
{
public:
    class failure;

    typedef T1 fmtflags;
    static constexpr fmtflags boolalpha;
    static constexpr fmtflags dec;
    static constexpr fmtflags fixed;
    static constexpr fmtflags hex;
    static constexpr fmtflags internal;
    static constexpr fmtflags left;
    static constexpr fmtflags oct;
    static constexpr fmtflags right;
    static constexpr fmtflags scientific;
    static constexpr fmtflags showbase;
    static constexpr fmtflags showpoint;
    static constexpr fmtflags showpos;
    static constexpr fmtflags skipws;
    static constexpr fmtflags unitbuf;
    static constexpr fmtflags uppercase;
    static constexpr fmtflags adjustfield;
    static constexpr fmtflags basefield;
    static constexpr fmtflags floatfield;

    typedef T2 iostate;
    static constexpr iostate badbit;
    static constexpr iostate eofbit;
    static constexpr iostate failbit;
    static constexpr iostate goodbit;

    typedef T3 openmode;
    static constexpr openmode app;
    static constexpr openmode ate;
    static constexpr openmode binary;
    static constexpr openmode in;
    static constexpr openmode out;
    static constexpr openmode trunc;

    typedef T4 seekdir;
    static constexpr seekdir beg;
    static constexpr seekdir cur;
    static constexpr seekdir end;

    class Init;

    // 27.5.2.2 fmtflags state:
    fmtflags flags() const;
    fmtflags flags(fmtflags fmtfl);
    fmtflags setf(fmtflags fmtfl);
    fmtflags setf(fmtflags fmtfl, fmtflags mask);
    void unsetf(fmtflags mask);

    streamsize precision() const;
    streamsize precision(streamsize prec);
    streamsize width() const;
    streamsize width(streamsize wide);

    // 27.5.2.3 locales:
    locale imbue(const locale& loc);
    locale getloc() const;

    // 27.5.2.5 storage:
    static int xalloc();
    long& iword(int index);
    void*& pword(int index);

    // destructor
    virtual ~ios_base();

    // 27.5.2.6 callbacks;
    enum event { erase_event, imbue_event, copyfmt_event };
    typedef void (*event_callback)(event, ios_base&, int index);
    void register_callback(event_callback fn, int index);

    ios_base(const ios_base&) = delete;
    ios_base& operator=(const ios_base&) = delete;

    static bool sync_with_stdio(bool sync = true);

protected:
    ios_base();
};

template <class charT, class traits = char_traits<charT> >
class basic_ios
    : public ios_base
{
public:
    // types:
    typedef charT char_type;
    typedef typename traits::int_type int_type;  // removed in C++17
    typedef typename traits::pos_type pos_type;  // removed in C++17
    typedef typename traits::off_type off_type;  // removed in C++17
    typedef traits traits_type;

    operator unspecified-bool-type() const;
    bool operator!() const;
    iostate rdstate() const;
    void clear(iostate state = goodbit);
    void setstate(iostate state);
    bool good() const;
    bool eof() const;
    bool fail() const;
    bool bad() const;

    iostate exceptions() const;
    void exceptions(iostate except);

    // 27.5.4.1 Constructor/destructor:
    explicit basic_ios(basic_streambuf<charT,traits>* sb);
    virtual ~basic_ios();

    // 27.5.4.2 Members:
    basic_ostream<charT,traits>* tie() const;
    basic_ostream<charT,traits>* tie(basic_ostream<charT,traits>* tiestr);

    basic_streambuf<charT,traits>* rdbuf() const;
    basic_streambuf<charT,traits>* rdbuf(basic_streambuf<charT,traits>* sb);

    basic_ios& copyfmt(const basic_ios& rhs);

    char_type fill() const;
    char_type fill(char_type ch);

    locale imbue(const locale& loc);

    char narrow(char_type c, char dfault) const;
    char_type widen(char c) const;

    basic_ios(const basic_ios& ) = delete;
    basic_ios& operator=(const basic_ios&) = delete;

protected:
    basic_ios();
    void init(basic_streambuf<charT,traits>* sb);
    void move(basic_ios& rhs);
    void swap(basic_ios& rhs) noexcept;
    void set_rdbuf(basic_streambuf<charT, traits>* sb);
};

// 27.5.5, manipulators:
ios_base& boolalpha (ios_base& str);
ios_base& noboolalpha(ios_base& str);
ios_base& showbase (ios_base& str);
ios_base& noshowbase (ios_base& str);
ios_base& showpoint (ios_base& str);
ios_base& noshowpoint(ios_base& str);
ios_base& showpos (ios_base& str);
ios_base& noshowpos (ios_base& str);
ios_base& skipws (ios_base& str);
ios_base& noskipws (ios_base& str);
ios_base& uppercase (ios_base& str);
ios_base& nouppercase(ios_base& str);
ios_base& unitbuf (ios_base& str);
ios_base& nounitbuf (ios_base& str);

// 27.5.5.2 adjustfield:
ios_base& internal (ios_base& str);
ios_base& left (ios_base& str);
ios_base& right (ios_base& str);

// 27.5.5.3 basefield:
ios_base& dec (ios_base& str);
ios_base& hex (ios_base& str);
ios_base& oct (ios_base& str);

// 27.5.5.4 floatfield:
ios_base& fixed (ios_base& str);
ios_base& scientific (ios_base& str);
ios_base& hexfloat (ios_base& str);
ios_base& defaultfloat(ios_base& str);

// 27.5.5.5 error reporting:
enum class io_errc
{
    stream = 1
};

concept_map ErrorCodeEnum<io_errc> { };
error_code make_error_code(io_errc e) noexcept;
error_condition make_error_condition(io_errc e) noexcept;
storage-class-specifier const error_category& iostream_category() noexcept;

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_NO_LOCALIZATION)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#   error "The iostreams library is not supported since libc++ has been configured without support for localization."
#endif
# 218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 219 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/ios.h>
#endif /* expanded by -frewrite-includes */
# 220 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 221 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ios/fpos.h>
#endif /* expanded by -frewrite-includes */
# 221 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 222 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __locale expanded by -frewrite-includes */
#include <__locale>
#else /* __locale expanded by -frewrite-includes */
# 222 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___LOCALE
#define _LIBCPP___LOCALE

#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/shared_ptr.h> // __shared_count
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* once_flag.h expanded by -frewrite-includes */
#include <__mutex/once_flag.h>
#else /* once_flag.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MUTEX_ONCE_FLAG_H
#define _LIBCPP___MUTEX_ONCE_FLAG_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/shared_ptr.h> // __libcpp_acquire_load
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_indices.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tuple/tuple_size.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
#ifndef _LIBCPP_CXX03_LANG
#if 0 /* expanded by -frewrite-includes */
#  include <tuple>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

struct _LIBCPP_TEMPLATE_VIS once_flag;

#ifndef _LIBCPP_CXX03_LANG

template <class _Callable, class... _Args>
_LIBCPP_HIDE_FROM_ABI void call_once(once_flag&, _Callable&&, _Args&&...);

#else // _LIBCPP_CXX03_LANG
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3

template <class _Callable>
_LIBCPP_HIDE_FROM_ABI void call_once(once_flag&, _Callable&);

template <class _Callable>
_LIBCPP_HIDE_FROM_ABI void call_once(once_flag&, const _Callable&);

#endif // _LIBCPP_CXX03_LANG
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3

struct _LIBCPP_TEMPLATE_VIS once_flag {
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR once_flag() _NOEXCEPT : __state_(_Unset) {}
  once_flag(const once_flag&)            = delete;
  once_flag& operator=(const once_flag&) = delete;

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_ABI_MICROSOFT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
  typedef uintptr_t _State_type;
#else
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
  typedef unsigned long _State_type;
#endif
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3

  static const _State_type _Unset    = 0;
  static const _State_type _Pending  = 1;
  static const _State_type _Complete = ~_State_type(0);

private:
  _State_type __state_;

#ifndef _LIBCPP_CXX03_LANG
  template <class _Callable, class... _Args>
  friend void call_once(once_flag&, _Callable&&, _Args&&...);
#else  // _LIBCPP_CXX03_LANG
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
  template <class _Callable>
  friend void call_once(once_flag&, _Callable&);

  template <class _Callable>
  friend void call_once(once_flag&, const _Callable&);
#endif // _LIBCPP_CXX03_LANG
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
};

#ifndef _LIBCPP_CXX03_LANG

template <class _Fp>
class __call_once_param {
  _Fp& __f_;

public:
  _LIBCPP_HIDE_FROM_ABI explicit __call_once_param(_Fp& __f) : __f_(__f) {}

  _LIBCPP_HIDE_FROM_ABI void operator()() {
    typedef typename __make_tuple_indices<tuple_size<_Fp>::value, 1>::type _Index;
    __execute(_Index());
  }

private:
  template <size_t... _Indices>
  _LIBCPP_HIDE_FROM_ABI void __execute(__tuple_indices<_Indices...>) {
    _VSTD::__invoke(_VSTD::get<0>(_VSTD::move(__f_)), _VSTD::get<_Indices>(_VSTD::move(__f_))...);
  }
};

#else
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3

template <class _Fp>
class __call_once_param {
  _Fp& __f_;

public:
  _LIBCPP_HIDE_FROM_ABI explicit __call_once_param(_Fp& __f) : __f_(__f) {}

  _LIBCPP_HIDE_FROM_ABI void operator()() { __f_(); }
};

#endif
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3

template <class _Fp>
void _LIBCPP_HIDE_FROM_ABI __call_once_proxy(void* __vp) {
  __call_once_param<_Fp>* __p = static_cast<__call_once_param<_Fp>*>(__vp);
  (*__p)();
}

_LIBCPP_EXPORTED_FROM_ABI void __call_once(volatile once_flag::_State_type&, void*, void (*)(void*));

#ifndef _LIBCPP_CXX03_LANG

template <class _Callable, class... _Args>
inline _LIBCPP_HIDE_FROM_ABI void call_once(once_flag& __flag, _Callable&& __func, _Args&&... __args) {
  if (__libcpp_acquire_load(&__flag.__state_) != once_flag::_Complete) {
    typedef tuple<_Callable&&, _Args&&...> _Gp;
    _Gp __f(_VSTD::forward<_Callable>(__func), _VSTD::forward<_Args>(__args)...);
    __call_once_param<_Gp> __p(__f);
    std::__call_once(__flag.__state_, &__p, &__call_once_proxy<_Gp>);
  }
}

#else // _LIBCPP_CXX03_LANG
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3

template <class _Callable>
inline _LIBCPP_HIDE_FROM_ABI void call_once(once_flag& __flag, _Callable& __func) {
  if (__libcpp_acquire_load(&__flag.__state_) != once_flag::_Complete) {
    __call_once_param<_Callable> __p(__func);
    std::__call_once(__flag.__state_, &__p, &__call_once_proxy<_Callable>);
  }
}

template <class _Callable>
inline _LIBCPP_HIDE_FROM_ABI void call_once(once_flag& __flag, const _Callable& __func) {
  if (__libcpp_acquire_load(&__flag.__state_) != once_flag::_Complete) {
    __call_once_param<const _Callable> __p(__func);
    std::__call_once(__flag.__state_, &__p, &__call_once_proxy<const _Callable>);
  }
}

#endif // _LIBCPP_CXX03_LANG
# 151 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MUTEX_ONCE_FLAG_H
# 155 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/once_flag.h" 3
#endif /* once_flag.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <cctype>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* clocale expanded by -frewrite-includes */
#include <clocale>
#else /* clocale expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/clocale" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CLOCALE
#define _LIBCPP_CLOCALE

/*
    clocale synopsis

Macros:

    LC_ALL
    LC_COLLATE
    LC_CTYPE
    LC_MONETARY
    LC_NUMERIC
    LC_TIME
    NULL

namespace std
{

struct lconv;
char* setlocale(int category, const char* locale);
lconv* localeconv();

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/clocale" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/clocale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/clocale" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/clocale" 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* locale.h expanded by -frewrite-includes */
#include <locale.h>
#else /* locale.h expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/clocale" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_LOCALE_H
#define _LIBCPP_LOCALE_H

/*
    locale.h synopsis

Macros:

    LC_ALL
    LC_COLLATE
    LC_CTYPE
    LC_MONETARY
    LC_NUMERIC
    LC_TIME

Types:

    lconv

Functions:

   setlocale
   localeconv

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_NO_LOCALIZATION)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale.h" 3
#   error "<locale.h> is not supported since libc++ has been configured without support for localization."
#endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale.h" 3
#endif
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale.h" 3

#if 0 /* disabled by -frewrite-includes */
#if __has_include_next(<locale.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* locale.h expanded by -frewrite-includes */
#  include_next <locale.h>
#else /* locale.h expanded by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale.h" 3
# 1 "gen/zircon/public/sysroot/cpp/include/locale.h" 1 3 4
#ifndef SYSROOT_LOCALE_H_
#define SYSROOT_LOCALE_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/locale.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/locale.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/locale.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <bits/null.h>
#endif /* expanded by -frewrite-includes */
# 10 "gen/zircon/public/sysroot/cpp/include/locale.h" 3 4
# 11 "gen/zircon/public/sysroot/cpp/include/locale.h" 3 4

#define LC_CTYPE 0
#define LC_NUMERIC 1
#define LC_TIME 2
#define LC_COLLATE 3
#define LC_MONETARY 4
#define LC_MESSAGES 5
#define LC_ALL 6

struct lconv {
  char* decimal_point;
  char* thousands_sep;
  char* grouping;

  char* int_curr_symbol;
  char* currency_symbol;
  char* mon_decimal_point;
  char* mon_thousands_sep;
  char* mon_grouping;
  char* positive_sign;
  char* negative_sign;
  char int_frac_digits;
  char frac_digits;
  char p_cs_precedes;
  char p_sep_by_space;
  char n_cs_precedes;
  char n_sep_by_space;
  char p_sign_posn;
  char n_sign_posn;
  char int_p_cs_precedes;
  char int_p_sep_by_space;
  char int_n_cs_precedes;
  char int_n_sep_by_space;
  char int_p_sign_posn;
  char int_n_sign_posn;
};

char* setlocale(int, const char*);
struct lconv* localeconv(void);

#if 0 /* disabled by -frewrite-includes */
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
    defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/locale.h" 3 4

#define __NEED_locale_t

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 56 "gen/zircon/public/sysroot/cpp/include/locale.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 57 "gen/zircon/public/sysroot/cpp/include/locale.h" 2 3 4

#define LC_GLOBAL_LOCALE ((locale_t)-1)

#define LC_CTYPE_MASK (1 << LC_CTYPE)
#define LC_NUMERIC_MASK (1 << LC_NUMERIC)
#define LC_TIME_MASK (1 << LC_TIME)
#define LC_COLLATE_MASK (1 << LC_COLLATE)
#define LC_MONETARY_MASK (1 << LC_MONETARY)
#define LC_MESSAGES_MASK (1 << LC_MESSAGES)
#define LC_ALL_MASK 0x7fffffff

locale_t duplocale(locale_t);
void freelocale(locale_t);
locale_t newlocale(int, const char*, locale_t);
locale_t uselocale(locale_t);

#endif
# 74 "gen/zircon/public/sysroot/cpp/include/locale.h" 3 4

#ifdef __cplusplus
}
#endif
# 78 "gen/zircon/public/sysroot/cpp/include/locale.h" 3 4

#endif  // SYSROOT_LOCALE_H_
# 80 "gen/zircon/public/sysroot/cpp/include/locale.h" 3 4
#endif /* locale.h expanded by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale.h" 2 3
#endif
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale.h" 3

#endif // _LIBCPP_LOCALE_H
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale.h" 3
#endif /* locale.h expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/clocale" 2 3

#ifndef _LIBCPP_LOCALE_H
#   error <clocale> tried including <locale.h> but didn't find libc++'s <locale.h> header. \
          This usually means that your header search paths are not configured properly. \
          The header search paths should contain the C++ Standard Library headers before \
          any C Standard Library, and you are probably using compiler flags that make that \
          not be the case.
#endif
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/clocale" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/clocale" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/clocale" 3
#endif
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/clocale" 3

_LIBCPP_BEGIN_NAMESPACE_STD

using ::lconv _LIBCPP_USING_IF_EXISTS;
using ::setlocale _LIBCPP_USING_IF_EXISTS;
using ::localeconv _LIBCPP_USING_IF_EXISTS;

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_CLOCALE
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/clocale" 3
#endif /* clocale expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <string>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

// Some platforms require more includes than others. Keep the includes on all plaforms for now.
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstring>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
#if 0 /* expanded by -frewrite-includes */
#  include <cwchar>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#else
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* expanded by -frewrite-includes */
#  include <__std_mbstate_t.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_MSVCRT_LIKE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* expanded by -frewrite-includes */
# include <__support/win32/locale_win32.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_AIX) || defined(__MVS__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* expanded by -frewrite-includes */
# include <__support/ibm/xlocale.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__ANDROID__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* expanded by -frewrite-includes */
# include <__support/android/locale_bionic.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_NEWLIB_VERSION)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* expanded by -frewrite-includes */
# include <__support/newlib/xlocale.h>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__OpenBSD__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* expanded by -frewrite-includes */
# include <__support/openbsd/xlocale.h>
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif (defined(__APPLE__) || defined(__FreeBSD__))
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* expanded by -frewrite-includes */
# include <xlocale.h>
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__Fuchsia__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* xlocale.h expanded by -frewrite-includes */
# include <__support/fuchsia/xlocale.h>
#else /* xlocale.h expanded by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/fuchsia/xlocale.h" 1 3
// -*- C++ -*-
//===-----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___SUPPORT_FUCHSIA_XLOCALE_H
#define _LIBCPP___SUPPORT_FUCHSIA_XLOCALE_H

#if 0 /* disabled by -frewrite-includes */
#if defined(__Fuchsia__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/fuchsia/xlocale.h" 3

#if 0 /* expanded by -frewrite-includes */
#include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/fuchsia/xlocale.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/fuchsia/xlocale.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cwchar>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/fuchsia/xlocale.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/fuchsia/xlocale.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __posix_l_fallback.h expanded by -frewrite-includes */
#include <__support/xlocale/__posix_l_fallback.h>
#else /* __posix_l_fallback.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/fuchsia/xlocale.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__posix_l_fallback.h" 1 3
// -*- C++ -*-
//===-----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// These are reimplementations of some extended locale functions ( *_l ) that
// are normally part of POSIX.  This shared implementation provides parts of the
// extended locale support for libc's that normally don't have any (like
// Android's bionic and Newlib).
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___SUPPORT_XLOCALE_POSIX_L_FALLBACK_H
#define _LIBCPP___SUPPORT_XLOCALE_POSIX_L_FALLBACK_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__posix_l_fallback.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__posix_l_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <ctype.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__posix_l_fallback.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__posix_l_fallback.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <time.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__posix_l_fallback.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__posix_l_fallback.h" 3

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
#if 0 /* expanded by -frewrite-includes */
#  include <wctype.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__posix_l_fallback.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__posix_l_fallback.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__posix_l_fallback.h" 3

#ifdef __cplusplus
extern "C" {
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__posix_l_fallback.h" 3

inline _LIBCPP_HIDE_FROM_ABI_C int isalnum_l(int __c, locale_t) { return ::isalnum(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int isalpha_l(int __c, locale_t) { return ::isalpha(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int isblank_l(int __c, locale_t) { return ::isblank(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int iscntrl_l(int __c, locale_t) { return ::iscntrl(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int isdigit_l(int __c, locale_t) { return ::isdigit(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int isgraph_l(int __c, locale_t) { return ::isgraph(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int islower_l(int __c, locale_t) { return ::islower(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int isprint_l(int __c, locale_t) { return ::isprint(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int ispunct_l(int __c, locale_t) { return ::ispunct(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int isspace_l(int __c, locale_t) { return ::isspace(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int isupper_l(int __c, locale_t) { return ::isupper(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int isxdigit_l(int __c, locale_t) { return ::isxdigit(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int toupper_l(int __c, locale_t) { return ::toupper(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int tolower_l(int __c, locale_t) { return ::tolower(__c); }

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI_C int iswalnum_l(wint_t __c, locale_t) { return ::iswalnum(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int iswalpha_l(wint_t __c, locale_t) { return ::iswalpha(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int iswblank_l(wint_t __c, locale_t) { return ::iswblank(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int iswcntrl_l(wint_t __c, locale_t) { return ::iswcntrl(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int iswdigit_l(wint_t __c, locale_t) { return ::iswdigit(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int iswgraph_l(wint_t __c, locale_t) { return ::iswgraph(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int iswlower_l(wint_t __c, locale_t) { return ::iswlower(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int iswprint_l(wint_t __c, locale_t) { return ::iswprint(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int iswpunct_l(wint_t __c, locale_t) { return ::iswpunct(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int iswspace_l(wint_t __c, locale_t) { return ::iswspace(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int iswupper_l(wint_t __c, locale_t) { return ::iswupper(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C int iswxdigit_l(wint_t __c, locale_t) { return ::iswxdigit(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C wint_t towupper_l(wint_t __c, locale_t) { return ::towupper(__c); }

inline _LIBCPP_HIDE_FROM_ABI_C wint_t towlower_l(wint_t __c, locale_t) { return ::towlower(__c); }
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__posix_l_fallback.h" 3

inline _LIBCPP_HIDE_FROM_ABI_C int strcoll_l(const char* __s1, const char* __s2, locale_t) {
  return ::strcoll(__s1, __s2);
}

inline _LIBCPP_HIDE_FROM_ABI_C size_t strxfrm_l(char* __dest, const char* __src, size_t __n, locale_t) {
  return ::strxfrm(__dest, __src, __n);
}

inline _LIBCPP_HIDE_FROM_ABI_C size_t
strftime_l(char* __s, size_t __max, const char* __format, const struct tm* __tm, locale_t) {
  return ::strftime(__s, __max, __format, __tm);
}

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI_C int wcscoll_l(const wchar_t* __ws1, const wchar_t* __ws2, locale_t) {
  return ::wcscoll(__ws1, __ws2);
}

inline _LIBCPP_HIDE_FROM_ABI_C size_t wcsxfrm_l(wchar_t* __dest, const wchar_t* __src, size_t __n, locale_t) {
  return ::wcsxfrm(__dest, __src, __n);
}
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__posix_l_fallback.h" 3

#ifdef __cplusplus
}
#endif
# 114 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__posix_l_fallback.h" 3

#endif // _LIBCPP___SUPPORT_XLOCALE_POSIX_L_FALLBACK_H
# 116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__posix_l_fallback.h" 3
#endif /* __posix_l_fallback.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/fuchsia/xlocale.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __strtonum_fallback.h expanded by -frewrite-includes */
#include <__support/xlocale/__strtonum_fallback.h>
#else /* __strtonum_fallback.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/fuchsia/xlocale.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__strtonum_fallback.h" 1 3
// -*- C++ -*-
//===-----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// These are reimplementations of some extended locale functions ( *_l ) that
// aren't part of POSIX.  They are widely available though (GLIBC, BSD, maybe
// others).  The unifying aspect in this case is that all of these functions
// convert strings to some numeric type.
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___SUPPORT_XLOCALE_STRTONUM_FALLBACK_H
#define _LIBCPP___SUPPORT_XLOCALE_STRTONUM_FALLBACK_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__strtonum_fallback.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__strtonum_fallback.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdlib.h expanded by -frewrite-includes */
#include <stdlib.h>
#else /* stdlib.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__strtonum_fallback.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_malloc_and_calloc)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 11 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* expanded by -frewrite-includes */
#include_next <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_STDLIB_H)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#define _LIBCPP_STDLIB_H

/*
    stdlib.h synopsis

Macros:

    EXIT_FAILURE
    EXIT_SUCCESS
    MB_CUR_MAX
    NULL
    RAND_MAX

Types:

    size_t
    div_t
    ldiv_t
    lldiv_t                                                               // C99

double    atof (const char* nptr);
int       atoi (const char* nptr);
long      atol (const char* nptr);
long long atoll(const char* nptr);                                        // C99
double             strtod  (const char* restrict nptr, char** restrict endptr);
float              strtof  (const char* restrict nptr, char** restrict endptr); // C99
long double        strtold (const char* restrict nptr, char** restrict endptr); // C99
long               strtol  (const char* restrict nptr, char** restrict endptr, int base);
long long          strtoll (const char* restrict nptr, char** restrict endptr, int base); // C99
unsigned long      strtoul (const char* restrict nptr, char** restrict endptr, int base);
unsigned long long strtoull(const char* restrict nptr, char** restrict endptr, int base); // C99
int rand(void);
void srand(unsigned int seed);
void* calloc(size_t nmemb, size_t size);
void free(void* ptr);
void* malloc(size_t size);
void* realloc(void* ptr, size_t size);
void abort(void);
int atexit(void (*func)(void));
void exit(int status);
void _Exit(int status);
char* getenv(const char* name);
int system(const char* string);
void* bsearch(const void* key, const void* base, size_t nmemb, size_t size,
              int (*compar)(const void *, const void *));
void qsort(void* base, size_t nmemb, size_t size,
           int (*compar)(const void *, const void *));
int         abs(      int j);
long        abs(     long j);
long long   abs(long long j);                                             // C++0X
long       labs(     long j);
long long llabs(long long j);                                             // C99
div_t     div(      int numer,       int denom);
ldiv_t    div(     long numer,      long denom);
lldiv_t   div(long long numer, long long denom);                          // C++0X
ldiv_t   ldiv(     long numer,      long denom);
lldiv_t lldiv(long long numer, long long denom);                          // C99
int mblen(const char* s, size_t n);
int mbtowc(wchar_t* restrict pwc, const char* restrict s, size_t n);
int wctomb(char* s, wchar_t wchar);
size_t mbstowcs(wchar_t* restrict pwcs, const char* restrict s, size_t n);
size_t wcstombs(char* restrict s, const wchar_t* restrict pwcs, size_t n);
int at_quick_exit(void (*func)(void))                                     // C++11
void quick_exit(int status);                                              // C++11
void *aligned_alloc(size_t alignment, size_t size);                       // C11

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<stdlib.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#if 0 /* expanded by -frewrite-includes */
#    include_next <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#  endif
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#ifdef __cplusplus
extern "C++" {
// abs

#ifdef abs
# undef abs
#endif
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef labs
# undef labs
#endif
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef llabs
# undef llabs
#endif
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

// MSVCRT already has the correct prototype in <stdlib.h> if __cplusplus is defined
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_MSVCRT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long abs(long __x) _NOEXCEPT {
  return __builtin_labs(__x);
}
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {
  return __builtin_llabs(__x);
}
#endif // !defined(_LIBCPP_MSVCRT)
# 120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY float abs(float __lcpp_x) _NOEXCEPT {
  return __builtin_fabsf(__lcpp_x); // Use builtins to prevent needing math.h
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY double abs(double __lcpp_x) _NOEXCEPT {
  return __builtin_fabs(__lcpp_x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long double
abs(long double __lcpp_x) _NOEXCEPT {
  return __builtin_fabsl(__lcpp_x);
}

// div

#ifdef div
# undef div
#endif
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef ldiv
# undef ldiv
#endif
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef lldiv
# undef lldiv
#endif
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

// MSVCRT already has the correct prototype in <stdlib.h> if __cplusplus is defined
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_MSVCRT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
  return ::ldiv(__x, __y);
}
#if 0 /* disabled by -frewrite-includes */
#if !(defined(__FreeBSD__) && !defined(__LONG_LONG_SUPPORTED))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,
                                             long long __y) _NOEXCEPT {
  return ::lldiv(__x, __y);
}
#endif
# 157 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif // _LIBCPP_MSVCRT
# 158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
} // extern "C++"
#endif // __cplusplus
# 160 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#endif // _LIBCPP_STDLIB_H
# 162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif /* stdlib.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__strtonum_fallback.h" 2 3

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* wchar.h expanded by -frewrite-includes */
#  include <wchar.h>
#else /* wchar.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__strtonum_fallback.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_wint_t) || defined(__need_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 11 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#endif
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#if 0 /* expanded by -frewrite-includes */
#include_next <wchar.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_WCHAR_H)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#define _LIBCPP_WCHAR_H

/*
    wchar.h synopsis

Macros:

    NULL
    WCHAR_MAX
    WCHAR_MIN
    WEOF

Types:

    mbstate_t
    size_t
    tm
    wint_t

int fwprintf(FILE* restrict stream, const wchar_t* restrict format, ...);
int fwscanf(FILE* restrict stream, const wchar_t* restrict format, ...);
int swprintf(wchar_t* restrict s, size_t n, const wchar_t* restrict format, ...);
int swscanf(const wchar_t* restrict s, const wchar_t* restrict format, ...);
int vfwprintf(FILE* restrict stream, const wchar_t* restrict format, va_list arg);
int vfwscanf(FILE* restrict stream, const wchar_t* restrict format, va_list arg);  // C99
int vswprintf(wchar_t* restrict s, size_t n, const wchar_t* restrict format, va_list arg);
int vswscanf(const wchar_t* restrict s, const wchar_t* restrict format, va_list arg);  // C99
int vwprintf(const wchar_t* restrict format, va_list arg);
int vwscanf(const wchar_t* restrict format, va_list arg);  // C99
int wprintf(const wchar_t* restrict format, ...);
int wscanf(const wchar_t* restrict format, ...);
wint_t fgetwc(FILE* stream);
wchar_t* fgetws(wchar_t* restrict s, int n, FILE* restrict stream);
wint_t fputwc(wchar_t c, FILE* stream);
int fputws(const wchar_t* restrict s, FILE* restrict stream);
int fwide(FILE* stream, int mode);
wint_t getwc(FILE* stream);
wint_t getwchar();
wint_t putwc(wchar_t c, FILE* stream);
wint_t putwchar(wchar_t c);
wint_t ungetwc(wint_t c, FILE* stream);
double wcstod(const wchar_t* restrict nptr, wchar_t** restrict endptr);
float wcstof(const wchar_t* restrict nptr, wchar_t** restrict endptr);         // C99
long double wcstold(const wchar_t* restrict nptr, wchar_t** restrict endptr);  // C99
long wcstol(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
long long wcstoll(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);  // C99
unsigned long wcstoul(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
unsigned long long wcstoull(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);  // C99
wchar_t* wcscpy(wchar_t* restrict s1, const wchar_t* restrict s2);
wchar_t* wcsncpy(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
wchar_t* wcscat(wchar_t* restrict s1, const wchar_t* restrict s2);
wchar_t* wcsncat(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
int wcscmp(const wchar_t* s1, const wchar_t* s2);
int wcscoll(const wchar_t* s1, const wchar_t* s2);
int wcsncmp(const wchar_t* s1, const wchar_t* s2, size_t n);
size_t wcsxfrm(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
const wchar_t* wcschr(const wchar_t* s, wchar_t c);
      wchar_t* wcschr(      wchar_t* s, wchar_t c);
size_t wcscspn(const wchar_t* s1, const wchar_t* s2);
size_t wcslen(const wchar_t* s);
const wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2);
      wchar_t* wcspbrk(      wchar_t* s1, const wchar_t* s2);
const wchar_t* wcsrchr(const wchar_t* s, wchar_t c);
      wchar_t* wcsrchr(      wchar_t* s, wchar_t c);
size_t wcsspn(const wchar_t* s1, const wchar_t* s2);
const wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2);
      wchar_t* wcsstr(      wchar_t* s1, const wchar_t* s2);
wchar_t* wcstok(wchar_t* restrict s1, const wchar_t* restrict s2, wchar_t** restrict ptr);
const wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);
      wchar_t* wmemchr(      wchar_t* s, wchar_t c, size_t n);
int wmemcmp(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
wchar_t* wmemcpy(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
wchar_t* wmemmove(wchar_t* s1, const wchar_t* s2, size_t n);
wchar_t* wmemset(wchar_t* s, wchar_t c, size_t n);
size_t wcsftime(wchar_t* restrict s, size_t maxsize, const wchar_t* restrict format,
                const tm* restrict timeptr);
wint_t btowc(int c);
int wctob(wint_t c);
int mbsinit(const mbstate_t* ps);
size_t mbrlen(const char* restrict s, size_t n, mbstate_t* restrict ps);
size_t mbrtowc(wchar_t* restrict pwc, const char* restrict s, size_t n, mbstate_t* restrict ps);
size_t wcrtomb(char* restrict s, wchar_t wc, mbstate_t* restrict ps);
size_t mbsrtowcs(wchar_t* restrict dst, const char** restrict src, size_t len,
                 mbstate_t* restrict ps);
size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
                 mbstate_t* restrict ps);

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <stddef.h>
#endif /* expanded by -frewrite-includes */
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#   error "The <wchar.h> header is not supported since libc++ has been configured with LIBCXX_ENABLE_WIDE_CHARACTERS disabled"
#endif
# 114 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#endif
# 118 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

// We define this here to support older versions of glibc <wchar.h> that do
// not define this for clang.
#ifdef __cplusplus
#define __CORRECT_ISO_CPP_WCHAR_H_PROTO
#endif
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<wchar.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if 0 /* expanded by -frewrite-includes */
#    include_next <wchar.h>
#endif /* expanded by -frewrite-includes */
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
# 127 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#  else
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if 0 /* expanded by -frewrite-includes */
#    include <__mbstate_t.h> // make sure we have mbstate_t regardless of the existence of <wchar.h>
#endif /* expanded by -frewrite-includes */
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
# 129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#  endif
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

// Determine whether we have const-correct overloads for wcschr and friends.
#if 0 /* disabled by -frewrite-includes */
#if defined(_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#  define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__GLIBC_PREREQ)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if 0 /* disabled by -frewrite-includes */
#  if __GLIBC_PREREQ(2, 10)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#    define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
#  endif
# 138 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_LIBCPP_MSVCRT)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#if 0 /* disabled by -frewrite-includes */
#  if defined(_CRT_CONST_CORRECT_OVERLOADS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 140 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#    define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
#  endif
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#endif
# 143 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(_LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS) && defined(_LIBCPP_PREFERRED_OVERLOAD)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
extern "C++" {
inline _LIBCPP_INLINE_VISIBILITY
wchar_t* __libcpp_wcschr(const wchar_t* __s, wchar_t __c) {return (wchar_t*)wcschr(__s, __c);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
const wchar_t* wcschr(const wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
      wchar_t* wcschr(      wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);}

inline _LIBCPP_INLINE_VISIBILITY
wchar_t* __libcpp_wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcspbrk(__s1, __s2);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
const wchar_t* wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcspbrk(__s1, __s2);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
      wchar_t* wcspbrk(      wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcspbrk(__s1, __s2);}

inline _LIBCPP_INLINE_VISIBILITY
wchar_t* __libcpp_wcsrchr(const wchar_t* __s, wchar_t __c) {return (wchar_t*)wcsrchr(__s, __c);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
const wchar_t* wcsrchr(const wchar_t* __s, wchar_t __c) {return __libcpp_wcsrchr(__s, __c);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
      wchar_t* wcsrchr(      wchar_t* __s, wchar_t __c) {return __libcpp_wcsrchr(__s, __c);}

inline _LIBCPP_INLINE_VISIBILITY
wchar_t* __libcpp_wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcsstr(__s1, __s2);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
const wchar_t* wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcsstr(__s1, __s2);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
      wchar_t* wcsstr(      wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcsstr(__s1, __s2);}

inline _LIBCPP_INLINE_VISIBILITY
wchar_t* __libcpp_wmemchr(const wchar_t* __s, wchar_t __c, size_t __n) {return (wchar_t*)wmemchr(__s, __c, __n);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
const wchar_t* wmemchr(const wchar_t* __s, wchar_t __c, size_t __n) {return __libcpp_wmemchr(__s, __c, __n);}
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
      wchar_t* wmemchr(      wchar_t* __s, wchar_t __c, size_t __n) {return __libcpp_wmemchr(__s, __c, __n);}
}
#endif
# 182 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && (defined(_LIBCPP_MSVCRT_LIKE) || defined(__MVS__))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 184 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
extern "C" {
size_t mbsnrtowcs(wchar_t *__restrict __dst, const char **__restrict __src,
                  size_t __nmc, size_t __len, mbstate_t *__restrict __ps);
size_t wcsnrtombs(char *__restrict __dst, const wchar_t **__restrict __src,
                  size_t __nwc, size_t __len, mbstate_t *__restrict __ps);
} // extern "C"
#endif  // __cplusplus && (_LIBCPP_MSVCRT || __MVS__)
# 191 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3

#endif // _LIBCPP_WCHAR_H
# 193 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/wchar.h" 3
#endif /* wchar.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__strtonum_fallback.h" 2 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__strtonum_fallback.h" 3

#ifdef __cplusplus
extern "C" {
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__strtonum_fallback.h" 3

inline _LIBCPP_HIDE_FROM_ABI_C float strtof_l(const char* __nptr, char** __endptr, locale_t) {
  return ::strtof(__nptr, __endptr);
}

inline _LIBCPP_HIDE_FROM_ABI_C double strtod_l(const char* __nptr, char** __endptr, locale_t) {
  return ::strtod(__nptr, __endptr);
}

inline _LIBCPP_HIDE_FROM_ABI_C long double strtold_l(const char* __nptr, char** __endptr, locale_t) {
  return ::strtold(__nptr, __endptr);
}

inline _LIBCPP_HIDE_FROM_ABI_C long long strtoll_l(const char* __nptr, char** __endptr, int __base, locale_t) {
  return ::strtoll(__nptr, __endptr, __base);
}

inline _LIBCPP_HIDE_FROM_ABI_C unsigned long long
strtoull_l(const char* __nptr, char** __endptr, int __base, locale_t) {
  return ::strtoull(__nptr, __endptr, __base);
}

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI_C long long wcstoll_l(const wchar_t* __nptr, wchar_t** __endptr, int __base, locale_t) {
  return ::wcstoll(__nptr, __endptr, __base);
}

inline _LIBCPP_HIDE_FROM_ABI_C unsigned long long
wcstoull_l(const wchar_t* __nptr, wchar_t** __endptr, int __base, locale_t) {
  return ::wcstoull(__nptr, __endptr, __base);
}

inline _LIBCPP_HIDE_FROM_ABI_C long double wcstold_l(const wchar_t* __nptr, wchar_t** __endptr, locale_t) {
  return ::wcstold(__nptr, __endptr);
}
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__strtonum_fallback.h" 3

#ifdef __cplusplus
}
#endif
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__strtonum_fallback.h" 3

#endif // _LIBCPP___SUPPORT_XLOCALE_STRTONUM_FALLBACK_H
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/xlocale/__strtonum_fallback.h" 3
#endif /* __strtonum_fallback.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/fuchsia/xlocale.h" 2 3

#endif // defined(__Fuchsia__)
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/fuchsia/xlocale.h" 3

#endif // _LIBCPP___SUPPORT_FUCHSIA_XLOCALE_H
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__support/fuchsia/xlocale.h" 3
#endif /* xlocale.h expanded by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 2 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__wasi__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
// WASI libc uses musl's locales support.
#if 0 /* expanded by -frewrite-includes */
# include <__support/musl/xlocale.h>
#endif /* expanded by -frewrite-includes */
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_LIBCPP_HAS_MUSL_LIBC)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* expanded by -frewrite-includes */
# include <__support/musl/xlocale.h>
#endif /* expanded by -frewrite-includes */
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#endif
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#endif
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

_LIBCPP_BEGIN_NAMESPACE_STD

class _LIBCPP_EXPORTED_FROM_ABI locale;

template <class _Facet>
_LIBCPP_INLINE_VISIBILITY
bool
has_facet(const locale&) _NOEXCEPT;

template <class _Facet>
_LIBCPP_INLINE_VISIBILITY
const _Facet&
use_facet(const locale&);

class _LIBCPP_EXPORTED_FROM_ABI locale
{
public:
    // types:
    class _LIBCPP_EXPORTED_FROM_ABI facet;
    class _LIBCPP_EXPORTED_FROM_ABI id;

    typedef int category;
    _LIBCPP_AVAILABILITY_LOCALE_CATEGORY
    static const category // values assigned here are for exposition only
        none     = 0,
        collate  = LC_COLLATE_MASK,
        ctype    = LC_CTYPE_MASK,
        monetary = LC_MONETARY_MASK,
        numeric  = LC_NUMERIC_MASK,
        time     = LC_TIME_MASK,
        messages = LC_MESSAGES_MASK,
        all = collate | ctype | monetary | numeric | time | messages;

    // construct/copy/destroy:
    locale()  _NOEXCEPT;
    locale(const locale&)  _NOEXCEPT;
    explicit locale(const char*);
    explicit locale(const string&);
    locale(const locale&, const char*, category);
    locale(const locale&, const string&, category);
    template <class _Facet>
        _LIBCPP_INLINE_VISIBILITY locale(const locale&, _Facet*);
    locale(const locale&, const locale&, category);

    ~locale();

    const locale& operator=(const locale&)  _NOEXCEPT;

    template <class _Facet>
      _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
      locale combine(const locale&) const;

    // locale operations:
    string name() const;
    bool operator==(const locale&) const;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 115 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    _LIBCPP_HIDE_FROM_ABI bool operator!=(const locale& __y) const {return !(*this == __y);}
#endif
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    template <class _CharT, class _Traits, class _Allocator>
      _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
      bool operator()(const basic_string<_CharT, _Traits, _Allocator>&,
                      const basic_string<_CharT, _Traits, _Allocator>&) const;

    // global locale objects:
    static locale global(const locale&);
    static const locale& classic();

private:
    class __imp;
    __imp* __locale_;

    void __install_ctor(const locale&, facet*, long);
    static locale& __global();
    bool has_facet(id&) const;
    const facet* use_facet(id&) const;

    template <class _Facet> friend bool has_facet(const locale&)  _NOEXCEPT;
    template <class _Facet> friend const _Facet& use_facet(const locale&);
};

class _LIBCPP_EXPORTED_FROM_ABI locale::facet
    : public __shared_count
{
protected:
    _LIBCPP_INLINE_VISIBILITY
    explicit facet(size_t __refs = 0)
        : __shared_count(static_cast<long>(__refs)-1) {}

    ~facet() override;

//    facet(const facet&) = delete;     // effectively done in __shared_count
//    void operator=(const facet&) = delete;
private:
    void __on_zero_shared() _NOEXCEPT override;
};

class _LIBCPP_EXPORTED_FROM_ABI locale::id
{
    once_flag      __flag_;
    int32_t        __id_;

    static int32_t __next_id;
public:
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR id() :__id_(0) {}
    void operator=(const id&) = delete;
    id(const id&) = delete;

public:  // only needed for tests
    long __get();

    friend class locale;
    friend class locale::__imp;
};

template <class _Facet>
inline _LIBCPP_INLINE_VISIBILITY
locale::locale(const locale& __other, _Facet* __f)
{
    __install_ctor(__other, __f, __f ? __f->id.__get() : 0);
}

template <class _Facet>
locale
locale::combine(const locale& __other) const
{
    if (!_VSTD::has_facet<_Facet>(__other))
        __throw_runtime_error("locale::combine: locale missing facet");

    return locale(*this, &const_cast<_Facet&>(_VSTD::use_facet<_Facet>(__other)));
}

template <class _Facet>
inline _LIBCPP_INLINE_VISIBILITY
bool
has_facet(const locale& __l)  _NOEXCEPT
{
    return __l.has_facet(_Facet::id);
}

template <class _Facet>
inline _LIBCPP_INLINE_VISIBILITY
const _Facet&
use_facet(const locale& __l)
{
    return static_cast<const _Facet&>(*__l.use_facet(_Facet::id));
}

// template <class _CharT> class collate;

template <class _CharT>
class _LIBCPP_TEMPLATE_VIS collate
    : public locale::facet
{
public:
    typedef _CharT char_type;
    typedef basic_string<char_type> string_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit collate(size_t __refs = 0)
        : locale::facet(__refs) {}

    _LIBCPP_INLINE_VISIBILITY
    int compare(const char_type* __lo1, const char_type* __hi1,
                const char_type* __lo2, const char_type* __hi2) const
    {
        return do_compare(__lo1, __hi1, __lo2, __hi2);
    }

    // FIXME(EricWF): The _LIBCPP_ALWAYS_INLINE is needed on Windows to work
    // around a dllimport bug that expects an external instantiation.
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_ALWAYS_INLINE
    string_type transform(const char_type* __lo, const char_type* __hi) const
    {
        return do_transform(__lo, __hi);
    }

    _LIBCPP_INLINE_VISIBILITY
    long hash(const char_type* __lo, const char_type* __hi) const
    {
        return do_hash(__lo, __hi);
    }

    static locale::id id;

protected:
    ~collate() override;
    virtual int do_compare(const char_type* __lo1, const char_type* __hi1,
                           const char_type* __lo2, const char_type* __hi2) const;
    virtual string_type do_transform(const char_type* __lo, const char_type* __hi) const
        {return string_type(__lo, __hi);}
    virtual long do_hash(const char_type* __lo, const char_type* __hi) const;
};

template <class _CharT> locale::id collate<_CharT>::id;

template <class _CharT>
collate<_CharT>::~collate()
{
}

template <class _CharT>
int
collate<_CharT>::do_compare(const char_type* __lo1, const char_type* __hi1,
                            const char_type* __lo2, const char_type* __hi2) const
{
    for (; __lo2 != __hi2; ++__lo1, ++__lo2)
    {
        if (__lo1 == __hi1 || *__lo1 < *__lo2)
            return -1;
        if (*__lo2 < *__lo1)
            return 1;
    }
    return __lo1 != __hi1;
}

template <class _CharT>
long
collate<_CharT>::do_hash(const char_type* __lo, const char_type* __hi) const
{
    size_t __h = 0;
    const size_t __sr = __CHAR_BIT__ * sizeof(size_t) - 8;
    const size_t __mask = size_t(0xF) << (__sr + 4);
    for(const char_type* __p = __lo; __p != __hi; ++__p)
    {
        __h = (__h << 4) + static_cast<size_t>(*__p);
        size_t __g = __h & __mask;
        __h ^= __g | (__g >> __sr);
    }
    return static_cast<long>(__h);
}

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<wchar_t>;
#endif
# 295 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

// template <class CharT> class collate_byname;

template <class _CharT> class _LIBCPP_TEMPLATE_VIS collate_byname;

template <>
class _LIBCPP_EXPORTED_FROM_ABI collate_byname<char>
    : public collate<char>
{
    locale_t __l_;
public:
    typedef char char_type;
    typedef basic_string<char_type> string_type;

    explicit collate_byname(const char* __n, size_t __refs = 0);
    explicit collate_byname(const string& __n, size_t __refs = 0);

protected:
    ~collate_byname() override;
    int do_compare(const char_type* __lo1, const char_type* __hi1,
                   const char_type* __lo2, const char_type* __hi2) const override;
    string_type do_transform(const char_type* __lo, const char_type* __hi) const override;
};

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI collate_byname<wchar_t>
    : public collate<wchar_t>
{
    locale_t __l_;
public:
    typedef wchar_t char_type;
    typedef basic_string<char_type> string_type;

    explicit collate_byname(const char* __n, size_t __refs = 0);
    explicit collate_byname(const string& __n, size_t __refs = 0);

protected:
    ~collate_byname() override;

    int do_compare(const char_type* __lo1, const char_type* __hi1,
                   const char_type* __lo2, const char_type* __hi2) const override;
    string_type do_transform(const char_type* __lo, const char_type* __hi) const override;
};
#endif
# 340 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

template <class _CharT, class _Traits, class _Allocator>
bool
locale::operator()(const basic_string<_CharT, _Traits, _Allocator>& __x,
                   const basic_string<_CharT, _Traits, _Allocator>& __y) const
{
    return _VSTD::use_facet<_VSTD::collate<_CharT> >(*this).compare(
                                       __x.data(), __x.data() + __x.size(),
                                       __y.data(), __y.data() + __y.size()) < 0;
}

// template <class charT> class ctype

class _LIBCPP_EXPORTED_FROM_ABI ctype_base
{
public:
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 357 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    typedef unsigned long mask;
    static const mask space  = 1<<0;
    static const mask print  = 1<<1;
    static const mask cntrl  = 1<<2;
    static const mask upper  = 1<<3;
    static const mask lower  = 1<<4;
    static const mask alpha  = 1<<5;
    static const mask digit  = 1<<6;
    static const mask punct  = 1<<7;
    static const mask xdigit = 1<<8;
    static const mask blank  = 1<<9;
#if 0 /* disabled by -frewrite-includes */
#if defined(__BIONIC__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 369 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    // Historically this was a part of regex_traits rather than ctype_base. The
    // historical value of the constant is preserved for ABI compatibility.
    static const mask __regex_word = 0x8000;
#else
# 373 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    static const mask __regex_word = 1<<10;
#endif // defined(__BIONIC__)
# 375 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__GLIBC__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 376 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    typedef unsigned short mask;
    static const mask space  = _ISspace;
    static const mask print  = _ISprint;
    static const mask cntrl  = _IScntrl;
    static const mask upper  = _ISupper;
    static const mask lower  = _ISlower;
    static const mask alpha  = _ISalpha;
    static const mask digit  = _ISdigit;
    static const mask punct  = _ISpunct;
    static const mask xdigit = _ISxdigit;
    static const mask blank  = _ISblank;
#if 0 /* disabled by -frewrite-includes */
#if defined(__mips__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    static const mask __regex_word = static_cast<mask>(_ISbit(15));
#else
# 390 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    static const mask __regex_word = 0x80;
#endif
# 392 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_LIBCPP_MSVCRT_LIKE)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 393 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    typedef unsigned short mask;
    static const mask space  = _SPACE;
    static const mask print  = _BLANK|_PUNCT|_ALPHA|_DIGIT;
    static const mask cntrl  = _CONTROL;
    static const mask upper  = _UPPER;
    static const mask lower  = _LOWER;
    static const mask alpha  = _ALPHA;
    static const mask digit  = _DIGIT;
    static const mask punct  = _PUNCT;
    static const mask xdigit = _HEX;
    static const mask blank  = _BLANK;
    static const mask __regex_word = 0x4000; // 0x8000 and 0x0100 and 0x00ff are used
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 408 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# ifdef __APPLE__
    typedef __uint32_t mask;
#if 0 /* disabled by -frewrite-includes */
#if 0
# elif defined(__FreeBSD__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 411 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    typedef unsigned long mask;
#if 0 /* disabled by -frewrite-includes */
#if 0
# elif defined(__EMSCRIPTEN__) || defined(__NetBSD__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 413 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    typedef unsigned short mask;
# endif
# 415 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    static const mask space  = _CTYPE_S;
    static const mask print  = _CTYPE_R;
    static const mask cntrl  = _CTYPE_C;
    static const mask upper  = _CTYPE_U;
    static const mask lower  = _CTYPE_L;
    static const mask alpha  = _CTYPE_A;
    static const mask digit  = _CTYPE_D;
    static const mask punct  = _CTYPE_P;
    static const mask xdigit = _CTYPE_X;

#if 0 /* disabled by -frewrite-includes */
# if defined(__NetBSD__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 426 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    static const mask blank  = _CTYPE_BL;
    // NetBSD defines classes up to 0x2000
    // see sys/ctype_bits.h, _CTYPE_Q
    static const mask __regex_word = 0x8000;
# else
# 431 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    static const mask blank  = _CTYPE_B;
    static const mask __regex_word = 0x80;
# endif
# 434 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_AIX)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 435 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    typedef unsigned int mask;
    static const mask space  = _ISSPACE;
    static const mask print  = _ISPRINT;
    static const mask cntrl  = _ISCNTRL;
    static const mask upper  = _ISUPPER;
    static const mask lower  = _ISLOWER;
    static const mask alpha  = _ISALPHA;
    static const mask digit  = _ISDIGIT;
    static const mask punct  = _ISPUNCT;
    static const mask xdigit = _ISXDIGIT;
    static const mask blank  = _ISBLANK;
    static const mask __regex_word = 0x8000;
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_NEWLIB_VERSION)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 448 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    // Same type as Newlib's _ctype_ array in newlib/libc/include/ctype.h.
    typedef char mask;
    static const mask space  = _S;
    static const mask print  = _P | _U | _L | _N | _B;
    static const mask cntrl  = _C;
    static const mask upper  = _U;
    static const mask lower  = _L;
    static const mask alpha  = _U | _L;
    static const mask digit  = _N;
    static const mask punct  = _P;
    static const mask xdigit = _X | _N;
    static const mask blank  = _B;
    // mask is already fully saturated, use a different type in regex_type_traits.
    static const unsigned short __regex_word = 0x100;
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_XDIGIT
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__MVS__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 466 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* disabled by -frewrite-includes */
# if defined(__NATIVE_ASCII_F)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    typedef unsigned int mask;
    static const mask space  = _ISSPACE_A;
    static const mask print  = _ISPRINT_A;
    static const mask cntrl  = _ISCNTRL_A;
    static const mask upper  = _ISUPPER_A;
    static const mask lower  = _ISLOWER_A;
    static const mask alpha  = _ISALPHA_A;
    static const mask digit  = _ISDIGIT_A;
    static const mask punct  = _ISPUNCT_A;
    static const mask xdigit = _ISXDIGIT_A;
    static const mask blank  = _ISBLANK_A;
# else
# 479 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    typedef unsigned short mask;
    static const mask space  = __ISSPACE;
    static const mask print  = __ISPRINT;
    static const mask cntrl  = __ISCNTRL;
    static const mask upper  = __ISUPPER;
    static const mask lower  = __ISLOWER;
    static const mask alpha  = __ISALPHA;
    static const mask digit  = __ISDIGIT;
    static const mask punct  = __ISPUNCT;
    static const mask xdigit = __ISXDIGIT;
    static const mask blank  = __ISBLANK;
# endif
# 491 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    static const mask __regex_word = 0x8000;
#else
# 493 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
# error unknown rune table for this platform -- do you mean to define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE?
#endif
# 495 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    static const mask alnum  = alpha | digit;
    static const mask graph  = alnum | punct;

    _LIBCPP_INLINE_VISIBILITY ctype_base() {}

    static_assert((__regex_word & ~(std::make_unsigned<mask>::type)(space | print | cntrl | upper | lower | alpha |
                                                                    digit | punct | xdigit | blank)) == __regex_word,
                  "__regex_word can't overlap other bits");
};

template <class _CharT> class _LIBCPP_TEMPLATE_VIS ctype;

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI ctype<wchar_t>
    : public locale::facet,
      public ctype_base
{
public:
    typedef wchar_t char_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit ctype(size_t __refs = 0)
        : locale::facet(__refs) {}

    _LIBCPP_INLINE_VISIBILITY
    bool is(mask __m, char_type __c) const
    {
        return do_is(__m, __c);
    }

    _LIBCPP_INLINE_VISIBILITY
    const char_type* is(const char_type* __low, const char_type* __high, mask* __vec) const
    {
        return do_is(__low, __high, __vec);
    }

    _LIBCPP_INLINE_VISIBILITY
    const char_type* scan_is(mask __m, const char_type* __low, const char_type* __high) const
    {
        return do_scan_is(__m, __low, __high);
    }

    _LIBCPP_INLINE_VISIBILITY
    const char_type* scan_not(mask __m, const char_type* __low, const char_type* __high) const
    {
        return do_scan_not(__m, __low, __high);
    }

    _LIBCPP_INLINE_VISIBILITY
    char_type toupper(char_type __c) const
    {
        return do_toupper(__c);
    }

    _LIBCPP_INLINE_VISIBILITY
    const char_type* toupper(char_type* __low, const char_type* __high) const
    {
        return do_toupper(__low, __high);
    }

    _LIBCPP_INLINE_VISIBILITY
    char_type tolower(char_type __c) const
    {
        return do_tolower(__c);
    }

    _LIBCPP_INLINE_VISIBILITY
    const char_type* tolower(char_type* __low, const char_type* __high) const
    {
        return do_tolower(__low, __high);
    }

    _LIBCPP_INLINE_VISIBILITY
    char_type widen(char __c) const
    {
        return do_widen(__c);
    }

    _LIBCPP_INLINE_VISIBILITY
    const char* widen(const char* __low, const char* __high, char_type* __to) const
    {
        return do_widen(__low, __high, __to);
    }

    _LIBCPP_INLINE_VISIBILITY
    char narrow(char_type __c, char __dfault) const
    {
        return do_narrow(__c, __dfault);
    }

    _LIBCPP_INLINE_VISIBILITY
    const char_type* narrow(const char_type* __low, const char_type* __high, char __dfault, char* __to) const
    {
        return do_narrow(__low, __high, __dfault, __to);
    }

    static locale::id id;

protected:
    ~ctype() override;
    virtual bool do_is(mask __m, char_type __c) const;
    virtual const char_type* do_is(const char_type* __low, const char_type* __high, mask* __vec) const;
    virtual const char_type* do_scan_is(mask __m, const char_type* __low, const char_type* __high) const;
    virtual const char_type* do_scan_not(mask __m, const char_type* __low, const char_type* __high) const;
    virtual char_type do_toupper(char_type) const;
    virtual const char_type* do_toupper(char_type* __low, const char_type* __high) const;
    virtual char_type do_tolower(char_type) const;
    virtual const char_type* do_tolower(char_type* __low, const char_type* __high) const;
    virtual char_type do_widen(char) const;
    virtual const char* do_widen(const char* __low, const char* __high, char_type* __dest) const;
    virtual char do_narrow(char_type, char __dfault) const;
    virtual const char_type* do_narrow(const char_type* __low, const char_type* __high, char __dfault, char* __dest) const;
};
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 610 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

template <>
class _LIBCPP_EXPORTED_FROM_ABI ctype<char>
    : public locale::facet, public ctype_base
{
    const mask* __tab_;
    bool        __del_;
public:
    typedef char char_type;

    explicit ctype(const mask* __tab = nullptr, bool __del = false, size_t __refs = 0);

    _LIBCPP_INLINE_VISIBILITY
    bool is(mask __m, char_type __c) const
    {
        return isascii(__c) ? (__tab_[static_cast<int>(__c)] & __m) !=0 : false;
    }

    _LIBCPP_INLINE_VISIBILITY
    const char_type* is(const char_type* __low, const char_type* __high, mask* __vec) const
    {
        for (; __low != __high; ++__low, ++__vec)
            *__vec = isascii(*__low) ? __tab_[static_cast<int>(*__low)] : 0;
        return __low;
    }

    _LIBCPP_INLINE_VISIBILITY
    const char_type* scan_is (mask __m, const char_type* __low, const char_type* __high) const
    {
        for (; __low != __high; ++__low)
            if (isascii(*__low) && (__tab_[static_cast<int>(*__low)] & __m))
                break;
        return __low;
    }

    _LIBCPP_INLINE_VISIBILITY
    const char_type* scan_not(mask __m, const char_type* __low, const char_type* __high) const
    {
        for (; __low != __high; ++__low)
            if (!isascii(*__low) || !(__tab_[static_cast<int>(*__low)] & __m))
                break;
        return __low;
    }

    _LIBCPP_INLINE_VISIBILITY
    char_type toupper(char_type __c) const
    {
        return do_toupper(__c);
    }

    _LIBCPP_INLINE_VISIBILITY
    const char_type* toupper(char_type* __low, const char_type* __high) const
    {
        return do_toupper(__low, __high);
    }

    _LIBCPP_INLINE_VISIBILITY
    char_type tolower(char_type __c) const
    {
        return do_tolower(__c);
    }

    _LIBCPP_INLINE_VISIBILITY
    const char_type* tolower(char_type* __low, const char_type* __high) const
    {
        return do_tolower(__low, __high);
    }

    _LIBCPP_INLINE_VISIBILITY
    char_type widen(char __c) const
    {
        return do_widen(__c);
    }

    _LIBCPP_INLINE_VISIBILITY
    const char* widen(const char* __low, const char* __high, char_type* __to) const
    {
        return do_widen(__low, __high, __to);
    }

    _LIBCPP_INLINE_VISIBILITY
    char narrow(char_type __c, char __dfault) const
    {
        return do_narrow(__c, __dfault);
    }

    _LIBCPP_INLINE_VISIBILITY
    const char* narrow(const char_type* __low, const char_type* __high, char __dfault, char* __to) const
    {
        return do_narrow(__low, __high, __dfault, __to);
    }

    static locale::id id;

#ifdef _CACHED_RUNES
    static const size_t table_size = _CACHED_RUNES;
#else
# 707 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    static const size_t table_size = 256;  // FIXME: Don't hardcode this.
#endif
# 709 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    _LIBCPP_INLINE_VISIBILITY const mask* table() const  _NOEXCEPT {return __tab_;}
    static const mask* classic_table()  _NOEXCEPT;
#if 0 /* disabled by -frewrite-includes */
#if defined(__GLIBC__) || defined(__EMSCRIPTEN__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 712 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    static const int* __classic_upper_table() _NOEXCEPT;
    static const int* __classic_lower_table() _NOEXCEPT;
#endif
# 715 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* disabled by -frewrite-includes */
#if defined(__NetBSD__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 716 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    static const short* __classic_upper_table() _NOEXCEPT;
    static const short* __classic_lower_table() _NOEXCEPT;
#endif
# 719 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#if 0 /* disabled by -frewrite-includes */
#if defined(__MVS__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 720 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
    static const unsigned short* __classic_upper_table() _NOEXCEPT;
    static const unsigned short* __classic_lower_table() _NOEXCEPT;
#endif
# 723 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

protected:
    ~ctype() override;
    virtual char_type do_toupper(char_type __c) const;
    virtual const char_type* do_toupper(char_type* __low, const char_type* __high) const;
    virtual char_type do_tolower(char_type __c) const;
    virtual const char_type* do_tolower(char_type* __low, const char_type* __high) const;
    virtual char_type do_widen(char __c) const;
    virtual const char* do_widen(const char* __low, const char* __high, char_type* __to) const;
    virtual char do_narrow(char_type __c, char __dfault) const;
    virtual const char* do_narrow(const char_type* __low, const char_type* __high, char __dfault, char* __to) const;
};

// template <class CharT> class ctype_byname;

template <class _CharT> class _LIBCPP_TEMPLATE_VIS ctype_byname;

template <>
class _LIBCPP_EXPORTED_FROM_ABI ctype_byname<char>
    : public ctype<char>
{
    locale_t __l_;

public:
    explicit ctype_byname(const char*, size_t = 0);
    explicit ctype_byname(const string&, size_t = 0);

protected:
    ~ctype_byname() override;
    char_type do_toupper(char_type) const override;
    const char_type* do_toupper(char_type* __low, const char_type* __high) const override;
    char_type do_tolower(char_type) const override;
    const char_type* do_tolower(char_type* __low, const char_type* __high) const override;
};

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI ctype_byname<wchar_t>
    : public ctype<wchar_t>
{
    locale_t __l_;

public:
    explicit ctype_byname(const char*, size_t = 0);
    explicit ctype_byname(const string&, size_t = 0);

protected:
    ~ctype_byname() override;
    bool do_is(mask __m, char_type __c) const override;
    const char_type* do_is(const char_type* __low, const char_type* __high, mask* __vec) const override;
    const char_type* do_scan_is(mask __m, const char_type* __low, const char_type* __high) const override;
    const char_type* do_scan_not(mask __m, const char_type* __low, const char_type* __high) const override;
    char_type do_toupper(char_type) const override;
    const char_type* do_toupper(char_type* __low, const char_type* __high) const override;
    char_type do_tolower(char_type) const override;
    const char_type* do_tolower(char_type* __low, const char_type* __high) const override;
    char_type do_widen(char) const override;
    const char* do_widen(const char* __low, const char* __high, char_type* __dest) const override;
    char do_narrow(char_type, char __dfault) const override;
    const char_type* do_narrow(const char_type* __low, const char_type* __high, char __dfault, char* __dest) const override;
};
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 785 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
bool
isspace(_CharT __c, const locale& __loc)
{
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c);
}

template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
bool
isprint(_CharT __c, const locale& __loc)
{
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c);
}

template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
bool
iscntrl(_CharT __c, const locale& __loc)
{
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c);
}

template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
bool
isupper(_CharT __c, const locale& __loc)
{
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c);
}

template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
bool
islower(_CharT __c, const locale& __loc)
{
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c);
}

template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
bool
isalpha(_CharT __c, const locale& __loc)
{
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c);
}

template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
bool
isdigit(_CharT __c, const locale& __loc)
{
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c);
}

template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
bool
ispunct(_CharT __c, const locale& __loc)
{
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c);
}

template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
bool
isxdigit(_CharT __c, const locale& __loc)
{
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c);
}

template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
bool
isalnum(_CharT __c, const locale& __loc)
{
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c);
}

template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
bool
isgraph(_CharT __c, const locale& __loc)
{
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c);
}

template <class _CharT>
_LIBCPP_HIDE_FROM_ABI bool isblank(_CharT __c, const locale& __loc) {
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::blank, __c);
}

template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
_CharT
toupper(_CharT __c, const locale& __loc)
{
    return std::use_facet<ctype<_CharT> >(__loc).toupper(__c);
}

template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
_CharT
tolower(_CharT __c, const locale& __loc)
{
    return std::use_facet<ctype<_CharT> >(__loc).tolower(__c);
}

// codecvt_base

class _LIBCPP_EXPORTED_FROM_ABI codecvt_base
{
public:
    _LIBCPP_INLINE_VISIBILITY codecvt_base() {}
    enum result {ok, partial, error, noconv};
};

// template <class internT, class externT, class stateT> class codecvt;

template <class _InternT, class _ExternT, class _StateT> class _LIBCPP_TEMPLATE_VIS codecvt;

// template <> class codecvt<char, char, mbstate_t>

template <>
class _LIBCPP_EXPORTED_FROM_ABI codecvt<char, char, mbstate_t>
    : public locale::facet,
      public codecvt_base
{
public:
    typedef char      intern_type;
    typedef char      extern_type;
    typedef mbstate_t state_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit codecvt(size_t __refs = 0)
        : locale::facet(__refs) {}

    _LIBCPP_INLINE_VISIBILITY
    result out(state_type& __st,
               const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
               extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
    {
        return do_out(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    result unshift(state_type& __st,
                   extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
    {
        return do_unshift(__st, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    result in(state_type& __st,
              const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
              intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const
    {
        return do_in(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    int encoding() const  _NOEXCEPT
    {
        return do_encoding();
    }

    _LIBCPP_INLINE_VISIBILITY
    bool always_noconv() const  _NOEXCEPT
    {
        return do_always_noconv();
    }

    _LIBCPP_INLINE_VISIBILITY
    int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
    {
        return do_length(__st, __frm, __end, __mx);
    }

    _LIBCPP_INLINE_VISIBILITY
    int max_length() const  _NOEXCEPT
    {
        return do_max_length();
    }

    static locale::id id;

protected:
    _LIBCPP_INLINE_VISIBILITY
    explicit codecvt(const char*, size_t __refs = 0)
        : locale::facet(__refs) {}

    ~codecvt() override;

    virtual result do_out(state_type& __st,
                          const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
                          extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
    virtual result do_in(state_type& __st,
                         const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
                         intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
    virtual result do_unshift(state_type& __st,
                              extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
    virtual int do_encoding() const  _NOEXCEPT;
    virtual bool do_always_noconv() const  _NOEXCEPT;
    virtual int do_length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const;
    virtual int do_max_length() const  _NOEXCEPT;
};

// template <> class codecvt<wchar_t, char, mbstate_t>

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI codecvt<wchar_t, char, mbstate_t>
    : public locale::facet,
      public codecvt_base
{
    locale_t __l_;
public:
    typedef wchar_t   intern_type;
    typedef char      extern_type;
    typedef mbstate_t state_type;

    explicit codecvt(size_t __refs = 0);

    _LIBCPP_INLINE_VISIBILITY
    result out(state_type& __st,
               const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
               extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
    {
        return do_out(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    result unshift(state_type& __st,
                   extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
    {
        return do_unshift(__st, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    result in(state_type& __st,
              const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
              intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const
    {
        return do_in(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    int encoding() const  _NOEXCEPT
    {
        return do_encoding();
    }

    _LIBCPP_INLINE_VISIBILITY
    bool always_noconv() const  _NOEXCEPT
    {
        return do_always_noconv();
    }

    _LIBCPP_INLINE_VISIBILITY
    int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
    {
        return do_length(__st, __frm, __end, __mx);
    }

    _LIBCPP_INLINE_VISIBILITY
    int max_length() const  _NOEXCEPT
    {
        return do_max_length();
    }

    static locale::id id;

protected:
    explicit codecvt(const char*, size_t __refs = 0);

    ~codecvt() override;

    virtual result do_out(state_type& __st,
                          const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
                          extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
    virtual result do_in(state_type& __st,
                         const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
                         intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
    virtual result do_unshift(state_type& __st,
                              extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
    virtual int do_encoding() const  _NOEXCEPT;
    virtual bool do_always_noconv() const  _NOEXCEPT;
    virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const;
    virtual int do_max_length() const  _NOEXCEPT;
};
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 1078 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

// template <> class codecvt<char16_t, char, mbstate_t> // deprecated in C++20

template <>
class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXPORTED_FROM_ABI codecvt<char16_t, char, mbstate_t>
    : public locale::facet,
      public codecvt_base
{
public:
    typedef char16_t  intern_type;
    typedef char      extern_type;
    typedef mbstate_t state_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit codecvt(size_t __refs = 0)
        : locale::facet(__refs) {}

    _LIBCPP_INLINE_VISIBILITY
    result out(state_type& __st,
               const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
               extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
    {
        return do_out(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    result unshift(state_type& __st,
                   extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
    {
        return do_unshift(__st, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    result in(state_type& __st,
              const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
              intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const
    {
        return do_in(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    int encoding() const  _NOEXCEPT
    {
        return do_encoding();
    }

    _LIBCPP_INLINE_VISIBILITY
    bool always_noconv() const  _NOEXCEPT
    {
        return do_always_noconv();
    }

    _LIBCPP_INLINE_VISIBILITY
    int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
    {
        return do_length(__st, __frm, __end, __mx);
    }

    _LIBCPP_INLINE_VISIBILITY
    int max_length() const  _NOEXCEPT
    {
        return do_max_length();
    }

    static locale::id id;

protected:
    _LIBCPP_INLINE_VISIBILITY
    explicit codecvt(const char*, size_t __refs = 0)
        : locale::facet(__refs) {}

    ~codecvt() override;

    virtual result do_out(state_type& __st,
                          const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
                          extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
    virtual result do_in(state_type& __st,
                         const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
                         intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
    virtual result do_unshift(state_type& __st,
                              extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
    virtual int do_encoding() const  _NOEXCEPT;
    virtual bool do_always_noconv() const  _NOEXCEPT;
    virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const;
    virtual int do_max_length() const  _NOEXCEPT;
};

#ifndef _LIBCPP_HAS_NO_CHAR8_T

// template <> class codecvt<char16_t, char8_t, mbstate_t> // C++20

template <>
class _LIBCPP_EXPORTED_FROM_ABI codecvt<char16_t, char8_t, mbstate_t>
    : public locale::facet,
      public codecvt_base
{
public:
    typedef char16_t  intern_type;
    typedef char8_t   extern_type;
    typedef mbstate_t state_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit codecvt(size_t __refs = 0)
        : locale::facet(__refs) {}

    _LIBCPP_INLINE_VISIBILITY
    result out(state_type& __st,
               const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
               extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
    {
        return do_out(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    result unshift(state_type& __st,
                   extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
    {
        return do_unshift(__st, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    result in(state_type& __st,
              const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
              intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const
    {
        return do_in(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    int encoding() const  _NOEXCEPT
    {
        return do_encoding();
    }

    _LIBCPP_INLINE_VISIBILITY
    bool always_noconv() const  _NOEXCEPT
    {
        return do_always_noconv();
    }

    _LIBCPP_INLINE_VISIBILITY
    int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
    {
        return do_length(__st, __frm, __end, __mx);
    }

    _LIBCPP_INLINE_VISIBILITY
    int max_length() const  _NOEXCEPT
    {
        return do_max_length();
    }

    static locale::id id;

protected:
    _LIBCPP_INLINE_VISIBILITY
    explicit codecvt(const char*, size_t __refs = 0)
        : locale::facet(__refs) {}

    ~codecvt() override;

    virtual result do_out(state_type& __st,
                          const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
                          extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
    virtual result do_in(state_type& __st,
                         const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
                         intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
    virtual result do_unshift(state_type& __st,
                              extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
    virtual int do_encoding() const  _NOEXCEPT;
    virtual bool do_always_noconv() const  _NOEXCEPT;
    virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const;
    virtual int do_max_length() const  _NOEXCEPT;
};

#endif
# 1254 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

// template <> class codecvt<char32_t, char, mbstate_t> // deprecated in C++20

template <>
class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXPORTED_FROM_ABI codecvt<char32_t, char, mbstate_t>
    : public locale::facet,
      public codecvt_base
{
public:
    typedef char32_t  intern_type;
    typedef char      extern_type;
    typedef mbstate_t state_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit codecvt(size_t __refs = 0)
        : locale::facet(__refs) {}

    _LIBCPP_INLINE_VISIBILITY
    result out(state_type& __st,
               const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
               extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
    {
        return do_out(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    result unshift(state_type& __st,
                   extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
    {
        return do_unshift(__st, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    result in(state_type& __st,
              const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
              intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const
    {
        return do_in(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    int encoding() const  _NOEXCEPT
    {
        return do_encoding();
    }

    _LIBCPP_INLINE_VISIBILITY
    bool always_noconv() const  _NOEXCEPT
    {
        return do_always_noconv();
    }

    _LIBCPP_INLINE_VISIBILITY
    int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
    {
        return do_length(__st, __frm, __end, __mx);
    }

    _LIBCPP_INLINE_VISIBILITY
    int max_length() const  _NOEXCEPT
    {
        return do_max_length();
    }

    static locale::id id;

protected:
    _LIBCPP_INLINE_VISIBILITY
    explicit codecvt(const char*, size_t __refs = 0)
        : locale::facet(__refs) {}

    ~codecvt() override;

    virtual result do_out(state_type& __st,
                          const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
                          extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
    virtual result do_in(state_type& __st,
                         const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
                         intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
    virtual result do_unshift(state_type& __st,
                              extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
    virtual int do_encoding() const  _NOEXCEPT;
    virtual bool do_always_noconv() const  _NOEXCEPT;
    virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const;
    virtual int do_max_length() const  _NOEXCEPT;
};

#ifndef _LIBCPP_HAS_NO_CHAR8_T

// template <> class codecvt<char32_t, char8_t, mbstate_t> // C++20

template <>
class _LIBCPP_EXPORTED_FROM_ABI codecvt<char32_t, char8_t, mbstate_t>
    : public locale::facet,
      public codecvt_base
{
public:
    typedef char32_t  intern_type;
    typedef char8_t   extern_type;
    typedef mbstate_t state_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit codecvt(size_t __refs = 0)
        : locale::facet(__refs) {}

    _LIBCPP_INLINE_VISIBILITY
    result out(state_type& __st,
               const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
               extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
    {
        return do_out(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    result unshift(state_type& __st,
                   extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
    {
        return do_unshift(__st, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    result in(state_type& __st,
              const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
              intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const
    {
        return do_in(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
    }

    _LIBCPP_INLINE_VISIBILITY
    int encoding() const  _NOEXCEPT
    {
        return do_encoding();
    }

    _LIBCPP_INLINE_VISIBILITY
    bool always_noconv() const  _NOEXCEPT
    {
        return do_always_noconv();
    }

    _LIBCPP_INLINE_VISIBILITY
    int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
    {
        return do_length(__st, __frm, __end, __mx);
    }

    _LIBCPP_INLINE_VISIBILITY
    int max_length() const  _NOEXCEPT
    {
        return do_max_length();
    }

    static locale::id id;

protected:
    _LIBCPP_INLINE_VISIBILITY
    explicit codecvt(const char*, size_t __refs = 0)
        : locale::facet(__refs) {}

    ~codecvt() override;

    virtual result do_out(state_type& __st,
                          const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
                          extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
    virtual result do_in(state_type& __st,
                         const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
                         intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
    virtual result do_unshift(state_type& __st,
                              extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
    virtual int do_encoding() const  _NOEXCEPT;
    virtual bool do_always_noconv() const  _NOEXCEPT;
    virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const;
    virtual int do_max_length() const  _NOEXCEPT;
};

#endif
# 1430 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

// template <class _InternT, class _ExternT, class _StateT> class codecvt_byname

template <class _InternT, class _ExternT, class _StateT>
class _LIBCPP_TEMPLATE_VIS codecvt_byname
    : public codecvt<_InternT, _ExternT, _StateT>
{
public:
    _LIBCPP_INLINE_VISIBILITY
    explicit codecvt_byname(const char* __nm, size_t __refs = 0)
        : codecvt<_InternT, _ExternT, _StateT>(__nm, __refs) {}
    _LIBCPP_INLINE_VISIBILITY
    explicit codecvt_byname(const string& __nm, size_t __refs = 0)
        : codecvt<_InternT, _ExternT, _StateT>(__nm.c_str(), __refs) {}
protected:
    ~codecvt_byname() override;
};

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _InternT, class _ExternT, class _StateT>
codecvt_byname<_InternT, _ExternT, _StateT>::~codecvt_byname()
{
}
_LIBCPP_SUPPRESS_DEPRECATED_POP

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char, char, mbstate_t>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<wchar_t, char, mbstate_t>;
#endif
# 1459 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
extern template class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char, mbstate_t>; // deprecated in C++20
extern template class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char, mbstate_t>; // deprecated in C++20
#ifndef _LIBCPP_HAS_NO_CHAR8_T
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char8_t, mbstate_t>; // C++20
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char8_t, mbstate_t>; // C++20
#endif
# 1465 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

template <size_t _Np>
struct __narrow_to_utf8
{
    template <class _OutputIterator, class _CharT>
    _OutputIterator
    operator()(_OutputIterator __s, const _CharT* __wb, const _CharT* __we) const;
};

template <>
struct __narrow_to_utf8<8>
{
    template <class _OutputIterator, class _CharT>
    _LIBCPP_INLINE_VISIBILITY
    _OutputIterator
    operator()(_OutputIterator __s, const _CharT* __wb, const _CharT* __we) const
    {
        for (; __wb < __we; ++__wb, ++__s)
            *__s = *__wb;
        return __s;
    }
};

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <>
struct _LIBCPP_EXPORTED_FROM_ABI __narrow_to_utf8<16>
    : public codecvt<char16_t, char, mbstate_t>
{
    _LIBCPP_INLINE_VISIBILITY
    __narrow_to_utf8() : codecvt<char16_t, char, mbstate_t>(1) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP

    ~__narrow_to_utf8() override;

    template <class _OutputIterator, class _CharT>
    _LIBCPP_INLINE_VISIBILITY
    _OutputIterator
    operator()(_OutputIterator __s, const _CharT* __wb, const _CharT* __we) const
    {
        result __r = ok;
        mbstate_t __mb;
        while (__wb < __we && __r != error)
        {
            const int __sz = 32;
            char __buf[__sz];
            char* __bn;
            const char16_t* __wn = (const char16_t*)__wb;
            __r = do_out(__mb, (const char16_t*)__wb, (const char16_t*)__we, __wn,
                         __buf, __buf+__sz, __bn);
            if (__r == codecvt_base::error || __wn == (const char16_t*)__wb)
                __throw_runtime_error("locale not supported");
            for (const char* __p = __buf; __p < __bn; ++__p, ++__s)
                *__s = *__p;
            __wb = (const _CharT*)__wn;
        }
        return __s;
    }
};

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <>
struct _LIBCPP_EXPORTED_FROM_ABI __narrow_to_utf8<32>
    : public codecvt<char32_t, char, mbstate_t>
{
    _LIBCPP_INLINE_VISIBILITY
    __narrow_to_utf8() : codecvt<char32_t, char, mbstate_t>(1) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP

    ~__narrow_to_utf8() override;

    template <class _OutputIterator, class _CharT>
    _LIBCPP_INLINE_VISIBILITY
    _OutputIterator
    operator()(_OutputIterator __s, const _CharT* __wb, const _CharT* __we) const
    {
        result __r = ok;
        mbstate_t __mb;
        while (__wb < __we && __r != error)
        {
            const int __sz = 32;
            char __buf[__sz];
            char* __bn;
            const char32_t* __wn = (const char32_t*)__wb;
            __r = do_out(__mb, (const char32_t*)__wb, (const char32_t*)__we, __wn,
                         __buf, __buf+__sz, __bn);
            if (__r == codecvt_base::error || __wn == (const char32_t*)__wb)
                __throw_runtime_error("locale not supported");
            for (const char* __p = __buf; __p < __bn; ++__p, ++__s)
                *__s = *__p;
            __wb = (const _CharT*)__wn;
        }
        return __s;
    }
};

template <size_t _Np>
struct __widen_from_utf8
{
    template <class _OutputIterator>
    _OutputIterator
    operator()(_OutputIterator __s, const char* __nb, const char* __ne) const;
};

template <>
struct __widen_from_utf8<8>
{
    template <class _OutputIterator>
    _LIBCPP_INLINE_VISIBILITY
    _OutputIterator
    operator()(_OutputIterator __s, const char* __nb, const char* __ne) const
    {
        for (; __nb < __ne; ++__nb, ++__s)
            *__s = *__nb;
        return __s;
    }
};

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <>
struct _LIBCPP_EXPORTED_FROM_ABI __widen_from_utf8<16>
    : public codecvt<char16_t, char, mbstate_t>
{
    _LIBCPP_INLINE_VISIBILITY
    __widen_from_utf8() : codecvt<char16_t, char, mbstate_t>(1) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP

    ~__widen_from_utf8() override;

    template <class _OutputIterator>
    _LIBCPP_INLINE_VISIBILITY
    _OutputIterator
    operator()(_OutputIterator __s, const char* __nb, const char* __ne) const
    {
        result __r = ok;
        mbstate_t __mb;
        while (__nb < __ne && __r != error)
        {
            const int __sz = 32;
            char16_t __buf[__sz];
            char16_t* __bn;
            const char* __nn = __nb;
            __r = do_in(__mb, __nb, __ne - __nb > __sz ? __nb+__sz : __ne, __nn,
                        __buf, __buf+__sz, __bn);
            if (__r == codecvt_base::error || __nn == __nb)
                __throw_runtime_error("locale not supported");
            for (const char16_t* __p = __buf; __p < __bn; ++__p, ++__s)
                *__s = *__p;
            __nb = __nn;
        }
        return __s;
    }
};

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <>
struct _LIBCPP_EXPORTED_FROM_ABI __widen_from_utf8<32>
    : public codecvt<char32_t, char, mbstate_t>
{
    _LIBCPP_INLINE_VISIBILITY
    __widen_from_utf8() : codecvt<char32_t, char, mbstate_t>(1) {}
_LIBCPP_SUPPRESS_DEPRECATED_POP

    ~__widen_from_utf8() override;

    template <class _OutputIterator>
    _LIBCPP_INLINE_VISIBILITY
    _OutputIterator
    operator()(_OutputIterator __s, const char* __nb, const char* __ne) const
    {
        result __r = ok;
        mbstate_t __mb;
        while (__nb < __ne && __r != error)
        {
            const int __sz = 32;
            char32_t __buf[__sz];
            char32_t* __bn;
            const char* __nn = __nb;
            __r = do_in(__mb, __nb, __ne - __nb > __sz ? __nb+__sz : __ne, __nn,
                        __buf, __buf+__sz, __bn);
            if (__r == codecvt_base::error || __nn == __nb)
                __throw_runtime_error("locale not supported");
            for (const char32_t* __p = __buf; __p < __bn; ++__p, ++__s)
                *__s = *__p;
            __nb = __nn;
        }
        return __s;
    }
};

// template <class charT> class numpunct

template <class _CharT> class _LIBCPP_TEMPLATE_VIS numpunct;

template <>
class _LIBCPP_EXPORTED_FROM_ABI numpunct<char>
    : public locale::facet
{
public:
    typedef char char_type;
    typedef basic_string<char_type> string_type;

    explicit numpunct(size_t __refs = 0);

    _LIBCPP_INLINE_VISIBILITY char_type decimal_point() const {return do_decimal_point();}
    _LIBCPP_INLINE_VISIBILITY char_type thousands_sep() const {return do_thousands_sep();}
    _LIBCPP_INLINE_VISIBILITY string grouping() const         {return do_grouping();}
    _LIBCPP_INLINE_VISIBILITY string_type truename() const    {return do_truename();}
    _LIBCPP_INLINE_VISIBILITY string_type falsename() const   {return do_falsename();}

    static locale::id id;

protected:
    ~numpunct() override;
    virtual char_type do_decimal_point() const;
    virtual char_type do_thousands_sep() const;
    virtual string do_grouping() const;
    virtual string_type do_truename() const;
    virtual string_type do_falsename() const;

    char_type __decimal_point_;
    char_type __thousands_sep_;
    string __grouping_;
};

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI numpunct<wchar_t>
    : public locale::facet
{
public:
    typedef wchar_t char_type;
    typedef basic_string<char_type> string_type;

    explicit numpunct(size_t __refs = 0);

    _LIBCPP_INLINE_VISIBILITY char_type decimal_point() const {return do_decimal_point();}
    _LIBCPP_INLINE_VISIBILITY char_type thousands_sep() const {return do_thousands_sep();}
    _LIBCPP_INLINE_VISIBILITY string grouping() const         {return do_grouping();}
    _LIBCPP_INLINE_VISIBILITY string_type truename() const    {return do_truename();}
    _LIBCPP_INLINE_VISIBILITY string_type falsename() const   {return do_falsename();}

    static locale::id id;

protected:
    ~numpunct() override;
    virtual char_type do_decimal_point() const;
    virtual char_type do_thousands_sep() const;
    virtual string do_grouping() const;
    virtual string_type do_truename() const;
    virtual string_type do_falsename() const;

    char_type __decimal_point_;
    char_type __thousands_sep_;
    string __grouping_;
};
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 1721 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

// template <class charT> class numpunct_byname

template <class _CharT> class _LIBCPP_TEMPLATE_VIS numpunct_byname;

template <>
class _LIBCPP_EXPORTED_FROM_ABI numpunct_byname<char>
: public numpunct<char>
{
public:
    typedef char char_type;
    typedef basic_string<char_type> string_type;

    explicit numpunct_byname(const char* __nm, size_t __refs = 0);
    explicit numpunct_byname(const string& __nm, size_t __refs = 0);

protected:
    ~numpunct_byname() override;

private:
    void __init(const char*);
};

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI numpunct_byname<wchar_t>
: public numpunct<wchar_t>
{
public:
    typedef wchar_t char_type;
    typedef basic_string<char_type> string_type;

    explicit numpunct_byname(const char* __nm, size_t __refs = 0);
    explicit numpunct_byname(const string& __nm, size_t __refs = 0);

protected:
    ~numpunct_byname() override;

private:
    void __init(const char*);
};
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 1763 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___LOCALE
# 1767 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale" 3
#endif /* __locale expanded by -frewrite-includes */
# 223 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__system_error/error_category.h>
#endif /* expanded by -frewrite-includes */
# 223 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#include <__system_error/error_code.h>
#endif /* expanded by -frewrite-includes */
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 225 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#include <__system_error/error_condition.h>
#endif /* expanded by -frewrite-includes */
# 225 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 226 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* system_error.h expanded by -frewrite-includes */
#include <__system_error/system_error.h>
#else /* system_error.h expanded by -frewrite-includes */
# 226 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___SYSTEM_ERROR_SYSTEM_ERROR_H
#define _LIBCPP___SYSTEM_ERROR_SYSTEM_ERROR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__system_error/error_category.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__system_error/error_code.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__verbose_abort>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <string>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

class _LIBCPP_EXPORTED_FROM_ABI system_error : public runtime_error {
  error_code __ec_;

public:
  system_error(error_code __ec, const string& __what_arg);
  system_error(error_code __ec, const char* __what_arg);
  system_error(error_code __ec);
  system_error(int __ev, const error_category& __ecat, const string& __what_arg);
  system_error(int __ev, const error_category& __ecat, const char* __what_arg);
  system_error(int __ev, const error_category& __ecat);
  _LIBCPP_HIDE_FROM_ABI system_error(const system_error&) _NOEXCEPT = default;
  ~system_error() _NOEXCEPT override;

  _LIBCPP_HIDE_FROM_ABI const error_code& code() const _NOEXCEPT { return __ec_; }
};

_LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_system_error(int __ev, const char* __what_arg);
_LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI inline void __throw_system_error(error_code __ec, const char* __what_arg) {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
  throw system_error(__ec, __what_arg);
#else
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
  _LIBCPP_VERBOSE_ABORT(
      "system_error was thrown in -fno-exceptions mode with error %i and message \"%s\"", __ec.value(), __what_arg);
#endif
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___SYSTEM_ERROR_SYSTEM_ERROR_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__system_error/system_error.h" 3
#endif /* system_error.h expanded by -frewrite-includes */
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#include <__verbose_abort>
#endif /* expanded by -frewrite-includes */
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3

// standard-mandated includes

// [ios.syn]
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 234 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 235 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 237 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#  include <__atomic/atomic.h> // for __xindex_
#endif /* expanded by -frewrite-includes */
# 237 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 238 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#endif
# 239 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 241 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 242 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#endif
# 243 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3

_LIBCPP_BEGIN_NAMESPACE_STD

typedef ptrdiff_t streamsize;

class _LIBCPP_EXPORTED_FROM_ABI ios_base
{
public:
    class _LIBCPP_EXPORTED_FROM_ABI failure;

    typedef unsigned int fmtflags;
    static const fmtflags boolalpha   = 0x0001;
    static const fmtflags dec         = 0x0002;
    static const fmtflags fixed       = 0x0004;
    static const fmtflags hex         = 0x0008;
    static const fmtflags internal    = 0x0010;
    static const fmtflags left        = 0x0020;
    static const fmtflags oct         = 0x0040;
    static const fmtflags right       = 0x0080;
    static const fmtflags scientific  = 0x0100;
    static const fmtflags showbase    = 0x0200;
    static const fmtflags showpoint   = 0x0400;
    static const fmtflags showpos     = 0x0800;
    static const fmtflags skipws      = 0x1000;
    static const fmtflags unitbuf     = 0x2000;
    static const fmtflags uppercase   = 0x4000;
    static const fmtflags adjustfield = left | right | internal;
    static const fmtflags basefield   = dec | oct | hex;
    static const fmtflags floatfield  = scientific | fixed;

    typedef unsigned int iostate;
    static const iostate badbit  = 0x1;
    static const iostate eofbit  = 0x2;
    static const iostate failbit = 0x4;
    static const iostate goodbit = 0x0;

    typedef unsigned int openmode;
    static const openmode app    = 0x01;
    static const openmode ate    = 0x02;
    static const openmode binary = 0x04;
    static const openmode in     = 0x08;
    static const openmode out    = 0x10;
    static const openmode trunc  = 0x20;

    enum seekdir {beg, cur, end};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 290 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
    typedef iostate      io_state;
    typedef openmode     open_mode;
    typedef seekdir      seek_dir;

    typedef _VSTD::streamoff streamoff;
    typedef _VSTD::streampos streampos;
#endif
# 297 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3

    class _LIBCPP_EXPORTED_FROM_ABI Init;

    // 27.5.2.2 fmtflags state:
    _LIBCPP_INLINE_VISIBILITY fmtflags flags() const;
    _LIBCPP_INLINE_VISIBILITY fmtflags flags(fmtflags __fmtfl);
    _LIBCPP_INLINE_VISIBILITY fmtflags setf(fmtflags __fmtfl);
    _LIBCPP_INLINE_VISIBILITY fmtflags setf(fmtflags __fmtfl, fmtflags __mask);
    _LIBCPP_INLINE_VISIBILITY void unsetf(fmtflags __mask);

    _LIBCPP_INLINE_VISIBILITY streamsize precision() const;
    _LIBCPP_INLINE_VISIBILITY streamsize precision(streamsize __prec);
    _LIBCPP_INLINE_VISIBILITY streamsize width() const;
    _LIBCPP_INLINE_VISIBILITY streamsize width(streamsize __wide);

    // 27.5.2.3 locales:
    locale imbue(const locale& __loc);
    locale getloc() const;

    // 27.5.2.5 storage:
    static int xalloc();
    long& iword(int __index);
    void*& pword(int __index);

    // destructor
    virtual ~ios_base();

    // 27.5.2.6 callbacks;
    enum event { erase_event, imbue_event, copyfmt_event };
    typedef void (*event_callback)(event, ios_base&, int __index);
    void register_callback(event_callback __fn, int __index);

    ios_base(const ios_base&) = delete;
    ios_base& operator=(const ios_base&) = delete;

    static bool sync_with_stdio(bool __sync = true);

    _LIBCPP_INLINE_VISIBILITY iostate rdstate() const;
    void clear(iostate __state = goodbit);
    _LIBCPP_INLINE_VISIBILITY void setstate(iostate __state);

    _LIBCPP_INLINE_VISIBILITY bool good() const;
    _LIBCPP_INLINE_VISIBILITY bool eof() const;
    _LIBCPP_INLINE_VISIBILITY bool fail() const;
    _LIBCPP_INLINE_VISIBILITY bool bad() const;

    _LIBCPP_INLINE_VISIBILITY iostate exceptions() const;
    _LIBCPP_INLINE_VISIBILITY void exceptions(iostate __iostate);

    void __set_badbit_and_consider_rethrow();
    void __set_failbit_and_consider_rethrow();

    _LIBCPP_INLINE_VISIBILITY
    void __setstate_nothrow(iostate __state)
    {
        if (__rdbuf_)
            __rdstate_ |= __state;
        else
            __rdstate_ |= __state | ios_base::badbit;
    }

protected:
    _LIBCPP_INLINE_VISIBILITY
    ios_base() {// purposefully does no initialization
               }

    void init(void* __sb);
    _LIBCPP_INLINE_VISIBILITY void* rdbuf() const {return __rdbuf_;}

    _LIBCPP_INLINE_VISIBILITY
    void rdbuf(void* __sb)
    {
        __rdbuf_ = __sb;
        clear();
    }

    void __call_callbacks(event);
    void copyfmt(const ios_base&);
    void move(ios_base&);
    void swap(ios_base&) _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY
    void set_rdbuf(void* __sb)
    {
        __rdbuf_ = __sb;
    }

private:
    // All data members must be scalars
    fmtflags        __fmtflags_;
    streamsize      __precision_;
    streamsize      __width_;
    iostate         __rdstate_;
    iostate         __exceptions_;
    void*           __rdbuf_;
    void*           __loc_;
    event_callback* __fn_;
    int*            __index_;
    size_t          __event_size_;
    size_t          __event_cap_;
// TODO(EricWF): Enable this for both Clang and GCC. Currently it is only
// enabled with clang.
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_NO_THREADS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 400 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
    static atomic<int> __xindex_;
#else
# 402 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
    static int      __xindex_;
#endif
# 404 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
    long*           __iarray_;
    size_t          __iarray_size_;
    size_t          __iarray_cap_;
    void**          __parray_;
    size_t          __parray_size_;
    size_t          __parray_cap_;
};

//enum class io_errc
_LIBCPP_DECLARE_STRONG_ENUM(io_errc)
{
    stream = 1
};
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(io_errc)

template <>
struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<io_errc> : public true_type { };

#ifdef _LIBCPP_CXX03_LANG
template <>
struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<io_errc::__lx> : public true_type { };
#endif
# 426 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3

_LIBCPP_EXPORTED_FROM_ABI const error_category& iostream_category() _NOEXCEPT;

inline _LIBCPP_INLINE_VISIBILITY
error_code
make_error_code(io_errc __e) _NOEXCEPT
{
    return error_code(static_cast<int>(__e), iostream_category());
}

inline _LIBCPP_INLINE_VISIBILITY
error_condition
make_error_condition(io_errc __e) _NOEXCEPT
{
    return error_condition(static_cast<int>(__e), iostream_category());
}

class _LIBCPP_EXPORTED_FROM_ABI ios_base::failure
    : public system_error
{
public:
    explicit failure(const string& __msg, const error_code& __ec = io_errc::stream);
    explicit failure(const char* __msg, const error_code& __ec = io_errc::stream);
    _LIBCPP_HIDE_FROM_ABI failure(const failure&) _NOEXCEPT = default;
    ~failure() _NOEXCEPT override;
};

_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_failure(char const* __msg) {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    throw ios_base::failure(__msg);
#else
# 458 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
    _LIBCPP_VERBOSE_ABORT("ios_base::failure was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
# 460 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
}

class _LIBCPP_EXPORTED_FROM_ABI ios_base::Init
{
public:
    Init();
    ~Init();
};

// fmtflags

inline _LIBCPP_INLINE_VISIBILITY
ios_base::fmtflags
ios_base::flags() const
{
    return __fmtflags_;
}

inline _LIBCPP_INLINE_VISIBILITY
ios_base::fmtflags
ios_base::flags(fmtflags __fmtfl)
{
    fmtflags __r = __fmtflags_;
    __fmtflags_ = __fmtfl;
    return __r;
}

inline _LIBCPP_INLINE_VISIBILITY
ios_base::fmtflags
ios_base::setf(fmtflags __fmtfl)
{
    fmtflags __r = __fmtflags_;
    __fmtflags_ |= __fmtfl;
    return __r;
}

inline _LIBCPP_INLINE_VISIBILITY
void
ios_base::unsetf(fmtflags __mask)
{
    __fmtflags_ &= ~__mask;
}

inline _LIBCPP_INLINE_VISIBILITY
ios_base::fmtflags
ios_base::setf(fmtflags __fmtfl, fmtflags __mask)
{
    fmtflags __r = __fmtflags_;
    unsetf(__mask);
    __fmtflags_ |= __fmtfl & __mask;
    return __r;
}

// precision

inline _LIBCPP_INLINE_VISIBILITY
streamsize
ios_base::precision() const
{
    return __precision_;
}

inline _LIBCPP_INLINE_VISIBILITY
streamsize
ios_base::precision(streamsize __prec)
{
    streamsize __r = __precision_;
    __precision_ = __prec;
    return __r;
}

// width

inline _LIBCPP_INLINE_VISIBILITY
streamsize
ios_base::width() const
{
    return __width_;
}

inline _LIBCPP_INLINE_VISIBILITY
streamsize
ios_base::width(streamsize __wide)
{
    streamsize __r = __width_;
    __width_ = __wide;
    return __r;
}

// iostate

inline _LIBCPP_INLINE_VISIBILITY
ios_base::iostate
ios_base::rdstate() const
{
    return __rdstate_;
}

inline _LIBCPP_INLINE_VISIBILITY
void
ios_base::setstate(iostate __state)
{
    clear(__rdstate_ | __state);
}

inline _LIBCPP_INLINE_VISIBILITY
bool
ios_base::good() const
{
    return __rdstate_ == 0;
}

inline _LIBCPP_INLINE_VISIBILITY
bool
ios_base::eof() const
{
    return (__rdstate_ & eofbit) != 0;
}

inline _LIBCPP_INLINE_VISIBILITY
bool
ios_base::fail() const
{
    return (__rdstate_ & (failbit | badbit)) != 0;
}

inline _LIBCPP_INLINE_VISIBILITY
bool
ios_base::bad() const
{
    return (__rdstate_ & badbit) != 0;
}

inline _LIBCPP_INLINE_VISIBILITY
ios_base::iostate
ios_base::exceptions() const
{
    return __exceptions_;
}

inline _LIBCPP_INLINE_VISIBILITY
void
ios_base::exceptions(iostate __iostate)
{
    __exceptions_ = __iostate;
    clear(__rdstate_);
}

template <class _CharT, class _Traits>
class _LIBCPP_TEMPLATE_VIS basic_ios
    : public ios_base
{
public:
    // types:
    typedef _CharT char_type;
    typedef _Traits traits_type;

    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;

    static_assert((is_same<_CharT, typename traits_type::char_type>::value),
                  "traits_type::char_type must be the same type as CharT");

#ifdef _LIBCPP_CXX03_LANG
    // Preserve the ability to compare with literal 0,
    // and implicitly convert to bool, but not implicitly convert to int.
    _LIBCPP_INLINE_VISIBILITY
    operator void*() const {return fail() ? nullptr : (void*)this;}
#else
# 630 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
    _LIBCPP_INLINE_VISIBILITY
    explicit operator bool() const {return !fail();}
#endif
# 633 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3

    _LIBCPP_INLINE_VISIBILITY bool operator!() const    {return  fail();}
    _LIBCPP_INLINE_VISIBILITY iostate rdstate() const   {return ios_base::rdstate();}
    _LIBCPP_INLINE_VISIBILITY void clear(iostate __state = goodbit) {ios_base::clear(__state);}
    _LIBCPP_INLINE_VISIBILITY void setstate(iostate __state) {ios_base::setstate(__state);}
    _LIBCPP_INLINE_VISIBILITY bool good() const {return ios_base::good();}
    _LIBCPP_INLINE_VISIBILITY bool eof() const  {return ios_base::eof();}
    _LIBCPP_INLINE_VISIBILITY bool fail() const {return ios_base::fail();}
    _LIBCPP_INLINE_VISIBILITY bool bad() const  {return ios_base::bad();}

    _LIBCPP_INLINE_VISIBILITY iostate exceptions() const {return ios_base::exceptions();}
    _LIBCPP_INLINE_VISIBILITY void exceptions(iostate __iostate) {ios_base::exceptions(__iostate);}

    // 27.5.4.1 Constructor/destructor:
    _LIBCPP_INLINE_VISIBILITY
    explicit basic_ios(basic_streambuf<char_type,traits_type>* __sb);
    ~basic_ios() override;

    // 27.5.4.2 Members:
    _LIBCPP_INLINE_VISIBILITY
    basic_ostream<char_type, traits_type>* tie() const;
    _LIBCPP_INLINE_VISIBILITY
    basic_ostream<char_type, traits_type>* tie(basic_ostream<char_type, traits_type>* __tiestr);

    _LIBCPP_INLINE_VISIBILITY
    basic_streambuf<char_type, traits_type>* rdbuf() const;
    _LIBCPP_INLINE_VISIBILITY
    basic_streambuf<char_type, traits_type>* rdbuf(basic_streambuf<char_type, traits_type>* __sb);

    basic_ios& copyfmt(const basic_ios& __rhs);

    _LIBCPP_INLINE_VISIBILITY
    char_type fill() const;
    _LIBCPP_INLINE_VISIBILITY
    char_type fill(char_type __ch);

    _LIBCPP_INLINE_VISIBILITY
    locale imbue(const locale& __loc);

    _LIBCPP_INLINE_VISIBILITY
    char narrow(char_type __c, char __dfault) const;
    _LIBCPP_INLINE_VISIBILITY
    char_type widen(char __c) const;

protected:
    _LIBCPP_INLINE_VISIBILITY
    basic_ios() {// purposefully does no initialization
                }
    _LIBCPP_INLINE_VISIBILITY
    void init(basic_streambuf<char_type, traits_type>* __sb);

    _LIBCPP_INLINE_VISIBILITY
    void move(basic_ios& __rhs);
    _LIBCPP_INLINE_VISIBILITY
    void move(basic_ios&& __rhs) {move(__rhs);}
    _LIBCPP_INLINE_VISIBILITY
    void swap(basic_ios& __rhs) _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY
    void set_rdbuf(basic_streambuf<char_type, traits_type>* __sb);
private:
    basic_ostream<char_type, traits_type>* __tie_;
    mutable int_type __fill_;
};

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
basic_ios<_CharT, _Traits>::basic_ios(basic_streambuf<char_type,traits_type>* __sb)
{
    init(__sb);
}

template <class _CharT, class _Traits>
basic_ios<_CharT, _Traits>::~basic_ios()
{
}

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
void
basic_ios<_CharT, _Traits>::init(basic_streambuf<char_type, traits_type>* __sb)
{
    ios_base::init(__sb);
    __tie_ = nullptr;
    __fill_ = traits_type::eof();
}

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
basic_ostream<_CharT, _Traits>*
basic_ios<_CharT, _Traits>::tie() const
{
    return __tie_;
}

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
basic_ostream<_CharT, _Traits>*
basic_ios<_CharT, _Traits>::tie(basic_ostream<char_type, traits_type>* __tiestr)
{
    basic_ostream<char_type, traits_type>* __r = __tie_;
    __tie_ = __tiestr;
    return __r;
}

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
basic_streambuf<_CharT, _Traits>*
basic_ios<_CharT, _Traits>::rdbuf() const
{
    return static_cast<basic_streambuf<char_type, traits_type>*>(ios_base::rdbuf());
}

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
basic_streambuf<_CharT, _Traits>*
basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<char_type, traits_type>* __sb)
{
    basic_streambuf<char_type, traits_type>* __r = rdbuf();
    ios_base::rdbuf(__sb);
    return __r;
}

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
locale
basic_ios<_CharT, _Traits>::imbue(const locale& __loc)
{
    locale __r = getloc();
    ios_base::imbue(__loc);
    if (rdbuf())
        rdbuf()->pubimbue(__loc);
    return __r;
}

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
char
basic_ios<_CharT, _Traits>::narrow(char_type __c, char __dfault) const
{
    return std::use_facet<ctype<char_type> >(getloc()).narrow(__c, __dfault);
}

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
_CharT
basic_ios<_CharT, _Traits>::widen(char __c) const
{
    return std::use_facet<ctype<char_type> >(getloc()).widen(__c);
}

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
_CharT
basic_ios<_CharT, _Traits>::fill() const
{
    if (traits_type::eq_int_type(traits_type::eof(), __fill_))
        __fill_ = widen(' ');
    return __fill_;
}

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
_CharT
basic_ios<_CharT, _Traits>::fill(char_type __ch)
{
    if (traits_type::eq_int_type(traits_type::eof(), __fill_))
        __fill_ = widen(' ');
    char_type __r = __fill_;
    __fill_ = __ch;
    return __r;
}

template <class _CharT, class _Traits>
basic_ios<_CharT, _Traits>&
basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs)
{
    if (this != &__rhs)
    {
        __call_callbacks(erase_event);
        ios_base::copyfmt(__rhs);
        __tie_ = __rhs.__tie_;
        __fill_ = __rhs.__fill_;
        __call_callbacks(copyfmt_event);
        exceptions(__rhs.exceptions());
    }
    return *this;
}

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
void
basic_ios<_CharT, _Traits>::move(basic_ios& __rhs)
{
    ios_base::move(__rhs);
    __tie_ = __rhs.__tie_;
    __rhs.__tie_ = nullptr;
    __fill_ = __rhs.__fill_;
}

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
void
basic_ios<_CharT, _Traits>::swap(basic_ios& __rhs) _NOEXCEPT
{
    ios_base::swap(__rhs);
    _VSTD::swap(__tie_, __rhs.__tie_);
    _VSTD::swap(__fill_, __rhs.__fill_);
}

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
void
basic_ios<_CharT, _Traits>::set_rdbuf(basic_streambuf<char_type, traits_type>* __sb)
{
    ios_base::set_rdbuf(__sb);
}

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<char>;

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<wchar_t>;
#endif
# 855 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
boolalpha(ios_base& __str)
{
    __str.setf(ios_base::boolalpha);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
noboolalpha(ios_base& __str)
{
    __str.unsetf(ios_base::boolalpha);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
showbase(ios_base& __str)
{
    __str.setf(ios_base::showbase);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
noshowbase(ios_base& __str)
{
    __str.unsetf(ios_base::showbase);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
showpoint(ios_base& __str)
{
    __str.setf(ios_base::showpoint);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
noshowpoint(ios_base& __str)
{
    __str.unsetf(ios_base::showpoint);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
showpos(ios_base& __str)
{
    __str.setf(ios_base::showpos);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
noshowpos(ios_base& __str)
{
    __str.unsetf(ios_base::showpos);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
skipws(ios_base& __str)
{
    __str.setf(ios_base::skipws);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
noskipws(ios_base& __str)
{
    __str.unsetf(ios_base::skipws);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
uppercase(ios_base& __str)
{
    __str.setf(ios_base::uppercase);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
nouppercase(ios_base& __str)
{
    __str.unsetf(ios_base::uppercase);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
unitbuf(ios_base& __str)
{
    __str.setf(ios_base::unitbuf);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
nounitbuf(ios_base& __str)
{
    __str.unsetf(ios_base::unitbuf);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
internal(ios_base& __str)
{
    __str.setf(ios_base::internal, ios_base::adjustfield);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
left(ios_base& __str)
{
    __str.setf(ios_base::left, ios_base::adjustfield);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
right(ios_base& __str)
{
    __str.setf(ios_base::right, ios_base::adjustfield);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
dec(ios_base& __str)
{
    __str.setf(ios_base::dec, ios_base::basefield);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
hex(ios_base& __str)
{
    __str.setf(ios_base::hex, ios_base::basefield);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
oct(ios_base& __str)
{
    __str.setf(ios_base::oct, ios_base::basefield);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
fixed(ios_base& __str)
{
    __str.setf(ios_base::fixed, ios_base::floatfield);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
scientific(ios_base& __str)
{
    __str.setf(ios_base::scientific, ios_base::floatfield);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
hexfloat(ios_base& __str)
{
    __str.setf(ios_base::fixed | ios_base::scientific, ios_base::floatfield);
    return __str;
}

_LIBCPP_HIDE_FROM_ABI inline
ios_base&
defaultfloat(ios_base& __str)
{
    __str.unsetf(ios_base::floatfield);
    return __str;
}

_LIBCPP_END_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1051 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#  include <atomic>
#endif /* expanded by -frewrite-includes */
# 1051 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 1052 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 1052 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 1053 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstddef>
#endif /* expanded by -frewrite-includes */
# 1053 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 1054 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 1054 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 1055 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstring>
#endif /* expanded by -frewrite-includes */
# 1055 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 1056 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#  include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 1056 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 1057 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#  include <limits>
#endif /* expanded by -frewrite-includes */
# 1057 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 1058 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#  include <mutex>
#endif /* expanded by -frewrite-includes */
# 1058 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 1059 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#  include <new>
#endif /* expanded by -frewrite-includes */
# 1059 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 1060 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#  include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 1060 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 1061 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#  include <system_error>
#endif /* expanded by -frewrite-includes */
# 1061 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 1062 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 1062 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 1063 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#if 0 /* expanded by -frewrite-includes */
#  include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 1063 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
# 1064 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#endif
# 1065 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3

#endif // _LIBCPP_IOS
# 1067 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ios" 3
#endif /* ios expanded by -frewrite-includes */
# 180 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* locale expanded by -frewrite-includes */
#include <locale>
#else /* locale expanded by -frewrite-includes */
# 180 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_LOCALE
#define _LIBCPP_LOCALE

/*
    locale synopsis

namespace std
{

class locale
{
public:
    // types:
    class facet;
    class id;

    typedef int category;
    static const category // values assigned here are for exposition only
        none     = 0x000,
        collate  = 0x010,
        ctype    = 0x020,
        monetary = 0x040,
        numeric  = 0x080,
        time     = 0x100,
        messages = 0x200,
        all = collate | ctype | monetary | numeric | time | messages;

    // construct/copy/destroy:
    locale() noexcept;
    locale(const locale& other) noexcept;
    explicit locale(const char* std_name);
    explicit locale(const string& std_name);
    locale(const locale& other, const char* std_name, category);
    locale(const locale& other, const string& std_name, category);
    template <class Facet> locale(const locale& other, Facet* f);
    locale(const locale& other, const locale& one, category);

    ~locale(); // not virtual

    const locale& operator=(const locale& other) noexcept;

    template <class Facet> locale combine(const locale& other) const;

    // locale operations:
    basic_string<char> name() const;
    bool operator==(const locale& other) const;
    bool operator!=(const locale& other) const;                              // removed C++20
    template <class charT, class Traits, class Allocator>
      bool operator()(const basic_string<charT,Traits,Allocator>& s1,
                      const basic_string<charT,Traits,Allocator>& s2) const;

    // global locale objects:
    static locale global(const locale&);
    static const locale& classic();
};

template <class Facet> const Facet& use_facet(const locale&);
template <class Facet> bool has_facet(const locale&) noexcept;

// 22.3.3, convenience interfaces:
template <class charT> bool isspace (charT c, const locale& loc);
template <class charT> bool isprint (charT c, const locale& loc);
template <class charT> bool iscntrl (charT c, const locale& loc);
template <class charT> bool isupper (charT c, const locale& loc);
template <class charT> bool islower (charT c, const locale& loc);
template <class charT> bool isalpha (charT c, const locale& loc);
template <class charT> bool isdigit (charT c, const locale& loc);
template <class charT> bool ispunct (charT c, const locale& loc);
template <class charT> bool isxdigit(charT c, const locale& loc);
template <class charT> bool isalnum (charT c, const locale& loc);
template <class charT> bool isgraph (charT c, const locale& loc);
template <class charT> charT toupper(charT c, const locale& loc);
template <class charT> charT tolower(charT c, const locale& loc);

template<class Codecvt, class Elem = wchar_t,
         class Wide_alloc = allocator<Elem>,
         class Byte_alloc = allocator<char>>
class wstring_convert
{
public:
    typedef basic_string<char, char_traits<char>, Byte_alloc> byte_string;
    typedef basic_string<Elem, char_traits<Elem>, Wide_alloc> wide_string;
    typedef typename Codecvt::state_type                      state_type;
    typedef typename wide_string::traits_type::int_type       int_type;

    wstring_convert(Codecvt* pcvt = new Codecvt);          // before C++14
    explicit wstring_convert(Codecvt* pcvt = new Codecvt); // before C++20
    wstring_convert() : wstring_convert(new Codecvt) {}    // C++20
    explicit wstring_convert(Codecvt* pcvt);               // C++20

    wstring_convert(Codecvt* pcvt, state_type state);
    explicit wstring_convert(const byte_string& byte_err,           // explicit in C++14
                    const wide_string& wide_err = wide_string());
    wstring_convert(const wstring_convert&) = delete;               // C++14
    wstring_convert & operator=(const wstring_convert &) = delete;  // C++14
    ~wstring_convert();

    wide_string from_bytes(char byte);
    wide_string from_bytes(const char* ptr);
    wide_string from_bytes(const byte_string& str);
    wide_string from_bytes(const char* first, const char* last);

    byte_string to_bytes(Elem wchar);
    byte_string to_bytes(const Elem* wptr);
    byte_string to_bytes(const wide_string& wstr);
    byte_string to_bytes(const Elem* first, const Elem* last);

    size_t converted() const; // noexcept in C++14
    state_type state() const;
};

template <class Codecvt, class Elem = wchar_t, class Tr = char_traits<Elem>>
class wbuffer_convert
    : public basic_streambuf<Elem, Tr>
{
public:
    typedef typename Tr::state_type state_type;

    wbuffer_convert(streambuf* bytebuf = 0, Codecvt* pcvt = new Codecvt,
                    state_type state = state_type());          // before C++14
    explicit wbuffer_convert(streambuf* bytebuf = nullptr, Codecvt* pcvt = new Codecvt,
                            state_type state = state_type()); // before C++20
    wbuffer_convert() : wbuffer_convert(nullptr) {} // C++20
    explicit wbuffer_convert(streambuf* bytebuf, Codecvt* pcvt = new Codecvt,
                            state_type state = state_type()); // C++20

    wbuffer_convert(const wbuffer_convert&) = delete;               // C++14
    wbuffer_convert & operator=(const wbuffer_convert &) = delete;  // C++14
    ~wbuffer_convert();                                             // C++14

    streambuf* rdbuf() const;
    streambuf* rdbuf(streambuf* bytebuf);

    state_type state() const;
};

// 22.4.1 and 22.4.1.3, ctype:
class ctype_base;
template <class charT> class ctype;
template <> class ctype<char>; // specialization
template <class charT> class ctype_byname;
template <> class ctype_byname<char>; // specialization

class codecvt_base;
template <class internT, class externT, class stateT> class codecvt;
template <class internT, class externT, class stateT> class codecvt_byname;

// 22.4.2 and 22.4.3, numeric:
template <class charT, class InputIterator> class num_get;
template <class charT, class OutputIterator> class num_put;
template <class charT> class numpunct;
template <class charT> class numpunct_byname;

// 22.4.4, col lation:
template <class charT> class collate;
template <class charT> class collate_byname;

// 22.4.5, date and time:
class time_base;
template <class charT, class InputIterator> class time_get;
template <class charT, class InputIterator> class time_get_byname;
template <class charT, class OutputIterator> class time_put;
template <class charT, class OutputIterator> class time_put_byname;

// 22.4.6, money:
class money_base;
template <class charT, class InputIterator> class money_get;
template <class charT, class OutputIterator> class money_put;
template <class charT, bool Intl> class moneypunct;
template <class charT, bool Intl> class moneypunct_byname;

// 22.4.7, message retrieval:
class messages_base;
template <class charT> class messages;
template <class charT> class messages_byname;

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy.h>
#endif /* expanded by -frewrite-includes */
# 190 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 191 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/equal.h>
#endif /* expanded by -frewrite-includes */
# 191 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 192 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/find.h>
#endif /* expanded by -frewrite-includes */
# 192 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 193 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/max.h>
#endif /* expanded by -frewrite-includes */
# 193 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 194 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/reverse.h>
#endif /* expanded by -frewrite-includes */
# 194 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 195 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/unwrap_iter.h>
#endif /* expanded by -frewrite-includes */
# 195 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 196 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 196 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 197 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 197 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 198 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/access.h>
#endif /* expanded by -frewrite-includes */
# 198 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 199 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/back_insert_iterator.h>
#endif /* expanded by -frewrite-includes */
# 199 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 200 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/istreambuf_iterator.h>
#endif /* expanded by -frewrite-includes */
# 200 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 201 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/ostreambuf_iterator.h>
#endif /* expanded by -frewrite-includes */
# 201 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__locale>
#endif /* expanded by -frewrite-includes */
# 202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 203 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/unique_ptr.h>
#endif /* expanded by -frewrite-includes */
# 203 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 205 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <cerrno>
#endif /* expanded by -frewrite-includes */
# 205 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdio>
#endif /* expanded by -frewrite-includes */
# 206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 207 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 207 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <ctime>
#endif /* expanded by -frewrite-includes */
# 208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <ios>
#endif /* expanded by -frewrite-includes */
# 209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 210 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 210 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 211 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 211 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* streambuf expanded by -frewrite-includes */
#include <streambuf>
#else /* streambuf expanded by -frewrite-includes */
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_STREAMBUF
#define _LIBCPP_STREAMBUF

/*
    streambuf synopsis

namespace std
{

template <class charT, class traits = char_traits<charT> >
class basic_streambuf
{
public:
    // types:
    typedef charT char_type;
    typedef traits traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;

    virtual ~basic_streambuf();

    // 27.6.2.2.1 locales:
    locale pubimbue(const locale& loc);
    locale getloc() const;

    // 27.6.2.2.2 buffer and positioning:
    basic_streambuf* pubsetbuf(char_type* s, streamsize n);
    pos_type pubseekoff(off_type off, ios_base::seekdir way,
                        ios_base::openmode which = ios_base::in | ios_base::out);
    pos_type pubseekpos(pos_type sp,
                        ios_base::openmode which = ios_base::in | ios_base::out);
    int pubsync();

    // Get and put areas:
    // 27.6.2.2.3 Get area:
    streamsize in_avail();
    int_type snextc();
    int_type sbumpc();
    int_type sgetc();
    streamsize sgetn(char_type* s, streamsize n);

    // 27.6.2.2.4 Putback:
    int_type sputbackc(char_type c);
    int_type sungetc();

    // 27.6.2.2.5 Put area:
    int_type sputc(char_type c);
    streamsize sputn(const char_type* s, streamsize n);

protected:
    basic_streambuf();
    basic_streambuf(const basic_streambuf& rhs);
    basic_streambuf& operator=(const basic_streambuf& rhs);
    void swap(basic_streambuf& rhs);

    // 27.6.2.3.2 Get area:
    char_type* eback() const;
    char_type* gptr() const;
    char_type* egptr() const;
    void gbump(int n);
    void setg(char_type* gbeg, char_type* gnext, char_type* gend);

    // 27.6.2.3.3 Put area:
    char_type* pbase() const;
    char_type* pptr() const;
    char_type* epptr() const;
    void pbump(int n);
    void setp(char_type* pbeg, char_type* pend);

    // 27.6.2.4 virtual functions:
    // 27.6.2.4.1 Locales:
    virtual void imbue(const locale& loc);

    // 27.6.2.4.2 Buffer management and positioning:
    virtual basic_streambuf* setbuf(char_type* s, streamsize n);
    virtual pos_type seekoff(off_type off, ios_base::seekdir way,
                             ios_base::openmode which = ios_base::in | ios_base::out);
    virtual pos_type seekpos(pos_type sp,
                             ios_base::openmode which = ios_base::in | ios_base::out);
    virtual int sync();

    // 27.6.2.4.3 Get area:
    virtual streamsize showmanyc();
    virtual streamsize xsgetn(char_type* s, streamsize n);
    virtual int_type underflow();
    virtual int_type uflow();

    // 27.6.2.4.4 Putback:
    virtual int_type pbackfail(int_type c = traits_type::eof());

    // 27.6.2.4.5 Put area:
    virtual streamsize xsputn(const char_type* s, streamsize n);
    virtual int_type overflow (int_type c = traits_type::eof());
};

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/streambuf.h>
#endif /* expanded by -frewrite-includes */
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
# 114 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
#if 0 /* expanded by -frewrite-includes */
#include <ios>
#endif /* expanded by -frewrite-includes */
# 114 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
# 115 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 115 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
# 116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 119 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
#endif
# 121 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 123 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _CharT, class _Traits>
class _LIBCPP_TEMPLATE_VIS basic_streambuf
{
public:
    // types:
    typedef _CharT                         char_type;
    typedef _Traits                        traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;

    static_assert((is_same<_CharT, typename traits_type::char_type>::value),
                  "traits_type::char_type must be the same type as CharT");

    virtual ~basic_streambuf();

    // 27.6.2.2.1 locales:
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    locale pubimbue(const locale& __loc) {
        imbue(__loc);
        locale __r = __loc_;
        __loc_ = __loc;
        return __r;
    }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    locale getloc() const { return __loc_; }

    // 27.6.2.2.2 buffer and positioning:
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    basic_streambuf* pubsetbuf(char_type* __s, streamsize __n)
    { return setbuf(__s, __n); }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    pos_type pubseekoff(off_type __off, ios_base::seekdir __way,
                        ios_base::openmode __which = ios_base::in | ios_base::out)
    { return seekoff(__off, __way, __which); }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    pos_type pubseekpos(pos_type __sp,
                        ios_base::openmode __which = ios_base::in | ios_base::out)
    { return seekpos(__sp, __which); }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    int pubsync() { return sync(); }

    // Get and put areas:
    // 27.6.2.2.3 Get area:
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    streamsize in_avail() {
        if (__ninp_ < __einp_)
            return static_cast<streamsize>(__einp_ - __ninp_);
        return showmanyc();
    }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    int_type snextc() {
        if (sbumpc() == traits_type::eof())
            return traits_type::eof();
        return sgetc();
    }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    int_type sbumpc() {
        if (__ninp_ == __einp_)
            return uflow();
        return traits_type::to_int_type(*__ninp_++);
    }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    int_type sgetc() {
        if (__ninp_ == __einp_)
            return underflow();
        return traits_type::to_int_type(*__ninp_);
    }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    streamsize sgetn(char_type* __s, streamsize __n)
    { return xsgetn(__s, __n); }

    // 27.6.2.2.4 Putback:
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    int_type sputbackc(char_type __c) {
        if (__binp_ == __ninp_ || !traits_type::eq(__c, __ninp_[-1]))
            return pbackfail(traits_type::to_int_type(__c));
        return traits_type::to_int_type(*--__ninp_);
    }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    int_type sungetc() {
        if (__binp_ == __ninp_)
          return pbackfail();
        return traits_type::to_int_type(*--__ninp_);
    }

    // 27.6.2.2.5 Put area:
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    int_type sputc(char_type __c) {
        if (__nout_ == __eout_)
            return overflow(traits_type::to_int_type(__c));
        *__nout_++ = __c;
        return traits_type::to_int_type(__c);
    }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    streamsize sputn(const char_type* __s, streamsize __n)
    { return xsputn(__s, __n); }

protected:
    basic_streambuf();
    basic_streambuf(const basic_streambuf& __rhs);
    basic_streambuf& operator=(const basic_streambuf& __rhs);
    void swap(basic_streambuf& __rhs);

    // 27.6.2.3.2 Get area:
    _LIBCPP_INLINE_VISIBILITY char_type* eback() const {return __binp_;}
    _LIBCPP_INLINE_VISIBILITY char_type* gptr()  const {return __ninp_;}
    _LIBCPP_INLINE_VISIBILITY char_type* egptr() const {return __einp_;}

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    void gbump(int __n) { __ninp_ += __n; }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    void setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) {
        __binp_ = __gbeg;
        __ninp_ = __gnext;
        __einp_ = __gend;
    }

    // 27.6.2.3.3 Put area:
    _LIBCPP_INLINE_VISIBILITY char_type* pbase() const {return __bout_;}
    _LIBCPP_INLINE_VISIBILITY char_type* pptr()  const {return __nout_;}
    _LIBCPP_INLINE_VISIBILITY char_type* epptr() const {return __eout_;}

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    void pbump(int __n) { __nout_ += __n; }

    _LIBCPP_INLINE_VISIBILITY
    void __pbump(streamsize __n) { __nout_ += __n; }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    void setp(char_type* __pbeg, char_type* __pend) {
        __bout_ = __nout_ = __pbeg;
        __eout_ = __pend;
    }

    // 27.6.2.4 virtual functions:
    // 27.6.2.4.1 Locales:
    virtual void imbue(const locale& __loc);

    // 27.6.2.4.2 Buffer management and positioning:
    virtual basic_streambuf* setbuf(char_type* __s, streamsize __n);
    virtual pos_type seekoff(off_type __off, ios_base::seekdir __way,
                             ios_base::openmode __which = ios_base::in | ios_base::out);
    virtual pos_type seekpos(pos_type __sp,
                             ios_base::openmode __which = ios_base::in | ios_base::out);
    virtual int sync();

    // 27.6.2.4.3 Get area:
    virtual streamsize showmanyc();
    virtual streamsize xsgetn(char_type* __s, streamsize __n);
    virtual int_type underflow();
    virtual int_type uflow();

    // 27.6.2.4.4 Putback:
    virtual int_type pbackfail(int_type __c = traits_type::eof());

    // 27.6.2.4.5 Put area:
    virtual streamsize xsputn(const char_type* __s, streamsize __n);
    virtual int_type overflow(int_type __c = traits_type::eof());

private:
    locale __loc_;
    char_type* __binp_;
    char_type* __ninp_;
    char_type* __einp_;
    char_type* __bout_;
    char_type* __nout_;
    char_type* __eout_;
};

template <class _CharT, class _Traits>
basic_streambuf<_CharT, _Traits>::~basic_streambuf()
{
}

template <class _CharT, class _Traits>
basic_streambuf<_CharT, _Traits>::basic_streambuf()
    : __binp_(nullptr),
      __ninp_(nullptr),
      __einp_(nullptr),
      __bout_(nullptr),
      __nout_(nullptr),
      __eout_(nullptr)
{
}

template <class _CharT, class _Traits>
basic_streambuf<_CharT, _Traits>::basic_streambuf(const basic_streambuf& __sb)
    : __loc_(__sb.__loc_),
      __binp_(__sb.__binp_),
      __ninp_(__sb.__ninp_),
      __einp_(__sb.__einp_),
      __bout_(__sb.__bout_),
      __nout_(__sb.__nout_),
      __eout_(__sb.__eout_)
{
}

template <class _CharT, class _Traits>
basic_streambuf<_CharT, _Traits>&
basic_streambuf<_CharT, _Traits>::operator=(const basic_streambuf& __sb)
{
    __loc_ = __sb.__loc_;
    __binp_ = __sb.__binp_;
    __ninp_ = __sb.__ninp_;
    __einp_ = __sb.__einp_;
    __bout_ = __sb.__bout_;
    __nout_ = __sb.__nout_;
    __eout_ = __sb.__eout_;
    return *this;
}

template <class _CharT, class _Traits>
void
basic_streambuf<_CharT, _Traits>::swap(basic_streambuf& __sb)
{
    _VSTD::swap(__loc_, __sb.__loc_);
    _VSTD::swap(__binp_, __sb.__binp_);
    _VSTD::swap(__ninp_, __sb.__ninp_);
    _VSTD::swap(__einp_, __sb.__einp_);
    _VSTD::swap(__bout_, __sb.__bout_);
    _VSTD::swap(__nout_, __sb.__nout_);
    _VSTD::swap(__eout_, __sb.__eout_);
}

template <class _CharT, class _Traits>
void
basic_streambuf<_CharT, _Traits>::imbue(const locale&)
{
}

template <class _CharT, class _Traits>
basic_streambuf<_CharT, _Traits>*
basic_streambuf<_CharT, _Traits>::setbuf(char_type*, streamsize)
{
    return this;
}

template <class _CharT, class _Traits>
typename basic_streambuf<_CharT, _Traits>::pos_type
basic_streambuf<_CharT, _Traits>::seekoff(off_type, ios_base::seekdir,
                                          ios_base::openmode)
{
    return pos_type(off_type(-1));
}

template <class _CharT, class _Traits>
typename basic_streambuf<_CharT, _Traits>::pos_type
basic_streambuf<_CharT, _Traits>::seekpos(pos_type, ios_base::openmode)
{
    return pos_type(off_type(-1));
}

template <class _CharT, class _Traits>
int
basic_streambuf<_CharT, _Traits>::sync()
{
    return 0;
}

template <class _CharT, class _Traits>
streamsize
basic_streambuf<_CharT, _Traits>::showmanyc()
{
    return 0;
}

template <class _CharT, class _Traits>
streamsize
basic_streambuf<_CharT, _Traits>::xsgetn(char_type* __s, streamsize __n)
{
    const int_type __eof = traits_type::eof();
    int_type __c;
    streamsize __i = 0;
    while(__i < __n)
    {
        if (__ninp_ < __einp_)
        {
            const streamsize __len = _VSTD::min(static_cast<streamsize>(INT_MAX),
                                _VSTD::min(__einp_ - __ninp_, __n - __i));
            traits_type::copy(__s, __ninp_, __len);
            __s +=  __len;
            __i +=  __len;
            this->gbump(__len);
        }
        else if ((__c = uflow()) != __eof)
        {
            *__s = traits_type::to_char_type(__c);
            ++__s;
            ++__i;
        }
        else
            break;
    }
    return __i;
}

template <class _CharT, class _Traits>
typename basic_streambuf<_CharT, _Traits>::int_type
basic_streambuf<_CharT, _Traits>::underflow()
{
    return traits_type::eof();
}

template <class _CharT, class _Traits>
typename basic_streambuf<_CharT, _Traits>::int_type
basic_streambuf<_CharT, _Traits>::uflow()
{
    if (underflow() == traits_type::eof())
        return traits_type::eof();
    return traits_type::to_int_type(*__ninp_++);
}

template <class _CharT, class _Traits>
typename basic_streambuf<_CharT, _Traits>::int_type
basic_streambuf<_CharT, _Traits>::pbackfail(int_type)
{
    return traits_type::eof();
}

template <class _CharT, class _Traits>
streamsize
basic_streambuf<_CharT, _Traits>::xsputn(const char_type* __s, streamsize __n)
{
    streamsize __i = 0;
    int_type __eof = traits_type::eof();
    while( __i < __n)
    {
        if (__nout_ >= __eout_)
        {
            if (overflow(traits_type::to_int_type(*__s)) == __eof)
                break;
            ++__s;
            ++__i;
        }
        else
        {
            streamsize __chunk_size = _VSTD::min(__eout_ - __nout_, __n - __i);
            traits_type::copy(__nout_, __s, __chunk_size);
            __nout_ += __chunk_size;
            __s     += __chunk_size;
            __i     += __chunk_size;
        }
    }
    return __i;
}

template <class _CharT, class _Traits>
typename basic_streambuf<_CharT, _Traits>::int_type
basic_streambuf<_CharT, _Traits>::overflow(int_type)
{
    return traits_type::eof();
}

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<char>;

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<wchar_t>;
#endif
# 497 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP_STREAMBUF
# 503 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/streambuf" 3
#endif /* streambuf expanded by -frewrite-includes */
# 213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 214 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

// TODO: Fix __bsd_locale_defaults.h
// NOLINTBEGIN(libcpp-robust-against-adl)

#if 0 /* disabled by -frewrite-includes */
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 219 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
// Most unix variants have catopen.  These are the specific ones that don't.
#if 0 /* disabled by -frewrite-includes */
#  if !defined(__BIONIC__) && !defined(_NEWLIB_VERSION) && !defined(__EMSCRIPTEN__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 221 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#    define _LIBCPP_HAS_CATOPEN 1
#if 0 /* expanded by -frewrite-includes */
#    include <nl_types.h>
#endif /* expanded by -frewrite-includes */
# 222 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 223 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#  endif
# 224 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#endif
# 225 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
#if 0 /* expanded by -frewrite-includes */
#  include <__locale_dir/locale_base_api/bsd_locale_defaults.h>
#endif /* expanded by -frewrite-includes */
# 227 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 228 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#else
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* bsd_locale_fallbacks.h expanded by -frewrite-includes */
#  include <__locale_dir/locale_base_api/bsd_locale_fallbacks.h>
#else /* bsd_locale_fallbacks.h expanded by -frewrite-includes */
# 229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// The BSDs have lots of *_l functions.  This file provides reimplementations
// of those functions for non-BSD platforms.
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___LOCALE_LOCALE_BASE_API_BSD_LOCALE_FALLBACKS_H
#define _LIBCPP___LOCALE_LOCALE_BASE_API_BSD_LOCALE_FALLBACKS_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* locale_guard.h expanded by -frewrite-includes */
#include <__locale_dir/locale_base_api/locale_guard.h>
#else /* locale_guard.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/locale_guard.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___LOCALE_LOCALE_BASE_API_LOCALE_GUARD_H
#define _LIBCPP___LOCALE_LOCALE_BASE_API_LOCALE_GUARD_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/locale_guard.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/locale_guard.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__locale> // for locale_t
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/locale_guard.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/locale_guard.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <clocale>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/locale_guard.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/locale_guard.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/locale_guard.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/locale_guard.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/locale_guard.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_LOCALE__L_EXTENSIONS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/locale_guard.h" 3
struct __libcpp_locale_guard {
  _LIBCPP_INLINE_VISIBILITY __libcpp_locale_guard(locale_t& __loc) : __old_loc_(uselocale(__loc)) {}

  _LIBCPP_INLINE_VISIBILITY ~__libcpp_locale_guard() {
    if (__old_loc_)
      uselocale(__old_loc_);
  }

  locale_t __old_loc_;

private:
  __libcpp_locale_guard(__libcpp_locale_guard const&);
  __libcpp_locale_guard& operator=(__libcpp_locale_guard const&);
};
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_LIBCPP_MSVCRT_LIKE)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/locale_guard.h" 3
struct __libcpp_locale_guard {
    __libcpp_locale_guard(locale_t __l) :
        __status(_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)) {
      // Setting the locale can be expensive even when the locale given is
      // already the current locale, so do an explicit check to see if the
      // current locale is already the one we want.
      const char* __lc = __setlocale(nullptr);
      // If every category is the same, the locale string will simply be the
      // locale name, otherwise it will be a semicolon-separated string listing
      // each category.  In the second case, we know at least one category won't
      // be what we want, so we only have to check the first case.
      if (_VSTD::strcmp(__l.__get_locale(), __lc) != 0) {
        __locale_all = _strdup(__lc);
        if (__locale_all == nullptr)
          __throw_bad_alloc();
        __setlocale(__l.__get_locale());
      }
    }
    ~__libcpp_locale_guard() {
      // The CRT documentation doesn't explicitly say, but setlocale() does the
      // right thing when given a semicolon-separated list of locale settings
      // for the different categories in the same format as returned by
      // setlocale(LC_ALL, nullptr).
      if (__locale_all != nullptr) {
        __setlocale(__locale_all);
        free(__locale_all);
      }
      _configthreadlocale(__status);
    }
    static const char* __setlocale(const char* __locale) {
      const char* __new_locale = setlocale(LC_ALL, __locale);
      if (__new_locale == nullptr)
        __throw_bad_alloc();
      return __new_locale;
    }
    int __status;
    char* __locale_all = nullptr;
};
#endif
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/locale_guard.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___LOCALE_LOCALE_BASE_API_LOCALE_GUARD_H
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/locale_guard.h" 3
#endif /* locale_guard.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdio>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdarg.h expanded by -frewrite-includes */
#include <stdarg.h>
#else /* stdarg.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 1 3
/*===---- stdarg.h - Variable argument handling ----------------------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

/*
 * This header is designed to be included multiple times. If any of the __need_
 * macros are defined, then only that subset of interfaces are provided. This
 * can be useful for POSIX headers that need to not expose all of stdarg.h, but
 * need to use some of its interfaces. Otherwise this header provides all of
 * the expected interfaces.
 *
 * When clang modules are enabled, this header is a textual header. It ignores
 * its header guard so that multiple submodules can export its interfaces.
 * Take module SM with submodules A and B, whose headers both include stdarg.h
 * When SM.A builds, __STDARG_H will be defined. When SM.B builds, the
 * definition from SM.A will leak when building without local submodule
 * visibility. stdarg.h wouldn't include any of its implementation headers, and
 * SM.B wouldn't import any of the stdarg modules, and SM.B's `export *`
 * wouldn't export any stdarg interfaces as expected. However, since stdarg.h
 * ignores its header guard when building with modules, it all works as
 * expected.
 *
 * When clang modules are not enabled, the header guards can function in the
 * normal simple fashion.
 */
#if 0 /* disabled by -frewrite-includes */
#if !defined(__STDARG_H) || __has_feature(modules) ||                          \
    defined(__need___va_list) || defined(__need_va_list) ||                    \
    defined(__need_va_arg) || defined(__need___va_copy) ||                     \
    defined(__need_va_copy)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(__need___va_list) && !defined(__need_va_list) &&                  \
    !defined(__need_va_arg) && !defined(__need___va_copy) &&                   \
    !defined(__need_va_copy)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3
#define __STDARG_H
#define __need___va_list
#define __need_va_list
#define __need_va_arg
#define __need___va_copy
/* GCC always defines __va_copy, but does not define va_copy unless in c99 mode
 * or -ansi is not specified, since it was not part of C90.
 */
#if 0 /* disabled by -frewrite-includes */
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) ||              \
    (defined(__cplusplus) && __cplusplus >= 201103L) ||                        \
    !defined(__STRICT_ANSI__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 50 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3
#define __need_va_copy
#endif
# 52 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3
#endif
# 53 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3

#ifdef __need___va_list
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stdarg___gnuc_va_list.h expanded by -frewrite-includes */
#include <__stdarg___gnuc_va_list.h>
#else /* __stdarg___gnuc_va_list.h expanded by -frewrite-includes */
# 55 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stdarg___gnuc_va_list.h" 1 3
/*===---- __stdarg___gnuc_va_list.h - Definition of __gnuc_va_list ---------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
typedef __builtin_va_list __gnuc_va_list;
#endif
# 14 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stdarg___gnuc_va_list.h" 3
#endif /* __stdarg___gnuc_va_list.h expanded by -frewrite-includes */
# 56 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 2 3
#undef __need___va_list
#endif /* defined(__need___va_list) */
# 58 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3

#ifdef __need_va_list
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stdarg_va_list.h expanded by -frewrite-includes */
#include <__stdarg_va_list.h>
#else /* __stdarg_va_list.h expanded by -frewrite-includes */
# 60 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stdarg_va_list.h" 1 3
/*===---- __stdarg_va_list.h - Definition of va_list -----------------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

#ifndef _VA_LIST
#define _VA_LIST
typedef __builtin_va_list va_list;
#endif
# 14 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stdarg_va_list.h" 3
#endif /* __stdarg_va_list.h expanded by -frewrite-includes */
# 61 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 2 3
#undef __need_va_list
#endif /* defined(__need_va_list) */
# 63 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3

#ifdef __need_va_arg
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stdarg_va_arg.h expanded by -frewrite-includes */
#include <__stdarg_va_arg.h>
#else /* __stdarg_va_arg.h expanded by -frewrite-includes */
# 65 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stdarg_va_arg.h" 1 3
/*===---- __stdarg_va_arg.h - Definitions of va_start, va_arg, va_end-------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

#ifndef va_arg

#if 0 /* disabled by -frewrite-includes */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stdarg_va_arg.h" 3
/* C23 does not require the second parameter for va_start. */
#define va_start(ap, ...) __builtin_va_start(ap, 0)
#else
# 16 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stdarg_va_arg.h" 3
/* Versions before C23 do require the second parameter. */
#define va_start(ap, param) __builtin_va_start(ap, param)
#endif
# 19 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stdarg_va_arg.h" 3
#define va_end(ap) __builtin_va_end(ap)
#define va_arg(ap, type) __builtin_va_arg(ap, type)

#endif
# 23 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stdarg_va_arg.h" 3
#endif /* __stdarg_va_arg.h expanded by -frewrite-includes */
# 66 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 2 3
#undef __need_va_arg
#endif /* defined(__need_va_arg) */
# 68 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3

#ifdef __need___va_copy
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stdarg___va_copy.h expanded by -frewrite-includes */
#include <__stdarg___va_copy.h>
#else /* __stdarg___va_copy.h expanded by -frewrite-includes */
# 70 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stdarg___va_copy.h" 1 3
/*===---- __stdarg___va_copy.h - Definition of __va_copy -------------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

#ifndef __va_copy
#define __va_copy(d, s) __builtin_va_copy(d, s)
#endif
# 13 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stdarg___va_copy.h" 3
#endif /* __stdarg___va_copy.h expanded by -frewrite-includes */
# 71 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 2 3
#undef __need___va_copy
#endif /* defined(__need___va_copy) */
# 73 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3

#ifdef __need_va_copy
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __stdarg_va_copy.h expanded by -frewrite-includes */
#include <__stdarg_va_copy.h>
#else /* __stdarg_va_copy.h expanded by -frewrite-includes */
# 75 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stdarg_va_copy.h" 1 3
/*===---- __stdarg_va_copy.h - Definition of va_copy------------------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

#ifndef va_copy
#define va_copy(dest, src) __builtin_va_copy(dest, src)
#endif
# 13 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/__stdarg_va_copy.h" 3
#endif /* __stdarg_va_copy.h expanded by -frewrite-includes */
# 76 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 2 3
#undef __need_va_copy
#endif /* defined(__need_va_copy) */
# 78 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3

#endif
# 80 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/stdarg.h" 3
#endif /* stdarg.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdlib.h expanded by -frewrite-includes */
#include <stdlib.h>
#else /* stdlib.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_malloc_and_calloc)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 11 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* expanded by -frewrite-includes */
#include_next <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_STDLIB_H)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#define _LIBCPP_STDLIB_H

/*
    stdlib.h synopsis

Macros:

    EXIT_FAILURE
    EXIT_SUCCESS
    MB_CUR_MAX
    NULL
    RAND_MAX

Types:

    size_t
    div_t
    ldiv_t
    lldiv_t                                                               // C99

double    atof (const char* nptr);
int       atoi (const char* nptr);
long      atol (const char* nptr);
long long atoll(const char* nptr);                                        // C99
double             strtod  (const char* restrict nptr, char** restrict endptr);
float              strtof  (const char* restrict nptr, char** restrict endptr); // C99
long double        strtold (const char* restrict nptr, char** restrict endptr); // C99
long               strtol  (const char* restrict nptr, char** restrict endptr, int base);
long long          strtoll (const char* restrict nptr, char** restrict endptr, int base); // C99
unsigned long      strtoul (const char* restrict nptr, char** restrict endptr, int base);
unsigned long long strtoull(const char* restrict nptr, char** restrict endptr, int base); // C99
int rand(void);
void srand(unsigned int seed);
void* calloc(size_t nmemb, size_t size);
void free(void* ptr);
void* malloc(size_t size);
void* realloc(void* ptr, size_t size);
void abort(void);
int atexit(void (*func)(void));
void exit(int status);
void _Exit(int status);
char* getenv(const char* name);
int system(const char* string);
void* bsearch(const void* key, const void* base, size_t nmemb, size_t size,
              int (*compar)(const void *, const void *));
void qsort(void* base, size_t nmemb, size_t size,
           int (*compar)(const void *, const void *));
int         abs(      int j);
long        abs(     long j);
long long   abs(long long j);                                             // C++0X
long       labs(     long j);
long long llabs(long long j);                                             // C99
div_t     div(      int numer,       int denom);
ldiv_t    div(     long numer,      long denom);
lldiv_t   div(long long numer, long long denom);                          // C++0X
ldiv_t   ldiv(     long numer,      long denom);
lldiv_t lldiv(long long numer, long long denom);                          // C99
int mblen(const char* s, size_t n);
int mbtowc(wchar_t* restrict pwc, const char* restrict s, size_t n);
int wctomb(char* s, wchar_t wchar);
size_t mbstowcs(wchar_t* restrict pwcs, const char* restrict s, size_t n);
size_t wcstombs(char* restrict s, const wchar_t* restrict pwcs, size_t n);
int at_quick_exit(void (*func)(void))                                     // C++11
void quick_exit(int status);                                              // C++11
void *aligned_alloc(size_t alignment, size_t size);                       // C11

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<stdlib.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#if 0 /* expanded by -frewrite-includes */
#    include_next <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#  endif
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#ifdef __cplusplus
extern "C++" {
// abs

#ifdef abs
# undef abs
#endif
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef labs
# undef labs
#endif
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef llabs
# undef llabs
#endif
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

// MSVCRT already has the correct prototype in <stdlib.h> if __cplusplus is defined
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_MSVCRT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long abs(long __x) _NOEXCEPT {
  return __builtin_labs(__x);
}
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {
  return __builtin_llabs(__x);
}
#endif // !defined(_LIBCPP_MSVCRT)
# 120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY float abs(float __lcpp_x) _NOEXCEPT {
  return __builtin_fabsf(__lcpp_x); // Use builtins to prevent needing math.h
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY double abs(double __lcpp_x) _NOEXCEPT {
  return __builtin_fabs(__lcpp_x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long double
abs(long double __lcpp_x) _NOEXCEPT {
  return __builtin_fabsl(__lcpp_x);
}

// div

#ifdef div
# undef div
#endif
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef ldiv
# undef ldiv
#endif
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef lldiv
# undef lldiv
#endif
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

// MSVCRT already has the correct prototype in <stdlib.h> if __cplusplus is defined
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_MSVCRT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
  return ::ldiv(__x, __y);
}
#if 0 /* disabled by -frewrite-includes */
#if !(defined(__FreeBSD__) && !defined(__LONG_LONG_SUPPORTED))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,
                                             long long __y) _NOEXCEPT {
  return ::lldiv(__x, __y);
}
#endif
# 157 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif // _LIBCPP_MSVCRT
# 158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
} // extern "C++"
#endif // __cplusplus
# 160 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#endif // _LIBCPP_STDLIB_H
# 162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif /* stdlib.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 2 3

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
#if 0 /* expanded by -frewrite-includes */
#  include <cwchar>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 3
#endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

inline _LIBCPP_INLINE_VISIBILITY
decltype(MB_CUR_MAX) __libcpp_mb_cur_max_l(locale_t __l)
{
    __libcpp_locale_guard __current(__l);
    return MB_CUR_MAX;
}

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
inline _LIBCPP_INLINE_VISIBILITY
wint_t __libcpp_btowc_l(int __c, locale_t __l)
{
    __libcpp_locale_guard __current(__l);
    return btowc(__c);
}

inline _LIBCPP_INLINE_VISIBILITY
int __libcpp_wctob_l(wint_t __c, locale_t __l)
{
    __libcpp_locale_guard __current(__l);
    return wctob(__c);
}

inline _LIBCPP_INLINE_VISIBILITY
size_t __libcpp_wcsnrtombs_l(char *__dest, const wchar_t **__src, size_t __nwc,
                         size_t __len, mbstate_t *__ps, locale_t __l)
{
    __libcpp_locale_guard __current(__l);
    return wcsnrtombs(__dest, __src, __nwc, __len, __ps);
}

inline _LIBCPP_INLINE_VISIBILITY
size_t __libcpp_wcrtomb_l(char *__s, wchar_t __wc, mbstate_t *__ps, locale_t __l)
{
    __libcpp_locale_guard __current(__l);
    return wcrtomb(__s, __wc, __ps);
}

inline _LIBCPP_INLINE_VISIBILITY
size_t __libcpp_mbsnrtowcs_l(wchar_t * __dest, const char **__src, size_t __nms,
                      size_t __len, mbstate_t *__ps, locale_t __l)
{
    __libcpp_locale_guard __current(__l);
    return mbsnrtowcs(__dest, __src, __nms, __len, __ps);
}

inline _LIBCPP_INLINE_VISIBILITY
size_t __libcpp_mbrtowc_l(wchar_t *__pwc, const char *__s, size_t __n,
                   mbstate_t *__ps, locale_t __l)
{
    __libcpp_locale_guard __current(__l);
    return mbrtowc(__pwc, __s, __n, __ps);
}

inline _LIBCPP_INLINE_VISIBILITY
int __libcpp_mbtowc_l(wchar_t *__pwc, const char *__pmb, size_t __max, locale_t __l)
{
    __libcpp_locale_guard __current(__l);
    return mbtowc(__pwc, __pmb, __max);
}

inline _LIBCPP_INLINE_VISIBILITY
size_t __libcpp_mbrlen_l(const char *__s, size_t __n, mbstate_t *__ps, locale_t __l)
{
    __libcpp_locale_guard __current(__l);
    return mbrlen(__s, __n, __ps);
}
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 3

inline _LIBCPP_INLINE_VISIBILITY
lconv *__libcpp_localeconv_l(locale_t __l)
{
    __libcpp_locale_guard __current(__l);
    return localeconv();
}

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
inline _LIBCPP_INLINE_VISIBILITY
size_t __libcpp_mbsrtowcs_l(wchar_t *__dest, const char **__src, size_t __len,
                     mbstate_t *__ps, locale_t __l)
{
    __libcpp_locale_guard __current(__l);
    return mbsrtowcs(__dest, __src, __len, __ps);
}
#endif
# 115 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 3

inline _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 4, 5)
int __libcpp_snprintf_l(char *__s, size_t __n, locale_t __l, const char *__format, ...) {
    va_list __va;
    va_start(__va, __format);
    __libcpp_locale_guard __current(__l);
    int __res = vsnprintf(__s, __n, __format, __va);
    va_end(__va);
    return __res;
}

inline _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 3, 4)
int __libcpp_asprintf_l(char **__s, locale_t __l, const char *__format, ...) {
    va_list __va;
    va_start(__va, __format);
    __libcpp_locale_guard __current(__l);
    int __res = vasprintf(__s, __format, __va);
    va_end(__va);
    return __res;
}

inline _LIBCPP_ATTRIBUTE_FORMAT(__scanf__, 3, 4)
int __libcpp_sscanf_l(const char *__s, locale_t __l, const char *__format, ...) {
    va_list __va;
    va_start(__va, __format);
    __libcpp_locale_guard __current(__l);
    int __res = vsscanf(__s, __format, __va);
    va_end(__va);
    return __res;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___LOCALE_LOCALE_BASE_API_BSD_LOCALE_FALLBACKS_H
# 149 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__locale_dir/locale_base_api/bsd_locale_fallbacks.h" 3
#endif /* bsd_locale_fallbacks.h expanded by -frewrite-includes */
# 230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 2 3
#endif
# 231 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 233 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 234 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#endif
# 235 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 237 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 238 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 2 3


_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if defined(__APPLE__) || defined(__FreeBSD__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 243 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#  define _LIBCPP_GET_C_LOCALE 0
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__NetBSD__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 245 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#  define _LIBCPP_GET_C_LOCALE LC_C_LOCALE
#else
# 247 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#  define _LIBCPP_GET_C_LOCALE __cloc()
   // Get the C locale object
   _LIBCPP_EXPORTED_FROM_ABI  locale_t __cloc();
#define __cloc_defined
#endif
# 252 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

// __scan_keyword
// Scans [__b, __e) until a match is found in the basic_strings range
//  [__kb, __ke) or until it can be shown that there is no match in [__kb, __ke).
//  __b will be incremented (visibly), consuming CharT until a match is found
//  or proved to not exist.  A keyword may be "", in which will match anything.
//  If one keyword is a prefix of another, and the next CharT in the input
//  might match another keyword, the algorithm will attempt to find the longest
//  matching keyword.  If the longer matching keyword ends up not matching, then
//  no keyword match is found.  If no keyword match is found, __ke is returned
//  and failbit is set in __err.
//  Else an iterator pointing to the matching keyword is found.  If more than
//  one keyword matches, an iterator to the first matching keyword is returned.
//  If on exit __b == __e, eofbit is set in __err.  If __case_sensitive is false,
//  __ct is used to force to lower case before comparing characters.
//  Examples:
//  Keywords:  "a", "abb"
//  If the input is "a", the first keyword matches and eofbit is set.
//  If the input is "abc", no match is found and "ab" are consumed.
template <class _InputIterator, class _ForwardIterator, class _Ctype>
_LIBCPP_HIDE_FROM_ABI
_ForwardIterator
__scan_keyword(_InputIterator& __b, _InputIterator __e,
               _ForwardIterator __kb, _ForwardIterator __ke,
               const _Ctype& __ct, ios_base::iostate& __err,
               bool __case_sensitive = true)
{
    typedef typename iterator_traits<_InputIterator>::value_type _CharT;
    size_t __nkw = static_cast<size_t>(_VSTD::distance(__kb, __ke));
    const unsigned char __doesnt_match = '\0';
    const unsigned char __might_match = '\1';
    const unsigned char __does_match = '\2';
    unsigned char __statbuf[100];
    unsigned char* __status = __statbuf;
    unique_ptr<unsigned char, void(*)(void*)> __stat_hold(nullptr, free);
    if (__nkw > sizeof(__statbuf))
    {
        __status = (unsigned char*)malloc(__nkw);
        if (__status == nullptr)
            __throw_bad_alloc();
        __stat_hold.reset(__status);
    }
    size_t __n_might_match = __nkw;  // At this point, any keyword might match
    size_t __n_does_match = 0;       // but none of them definitely do
    // Initialize all statuses to __might_match, except for "" keywords are __does_match
    unsigned char* __st = __status;
    for (_ForwardIterator __ky = __kb; __ky != __ke; ++__ky, (void) ++__st)
    {
        if (!__ky->empty())
            *__st = __might_match;
        else
        {
            *__st = __does_match;
            --__n_might_match;
            ++__n_does_match;
        }
    }
    // While there might be a match, test keywords against the next CharT
    for (size_t __indx = 0; __b != __e && __n_might_match > 0; ++__indx)
    {
        // Peek at the next CharT but don't consume it
        _CharT __c = *__b;
        if (!__case_sensitive)
            __c = __ct.toupper(__c);
        bool __consume = false;
        // For each keyword which might match, see if the __indx character is __c
        // If a match if found, consume __c
        // If a match is found, and that is the last character in the keyword,
        //    then that keyword matches.
        // If the keyword doesn't match this character, then change the keyword
        //    to doesn't match
        __st = __status;
        for (_ForwardIterator __ky = __kb; __ky != __ke; ++__ky, (void) ++__st)
        {
            if (*__st == __might_match)
            {
                _CharT __kc = (*__ky)[__indx];
                if (!__case_sensitive)
                    __kc = __ct.toupper(__kc);
                if (__c == __kc)
                {
                    __consume = true;
                    if (__ky->size() == __indx+1)
                    {
                        *__st = __does_match;
                        --__n_might_match;
                        ++__n_does_match;
                    }
                }
                else
                {
                    *__st = __doesnt_match;
                    --__n_might_match;
                }
            }
        }
        // consume if we matched a character
        if (__consume)
        {
            ++__b;
            // If we consumed a character and there might be a matched keyword that
            //   was marked matched on a previous iteration, then such keywords
            //   which are now marked as not matching.
            if (__n_might_match + __n_does_match > 1)
            {
                __st = __status;
                for (_ForwardIterator __ky = __kb; __ky != __ke; ++__ky, (void) ++__st)
                {
                    if (*__st == __does_match && __ky->size() != __indx+1)
                    {
                        *__st = __doesnt_match;
                        --__n_does_match;
                    }
                }
            }
        }
    }
    // We've exited the loop because we hit eof and/or we have no more "might matches".
    if (__b == __e)
        __err |= ios_base::eofbit;
    // Return the first matching result
    for (__st = __status; __kb != __ke; ++__kb, (void) ++__st)
        if (*__st == __does_match)
            break;
    if (__kb == __ke)
        __err |= ios_base::failbit;
    return __kb;
}

struct _LIBCPP_EXPORTED_FROM_ABI __num_get_base
{
    static const int __num_get_buf_sz = 40;

    static int __get_base(ios_base&);
    static const char __src[33];
};

_LIBCPP_EXPORTED_FROM_ABI void __check_grouping(const string& __grouping, unsigned* __g, unsigned* __g_end,
                      ios_base::iostate& __err);

template <class _CharT>
struct __num_get
    : protected __num_get_base
{
    static string __stage2_float_prep(ios_base& __iob, _CharT* __atoms, _CharT& __decimal_point,
                                      _CharT& __thousands_sep);

    static int __stage2_float_loop(_CharT __ct, bool& __in_units, char& __exp,
                                   char* __a, char*& __a_end,
                                   _CharT __decimal_point, _CharT __thousands_sep,
                                   const string& __grouping, unsigned* __g,
                                   unsigned*& __g_end, unsigned& __dc, _CharT* __atoms);
#ifndef _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
    static string __stage2_int_prep(ios_base& __iob, _CharT* __atoms, _CharT& __thousands_sep);
    static int __stage2_int_loop(_CharT __ct, int __base, char* __a, char*& __a_end,
                  unsigned& __dc, _CharT __thousands_sep, const string& __grouping,
                  unsigned* __g, unsigned*& __g_end, _CharT* __atoms);

#else
# 411 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
    static string __stage2_int_prep(ios_base& __iob, _CharT& __thousands_sep)
    {
        locale __loc = __iob.getloc();
        const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
        __thousands_sep = __np.thousands_sep();
        return __np.grouping();
    }

    const _CharT* __do_widen(ios_base& __iob, _CharT* __atoms) const
    {
      return __do_widen_p(__iob, __atoms);
    }


    static int __stage2_int_loop(_CharT __ct, int __base, char* __a, char*& __a_end,
                  unsigned& __dc, _CharT __thousands_sep, const string& __grouping,
                  unsigned* __g, unsigned*& __g_end, const _CharT* __atoms);
private:
    template<typename _Tp>
    const _Tp* __do_widen_p(ios_base& __iob, _Tp* __atoms) const
    {
      locale __loc = __iob.getloc();
      use_facet<ctype<_Tp> >(__loc).widen(__src, __src + 26, __atoms);
      return __atoms;
    }

    const char* __do_widen_p(ios_base& __iob, char* __atoms) const
    {
      (void)__iob;
      (void)__atoms;
      return __src;
    }
#endif
# 444 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
};

#ifndef _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
template <class _CharT>
string
__num_get<_CharT>::__stage2_int_prep(ios_base& __iob, _CharT* __atoms, _CharT& __thousands_sep)
{
    locale __loc = __iob.getloc();
    std::use_facet<ctype<_CharT> >(__loc).widen(__src, __src + 26, __atoms);
    const numpunct<_CharT>& __np = std::use_facet<numpunct<_CharT> >(__loc);
    __thousands_sep = __np.thousands_sep();
    return __np.grouping();
}
#endif
# 458 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

template <class _CharT>
string
__num_get<_CharT>::__stage2_float_prep(ios_base& __iob, _CharT* __atoms, _CharT& __decimal_point,
                    _CharT& __thousands_sep)
{
    locale __loc = __iob.getloc();
    std::use_facet<ctype<_CharT> >(__loc).widen(__src, __src + 32, __atoms);
    const numpunct<_CharT>& __np = std::use_facet<numpunct<_CharT> >(__loc);
    __decimal_point = __np.decimal_point();
    __thousands_sep = __np.thousands_sep();
    return __np.grouping();
}

template <class _CharT>
int
#ifndef _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
__num_get<_CharT>::__stage2_int_loop(_CharT __ct, int __base, char* __a, char*& __a_end,
                  unsigned& __dc, _CharT __thousands_sep, const string& __grouping,
                  unsigned* __g, unsigned*& __g_end, _CharT* __atoms)
#else
# 479 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
__num_get<_CharT>::__stage2_int_loop(_CharT __ct, int __base, char* __a, char*& __a_end,
                  unsigned& __dc, _CharT __thousands_sep, const string& __grouping,
                  unsigned* __g, unsigned*& __g_end, const _CharT* __atoms)

#endif
# 484 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
{
    if (__a_end == __a && (__ct == __atoms[24] || __ct == __atoms[25]))
    {
        *__a_end++ = __ct == __atoms[24] ? '+' : '-';
        __dc = 0;
        return 0;
    }
    if (__grouping.size() != 0 && __ct == __thousands_sep)
    {
        if (__g_end-__g < __num_get_buf_sz)
        {
            *__g_end++ = __dc;
            __dc = 0;
        }
        return 0;
    }
    ptrdiff_t __f = std::find(__atoms, __atoms + 26, __ct) - __atoms;
    if (__f >= 24)
        return -1;
    switch (__base)
    {
    case 8:
    case 10:
        if (__f >= __base)
            return -1;
        break;
    case 16:
        if (__f < 22)
            break;
        if (__a_end != __a && __a_end - __a <= 2 && __a_end[-1] == '0')
        {
            __dc = 0;
            *__a_end++ = __src[__f];
            return 0;
        }
        return -1;
    }
    *__a_end++ = __src[__f];
    ++__dc;
    return 0;
}

template <class _CharT>
int
__num_get<_CharT>::__stage2_float_loop(_CharT __ct, bool& __in_units, char& __exp, char* __a, char*& __a_end,
                    _CharT __decimal_point, _CharT __thousands_sep, const string& __grouping,
                    unsigned* __g, unsigned*& __g_end, unsigned& __dc, _CharT* __atoms)
{
    if (__ct == __decimal_point)
    {
        if (!__in_units)
            return -1;
        __in_units = false;
        *__a_end++ = '.';
        if (__grouping.size() != 0 && __g_end-__g < __num_get_buf_sz)
            *__g_end++ = __dc;
        return 0;
    }
    if (__ct == __thousands_sep && __grouping.size() != 0)
    {
        if (!__in_units)
            return -1;
        if (__g_end-__g < __num_get_buf_sz)
        {
            *__g_end++ = __dc;
            __dc = 0;
        }
        return 0;
    }
    ptrdiff_t __f = std::find(__atoms, __atoms + 32, __ct) - __atoms;
    if (__f >= 32)
        return -1;
    char __x = __src[__f];
    if (__x == '-' || __x == '+')
    {
        if (__a_end == __a || (std::toupper(__a_end[-1]) == std::toupper(__exp)))
        {
            *__a_end++ = __x;
            return 0;
        }
        return -1;
    }
    if (__x == 'x' || __x == 'X')
        __exp = 'P';
    else if (std::toupper(__x) == __exp)
    {
        __exp = std::tolower(__exp);
        if (__in_units)
        {
            __in_units = false;
            if (__grouping.size() != 0 && __g_end-__g < __num_get_buf_sz)
                *__g_end++ = __dc;
        }
    }
    *__a_end++ = __x;
    if (__f >= 22)
        return 0;
    ++__dc;
    return 0;
}

extern template struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_get<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_get<wchar_t>;
#endif
# 589 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
class _LIBCPP_TEMPLATE_VIS num_get
    : public locale::facet,
      private __num_get<_CharT>
{
public:
    typedef _CharT char_type;
    typedef _InputIterator iter_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit num_get(size_t __refs = 0)
        : locale::facet(__refs) {}

    _LIBCPP_INLINE_VISIBILITY
    iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                  ios_base::iostate& __err, bool& __v) const
    {
        return do_get(__b, __e, __iob, __err, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                  ios_base::iostate& __err, long& __v) const
    {
        return do_get(__b, __e, __iob, __err, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                  ios_base::iostate& __err, long long& __v) const
    {
        return do_get(__b, __e, __iob, __err, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                  ios_base::iostate& __err, unsigned short& __v) const
    {
        return do_get(__b, __e, __iob, __err, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                  ios_base::iostate& __err, unsigned int& __v) const
    {
        return do_get(__b, __e, __iob, __err, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                  ios_base::iostate& __err, unsigned long& __v) const
    {
        return do_get(__b, __e, __iob, __err, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                  ios_base::iostate& __err, unsigned long long& __v) const
    {
        return do_get(__b, __e, __iob, __err, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                  ios_base::iostate& __err, float& __v) const
    {
        return do_get(__b, __e, __iob, __err, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                  ios_base::iostate& __err, double& __v) const
    {
        return do_get(__b, __e, __iob, __err, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                  ios_base::iostate& __err, long double& __v) const
    {
        return do_get(__b, __e, __iob, __err, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                  ios_base::iostate& __err, void*& __v) const
    {
        return do_get(__b, __e, __iob, __err, __v);
    }

    static locale::id id;

protected:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~num_get() override {}

    template <class _Fp>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
    iter_type __do_get_floating_point
                            (iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, _Fp& __v) const;

    template <class _Signed>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
    iter_type __do_get_signed
                            (iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, _Signed& __v) const;

    template <class _Unsigned>
    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
    iter_type __do_get_unsigned
                            (iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, _Unsigned& __v) const;


    virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, bool& __v) const;

    virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, long& __v) const
    { return this->__do_get_signed ( __b, __e, __iob, __err, __v ); }

    virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, long long& __v) const
    { return this->__do_get_signed ( __b, __e, __iob, __err, __v ); }

    virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, unsigned short& __v) const
    { return this->__do_get_unsigned ( __b, __e, __iob, __err, __v ); }

    virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, unsigned int& __v) const
    { return this->__do_get_unsigned ( __b, __e, __iob, __err, __v ); }

    virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, unsigned long& __v) const
    { return this->__do_get_unsigned ( __b, __e, __iob, __err, __v ); }

    virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, unsigned long long& __v) const
    { return this->__do_get_unsigned ( __b, __e, __iob, __err, __v ); }

    virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, float& __v) const
    { return this->__do_get_floating_point ( __b, __e, __iob, __err, __v ); }

    virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, double& __v) const
    { return this->__do_get_floating_point ( __b, __e, __iob, __err, __v ); }

    virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, long double& __v) const
    { return this->__do_get_floating_point ( __b, __e, __iob, __err, __v ); }

    virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, void*& __v) const;
};

template <class _CharT, class _InputIterator>
locale::id
num_get<_CharT, _InputIterator>::id;

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI _Tp
__num_get_signed_integral(const char* __a, const char* __a_end,
                          ios_base::iostate& __err, int __base)
{
    if (__a != __a_end)
    {
        __libcpp_remove_reference_t<decltype(errno)> __save_errno = errno;
        errno = 0;
        char *__p2;
        long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
        __libcpp_remove_reference_t<decltype(errno)> __current_errno = errno;
        if (__current_errno == 0)
            errno = __save_errno;
        if (__p2 != __a_end)
        {
            __err = ios_base::failbit;
            return 0;
        }
        else if (__current_errno == ERANGE         ||
                 __ll < numeric_limits<_Tp>::min() ||
                 numeric_limits<_Tp>::max() < __ll)
        {
            __err = ios_base::failbit;
            if (__ll > 0)
                return numeric_limits<_Tp>::max();
            else
                return numeric_limits<_Tp>::min();
        }
        return static_cast<_Tp>(__ll);
    }
    __err = ios_base::failbit;
    return 0;
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI _Tp
__num_get_unsigned_integral(const char* __a, const char* __a_end,
                            ios_base::iostate& __err, int __base)
{
    if (__a != __a_end)
    {
        const bool __negate = *__a == '-';
        if (__negate && ++__a == __a_end) {
          __err = ios_base::failbit;
          return 0;
        }
        __libcpp_remove_reference_t<decltype(errno)> __save_errno = errno;
        errno = 0;
        char *__p2;
        unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
        __libcpp_remove_reference_t<decltype(errno)> __current_errno = errno;
        if (__current_errno == 0)
            errno = __save_errno;
        if (__p2 != __a_end)
        {
            __err = ios_base::failbit;
            return 0;
        }
        else if (__current_errno == ERANGE || numeric_limits<_Tp>::max() < __ll)
        {
            __err = ios_base::failbit;
            return numeric_limits<_Tp>::max();
        }
        _Tp __res = static_cast<_Tp>(__ll);
        if (__negate) __res = -__res;
        return __res;
    }
    __err = ios_base::failbit;
    return 0;
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY
_Tp __do_strtod(const char* __a, char** __p2);

template <>
inline _LIBCPP_INLINE_VISIBILITY
float __do_strtod<float>(const char* __a, char** __p2) {
    return strtof_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
}

template <>
inline _LIBCPP_INLINE_VISIBILITY
double __do_strtod<double>(const char* __a, char** __p2) {
    return strtod_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
}

template <>
inline _LIBCPP_INLINE_VISIBILITY
long double __do_strtod<long double>(const char* __a, char** __p2) {
    return strtold_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
}

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp
__num_get_float(const char* __a, const char* __a_end, ios_base::iostate& __err)
{
    if (__a != __a_end)
    {
        __libcpp_remove_reference_t<decltype(errno)> __save_errno = errno;
        errno = 0;
        char *__p2;
        _Tp __ld = std::__do_strtod<_Tp>(__a, &__p2);
        __libcpp_remove_reference_t<decltype(errno)> __current_errno = errno;
        if (__current_errno == 0)
            errno = __save_errno;
        if (__p2 != __a_end)
        {
            __err = ios_base::failbit;
            return 0;
        }
        else if (__current_errno == ERANGE)
            __err = ios_base::failbit;
        return __ld;
    }
    __err = ios_base::failbit;
    return 0;
}

template <class _CharT, class _InputIterator>
_InputIterator
num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
                                        ios_base& __iob,
                                        ios_base::iostate& __err,
                                        bool& __v) const
{
    if ((__iob.flags() & ios_base::boolalpha) == 0)
    {
        long __lv = -1;
        __b = do_get(__b, __e, __iob, __err, __lv);
        switch (__lv)
        {
        case 0:
            __v = false;
            break;
        case 1:
            __v = true;
            break;
        default:
            __v = true;
            __err = ios_base::failbit;
            break;
        }
        return __b;
    }
    const ctype<_CharT>& __ct = std::use_facet<ctype<_CharT> >(__iob.getloc());
    const numpunct<_CharT>& __np = std::use_facet<numpunct<_CharT> >(__iob.getloc());
    typedef typename numpunct<_CharT>::string_type string_type;
    const string_type __names[2] = {__np.truename(), __np.falsename()};
    const string_type* __i = _VSTD::__scan_keyword(__b, __e, __names, __names+2,
                                                   __ct, __err);
    __v = __i == __names;
    return __b;
}

// signed

template <class _CharT, class _InputIterator>
template <class _Signed>
_InputIterator
num_get<_CharT, _InputIterator>::__do_get_signed(iter_type __b, iter_type __e,
                                        ios_base& __iob,
                                        ios_base::iostate& __err,
                                        _Signed& __v) const
{
    // Stage 1
    int __base = this->__get_base(__iob);
    // Stage 2
    char_type __thousands_sep;
    const int __atoms_size = 26;
#ifdef _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
    char_type __atoms1[__atoms_size];
    const char_type *__atoms = this->__do_widen(__iob, __atoms1);
    string __grouping = this->__stage2_int_prep(__iob, __thousands_sep);
#else
# 928 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
    char_type __atoms[__atoms_size];
    string __grouping = this->__stage2_int_prep(__iob, __atoms, __thousands_sep);
#endif
# 931 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
    string __buf;
    __buf.resize(__buf.capacity());
    char* __a = &__buf[0];
    char* __a_end = __a;
    unsigned __g[__num_get_base::__num_get_buf_sz];
    unsigned* __g_end = __g;
    unsigned __dc = 0;
    for (; __b != __e; ++__b)
    {
        if (__a_end == __a + __buf.size())
        {
            size_t __tmp = __buf.size();
            __buf.resize(2*__buf.size());
            __buf.resize(__buf.capacity());
            __a = &__buf[0];
            __a_end = __a + __tmp;
        }
        if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
                                    __thousands_sep, __grouping, __g, __g_end,
                                    __atoms))
            break;
    }
    if (__grouping.size() != 0 && __g_end-__g < __num_get_base::__num_get_buf_sz)
        *__g_end++ = __dc;
    // Stage 3
    __v = std::__num_get_signed_integral<_Signed>(__a, __a_end, __err, __base);
    // Digit grouping checked
    __check_grouping(__grouping, __g, __g_end, __err);
    // EOF checked
    if (__b == __e)
        __err |= ios_base::eofbit;
    return __b;
}

// unsigned

template <class _CharT, class _InputIterator>
template <class _Unsigned>
_InputIterator
num_get<_CharT, _InputIterator>::__do_get_unsigned(iter_type __b, iter_type __e,
                                        ios_base& __iob,
                                        ios_base::iostate& __err,
                                        _Unsigned& __v) const
{
    // Stage 1
    int __base = this->__get_base(__iob);
    // Stage 2
    char_type __thousands_sep;
    const int __atoms_size = 26;
#ifdef _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
    char_type __atoms1[__atoms_size];
    const char_type *__atoms = this->__do_widen(__iob, __atoms1);
    string __grouping = this->__stage2_int_prep(__iob, __thousands_sep);
#else
# 985 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
    char_type __atoms[__atoms_size];
    string __grouping = this->__stage2_int_prep(__iob, __atoms, __thousands_sep);
#endif
# 988 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
    string __buf;
    __buf.resize(__buf.capacity());
    char* __a = &__buf[0];
    char* __a_end = __a;
    unsigned __g[__num_get_base::__num_get_buf_sz];
    unsigned* __g_end = __g;
    unsigned __dc = 0;
    for (; __b != __e; ++__b)
    {
        if (__a_end == __a + __buf.size())
        {
            size_t __tmp = __buf.size();
            __buf.resize(2*__buf.size());
            __buf.resize(__buf.capacity());
            __a = &__buf[0];
            __a_end = __a + __tmp;
        }
        if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
                                    __thousands_sep, __grouping, __g, __g_end,
                                    __atoms))
            break;
    }
    if (__grouping.size() != 0 && __g_end-__g < __num_get_base::__num_get_buf_sz)
        *__g_end++ = __dc;
    // Stage 3
    __v = std::__num_get_unsigned_integral<_Unsigned>(__a, __a_end, __err, __base);
    // Digit grouping checked
    __check_grouping(__grouping, __g, __g_end, __err);
    // EOF checked
    if (__b == __e)
        __err |= ios_base::eofbit;
    return __b;
}

// floating point

template <class _CharT, class _InputIterator>
template <class _Fp>
_InputIterator
num_get<_CharT, _InputIterator>::__do_get_floating_point(iter_type __b, iter_type __e,
                                        ios_base& __iob,
                                        ios_base::iostate& __err,
                                        _Fp& __v) const
{
    // Stage 1, nothing to do
    // Stage 2
    char_type __atoms[32];
    char_type __decimal_point;
    char_type __thousands_sep;
    string __grouping = this->__stage2_float_prep(__iob, __atoms,
                                                  __decimal_point,
                                                  __thousands_sep);
    string __buf;
    __buf.resize(__buf.capacity());
    char* __a = &__buf[0];
    char* __a_end = __a;
    unsigned __g[__num_get_base::__num_get_buf_sz];
    unsigned* __g_end = __g;
    unsigned __dc = 0;
    bool __in_units = true;
    char __exp = 'E';
    for (; __b != __e; ++__b)
    {
        if (__a_end == __a + __buf.size())
        {
            size_t __tmp = __buf.size();
            __buf.resize(2*__buf.size());
            __buf.resize(__buf.capacity());
            __a = &__buf[0];
            __a_end = __a + __tmp;
        }
        if (this->__stage2_float_loop(*__b, __in_units, __exp, __a, __a_end,
                                      __decimal_point, __thousands_sep,
                                      __grouping, __g, __g_end,
                                      __dc, __atoms))
            break;
    }
    if (__grouping.size() != 0 && __in_units && __g_end-__g < __num_get_base::__num_get_buf_sz)
        *__g_end++ = __dc;
    // Stage 3
    __v = std::__num_get_float<_Fp>(__a, __a_end, __err);
    // Digit grouping checked
    __check_grouping(__grouping, __g, __g_end, __err);
    // EOF checked
    if (__b == __e)
        __err |= ios_base::eofbit;
    return __b;
}

template <class _CharT, class _InputIterator>
_InputIterator
num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
                                        ios_base& __iob,
                                        ios_base::iostate& __err,
                                        void*& __v) const
{
    // Stage 1
    int __base = 16;
    // Stage 2
    char_type __atoms[26];
    char_type __thousands_sep = char_type();
    string __grouping;
    std::use_facet<ctype<_CharT> >(__iob.getloc()).widen(__num_get_base::__src,
                                                         __num_get_base::__src + 26, __atoms);
    string __buf;
    __buf.resize(__buf.capacity());
    char* __a = &__buf[0];
    char* __a_end = __a;
    unsigned __g[__num_get_base::__num_get_buf_sz];
    unsigned* __g_end = __g;
    unsigned __dc = 0;
    for (; __b != __e; ++__b)
    {
        if (__a_end == __a + __buf.size())
        {
            size_t __tmp = __buf.size();
            __buf.resize(2*__buf.size());
            __buf.resize(__buf.capacity());
            __a = &__buf[0];
            __a_end = __a + __tmp;
        }
        if (this->__stage2_int_loop(*__b, __base, __a, __a_end, __dc,
                                    __thousands_sep, __grouping,
                                    __g, __g_end, __atoms))
            break;
    }
    // Stage 3
    __buf.resize(__a_end - __a);
    if (__libcpp_sscanf_l(__buf.c_str(), _LIBCPP_GET_C_LOCALE, "%p", &__v) != 1)
        __err = ios_base::failbit;
    // EOF checked
    if (__b == __e)
        __err |= ios_base::eofbit;
    return __b;
}

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_get<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_get<wchar_t>;
#endif
# 1128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

struct _LIBCPP_EXPORTED_FROM_ABI __num_put_base
{
protected:
    static void __format_int(char* __fmt, const char* __len, bool __signd,
                             ios_base::fmtflags __flags);
    static bool __format_float(char* __fmt, const char* __len,
                               ios_base::fmtflags __flags);
    static char* __identify_padding(char* __nb, char* __ne,
                                    const ios_base& __iob);
};

template <class _CharT>
struct __num_put
    : protected __num_put_base
{
    static void __widen_and_group_int(char* __nb, char* __np, char* __ne,
                                      _CharT* __ob, _CharT*& __op, _CharT*& __oe,
                                      const locale& __loc);
    static void __widen_and_group_float(char* __nb, char* __np, char* __ne,
                                        _CharT* __ob, _CharT*& __op, _CharT*& __oe,
                                        const locale& __loc);
};

template <class _CharT>
void
__num_put<_CharT>::__widen_and_group_int(char* __nb, char* __np, char* __ne,
                                         _CharT* __ob, _CharT*& __op, _CharT*& __oe,
                                         const locale& __loc)
{
    const ctype<_CharT>&    __ct = std::use_facet<ctype<_CharT> >   (__loc);
    const numpunct<_CharT>& __npt = std::use_facet<numpunct<_CharT> >(__loc);
    string __grouping = __npt.grouping();
    if (__grouping.empty())
    {
        __ct.widen(__nb, __ne, __ob);
        __oe = __ob + (__ne - __nb);
    }
    else
    {
        __oe = __ob;
        char* __nf = __nb;
        if (*__nf == '-' || *__nf == '+')
            *__oe++ = __ct.widen(*__nf++);
        if (__ne - __nf >= 2 && __nf[0] == '0' && (__nf[1] == 'x' ||
                                                   __nf[1] == 'X'))
        {
            *__oe++ = __ct.widen(*__nf++);
            *__oe++ = __ct.widen(*__nf++);
        }
        std::reverse(__nf, __ne);
        _CharT __thousands_sep = __npt.thousands_sep();
        unsigned __dc = 0;
        unsigned __dg = 0;
        for (char* __p = __nf; __p < __ne; ++__p)
        {
            if (static_cast<unsigned>(__grouping[__dg]) > 0 &&
                __dc == static_cast<unsigned>(__grouping[__dg]))
            {
                *__oe++ = __thousands_sep;
                __dc = 0;
                if (__dg < __grouping.size()-1)
                    ++__dg;
            }
            *__oe++ = __ct.widen(*__p);
            ++__dc;
        }
        std::reverse(__ob + (__nf - __nb), __oe);
    }
    if (__np == __ne)
        __op = __oe;
    else
        __op = __ob + (__np - __nb);
}

template <class _CharT>
void
__num_put<_CharT>::__widen_and_group_float(char* __nb, char* __np, char* __ne,
                                           _CharT* __ob, _CharT*& __op, _CharT*& __oe,
                                           const locale& __loc)
{
    const ctype<_CharT>&    __ct = std::use_facet<ctype<_CharT> >   (__loc);
    const numpunct<_CharT>& __npt = std::use_facet<numpunct<_CharT> >(__loc);
    string __grouping = __npt.grouping();
    __oe = __ob;
    char* __nf = __nb;
    if (*__nf == '-' || *__nf == '+')
        *__oe++ = __ct.widen(*__nf++);
    char* __ns;
    if (__ne - __nf >= 2 && __nf[0] == '0' && (__nf[1] == 'x' ||
                                               __nf[1] == 'X'))
    {
        *__oe++ = __ct.widen(*__nf++);
        *__oe++ = __ct.widen(*__nf++);
        for (__ns = __nf; __ns < __ne; ++__ns)
            if (!isxdigit_l(*__ns, _LIBCPP_GET_C_LOCALE))
                break;
    }
    else
    {
        for (__ns = __nf; __ns < __ne; ++__ns)
            if (!isdigit_l(*__ns, _LIBCPP_GET_C_LOCALE))
                break;
    }
    if (__grouping.empty())
    {
        __ct.widen(__nf, __ns, __oe);
        __oe += __ns - __nf;
    }
    else
    {
        std::reverse(__nf, __ns);
        _CharT __thousands_sep = __npt.thousands_sep();
        unsigned __dc = 0;
        unsigned __dg = 0;
        for (char* __p = __nf; __p < __ns; ++__p)
        {
            if (__grouping[__dg] > 0 && __dc == static_cast<unsigned>(__grouping[__dg]))
            {
                *__oe++ = __thousands_sep;
                __dc = 0;
                if (__dg < __grouping.size()-1)
                    ++__dg;
            }
            *__oe++ = __ct.widen(*__p);
            ++__dc;
        }
        std::reverse(__ob + (__nf - __nb), __oe);
    }
    for (__nf = __ns; __nf < __ne; ++__nf)
    {
        if (*__nf == '.')
        {
            *__oe++ = __npt.decimal_point();
            ++__nf;
            break;
        }
        else
            *__oe++ = __ct.widen(*__nf);
    }
    __ct.widen(__nf, __ne, __oe);
    __oe += __ne - __nf;
    if (__np == __ne)
        __op = __oe;
    else
        __op = __ob + (__np - __nb);
}

extern template struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_put<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_put<wchar_t>;
#endif
# 1280 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
class _LIBCPP_TEMPLATE_VIS num_put
    : public locale::facet,
      private __num_put<_CharT>
{
public:
    typedef _CharT char_type;
    typedef _OutputIterator iter_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit num_put(size_t __refs = 0)
        : locale::facet(__refs) {}

    _LIBCPP_INLINE_VISIBILITY
    iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                  bool __v) const
    {
        return do_put(__s, __iob, __fl, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                  long __v) const
    {
        return do_put(__s, __iob, __fl, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                  long long __v) const
    {
        return do_put(__s, __iob, __fl, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                  unsigned long __v) const
    {
        return do_put(__s, __iob, __fl, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                  unsigned long long __v) const
    {
        return do_put(__s, __iob, __fl, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                  double __v) const
    {
        return do_put(__s, __iob, __fl, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                  long double __v) const
    {
        return do_put(__s, __iob, __fl, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                  const void* __v) const
    {
        return do_put(__s, __iob, __fl, __v);
    }

    static locale::id id;

protected:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~num_put() override {}

    virtual iter_type do_put(iter_type __s, ios_base& __iob, char_type __fl,
                             bool __v) const;
    virtual iter_type do_put(iter_type __s, ios_base& __iob, char_type __fl,
                             long __v) const;
    virtual iter_type do_put(iter_type __s, ios_base& __iob, char_type __fl,
                             long long __v) const;
    virtual iter_type do_put(iter_type __s, ios_base& __iob, char_type __fl,
                             unsigned long) const;
    virtual iter_type do_put(iter_type __s, ios_base& __iob, char_type __fl,
                             unsigned long long) const;
    virtual iter_type do_put(iter_type __s, ios_base& __iob, char_type __fl,
                             double __v) const;
    virtual iter_type do_put(iter_type __s, ios_base& __iob, char_type __fl,
                             long double __v) const;
    virtual iter_type do_put(iter_type __s, ios_base& __iob, char_type __fl,
                             const void* __v) const;

    template <class _Integral>
    _LIBCPP_HIDE_FROM_ABI inline
    _OutputIterator __do_put_integral(iter_type __s, ios_base& __iob,
                                      char_type __fl, _Integral __v,
                                      char const* __len) const;

    template <class _Float>
    _LIBCPP_HIDE_FROM_ABI inline
    _OutputIterator __do_put_floating_point(iter_type __s, ios_base& __iob,
                                            char_type __fl, _Float __v,
                                            char const* __len) const;
};

template <class _CharT, class _OutputIterator>
locale::id
num_put<_CharT, _OutputIterator>::id;

template <class _CharT, class _OutputIterator>
_LIBCPP_HIDE_FROM_ABI
_OutputIterator
__pad_and_output(_OutputIterator __s,
                 const _CharT* __ob, const _CharT* __op, const _CharT* __oe,
                 ios_base& __iob, _CharT __fl)
{
    streamsize __sz = __oe - __ob;
    streamsize __ns = __iob.width();
    if (__ns > __sz)
        __ns -= __sz;
    else
        __ns = 0;
    for (;__ob < __op; ++__ob, ++__s)
        *__s = *__ob;
    for (; __ns; --__ns, ++__s)
        *__s = __fl;
    for (; __ob < __oe; ++__ob, ++__s)
        *__s = *__ob;
    __iob.width(0);
    return __s;
}

template <class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI
ostreambuf_iterator<_CharT, _Traits>
__pad_and_output(ostreambuf_iterator<_CharT, _Traits> __s,
                 const _CharT* __ob, const _CharT* __op, const _CharT* __oe,
                 ios_base& __iob, _CharT __fl)
{
    if (__s.__sbuf_ == nullptr)
        return __s;
    streamsize __sz = __oe - __ob;
    streamsize __ns = __iob.width();
    if (__ns > __sz)
        __ns -= __sz;
    else
        __ns = 0;
    streamsize __np = __op - __ob;
    if (__np > 0)
    {
        if (__s.__sbuf_->sputn(__ob, __np) != __np)
        {
            __s.__sbuf_ = nullptr;
            return __s;
        }
    }
    if (__ns > 0)
    {
        basic_string<_CharT, _Traits> __sp(__ns, __fl);
        if (__s.__sbuf_->sputn(__sp.data(), __ns) != __ns)
        {
            __s.__sbuf_ = nullptr;
            return __s;
        }
    }
    __np = __oe - __op;
    if (__np > 0)
    {
        if (__s.__sbuf_->sputn(__op, __np) != __np)
        {
            __s.__sbuf_ = nullptr;
            return __s;
        }
    }
    __iob.width(0);
    return __s;
}

template <class _CharT, class _OutputIterator>
_OutputIterator
num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
                                         char_type __fl, bool __v) const
{
    if ((__iob.flags() & ios_base::boolalpha) == 0)
        return do_put(__s, __iob, __fl, (unsigned long)__v);
    const numpunct<char_type>& __np = std::use_facet<numpunct<char_type> >(__iob.getloc());
    typedef typename numpunct<char_type>::string_type string_type;
    string_type __nm = __v ? __np.truename() : __np.falsename();
    for (typename string_type::iterator __i = __nm.begin(); __i != __nm.end(); ++__i, ++__s)
        *__s = *__i;
    return __s;
}

template <class _CharT, class _OutputIterator>
template <class _Integral>
_LIBCPP_HIDE_FROM_ABI inline
_OutputIterator
num_put<_CharT, _OutputIterator>::__do_put_integral(iter_type __s, ios_base& __iob,
                                                    char_type __fl, _Integral __v,
                                                    char const* __len) const
{
    // Stage 1 - Get number in narrow char
    char __fmt[8] = {'%', 0};
    this->__format_int(__fmt+1, __len, is_signed<_Integral>::value, __iob.flags());
    // Worst case is octal, with showbase enabled. Note that octal is always
    // printed as an unsigned value.
    using _Unsigned = typename make_unsigned<_Integral>::type;
    _LIBCPP_CONSTEXPR const unsigned __nbuf
        = (numeric_limits<_Unsigned>::digits / 3)        // 1 char per 3 bits
        + ((numeric_limits<_Unsigned>::digits % 3) != 0) // round up
        + 2; // base prefix + terminating null character
    char __nar[__nbuf];
    _LIBCPP_DIAGNOSTIC_PUSH
    _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
    _LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
    int __nc = __libcpp_snprintf_l(__nar, sizeof(__nar), _LIBCPP_GET_C_LOCALE, __fmt, __v);
    _LIBCPP_DIAGNOSTIC_POP
    char* __ne = __nar + __nc;
    char* __np = this->__identify_padding(__nar, __ne, __iob);
    // Stage 2 - Widen __nar while adding thousands separators
    char_type __o[2*(__nbuf-1) - 1];
    char_type* __op;  // pad here
    char_type* __oe;  // end of output
    this->__widen_and_group_int(__nar, __np, __ne, __o, __op, __oe, __iob.getloc());
    // [__o, __oe) contains thousands_sep'd wide number
    // Stage 3 & 4
    return std::__pad_and_output(__s, __o, __op, __oe, __iob, __fl);
}

template <class _CharT, class _OutputIterator>
_OutputIterator
num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
                                         char_type __fl, long __v) const
{
    return this->__do_put_integral(__s, __iob, __fl, __v, "l");
}

template <class _CharT, class _OutputIterator>
_OutputIterator
num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
                                         char_type __fl, long long __v) const
{
    return this->__do_put_integral(__s, __iob, __fl, __v, "ll");
}

template <class _CharT, class _OutputIterator>
_OutputIterator
num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
                                         char_type __fl, unsigned long __v) const
{
    return this->__do_put_integral(__s, __iob, __fl, __v, "l");
}

template <class _CharT, class _OutputIterator>
_OutputIterator
num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
                                         char_type __fl, unsigned long long __v) const
{
    return this->__do_put_integral(__s, __iob, __fl, __v, "ll");
}

template <class _CharT, class _OutputIterator>
template <class _Float>
_LIBCPP_HIDE_FROM_ABI inline
_OutputIterator
num_put<_CharT, _OutputIterator>::__do_put_floating_point(iter_type __s, ios_base& __iob,
                                                          char_type __fl, _Float __v,
                                                          char const* __len) const
{
    // Stage 1 - Get number in narrow char
    char __fmt[8] = {'%', 0};
    bool __specify_precision = this->__format_float(__fmt+1, __len, __iob.flags());
    const unsigned __nbuf = 30;
    char __nar[__nbuf];
    char* __nb = __nar;
    int __nc;
    _LIBCPP_DIAGNOSTIC_PUSH
    _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
    _LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
    if (__specify_precision)
        __nc = __libcpp_snprintf_l(__nb, __nbuf, _LIBCPP_GET_C_LOCALE, __fmt,
                                   (int)__iob.precision(), __v);
    else
        __nc = __libcpp_snprintf_l(__nb, __nbuf, _LIBCPP_GET_C_LOCALE, __fmt, __v);
    unique_ptr<char, void(*)(void*)> __nbh(nullptr, free);
    if (__nc > static_cast<int>(__nbuf-1))
    {
        if (__specify_precision)
            __nc = __libcpp_asprintf_l(&__nb, _LIBCPP_GET_C_LOCALE, __fmt, (int)__iob.precision(), __v);
        else
            __nc = __libcpp_asprintf_l(&__nb, _LIBCPP_GET_C_LOCALE, __fmt, __v);
        if (__nc == -1)
            __throw_bad_alloc();
        __nbh.reset(__nb);
    }
    _LIBCPP_DIAGNOSTIC_POP
    char* __ne = __nb + __nc;
    char* __np = this->__identify_padding(__nb, __ne, __iob);
    // Stage 2 - Widen __nar while adding thousands separators
    char_type __o[2*(__nbuf-1) - 1];
    char_type* __ob = __o;
    unique_ptr<char_type, void(*)(void*)> __obh(0, free);
    if (__nb != __nar)
    {
        __ob = (char_type*)malloc(2*static_cast<size_t>(__nc)*sizeof(char_type));
        if (__ob == 0)
            __throw_bad_alloc();
        __obh.reset(__ob);
    }
    char_type* __op;  // pad here
    char_type* __oe;  // end of output
    this->__widen_and_group_float(__nb, __np, __ne, __ob, __op, __oe, __iob.getloc());
    // [__o, __oe) contains thousands_sep'd wide number
    // Stage 3 & 4
    __s = std::__pad_and_output(__s, __ob, __op, __oe, __iob, __fl);
    return __s;
}

template <class _CharT, class _OutputIterator>
_OutputIterator
num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
                                         char_type __fl, double __v) const
{
    return this->__do_put_floating_point(__s, __iob, __fl, __v, "");
}

template <class _CharT, class _OutputIterator>
_OutputIterator
num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
                                         char_type __fl, long double __v) const
{
    return this->__do_put_floating_point(__s, __iob, __fl, __v, "L");
}

template <class _CharT, class _OutputIterator>
_OutputIterator
num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
                                         char_type __fl, const void* __v) const
{
    // Stage 1 - Get pointer in narrow char
    const unsigned __nbuf = 20;
    char __nar[__nbuf];
    int __nc = __libcpp_snprintf_l(__nar, sizeof(__nar), _LIBCPP_GET_C_LOCALE, "%p", __v);
    char* __ne = __nar + __nc;
    char* __np = this->__identify_padding(__nar, __ne, __iob);
    // Stage 2 - Widen __nar
    char_type __o[2*(__nbuf-1) - 1];
    char_type* __op;  // pad here
    char_type* __oe;  // end of output
    const ctype<char_type>& __ct = std::use_facet<ctype<char_type> >(__iob.getloc());
    __ct.widen(__nar, __ne, __o);
    __oe = __o + (__ne - __nar);
    if (__np == __ne)
        __op = __oe;
    else
        __op = __o + (__np - __nar);
    // [__o, __oe) contains wide number
    // Stage 3 & 4
    return std::__pad_and_output(__s, __o, __op, __oe, __iob, __fl);
}

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_put<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_put<wchar_t>;
#endif
# 1645 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

template <class _CharT, class _InputIterator>
_LIBCPP_HIDE_FROM_ABI
int
__get_up_to_n_digits(_InputIterator& __b, _InputIterator __e,
                     ios_base::iostate& __err, const ctype<_CharT>& __ct, int __n)
{
    // Precondition:  __n >= 1
    if (__b == __e)
    {
        __err |= ios_base::eofbit | ios_base::failbit;
        return 0;
    }
    // get first digit
    _CharT __c = *__b;
    if (!__ct.is(ctype_base::digit, __c))
    {
        __err |= ios_base::failbit;
        return 0;
    }
    int __r = __ct.narrow(__c, 0) - '0';
    for (++__b, (void) --__n; __b != __e && __n > 0; ++__b, (void) --__n)
    {
        // get next digit
        __c = *__b;
        if (!__ct.is(ctype_base::digit, __c))
            return __r;
        __r = __r * 10 + __ct.narrow(__c, 0) - '0';
    }
    if (__b == __e)
        __err |= ios_base::eofbit;
    return __r;
}

class _LIBCPP_EXPORTED_FROM_ABI time_base
{
public:
    enum dateorder {no_order, dmy, mdy, ymd, ydm};
};

template <class _CharT>
class _LIBCPP_TEMPLATE_VIS __time_get_c_storage
{
protected:
    typedef basic_string<_CharT> string_type;

    virtual const string_type* __weeks() const;
    virtual const string_type* __months() const;
    virtual const string_type* __am_pm() const;
    virtual const string_type& __c() const;
    virtual const string_type& __r() const;
    virtual const string_type& __x() const;
    virtual const string_type& __X() const;

    _LIBCPP_INLINE_VISIBILITY
    ~__time_get_c_storage() {}
};

template <> _LIBCPP_EXPORTED_FROM_ABI const string* __time_get_c_storage<char>::__weeks() const;
template <> _LIBCPP_EXPORTED_FROM_ABI const string* __time_get_c_storage<char>::__months() const;
template <> _LIBCPP_EXPORTED_FROM_ABI const string* __time_get_c_storage<char>::__am_pm() const;
template <> _LIBCPP_EXPORTED_FROM_ABI const string& __time_get_c_storage<char>::__c() const;
template <> _LIBCPP_EXPORTED_FROM_ABI const string& __time_get_c_storage<char>::__r() const;
template <> _LIBCPP_EXPORTED_FROM_ABI const string& __time_get_c_storage<char>::__x() const;
template <> _LIBCPP_EXPORTED_FROM_ABI const string& __time_get_c_storage<char>::__X() const;

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <> _LIBCPP_EXPORTED_FROM_ABI const wstring* __time_get_c_storage<wchar_t>::__weeks() const;
template <> _LIBCPP_EXPORTED_FROM_ABI const wstring* __time_get_c_storage<wchar_t>::__months() const;
template <> _LIBCPP_EXPORTED_FROM_ABI const wstring* __time_get_c_storage<wchar_t>::__am_pm() const;
template <> _LIBCPP_EXPORTED_FROM_ABI const wstring& __time_get_c_storage<wchar_t>::__c() const;
template <> _LIBCPP_EXPORTED_FROM_ABI const wstring& __time_get_c_storage<wchar_t>::__r() const;
template <> _LIBCPP_EXPORTED_FROM_ABI const wstring& __time_get_c_storage<wchar_t>::__x() const;
template <> _LIBCPP_EXPORTED_FROM_ABI const wstring& __time_get_c_storage<wchar_t>::__X() const;
#endif
# 1720 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
class _LIBCPP_TEMPLATE_VIS time_get
    : public locale::facet,
      public time_base,
      private __time_get_c_storage<_CharT>
{
public:
    typedef _CharT                  char_type;
    typedef _InputIterator          iter_type;
    typedef time_base::dateorder    dateorder;
    typedef basic_string<char_type> string_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit time_get(size_t __refs = 0)
        : locale::facet(__refs) {}

    _LIBCPP_INLINE_VISIBILITY
    dateorder date_order() const
    {
        return this->do_date_order();
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get_time(iter_type __b, iter_type __e, ios_base& __iob,
                       ios_base::iostate& __err, tm* __tm) const
    {
        return do_get_time(__b, __e, __iob, __err, __tm);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get_date(iter_type __b, iter_type __e, ios_base& __iob,
                       ios_base::iostate& __err, tm* __tm) const
    {
        return do_get_date(__b, __e, __iob, __err, __tm);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get_weekday(iter_type __b, iter_type __e, ios_base& __iob,
                          ios_base::iostate& __err, tm* __tm) const
    {
        return do_get_weekday(__b, __e, __iob, __err, __tm);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get_monthname(iter_type __b, iter_type __e, ios_base& __iob,
                            ios_base::iostate& __err, tm* __tm) const
    {
        return do_get_monthname(__b, __e, __iob, __err, __tm);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get_year(iter_type __b, iter_type __e, ios_base& __iob,
                       ios_base::iostate& __err, tm* __tm) const
    {
        return do_get_year(__b, __e, __iob, __err, __tm);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                  ios_base::iostate& __err, tm *__tm,
                  char __fmt, char __mod = 0) const
    {
        return do_get(__b, __e, __iob, __err, __tm, __fmt, __mod);
    }

    iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                  ios_base::iostate& __err, tm* __tm,
                  const char_type* __fmtb, const char_type* __fmte) const;

    static locale::id id;

protected:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~time_get() override {}

    virtual dateorder do_date_order() const;
    virtual iter_type do_get_time(iter_type __b, iter_type __e, ios_base& __iob,
                                  ios_base::iostate& __err, tm* __tm) const;
    virtual iter_type do_get_date(iter_type __b, iter_type __e, ios_base& __iob,
                                  ios_base::iostate& __err, tm* __tm) const;
    virtual iter_type do_get_weekday(iter_type __b, iter_type __e, ios_base& __iob,
                                     ios_base::iostate& __err, tm* __tm) const;
    virtual iter_type do_get_monthname(iter_type __b, iter_type __e, ios_base& __iob,
                                       ios_base::iostate& __err, tm* __tm) const;
    virtual iter_type do_get_year(iter_type __b, iter_type __e, ios_base& __iob,
                                  ios_base::iostate& __err, tm* __tm) const;
    virtual iter_type do_get(iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, tm* __tm,
                             char __fmt, char __mod) const;
private:
    void __get_white_space(iter_type& __b, iter_type __e,
                           ios_base::iostate& __err, const ctype<char_type>& __ct) const;
    void __get_percent(iter_type& __b, iter_type __e, ios_base::iostate& __err,
                       const ctype<char_type>& __ct) const;

    void __get_weekdayname(int& __m,
                           iter_type& __b, iter_type __e,
                           ios_base::iostate& __err,
                           const ctype<char_type>& __ct) const;
    void __get_monthname(int& __m,
                         iter_type& __b, iter_type __e,
                         ios_base::iostate& __err,
                         const ctype<char_type>& __ct) const;
    void __get_day(int& __d,
                   iter_type& __b, iter_type __e,
                   ios_base::iostate& __err,
                   const ctype<char_type>& __ct) const;
    void __get_month(int& __m,
                     iter_type& __b, iter_type __e,
                     ios_base::iostate& __err,
                     const ctype<char_type>& __ct) const;
    void __get_year(int& __y,
                   iter_type& __b, iter_type __e,
                   ios_base::iostate& __err,
                   const ctype<char_type>& __ct) const;
    void __get_year4(int& __y,
                    iter_type& __b, iter_type __e,
                    ios_base::iostate& __err,
                    const ctype<char_type>& __ct) const;
    void __get_hour(int& __d,
                    iter_type& __b, iter_type __e,
                    ios_base::iostate& __err,
                    const ctype<char_type>& __ct) const;
    void __get_12_hour(int& __h,
                       iter_type& __b, iter_type __e,
                       ios_base::iostate& __err,
                       const ctype<char_type>& __ct) const;
    void __get_am_pm(int& __h,
                     iter_type& __b, iter_type __e,
                     ios_base::iostate& __err,
                     const ctype<char_type>& __ct) const;
    void __get_minute(int& __m,
                      iter_type& __b, iter_type __e,
                      ios_base::iostate& __err,
                      const ctype<char_type>& __ct) const;
    void __get_second(int& __s,
                      iter_type& __b, iter_type __e,
                      ios_base::iostate& __err,
                      const ctype<char_type>& __ct) const;
    void __get_weekday(int& __w,
                       iter_type& __b, iter_type __e,
                       ios_base::iostate& __err,
                       const ctype<char_type>& __ct) const;
    void __get_day_year_num(int& __w,
                            iter_type& __b, iter_type __e,
                            ios_base::iostate& __err,
                            const ctype<char_type>& __ct) const;
};

template <class _CharT, class _InputIterator>
locale::id
time_get<_CharT, _InputIterator>::id;

// time_get primitives

template <class _CharT, class _InputIterator>
void
time_get<_CharT, _InputIterator>::__get_weekdayname(int& __w,
                                                    iter_type& __b, iter_type __e,
                                                    ios_base::iostate& __err,
                                                    const ctype<char_type>& __ct) const
{
    // Note:  ignoring case comes from the POSIX strptime spec
    const string_type* __wk = this->__weeks();
    ptrdiff_t __i = _VSTD::__scan_keyword(__b, __e, __wk, __wk+14, __ct, __err, false) - __wk;
    if (__i < 14)
        __w = __i % 7;
}

template <class _CharT, class _InputIterator>
void
time_get<_CharT, _InputIterator>::__get_monthname(int& __m,
                                                  iter_type& __b, iter_type __e,
                                                  ios_base::iostate& __err,
                                                  const ctype<char_type>& __ct) const
{
    // Note:  ignoring case comes from the POSIX strptime spec
    const string_type* __month = this->__months();
    ptrdiff_t __i = _VSTD::__scan_keyword(__b, __e, __month, __month+24, __ct, __err, false) - __month;
    if (__i < 24)
        __m = __i % 12;
}

template <class _CharT, class _InputIterator>
void
time_get<_CharT, _InputIterator>::__get_day(int& __d,
                                            iter_type& __b, iter_type __e,
                                            ios_base::iostate& __err,
                                            const ctype<char_type>& __ct) const
{
    int __t = _VSTD::__get_up_to_n_digits(__b, __e, __err, __ct, 2);
    if (!(__err & ios_base::failbit) && 1 <= __t && __t <= 31)
        __d = __t;
    else
        __err |= ios_base::failbit;
}

template <class _CharT, class _InputIterator>
void
time_get<_CharT, _InputIterator>::__get_month(int& __m,
                                              iter_type& __b, iter_type __e,
                                              ios_base::iostate& __err,
                                              const ctype<char_type>& __ct) const
{
    int __t = std::__get_up_to_n_digits(__b, __e, __err, __ct, 2) - 1;
    if (!(__err & ios_base::failbit) && 0 <= __t && __t <= 11)
        __m = __t;
    else
        __err |= ios_base::failbit;
}

template <class _CharT, class _InputIterator>
void
time_get<_CharT, _InputIterator>::__get_year(int& __y,
                                             iter_type& __b, iter_type __e,
                                             ios_base::iostate& __err,
                                             const ctype<char_type>& __ct) const
{
    int __t = std::__get_up_to_n_digits(__b, __e, __err, __ct, 4);
    if (!(__err & ios_base::failbit))
    {
        if (__t < 69)
            __t += 2000;
        else if (69 <= __t && __t <= 99)
            __t += 1900;
        __y = __t - 1900;
    }
}

template <class _CharT, class _InputIterator>
void
time_get<_CharT, _InputIterator>::__get_year4(int& __y,
                                              iter_type& __b, iter_type __e,
                                              ios_base::iostate& __err,
                                              const ctype<char_type>& __ct) const
{
    int __t = std::__get_up_to_n_digits(__b, __e, __err, __ct, 4);
    if (!(__err & ios_base::failbit))
        __y = __t - 1900;
}

template <class _CharT, class _InputIterator>
void
time_get<_CharT, _InputIterator>::__get_hour(int& __h,
                                             iter_type& __b, iter_type __e,
                                             ios_base::iostate& __err,
                                             const ctype<char_type>& __ct) const
{
    int __t = std::__get_up_to_n_digits(__b, __e, __err, __ct, 2);
    if (!(__err & ios_base::failbit) && __t <= 23)
        __h = __t;
    else
        __err |= ios_base::failbit;
}

template <class _CharT, class _InputIterator>
void
time_get<_CharT, _InputIterator>::__get_12_hour(int& __h,
                                                iter_type& __b, iter_type __e,
                                                ios_base::iostate& __err,
                                                const ctype<char_type>& __ct) const
{
    int __t = std::__get_up_to_n_digits(__b, __e, __err, __ct, 2);
    if (!(__err & ios_base::failbit) && 1 <= __t && __t <= 12)
        __h = __t;
    else
        __err |= ios_base::failbit;
}

template <class _CharT, class _InputIterator>
void
time_get<_CharT, _InputIterator>::__get_minute(int& __m,
                                               iter_type& __b, iter_type __e,
                                               ios_base::iostate& __err,
                                               const ctype<char_type>& __ct) const
{
    int __t = std::__get_up_to_n_digits(__b, __e, __err, __ct, 2);
    if (!(__err & ios_base::failbit) && __t <= 59)
        __m = __t;
    else
        __err |= ios_base::failbit;
}

template <class _CharT, class _InputIterator>
void
time_get<_CharT, _InputIterator>::__get_second(int& __s,
                                               iter_type& __b, iter_type __e,
                                               ios_base::iostate& __err,
                                               const ctype<char_type>& __ct) const
{
    int __t = std::__get_up_to_n_digits(__b, __e, __err, __ct, 2);
    if (!(__err & ios_base::failbit) && __t <= 60)
        __s = __t;
    else
        __err |= ios_base::failbit;
}

template <class _CharT, class _InputIterator>
void
time_get<_CharT, _InputIterator>::__get_weekday(int& __w,
                                                iter_type& __b, iter_type __e,
                                                ios_base::iostate& __err,
                                                const ctype<char_type>& __ct) const
{
    int __t = std::__get_up_to_n_digits(__b, __e, __err, __ct, 1);
    if (!(__err & ios_base::failbit) && __t <= 6)
        __w = __t;
    else
        __err |= ios_base::failbit;
}

template <class _CharT, class _InputIterator>
void
time_get<_CharT, _InputIterator>::__get_day_year_num(int& __d,
                                                     iter_type& __b, iter_type __e,
                                                     ios_base::iostate& __err,
                                                     const ctype<char_type>& __ct) const
{
    int __t = std::__get_up_to_n_digits(__b, __e, __err, __ct, 3);
    if (!(__err & ios_base::failbit) && __t <= 365)
        __d = __t;
    else
        __err |= ios_base::failbit;
}

template <class _CharT, class _InputIterator>
void
time_get<_CharT, _InputIterator>::__get_white_space(iter_type& __b, iter_type __e,
                                                    ios_base::iostate& __err,
                                                    const ctype<char_type>& __ct) const
{
    for (; __b != __e && __ct.is(ctype_base::space, *__b); ++__b)
        ;
    if (__b == __e)
        __err |= ios_base::eofbit;
}

template <class _CharT, class _InputIterator>
void
time_get<_CharT, _InputIterator>::__get_am_pm(int& __h,
                                              iter_type& __b, iter_type __e,
                                              ios_base::iostate& __err,
                                              const ctype<char_type>& __ct) const
{
    const string_type* __ap = this->__am_pm();
    if (__ap[0].size() + __ap[1].size() == 0)
    {
        __err |= ios_base::failbit;
        return;
    }
    ptrdiff_t __i = _VSTD::__scan_keyword(__b, __e, __ap, __ap+2, __ct, __err, false) - __ap;
    if (__i == 0 && __h == 12)
        __h = 0;
    else if (__i == 1 && __h < 12)
        __h += 12;
}

template <class _CharT, class _InputIterator>
void
time_get<_CharT, _InputIterator>::__get_percent(iter_type& __b, iter_type __e,
                                                ios_base::iostate& __err,
                                                const ctype<char_type>& __ct) const
{
    if (__b == __e)
    {
        __err |= ios_base::eofbit | ios_base::failbit;
        return;
    }
    if (__ct.narrow(*__b, 0) != '%')
        __err |= ios_base::failbit;
    else if(++__b == __e)
        __err |= ios_base::eofbit;
}

// time_get end primitives

template <class _CharT, class _InputIterator>
_InputIterator
time_get<_CharT, _InputIterator>::get(iter_type __b, iter_type __e,
                                      ios_base& __iob,
                                      ios_base::iostate& __err, tm* __tm,
                                      const char_type* __fmtb, const char_type* __fmte) const
{
    const ctype<char_type>& __ct = std::use_facet<ctype<char_type> >(__iob.getloc());
    __err = ios_base::goodbit;
    while (__fmtb != __fmte && __err == ios_base::goodbit)
    {
        if (__b == __e)
        {
            __err = ios_base::failbit;
            break;
        }
        if (__ct.narrow(*__fmtb, 0) == '%')
        {
            if (++__fmtb == __fmte)
            {
                __err = ios_base::failbit;
                break;
            }
            char __cmd = __ct.narrow(*__fmtb, 0);
            char __opt = '\0';
            if (__cmd == 'E' || __cmd == '0')
            {
                if (++__fmtb == __fmte)
                {
                    __err = ios_base::failbit;
                    break;
                }
                __opt = __cmd;
                __cmd = __ct.narrow(*__fmtb, 0);
            }
            __b = do_get(__b, __e, __iob, __err, __tm, __cmd, __opt);
            ++__fmtb;
        }
        else if (__ct.is(ctype_base::space, *__fmtb))
        {
            for (++__fmtb; __fmtb != __fmte && __ct.is(ctype_base::space, *__fmtb); ++__fmtb)
                ;
            for (        ;    __b != __e    && __ct.is(ctype_base::space, *__b);    ++__b)
                ;
        }
        else if (__ct.toupper(*__b) == __ct.toupper(*__fmtb))
        {
            ++__b;
            ++__fmtb;
        }
        else
            __err = ios_base::failbit;
    }
    if (__b == __e)
        __err |= ios_base::eofbit;
    return __b;
}

template <class _CharT, class _InputIterator>
typename time_get<_CharT, _InputIterator>::dateorder
time_get<_CharT, _InputIterator>::do_date_order() const
{
    return mdy;
}

template <class _CharT, class _InputIterator>
_InputIterator
time_get<_CharT, _InputIterator>::do_get_time(iter_type __b, iter_type __e,
                                              ios_base& __iob,
                                              ios_base::iostate& __err,
                                              tm* __tm) const
{
    const char_type __fmt[] = {'%', 'H', ':', '%', 'M', ':', '%', 'S'};
    return get(__b, __e, __iob, __err, __tm, __fmt, __fmt + sizeof(__fmt)/sizeof(__fmt[0]));
}

template <class _CharT, class _InputIterator>
_InputIterator
time_get<_CharT, _InputIterator>::do_get_date(iter_type __b, iter_type __e,
                                              ios_base& __iob,
                                              ios_base::iostate& __err,
                                              tm* __tm) const
{
    const string_type& __fmt = this->__x();
    return get(__b, __e, __iob, __err, __tm, __fmt.data(), __fmt.data() + __fmt.size());
}

template <class _CharT, class _InputIterator>
_InputIterator
time_get<_CharT, _InputIterator>::do_get_weekday(iter_type __b, iter_type __e,
                                                 ios_base& __iob,
                                                 ios_base::iostate& __err,
                                                 tm* __tm) const
{
    const ctype<char_type>& __ct = std::use_facet<ctype<char_type> >(__iob.getloc());
    __get_weekdayname(__tm->tm_wday, __b, __e, __err, __ct);
    return __b;
}

template <class _CharT, class _InputIterator>
_InputIterator
time_get<_CharT, _InputIterator>::do_get_monthname(iter_type __b, iter_type __e,
                                                   ios_base& __iob,
                                                   ios_base::iostate& __err,
                                                   tm* __tm) const
{
    const ctype<char_type>& __ct = std::use_facet<ctype<char_type> >(__iob.getloc());
    __get_monthname(__tm->tm_mon, __b, __e, __err, __ct);
    return __b;
}

template <class _CharT, class _InputIterator>
_InputIterator
time_get<_CharT, _InputIterator>::do_get_year(iter_type __b, iter_type __e,
                                              ios_base& __iob,
                                              ios_base::iostate& __err,
                                              tm* __tm) const
{
    const ctype<char_type>& __ct = std::use_facet<ctype<char_type> >(__iob.getloc());
    __get_year(__tm->tm_year, __b, __e, __err, __ct);
    return __b;
}

template <class _CharT, class _InputIterator>
_InputIterator
time_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
                                         ios_base& __iob,
                                         ios_base::iostate& __err, tm* __tm,
                                         char __fmt, char) const
{
    __err = ios_base::goodbit;
    const ctype<char_type>& __ct = std::use_facet<ctype<char_type> >(__iob.getloc());
    switch (__fmt)
    {
    case 'a':
    case 'A':
        __get_weekdayname(__tm->tm_wday, __b, __e, __err, __ct);
        break;
    case 'b':
    case 'B':
    case 'h':
        __get_monthname(__tm->tm_mon, __b, __e, __err, __ct);
        break;
    case 'c':
        {
        const string_type& __fm = this->__c();
        __b = get(__b, __e, __iob, __err, __tm, __fm.data(), __fm.data() + __fm.size());
        }
        break;
    case 'd':
    case 'e':
        __get_day(__tm->tm_mday, __b, __e, __err, __ct);
        break;
    case 'D':
        {
        const char_type __fm[] = {'%', 'm', '/', '%', 'd', '/', '%', 'y'};
        __b = get(__b, __e, __iob, __err, __tm, __fm, __fm + sizeof(__fm)/sizeof(__fm[0]));
        }
        break;
    case 'F':
        {
        const char_type __fm[] = {'%', 'Y', '-', '%', 'm', '-', '%', 'd'};
        __b = get(__b, __e, __iob, __err, __tm, __fm, __fm + sizeof(__fm)/sizeof(__fm[0]));
        }
        break;
    case 'H':
        __get_hour(__tm->tm_hour, __b, __e, __err, __ct);
        break;
    case 'I':
        __get_12_hour(__tm->tm_hour, __b, __e, __err, __ct);
        break;
    case 'j':
        __get_day_year_num(__tm->tm_yday, __b, __e, __err, __ct);
        break;
    case 'm':
        __get_month(__tm->tm_mon, __b, __e, __err, __ct);
        break;
    case 'M':
        __get_minute(__tm->tm_min, __b, __e, __err, __ct);
        break;
    case 'n':
    case 't':
        __get_white_space(__b, __e, __err, __ct);
        break;
    case 'p':
        __get_am_pm(__tm->tm_hour, __b, __e, __err, __ct);
        break;
    case 'r':
        {
        const char_type __fm[] = {'%', 'I', ':', '%', 'M', ':', '%', 'S', ' ', '%', 'p'};
        __b = get(__b, __e, __iob, __err, __tm, __fm, __fm + sizeof(__fm)/sizeof(__fm[0]));
        }
        break;
    case 'R':
        {
        const char_type __fm[] = {'%', 'H', ':', '%', 'M'};
        __b = get(__b, __e, __iob, __err, __tm, __fm, __fm + sizeof(__fm)/sizeof(__fm[0]));
        }
        break;
    case 'S':
        __get_second(__tm->tm_sec, __b, __e, __err, __ct);
        break;
    case 'T':
        {
        const char_type __fm[] = {'%', 'H', ':', '%', 'M', ':', '%', 'S'};
        __b = get(__b, __e, __iob, __err, __tm, __fm, __fm + sizeof(__fm)/sizeof(__fm[0]));
        }
        break;
    case 'w':
        __get_weekday(__tm->tm_wday, __b, __e, __err, __ct);
        break;
    case 'x':
        return do_get_date(__b, __e, __iob, __err, __tm);
    case 'X':
        {
        const string_type& __fm = this->__X();
        __b = get(__b, __e, __iob, __err, __tm, __fm.data(), __fm.data() + __fm.size());
        }
        break;
    case 'y':
        __get_year(__tm->tm_year, __b, __e, __err, __ct);
        break;
    case 'Y':
        __get_year4(__tm->tm_year, __b, __e, __err, __ct);
        break;
    case '%':
        __get_percent(__b, __e, __err, __ct);
        break;
    default:
        __err |= ios_base::failbit;
    }
    return __b;
}

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get<wchar_t>;
#endif
# 2334 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

class _LIBCPP_EXPORTED_FROM_ABI __time_get
{
protected:
    locale_t __loc_;

    __time_get(const char* __nm);
    __time_get(const string& __nm);
    ~__time_get();
};

template <class _CharT>
class _LIBCPP_TEMPLATE_VIS __time_get_storage
    : public __time_get
{
protected:
    typedef basic_string<_CharT> string_type;

    string_type __weeks_[14];
    string_type __months_[24];
    string_type __am_pm_[2];
    string_type __c_;
    string_type __r_;
    string_type __x_;
    string_type __X_;

    explicit __time_get_storage(const char* __nm);
    explicit __time_get_storage(const string& __nm);

    _LIBCPP_INLINE_VISIBILITY ~__time_get_storage() {}

    time_base::dateorder __do_date_order() const;

private:
    void init(const ctype<_CharT>&);
    string_type __analyze(char __fmt, const ctype<_CharT>&);
};

#define _LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(_CharT) \
template <> _LIBCPP_EXPORTED_FROM_ABI time_base::dateorder __time_get_storage<_CharT>::__do_date_order() const; \
template <> _LIBCPP_EXPORTED_FROM_ABI __time_get_storage<_CharT>::__time_get_storage(const char*); \
template <> _LIBCPP_EXPORTED_FROM_ABI __time_get_storage<_CharT>::__time_get_storage(const string&); \
template <> _LIBCPP_EXPORTED_FROM_ABI void __time_get_storage<_CharT>::init(const ctype<_CharT>&); \
template <> _LIBCPP_EXPORTED_FROM_ABI __time_get_storage<_CharT>::string_type __time_get_storage<_CharT>::__analyze(char, const ctype<_CharT>&); \
extern template _LIBCPP_EXPORTED_FROM_ABI time_base::dateorder __time_get_storage<_CharT>::__do_date_order() const; \
extern template _LIBCPP_EXPORTED_FROM_ABI __time_get_storage<_CharT>::__time_get_storage(const char*); \
extern template _LIBCPP_EXPORTED_FROM_ABI __time_get_storage<_CharT>::__time_get_storage(const string&); \
extern template _LIBCPP_EXPORTED_FROM_ABI void __time_get_storage<_CharT>::init(const ctype<_CharT>&); \
extern template _LIBCPP_EXPORTED_FROM_ABI __time_get_storage<_CharT>::string_type __time_get_storage<_CharT>::__analyze(char, const ctype<_CharT>&); \
/**/

_LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(char)
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
_LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(wchar_t)
#endif
# 2389 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#undef _LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION

template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
class _LIBCPP_TEMPLATE_VIS time_get_byname
    : public time_get<_CharT, _InputIterator>,
      private __time_get_storage<_CharT>
{
public:
    typedef time_base::dateorder    dateorder;
    typedef _InputIterator          iter_type;
    typedef _CharT                  char_type;
    typedef basic_string<char_type> string_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit time_get_byname(const char* __nm, size_t __refs = 0)
        : time_get<_CharT, _InputIterator>(__refs),
          __time_get_storage<_CharT>(__nm) {}
    _LIBCPP_INLINE_VISIBILITY
    explicit time_get_byname(const string& __nm, size_t __refs = 0)
        : time_get<_CharT, _InputIterator>(__refs),
          __time_get_storage<_CharT>(__nm) {}

protected:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~time_get_byname() override {}

    _LIBCPP_HIDE_FROM_ABI_VIRTUAL dateorder do_date_order() const override {return this->__do_date_order();}
private:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL const string_type* __weeks() const override  {return this->__weeks_;}
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL const string_type* __months() const override {return this->__months_;}
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL const string_type* __am_pm() const override  {return this->__am_pm_;}
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL const string_type& __c() const override      {return this->__c_;}
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL const string_type& __r() const override      {return this->__r_;}
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL const string_type& __x() const override      {return this->__x_;}
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL const string_type& __X() const override      {return this->__X_;}
};

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get_byname<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get_byname<wchar_t>;
#endif
# 2429 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

class _LIBCPP_EXPORTED_FROM_ABI __time_put
{
    locale_t __loc_;
protected:
    _LIBCPP_INLINE_VISIBILITY __time_put() : __loc_(_LIBCPP_GET_C_LOCALE) {}
    __time_put(const char* __nm);
    __time_put(const string& __nm);
    ~__time_put();
    void __do_put(char* __nb, char*& __ne, const tm* __tm,
                  char __fmt, char __mod) const;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
    void __do_put(wchar_t* __wb, wchar_t*& __we, const tm* __tm,
                  char __fmt, char __mod) const;
#endif
# 2444 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
};

template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
class _LIBCPP_TEMPLATE_VIS time_put
    : public locale::facet,
      private __time_put
{
public:
    typedef _CharT char_type;
    typedef _OutputIterator iter_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit time_put(size_t __refs = 0)
        : locale::facet(__refs) {}

    iter_type put(iter_type __s, ios_base& __iob, char_type __fl, const tm* __tm,
                  const char_type* __pb, const char_type* __pe) const;

    _LIBCPP_INLINE_VISIBILITY
    iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                  const tm* __tm, char __fmt, char __mod = 0) const
    {
        return do_put(__s, __iob, __fl, __tm, __fmt, __mod);
    }

    static locale::id id;

protected:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~time_put() override {}
    virtual iter_type do_put(iter_type __s, ios_base&, char_type, const tm* __tm,
                             char __fmt, char __mod) const;

    _LIBCPP_INLINE_VISIBILITY
    explicit time_put(const char* __nm, size_t __refs)
        : locale::facet(__refs),
          __time_put(__nm) {}
    _LIBCPP_INLINE_VISIBILITY
    explicit time_put(const string& __nm, size_t __refs)
        : locale::facet(__refs),
          __time_put(__nm) {}
};

template <class _CharT, class _OutputIterator>
locale::id
time_put<_CharT, _OutputIterator>::id;

template <class _CharT, class _OutputIterator>
_OutputIterator
time_put<_CharT, _OutputIterator>::put(iter_type __s, ios_base& __iob,
                                       char_type __fl, const tm* __tm,
                                       const char_type* __pb,
                                       const char_type* __pe) const
{
    const ctype<char_type>& __ct = std::use_facet<ctype<char_type> >(__iob.getloc());
    for (; __pb != __pe; ++__pb)
    {
        if (__ct.narrow(*__pb, 0) == '%')
        {
            if (++__pb == __pe)
            {
                *__s++ = __pb[-1];
                break;
            }
            char __mod = 0;
            char __fmt = __ct.narrow(*__pb, 0);
            if (__fmt == 'E' || __fmt == 'O')
            {
                if (++__pb == __pe)
                {
                    *__s++ = __pb[-2];
                    *__s++ = __pb[-1];
                    break;
                }
                __mod = __fmt;
                __fmt = __ct.narrow(*__pb, 0);
            }
            __s = do_put(__s, __iob, __fl, __tm, __fmt, __mod);
        }
        else
            *__s++ = *__pb;
    }
    return __s;
}

template <class _CharT, class _OutputIterator>
_OutputIterator
time_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base&,
                                          char_type, const tm* __tm,
                                          char __fmt, char __mod) const
{
    char_type __nar[100];
    char_type* __nb = __nar;
    char_type* __ne = __nb + 100;
    __do_put(__nb, __ne, __tm, __fmt, __mod);
    return _VSTD::copy(__nb, __ne, __s);
}

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put<wchar_t>;
#endif
# 2545 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
class _LIBCPP_TEMPLATE_VIS time_put_byname
    : public time_put<_CharT, _OutputIterator>
{
public:
    _LIBCPP_INLINE_VISIBILITY
    explicit time_put_byname(const char* __nm, size_t __refs = 0)
        : time_put<_CharT, _OutputIterator>(__nm, __refs) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit time_put_byname(const string& __nm, size_t __refs = 0)
        : time_put<_CharT, _OutputIterator>(__nm, __refs) {}

protected:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~time_put_byname() override {}
};

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put_byname<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put_byname<wchar_t>;
#endif
# 2567 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

// money_base

class _LIBCPP_EXPORTED_FROM_ABI money_base
{
public:
    enum part {none, space, symbol, sign, value};
    struct pattern {char field[4];};

    _LIBCPP_INLINE_VISIBILITY money_base() {}
};

// moneypunct

template <class _CharT, bool _International = false>
class _LIBCPP_TEMPLATE_VIS moneypunct
    : public locale::facet,
      public money_base
{
public:
    typedef _CharT                  char_type;
    typedef basic_string<char_type> string_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit moneypunct(size_t __refs = 0)
        : locale::facet(__refs) {}

    _LIBCPP_INLINE_VISIBILITY char_type   decimal_point() const {return do_decimal_point();}
    _LIBCPP_INLINE_VISIBILITY char_type   thousands_sep() const {return do_thousands_sep();}
    _LIBCPP_INLINE_VISIBILITY string      grouping()      const {return do_grouping();}
    _LIBCPP_INLINE_VISIBILITY string_type curr_symbol()   const {return do_curr_symbol();}
    _LIBCPP_INLINE_VISIBILITY string_type positive_sign() const {return do_positive_sign();}
    _LIBCPP_INLINE_VISIBILITY string_type negative_sign() const {return do_negative_sign();}
    _LIBCPP_INLINE_VISIBILITY int         frac_digits()   const {return do_frac_digits();}
    _LIBCPP_INLINE_VISIBILITY pattern     pos_format()    const {return do_pos_format();}
    _LIBCPP_INLINE_VISIBILITY pattern     neg_format()    const {return do_neg_format();}

    static locale::id id;
    static const bool intl = _International;

protected:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~moneypunct() override {}

    virtual char_type   do_decimal_point() const {return numeric_limits<char_type>::max();}
    virtual char_type   do_thousands_sep() const {return numeric_limits<char_type>::max();}
    virtual string      do_grouping()      const {return string();}
    virtual string_type do_curr_symbol()   const {return string_type();}
    virtual string_type do_positive_sign() const {return string_type();}
    virtual string_type do_negative_sign() const {return string_type(1, '-');}
    virtual int         do_frac_digits()   const {return 0;}
    virtual pattern     do_pos_format()    const
        {pattern __p = {{symbol, sign, none, value}}; return __p;}
    virtual pattern     do_neg_format()    const
        {pattern __p = {{symbol, sign, none, value}}; return __p;}
};

template <class _CharT, bool _International>
locale::id
moneypunct<_CharT, _International>::id;

template <class _CharT, bool _International>
const bool
moneypunct<_CharT, _International>::intl;

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<char, false>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<char, true>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<wchar_t, false>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<wchar_t, true>;
#endif
# 2637 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

// moneypunct_byname

template <class _CharT, bool _International = false>
class _LIBCPP_TEMPLATE_VIS moneypunct_byname
    : public moneypunct<_CharT, _International>
{
public:
    typedef money_base::pattern  pattern;
    typedef _CharT                  char_type;
    typedef basic_string<char_type> string_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit moneypunct_byname(const char* __nm, size_t __refs = 0)
        : moneypunct<_CharT, _International>(__refs) {init(__nm);}

    _LIBCPP_INLINE_VISIBILITY
    explicit moneypunct_byname(const string& __nm, size_t __refs = 0)
        : moneypunct<_CharT, _International>(__refs) {init(__nm.c_str());}

protected:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~moneypunct_byname() override {}

     char_type   do_decimal_point() const override {return __decimal_point_;}
     char_type   do_thousands_sep() const override {return __thousands_sep_;}
     string      do_grouping()      const override {return __grouping_;}
     string_type do_curr_symbol()   const override {return __curr_symbol_;}
     string_type do_positive_sign() const override {return __positive_sign_;}
     string_type do_negative_sign() const override {return __negative_sign_;}
     int         do_frac_digits()   const override {return __frac_digits_;}
     pattern     do_pos_format()    const override {return __pos_format_;}
     pattern     do_neg_format()    const override {return __neg_format_;}

private:
    char_type   __decimal_point_;
    char_type   __thousands_sep_;
    string      __grouping_;
    string_type __curr_symbol_;
    string_type __positive_sign_;
    string_type __negative_sign_;
    int         __frac_digits_;
    pattern     __pos_format_;
    pattern     __neg_format_;

    void init(const char*);
};

template<> _LIBCPP_EXPORTED_FROM_ABI void moneypunct_byname<char, false>::init(const char*);
template<> _LIBCPP_EXPORTED_FROM_ABI void moneypunct_byname<char, true>::init(const char*);
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, false>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, true>;

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template<> _LIBCPP_EXPORTED_FROM_ABI void moneypunct_byname<wchar_t, false>::init(const char*);
template<> _LIBCPP_EXPORTED_FROM_ABI void moneypunct_byname<wchar_t, true>::init(const char*);
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<wchar_t, false>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<wchar_t, true>;
#endif
# 2695 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

// money_get

template <class _CharT>
class __money_get
{
protected:
    typedef _CharT                  char_type;
    typedef basic_string<char_type> string_type;

    _LIBCPP_INLINE_VISIBILITY __money_get() {}

    static void __gather_info(bool __intl, const locale& __loc,
                              money_base::pattern& __pat, char_type& __dp,
                              char_type& __ts, string& __grp,
                              string_type& __sym, string_type& __psn,
                              string_type& __nsn, int& __fd);
};

template <class _CharT>
void
__money_get<_CharT>::__gather_info(bool __intl, const locale& __loc,
                                   money_base::pattern& __pat, char_type& __dp,
                                   char_type& __ts, string& __grp,
                                   string_type& __sym, string_type& __psn,
                                   string_type& __nsn, int& __fd)
{
    if (__intl)
    {
        const moneypunct<char_type, true>& __mp =
            std::use_facet<moneypunct<char_type, true> >(__loc);
        __pat = __mp.neg_format();
        __nsn = __mp.negative_sign();
        __psn = __mp.positive_sign();
        __dp = __mp.decimal_point();
        __ts = __mp.thousands_sep();
        __grp = __mp.grouping();
        __sym = __mp.curr_symbol();
        __fd = __mp.frac_digits();
    }
    else
    {
        const moneypunct<char_type, false>& __mp =
            std::use_facet<moneypunct<char_type, false> >(__loc);
        __pat = __mp.neg_format();
        __nsn = __mp.negative_sign();
        __psn = __mp.positive_sign();
        __dp = __mp.decimal_point();
        __ts = __mp.thousands_sep();
        __grp = __mp.grouping();
        __sym = __mp.curr_symbol();
        __fd = __mp.frac_digits();
    }
}

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_get<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_get<wchar_t>;
#endif
# 2754 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
class _LIBCPP_TEMPLATE_VIS money_get
    : public locale::facet,
      private __money_get<_CharT>
{
public:
    typedef _CharT                  char_type;
    typedef _InputIterator          iter_type;
    typedef basic_string<char_type> string_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit money_get(size_t __refs = 0)
        : locale::facet(__refs) {}

    _LIBCPP_INLINE_VISIBILITY
    iter_type get(iter_type __b, iter_type __e, bool __intl, ios_base& __iob,
                  ios_base::iostate& __err, long double& __v) const
    {
        return do_get(__b, __e, __intl, __iob, __err, __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type get(iter_type __b, iter_type __e, bool __intl, ios_base& __iob,
                  ios_base::iostate& __err, string_type& __v) const
    {
        return do_get(__b, __e, __intl, __iob, __err, __v);
    }

    static locale::id id;

protected:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~money_get() override {}

    virtual iter_type do_get(iter_type __b, iter_type __e, bool __intl,
                             ios_base& __iob, ios_base::iostate& __err,
                             long double& __v) const;
    virtual iter_type do_get(iter_type __b, iter_type __e, bool __intl,
                             ios_base& __iob, ios_base::iostate& __err,
                             string_type& __v) const;

private:
    static bool __do_get(iter_type& __b, iter_type __e,
                         bool __intl, const locale& __loc,
                         ios_base::fmtflags __flags, ios_base::iostate& __err,
                         bool& __neg, const ctype<char_type>& __ct,
                         unique_ptr<char_type, void(*)(void*)>& __wb,
                         char_type*& __wn, char_type* __we);
};

template <class _CharT, class _InputIterator>
locale::id
money_get<_CharT, _InputIterator>::id;

_LIBCPP_EXPORTED_FROM_ABI void __do_nothing(void*);

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
void
__double_or_nothing(unique_ptr<_Tp, void(*)(void*)>& __b, _Tp*& __n, _Tp*& __e)
{
    bool __owns = __b.get_deleter() != __do_nothing;
    size_t __cur_cap = static_cast<size_t>(__e-__b.get()) * sizeof(_Tp);
    size_t __new_cap = __cur_cap < numeric_limits<size_t>::max() / 2 ?
                       2 * __cur_cap : numeric_limits<size_t>::max();
    if (__new_cap == 0)
        __new_cap = sizeof(_Tp);
    size_t __n_off = static_cast<size_t>(__n - __b.get());
    _Tp* __t = (_Tp*)std::realloc(__owns ? __b.get() : 0, __new_cap);
    if (__t == 0)
        __throw_bad_alloc();
    if (__owns)
        __b.release();
    __b = unique_ptr<_Tp, void(*)(void*)>(__t, free);
    __new_cap /= sizeof(_Tp);
    __n = __b.get() + __n_off;
    __e = __b.get() + __new_cap;
}

// true == success
template <class _CharT, class _InputIterator>
bool
money_get<_CharT, _InputIterator>::__do_get(iter_type& __b, iter_type __e,
                                            bool __intl, const locale& __loc,
                                            ios_base::fmtflags __flags,
                                            ios_base::iostate& __err,
                                            bool& __neg,
                                            const ctype<char_type>& __ct,
                                            unique_ptr<char_type, void(*)(void*)>& __wb,
                                            char_type*& __wn, char_type* __we)
{
    if (__b == __e) {
        __err |= ios_base::failbit;
        return false;
    }
    const unsigned __bz = 100;
    unsigned __gbuf[__bz];
    unique_ptr<unsigned, void(*)(void*)> __gb(__gbuf, __do_nothing);
    unsigned* __gn = __gb.get();
    unsigned* __ge = __gn + __bz;
    money_base::pattern __pat;
    char_type __dp;
    char_type __ts;
    string __grp;
    string_type __sym;
    string_type __psn;
    string_type __nsn;
    // Capture the spaces read into money_base::{space,none} so they
    // can be compared to initial spaces in __sym.
    string_type __spaces;
    int __fd;
    __money_get<_CharT>::__gather_info(__intl, __loc, __pat, __dp, __ts, __grp,
                                       __sym, __psn, __nsn, __fd);
    const string_type* __trailing_sign = 0;
    __wn = __wb.get();
    for (unsigned __p = 0; __p < 4 && __b != __e; ++__p)
    {
        switch (__pat.field[__p])
        {
        case money_base::space:
            if (__p != 3)
            {
                if (__ct.is(ctype_base::space, *__b))
                    __spaces.push_back(*__b++);
                else
                {
                    __err |= ios_base::failbit;
                    return false;
                }
            }
            _LIBCPP_FALLTHROUGH();
        case money_base::none:
            if (__p != 3)
            {
                while (__b != __e && __ct.is(ctype_base::space, *__b))
                    __spaces.push_back(*__b++);
            }
            break;
        case money_base::sign:
            if (__psn.size() > 0 && *__b == __psn[0])
            {
                ++__b;
                __neg = false;
                if (__psn.size() > 1)
                  __trailing_sign = &__psn;
                break;
            }
            if (__nsn.size() > 0 && *__b == __nsn[0])
            {
                ++__b;
                __neg = true;
                if (__nsn.size() > 1)
                    __trailing_sign = &__nsn;
                break;
            }
            if (__psn.size() > 0 && __nsn.size() > 0)
            {   // sign is required
                __err |= ios_base::failbit;
                return false;
            }
            if (__psn.size() == 0 && __nsn.size() == 0)
                // locale has no way of specifying a sign. Use the initial value of __neg as a default
                break;
            __neg = (__nsn.size() == 0);
            break;
        case money_base::symbol:
            {
            bool __more_needed = __trailing_sign ||
                                 (__p < 2)       ||
                                 (__p == 2 && __pat.field[3] != static_cast<char>(money_base::none));
            bool __sb = (__flags & ios_base::showbase) != 0;
            if (__sb || __more_needed)
            {
                typename string_type::const_iterator __sym_space_end = __sym.begin();
                if (__p > 0 && (__pat.field[__p - 1] == money_base::none ||
                                __pat.field[__p - 1] == money_base::space)) {
                    // Match spaces we've already read against spaces at
                    // the beginning of __sym.
                    while (__sym_space_end != __sym.end() &&
                           __ct.is(ctype_base::space, *__sym_space_end))
                        ++__sym_space_end;
                    const size_t __num_spaces = __sym_space_end - __sym.begin();
                    if (__num_spaces > __spaces.size() ||
                        !std::equal(__spaces.end() - __num_spaces, __spaces.end(),
                               __sym.begin())) {
                        // No match. Put __sym_space_end back at the
                        // beginning of __sym, which will prevent a
                        // match in the next loop.
                        __sym_space_end = __sym.begin();
                    }
                }
                typename string_type::const_iterator __sym_curr_char = __sym_space_end;
                while (__sym_curr_char != __sym.end() && __b != __e &&
                       *__b == *__sym_curr_char) {
                    ++__b;
                    ++__sym_curr_char;
                }
                if (__sb && __sym_curr_char != __sym.end())
                {
                    __err |= ios_base::failbit;
                    return false;
                }
            }
            }
            break;
        case money_base::value:
            {
            unsigned __ng = 0;
            for (; __b != __e; ++__b)
            {
                char_type __c = *__b;
                if (__ct.is(ctype_base::digit, __c))
                {
                    if (__wn == __we)
                        std::__double_or_nothing(__wb, __wn, __we);
                    *__wn++ = __c;
                    ++__ng;
                }
                else if (__grp.size() > 0 && __ng > 0 && __c == __ts)
                {
                    if (__gn == __ge)
                        std::__double_or_nothing(__gb, __gn, __ge);
                    *__gn++ = __ng;
                    __ng = 0;
                }
                else
                    break;
            }
            if (__gb.get() != __gn && __ng > 0)
            {
                if (__gn == __ge)
                    std::__double_or_nothing(__gb, __gn, __ge);
                *__gn++ = __ng;
            }
            if (__fd > 0)
            {
                if (__b == __e || *__b != __dp)
                {
                    __err |= ios_base::failbit;
                    return false;
                }
                for (++__b; __fd > 0; --__fd, ++__b)
                {
                    if (__b == __e || !__ct.is(ctype_base::digit, *__b))
                    {
                        __err |= ios_base::failbit;
                        return false;
                    }
                    if (__wn == __we)
                        std::__double_or_nothing(__wb, __wn, __we);
                    *__wn++ = *__b;
                }
            }
            if (__wn == __wb.get())
            {
                __err |= ios_base::failbit;
                return false;
            }
            }
            break;
        }
    }
    if (__trailing_sign)
    {
        for (unsigned __i = 1; __i < __trailing_sign->size(); ++__i, ++__b)
        {
            if (__b == __e || *__b != (*__trailing_sign)[__i])
            {
                __err |= ios_base::failbit;
                return false;
            }
        }
    }
    if (__gb.get() != __gn)
    {
        ios_base::iostate __et = ios_base::goodbit;
        __check_grouping(__grp, __gb.get(), __gn, __et);
        if (__et)
        {
            __err |= ios_base::failbit;
            return false;
        }
    }
    return true;
}

template <class _CharT, class _InputIterator>
_InputIterator
money_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
                                          bool __intl, ios_base& __iob,
                                          ios_base::iostate& __err,
                                          long double& __v) const
{
    const int __bz = 100;
    char_type __wbuf[__bz];
    unique_ptr<char_type, void(*)(void*)> __wb(__wbuf, __do_nothing);
    char_type* __wn;
    char_type* __we = __wbuf + __bz;
    locale __loc = __iob.getloc();
    const ctype<char_type>& __ct = std::use_facet<ctype<char_type> >(__loc);
    bool __neg = false;
    if (__do_get(__b, __e, __intl, __loc, __iob.flags(), __err, __neg, __ct,
                 __wb, __wn, __we))
    {
        const char __src[] = "0123456789";
        char_type __atoms[sizeof(__src)-1];
        __ct.widen(__src, __src + (sizeof(__src)-1), __atoms);
        char __nbuf[__bz];
        char* __nc = __nbuf;
        unique_ptr<char, void(*)(void*)> __h(nullptr, free);
        if (__wn - __wb.get() > __bz-2)
        {
            __h.reset((char*)malloc(static_cast<size_t>(__wn - __wb.get() + 2)));
            if (__h.get() == nullptr)
                __throw_bad_alloc();
            __nc = __h.get();
        }
        if (__neg)
            *__nc++ = '-';
        for (const char_type* __w = __wb.get(); __w < __wn; ++__w, ++__nc)
            *__nc = __src[std::find(__atoms, _VSTD::end(__atoms), *__w) - __atoms];
        *__nc = char();
        if (sscanf(__nbuf, "%Lf", &__v) != 1)
            __throw_runtime_error("money_get error");
    }
    if (__b == __e)
        __err |= ios_base::eofbit;
    return __b;
}

template <class _CharT, class _InputIterator>
_InputIterator
money_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
                                          bool __intl, ios_base& __iob,
                                          ios_base::iostate& __err,
                                          string_type& __v) const
{
    const int __bz = 100;
    char_type __wbuf[__bz];
    unique_ptr<char_type, void(*)(void*)> __wb(__wbuf, __do_nothing);
    char_type* __wn;
    char_type* __we = __wbuf + __bz;
    locale __loc = __iob.getloc();
    const ctype<char_type>& __ct = std::use_facet<ctype<char_type> >(__loc);
    bool __neg = false;
    if (__do_get(__b, __e, __intl, __loc, __iob.flags(), __err, __neg, __ct,
                 __wb, __wn, __we))
    {
        __v.clear();
        if (__neg)
            __v.push_back(__ct.widen('-'));
        char_type __z = __ct.widen('0');
        char_type* __w;
        for (__w = __wb.get(); __w < __wn-1; ++__w)
            if (*__w != __z)
                break;
        __v.append(__w, __wn);
    }
    if (__b == __e)
        __err |= ios_base::eofbit;
    return __b;
}

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_get<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_get<wchar_t>;
#endif
# 3121 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

// money_put

template <class _CharT>
class __money_put
{
protected:
    typedef _CharT                  char_type;
    typedef basic_string<char_type> string_type;

    _LIBCPP_INLINE_VISIBILITY __money_put() {}

    static void __gather_info(bool __intl, bool __neg, const locale& __loc,
                              money_base::pattern& __pat, char_type& __dp,
                              char_type& __ts, string& __grp,
                              string_type& __sym, string_type& __sn,
                              int& __fd);
    static void __format(char_type* __mb, char_type*& __mi, char_type*& __me,
                         ios_base::fmtflags __flags,
                         const char_type* __db, const char_type* __de,
                         const ctype<char_type>& __ct, bool __neg,
                         const money_base::pattern& __pat, char_type __dp,
                         char_type __ts, const string& __grp,
                         const string_type& __sym, const string_type& __sn,
                         int __fd);
};

template <class _CharT>
void
__money_put<_CharT>::__gather_info(bool __intl, bool __neg, const locale& __loc,
                                   money_base::pattern& __pat, char_type& __dp,
                                   char_type& __ts, string& __grp,
                                   string_type& __sym, string_type& __sn,
                                   int& __fd)
{
    if (__intl)
    {
        const moneypunct<char_type, true>& __mp =
            std::use_facet<moneypunct<char_type, true> >(__loc);
        if (__neg)
        {
            __pat = __mp.neg_format();
            __sn = __mp.negative_sign();
        }
        else
        {
            __pat = __mp.pos_format();
            __sn = __mp.positive_sign();
        }
        __dp = __mp.decimal_point();
        __ts = __mp.thousands_sep();
        __grp = __mp.grouping();
        __sym = __mp.curr_symbol();
        __fd = __mp.frac_digits();
    }
    else
    {
        const moneypunct<char_type, false>& __mp =
            std::use_facet<moneypunct<char_type, false> >(__loc);
        if (__neg)
        {
            __pat = __mp.neg_format();
            __sn = __mp.negative_sign();
        }
        else
        {
            __pat = __mp.pos_format();
            __sn = __mp.positive_sign();
        }
        __dp = __mp.decimal_point();
        __ts = __mp.thousands_sep();
        __grp = __mp.grouping();
        __sym = __mp.curr_symbol();
        __fd = __mp.frac_digits();
    }
}

template <class _CharT>
void
__money_put<_CharT>::__format(char_type* __mb, char_type*& __mi, char_type*& __me,
                              ios_base::fmtflags __flags,
                              const char_type* __db, const char_type* __de,
                              const ctype<char_type>& __ct, bool __neg,
                              const money_base::pattern& __pat, char_type __dp,
                              char_type __ts, const string& __grp,
                              const string_type& __sym, const string_type& __sn,
                              int __fd)
{
    __me = __mb;
    for (char __p : __pat.field)
    {
        switch (__p)
        {
        case money_base::none:
            __mi = __me;
            break;
        case money_base::space:
            __mi = __me;
            *__me++ = __ct.widen(' ');
            break;
        case money_base::sign:
            if (!__sn.empty())
                *__me++ = __sn[0];
            break;
        case money_base::symbol:
            if (!__sym.empty() && (__flags & ios_base::showbase))
                __me = _VSTD::copy(__sym.begin(), __sym.end(), __me);
            break;
        case money_base::value:
            {
            // remember start of value so we can reverse it
            char_type* __t = __me;
            // find beginning of digits
            if (__neg)
                ++__db;
            // find end of digits
            const char_type* __d;
            for (__d = __db; __d < __de; ++__d)
                if (!__ct.is(ctype_base::digit, *__d))
                    break;
            // print fractional part
            if (__fd > 0)
            {
                int __f;
                for (__f = __fd; __d > __db && __f > 0; --__f)
                    *__me++ = *--__d;
                char_type __z = __f > 0 ? __ct.widen('0') : char_type();
                for (; __f > 0; --__f)
                    *__me++ = __z;
                *__me++ = __dp;
            }
            // print units part
            if (__d == __db)
            {
                *__me++ = __ct.widen('0');
            }
            else
            {
                unsigned __ng = 0;
                unsigned __ig = 0;
                unsigned __gl = __grp.empty() ? numeric_limits<unsigned>::max()
                                              : static_cast<unsigned>(__grp[__ig]);
                while (__d != __db)
                {
                    if (__ng == __gl)
                    {
                        *__me++ = __ts;
                        __ng = 0;
                        if (++__ig < __grp.size())
                            __gl = __grp[__ig] == numeric_limits<char>::max() ?
                                        numeric_limits<unsigned>::max() :
                                        static_cast<unsigned>(__grp[__ig]);
                    }
                    *__me++ = *--__d;
                    ++__ng;
                }
            }
            // reverse it
            std::reverse(__t, __me);
            }
            break;
        }
    }
    // print rest of sign, if any
    if (__sn.size() > 1)
        __me = _VSTD::copy(__sn.begin()+1, __sn.end(), __me);
    // set alignment
    if ((__flags & ios_base::adjustfield) == ios_base::left)
        __mi = __me;
    else if ((__flags & ios_base::adjustfield) != ios_base::internal)
        __mi = __mb;
}

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_put<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_put<wchar_t>;
#endif
# 3298 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
class _LIBCPP_TEMPLATE_VIS money_put
    : public locale::facet,
      private __money_put<_CharT>
{
public:
    typedef _CharT                  char_type;
    typedef _OutputIterator         iter_type;
    typedef basic_string<char_type> string_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit money_put(size_t __refs = 0)
        : locale::facet(__refs) {}

    _LIBCPP_INLINE_VISIBILITY
    iter_type put(iter_type __s, bool __intl, ios_base& __iob, char_type __fl,
                  long double __units) const
    {
        return do_put(__s, __intl, __iob, __fl, __units);
    }

    _LIBCPP_INLINE_VISIBILITY
    iter_type put(iter_type __s, bool __intl, ios_base& __iob, char_type __fl,
                  const string_type& __digits) const
    {
        return do_put(__s, __intl, __iob, __fl, __digits);
    }

    static locale::id id;

protected:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~money_put() override {}

    virtual iter_type do_put(iter_type __s, bool __intl, ios_base& __iob,
                             char_type __fl, long double __units) const;
    virtual iter_type do_put(iter_type __s, bool __intl, ios_base& __iob,
                             char_type __fl, const string_type& __digits) const;
};

template <class _CharT, class _OutputIterator>
locale::id
money_put<_CharT, _OutputIterator>::id;

template <class _CharT, class _OutputIterator>
_OutputIterator
money_put<_CharT, _OutputIterator>::do_put(iter_type __s, bool __intl,
                                           ios_base& __iob, char_type __fl,
                                           long double __units) const
{
    // convert to char
    const size_t __bs = 100;
    char __buf[__bs];
    char* __bb = __buf;
    char_type __digits[__bs];
    char_type* __db = __digits;
    int __n = snprintf(__bb, __bs, "%.0Lf", __units);
    unique_ptr<char, void(*)(void*)> __hn(nullptr, free);
    unique_ptr<char_type, void(*)(void*)> __hd(0, free);
    // secure memory for digit storage
    if (static_cast<size_t>(__n) > __bs-1)
    {
        __n = __libcpp_asprintf_l(&__bb, _LIBCPP_GET_C_LOCALE, "%.0Lf", __units);
        if (__n == -1)
            __throw_bad_alloc();
        __hn.reset(__bb);
        __hd.reset((char_type*)malloc(static_cast<size_t>(__n) * sizeof(char_type)));
        if (__hd == nullptr)
            __throw_bad_alloc();
        __db = __hd.get();
    }
    // gather info
    locale __loc = __iob.getloc();
    const ctype<char_type>& __ct = std::use_facet<ctype<char_type> >(__loc);
    __ct.widen(__bb, __bb + __n, __db);
    bool __neg = __n > 0 && __bb[0] == '-';
    money_base::pattern __pat;
    char_type __dp;
    char_type __ts;
    string __grp;
    string_type __sym;
    string_type __sn;
    int __fd;
    this->__gather_info(__intl, __neg, __loc, __pat, __dp, __ts, __grp, __sym, __sn, __fd);
    // secure memory for formatting
    char_type __mbuf[__bs];
    char_type* __mb = __mbuf;
    unique_ptr<char_type, void(*)(void*)> __hw(0, free);
    size_t __exn = __n > __fd ?
                   (static_cast<size_t>(__n) - static_cast<size_t>(__fd)) * 2 +
                    __sn.size() + __sym.size() + static_cast<size_t>(__fd) + 1
                 : __sn.size() + __sym.size() + static_cast<size_t>(__fd) + 2;
    if (__exn > __bs)
    {
        __hw.reset((char_type*)malloc(__exn * sizeof(char_type)));
        __mb = __hw.get();
        if (__mb == 0)
            __throw_bad_alloc();
    }
    // format
    char_type* __mi;
    char_type* __me;
    this->__format(__mb, __mi, __me, __iob.flags(),
                   __db, __db + __n, __ct,
                   __neg, __pat, __dp, __ts, __grp, __sym, __sn, __fd);
    return std::__pad_and_output(__s, __mb, __mi, __me, __iob, __fl);
}

template <class _CharT, class _OutputIterator>
_OutputIterator
money_put<_CharT, _OutputIterator>::do_put(iter_type __s, bool __intl,
                                           ios_base& __iob, char_type __fl,
                                           const string_type& __digits) const
{
    // gather info
    locale __loc = __iob.getloc();
    const ctype<char_type>& __ct = std::use_facet<ctype<char_type> >(__loc);
    bool __neg = __digits.size() > 0 && __digits[0] == __ct.widen('-');
    money_base::pattern __pat;
    char_type __dp;
    char_type __ts;
    string __grp;
    string_type __sym;
    string_type __sn;
    int __fd;
    this->__gather_info(__intl, __neg, __loc, __pat, __dp, __ts, __grp, __sym, __sn, __fd);
    // secure memory for formatting
    char_type __mbuf[100];
    char_type* __mb = __mbuf;
    unique_ptr<char_type, void(*)(void*)> __h(0, free);
    size_t __exn = static_cast<int>(__digits.size()) > __fd ?
                   (__digits.size() - static_cast<size_t>(__fd)) * 2 +
                    __sn.size() + __sym.size() + static_cast<size_t>(__fd) + 1
                 : __sn.size() + __sym.size() + static_cast<size_t>(__fd) + 2;
    if (__exn > 100)
    {
        __h.reset((char_type*)malloc(__exn * sizeof(char_type)));
        __mb = __h.get();
        if (__mb == 0)
            __throw_bad_alloc();
    }
    // format
    char_type* __mi;
    char_type* __me;
    this->__format(__mb, __mi, __me, __iob.flags(),
                   __digits.data(), __digits.data() + __digits.size(), __ct,
                   __neg, __pat, __dp, __ts, __grp, __sym, __sn, __fd);
    return std::__pad_and_output(__s, __mb, __mi, __me, __iob, __fl);
}

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_put<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_put<wchar_t>;
#endif
# 3452 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

// messages

class _LIBCPP_EXPORTED_FROM_ABI messages_base
{
public:
    typedef intptr_t catalog;

    _LIBCPP_INLINE_VISIBILITY messages_base() {}
};

template <class _CharT>
class _LIBCPP_TEMPLATE_VIS messages
    : public locale::facet,
      public messages_base
{
public:
    typedef _CharT               char_type;
    typedef basic_string<_CharT> string_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit messages(size_t __refs = 0)
        : locale::facet(__refs) {}

    _LIBCPP_INLINE_VISIBILITY
    catalog open(const basic_string<char>& __nm, const locale& __loc) const
    {
        return do_open(__nm, __loc);
    }

    _LIBCPP_INLINE_VISIBILITY
    string_type get(catalog __c, int __set, int __msgid,
                    const string_type& __dflt) const
    {
        return do_get(__c, __set, __msgid, __dflt);
    }

    _LIBCPP_INLINE_VISIBILITY
    void close(catalog __c) const
    {
        do_close(__c);
    }

    static locale::id id;

protected:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~messages() override {}

    virtual catalog do_open(const basic_string<char>&, const locale&) const;
    virtual string_type do_get(catalog, int __set, int __msgid,
                               const string_type& __dflt) const;
    virtual void do_close(catalog) const;
};

template <class _CharT>
locale::id
messages<_CharT>::id;

template <class _CharT>
typename messages<_CharT>::catalog
messages<_CharT>::do_open(const basic_string<char>& __nm, const locale&) const
{
#ifdef _LIBCPP_HAS_CATOPEN
    return (catalog)catopen(__nm.c_str(), NL_CAT_LOCALE);
#else // !_LIBCPP_HAS_CATOPEN
# 3517 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
    (void)__nm;
    return -1;
#endif // _LIBCPP_HAS_CATOPEN
# 3520 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
}

template <class _CharT>
typename messages<_CharT>::string_type
messages<_CharT>::do_get(catalog __c, int __set, int __msgid,
                         const string_type& __dflt) const
{
#ifdef _LIBCPP_HAS_CATOPEN
    string __ndflt;
    __narrow_to_utf8<sizeof(char_type)*__CHAR_BIT__>()(std::back_inserter(__ndflt),
                                                       __dflt.c_str(),
                                                       __dflt.c_str() + __dflt.size());
    nl_catd __cat = (nl_catd)__c;
    static_assert(sizeof(catalog) >= sizeof(nl_catd), "Unexpected nl_catd type");
    char* __n = catgets(__cat, __set, __msgid, __ndflt.c_str());
    string_type __w;
    __widen_from_utf8<sizeof(char_type)*__CHAR_BIT__>()(std::back_inserter(__w),
                                                        __n, __n + _VSTD::strlen(__n));
    return __w;
#else // !_LIBCPP_HAS_CATOPEN
# 3540 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
    (void)__c;
    (void)__set;
    (void)__msgid;
    return __dflt;
#endif // _LIBCPP_HAS_CATOPEN
# 3545 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
}

template <class _CharT>
void
messages<_CharT>::do_close(catalog __c) const
{
#ifdef _LIBCPP_HAS_CATOPEN
    catclose((nl_catd)__c);
#else // !_LIBCPP_HAS_CATOPEN
# 3554 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
    (void)__c;
#endif // _LIBCPP_HAS_CATOPEN
# 3556 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
}

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages<wchar_t>;
#endif
# 3562 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

template <class _CharT>
class _LIBCPP_TEMPLATE_VIS messages_byname
    : public messages<_CharT>
{
public:
    typedef messages_base::catalog catalog;
    typedef basic_string<_CharT> string_type;

    _LIBCPP_INLINE_VISIBILITY
    explicit messages_byname(const char*, size_t __refs = 0)
        : messages<_CharT>(__refs) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit messages_byname(const string&, size_t __refs = 0)
        : messages<_CharT>(__refs) {}

protected:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~messages_byname() override {}
};

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages_byname<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages_byname<wchar_t>;
#endif
# 3587 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

template<class _Codecvt, class _Elem = wchar_t,
         class _WideAlloc = allocator<_Elem>,
         class _ByteAlloc = allocator<char> >
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert
{
public:
    typedef basic_string<char, char_traits<char>, _ByteAlloc>   byte_string;
    typedef basic_string<_Elem, char_traits<_Elem>, _WideAlloc> wide_string;
    typedef typename _Codecvt::state_type                       state_type;
    typedef typename wide_string::traits_type::int_type         int_type;

private:
    byte_string __byte_err_string_;
    wide_string __wide_err_string_;
    _Codecvt* __cvtptr_;
    state_type __cvtstate_;
    size_t __cvtcount_;

    wstring_convert(const wstring_convert& __wc);
    wstring_convert& operator=(const wstring_convert& __wc);
public:
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    wstring_convert() : wstring_convert(new _Codecvt) {}
    _LIBCPP_INLINE_VISIBILITY
    explicit wstring_convert(_Codecvt* __pcvt);
#else
# 3615 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_EXPLICIT_SINCE_CXX14
    wstring_convert(_Codecvt* __pcvt = new _Codecvt);
#endif
# 3619 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

    _LIBCPP_INLINE_VISIBILITY
    wstring_convert(_Codecvt* __pcvt, state_type __state);
    _LIBCPP_EXPLICIT_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI wstring_convert(const byte_string& __byte_err,
                    const wide_string& __wide_err = wide_string());
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    wstring_convert(wstring_convert&& __wc);
#endif
# 3628 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
    _LIBCPP_HIDE_FROM_ABI ~wstring_convert();

    _LIBCPP_INLINE_VISIBILITY
    wide_string from_bytes(char __byte)
        {return from_bytes(&__byte, &__byte+1);}
    _LIBCPP_INLINE_VISIBILITY
    wide_string from_bytes(const char* __ptr)
        {return from_bytes(__ptr, __ptr + char_traits<char>::length(__ptr));}
    _LIBCPP_INLINE_VISIBILITY
    wide_string from_bytes(const byte_string& __str)
        {return from_bytes(__str.data(), __str.data() + __str.size());}
    _LIBCPP_HIDE_FROM_ABI wide_string from_bytes(const char* __first, const char* __last);

    _LIBCPP_INLINE_VISIBILITY
    byte_string to_bytes(_Elem __wchar)
        {return to_bytes(&__wchar, &__wchar+1);}
    _LIBCPP_INLINE_VISIBILITY
    byte_string to_bytes(const _Elem* __wptr)
        {return to_bytes(__wptr, __wptr + char_traits<_Elem>::length(__wptr));}
    _LIBCPP_INLINE_VISIBILITY
    byte_string to_bytes(const wide_string& __wstr)
        {return to_bytes(__wstr.data(), __wstr.data() + __wstr.size());}
    _LIBCPP_HIDE_FROM_ABI byte_string to_bytes(const _Elem* __first, const _Elem* __last);

    _LIBCPP_INLINE_VISIBILITY
    size_t converted() const _NOEXCEPT {return __cvtcount_;}
    _LIBCPP_INLINE_VISIBILITY
    state_type state() const {return __cvtstate_;}
};

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template<class _Codecvt, class _Elem, class _WideAlloc, class _ByteAlloc>
inline
wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::
    wstring_convert(_Codecvt* __pcvt)
        : __cvtptr_(__pcvt), __cvtstate_(), __cvtcount_(0)
{
}
_LIBCPP_SUPPRESS_DEPRECATED_POP

template<class _Codecvt, class _Elem, class _WideAlloc, class _ByteAlloc>
inline
wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::
    wstring_convert(_Codecvt* __pcvt, state_type __state)
        : __cvtptr_(__pcvt), __cvtstate_(__state), __cvtcount_(0)
{
}

template<class _Codecvt, class _Elem, class _WideAlloc, class _ByteAlloc>
wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::
    wstring_convert(const byte_string& __byte_err, const wide_string& __wide_err)
        : __byte_err_string_(__byte_err), __wide_err_string_(__wide_err),
          __cvtstate_(), __cvtcount_(0)
{
    __cvtptr_ = new _Codecvt;
}

#ifndef _LIBCPP_CXX03_LANG

template<class _Codecvt, class _Elem, class _WideAlloc, class _ByteAlloc>
inline
wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::
    wstring_convert(wstring_convert&& __wc)
        : __byte_err_string_(_VSTD::move(__wc.__byte_err_string_)),
          __wide_err_string_(_VSTD::move(__wc.__wide_err_string_)),
          __cvtptr_(__wc.__cvtptr_),
          __cvtstate_(__wc.__cvtstate_), __cvtcount_(__wc.__cvtcount_)
{
    __wc.__cvtptr_ = nullptr;
}

#endif // _LIBCPP_CXX03_LANG
# 3700 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template<class _Codecvt, class _Elem, class _WideAlloc, class _ByteAlloc>
wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::~wstring_convert()
{
    delete __cvtptr_;
}

template<class _Codecvt, class _Elem, class _WideAlloc, class _ByteAlloc>
typename wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::wide_string
wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::
    from_bytes(const char* __frm, const char* __frm_end)
{
_LIBCPP_SUPPRESS_DEPRECATED_POP
    __cvtcount_ = 0;
    if (__cvtptr_ != nullptr)
    {
        wide_string __ws(2*(__frm_end - __frm), _Elem());
        if (__frm != __frm_end)
            __ws.resize(__ws.capacity());
        codecvt_base::result __r = codecvt_base::ok;
        state_type __st = __cvtstate_;
        if (__frm != __frm_end)
        {
            _Elem* __to = &__ws[0];
            _Elem* __to_end = __to + __ws.size();
            const char* __frm_nxt;
            do
            {
                _Elem* __to_nxt;
                __r = __cvtptr_->in(__st, __frm, __frm_end, __frm_nxt,
                                          __to, __to_end, __to_nxt);
                __cvtcount_ += __frm_nxt - __frm;
                if (__frm_nxt == __frm)
                {
                    __r = codecvt_base::error;
                }
                else if (__r == codecvt_base::noconv)
                {
                    __ws.resize(__to - &__ws[0]);
                    // This only gets executed if _Elem is char
                    __ws.append((const _Elem*)__frm, (const _Elem*)__frm_end);
                    __frm = __frm_nxt;
                    __r = codecvt_base::ok;
                }
                else if (__r == codecvt_base::ok)
                {
                    __ws.resize(__to_nxt - &__ws[0]);
                    __frm = __frm_nxt;
                }
                else if (__r == codecvt_base::partial)
                {
                    ptrdiff_t __s = __to_nxt - &__ws[0];
                    __ws.resize(2 * __s);
                    __to = &__ws[0] + __s;
                    __to_end = &__ws[0] + __ws.size();
                    __frm = __frm_nxt;
                }
            } while (__r == codecvt_base::partial && __frm_nxt < __frm_end);
        }
        if (__r == codecvt_base::ok)
            return __ws;
    }

    if (__wide_err_string_.empty())
        __throw_range_error("wstring_convert: from_bytes error");

    return __wide_err_string_;
}

template<class _Codecvt, class _Elem, class _WideAlloc, class _ByteAlloc>
typename wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::byte_string
wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::
    to_bytes(const _Elem* __frm, const _Elem* __frm_end)
{
    __cvtcount_ = 0;
    if (__cvtptr_ != nullptr)
    {
        byte_string __bs(2*(__frm_end - __frm), char());
        if (__frm != __frm_end)
            __bs.resize(__bs.capacity());
        codecvt_base::result __r = codecvt_base::ok;
        state_type __st = __cvtstate_;
        if (__frm != __frm_end)
        {
            char* __to = &__bs[0];
            char* __to_end = __to + __bs.size();
            const _Elem* __frm_nxt;
            do
            {
                char* __to_nxt;
                __r = __cvtptr_->out(__st, __frm, __frm_end, __frm_nxt,
                                           __to, __to_end, __to_nxt);
                __cvtcount_ += __frm_nxt - __frm;
                if (__frm_nxt == __frm)
                {
                    __r = codecvt_base::error;
                }
                else if (__r == codecvt_base::noconv)
                {
                    __bs.resize(__to - &__bs[0]);
                    // This only gets executed if _Elem is char
                    __bs.append((const char*)__frm, (const char*)__frm_end);
                    __frm = __frm_nxt;
                    __r = codecvt_base::ok;
                }
                else if (__r == codecvt_base::ok)
                {
                    __bs.resize(__to_nxt - &__bs[0]);
                    __frm = __frm_nxt;
                }
                else if (__r == codecvt_base::partial)
                {
                    ptrdiff_t __s = __to_nxt - &__bs[0];
                    __bs.resize(2 * __s);
                    __to = &__bs[0] + __s;
                    __to_end = &__bs[0] + __bs.size();
                    __frm = __frm_nxt;
                }
            } while (__r == codecvt_base::partial && __frm_nxt < __frm_end);
        }
        if (__r == codecvt_base::ok)
        {
            size_t __s = __bs.size();
            __bs.resize(__bs.capacity());
            char* __to = &__bs[0] + __s;
            char* __to_end = __to + __bs.size();
            do
            {
                char* __to_nxt;
                __r = __cvtptr_->unshift(__st, __to, __to_end, __to_nxt);
                if (__r == codecvt_base::noconv)
                {
                    __bs.resize(__to - &__bs[0]);
                    __r = codecvt_base::ok;
                }
                else if (__r == codecvt_base::ok)
                {
                    __bs.resize(__to_nxt - &__bs[0]);
                }
                else if (__r == codecvt_base::partial)
                {
                    ptrdiff_t __sp = __to_nxt - &__bs[0];
                    __bs.resize(2 * __sp);
                    __to = &__bs[0] + __sp;
                    __to_end = &__bs[0] + __bs.size();
                }
            } while (__r == codecvt_base::partial);
            if (__r == codecvt_base::ok)
                return __bs;
        }
    }

    if (__byte_err_string_.empty())
        __throw_range_error("wstring_convert: to_bytes error");

    return __byte_err_string_;
}

template <class _Codecvt, class _Elem = wchar_t, class _Tr = char_traits<_Elem> >
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wbuffer_convert
    : public basic_streambuf<_Elem, _Tr>
{
public:
    // types:
    typedef _Elem                          char_type;
    typedef _Tr                            traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;
    typedef typename _Codecvt::state_type  state_type;

private:
    char*       __extbuf_;
    const char* __extbufnext_;
    const char* __extbufend_;
    char __extbuf_min_[8];
    size_t __ebs_;
    char_type* __intbuf_;
    size_t __ibs_;
    streambuf* __bufptr_;
    _Codecvt* __cv_;
    state_type __st_;
    ios_base::openmode __cm_;
    bool __owns_eb_;
    bool __owns_ib_;
    bool __always_noconv_;

    wbuffer_convert(const wbuffer_convert&);
    wbuffer_convert& operator=(const wbuffer_convert&);

public:
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI wbuffer_convert() : wbuffer_convert(nullptr) {}
    explicit _LIBCPP_HIDE_FROM_ABI wbuffer_convert(streambuf* __bytebuf,
                             _Codecvt* __pcvt = new _Codecvt,
                             state_type __state = state_type());
#else
# 3898 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
    _LIBCPP_EXPLICIT_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
    wbuffer_convert(streambuf* __bytebuf = nullptr,
                    _Codecvt* __pcvt = new _Codecvt,
                    state_type __state = state_type());
#endif
# 3903 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

    _LIBCPP_HIDE_FROM_ABI ~wbuffer_convert();

    _LIBCPP_INLINE_VISIBILITY
    streambuf* rdbuf() const {return __bufptr_;}
    _LIBCPP_INLINE_VISIBILITY
    streambuf* rdbuf(streambuf* __bytebuf)
    {
        streambuf* __r = __bufptr_;
        __bufptr_ = __bytebuf;
        return __r;
    }

    _LIBCPP_INLINE_VISIBILITY
    state_type state() const {return __st_;}

protected:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual int_type underflow();
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual int_type pbackfail(int_type __c = traits_type::eof());
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual int_type overflow (int_type __c = traits_type::eof());
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual basic_streambuf<char_type, traits_type>* setbuf(char_type* __s,
                                                            streamsize __n);
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual pos_type seekoff(off_type __off, ios_base::seekdir __way,
                             ios_base::openmode __wch = ios_base::in | ios_base::out);
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual pos_type seekpos(pos_type __sp,
                             ios_base::openmode __wch = ios_base::in | ios_base::out);
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual int sync();

private:
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL bool __read_mode();
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL void __write_mode();
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL wbuffer_convert* __close();
};

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Codecvt, class _Elem, class _Tr>
wbuffer_convert<_Codecvt, _Elem, _Tr>::
    wbuffer_convert(streambuf* __bytebuf, _Codecvt* __pcvt, state_type __state)
    : __extbuf_(nullptr),
      __extbufnext_(nullptr),
      __extbufend_(nullptr),
      __ebs_(0),
      __intbuf_(0),
      __ibs_(0),
      __bufptr_(__bytebuf),
      __cv_(__pcvt),
      __st_(__state),
      __cm_(0),
      __owns_eb_(false),
      __owns_ib_(false),
      __always_noconv_(__cv_ ? __cv_->always_noconv() : false)
{
    setbuf(0, 4096);
}

template <class _Codecvt, class _Elem, class _Tr>
wbuffer_convert<_Codecvt, _Elem, _Tr>::~wbuffer_convert()
{
    __close();
    delete __cv_;
    if (__owns_eb_)
        delete [] __extbuf_;
    if (__owns_ib_)
        delete [] __intbuf_;
}

template <class _Codecvt, class _Elem, class _Tr>
typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type
wbuffer_convert<_Codecvt, _Elem, _Tr>::underflow()
{
_LIBCPP_SUPPRESS_DEPRECATED_POP
    if (__cv_ == 0 || __bufptr_ == 0)
        return traits_type::eof();
    bool __initial = __read_mode();
    char_type __1buf;
    if (this->gptr() == 0)
        this->setg(&__1buf, &__1buf+1, &__1buf+1);
    const size_t __unget_sz = __initial ? 0 : std::min<size_t>((this->egptr() - this->eback()) / 2, 4);
    int_type __c = traits_type::eof();
    if (this->gptr() == this->egptr())
    {
        _VSTD::memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type));
        if (__always_noconv_)
        {
            streamsize __nmemb = static_cast<streamsize>(this->egptr() - this->eback() - __unget_sz);
            __nmemb = __bufptr_->sgetn((char*)this->eback() + __unget_sz, __nmemb);
            if (__nmemb != 0)
            {
                this->setg(this->eback(),
                           this->eback() + __unget_sz,
                           this->eback() + __unget_sz + __nmemb);
                __c = *this->gptr();
            }
        }
        else
        {
             if (__extbufend_ != __extbufnext_) {
                _LIBCPP_ASSERT_UNCATEGORIZED(__extbufnext_ != nullptr, "underflow moving from nullptr");
                _LIBCPP_ASSERT_UNCATEGORIZED(__extbuf_ != nullptr, "underflow moving into nullptr");
                _VSTD::memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_);
             }
            __extbufnext_ = __extbuf_ + (__extbufend_ - __extbufnext_);
            __extbufend_ = __extbuf_ + (__extbuf_ == __extbuf_min_ ? sizeof(__extbuf_min_) : __ebs_);
            streamsize __nmemb = _VSTD::min(static_cast<streamsize>(this->egptr() - this->eback() - __unget_sz),
                                 static_cast<streamsize>(__extbufend_ - __extbufnext_));
            codecvt_base::result __r;
            // FIXME: Do we ever need to restore the state here?
            //state_type __svs = __st_;
            streamsize __nr = __bufptr_->sgetn(const_cast<char*>(__extbufnext_), __nmemb);
            if (__nr != 0)
            {
                __extbufend_ = __extbufnext_ + __nr;
                char_type*  __inext;
                __r = __cv_->in(__st_, __extbuf_, __extbufend_, __extbufnext_,
                                       this->eback() + __unget_sz,
                                       this->egptr(), __inext);
                if (__r == codecvt_base::noconv)
                {
                    this->setg((char_type*)__extbuf_, (char_type*)__extbuf_,
                               (char_type*) const_cast<char *>(__extbufend_));
                    __c = *this->gptr();
                }
                else if (__inext != this->eback() + __unget_sz)
                {
                    this->setg(this->eback(), this->eback() + __unget_sz, __inext);
                    __c = *this->gptr();
                }
            }
        }
    }
    else
        __c = *this->gptr();
    if (this->eback() == &__1buf)
        this->setg(0, 0, 0);
    return __c;
}

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Codecvt, class _Elem, class _Tr>
typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type
wbuffer_convert<_Codecvt, _Elem, _Tr>::pbackfail(int_type __c)
{
_LIBCPP_SUPPRESS_DEPRECATED_POP
    if (__cv_ != 0 && __bufptr_ != 0 && this->eback() < this->gptr())
    {
        if (traits_type::eq_int_type(__c, traits_type::eof()))
        {
            this->gbump(-1);
            return traits_type::not_eof(__c);
        }
        if (traits_type::eq(traits_type::to_char_type(__c), this->gptr()[-1]))
        {
            this->gbump(-1);
            *this->gptr() = traits_type::to_char_type(__c);
            return __c;
        }
    }
    return traits_type::eof();
}

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Codecvt, class _Elem, class _Tr>
typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type
wbuffer_convert<_Codecvt, _Elem, _Tr>::overflow(int_type __c)
{
_LIBCPP_SUPPRESS_DEPRECATED_POP
    if (__cv_ == 0 || __bufptr_ == 0)
        return traits_type::eof();
    __write_mode();
    char_type __1buf;
    char_type* __pb_save = this->pbase();
    char_type* __epb_save = this->epptr();
    if (!traits_type::eq_int_type(__c, traits_type::eof()))
    {
        if (this->pptr() == 0)
            this->setp(&__1buf, &__1buf+1);
        *this->pptr() = traits_type::to_char_type(__c);
        this->pbump(1);
    }
    if (this->pptr() != this->pbase())
    {
        if (__always_noconv_)
        {
            streamsize __nmemb = static_cast<streamsize>(this->pptr() - this->pbase());
            if (__bufptr_->sputn((const char*)this->pbase(), __nmemb) != __nmemb)
                return traits_type::eof();
        }
        else
        {
            char* __extbe = __extbuf_;
            codecvt_base::result __r;
            do
            {
                const char_type* __e;
                __r = __cv_->out(__st_, this->pbase(), this->pptr(), __e,
                                        __extbuf_, __extbuf_ + __ebs_, __extbe);
                if (__e == this->pbase())
                    return traits_type::eof();
                if (__r == codecvt_base::noconv)
                {
                    streamsize __nmemb = static_cast<size_t>(this->pptr() - this->pbase());
                    if (__bufptr_->sputn((const char*)this->pbase(), __nmemb) != __nmemb)
                        return traits_type::eof();
                }
                else if (__r == codecvt_base::ok || __r == codecvt_base::partial)
                {
                    streamsize __nmemb = static_cast<size_t>(__extbe - __extbuf_);
                    if (__bufptr_->sputn(__extbuf_, __nmemb) != __nmemb)
                        return traits_type::eof();
                    if (__r == codecvt_base::partial)
                    {
                        this->setp(const_cast<char_type *>(__e), this->pptr());
                        this->__pbump(this->epptr() - this->pbase());
                    }
                }
                else
                    return traits_type::eof();
            } while (__r == codecvt_base::partial);
        }
        this->setp(__pb_save, __epb_save);
    }
    return traits_type::not_eof(__c);
}

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Codecvt, class _Elem, class _Tr>
basic_streambuf<_Elem, _Tr>*
wbuffer_convert<_Codecvt, _Elem, _Tr>::setbuf(char_type* __s, streamsize __n)
{
_LIBCPP_SUPPRESS_DEPRECATED_POP
    this->setg(0, 0, 0);
    this->setp(0, 0);
    if (__owns_eb_)
        delete [] __extbuf_;
    if (__owns_ib_)
        delete [] __intbuf_;
    __ebs_ = __n;
    if (__ebs_ > sizeof(__extbuf_min_))
    {
        if (__always_noconv_ && __s)
        {
            __extbuf_ = (char*)__s;
            __owns_eb_ = false;
        }
        else
        {
            __extbuf_ = new char[__ebs_];
            __owns_eb_ = true;
        }
    }
    else
    {
        __extbuf_ = __extbuf_min_;
        __ebs_ = sizeof(__extbuf_min_);
        __owns_eb_ = false;
    }
    if (!__always_noconv_)
    {
        __ibs_ = max<streamsize>(__n, sizeof(__extbuf_min_));
        if (__s && __ibs_ >= sizeof(__extbuf_min_))
        {
            __intbuf_ = __s;
            __owns_ib_ = false;
        }
        else
        {
            __intbuf_ = new char_type[__ibs_];
            __owns_ib_ = true;
        }
    }
    else
    {
        __ibs_ = 0;
        __intbuf_ = 0;
        __owns_ib_ = false;
    }
    return this;
}

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Codecvt, class _Elem, class _Tr>
typename wbuffer_convert<_Codecvt, _Elem, _Tr>::pos_type
wbuffer_convert<_Codecvt, _Elem, _Tr>::seekoff(off_type __off, ios_base::seekdir __way,
                                        ios_base::openmode __om)
{
    int __width = __cv_->encoding();
    if (__cv_ == 0 || __bufptr_ == 0 || (__width <= 0 && __off != 0) || sync())
        return pos_type(off_type(-1));
    // __width > 0 || __off == 0, now check __way
    if (__way != ios_base::beg && __way != ios_base::cur && __way != ios_base::end)
        return pos_type(off_type(-1));
    pos_type __r = __bufptr_->pubseekoff(__width * __off, __way, __om);
    __r.state(__st_);
    return __r;
}

template <class _Codecvt, class _Elem, class _Tr>
typename wbuffer_convert<_Codecvt, _Elem, _Tr>::pos_type
wbuffer_convert<_Codecvt, _Elem, _Tr>::seekpos(pos_type __sp, ios_base::openmode __wch)
{
    if (__cv_ == 0 || __bufptr_ == 0 || sync())
        return pos_type(off_type(-1));
    if (__bufptr_->pubseekpos(__sp, __wch) == pos_type(off_type(-1)))
        return pos_type(off_type(-1));
    return __sp;
}

template <class _Codecvt, class _Elem, class _Tr>
int
wbuffer_convert<_Codecvt, _Elem, _Tr>::sync()
{
_LIBCPP_SUPPRESS_DEPRECATED_POP
    if (__cv_ == 0 || __bufptr_ == 0)
        return 0;
    if (__cm_ & ios_base::out)
    {
        if (this->pptr() != this->pbase())
            if (overflow() == traits_type::eof())
                return -1;
        codecvt_base::result __r;
        do
        {
            char* __extbe;
            __r = __cv_->unshift(__st_, __extbuf_, __extbuf_ + __ebs_, __extbe);
            streamsize __nmemb = static_cast<streamsize>(__extbe - __extbuf_);
            if (__bufptr_->sputn(__extbuf_, __nmemb) != __nmemb)
                return -1;
        } while (__r == codecvt_base::partial);
        if (__r == codecvt_base::error)
            return -1;
        if (__bufptr_->pubsync())
            return -1;
    }
    else if (__cm_ & ios_base::in)
    {
        off_type __c;
        if (__always_noconv_)
            __c = this->egptr() - this->gptr();
        else
        {
            int __width = __cv_->encoding();
            __c = __extbufend_ - __extbufnext_;
            if (__width > 0)
                __c += __width * (this->egptr() - this->gptr());
            else
            {
                if (this->gptr() != this->egptr())
                {
                    std::reverse(this->gptr(), this->egptr());
                    codecvt_base::result __r;
                    const char_type* __e = this->gptr();
                    char* __extbe;
                    do
                    {
                        __r = __cv_->out(__st_, __e, this->egptr(), __e,
                                         __extbuf_, __extbuf_ + __ebs_, __extbe);
                        switch (__r)
                        {
                        case codecvt_base::noconv:
                            __c += this->egptr() - this->gptr();
                            break;
                        case codecvt_base::ok:
                        case codecvt_base::partial:
                            __c += __extbe - __extbuf_;
                            break;
                        default:
                            return -1;
                        }
                    } while (__r == codecvt_base::partial);
                }
            }
        }
        if (__bufptr_->pubseekoff(-__c, ios_base::cur, __cm_) == pos_type(off_type(-1)))
            return -1;
        this->setg(0, 0, 0);
        __cm_ = 0;
    }
    return 0;
}

_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Codecvt, class _Elem, class _Tr>
bool
wbuffer_convert<_Codecvt, _Elem, _Tr>::__read_mode()
{
    if (!(__cm_ & ios_base::in))
    {
        this->setp(0, 0);
        if (__always_noconv_)
            this->setg((char_type*)__extbuf_,
                       (char_type*)__extbuf_ + __ebs_,
                       (char_type*)__extbuf_ + __ebs_);
        else
            this->setg(__intbuf_, __intbuf_ + __ibs_, __intbuf_ + __ibs_);
        __cm_ = ios_base::in;
        return true;
    }
    return false;
}

template <class _Codecvt, class _Elem, class _Tr>
void
wbuffer_convert<_Codecvt, _Elem, _Tr>::__write_mode()
{
    if (!(__cm_ & ios_base::out))
    {
        this->setg(0, 0, 0);
        if (__ebs_ > sizeof(__extbuf_min_))
        {
            if (__always_noconv_)
                this->setp((char_type*)__extbuf_,
                           (char_type*)__extbuf_ + (__ebs_ - 1));
            else
                this->setp(__intbuf_, __intbuf_ + (__ibs_ - 1));
        }
        else
            this->setp(0, 0);
        __cm_ = ios_base::out;
    }
}

template <class _Codecvt, class _Elem, class _Tr>
wbuffer_convert<_Codecvt, _Elem, _Tr>*
wbuffer_convert<_Codecvt, _Elem, _Tr>::__close()
{
    wbuffer_convert* __rt = nullptr;
    if (__cv_ != nullptr && __bufptr_ != nullptr)
    {
        __rt = this;
        if ((__cm_ & ios_base::out) && sync())
            __rt = nullptr;
    }
    return __rt;
}

_LIBCPP_SUPPRESS_DEPRECATED_POP

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

// NOLINTEND(libcpp-robust-against-adl)

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 4347 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#  include <atomic>
#endif /* expanded by -frewrite-includes */
# 4347 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 4348 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 4348 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 4349 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdarg>
#endif /* expanded by -frewrite-includes */
# 4349 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 4350 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iterator>
#endif /* expanded by -frewrite-includes */
# 4350 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 4351 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#  include <mutex>
#endif /* expanded by -frewrite-includes */
# 4351 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 4352 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#  include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 4352 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 4353 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 4353 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 4354 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#if 0 /* expanded by -frewrite-includes */
#  include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 4354 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
# 4355 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#endif
# 4356 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3

#endif // _LIBCPP_LOCALE
# 4358 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/locale" 3
#endif /* locale expanded by -frewrite-includes */
# 181 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 181 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 182 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if 0 /* expanded by -frewrite-includes */
#include <streambuf>
#endif /* expanded by -frewrite-includes */
# 182 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 183 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 183 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 184 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 186 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 187 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#endif
# 188 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _CharT, class _Traits>
class _LIBCPP_TEMPLATE_VIS basic_ostream
    : virtual public basic_ios<_CharT, _Traits>
{
public:
    // types (inherited from basic_ios (27.5.4)):
    typedef _CharT                         char_type;
    typedef _Traits                        traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;

    // 27.7.2.2 Constructor/destructor:
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    explicit basic_ostream(basic_streambuf<char_type, traits_type>* __sb)
    { this->init(__sb); }
    ~basic_ostream() override;
protected:
    inline _LIBCPP_INLINE_VISIBILITY
    basic_ostream(basic_ostream&& __rhs);

    // 27.7.2.3 Assign/swap
    inline _LIBCPP_INLINE_VISIBILITY
    basic_ostream& operator=(basic_ostream&& __rhs);

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    void swap(basic_ostream& __rhs)
    { basic_ios<char_type, traits_type>::swap(__rhs); }

    basic_ostream           (const basic_ostream& __rhs) = delete;
    basic_ostream& operator=(const basic_ostream& __rhs) = delete;

public:
    // 27.7.2.4 Prefix/suffix:
    class _LIBCPP_TEMPLATE_VIS sentry;

    // 27.7.2.6 Formatted output:
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    basic_ostream& operator<<(basic_ostream& (*__pf)(basic_ostream&))
    { return __pf(*this); }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    basic_ostream& operator<<(basic_ios<char_type, traits_type>&
                              (*__pf)(basic_ios<char_type,traits_type>&))
    { __pf(*this); return *this; }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    basic_ostream& operator<<(ios_base& (*__pf)(ios_base&))
    { __pf(*this); return *this; }

    basic_ostream& operator<<(bool __n);
    basic_ostream& operator<<(short __n);
    basic_ostream& operator<<(unsigned short __n);
    basic_ostream& operator<<(int __n);
    basic_ostream& operator<<(unsigned int __n);
    basic_ostream& operator<<(long __n);
    basic_ostream& operator<<(unsigned long __n);
    basic_ostream& operator<<(long long __n);
    basic_ostream& operator<<(unsigned long long __n);
    basic_ostream& operator<<(float __f);
    basic_ostream& operator<<(double __f);
    basic_ostream& operator<<(long double __f);
    basic_ostream& operator<<(const void* __p);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 256 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    _LIBCPP_HIDE_FROM_ABI
    basic_ostream& operator<<(const volatile void* __p) {
        return operator<<(const_cast<const void*>(__p));
    }
#endif
# 261 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3

    basic_ostream& operator<<(basic_streambuf<char_type, traits_type>* __sb);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 265 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
// LWG 2221 - nullptr. This is not backported to older standards modes.
// See https://reviews.llvm.org/D127033 for more info on the rationale.
    _LIBCPP_INLINE_VISIBILITY
    basic_ostream& operator<<(nullptr_t)
    { return *this << "nullptr"; }
#endif
# 271 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3

    // 27.7.2.7 Unformatted output:
    basic_ostream& put(char_type __c);
    basic_ostream& write(const char_type* __s, streamsize __n);
    basic_ostream& flush();

    // 27.7.2.5 seeks:
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    pos_type tellp();
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    basic_ostream& seekp(pos_type __pos);
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    basic_ostream& seekp(off_type __off, ios_base::seekdir __dir);

protected:
    _LIBCPP_INLINE_VISIBILITY
    basic_ostream() {}  // extension, intentially does not initialize
};

template <class _CharT, class _Traits>
class _LIBCPP_TEMPLATE_VIS basic_ostream<_CharT, _Traits>::sentry
{
    bool __ok_;
    basic_ostream<_CharT, _Traits>& __os_;

public:
    explicit sentry(basic_ostream<_CharT, _Traits>& __os);
    ~sentry();
    sentry(const sentry&) = delete;
    sentry& operator=(const sentry&) = delete;

    _LIBCPP_INLINE_VISIBILITY
    explicit operator bool() const {return __ok_;}
};

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>::sentry::sentry(basic_ostream<_CharT, _Traits>& __os)
    : __ok_(false),
      __os_(__os)
{
    if (__os.good())
    {
        if (__os.tie())
            __os.tie()->flush();
        __ok_ = true;
    }
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>::sentry::~sentry()
{
    if (__os_.rdbuf() && __os_.good() && (__os_.flags() & ios_base::unitbuf)
                      && !uncaught_exception())
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 329 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
            if (__os_.rdbuf()->pubsync() == -1)
                __os_.setstate(ios_base::badbit);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 337 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    }
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>::basic_ostream(basic_ostream&& __rhs)
{
    this->move(__rhs);
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::operator=(basic_ostream&& __rhs)
{
    swap(__rhs);
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>::~basic_ostream()
{
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::operator<<(basic_streambuf<char_type, traits_type>* __sb)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 367 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __s(*this);
        if (__s)
        {
            if (__sb)
            {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
                try
                {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 376 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
                    typedef istreambuf_iterator<_CharT, _Traits> _Ip;
                    typedef ostreambuf_iterator<_CharT, _Traits> _Op;
                    _Ip __i(__sb);
                    _Ip __eof;
                    _Op __o(*this);
                    size_t __c = 0;
                    for (; __i != __eof; ++__i, ++__o, ++__c)
                    {
                        *__o = *__i;
                        if (__o.failed())
                            break;
                    }
                    if (__c == 0)
                        this->setstate(ios_base::failbit);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
                }
                catch (...)
                {
                    this->__set_failbit_and_consider_rethrow();
                }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 397 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
            }
            else
                this->setstate(ios_base::badbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 408 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::operator<<(bool __n)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 419 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __s(*this);
        if (__s)
        {
            typedef num_put<char_type, ostreambuf_iterator<char_type, traits_type> > _Fp;
            const _Fp& __f = std::use_facet<_Fp>(this->getloc());
            if (__f.put(*this, *this, this->fill(), __n).failed())
                this->setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 434 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::operator<<(short __n)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 445 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __s(*this);
        if (__s)
        {
            ios_base::fmtflags __flags = ios_base::flags() & ios_base::basefield;
            typedef num_put<char_type, ostreambuf_iterator<char_type, traits_type> > _Fp;
            const _Fp& __f = std::use_facet<_Fp>(this->getloc());
            if (__f.put(*this, *this, this->fill(),
                        __flags == ios_base::oct || __flags == ios_base::hex ?
                        static_cast<long>(static_cast<unsigned short>(__n))  :
                        static_cast<long>(__n)).failed())
                this->setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 464 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::operator<<(unsigned short __n)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 475 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __s(*this);
        if (__s)
        {
            typedef num_put<char_type, ostreambuf_iterator<char_type, traits_type> > _Fp;
            const _Fp& __f = std::use_facet<_Fp>(this->getloc());
            if (__f.put(*this, *this, this->fill(), static_cast<unsigned long>(__n)).failed())
                this->setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 490 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::operator<<(int __n)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 501 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __s(*this);
        if (__s)
        {
            ios_base::fmtflags __flags = ios_base::flags() & ios_base::basefield;
            typedef num_put<char_type, ostreambuf_iterator<char_type, traits_type> > _Fp;
            const _Fp& __f = std::use_facet<_Fp>(this->getloc());
            if (__f.put(*this, *this, this->fill(),
                        __flags == ios_base::oct || __flags == ios_base::hex ?
                        static_cast<long>(static_cast<unsigned int>(__n))  :
                        static_cast<long>(__n)).failed())
                this->setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 520 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::operator<<(unsigned int __n)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 531 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __s(*this);
        if (__s)
        {
            typedef num_put<char_type, ostreambuf_iterator<char_type, traits_type> > _Fp;
            const _Fp& __f = std::use_facet<_Fp>(this->getloc());
            if (__f.put(*this, *this, this->fill(), static_cast<unsigned long>(__n)).failed())
                this->setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 546 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::operator<<(long __n)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 557 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __s(*this);
        if (__s)
        {
            typedef num_put<char_type, ostreambuf_iterator<char_type, traits_type> > _Fp;
            const _Fp& __f = std::use_facet<_Fp>(this->getloc());
            if (__f.put(*this, *this, this->fill(), __n).failed())
                this->setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 572 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::operator<<(unsigned long __n)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 583 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __s(*this);
        if (__s)
        {
            typedef num_put<char_type, ostreambuf_iterator<char_type, traits_type> > _Fp;
            const _Fp& __f = std::use_facet<_Fp>(this->getloc());
            if (__f.put(*this, *this, this->fill(), __n).failed())
                this->setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 598 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::operator<<(long long __n)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 609 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __s(*this);
        if (__s)
        {
            typedef num_put<char_type, ostreambuf_iterator<char_type, traits_type> > _Fp;
            const _Fp& __f = std::use_facet<_Fp>(this->getloc());
            if (__f.put(*this, *this, this->fill(), __n).failed())
                this->setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 624 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::operator<<(unsigned long long __n)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 635 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __s(*this);
        if (__s)
        {
            typedef num_put<char_type, ostreambuf_iterator<char_type, traits_type> > _Fp;
            const _Fp& __f = std::use_facet<_Fp>(this->getloc());
            if (__f.put(*this, *this, this->fill(), __n).failed())
                this->setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 650 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::operator<<(float __n)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 661 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __s(*this);
        if (__s)
        {
            typedef num_put<char_type, ostreambuf_iterator<char_type, traits_type> > _Fp;
            const _Fp& __f = std::use_facet<_Fp>(this->getloc());
            if (__f.put(*this, *this, this->fill(), static_cast<double>(__n)).failed())
                this->setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 676 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::operator<<(double __n)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 687 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __s(*this);
        if (__s)
        {
            typedef num_put<char_type, ostreambuf_iterator<char_type, traits_type> > _Fp;
            const _Fp& __f = std::use_facet<_Fp>(this->getloc());
            if (__f.put(*this, *this, this->fill(), __n).failed())
                this->setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 702 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::operator<<(long double __n)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 713 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __s(*this);
        if (__s)
        {
            typedef num_put<char_type, ostreambuf_iterator<char_type, traits_type> > _Fp;
            const _Fp& __f = std::use_facet<_Fp>(this->getloc());
            if (__f.put(*this, *this, this->fill(), __n).failed())
                this->setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 728 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::operator<<(const void* __n)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 739 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __s(*this);
        if (__s)
        {
            typedef num_put<char_type, ostreambuf_iterator<char_type, traits_type> > _Fp;
            const _Fp& __f = std::use_facet<_Fp>(this->getloc());
            if (__f.put(*this, *this, this->fill(), __n).failed())
                this->setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 754 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template<class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
__put_character_sequence(basic_ostream<_CharT, _Traits>& __os,
                          const _CharT* __str, size_t __len)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 766 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
        if (__s)
        {
            typedef ostreambuf_iterator<_CharT, _Traits> _Ip;
            if (std::__pad_and_output(_Ip(__os),
                                      __str,
                                      (__os.flags() & ios_base::adjustfield) == ios_base::left ?
                                          __str + __len :
                                          __str,
                                      __str + __len,
                                      __os,
                                      __os.fill()).failed())
                __os.setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        __os.__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 787 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return __os;
}


template<class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c)
{
    return _VSTD::__put_character_sequence(__os, &__c, 1);
}

template<class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 806 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
        if (__s)
        {
            _CharT __c = __os.widen(__cn);
            typedef ostreambuf_iterator<_CharT, _Traits> _Ip;
            if (std::__pad_and_output(_Ip(__os),
                                      &__c,
                                      (__os.flags() & ios_base::adjustfield) == ios_base::left ?
                                          &__c + 1 :
                                          &__c,
                                      &__c + 1,
                                      __os,
                                      __os.fill()).failed())
                __os.setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        __os.__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 828 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return __os;
}

template<class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, char __c)
{
    return _VSTD::__put_character_sequence(__os, &__c, 1);
}

template<class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, signed char __c)
{
    return _VSTD::__put_character_sequence(__os, (char *) &__c, 1);
}

template<class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c)
{
    return _VSTD::__put_character_sequence(__os, (char *) &__c, 1);
}

template<class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __str)
{
    return _VSTD::__put_character_sequence(__os, __str, _Traits::length(__str));
}

template<class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 867 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
        if (__s)
        {
            typedef ostreambuf_iterator<_CharT, _Traits> _Ip;
            size_t __len = char_traits<char>::length(__strn);
            const int __bs = 100;
            _CharT __wbb[__bs];
            _CharT* __wb = __wbb;
            unique_ptr<_CharT, void(*)(void*)> __h(0, free);
            if (__len > __bs)
            {
                __wb = (_CharT*)malloc(__len*sizeof(_CharT));
                if (__wb == 0)
                    __throw_bad_alloc();
                __h.reset(__wb);
            }
            for (_CharT* __p = __wb; *__strn != '\0'; ++__strn, ++__p)
                *__p = __os.widen(*__strn);
            if (std::__pad_and_output(_Ip(__os),
                                      __wb,
                                      (__os.flags() & ios_base::adjustfield) == ios_base::left ?
                                          __wb + __len :
                                          __wb,
                                      __wb + __len,
                                      __os,
                                      __os.fill()).failed())
                __os.setstate(ios_base::badbit | ios_base::failbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        __os.__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 902 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return __os;
}

template<class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, const char* __str)
{
    return _VSTD::__put_character_sequence(__os, __str, _Traits::length(__str));
}

template<class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
{
    const char *__s = (const char *) __str;
    return _VSTD::__put_character_sequence(__os, __s, _Traits::length(__s));
}

template<class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __str)
{
    const char *__s = (const char *) __str;
    return _VSTD::__put_character_sequence(__os, __s, _Traits::length(__s));
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::put(char_type __c)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 936 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __s(*this);
        if (__s)
        {
            typedef ostreambuf_iterator<_CharT, _Traits> _Op;
            _Op __o(*this);
            *__o = __c;
            if (__o.failed())
                this->setstate(ios_base::badbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 952 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::write(const char_type* __s, streamsize __n)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 963 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        sentry __sen(*this);
        if (__sen && __n)
        {
            if (this->rdbuf()->sputn(__s, __n) != __n)
                this->setstate(ios_base::badbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 976 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::flush()
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 987 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
        if (this->rdbuf())
        {
            sentry __s(*this);
            if (__s)
            {
                if (this->rdbuf()->pubsync() == -1)
                    this->setstate(ios_base::badbit);
            }
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        this->__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1003 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
    return *this;
}

template <class _CharT, class _Traits>
typename basic_ostream<_CharT, _Traits>::pos_type
basic_ostream<_CharT, _Traits>::tellp()
{
    if (this->fail())
        return pos_type(-1);
    return this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out);
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::seekp(pos_type __pos)
{
    sentry __s(*this);
    if (!this->fail())
    {
        if (this->rdbuf()->pubseekpos(__pos, ios_base::out) == pos_type(-1))
            this->setstate(ios_base::failbit);
    }
    return *this;
}

template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::seekp(off_type __off, ios_base::seekdir __dir)
{
    sentry __s(*this);
    if (!this->fail())
    {
        if (this->rdbuf()->pubseekoff(__off, __dir, ios_base::out) == pos_type(-1))
            this->setstate(ios_base::failbit);
    }
    return *this;
}

template <class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI inline
basic_ostream<_CharT, _Traits>&
endl(basic_ostream<_CharT, _Traits>& __os)
{
    __os.put(__os.widen('\n'));
    __os.flush();
    return __os;
}

template <class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI inline
basic_ostream<_CharT, _Traits>&
ends(basic_ostream<_CharT, _Traits>& __os)
{
    __os.put(_CharT());
    return __os;
}

template <class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI inline
basic_ostream<_CharT, _Traits>&
flush(basic_ostream<_CharT, _Traits>& __os)
{
    __os.flush();
    return __os;
}

template <class _Stream, class _Tp, class = void>
struct __is_ostreamable : false_type { };

template <class _Stream, class _Tp>
struct __is_ostreamable<_Stream, _Tp, decltype(
    std::declval<_Stream>() << std::declval<_Tp>(), void()
)> : true_type { };

template <class _Stream,
          class _Tp,
          __enable_if_t<_And<is_base_of<ios_base, _Stream>, __is_ostreamable<_Stream&, const _Tp&> >::value, int> = 0>
_LIBCPP_INLINE_VISIBILITY
_Stream&& operator<<(_Stream&& __os, const _Tp& __x)
{
    __os << __x;
    return _VSTD::move(__os);
}

template<class _CharT, class _Traits, class _Allocator>
basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
           const basic_string<_CharT, _Traits, _Allocator>& __str)
{
    return _VSTD::__put_character_sequence(__os, __str.data(), __str.size());
}

template<class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
           basic_string_view<_CharT, _Traits> __sv)
{
    return _VSTD::__put_character_sequence(__os, __sv.data(), __sv.size());
}

template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __ec)
{
    return __os << __ec.category().name() << ':' << __ec.value();
}

template<class _CharT, class _Traits, class _Yp>
inline _LIBCPP_INLINE_VISIBILITY
basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p)
{
    return __os << __p.get();
}

template <
    class _CharT,
    class _Traits,
    class _Yp,
    class _Dp,
    __enable_if_t<is_same<void,
                          __void_t<decltype((std::declval<basic_ostream<_CharT, _Traits>&>()
                                             << std::declval<typename unique_ptr<_Yp, _Dp>::pointer>()))> >::value,
                  int> = 0>
inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, unique_ptr<_Yp, _Dp> const& __p) {
    return __os << __p.get();
}

template <class _CharT, class _Traits, size_t _Size>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x)
{
    return __os << __x.template to_string<_CharT, _Traits>
                        (std::use_facet<ctype<_CharT> >(__os.getloc()).widen('0'),
                         std::use_facet<ctype<_CharT> >(__os.getloc()).widen('1'));
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1143 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <class _Traits>
basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, wchar_t) = delete;

template <class _Traits>
basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const wchar_t*) = delete;

template <class _Traits>
basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, char16_t) = delete;

template <class _Traits>
basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, char32_t) = delete;

template <class _Traits>
basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, const char16_t*) = delete;

template <class _Traits>
basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, const char32_t*) = delete;

#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 1164 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3

#ifndef _LIBCPP_HAS_NO_CHAR8_T
template <class _Traits>
basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, char8_t) = delete;

template <class _Traits>
basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, char8_t) = delete;

template <class _Traits>
basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const char8_t*) = delete;

template <class _Traits>
basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, const char8_t*) = delete;
#endif
# 1178 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3

template <class _Traits>
basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, char16_t) = delete;

template <class _Traits>
basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, char32_t) = delete;

template <class _Traits>
basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const char16_t*) = delete;

template <class _Traits>
basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const char32_t*) = delete;

#endif // _LIBCPP_STD_VER >= 20
# 1192 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<wchar_t>;
#endif
# 1197 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3

_LIBCPP_END_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1201 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if 0 /* expanded by -frewrite-includes */
#  include <atomic>
#endif /* expanded by -frewrite-includes */
# 1201 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 1202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 1202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 1203 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 1203 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 1204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iterator>
#endif /* expanded by -frewrite-includes */
# 1204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 1205 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 1205 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
# 1206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#endif
# 1207 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3

#endif // _LIBCPP_OSTREAM
# 1209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/ostream" 3
#endif /* ostream expanded by -frewrite-includes */
# 56 "../../third_party/googletest/src/googletest/include/gtest/gtest.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 56 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 57 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* vector expanded by -frewrite-includes */
#include <vector>
#else /* vector expanded by -frewrite-includes */
# 57 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_VECTOR
#define _LIBCPP_VECTOR

/*
    vector synopsis

namespace std
{

template <class T, class Allocator = allocator<T> >
class vector
{
public:
    typedef T                                        value_type;
    typedef Allocator                                allocator_type;
    typedef typename allocator_type::reference       reference;
    typedef typename allocator_type::const_reference const_reference;
    typedef implementation-defined                   iterator;
    typedef implementation-defined                   const_iterator;
    typedef typename allocator_type::size_type       size_type;
    typedef typename allocator_type::difference_type difference_type;
    typedef typename allocator_type::pointer         pointer;
    typedef typename allocator_type::const_pointer   const_pointer;
    typedef std::reverse_iterator<iterator>          reverse_iterator;
    typedef std::reverse_iterator<const_iterator>    const_reverse_iterator;

    vector()
        noexcept(is_nothrow_default_constructible<allocator_type>::value);
    explicit vector(const allocator_type&);
    explicit vector(size_type n);
    explicit vector(size_type n, const allocator_type&); // C++14
    vector(size_type n, const value_type& value, const allocator_type& = allocator_type());
    template <class InputIterator>
        vector(InputIterator first, InputIterator last, const allocator_type& = allocator_type());
    template<container-compatible-range<T> R>
      constexpr vector(from_range_t, R&& rg, const Allocator& = Allocator()); // C++23
    vector(const vector& x);
    vector(vector&& x)
        noexcept(is_nothrow_move_constructible<allocator_type>::value);
    vector(initializer_list<value_type> il);
    vector(initializer_list<value_type> il, const allocator_type& a);
    ~vector();
    vector& operator=(const vector& x);
    vector& operator=(vector&& x)
        noexcept(
             allocator_type::propagate_on_container_move_assignment::value ||
             allocator_type::is_always_equal::value); // C++17
    vector& operator=(initializer_list<value_type> il);
    template <class InputIterator>
        void assign(InputIterator first, InputIterator last);
    template<container-compatible-range<T> R>
      constexpr void assign_range(R&& rg); // C++23
    void assign(size_type n, const value_type& u);
    void assign(initializer_list<value_type> il);

    allocator_type get_allocator() const noexcept;

    iterator               begin() noexcept;
    const_iterator         begin()   const noexcept;
    iterator               end() noexcept;
    const_iterator         end()     const noexcept;

    reverse_iterator       rbegin() noexcept;
    const_reverse_iterator rbegin()  const noexcept;
    reverse_iterator       rend() noexcept;
    const_reverse_iterator rend()    const noexcept;

    const_iterator         cbegin()  const noexcept;
    const_iterator         cend()    const noexcept;
    const_reverse_iterator crbegin() const noexcept;
    const_reverse_iterator crend()   const noexcept;

    size_type size() const noexcept;
    size_type max_size() const noexcept;
    size_type capacity() const noexcept;
    bool empty() const noexcept;
    void reserve(size_type n);
    void shrink_to_fit() noexcept;

    reference       operator[](size_type n);
    const_reference operator[](size_type n) const;
    reference       at(size_type n);
    const_reference at(size_type n) const;

    reference       front();
    const_reference front() const;
    reference       back();
    const_reference back() const;

    value_type*       data() noexcept;
    const value_type* data() const noexcept;

    void push_back(const value_type& x);
    void push_back(value_type&& x);
    template <class... Args>
        reference emplace_back(Args&&... args); // reference in C++17
    template<container-compatible-range<T> R>
      constexpr void append_range(R&& rg); // C++23
    void pop_back();

    template <class... Args> iterator emplace(const_iterator position, Args&&... args);
    iterator insert(const_iterator position, const value_type& x);
    iterator insert(const_iterator position, value_type&& x);
    iterator insert(const_iterator position, size_type n, const value_type& x);
    template <class InputIterator>
        iterator insert(const_iterator position, InputIterator first, InputIterator last);
    template<container-compatible-range<T> R>
      constexpr iterator insert_range(const_iterator position, R&& rg); // C++23
    iterator insert(const_iterator position, initializer_list<value_type> il);

    iterator erase(const_iterator position);
    iterator erase(const_iterator first, const_iterator last);

    void clear() noexcept;

    void resize(size_type sz);
    void resize(size_type sz, const value_type& c);

    void swap(vector&)
        noexcept(allocator_traits<allocator_type>::propagate_on_container_swap::value ||
                 allocator_traits<allocator_type>::is_always_equal::value);  // C++17

    bool __invariants() const;
};

template <class Allocator = allocator<T> >
class vector<bool, Allocator>
{
public:
    typedef bool                                     value_type;
    typedef Allocator                                allocator_type;
    typedef implementation-defined                   iterator;
    typedef implementation-defined                   const_iterator;
    typedef typename allocator_type::size_type       size_type;
    typedef typename allocator_type::difference_type difference_type;
    typedef iterator                                 pointer;
    typedef const_iterator                           const_pointer;
    typedef std::reverse_iterator<iterator>          reverse_iterator;
    typedef std::reverse_iterator<const_iterator>    const_reverse_iterator;

    class reference
    {
    public:
        reference(const reference&) noexcept;
        operator bool() const noexcept;
        reference& operator=(bool x) noexcept;
        reference& operator=(const reference& x) noexcept;
        iterator operator&() const noexcept;
        void flip() noexcept;
    };

    class const_reference
    {
    public:
        const_reference(const reference&) noexcept;
        operator bool() const noexcept;
        const_iterator operator&() const noexcept;
    };

    vector()
        noexcept(is_nothrow_default_constructible<allocator_type>::value);
    explicit vector(const allocator_type&);
    explicit vector(size_type n, const allocator_type& a = allocator_type()); // C++14
    vector(size_type n, const value_type& value, const allocator_type& = allocator_type());
    template <class InputIterator>
        vector(InputIterator first, InputIterator last, const allocator_type& = allocator_type());
    template<container-compatible-range<bool> R>
      constexpr vector(from_range_t, R&& rg, const Allocator& = Allocator());
    vector(const vector& x);
    vector(vector&& x)
        noexcept(is_nothrow_move_constructible<allocator_type>::value);
    vector(initializer_list<value_type> il);
    vector(initializer_list<value_type> il, const allocator_type& a);
    ~vector();
    vector& operator=(const vector& x);
    vector& operator=(vector&& x)
        noexcept(
             allocator_type::propagate_on_container_move_assignment::value ||
             allocator_type::is_always_equal::value); // C++17
    vector& operator=(initializer_list<value_type> il);
    template <class InputIterator>
        void assign(InputIterator first, InputIterator last);
    template<container-compatible-range<T> R>
      constexpr void assign_range(R&& rg); // C++23
    void assign(size_type n, const value_type& u);
    void assign(initializer_list<value_type> il);

    allocator_type get_allocator() const noexcept;

    iterator               begin() noexcept;
    const_iterator         begin()   const noexcept;
    iterator               end() noexcept;
    const_iterator         end()     const noexcept;

    reverse_iterator       rbegin() noexcept;
    const_reverse_iterator rbegin()  const noexcept;
    reverse_iterator       rend() noexcept;
    const_reverse_iterator rend()    const noexcept;

    const_iterator         cbegin()  const noexcept;
    const_iterator         cend()    const noexcept;
    const_reverse_iterator crbegin() const noexcept;
    const_reverse_iterator crend()   const noexcept;

    size_type size() const noexcept;
    size_type max_size() const noexcept;
    size_type capacity() const noexcept;
    bool empty() const noexcept;
    void reserve(size_type n);
    void shrink_to_fit() noexcept;

    reference       operator[](size_type n);
    const_reference operator[](size_type n) const;
    reference       at(size_type n);
    const_reference at(size_type n) const;

    reference       front();
    const_reference front() const;
    reference       back();
    const_reference back() const;

    void push_back(const value_type& x);
    template <class... Args> reference emplace_back(Args&&... args);  // C++14; reference in C++17
    template<container-compatible-range<T> R>
      constexpr void append_range(R&& rg); // C++23
    void pop_back();

    template <class... Args> iterator emplace(const_iterator position, Args&&... args);  // C++14
    iterator insert(const_iterator position, const value_type& x);
    iterator insert(const_iterator position, size_type n, const value_type& x);
    template <class InputIterator>
        iterator insert(const_iterator position, InputIterator first, InputIterator last);
    template<container-compatible-range<T> R>
      constexpr iterator insert_range(const_iterator position, R&& rg); // C++23
    iterator insert(const_iterator position, initializer_list<value_type> il);

    iterator erase(const_iterator position);
    iterator erase(const_iterator first, const_iterator last);

    void clear() noexcept;

    void resize(size_type sz);
    void resize(size_type sz, value_type x);

    void swap(vector&)
        noexcept(allocator_traits<allocator_type>::propagate_on_container_swap::value ||
                 allocator_traits<allocator_type>::is_always_equal::value);  // C++17
    void flip() noexcept;

    bool __invariants() const;
};

template <class InputIterator, class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
   vector(InputIterator, InputIterator, Allocator = Allocator())
   -> vector<typename iterator_traits<InputIterator>::value_type, Allocator>; // C++17

template<ranges::input_range R, class Allocator = allocator<ranges::range_value_t<R>>>
  vector(from_range_t, R&&, Allocator = Allocator())
    -> vector<ranges::range_value_t<R>, Allocator>; // C++23

template <class Allocator> struct hash<std::vector<bool, Allocator>>;

template <class T, class Allocator> bool operator==(const vector<T,Allocator>& x, const vector<T,Allocator>& y);   // constexpr since C++20
template <class T, class Allocator> bool operator!=(const vector<T,Allocator>& x, const vector<T,Allocator>& y);   // removed in C++20
template <class T, class Allocator> bool operator< (const vector<T,Allocator>& x, const vector<T,Allocator>& y);   // removed in C++20
template <class T, class Allocator> bool operator> (const vector<T,Allocator>& x, const vector<T,Allocator>& y);   // removed in C++20
template <class T, class Allocator> bool operator>=(const vector<T,Allocator>& x, const vector<T,Allocator>& y);   // removed in C++20
template <class T, class Allocator> bool operator<=(const vector<T,Allocator>& x, const vector<T,Allocator>& y);   // removed in C++20
template <class T, class Allocator> constexpr
  constexpr synth-three-way-result<T> operator<=>(const vector<T, Allocator>& x,
                                                  const vector<T, Allocator>& y);                                  // since C++20

template <class T, class Allocator>
void swap(vector<T,Allocator>& x, vector<T,Allocator>& y)
    noexcept(noexcept(x.swap(y)));

template <class T, class Allocator, class U>
typename vector<T, Allocator>::size_type
erase(vector<T, Allocator>& c, const U& value);       // since C++20
template <class T, class Allocator, class Predicate>
typename vector<T, Allocator>::size_type
erase_if(vector<T, Allocator>& c, Predicate pred);    // since C++20


template<class T>
 inline constexpr bool is-vector-bool-reference = see below;        // exposition only, since C++23

template<class T, class charT> requires is-vector-bool-reference<T> // Since C++23
 struct formatter<T, charT>;

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy.h>
#endif /* expanded by -frewrite-includes */
# 304 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 305 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/equal.h>
#endif /* expanded by -frewrite-includes */
# 305 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 306 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/fill_n.h>
#endif /* expanded by -frewrite-includes */
# 306 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 307 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/iterator_operations.h>
#endif /* expanded by -frewrite-includes */
# 307 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 308 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/lexicographical_compare.h>
#endif /* expanded by -frewrite-includes */
# 308 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 309 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/lexicographical_compare_three_way.h>
#endif /* expanded by -frewrite-includes */
# 309 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 310 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/remove.h>
#endif /* expanded by -frewrite-includes */
# 310 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 311 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/remove_if.h>
#endif /* expanded by -frewrite-includes */
# 311 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 312 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/rotate.h>
#endif /* expanded by -frewrite-includes */
# 312 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 313 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/unwrap_iter.h>
#endif /* expanded by -frewrite-includes */
# 313 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 314 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 314 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 315 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 315 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 316 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit_reference>
#endif /* expanded by -frewrite-includes */
# 316 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 317 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 317 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 318 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 318 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 319 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/enable_insertable.h>
#endif /* expanded by -frewrite-includes */
# 319 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 320 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* formatter.h expanded by -frewrite-includes */
#include <__format/formatter.h>
#else /* formatter.h expanded by -frewrite-includes */
# 320 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FORMAT_FORMATTER_H
#define _LIBCPP___FORMAT_FORMATTER_H

#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* format_fwd.h expanded by -frewrite-includes */
#include <__format/format_fwd.h>
#else /* format_fwd.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_fwd.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FORMAT_FORMAT_FWD_H
#define _LIBCPP___FORMAT_FORMAT_FWD_H

#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_fwd.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_fwd.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_fwd.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_fwd.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_fwd.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_fwd.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_fwd.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_fwd.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_fwd.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_fwd.h" 3

template <class _Context>
class _LIBCPP_TEMPLATE_VIS basic_format_arg;

template <class _OutIt, class _CharT>
  requires output_iterator<_OutIt, const _CharT&>
class _LIBCPP_TEMPLATE_VIS basic_format_context;

template <class _Tp, class _CharT = char>
struct _LIBCPP_TEMPLATE_VIS formatter;

#endif //_LIBCPP_STD_VER >= 20
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_fwd.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FORMAT_FORMAT_FWD_H
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_fwd.h" 3
#endif /* format_fwd.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter.h" 3

/// The default formatter template.
///
/// [format.formatter.spec]/5
/// If F is a disabled specialization of formatter, these values are false:
/// - is_default_constructible_v<F>,
/// - is_copy_constructible_v<F>,
/// - is_move_constructible_v<F>,
/// - is_copy_assignable<F>, and
/// - is_move_assignable<F>.
template <class _Tp, class _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter {
  formatter() = delete;
  formatter(const formatter&) = delete;
  formatter& operator=(const formatter&) = delete;
};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter.h" 3

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI constexpr void __set_debug_format(_Tp& __formatter) {
  if constexpr (requires { __formatter.set_debug_format(); })
    __formatter.set_debug_format();
}

#  endif // _LIBCPP_STD_VER >= 23
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter.h" 3
#endif   // _LIBCPP_STD_VER >= 20
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FORMAT_FORMATTER_H
# 55 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter.h" 3
#endif /* formatter.h expanded by -frewrite-includes */
# 321 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* formatter_bool.h expanded by -frewrite-includes */
#include <__format/formatter_bool.h>
#else /* formatter_bool.h expanded by -frewrite-includes */
# 321 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FORMAT_FORMATTER_BOOL_H
#define _LIBCPP___FORMAT_FORMATTER_BOOL_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* concepts.h expanded by -frewrite-includes */
#include <__format/concepts.h>
#else /* concepts.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FORMAT_CONCEPTS_H
#define _LIBCPP___FORMAT_CONCEPTS_H

#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/semiregular.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/format_fwd.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* format_parse_context.h expanded by -frewrite-includes */
#include <__format/format_parse_context.h>
#else /* format_parse_context.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FORMAT_FORMAT_PARSE_CONTEXT_H
#define _LIBCPP___FORMAT_FORMAT_PARSE_CONTEXT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* format_error.h expanded by -frewrite-includes */
#include <__format/format_error.h>
#else /* format_error.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_error.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FORMAT_FORMAT_ERROR_H
#define _LIBCPP___FORMAT_FORMAT_ERROR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_error.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_error.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__verbose_abort>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_error.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_error.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_error.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_error.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_error.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_error.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_error.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_error.h" 3

_LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wweak-vtables")
class _LIBCPP_EXPORTED_FROM_ABI format_error : public runtime_error {
public:
  _LIBCPP_HIDE_FROM_ABI explicit format_error(const string& __s)
      : runtime_error(__s) {}
  _LIBCPP_HIDE_FROM_ABI explicit format_error(const char* __s)
      : runtime_error(__s) {}
  _LIBCPP_HIDE_FROM_ABI format_error(const format_error&) = default;
  _LIBCPP_HIDE_FROM_ABI format_error& operator=(const format_error&) = default;
  _LIBCPP_HIDE_FROM_ABI_VIRTUAL
  ~format_error() noexcept override = default;
};
_LIBCPP_DIAGNOSTIC_POP

_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void
__throw_format_error(const char* __s) {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
  throw format_error(__s);
#else
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_error.h" 3
  _LIBCPP_VERBOSE_ABORT("format_error was thrown in -fno-exceptions mode with message \"%s\"", __s);
#endif
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_error.h" 3
}

#endif //_LIBCPP_STD_VER >= 20
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_error.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FORMAT_FORMAT_ERROR_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_error.h" 3
#endif /* format_error.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <string_view>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 3

template <class _CharT>
class _LIBCPP_TEMPLATE_VIS basic_format_parse_context {
public:
  using char_type = _CharT;
  using const_iterator = typename basic_string_view<_CharT>::const_iterator;
  using iterator = const_iterator;

  _LIBCPP_HIDE_FROM_ABI
  constexpr explicit basic_format_parse_context(basic_string_view<_CharT> __fmt,
                                                size_t __num_args = 0) noexcept
      : __begin_(__fmt.begin()),
        __end_(__fmt.end()),
        __indexing_(__unknown),
        __next_arg_id_(0),
        __num_args_(__num_args) {}

  basic_format_parse_context(const basic_format_parse_context&) = delete;
  basic_format_parse_context&
  operator=(const basic_format_parse_context&) = delete;

  _LIBCPP_HIDE_FROM_ABI constexpr const_iterator begin() const noexcept {
    return __begin_;
  }
  _LIBCPP_HIDE_FROM_ABI constexpr const_iterator end() const noexcept {
    return __end_;
  }
  _LIBCPP_HIDE_FROM_ABI constexpr void advance_to(const_iterator __it) {
    __begin_ = __it;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr size_t next_arg_id() {
    if (__indexing_ == __manual)
      std::__throw_format_error("Using automatic argument numbering in manual argument numbering mode");

    if (__indexing_ == __unknown)
      __indexing_ = __automatic;

    // Throws an exception to make the expression a non core constant
    // expression as required by:
    // [format.parse.ctx]/8
    //   Remarks: Let cur-arg-id be the value of next_arg_id_ prior to this
    //   call. Call expressions where cur-arg-id >= num_args_ is true are not
    //   core constant expressions (7.7 [expr.const]).
    // Note: the Throws clause [format.parse.ctx]/9 doesn't specify the
    // behavior when id >= num_args_.
    if (is_constant_evaluated() && __next_arg_id_ >= __num_args_)
      std::__throw_format_error("Argument index outside the valid range");

    return __next_arg_id_++;
  }
  _LIBCPP_HIDE_FROM_ABI constexpr void check_arg_id(size_t __id) {
    if (__indexing_ == __automatic)
      std::__throw_format_error("Using manual argument numbering in automatic argument numbering mode");

    if (__indexing_ == __unknown)
      __indexing_ = __manual;

    // Throws an exception to make the expression a non core constant
    // expression as required by:
    // [format.parse.ctx]/11
    //   Remarks: Call expressions where id >= num_args_ are not core constant
    //   expressions ([expr.const]).
    // Note: the Throws clause [format.parse.ctx]/10 doesn't specify the
    // behavior when id >= num_args_.
    if (is_constant_evaluated() && __id >= __num_args_)
      std::__throw_format_error("Argument index outside the valid range");
  }

private:
  iterator __begin_;
  iterator __end_;
  enum _Indexing { __unknown, __manual, __automatic };
  _Indexing __indexing_;
  size_t __next_arg_id_;
  size_t __num_args_;
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(basic_format_parse_context);

using format_parse_context = basic_format_parse_context<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using wformat_parse_context = basic_format_parse_context<wchar_t>;
#endif
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 3

#endif //_LIBCPP_STD_VER >= 20
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FORMAT_FORMAT_PARSE_CONTEXT_H
# 114 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_parse_context.h" 3
#endif /* format_parse_context.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_specialization.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_const.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3

/// The character type specializations of \ref formatter.
template <class _CharT>
concept __fmt_char_type =
    same_as<_CharT, char>
#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
    || same_as<_CharT, wchar_t>
#  endif
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
    ;

// The output iterator isn't specified. A formatter should accept any
// output_iterator. This iterator is a minimal iterator to test the concept.
// (Note testing for (w)format_context would be a valid choice, but requires
// selecting the proper one depending on the type of _CharT.)
template <class _CharT>
using __fmt_iter_for = _CharT*;

template <class _Tp, class _Context, class _Formatter = typename _Context::template formatter_type<remove_const_t<_Tp>>>
concept __formattable_with =
    semiregular<_Formatter> &&
    requires(_Formatter& __f,
             const _Formatter& __cf,
             _Tp&& __t,
             _Context __fc,
             basic_format_parse_context<typename _Context::char_type> __pc) {
      { __f.parse(__pc) } -> same_as<typename decltype(__pc)::iterator>;
      { __cf.format(__t, __fc) } -> same_as<typename _Context::iterator>;
    };

template <class _Tp, class _CharT>
concept __formattable =
    __formattable_with<remove_reference_t<_Tp>, basic_format_context<__fmt_iter_for<_CharT>, _CharT>>;

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
template <class _Tp, class _CharT>
concept formattable = __formattable<_Tp, _CharT>;

// [tuple.like] defines a tuple-like exposition only concept. This concept is
// not related to that. Therefore it uses a different name for the concept.
//
// TODO FMT Add a test to validate we fail when using that concept after P2165
// has been implemented.
template <class _Tp>
concept __fmt_pair_like =
    __is_specialization_v<_Tp, pair> || (__is_specialization_v<_Tp, tuple> && tuple_size_v<_Tp> == 2);

#  endif //_LIBCPP_STD_VER >= 23
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
#endif //_LIBCPP_STD_VER >= 20
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FORMAT_CONCEPTS_H
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/concepts.h" 3
#endif /* concepts.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/format_parse_context.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/formatter.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* formatter_integral.h expanded by -frewrite-includes */
#include <__format/formatter_integral.h>
#else /* formatter_integral.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FORMAT_FORMATTER_INTEGRAL_H
#define _LIBCPP___FORMAT_FORMATTER_INTEGRAL_H

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* to_chars_integral.h expanded by -frewrite-includes */
#include <__charconv/to_chars_integral.h>
#else /* to_chars_integral.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CHARCONV_TO_CHARS_INTEGRAL_H
#define _LIBCPP___CHARCONV_TO_CHARS_INTEGRAL_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy_n.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/countl.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* tables.h expanded by -frewrite-includes */
#include <__charconv/tables.h>
#else /* tables.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/tables.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CHARCONV_TABLES
#define _LIBCPP___CHARCONV_TABLES

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/tables.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/tables.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/tables.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/tables.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/tables.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/tables.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/tables.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/tables.h" 3

namespace __itoa {

inline constexpr char __base_2_lut[64] = {
    '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '1', '0', '0', '0', '1', '1', '0', '1', '0', '0', '0', '1',
    '0', '1', '0', '1', '1', '0', '0', '1', '1', '1', '1', '0', '0', '0', '1', '0', '0', '1', '1', '0', '1', '0',
    '1', '0', '1', '1', '1', '1', '0', '0', '1', '1', '0', '1', '1', '1', '1', '0', '1', '1', '1', '1'};

inline constexpr char __base_8_lut[128] = {
    '0', '0', '0', '1', '0', '2', '0', '3', '0', '4', '0', '5', '0', '6', '0', '7', '1', '0', '1', '1', '1', '2',
    '1', '3', '1', '4', '1', '5', '1', '6', '1', '7', '2', '0', '2', '1', '2', '2', '2', '3', '2', '4', '2', '5',
    '2', '6', '2', '7', '3', '0', '3', '1', '3', '2', '3', '3', '3', '4', '3', '5', '3', '6', '3', '7', '4', '0',
    '4', '1', '4', '2', '4', '3', '4', '4', '4', '5', '4', '6', '4', '7', '5', '0', '5', '1', '5', '2', '5', '3',
    '5', '4', '5', '5', '5', '6', '5', '7', '6', '0', '6', '1', '6', '2', '6', '3', '6', '4', '6', '5', '6', '6',
    '6', '7', '7', '0', '7', '1', '7', '2', '7', '3', '7', '4', '7', '5', '7', '6', '7', '7'};

inline constexpr char __base_16_lut[512] = {
    '0', '0', '0', '1', '0', '2', '0', '3', '0', '4', '0', '5', '0', '6', '0', '7', '0', '8', '0', '9', '0', 'a', '0',
    'b', '0', 'c', '0', 'd', '0', 'e', '0', 'f', '1', '0', '1', '1', '1', '2', '1', '3', '1', '4', '1', '5', '1', '6',
    '1', '7', '1', '8', '1', '9', '1', 'a', '1', 'b', '1', 'c', '1', 'd', '1', 'e', '1', 'f', '2', '0', '2', '1', '2',
    '2', '2', '3', '2', '4', '2', '5', '2', '6', '2', '7', '2', '8', '2', '9', '2', 'a', '2', 'b', '2', 'c', '2', 'd',
    '2', 'e', '2', 'f', '3', '0', '3', '1', '3', '2', '3', '3', '3', '4', '3', '5', '3', '6', '3', '7', '3', '8', '3',
    '9', '3', 'a', '3', 'b', '3', 'c', '3', 'd', '3', 'e', '3', 'f', '4', '0', '4', '1', '4', '2', '4', '3', '4', '4',
    '4', '5', '4', '6', '4', '7', '4', '8', '4', '9', '4', 'a', '4', 'b', '4', 'c', '4', 'd', '4', 'e', '4', 'f', '5',
    '0', '5', '1', '5', '2', '5', '3', '5', '4', '5', '5', '5', '6', '5', '7', '5', '8', '5', '9', '5', 'a', '5', 'b',
    '5', 'c', '5', 'd', '5', 'e', '5', 'f', '6', '0', '6', '1', '6', '2', '6', '3', '6', '4', '6', '5', '6', '6', '6',
    '7', '6', '8', '6', '9', '6', 'a', '6', 'b', '6', 'c', '6', 'd', '6', 'e', '6', 'f', '7', '0', '7', '1', '7', '2',
    '7', '3', '7', '4', '7', '5', '7', '6', '7', '7', '7', '8', '7', '9', '7', 'a', '7', 'b', '7', 'c', '7', 'd', '7',
    'e', '7', 'f', '8', '0', '8', '1', '8', '2', '8', '3', '8', '4', '8', '5', '8', '6', '8', '7', '8', '8', '8', '9',
    '8', 'a', '8', 'b', '8', 'c', '8', 'd', '8', 'e', '8', 'f', '9', '0', '9', '1', '9', '2', '9', '3', '9', '4', '9',
    '5', '9', '6', '9', '7', '9', '8', '9', '9', '9', 'a', '9', 'b', '9', 'c', '9', 'd', '9', 'e', '9', 'f', 'a', '0',
    'a', '1', 'a', '2', 'a', '3', 'a', '4', 'a', '5', 'a', '6', 'a', '7', 'a', '8', 'a', '9', 'a', 'a', 'a', 'b', 'a',
    'c', 'a', 'd', 'a', 'e', 'a', 'f', 'b', '0', 'b', '1', 'b', '2', 'b', '3', 'b', '4', 'b', '5', 'b', '6', 'b', '7',
    'b', '8', 'b', '9', 'b', 'a', 'b', 'b', 'b', 'c', 'b', 'd', 'b', 'e', 'b', 'f', 'c', '0', 'c', '1', 'c', '2', 'c',
    '3', 'c', '4', 'c', '5', 'c', '6', 'c', '7', 'c', '8', 'c', '9', 'c', 'a', 'c', 'b', 'c', 'c', 'c', 'd', 'c', 'e',
    'c', 'f', 'd', '0', 'd', '1', 'd', '2', 'd', '3', 'd', '4', 'd', '5', 'd', '6', 'd', '7', 'd', '8', 'd', '9', 'd',
    'a', 'd', 'b', 'd', 'c', 'd', 'd', 'd', 'e', 'd', 'f', 'e', '0', 'e', '1', 'e', '2', 'e', '3', 'e', '4', 'e', '5',
    'e', '6', 'e', '7', 'e', '8', 'e', '9', 'e', 'a', 'e', 'b', 'e', 'c', 'e', 'd', 'e', 'e', 'e', 'f', 'f', '0', 'f',
    '1', 'f', '2', 'f', '3', 'f', '4', 'f', '5', 'f', '6', 'f', '7', 'f', '8', 'f', '9', 'f', 'a', 'f', 'b', 'f', 'c',
    'f', 'd', 'f', 'e', 'f', 'f'};

inline constexpr uint32_t __pow10_32[10] = {
    UINT32_C(0),
    UINT32_C(10),
    UINT32_C(100),
    UINT32_C(1000),
    UINT32_C(10000),
    UINT32_C(100000),
    UINT32_C(1000000),
    UINT32_C(10000000),
    UINT32_C(100000000),
    UINT32_C(1000000000)};

inline constexpr uint64_t __pow10_64[20] = {
    UINT64_C(0),
    UINT64_C(10),
    UINT64_C(100),
    UINT64_C(1000),
    UINT64_C(10000),
    UINT64_C(100000),
    UINT64_C(1000000),
    UINT64_C(10000000),
    UINT64_C(100000000),
    UINT64_C(1000000000),
    UINT64_C(10000000000),
    UINT64_C(100000000000),
    UINT64_C(1000000000000),
    UINT64_C(10000000000000),
    UINT64_C(100000000000000),
    UINT64_C(1000000000000000),
    UINT64_C(10000000000000000),
    UINT64_C(100000000000000000),
    UINT64_C(1000000000000000000),
    UINT64_C(10000000000000000000)};

#  ifndef _LIBCPP_HAS_NO_INT128
inline constexpr int __pow10_128_offset      = 0;
inline constexpr __uint128_t __pow10_128[40] = {
    UINT64_C(0),
    UINT64_C(10),
    UINT64_C(100),
    UINT64_C(1000),
    UINT64_C(10000),
    UINT64_C(100000),
    UINT64_C(1000000),
    UINT64_C(10000000),
    UINT64_C(100000000),
    UINT64_C(1000000000),
    UINT64_C(10000000000),
    UINT64_C(100000000000),
    UINT64_C(1000000000000),
    UINT64_C(10000000000000),
    UINT64_C(100000000000000),
    UINT64_C(1000000000000000),
    UINT64_C(10000000000000000),
    UINT64_C(100000000000000000),
    UINT64_C(1000000000000000000),
    UINT64_C(10000000000000000000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(100),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(1000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(100000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(1000000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10000000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(100000000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(1000000000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10000000000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(100000000000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(1000000000000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10000000000000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(100000000000000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(1000000000000000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10000000000000000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(100000000000000000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(1000000000000000000),
    __uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10000000000000000000),
    (__uint128_t(UINT64_C(10000000000000000000)) * UINT64_C(10000000000000000000)) * 10};
#  endif
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/tables.h" 3

inline constexpr char __digits_base_10[200] = {
    // clang-format off
    '0', '0', '0', '1', '0', '2', '0', '3', '0', '4', '0', '5', '0', '6', '0', '7', '0', '8', '0', '9',
    '1', '0', '1', '1', '1', '2', '1', '3', '1', '4', '1', '5', '1', '6', '1', '7', '1', '8', '1', '9',
    '2', '0', '2', '1', '2', '2', '2', '3', '2', '4', '2', '5', '2', '6', '2', '7', '2', '8', '2', '9',
    '3', '0', '3', '1', '3', '2', '3', '3', '3', '4', '3', '5', '3', '6', '3', '7', '3', '8', '3', '9',
    '4', '0', '4', '1', '4', '2', '4', '3', '4', '4', '4', '5', '4', '6', '4', '7', '4', '8', '4', '9',
    '5', '0', '5', '1', '5', '2', '5', '3', '5', '4', '5', '5', '5', '6', '5', '7', '5', '8', '5', '9',
    '6', '0', '6', '1', '6', '2', '6', '3', '6', '4', '6', '5', '6', '6', '6', '7', '6', '8', '6', '9',
    '7', '0', '7', '1', '7', '2', '7', '3', '7', '4', '7', '5', '7', '6', '7', '7', '7', '8', '7', '9',
    '8', '0', '8', '1', '8', '2', '8', '3', '8', '4', '8', '5', '8', '6', '8', '7', '8', '8', '8', '9',
    '9', '0', '9', '1', '9', '2', '9', '3', '9', '4', '9', '5', '9', '6', '9', '7', '9', '8', '9', '9'};
// clang-format on

} // namespace __itoa

#endif // _LIBCPP_STD_VER >= 17
# 160 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/tables.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CHARCONV_TABLES
# 164 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/tables.h" 3
#endif /* tables.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* to_chars_base_10.h expanded by -frewrite-includes */
#include <__charconv/to_chars_base_10.h>
#else /* to_chars_base_10.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CHARCONV_TO_CHARS_BASE_10_H
#define _LIBCPP___CHARCONV_TO_CHARS_BASE_10_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy_n.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__charconv/tables.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3

namespace __itoa {

_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append1(char* __first, uint32_t __value) noexcept {
  *__first = '0' + static_cast<char>(__value);
  return __first + 1;
}

_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append2(char* __first, uint32_t __value) noexcept {
  return std::copy_n(&__digits_base_10[__value * 2], 2, __first);
}

_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append3(char* __first, uint32_t __value) noexcept {
  return __itoa::__append2(__itoa::__append1(__first, __value / 100), __value % 100);
}

_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append4(char* __first, uint32_t __value) noexcept {
  return __itoa::__append2(__itoa::__append2(__first, __value / 100), __value % 100);
}

_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append5(char* __first, uint32_t __value) noexcept {
  return __itoa::__append4(__itoa::__append1(__first, __value / 10000), __value % 10000);
}

_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append6(char* __first, uint32_t __value) noexcept {
  return __itoa::__append4(__itoa::__append2(__first, __value / 10000), __value % 10000);
}

_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append7(char* __first, uint32_t __value) noexcept {
  return __itoa::__append6(__itoa::__append1(__first, __value / 1000000), __value % 1000000);
}

_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append8(char* __first, uint32_t __value) noexcept {
  return __itoa::__append6(__itoa::__append2(__first, __value / 1000000), __value % 1000000);
}

_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char* __append9(char* __first, uint32_t __value) noexcept {
  return __itoa::__append8(__itoa::__append1(__first, __value / 100000000), __value % 100000000);
}

template <class _Tp>
_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI char* __append10(char* __first, _Tp __value) noexcept {
  return __itoa::__append8(__itoa::__append2(__first, static_cast<uint32_t>(__value / 100000000)),
                           static_cast<uint32_t>(__value % 100000000));
}

_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char*
__base_10_u32(char* __first, uint32_t __value) noexcept {
  if (__value < 1000000) {
    if (__value < 10000) {
      if (__value < 100) {
        // 0 <= __value < 100
        if (__value < 10)
          return __itoa::__append1(__first, __value);
        return __itoa::__append2(__first, __value);
      }
      // 100 <= __value < 10'000
      if (__value < 1000)
        return __itoa::__append3(__first, __value);
      return __itoa::__append4(__first, __value);
    }

    // 10'000 <= __value < 1'000'000
    if (__value < 100000)
      return __itoa::__append5(__first, __value);
    return __itoa::__append6(__first, __value);
  }

  // __value => 1'000'000
  if (__value < 100000000) {
    // 1'000'000 <= __value < 100'000'000
    if (__value < 10000000)
      return __itoa::__append7(__first, __value);
    return __itoa::__append8(__first, __value);
  }

  // 100'000'000 <= __value < max
  if (__value < 1000000000)
    return __itoa::__append9(__first, __value);
  return __itoa::__append10(__first, __value);
}

_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char*
__base_10_u64(char* __buffer, uint64_t __value) noexcept {
  if (__value <= UINT32_MAX)
    return __itoa::__base_10_u32(__buffer, static_cast<uint32_t>(__value));

  // Numbers in the range UINT32_MAX <= val < 10'000'000'000 always contain 10
  // digits and are outputted after this if statement.
  if (__value >= 10000000000) {
    // This function properly deterimines the first non-zero leading digit.
    __buffer = __itoa::__base_10_u32(__buffer, static_cast<uint32_t>(__value / 10000000000));
    __value %= 10000000000;
  }
  return __itoa::__append10(__buffer, __value);
}

#  ifndef _LIBCPP_HAS_NO_INT128
/// \returns 10^\a exp
///
/// \pre \a exp [19, 39]
///
/// \note The lookup table contains a partial set of exponents limiting the
/// range that can be used. However the range is sufficient for
/// \ref __base_10_u128.
_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline __uint128_t __pow_10(int __exp) noexcept {
  _LIBCPP_ASSERT_UNCATEGORIZED(__exp >= __pow10_128_offset, "Index out of bounds");
  return __pow10_128[__exp - __pow10_128_offset];
}

_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char*
__base_10_u128(char* __buffer, __uint128_t __value) noexcept {
  _LIBCPP_ASSERT_UNCATEGORIZED(
      __value > numeric_limits<uint64_t>::max(), "The optimizations for this algorithm fail when this isn't true.");

  // Unlike the 64 to 32 bit case the 128 bit case the "upper half" can't be
  // stored in the "lower half". Instead we first need to handle the top most
  // digits separately.
  //
  // Maximum unsigned values
  // 64  bit                             18'446'744'073'709'551'615 (20 digits)
  // 128 bit    340'282'366'920'938'463'463'374'607'431'768'211'455 (39 digits)
  // step 1     ^                                                   ([0-1] digits)
  // step 2      ^^^^^^^^^^^^^^^^^^^^^^^^^                          ([0-19] digits)
  // step 3                               ^^^^^^^^^^^^^^^^^^^^^^^^^ (19 digits)
  if (__value >= __itoa::__pow_10(38)) {
    // step 1
    __buffer = __itoa::__append1(__buffer, static_cast<uint32_t>(__value / __itoa::__pow_10(38)));
    __value %= __itoa::__pow_10(38);

    // step 2 always 19 digits.
    // They are handled here since leading zeros need to be appended to the buffer,
    __buffer = __itoa::__append9(__buffer, static_cast<uint32_t>(__value / __itoa::__pow_10(29)));
    __value %= __itoa::__pow_10(29);
    __buffer = __itoa::__append10(__buffer, static_cast<uint64_t>(__value / __itoa::__pow_10(19)));
    __value %= __itoa::__pow_10(19);
  } else {
    // step 2
    // This version needs to determine the position of the leading non-zero digit.
    __buffer = __base_10_u64(__buffer, static_cast<uint64_t>(__value / __itoa::__pow_10(19)));
    __value %= __itoa::__pow_10(19);
  }

  // Step 3
  __buffer = __itoa::__append9(__buffer, static_cast<uint32_t>(__value / 10000000000));
  __buffer = __itoa::__append10(__buffer, static_cast<uint64_t>(__value % 10000000000));

  return __buffer;
}
#  endif
# 179 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3
} // namespace __itoa

#endif // _LIBCPP_STD_VER >= 17
# 182 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___CHARCONV_TO_CHARS_BASE_10_H
# 188 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_base_10.h" 3
#endif /* to_chars_base_10.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* to_chars_result.h expanded by -frewrite-includes */
#include <__charconv/to_chars_result.h>
#else /* to_chars_result.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_result.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CHARCONV_TO_CHARS_RESULT_H
#define _LIBCPP___CHARCONV_TO_CHARS_RESULT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_result.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__system_error/errc.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_result.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_result.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_result.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_result.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_result.h" 3

struct _LIBCPP_EXPORTED_FROM_ABI to_chars_result {
  char* ptr;
  errc ec;
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_result.h" 3
  _LIBCPP_HIDE_FROM_ABI friend bool operator==(const to_chars_result&, const to_chars_result&) = default;
#  endif
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_result.h" 3
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 26
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_result.h" 3
  _LIBCPP_HIDE_FROM_ABI constexpr explicit operator bool() const noexcept { return ec == errc{}; }
#  endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_result.h" 3
};

#endif // _LIBCPP_STD_VER >= 17
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_result.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CHARCONV_TO_CHARS_RESULT_H
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_result.h" 3
#endif /* to_chars_result.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* traits.h expanded by -frewrite-includes */
#include <__charconv/traits.h>
#else /* traits.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CHARCONV_TRAITS
#define _LIBCPP___CHARCONV_TRAITS

#if 0 /* expanded by -frewrite-includes */
#include <__bit/countl.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__charconv/tables.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__charconv/to_chars_base_10.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3

namespace __itoa {

template <typename _Tp, typename = void>
struct _LIBCPP_HIDDEN __traits_base;

template <typename _Tp>
struct _LIBCPP_HIDDEN __traits_base<_Tp, __enable_if_t<sizeof(_Tp) <= sizeof(uint32_t)>> {
  using type = uint32_t;

  /// The width estimation using a log10 algorithm.
  ///
  /// The algorithm is based on
  /// http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10
  /// Instead of using IntegerLogBase2 it uses __libcpp_clz. Since that
  /// function requires its input to have at least one bit set the value of
  /// zero is set to one. This means the first element of the lookup table is
  /// zero.
  static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI int __width(_Tp __v) {
    auto __t = (32 - std::__libcpp_clz(static_cast<type>(__v | 1))) * 1233 >> 12;
    return __t - (__v < __itoa::__pow10_32[__t]) + 1;
  }

  static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI char* __convert(char* __p, _Tp __v) {
    return __itoa::__base_10_u32(__p, __v);
  }

  static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI decltype(__pow10_32)& __pow() {
    return __itoa::__pow10_32;
  }
};

template <typename _Tp>
struct _LIBCPP_HIDDEN __traits_base<_Tp, __enable_if_t<sizeof(_Tp) == sizeof(uint64_t)>> {
  using type = uint64_t;

  /// The width estimation using a log10 algorithm.
  ///
  /// The algorithm is based on
  /// http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10
  /// Instead of using IntegerLogBase2 it uses __libcpp_clz. Since that
  /// function requires its input to have at least one bit set the value of
  /// zero is set to one. This means the first element of the lookup table is
  /// zero.
  static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI int __width(_Tp __v) {
    auto __t = (64 - std::__libcpp_clz(static_cast<type>(__v | 1))) * 1233 >> 12;
    return __t - (__v < __itoa::__pow10_64[__t]) + 1;
  }

  static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI char* __convert(char* __p, _Tp __v) {
    return __itoa::__base_10_u64(__p, __v);
  }

  static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI decltype(__pow10_64)& __pow() {
    return __itoa::__pow10_64;
  }
};

#  ifndef _LIBCPP_HAS_NO_INT128
template <typename _Tp>
struct _LIBCPP_HIDDEN __traits_base<_Tp, __enable_if_t<sizeof(_Tp) == sizeof(__uint128_t)> > {
  using type = __uint128_t;

  /// The width estimation using a log10 algorithm.
  ///
  /// The algorithm is based on
  /// http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10
  /// Instead of using IntegerLogBase2 it uses __libcpp_clz. Since that
  /// function requires its input to have at least one bit set the value of
  /// zero is set to one. This means the first element of the lookup table is
  /// zero.
  static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI int __width(_Tp __v) {
    _LIBCPP_ASSERT_UNCATEGORIZED(
        __v > numeric_limits<uint64_t>::max(), "The optimizations for this algorithm fail when this isn't true.");
    // There's always a bit set in the upper 64-bits.
    auto __t = (128 - std::__libcpp_clz(static_cast<uint64_t>(__v >> 64))) * 1233 >> 12;
    _LIBCPP_ASSERT_UNCATEGORIZED(__t >= __itoa::__pow10_128_offset, "Index out of bounds");
    // __t is adjusted since the lookup table misses the lower entries.
    return __t - (__v < __itoa::__pow10_128[__t - __itoa::__pow10_128_offset]) + 1;
  }

  static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI char* __convert(char* __p, _Tp __v) {
    return __itoa::__base_10_u128(__p, __v);
  }

  // TODO FMT This pow function should get an index.
  // By moving this to its own header it can be reused by the pow function in to_chars_base_10.
  static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI decltype(__pow10_128)& __pow() {
    return __itoa::__pow10_128;
  }
};
#  endif
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3

template <typename _Tp>
inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool
__mul_overflowed(unsigned char __a, _Tp __b, unsigned char& __r) {
  auto __c = __a * __b;
  __r      = __c;
  return __c > numeric_limits<unsigned char>::max();
}

template <typename _Tp>
inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool
__mul_overflowed(unsigned short __a, _Tp __b, unsigned short& __r) {
  auto __c = __a * __b;
  __r      = __c;
  return __c > numeric_limits<unsigned short>::max();
}

template <typename _Tp>
inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool __mul_overflowed(_Tp __a, _Tp __b, _Tp& __r) {
  static_assert(is_unsigned<_Tp>::value, "");
  return __builtin_mul_overflow(__a, __b, &__r);
}

template <typename _Tp, typename _Up>
inline _LIBCPP_HIDE_FROM_ABI bool _LIBCPP_CONSTEXPR_SINCE_CXX23 __mul_overflowed(_Tp __a, _Up __b, _Tp& __r) {
  return __itoa::__mul_overflowed(__a, static_cast<_Tp>(__b), __r);
}

template <typename _Tp>
struct _LIBCPP_HIDDEN __traits : __traits_base<_Tp> {
  static constexpr int digits = numeric_limits<_Tp>::digits10 + 1;
  using __traits_base<_Tp>::__pow;
  using typename __traits_base<_Tp>::type;

  // precondition: at least one non-zero character available
  static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI char const*
  __read(char const* __p, char const* __ep, type& __a, type& __b) {
    type __cprod[digits];
    int __j = digits - 1;
    int __i = digits;
    do {
      if (*__p < '0' || *__p > '9')
        break;
      __cprod[--__i] = *__p++ - '0';
    } while (__p != __ep && __i != 0);

    __a = __inner_product(__cprod + __i + 1, __cprod + __j, __pow() + 1, __cprod[__i]);
    if (__itoa::__mul_overflowed(__cprod[__j], __pow()[__j - __i], __b))
      --__p;
    return __p;
  }

  template <typename _It1, typename _It2, class _Up>
  static _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI _Up
  __inner_product(_It1 __first1, _It1 __last1, _It2 __first2, _Up __init) {
    for (; __first1 < __last1; ++__first1, ++__first2)
      __init = __init + *__first1 * *__first2;
    return __init;
  }
};

} // namespace __itoa

template <typename _Tp>
inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI _Tp __complement(_Tp __x) {
  static_assert(is_unsigned<_Tp>::value, "cast to unsigned first");
  return _Tp(~__x + 1);
}

#endif // _LIBCPP_STD_VER >= 17
# 194 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___CHARCONV_TRAITS
# 200 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/traits.h" 3
#endif /* traits.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__system_error/errc.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* make_32_64_or_128_bit.h expanded by -frewrite-includes */
#include <__type_traits/make_32_64_or_128_bit.h>
#else /* make_32_64_or_128_bit.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_MAKE_32_64_OR_128_BIT_H
#define _LIBCPP___TYPE_TRAITS_MAKE_32_64_OR_128_BIT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_signed.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

/// Helper to promote an integral to smallest 32, 64, or 128 bit representation.
///
/// The restriction is the same as the integral version of to_char.
template <class _Tp>
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
  requires(is_signed_v<_Tp> || is_unsigned_v<_Tp> || is_same_v<_Tp, char>)
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
// clang-format off
using __make_32_64_or_128_bit_t =
    __copy_unsigned_t<_Tp,
        __conditional_t<sizeof(_Tp) <= sizeof(int32_t),    int32_t,
        __conditional_t<sizeof(_Tp) <= sizeof(int64_t),    int64_t,
#ifndef _LIBCPP_HAS_NO_INT128
        __conditional_t<sizeof(_Tp) <= sizeof(__int128_t), __int128_t,
        /* else */                                         void>
#else
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
        /* else */                                         void
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
    > > >;
// clang-format on

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_MAKE_32_64_OR_128_BIT_H
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/make_32_64_or_128_bit.h" 3
#endif /* make_32_64_or_128_bit.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/unreachable.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3

to_chars_result to_chars(char*, char*, bool, int = 10) = delete;

template <typename _Tp>
inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_itoa(char* __first, char* __last, _Tp __value, false_type);

template <typename _Tp>
inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_itoa(char* __first, char* __last, _Tp __value, true_type) {
  auto __x = std::__to_unsigned_like(__value);
  if (__value < 0 && __first != __last) {
    *__first++ = '-';
    __x        = std::__complement(__x);
  }

  return std::__to_chars_itoa(__first, __last, __x, false_type());
}

template <typename _Tp>
inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_itoa(char* __first, char* __last, _Tp __value, false_type) {
  using __tx  = __itoa::__traits<_Tp>;
  auto __diff = __last - __first;

  if (__tx::digits <= __diff || __tx::__width(__value) <= __diff)
    return {__tx::__convert(__first, __value), errc(0)};
  else
    return {__last, errc::value_too_large};
}

#  ifndef _LIBCPP_HAS_NO_INT128
template <>
inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_itoa(char* __first, char* __last, __uint128_t __value, false_type) {
  // When the value fits in 64-bits use the 64-bit code path. This reduces
  // the number of expensive calculations on 128-bit values.
  //
  // NOTE the 128-bit code path requires this optimization.
  if (__value <= numeric_limits<uint64_t>::max())
    return __to_chars_itoa(__first, __last, static_cast<uint64_t>(__value), false_type());

  using __tx  = __itoa::__traits<__uint128_t>;
  auto __diff = __last - __first;

  if (__tx::digits <= __diff || __tx::__width(__value) <= __diff)
    return {__tx::__convert(__first, __value), errc(0)};
  else
    return {__last, errc::value_too_large};
}
#  endif
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3

template <class _Tp>
inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_integral(char* __first, char* __last, _Tp __value, int __base, false_type);

template <typename _Tp>
inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_integral(char* __first, char* __last, _Tp __value, int __base, true_type) {
  auto __x = std::__to_unsigned_like(__value);
  if (__value < 0 && __first != __last) {
    *__first++ = '-';
    __x        = std::__complement(__x);
  }

  return std::__to_chars_integral(__first, __last, __x, __base, false_type());
}

namespace __itoa {

template <unsigned _Base>
struct _LIBCPP_HIDDEN __integral;

template <>
struct _LIBCPP_HIDDEN __integral<2> {
  template <typename _Tp>
  _LIBCPP_HIDE_FROM_ABI static constexpr int __width(_Tp __value) noexcept {
    // If value == 0 still need one digit. If the value != this has no
    // effect since the code scans for the most significant bit set. (Note
    // that __libcpp_clz doesn't work for 0.)
    return numeric_limits<_Tp>::digits - std::__libcpp_clz(__value | 1);
  }

  template <typename _Tp>
  _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI static to_chars_result
  __to_chars(char* __first, char* __last, _Tp __value) {
    ptrdiff_t __cap = __last - __first;
    int __n         = __width(__value);
    if (__n > __cap)
      return {__last, errc::value_too_large};

    __last                   = __first + __n;
    char* __p                = __last;
    const unsigned __divisor = 16;
    while (__value > __divisor) {
      unsigned __c = __value % __divisor;
      __value /= __divisor;
      __p -= 4;
      std::copy_n(&__base_2_lut[4 * __c], 4, __p);
    }
    do {
      unsigned __c = __value % 2;
      __value /= 2;
      *--__p = "01"[__c];
    } while (__value != 0);
    return {__last, errc(0)};
  }
};

template <>
struct _LIBCPP_HIDDEN __integral<8> {
  template <typename _Tp>
  _LIBCPP_HIDE_FROM_ABI static constexpr int __width(_Tp __value) noexcept {
    // If value == 0 still need one digit. If the value != this has no
    // effect since the code scans for the most significat bit set. (Note
    // that __libcpp_clz doesn't work for 0.)
    return ((numeric_limits<_Tp>::digits - std::__libcpp_clz(__value | 1)) + 2) / 3;
  }

  template <typename _Tp>
  _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI static to_chars_result
  __to_chars(char* __first, char* __last, _Tp __value) {
    ptrdiff_t __cap = __last - __first;
    int __n         = __width(__value);
    if (__n > __cap)
      return {__last, errc::value_too_large};

    __last             = __first + __n;
    char* __p          = __last;
    unsigned __divisor = 64;
    while (__value > __divisor) {
      unsigned __c = __value % __divisor;
      __value /= __divisor;
      __p -= 2;
      std::copy_n(&__base_8_lut[2 * __c], 2, __p);
    }
    do {
      unsigned __c = __value % 8;
      __value /= 8;
      *--__p = "01234567"[__c];
    } while (__value != 0);
    return {__last, errc(0)};
  }
};

template <>
struct _LIBCPP_HIDDEN __integral<16> {
  template <typename _Tp>
  _LIBCPP_HIDE_FROM_ABI static constexpr int __width(_Tp __value) noexcept {
    // If value == 0 still need one digit. If the value != this has no
    // effect since the code scans for the most significat bit set. (Note
    // that __libcpp_clz doesn't work for 0.)
    return (numeric_limits<_Tp>::digits - std::__libcpp_clz(__value | 1) + 3) / 4;
  }

  template <typename _Tp>
  _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI static to_chars_result
  __to_chars(char* __first, char* __last, _Tp __value) {
    ptrdiff_t __cap = __last - __first;
    int __n         = __width(__value);
    if (__n > __cap)
      return {__last, errc::value_too_large};

    __last             = __first + __n;
    char* __p          = __last;
    unsigned __divisor = 256;
    while (__value > __divisor) {
      unsigned __c = __value % __divisor;
      __value /= __divisor;
      __p -= 2;
      std::copy_n(&__base_16_lut[2 * __c], 2, __p);
    }
    if (__first != __last)
      do {
        unsigned __c = __value % 16;
        __value /= 16;
        *--__p = "0123456789abcdef"[__c];
      } while (__value != 0);
    return {__last, errc(0)};
  }
};

} // namespace __itoa

template <unsigned _Base, typename _Tp, __enable_if_t<(sizeof(_Tp) >= sizeof(unsigned)), int> = 0>
_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI int __to_chars_integral_width(_Tp __value) {
  return __itoa::__integral<_Base>::__width(__value);
}

template <unsigned _Base, typename _Tp, __enable_if_t<(sizeof(_Tp) < sizeof(unsigned)), int> = 0>
_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI int __to_chars_integral_width(_Tp __value) {
  return std::__to_chars_integral_width<_Base>(static_cast<unsigned>(__value));
}

template <unsigned _Base, typename _Tp, __enable_if_t<(sizeof(_Tp) >= sizeof(unsigned)), int> = 0>
_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_integral(char* __first, char* __last, _Tp __value) {
  return __itoa::__integral<_Base>::__to_chars(__first, __last, __value);
}

template <unsigned _Base, typename _Tp, __enable_if_t<(sizeof(_Tp) < sizeof(unsigned)), int> = 0>
_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_integral(char* __first, char* __last, _Tp __value) {
  return std::__to_chars_integral<_Base>(__first, __last, static_cast<unsigned>(__value));
}

template <typename _Tp>
_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI int __to_chars_integral_width(_Tp __value, unsigned __base) {
  _LIBCPP_ASSERT_UNCATEGORIZED(__value >= 0, "The function requires a non-negative value.");

  unsigned __base_2 = __base * __base;
  unsigned __base_3 = __base_2 * __base;
  unsigned __base_4 = __base_2 * __base_2;

  int __r = 0;
  while (true) {
    if (__value < __base)
      return __r + 1;
    if (__value < __base_2)
      return __r + 2;
    if (__value < __base_3)
      return __r + 3;
    if (__value < __base_4)
      return __r + 4;

    __value /= __base_4;
    __r += 4;
  }

  __libcpp_unreachable();
}

template <typename _Tp>
inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_integral(char* __first, char* __last, _Tp __value, int __base, false_type) {
  if (__base == 10) [[likely]]
    return std::__to_chars_itoa(__first, __last, __value, false_type());

  switch (__base) {
  case 2:
    return std::__to_chars_integral<2>(__first, __last, __value);
  case 8:
    return std::__to_chars_integral<8>(__first, __last, __value);
  case 16:
    return std::__to_chars_integral<16>(__first, __last, __value);
  }

  ptrdiff_t __cap = __last - __first;
  int __n         = std::__to_chars_integral_width(__value, __base);
  if (__n > __cap)
    return {__last, errc::value_too_large};

  __last    = __first + __n;
  char* __p = __last;
  do {
    unsigned __c = __value % __base;
    __value /= __base;
    *--__p = "0123456789abcdefghijklmnopqrstuvwxyz"[__c];
  } while (__value != 0);
  return {__last, errc(0)};
}

template <typename _Tp, __enable_if_t<is_integral<_Tp>::value, int> = 0>
inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
to_chars(char* __first, char* __last, _Tp __value) {
  using _Type = __make_32_64_or_128_bit_t<_Tp>;
  static_assert(!is_same<_Type, void>::value, "unsupported integral type used in to_chars");
  return std::__to_chars_itoa(__first, __last, static_cast<_Type>(__value), is_signed<_Tp>());
}

template <typename _Tp, __enable_if_t<is_integral<_Tp>::value, int> = 0>
inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI to_chars_result
to_chars(char* __first, char* __last, _Tp __value, int __base) {
  _LIBCPP_ASSERT_UNCATEGORIZED(2 <= __base && __base <= 36, "base not in [2, 36]");

  using _Type = __make_32_64_or_128_bit_t<_Tp>;
  return std::__to_chars_integral(__first, __last, static_cast<_Type>(__value), __base, is_signed<_Tp>());
}

#endif // _LIBCPP_STD_VER >= 17
# 321 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___CHARCONV_TO_CHARS_INTEGRAL_H
# 327 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__charconv/to_chars_integral.h" 3
#endif /* to_chars_integral.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__charconv/to_chars_result.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__charconv/traits.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/concepts.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/format_error.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* formatter_output.h expanded by -frewrite-includes */
#include <__format/formatter_output.h>
#else /* formatter_output.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FORMAT_FORMATTER_OUTPUT_H
#define _LIBCPP___FORMAT_FORMATTER_OUTPUT_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_copy.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_fill_n.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_transform.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/countl.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* buffer.h expanded by -frewrite-includes */
#include <__format/buffer.h>
#else /* buffer.h expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FORMAT_BUFFER_H
#define _LIBCPP___FORMAT_BUFFER_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy_n.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/fill_n.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/max.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_copy_n.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/transform.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/unwrap_iter.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/concepts.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/enable_insertable.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* format_to_n_result.h expanded by -frewrite-includes */
#include <__format/format_to_n_result.h>
#else /* format_to_n_result.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_to_n_result.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FORMAT_FORMAT_TO_N_RESULT_H
#define _LIBCPP___FORMAT_FORMAT_TO_N_RESULT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_to_n_result.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_to_n_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_to_n_result.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_to_n_result.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_to_n_result.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_to_n_result.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_to_n_result.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_to_n_result.h" 3

template <class _OutIt>
struct _LIBCPP_TEMPLATE_VIS format_to_n_result {
  _OutIt out;
  iter_difference_t<_OutIt> size;
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(format_to_n_result);

#endif //_LIBCPP_STD_VER >= 20
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_to_n_result.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FORMAT_FORMAT_TO_N_RESULT_H
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_to_n_result.h" 3
#endif /* format_to_n_result.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/back_insert_iterator.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/incrementable_traits.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/wrap_iter.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocate_at_least.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/construct_at.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/ranges_construct_at.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/uninitialized_algorithms.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_pointer.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/exception_guard.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <string_view>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#endif
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3

namespace __format {

/// A "buffer" that handles writing to the proper iterator.
///
/// This helper is used together with the @ref back_insert_iterator to offer
/// type-erasure for the formatting functions. This reduces the number to
/// template instantiations.
template <__fmt_char_type _CharT>
class _LIBCPP_TEMPLATE_VIS __output_buffer {
public:
  using value_type = _CharT;

  template <class _Tp>
  _LIBCPP_HIDE_FROM_ABI explicit __output_buffer(_CharT* __ptr, size_t __capacity, _Tp* __obj)
      : __ptr_(__ptr),
        __capacity_(__capacity),
        __flush_([](_CharT* __p, size_t __n, void* __o) { static_cast<_Tp*>(__o)->__flush(__p, __n); }),
        __obj_(__obj) {}

  _LIBCPP_HIDE_FROM_ABI void __reset(_CharT* __ptr, size_t __capacity) {
    __ptr_ = __ptr;
    __capacity_ = __capacity;
  }

  _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return std::back_insert_iterator{*this}; }

  // Used in std::back_insert_iterator.
  _LIBCPP_HIDE_FROM_ABI void push_back(_CharT __c) {
    __ptr_[__size_++] = __c;

    // Profiling showed flushing after adding is more efficient than flushing
    // when entering the function.
    if (__size_ == __capacity_)
      __flush();
  }

  /// Copies the input __str to the buffer.
  ///
  /// Since some of the input is generated by std::to_chars, there needs to be a
  /// conversion when _CharT is wchar_t.
  template <__fmt_char_type _InCharT>
  _LIBCPP_HIDE_FROM_ABI void __copy(basic_string_view<_InCharT> __str) {
    // When the underlying iterator is a simple iterator the __capacity_ is
    // infinite. For a string or container back_inserter it isn't. This means
    // that adding a large string to the buffer can cause some overhead. In that
    // case a better approach could be:
    // - flush the buffer
    // - container.append(__str.begin(), __str.end());
    // The same holds true for the fill.
    // For transform it might be slightly harder, however the use case for
    // transform is slightly less common; it converts hexadecimal values to
    // upper case. For integral these strings are short.
    // TODO FMT Look at the improvements above.
    size_t __n = __str.size();

    __flush_on_overflow(__n);
    if (__n < __capacity_) { //  push_back requires the buffer to have room for at least one character (so use <).
      _VSTD::copy_n(__str.data(), __n, _VSTD::addressof(__ptr_[__size_]));
      __size_ += __n;
      return;
    }

    // The output doesn't fit in the internal buffer.
    // Copy the data in "__capacity_" sized chunks.
    _LIBCPP_ASSERT_UNCATEGORIZED(__size_ == 0, "the buffer should be flushed by __flush_on_overflow");
    const _InCharT* __first = __str.data();
    do {
      size_t __chunk = _VSTD::min(__n, __capacity_);
      _VSTD::copy_n(__first, __chunk, _VSTD::addressof(__ptr_[__size_]));
      __size_ = __chunk;
      __first += __chunk;
      __n -= __chunk;
      __flush();
    } while (__n);
  }

  /// A std::transform wrapper.
  ///
  /// Like @ref __copy it may need to do type conversion.
  template <__fmt_char_type _InCharT, class _UnaryOperation>
  _LIBCPP_HIDE_FROM_ABI void __transform(const _InCharT* __first, const _InCharT* __last, _UnaryOperation __operation) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__first <= __last, "not a valid range");

    size_t __n = static_cast<size_t>(__last - __first);
    __flush_on_overflow(__n);
    if (__n < __capacity_) { //  push_back requires the buffer to have room for at least one character (so use <).
      _VSTD::transform(__first, __last, _VSTD::addressof(__ptr_[__size_]), _VSTD::move(__operation));
      __size_ += __n;
      return;
    }

    // The output doesn't fit in the internal buffer.
    // Transform the data in "__capacity_" sized chunks.
    _LIBCPP_ASSERT_UNCATEGORIZED(__size_ == 0, "the buffer should be flushed by __flush_on_overflow");
    do {
      size_t __chunk = _VSTD::min(__n, __capacity_);
      _VSTD::transform(__first, __first + __chunk, _VSTD::addressof(__ptr_[__size_]), __operation);
      __size_ = __chunk;
      __first += __chunk;
      __n -= __chunk;
      __flush();
    } while (__n);
  }

  /// A \c fill_n wrapper.
  _LIBCPP_HIDE_FROM_ABI void __fill(size_t __n, _CharT __value) {
    __flush_on_overflow(__n);
    if (__n < __capacity_) { //  push_back requires the buffer to have room for at least one character (so use <).
      _VSTD::fill_n(_VSTD::addressof(__ptr_[__size_]), __n, __value);
      __size_ += __n;
      return;
    }

    // The output doesn't fit in the internal buffer.
    // Fill the buffer in "__capacity_" sized chunks.
    _LIBCPP_ASSERT_UNCATEGORIZED(__size_ == 0, "the buffer should be flushed by __flush_on_overflow");
    do {
      size_t __chunk = _VSTD::min(__n, __capacity_);
      _VSTD::fill_n(_VSTD::addressof(__ptr_[__size_]), __chunk, __value);
      __size_ = __chunk;
      __n -= __chunk;
      __flush();
    } while (__n);
  }

  _LIBCPP_HIDE_FROM_ABI void __flush() {
    __flush_(__ptr_, __size_, __obj_);
    __size_ = 0;
  }

private:
  _CharT* __ptr_;
  size_t __capacity_;
  size_t __size_{0};
  void (*__flush_)(_CharT*, size_t, void*);
  void* __obj_;

  /// Flushes the buffer when the output operation would overflow the buffer.
  ///
  /// A simple approach for the overflow detection would be something along the
  /// lines:
  /// \code
  /// // The internal buffer is large enough.
  /// if (__n <= __capacity_) {
  ///   // Flush when we really would overflow.
  ///   if (__size_ + __n >= __capacity_)
  ///     __flush();
  ///   ...
  /// }
  /// \endcode
  ///
  /// This approach works for all cases but one:
  /// A __format_to_n_buffer_base where \ref __enable_direct_output is true.
  /// In that case the \ref __capacity_ of the buffer changes during the first
  /// \ref __flush. During that operation the output buffer switches from its
  /// __writer_ to its __storage_. The \ref __capacity_ of the former depends
  /// on the value of n, of the latter is a fixed size. For example:
  /// - a format_to_n call with a 10'000 char buffer,
  /// - the buffer is filled with 9'500 chars,
  /// - adding 1'000 elements would overflow the buffer so the buffer gets
  ///   changed and the \ref __capacity_ decreases from 10'000 to
  ///   __buffer_size (256 at the time of writing).
  ///
  /// This means that the \ref __flush for this class may need to copy a part of
  /// the internal buffer to the proper output. In this example there will be
  /// 500 characters that need this copy operation.
  ///
  /// Note it would be more efficient to write 500 chars directly and then swap
  /// the buffers. This would make the code more complex and \ref format_to_n is
  /// not the most common use case. Therefore the optimization isn't done.
  _LIBCPP_HIDE_FROM_ABI void __flush_on_overflow(size_t __n) {
    if (__size_ + __n >= __capacity_)
      __flush();
  }
};

/// A storage using an internal buffer.
///
/// This storage is used when writing a single element to the output iterator
/// is expensive.
template <__fmt_char_type _CharT>
class _LIBCPP_TEMPLATE_VIS __internal_storage {
public:
  _LIBCPP_HIDE_FROM_ABI _CharT* __begin() { return __buffer_; }

  static constexpr size_t __buffer_size = 256 / sizeof(_CharT);

private:
  _CharT __buffer_[__buffer_size];
};

/// A storage writing directly to the storage.
///
/// This requires the storage to be a contiguous buffer of \a _CharT.
/// Since the output is directly written to the underlying storage this class
/// is just an empty class.
template <__fmt_char_type _CharT>
class _LIBCPP_TEMPLATE_VIS __direct_storage {};

template <class _OutIt, class _CharT>
concept __enable_direct_output = __fmt_char_type<_CharT> &&
    (same_as<_OutIt, _CharT*>
     // TODO(hardening): the following check might not apply to hardened iterators and might need to be wrapped in an
     // `#ifdef`.
     || same_as<_OutIt, __wrap_iter<_CharT*>>
    );

/// Write policy for directly writing to the underlying output.
template <class _OutIt, __fmt_char_type _CharT>
class _LIBCPP_TEMPLATE_VIS __writer_direct {
public:
  _LIBCPP_HIDE_FROM_ABI explicit __writer_direct(_OutIt __out_it)
      : __out_it_(__out_it) {}

  _LIBCPP_HIDE_FROM_ABI _OutIt __out_it() { return __out_it_; }

  _LIBCPP_HIDE_FROM_ABI void __flush(_CharT*, size_t __n) {
    // _OutIt can be a __wrap_iter<CharT*>. Therefore the original iterator
    // is adjusted.
    __out_it_ += __n;
  }

private:
  _OutIt __out_it_;
};

/// Write policy for copying the buffer to the output.
template <class _OutIt, __fmt_char_type _CharT>
class _LIBCPP_TEMPLATE_VIS __writer_iterator {
public:
  _LIBCPP_HIDE_FROM_ABI explicit __writer_iterator(_OutIt __out_it)
      : __out_it_{_VSTD::move(__out_it)} {}

  _LIBCPP_HIDE_FROM_ABI _OutIt __out_it() && { return std::move(__out_it_); }

  _LIBCPP_HIDE_FROM_ABI void __flush(_CharT* __ptr, size_t __n) {
    __out_it_ = std::ranges::copy_n(__ptr, __n, std::move(__out_it_)).out;
  }

private:
  _OutIt __out_it_;
};

/// Concept to see whether a \a _Container is insertable.
///
/// The concept is used to validate whether multiple calls to a
/// \ref back_insert_iterator can be replace by a call to \c _Container::insert.
///
/// \note a \a _Container needs to opt-in to the concept by specializing
/// \ref __enable_insertable.
template <class _Container>
concept __insertable =
    __enable_insertable<_Container> && __fmt_char_type<typename _Container::value_type> &&
    requires(_Container& __t, add_pointer_t<typename _Container::value_type> __first,
             add_pointer_t<typename _Container::value_type> __last) { __t.insert(__t.end(), __first, __last); };

/// Extract the container type of a \ref back_insert_iterator.
template <class _It>
struct _LIBCPP_TEMPLATE_VIS __back_insert_iterator_container {
  using type = void;
};

template <__insertable _Container>
struct _LIBCPP_TEMPLATE_VIS __back_insert_iterator_container<back_insert_iterator<_Container>> {
  using type = _Container;
};

/// Write policy for inserting the buffer in a container.
template <class _Container>
class _LIBCPP_TEMPLATE_VIS __writer_container {
public:
  using _CharT = typename _Container::value_type;

  _LIBCPP_HIDE_FROM_ABI explicit __writer_container(back_insert_iterator<_Container> __out_it)
      : __container_{__out_it.__get_container()} {}

  _LIBCPP_HIDE_FROM_ABI auto __out_it() { return std::back_inserter(*__container_); }

  _LIBCPP_HIDE_FROM_ABI void __flush(_CharT* __ptr, size_t __n) {
    __container_->insert(__container_->end(), __ptr, __ptr + __n);
  }

private:
  _Container* __container_;
};

/// Selects the type of the writer used for the output iterator.
template <class _OutIt, class _CharT>
class _LIBCPP_TEMPLATE_VIS __writer_selector {
  using _Container = typename __back_insert_iterator_container<_OutIt>::type;

public:
  using type = conditional_t<!same_as<_Container, void>, __writer_container<_Container>,
                             conditional_t<__enable_direct_output<_OutIt, _CharT>, __writer_direct<_OutIt, _CharT>,
                                           __writer_iterator<_OutIt, _CharT>>>;
};

/// The generic formatting buffer.
template <class _OutIt, __fmt_char_type _CharT>
requires(output_iterator<_OutIt, const _CharT&>) class _LIBCPP_TEMPLATE_VIS
    __format_buffer {
  using _Storage =
      conditional_t<__enable_direct_output<_OutIt, _CharT>,
                    __direct_storage<_CharT>, __internal_storage<_CharT>>;

public:
  _LIBCPP_HIDE_FROM_ABI explicit __format_buffer(_OutIt __out_it)
    requires(same_as<_Storage, __internal_storage<_CharT>>)
      : __output_(__storage_.__begin(), __storage_.__buffer_size, this), __writer_(_VSTD::move(__out_it)) {}

  _LIBCPP_HIDE_FROM_ABI explicit __format_buffer(_OutIt __out_it) requires(
      same_as<_Storage, __direct_storage<_CharT>>)
      : __output_(_VSTD::__unwrap_iter(__out_it), size_t(-1), this),
        __writer_(_VSTD::move(__out_it)) {}

  _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return __output_.__make_output_iterator(); }

  _LIBCPP_HIDE_FROM_ABI void __flush(_CharT* __ptr, size_t __n) { __writer_.__flush(__ptr, __n); }

  _LIBCPP_HIDE_FROM_ABI _OutIt __out_it() && {
    __output_.__flush();
    return _VSTD::move(__writer_).__out_it();
  }

private:
  _LIBCPP_NO_UNIQUE_ADDRESS _Storage __storage_;
  __output_buffer<_CharT> __output_;
  typename __writer_selector<_OutIt, _CharT>::type __writer_;
};

/// A buffer that counts the number of insertions.
///
/// Since \ref formatted_size only needs to know the size, the output itself is
/// discarded.
template <__fmt_char_type _CharT>
class _LIBCPP_TEMPLATE_VIS __formatted_size_buffer {
public:
  _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return __output_.__make_output_iterator(); }

  _LIBCPP_HIDE_FROM_ABI void __flush(const _CharT*, size_t __n) { __size_ += __n; }

  _LIBCPP_HIDE_FROM_ABI size_t __result() && {
    __output_.__flush();
    return __size_;
  }

private:
  __internal_storage<_CharT> __storage_;
  __output_buffer<_CharT> __output_{__storage_.__begin(), __storage_.__buffer_size, this};
  size_t __size_{0};
};

/// The base of a buffer that counts and limits the number of insertions.
template <class _OutIt, __fmt_char_type _CharT, bool>
  requires(output_iterator<_OutIt, const _CharT&>)
struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base {
  using _Size = iter_difference_t<_OutIt>;

public:
  _LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __max_size)
      : __writer_(_VSTD::move(__out_it)), __max_size_(_VSTD::max(_Size(0), __max_size)) {}

  _LIBCPP_HIDE_FROM_ABI void __flush(_CharT* __ptr, size_t __n) {
    if (_Size(__size_) <= __max_size_)
      __writer_.__flush(__ptr, _VSTD::min(_Size(__n), __max_size_ - __size_));
    __size_ += __n;
  }

protected:
  __internal_storage<_CharT> __storage_;
  __output_buffer<_CharT> __output_{__storage_.__begin(), __storage_.__buffer_size, this};
  typename __writer_selector<_OutIt, _CharT>::type __writer_;

  _Size __max_size_;
  _Size __size_{0};
};

/// The base of a buffer that counts and limits the number of insertions.
///
/// This version is used when \c __enable_direct_output<_OutIt, _CharT> == true.
///
/// This class limits the size available to the direct writer so it will not
/// exceed the maximum number of code units.
template <class _OutIt, __fmt_char_type _CharT>
  requires(output_iterator<_OutIt, const _CharT&>)
class _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base<_OutIt, _CharT, true> {
  using _Size = iter_difference_t<_OutIt>;

public:
  _LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __max_size)
      : __output_(_VSTD::__unwrap_iter(__out_it), __max_size, this),
        __writer_(_VSTD::move(__out_it)),
        __max_size_(__max_size) {
    if (__max_size <= 0) [[unlikely]]
      __output_.__reset(__storage_.__begin(), __storage_.__buffer_size);
  }

  _LIBCPP_HIDE_FROM_ABI void __flush(_CharT* __ptr, size_t __n) {
    // A __flush to the direct writer happens in the following occasions:
    // - The format function has written the maximum number of allowed code
    //   units. At this point it's no longer valid to write to this writer. So
    //   switch to the internal storage. This internal storage doesn't need to
    //   be written anywhere so the __flush for that storage writes no output.
    // - Like above, but the next "mass write" operation would overflow the
    //   buffer. In that case the buffer is pre-emptively switched. The still
    //   valid code units will be written separately.
    // - The format_to_n function is finished. In this case there's no need to
    //   switch the buffer, but for simplicity the buffers are still switched.
    // When the __max_size <= 0 the constructor already switched the buffers.
    if (__size_ == 0 && __ptr != __storage_.__begin()) {
      __writer_.__flush(__ptr, __n);
      __output_.__reset(__storage_.__begin(), __storage_.__buffer_size);
    } else if (__size_ < __max_size_) {
      // Copies a part of the internal buffer to the output up to n characters.
      // See __output_buffer<_CharT>::__flush_on_overflow for more information.
      _Size __s = _VSTD::min(_Size(__n), __max_size_ - __size_);
      std::copy_n(__ptr, __s, __writer_.__out_it());
      __writer_.__flush(__ptr, __s);
    }

    __size_ += __n;
  }

protected:
  __internal_storage<_CharT> __storage_;
  __output_buffer<_CharT> __output_;
  __writer_direct<_OutIt, _CharT> __writer_;

  _Size __max_size_;
  _Size __size_{0};
};

/// The buffer that counts and limits the number of insertions.
template <class _OutIt, __fmt_char_type _CharT>
  requires(output_iterator<_OutIt, const _CharT&>)
struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer final
    : public __format_to_n_buffer_base< _OutIt, _CharT, __enable_direct_output<_OutIt, _CharT>> {
  using _Base = __format_to_n_buffer_base<_OutIt, _CharT, __enable_direct_output<_OutIt, _CharT>>;
  using _Size = iter_difference_t<_OutIt>;

public:
  _LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer(_OutIt __out_it, _Size __max_size)
      : _Base(_VSTD::move(__out_it), __max_size) {}
  _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return this->__output_.__make_output_iterator(); }

  _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __result() && {
    this->__output_.__flush();
    return {_VSTD::move(this->__writer_).__out_it(), this->__size_};
  }
};

// A dynamically growing buffer intended to be used for retargeting a context.
//
// P2286 Formatting ranges adds range formatting support. It allows the user to
// specify the minimum width for the entire formatted range.  The width of the
// range is not known until the range is formatted. Formatting is done to an
// output_iterator so there's no guarantee it would be possible to add the fill
// to the front of the output. Instead the range is formatted to a temporary
// buffer and that buffer is formatted as a string.
//
// There is an issue with that approach, the format context used in
// std::formatter<T>::format contains the output iterator used as part of its
// type. So using this output iterator means there needs to be a new format
// context and the format arguments need to be retargeted to the new context.
// This retargeting is done by a basic_format_context specialized for the
// __iterator of this container.
//
// This class uses its own buffer management, since using vector
// would lead to a circular include with formatter for vector<bool>.
template <__fmt_char_type _CharT>
class _LIBCPP_TEMPLATE_VIS __retarget_buffer {
  using _Alloc = allocator<_CharT>;

public:
  using value_type = _CharT;

  struct __iterator {
    using difference_type = ptrdiff_t;
    using value_type      = _CharT;

    _LIBCPP_HIDE_FROM_ABI constexpr explicit __iterator(__retarget_buffer& __buffer)
        : __buffer_(std::addressof(__buffer)) {}
    _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator=(const _CharT& __c) {
      __buffer_->push_back(__c);
      return *this;
    }
    _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator=(_CharT&& __c) {
      __buffer_->push_back(__c);
      return *this;
    }

    _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator*() { return *this; }
    _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator++() { return *this; }
    _LIBCPP_HIDE_FROM_ABI constexpr __iterator operator++(int) { return *this; }
    __retarget_buffer* __buffer_;
  };

  __retarget_buffer(const __retarget_buffer&)            = delete;
  __retarget_buffer& operator=(const __retarget_buffer&) = delete;

  _LIBCPP_HIDE_FROM_ABI explicit __retarget_buffer(size_t __size_hint) {
    // When the initial size is very small a lot of resizes happen
    // when elements added. So use a hard-coded minimum size.
    //
    // Note a size < 2 will not work
    // - 0 there is no buffer, while push_back requires 1 empty element.
    // - 1 multiplied by the grow factor is 1 and thus the buffer never
    //   grows.
    auto __result = std::__allocate_at_least(__alloc_, std::max(__size_hint, 256 / sizeof(_CharT)));
    __ptr_        = __result.ptr;
    __capacity_   = __result.count;
  }

  _LIBCPP_HIDE_FROM_ABI ~__retarget_buffer() {
    ranges::destroy_n(__ptr_, __size_);
    allocator_traits<_Alloc>::deallocate(__alloc_, __ptr_, __capacity_);
  }

  _LIBCPP_HIDE_FROM_ABI __iterator __make_output_iterator() { return __iterator{*this}; }

  _LIBCPP_HIDE_FROM_ABI void push_back(_CharT __c) {
    std::construct_at(__ptr_ + __size_, __c);
    ++__size_;

    if (__size_ == __capacity_)
      __grow_buffer();
  }

  template <__fmt_char_type _InCharT>
  _LIBCPP_HIDE_FROM_ABI void __copy(basic_string_view<_InCharT> __str) {
    size_t __n = __str.size();
    if (__size_ + __n >= __capacity_)
      // Push_back requires the buffer to have room for at least one character.
      __grow_buffer(__size_ + __n + 1);

    std::uninitialized_copy_n(__str.data(), __n, __ptr_ + __size_);
    __size_ += __n;
  }

  template <__fmt_char_type _InCharT, class _UnaryOperation>
  _LIBCPP_HIDE_FROM_ABI void __transform(const _InCharT* __first, const _InCharT* __last, _UnaryOperation __operation) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__first <= __last, "not a valid range");

    size_t __n = static_cast<size_t>(__last - __first);
    if (__size_ + __n >= __capacity_)
      // Push_back requires the buffer to have room for at least one character.
      __grow_buffer(__size_ + __n + 1);

    std::uninitialized_default_construct_n(__ptr_ + __size_, __n);
    std::transform(__first, __last, __ptr_ + __size_, std::move(__operation));
    __size_ += __n;
  }

  _LIBCPP_HIDE_FROM_ABI void __fill(size_t __n, _CharT __value) {
    if (__size_ + __n >= __capacity_)
      // Push_back requires the buffer to have room for at least one character.
      __grow_buffer(__size_ + __n + 1);

    std::uninitialized_fill_n(__ptr_ + __size_, __n, __value);
    __size_ += __n;
  }

  _LIBCPP_HIDE_FROM_ABI basic_string_view<_CharT> __view() { return {__ptr_, __size_}; }

private:
  _LIBCPP_HIDE_FROM_ABI void __grow_buffer() { __grow_buffer(__capacity_ * 1.6); }

  _LIBCPP_HIDE_FROM_ABI void __grow_buffer(size_t __capacity) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__capacity > __capacity_, "the buffer must grow");
    auto __result = std::__allocate_at_least(__alloc_, __capacity);
    auto __guard  = std::__make_exception_guard([&] {
      allocator_traits<_Alloc>::deallocate(__alloc_, __result.ptr, __result.count);
    });
    // This shouldn't throw, but just to be safe. Note that at -O1 this
    // guard is optimized away so there is no runtime overhead.
    std::uninitialized_move_n(__ptr_, __size_, __result.ptr);
    __guard.__complete();
    ranges::destroy_n(__ptr_, __size_);
    allocator_traits<_Alloc>::deallocate(__alloc_, __ptr_, __capacity_);

    __ptr_      = __result.ptr;
    __capacity_ = __result.count;
  }
  _LIBCPP_NO_UNIQUE_ADDRESS _Alloc __alloc_;
  _CharT* __ptr_;
  size_t __capacity_;
  size_t __size_{0};
};

} // namespace __format

#endif //_LIBCPP_STD_VER >= 20
# 646 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___FORMAT_BUFFER_H
# 652 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/buffer.h" 3
#endif /* buffer.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/concepts.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/formatter.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* parser_std_format_spec.h expanded by -frewrite-includes */
#include <__format/parser_std_format_spec.h>
#else /* parser_std_format_spec.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FORMAT_PARSER_STD_FORMAT_SPEC_H
#define _LIBCPP___FORMAT_PARSER_STD_FORMAT_SPEC_H

/// \file Contains the std-format-spec parser.
///
/// Most of the code can be reused in the chrono-format-spec.
/// This header has some support for the chrono-format-spec since it doesn't
/// affect the std-format-spec.

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/copy_n.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* format_arg.h expanded by -frewrite-includes */
#include <__format/format_arg.h>
#else /* format_arg.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FORMAT_FORMAT_ARG_H
#define _LIBCPP___FORMAT_FORMAT_ARG_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/arithmetic.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/format_fwd.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/format_parse_context.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/unreachable.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__variant/monostate.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <string_view>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#endif
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3

namespace __format {
/// The type stored in @ref basic_format_arg.
///
/// @note The 128-bit types are unconditionally in the list to avoid the values
/// of the enums to depend on the availability of 128-bit integers.
///
/// @note The value is stored as a 5-bit value in the __packed_arg_t_bits. This
/// limits the maximum number of elements to 32.
/// When modifying update the test
/// test/libcxx/utilities/format/format.arguments/format.arg/arg_t.compile.pass.cpp
/// It could be packed in 4-bits but that means a new type directly becomes an
/// ABI break. The packed type is 64-bit so this reduces the maximum number of
/// packed elements from 16 to 12.
///
/// @note Some members of this enum are an extension. These extensions need
/// special behaviour in visit_format_arg. There they need to be wrapped in a
/// handle to satisfy the user observable behaviour. The internal function
/// __visit_format_arg doesn't do this wrapping. So in the format functions
/// this function is used to avoid unneeded overhead.
enum class __arg_t : uint8_t {
  __none,
  __boolean,
  __char_type,
  __int,
  __long_long,
  __i128, // extension
  __unsigned,
  __unsigned_long_long,
  __u128, // extension
  __float,
  __double,
  __long_double,
  __const_char_type_ptr,
  __string_view,
  __ptr,
  __handle
};

inline constexpr unsigned __packed_arg_t_bits = 5;
inline constexpr uint8_t __packed_arg_t_mask = 0x1f;

inline constexpr unsigned __packed_types_storage_bits = 64;
inline constexpr unsigned __packed_types_max = __packed_types_storage_bits / __packed_arg_t_bits;

_LIBCPP_HIDE_FROM_ABI
constexpr bool __use_packed_format_arg_store(size_t __size) { return __size <= __packed_types_max; }

_LIBCPP_HIDE_FROM_ABI
constexpr __arg_t __get_packed_type(uint64_t __types, size_t __id) {
  _LIBCPP_ASSERT_UNCATEGORIZED(__id <= __packed_types_max, "");

  if (__id > 0)
    __types >>= __id * __packed_arg_t_bits;

  return static_cast<__format::__arg_t>(__types & __packed_arg_t_mask);
}

} // namespace __format

// This function is not user obervable, so it can directly use the non-standard
// types of the "variant". See __arg_t for more details.
template <class _Visitor, class _Context>
_LIBCPP_HIDE_FROM_ABI decltype(auto)
__visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
  switch (__arg.__type_) {
  case __format::__arg_t::__none:
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__monostate_);
  case __format::__arg_t::__boolean:
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__boolean_);
  case __format::__arg_t::__char_type:
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__char_type_);
  case __format::__arg_t::__int:
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__int_);
  case __format::__arg_t::__long_long:
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__long_long_);
  case __format::__arg_t::__i128:
#  ifndef _LIBCPP_HAS_NO_INT128
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__i128_);
#  else
# 116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
    __libcpp_unreachable();
#  endif
# 118 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
  case __format::__arg_t::__unsigned:
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__unsigned_);
  case __format::__arg_t::__unsigned_long_long:
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__unsigned_long_long_);
  case __format::__arg_t::__u128:
#  ifndef _LIBCPP_HAS_NO_INT128
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__u128_);
#  else
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
    __libcpp_unreachable();
#  endif
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
  case __format::__arg_t::__float:
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__float_);
  case __format::__arg_t::__double:
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__double_);
  case __format::__arg_t::__long_double:
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__long_double_);
  case __format::__arg_t::__const_char_type_ptr:
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__const_char_type_ptr_);
  case __format::__arg_t::__string_view:
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__string_view_);
  case __format::__arg_t::__ptr:
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__ptr_);
  case __format::__arg_t::__handle:
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis),
                         typename basic_format_arg<_Context>::handle{__arg.__value_.__handle_});
  }

  __libcpp_unreachable();
}

/// Contains the values used in basic_format_arg.
///
/// This is a separate type so it's possible to store the values and types in
/// separate arrays.
template <class _Context>
class __basic_format_arg_value {
  using _CharT = typename _Context::char_type;

public:
  /// Contains the implementation for basic_format_arg::handle.
  struct __handle {
    template <class _Tp>
    _LIBCPP_HIDE_FROM_ABI explicit __handle(_Tp& __v) noexcept
        : __ptr_(_VSTD::addressof(__v)),
          __format_([](basic_format_parse_context<_CharT>& __parse_ctx, _Context& __ctx, const void* __ptr) {
            using _Dp = remove_const_t<_Tp>;
            using _Qp = conditional_t<__formattable_with<const _Dp, _Context>, const _Dp, _Dp>;
            static_assert(__formattable_with<_Qp, _Context>, "Mandated by [format.arg]/10");

            typename _Context::template formatter_type<_Dp> __f;
            __parse_ctx.advance_to(__f.parse(__parse_ctx));
            __ctx.advance_to(__f.format(*const_cast<_Qp*>(static_cast<const _Dp*>(__ptr)), __ctx));
          }) {}

    const void* __ptr_;
    void (*__format_)(basic_format_parse_context<_CharT>&, _Context&, const void*);
  };

  union {
    monostate __monostate_;
    bool __boolean_;
    _CharT __char_type_;
    int __int_;
    unsigned __unsigned_;
    long long __long_long_;
    unsigned long long __unsigned_long_long_;
#  ifndef _LIBCPP_HAS_NO_INT128
    __int128_t __i128_;
    __uint128_t __u128_;
#  endif
# 188 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
    float __float_;
    double __double_;
    long double __long_double_;
    const _CharT* __const_char_type_ptr_;
    basic_string_view<_CharT> __string_view_;
    const void* __ptr_;
    __handle __handle_;
  };

  // These constructors contain the exact storage type used. If adjustments are
  // required, these will be done in __create_format_arg.

  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value() noexcept : __monostate_() {}
  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(bool __value) noexcept : __boolean_(__value) {}
  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(_CharT __value) noexcept : __char_type_(__value) {}
  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(int __value) noexcept : __int_(__value) {}
  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(unsigned __value) noexcept : __unsigned_(__value) {}
  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(long long __value) noexcept : __long_long_(__value) {}
  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(unsigned long long __value) noexcept
      : __unsigned_long_long_(__value) {}
#  ifndef _LIBCPP_HAS_NO_INT128
  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(__int128_t __value) noexcept : __i128_(__value) {}
  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(__uint128_t __value) noexcept : __u128_(__value) {}
#  endif
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(float __value) noexcept : __float_(__value) {}
  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(double __value) noexcept : __double_(__value) {}
  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(long double __value) noexcept : __long_double_(__value) {}
  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(const _CharT* __value) noexcept : __const_char_type_ptr_(__value) {}
  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(basic_string_view<_CharT> __value) noexcept
      : __string_view_(__value) {}
  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(const void* __value) noexcept : __ptr_(__value) {}
  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(__handle&& __value) noexcept : __handle_(std::move(__value)) {}
};

template <class _Context>
class _LIBCPP_TEMPLATE_VIS basic_format_arg {
public:
  class _LIBCPP_TEMPLATE_VIS handle;

  _LIBCPP_HIDE_FROM_ABI basic_format_arg() noexcept
      : __type_{__format::__arg_t::__none} {}

  _LIBCPP_HIDE_FROM_ABI explicit operator bool() const noexcept {
    return __type_ != __format::__arg_t::__none;
  }

private:
  using char_type = typename _Context::char_type;

  // TODO FMT Implement constrain [format.arg]/4
  // Constraints: The template specialization
  //   typename Context::template formatter_type<T>
  // meets the Formatter requirements ([formatter.requirements]).  The extent
  // to which an implementation determines that the specialization meets the
  // Formatter requirements is unspecified, except that as a minimum the
  // expression
  //   typename Context::template formatter_type<T>()
  //    .format(declval<const T&>(), declval<Context&>())
  // shall be well-formed when treated as an unevaluated operand.

public:
  __basic_format_arg_value<_Context> __value_;
  __format::__arg_t __type_;

  _LIBCPP_HIDE_FROM_ABI explicit basic_format_arg(__format::__arg_t __type,
                                                  __basic_format_arg_value<_Context> __value) noexcept
      : __value_(__value), __type_(__type) {}
};

template <class _Context>
class _LIBCPP_TEMPLATE_VIS basic_format_arg<_Context>::handle {
public:
  _LIBCPP_HIDE_FROM_ABI
  void format(basic_format_parse_context<char_type>& __parse_ctx, _Context& __ctx) const {
    __handle_.__format_(__parse_ctx, __ctx, __handle_.__ptr_);
  }

  _LIBCPP_HIDE_FROM_ABI explicit handle(typename __basic_format_arg_value<_Context>::__handle& __handle) noexcept
      : __handle_(__handle) {}

private:
  typename __basic_format_arg_value<_Context>::__handle& __handle_;
};

// This function is user facing, so it must wrap the non-standard types of
// the "variant" in a handle to stay conforming. See __arg_t for more details.
template <class _Visitor, class _Context>
_LIBCPP_HIDE_FROM_ABI decltype(auto)
visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
  switch (__arg.__type_) {
#  ifndef _LIBCPP_HAS_NO_INT128
  case __format::__arg_t::__i128: {
    typename __basic_format_arg_value<_Context>::__handle __h{__arg.__value_.__i128_};
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), typename basic_format_arg<_Context>::handle{__h});
  }

  case __format::__arg_t::__u128: {
    typename __basic_format_arg_value<_Context>::__handle __h{__arg.__value_.__u128_};
    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), typename basic_format_arg<_Context>::handle{__h});
  }
#  endif
# 289 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
  default:
    return _VSTD::__visit_format_arg(_VSTD::forward<_Visitor>(__vis), __arg);
  }
}

#endif //_LIBCPP_STD_VER >= 20
# 295 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FORMAT_FORMAT_ARG_H
# 299 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_arg.h" 3
#endif /* format_arg.h expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/format_error.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/format_parse_context.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* format_string.h expanded by -frewrite-includes */
#include <__format/format_string.h>
#else /* format_string.h expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FORMAT_FORMAT_STRING_H
#define _LIBCPP___FORMAT_FORMAT_STRING_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/format_error.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h> // iter_value_t
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3

namespace __format {

template <contiguous_iterator _Iterator>
struct _LIBCPP_TEMPLATE_VIS __parse_number_result {
  _Iterator __last;
  uint32_t __value;
};

template <contiguous_iterator _Iterator>
__parse_number_result(_Iterator, uint32_t) -> __parse_number_result<_Iterator>;

template <contiguous_iterator _Iterator>
_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_Iterator>
__parse_number(_Iterator __begin, _Iterator __end);

/**
 * The maximum value of a numeric argument.
 *
 * This is used for:
 * * arg-id
 * * width as value or arg-id.
 * * precision as value or arg-id.
 *
 * The value is compatible with the maximum formatting width and precision
 * using the `%*` syntax on a 32-bit system.
 */
inline constexpr uint32_t __number_max = INT32_MAX;

namespace __detail {
template <contiguous_iterator _Iterator>
_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_Iterator>
__parse_zero(_Iterator __begin, _Iterator, auto& __parse_ctx) {
  __parse_ctx.check_arg_id(0);
  return {++__begin, 0}; // can never be larger than the maximum.
}

template <contiguous_iterator _Iterator>
_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_Iterator>
__parse_automatic(_Iterator __begin, _Iterator, auto& __parse_ctx) {
  size_t __value = __parse_ctx.next_arg_id();
  _LIBCPP_ASSERT_UNCATEGORIZED(
      __value <= __number_max,
      "Compilers don't support this number of arguments");

  return {__begin, uint32_t(__value)};
}

template <contiguous_iterator _Iterator>
_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_Iterator>
__parse_manual(_Iterator __begin, _Iterator __end, auto& __parse_ctx) {
  __parse_number_result<_Iterator> __r = __format::__parse_number(__begin, __end);
  __parse_ctx.check_arg_id(__r.__value);
  return __r;
}

} // namespace __detail

/**
 * Parses a number.
 *
 * The number is used for the 31-bit values @em width and @em precision. This
 * allows a maximum value of 2147483647.
 */
template <contiguous_iterator _Iterator>
_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_Iterator>
__parse_number(_Iterator __begin, _Iterator __end_input) {
  using _CharT = iter_value_t<_Iterator>;
  static_assert(__format::__number_max == INT32_MAX,
                "The algorithm is implemented based on this value.");
  /*
   * Limit the input to 9 digits, otherwise we need two checks during every
   * iteration:
   * - Are we at the end of the input?
   * - Does the value exceed width of an uint32_t? (Switching to uint64_t would
   *   have the same issue, but with a higher maximum.)
   */
  _Iterator __end = __end_input - __begin > 9 ? __begin + 9 : __end_input;
  uint32_t __value = *__begin - _CharT('0');
  while (++__begin != __end) {
    if (*__begin < _CharT('0') || *__begin > _CharT('9'))
      return {__begin, __value};

    __value = __value * 10 + *__begin - _CharT('0');
  }

  if (__begin != __end_input && *__begin >= _CharT('0') &&
      *__begin <= _CharT('9')) {

    /*
     * There are more than 9 digits, do additional validations:
     * - Does the 10th digit exceed the maximum allowed value?
     * - Are there more than 10 digits?
     * (More than 10 digits always overflows the maximum.)
     */
    uint64_t __v = uint64_t(__value) * 10 + *__begin++ - _CharT('0');
    if (__v > __number_max ||
        (__begin != __end_input && *__begin >= _CharT('0') &&
         *__begin <= _CharT('9')))
      std::__throw_format_error("The numeric value of the format specifier is too large");

    __value = __v;
  }

  return {__begin, __value};
}

/**
 * Multiplexer for all parse functions.
 *
 * The parser will return a pointer beyond the last consumed character. This
 * should be the closing '}' of the arg-id.
 */
template <contiguous_iterator _Iterator>
_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_Iterator>
__parse_arg_id(_Iterator __begin, _Iterator __end, auto& __parse_ctx) {
  using _CharT = iter_value_t<_Iterator>;
  switch (*__begin) {
  case _CharT('0'):
    return __detail::__parse_zero(__begin, __end, __parse_ctx);

  case _CharT(':'):
    // This case is conditionally valid. It's allowed in an arg-id in the
    // replacement-field, but not in the std-format-spec. The caller can
    // provide a better diagnostic, so accept it here unconditionally.
  case _CharT('}'):
    return __detail::__parse_automatic(__begin, __end, __parse_ctx);
  }
  if (*__begin < _CharT('0') || *__begin > _CharT('9'))
    std::__throw_format_error("The argument index starts with an invalid character");

  return __detail::__parse_manual(__begin, __end, __parse_ctx);
}

} // namespace __format

#endif //_LIBCPP_STD_VER >= 20
# 165 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FORMAT_FORMAT_STRING_H
# 169 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/format_string.h" 3
#endif /* format_string.h expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* unicode.h expanded by -frewrite-includes */
#include <__format/unicode.h>
#else /* unicode.h expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FORMAT_UNICODE_H
#define _LIBCPP___FORMAT_UNICODE_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/countl.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__concepts/same_as.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* extended_grapheme_cluster_table.h expanded by -frewrite-includes */
#include <__format/extended_grapheme_cluster_table.h>
#else /* extended_grapheme_cluster_table.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// WARNING, this entire header is generated by
// utils/generate_extended_grapheme_cluster_table.py
// DO NOT MODIFY!

// UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
//
// See Terms of Use <https://www.unicode.org/copyright.html>
// for definitions of Unicode Inc.'s Data Files and Software.
//
// NOTICE TO USER: Carefully read the following legal agreement.
// BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
// DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
// YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
// TERMS AND CONDITIONS OF THIS AGREEMENT.
// IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
// THE DATA FILES OR SOFTWARE.
//
// COPYRIGHT AND PERMISSION NOTICE
//
// Copyright (c) 1991-2022 Unicode, Inc. All rights reserved.
// Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of the Unicode data files and any associated documentation
// (the "Data Files") or Unicode software and any associated documentation
// (the "Software") to deal in the Data Files or Software
// without restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, and/or sell copies of
// the Data Files or Software, and to permit persons to whom the Data Files
// or Software are furnished to do so, provided that either
// (a) this copyright and permission notice appear with all copies
// of the Data Files or Software, or
// (b) this copyright and permission notice appear in associated
// Documentation.
//
// THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT OF THIRD PARTY RIGHTS.
// IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
// NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
// DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
// DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
// TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THE DATA FILES OR SOFTWARE.
//
// Except as contained in this notice, the name of a copyright holder
// shall not be used in advertising or otherwise to promote the sale,
// use or other dealings in these Data Files or Software without prior
// written authorization of the copyright holder.

#ifndef _LIBCPP___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H
#define _LIBCPP___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_upper_bound.h>
#endif /* expanded by -frewrite-includes */
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/access.h>
#endif /* expanded by -frewrite-includes */
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3
#endif
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3

namespace __extended_grapheme_custer_property_boundary {

enum class __property : uint8_t {
  // Values generated from the data files.
  __CR,
  __Control,
  __Extend,
  __Extended_Pictographic,
  __L,
  __LF,
  __LV,
  __LVT,
  __Prepend,
  __Regional_Indicator,
  __SpacingMark,
  __T,
  __V,
  __ZWJ,

  // The properies below aren't stored in the "database".

  // Text position properties.
  __sot,
  __eot,

  // The code unit has none of above properties.
  __none
};

/// The entries of the extended grapheme cluster bondary property table.
///
/// The data is generated from
/// - https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakProperty.txt
/// - https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-data.txt
///
/// The data has 3 values
/// - bits [0, 3] The property. One of the values generated from the datafiles
///   of \ref __property
/// - bits [4, 10] The size of the range.
/// - bits [11, 31] The lower bound code point of the range. The upper bound of
///   the range is lower bound + size.
///
/// The 7 bits for the size allow a maximum range of 128 elements. Some ranges
/// in the Unicode tables are larger. They are stored in multiple consecutive
/// ranges in the data table. An alternative would be to store the sizes in a
/// separate 16-bit value. The original MSVC STL code had such an approach, but
/// this approach uses less space for the data and is about 4% faster in the
/// following benchmark.
/// libcxx/benchmarks/std_format_spec_string_unicode.bench.cpp
inline constexpr uint32_t __entries[1496] = {
    0x00000091,
    0x00005005,
    0x00005811,
    0x00006800,
    0x00007111,
    0x0003fa01,
    0x00054803,
    0x00056801,
    0x00057003,
    0x001806f2,
    0x00241862,
    0x002c8ac2,
    0x002df802,
    0x002e0812,
    0x002e2012,
    0x002e3802,
    0x00300058,
    0x003080a2,
    0x0030e001,
    0x00325942,
    0x00338002,
    0x0036b062,
    0x0036e808,
    0x0036f852,
    0x00373812,
    0x00375032,
    0x00387808,
    0x00388802,
    0x003981a2,
    0x003d30a2,
    0x003f5882,
    0x003fe802,
    0x0040b032,
    0x0040d882,
    0x00412822,
    0x00414842,
    0x0042c822,
    0x00448018,
    0x0044c072,
    0x00465172,
    0x00471008,
    0x004719f2,
    0x0048180a,
    0x0049d002,
    0x0049d80a,
    0x0049e002,
    0x0049f02a,
    0x004a0872,
    0x004a483a,
    0x004a6802,
    0x004a701a,
    0x004a8862,
    0x004b1012,
    0x004c0802,
    0x004c101a,
    0x004de002,
    0x004df002,
    0x004df81a,
    0x004e0832,
    0x004e381a,
    0x004e581a,
    0x004e6802,
    0x004eb802,
    0x004f1012,
    0x004ff002,
    0x00500812,
    0x0050180a,
    0x0051e002,
    0x0051f02a,
    0x00520812,
    0x00523812,
    0x00525822,
    0x00528802,
    0x00538012,
    0x0053a802,
    0x00540812,
    0x0054180a,
    0x0055e002,
    0x0055f02a,
    0x00560842,
    0x00563812,
    0x0056480a,
    0x0056581a,
    0x00566802,
    0x00571012,
    0x0057d052,
    0x00580802,
    0x0058101a,
    0x0059e002,
    0x0059f012,
    0x005a000a,
    0x005a0832,
    0x005a381a,
    0x005a581a,
    0x005a6802,
    0x005aa822,
    0x005b1012,
    0x005c1002,
    0x005df002,
    0x005df80a,
    0x005e0002,
    0x005e081a,
    0x005e302a,
    0x005e502a,
    0x005e6802,
    0x005eb802,
    0x00600002,
    0x0060082a,
    0x00602002,
    0x0061e002,
    0x0061f022,
    0x0062083a,
    0x00623022,
    0x00625032,
    0x0062a812,
    0x00631012,
    0x00640802,
    0x0064101a,
    0x0065e002,
    0x0065f00a,
    0x0065f802,
    0x0066001a,
    0x00661002,
    0x0066181a,
    0x00663002,
    0x0066381a,
    0x0066501a,
    0x00666012,
    0x0066a812,
    0x00671012,
    0x0067980a,
    0x00680012,
    0x0068101a,
    0x0069d812,
    0x0069f002,
    0x0069f81a,
    0x006a0832,
    0x006a302a,
    0x006a502a,
    0x006a6802,
    0x006a7008,
    0x006ab802,
    0x006b1012,
    0x006c0802,
    0x006c101a,
    0x006e5002,
    0x006e7802,
    0x006e801a,
    0x006e9022,
    0x006eb002,
    0x006ec06a,
    0x006ef802,
    0x006f901a,
    0x00718802,
    0x0071980a,
    0x0071a062,
    0x00723872,
    0x00758802,
    0x0075980a,
    0x0075a082,
    0x00764062,
    0x0078c012,
    0x0079a802,
    0x0079b802,
    0x0079c802,
    0x0079f01a,
    0x007b88d2,
    0x007bf80a,
    0x007c0042,
    0x007c3012,
    0x007c68a2,
    0x007cca32,
    0x007e3002,
    0x00816832,
    0x0081880a,
    0x00819052,
    0x0081c812,
    0x0081d81a,
    0x0081e812,
    0x0082b01a,
    0x0082c012,
    0x0082f022,
    0x00838832,
    0x00841002,
    0x0084200a,
    0x00842812,
    0x00846802,
    0x0084e802,
    0x008805f4,
    0x008b047c,
    0x008d457b,
    0x009ae822,
    0x00b89022,
    0x00b8a80a,
    0x00b99012,
    0x00b9a00a,
    0x00ba9012,
    0x00bb9012,
    0x00bda012,
    0x00bdb00a,
    0x00bdb862,
    0x00bdf07a,
    0x00be3002,
    0x00be381a,
    0x00be48a2,
    0x00bee802,
    0x00c05822,
    0x00c07001,
    0x00c07802,
    0x00c42812,
    0x00c54802,
    0x00c90022,
    0x00c9183a,
    0x00c93812,
    0x00c9482a,
    0x00c9801a,
    0x00c99002,
    0x00c9985a,
    0x00c9c822,
    0x00d0b812,
    0x00d0c81a,
    0x00d0d802,
    0x00d2a80a,
    0x00d2b002,
    0x00d2b80a,
    0x00d2c062,
    0x00d30002,
    0x00d31002,
    0x00d32872,
    0x00d3685a,
    0x00d39892,
    0x00d3f802,
    0x00d581e2,
    0x00d80032,
    0x00d8200a,
    0x00d9a062,
    0x00d9d80a,
    0x00d9e002,
    0x00d9e84a,
    0x00da1002,
    0x00da181a,
    0x00db5882,
    0x00dc0012,
    0x00dc100a,
    0x00dd080a,
    0x00dd1032,
    0x00dd301a,
    0x00dd4012,
    0x00dd500a,
    0x00dd5822,
    0x00df3002,
    0x00df380a,
    0x00df4012,
    0x00df502a,
    0x00df6802,
    0x00df700a,
    0x00df7822,
    0x00df901a,
    0x00e1207a,
    0x00e16072,
    0x00e1a01a,
    0x00e1b012,
    0x00e68022,
    0x00e6a0c2,
    0x00e7080a,
    0x00e71062,
    0x00e76802,
    0x00e7a002,
    0x00e7b80a,
    0x00e7c012,
    0x00ee03f2,
    0x01005801,
    0x01006002,
    0x0100680d,
    0x01007011,
    0x01014061,
    0x0101e003,
    0x01024803,
    0x010300f1,
    0x01068202,
    0x01091003,
    0x0109c803,
    0x010ca053,
    0x010d4813,
    0x0118d013,
    0x01194003,
    0x011c4003,
    0x011e7803,
    0x011f48a3,
    0x011fc023,
    0x01261003,
    0x012d5013,
    0x012db003,
    0x012e0003,
    0x012fd833,
    0x01300053,
    0x013038b3,
    0x0130a713,
    0x01348753,
    0x013840a3,
    0x0138a003,
    0x0138b003,
    0x0138e803,
    0x01390803,
    0x01394003,
    0x01399813,
    0x013a2003,
    0x013a3803,
    0x013a6003,
    0x013a7003,
    0x013a9823,
    0x013ab803,
    0x013b1843,
    0x013ca823,
    0x013d0803,
    0x013d8003,
    0x013df803,
    0x0149a013,
    0x01582823,
    0x0158d813,
    0x015a8003,
    0x015aa803,
    0x01677822,
    0x016bf802,
    0x016f01f2,
    0x01815052,
    0x01818003,
    0x0181e803,
    0x0184c812,
    0x0194b803,
    0x0194c803,
    0x05337832,
    0x0533a092,
    0x0534f012,
    0x05378012,
    0x05401002,
    0x05403002,
    0x05405802,
    0x0541181a,
    0x05412812,
    0x0541380a,
    0x05416002,
    0x0544001a,
    0x0545a0fa,
    0x05462012,
    0x05470112,
    0x0547f802,
    0x05493072,
    0x054a38a2,
    0x054a901a,
    0x054b01c4,
    0x054c0022,
    0x054c180a,
    0x054d9802,
    0x054da01a,
    0x054db032,
    0x054dd01a,
    0x054de012,
    0x054df02a,
    0x054f2802,
    0x05514852,
    0x0551781a,
    0x05518812,
    0x0551981a,
    0x0551a812,
    0x05521802,
    0x05526002,
    0x0552680a,
    0x0553e002,
    0x05558002,
    0x05559022,
    0x0555b812,
    0x0555f012,
    0x05560802,
    0x0557580a,
    0x05576012,
    0x0557701a,
    0x0557a80a,
    0x0557b002,
    0x055f181a,
    0x055f2802,
    0x055f301a,
    0x055f4002,
    0x055f481a,
    0x055f600a,
    0x055f6802,
    0x05600006,
    0x056009a7,
    0x0560e006,
    0x0560e9a7,
    0x0561c006,
    0x0561c9a7,
    0x0562a006,
    0x0562a9a7,
    0x05638006,
    0x056389a7,
    0x05646006,
    0x056469a7,
    0x05654006,
    0x056549a7,
    0x05662006,
    0x056629a7,
    0x05670006,
    0x056709a7,
    0x0567e006,
    0x0567e9a7,
    0x0568c006,
    0x0568c9a7,
    0x0569a006,
    0x0569a9a7,
    0x056a8006,
    0x056a89a7,
    0x056b6006,
    0x056b69a7,
    0x056c4006,
    0x056c49a7,
    0x056d2006,
    0x056d29a7,
    0x056e0006,
    0x056e09a7,
    0x056ee006,
    0x056ee9a7,
    0x056fc006,
    0x056fc9a7,
    0x0570a006,
    0x0570a9a7,
    0x05718006,
    0x057189a7,
    0x05726006,
    0x057269a7,
    0x05734006,
    0x057349a7,
    0x05742006,
    0x057429a7,
    0x05750006,
    0x057509a7,
    0x0575e006,
    0x0575e9a7,
    0x0576c006,
    0x0576c9a7,
    0x0577a006,
    0x0577a9a7,
    0x05788006,
    0x057889a7,
    0x05796006,
    0x057969a7,
    0x057a4006,
    0x057a49a7,
    0x057b2006,
    0x057b29a7,
    0x057c0006,
    0x057c09a7,
    0x057ce006,
    0x057ce9a7,
    0x057dc006,
    0x057dc9a7,
    0x057ea006,
    0x057ea9a7,
    0x057f8006,
    0x057f89a7,
    0x05806006,
    0x058069a7,
    0x05814006,
    0x058149a7,
    0x05822006,
    0x058229a7,
    0x05830006,
    0x058309a7,
    0x0583e006,
    0x0583e9a7,
    0x0584c006,
    0x0584c9a7,
    0x0585a006,
    0x0585a9a7,
    0x05868006,
    0x058689a7,
    0x05876006,
    0x058769a7,
    0x05884006,
    0x058849a7,
    0x05892006,
    0x058929a7,
    0x058a0006,
    0x058a09a7,
    0x058ae006,
    0x058ae9a7,
    0x058bc006,
    0x058bc9a7,
    0x058ca006,
    0x058ca9a7,
    0x058d8006,
    0x058d89a7,
    0x058e6006,
    0x058e69a7,
    0x058f4006,
    0x058f49a7,
    0x05902006,
    0x059029a7,
    0x05910006,
    0x059109a7,
    0x0591e006,
    0x0591e9a7,
    0x0592c006,
    0x0592c9a7,
    0x0593a006,
    0x0593a9a7,
    0x05948006,
    0x059489a7,
    0x05956006,
    0x059569a7,
    0x05964006,
    0x059649a7,
    0x05972006,
    0x059729a7,
    0x05980006,
    0x059809a7,
    0x0598e006,
    0x0598e9a7,
    0x0599c006,
    0x0599c9a7,
    0x059aa006,
    0x059aa9a7,
    0x059b8006,
    0x059b89a7,
    0x059c6006,
    0x059c69a7,
    0x059d4006,
    0x059d49a7,
    0x059e2006,
    0x059e29a7,
    0x059f0006,
    0x059f09a7,
    0x059fe006,
    0x059fe9a7,
    0x05a0c006,
    0x05a0c9a7,
    0x05a1a006,
    0x05a1a9a7,
    0x05a28006,
    0x05a289a7,
    0x05a36006,
    0x05a369a7,
    0x05a44006,
    0x05a449a7,
    0x05a52006,
    0x05a529a7,
    0x05a60006,
    0x05a609a7,
    0x05a6e006,
    0x05a6e9a7,
    0x05a7c006,
    0x05a7c9a7,
    0x05a8a006,
    0x05a8a9a7,
    0x05a98006,
    0x05a989a7,
    0x05aa6006,
    0x05aa69a7,
    0x05ab4006,
    0x05ab49a7,
    0x05ac2006,
    0x05ac29a7,
    0x05ad0006,
    0x05ad09a7,
    0x05ade006,
    0x05ade9a7,
    0x05aec006,
    0x05aec9a7,
    0x05afa006,
    0x05afa9a7,
    0x05b08006,
    0x05b089a7,
    0x05b16006,
    0x05b169a7,
    0x05b24006,
    0x05b249a7,
    0x05b32006,
    0x05b329a7,
    0x05b40006,
    0x05b409a7,
    0x05b4e006,
    0x05b4e9a7,
    0x05b5c006,
    0x05b5c9a7,
    0x05b6a006,
    0x05b6a9a7,
    0x05b78006,
    0x05b789a7,
    0x05b86006,
    0x05b869a7,
    0x05b94006,
    0x05b949a7,
    0x05ba2006,
    0x05ba29a7,
    0x05bb0006,
    0x05bb09a7,
    0x05bbe006,
    0x05bbe9a7,
    0x05bcc006,
    0x05bcc9a7,
    0x05bda006,
    0x05bda9a7,
    0x05be8006,
    0x05be89a7,
    0x05bf6006,
    0x05bf69a7,
    0x05c04006,
    0x05c049a7,
    0x05c12006,
    0x05c129a7,
    0x05c20006,
    0x05c209a7,
    0x05c2e006,
    0x05c2e9a7,
    0x05c3c006,
    0x05c3c9a7,
    0x05c4a006,
    0x05c4a9a7,
    0x05c58006,
    0x05c589a7,
    0x05c66006,
    0x05c669a7,
    0x05c74006,
    0x05c749a7,
    0x05c82006,
    0x05c829a7,
    0x05c90006,
    0x05c909a7,
    0x05c9e006,
    0x05c9e9a7,
    0x05cac006,
    0x05cac9a7,
    0x05cba006,
    0x05cba9a7,
    0x05cc8006,
    0x05cc89a7,
    0x05cd6006,
    0x05cd69a7,
    0x05ce4006,
    0x05ce49a7,
    0x05cf2006,
    0x05cf29a7,
    0x05d00006,
    0x05d009a7,
    0x05d0e006,
    0x05d0e9a7,
    0x05d1c006,
    0x05d1c9a7,
    0x05d2a006,
    0x05d2a9a7,
    0x05d38006,
    0x05d389a7,
    0x05d46006,
    0x05d469a7,
    0x05d54006,
    0x05d549a7,
    0x05d62006,
    0x05d629a7,
    0x05d70006,
    0x05d709a7,
    0x05d7e006,
    0x05d7e9a7,
    0x05d8c006,
    0x05d8c9a7,
    0x05d9a006,
    0x05d9a9a7,
    0x05da8006,
    0x05da89a7,
    0x05db6006,
    0x05db69a7,
    0x05dc4006,
    0x05dc49a7,
    0x05dd2006,
    0x05dd29a7,
    0x05de0006,
    0x05de09a7,
    0x05dee006,
    0x05dee9a7,
    0x05dfc006,
    0x05dfc9a7,
    0x05e0a006,
    0x05e0a9a7,
    0x05e18006,
    0x05e189a7,
    0x05e26006,
    0x05e269a7,
    0x05e34006,
    0x05e349a7,
    0x05e42006,
    0x05e429a7,
    0x05e50006,
    0x05e509a7,
    0x05e5e006,
    0x05e5e9a7,
    0x05e6c006,
    0x05e6c9a7,
    0x05e7a006,
    0x05e7a9a7,
    0x05e88006,
    0x05e889a7,
    0x05e96006,
    0x05e969a7,
    0x05ea4006,
    0x05ea49a7,
    0x05eb2006,
    0x05eb29a7,
    0x05ec0006,
    0x05ec09a7,
    0x05ece006,
    0x05ece9a7,
    0x05edc006,
    0x05edc9a7,
    0x05eea006,
    0x05eea9a7,
    0x05ef8006,
    0x05ef89a7,
    0x05f06006,
    0x05f069a7,
    0x05f14006,
    0x05f149a7,
    0x05f22006,
    0x05f229a7,
    0x05f30006,
    0x05f309a7,
    0x05f3e006,
    0x05f3e9a7,
    0x05f4c006,
    0x05f4c9a7,
    0x05f5a006,
    0x05f5a9a7,
    0x05f68006,
    0x05f689a7,
    0x05f76006,
    0x05f769a7,
    0x05f84006,
    0x05f849a7,
    0x05f92006,
    0x05f929a7,
    0x05fa0006,
    0x05fa09a7,
    0x05fae006,
    0x05fae9a7,
    0x05fbc006,
    0x05fbc9a7,
    0x05fca006,
    0x05fca9a7,
    0x05fd8006,
    0x05fd89a7,
    0x05fe6006,
    0x05fe69a7,
    0x05ff4006,
    0x05ff49a7,
    0x06002006,
    0x060029a7,
    0x06010006,
    0x060109a7,
    0x0601e006,
    0x0601e9a7,
    0x0602c006,
    0x0602c9a7,
    0x0603a006,
    0x0603a9a7,
    0x06048006,
    0x060489a7,
    0x06056006,
    0x060569a7,
    0x06064006,
    0x060649a7,
    0x06072006,
    0x060729a7,
    0x06080006,
    0x060809a7,
    0x0608e006,
    0x0608e9a7,
    0x0609c006,
    0x0609c9a7,
    0x060aa006,
    0x060aa9a7,
    0x060b8006,
    0x060b89a7,
    0x060c6006,
    0x060c69a7,
    0x060d4006,
    0x060d49a7,
    0x060e2006,
    0x060e29a7,
    0x060f0006,
    0x060f09a7,
    0x060fe006,
    0x060fe9a7,
    0x0610c006,
    0x0610c9a7,
    0x0611a006,
    0x0611a9a7,
    0x06128006,
    0x061289a7,
    0x06136006,
    0x061369a7,
    0x06144006,
    0x061449a7,
    0x06152006,
    0x061529a7,
    0x06160006,
    0x061609a7,
    0x0616e006,
    0x0616e9a7,
    0x0617c006,
    0x0617c9a7,
    0x0618a006,
    0x0618a9a7,
    0x06198006,
    0x061989a7,
    0x061a6006,
    0x061a69a7,
    0x061b4006,
    0x061b49a7,
    0x061c2006,
    0x061c29a7,
    0x061d0006,
    0x061d09a7,
    0x061de006,
    0x061de9a7,
    0x061ec006,
    0x061ec9a7,
    0x061fa006,
    0x061fa9a7,
    0x06208006,
    0x062089a7,
    0x06216006,
    0x062169a7,
    0x06224006,
    0x062249a7,
    0x06232006,
    0x062329a7,
    0x06240006,
    0x062409a7,
    0x0624e006,
    0x0624e9a7,
    0x0625c006,
    0x0625c9a7,
    0x0626a006,
    0x0626a9a7,
    0x06278006,
    0x062789a7,
    0x06286006,
    0x062869a7,
    0x06294006,
    0x062949a7,
    0x062a2006,
    0x062a29a7,
    0x062b0006,
    0x062b09a7,
    0x062be006,
    0x062be9a7,
    0x062cc006,
    0x062cc9a7,
    0x062da006,
    0x062da9a7,
    0x062e8006,
    0x062e89a7,
    0x062f6006,
    0x062f69a7,
    0x06304006,
    0x063049a7,
    0x06312006,
    0x063129a7,
    0x06320006,
    0x063209a7,
    0x0632e006,
    0x0632e9a7,
    0x0633c006,
    0x0633c9a7,
    0x0634a006,
    0x0634a9a7,
    0x06358006,
    0x063589a7,
    0x06366006,
    0x063669a7,
    0x06374006,
    0x063749a7,
    0x06382006,
    0x063829a7,
    0x06390006,
    0x063909a7,
    0x0639e006,
    0x0639e9a7,
    0x063ac006,
    0x063ac9a7,
    0x063ba006,
    0x063ba9a7,
    0x063c8006,
    0x063c89a7,
    0x063d6006,
    0x063d69a7,
    0x063e4006,
    0x063e49a7,
    0x063f2006,
    0x063f29a7,
    0x06400006,
    0x064009a7,
    0x0640e006,
    0x0640e9a7,
    0x0641c006,
    0x0641c9a7,
    0x0642a006,
    0x0642a9a7,
    0x06438006,
    0x064389a7,
    0x06446006,
    0x064469a7,
    0x06454006,
    0x064549a7,
    0x06462006,
    0x064629a7,
    0x06470006,
    0x064709a7,
    0x0647e006,
    0x0647e9a7,
    0x0648c006,
    0x0648c9a7,
    0x0649a006,
    0x0649a9a7,
    0x064a8006,
    0x064a89a7,
    0x064b6006,
    0x064b69a7,
    0x064c4006,
    0x064c49a7,
    0x064d2006,
    0x064d29a7,
    0x064e0006,
    0x064e09a7,
    0x064ee006,
    0x064ee9a7,
    0x064fc006,
    0x064fc9a7,
    0x0650a006,
    0x0650a9a7,
    0x06518006,
    0x065189a7,
    0x06526006,
    0x065269a7,
    0x06534006,
    0x065349a7,
    0x06542006,
    0x065429a7,
    0x06550006,
    0x065509a7,
    0x0655e006,
    0x0655e9a7,
    0x0656c006,
    0x0656c9a7,
    0x0657a006,
    0x0657a9a7,
    0x06588006,
    0x065889a7,
    0x06596006,
    0x065969a7,
    0x065a4006,
    0x065a49a7,
    0x065b2006,
    0x065b29a7,
    0x065c0006,
    0x065c09a7,
    0x065ce006,
    0x065ce9a7,
    0x065dc006,
    0x065dc9a7,
    0x065ea006,
    0x065ea9a7,
    0x065f8006,
    0x065f89a7,
    0x06606006,
    0x066069a7,
    0x06614006,
    0x066149a7,
    0x06622006,
    0x066229a7,
    0x06630006,
    0x066309a7,
    0x0663e006,
    0x0663e9a7,
    0x0664c006,
    0x0664c9a7,
    0x0665a006,
    0x0665a9a7,
    0x06668006,
    0x066689a7,
    0x06676006,
    0x066769a7,
    0x06684006,
    0x066849a7,
    0x06692006,
    0x066929a7,
    0x066a0006,
    0x066a09a7,
    0x066ae006,
    0x066ae9a7,
    0x066bc006,
    0x066bc9a7,
    0x066ca006,
    0x066ca9a7,
    0x066d8006,
    0x066d89a7,
    0x066e6006,
    0x066e69a7,
    0x066f4006,
    0x066f49a7,
    0x06702006,
    0x067029a7,
    0x06710006,
    0x067109a7,
    0x0671e006,
    0x0671e9a7,
    0x0672c006,
    0x0672c9a7,
    0x0673a006,
    0x0673a9a7,
    0x06748006,
    0x067489a7,
    0x06756006,
    0x067569a7,
    0x06764006,
    0x067649a7,
    0x06772006,
    0x067729a7,
    0x06780006,
    0x067809a7,
    0x0678e006,
    0x0678e9a7,
    0x0679c006,
    0x0679c9a7,
    0x067aa006,
    0x067aa9a7,
    0x067b8006,
    0x067b89a7,
    0x067c6006,
    0x067c69a7,
    0x067d4006,
    0x067d49a7,
    0x067e2006,
    0x067e29a7,
    0x067f0006,
    0x067f09a7,
    0x067fe006,
    0x067fe9a7,
    0x0680c006,
    0x0680c9a7,
    0x0681a006,
    0x0681a9a7,
    0x06828006,
    0x068289a7,
    0x06836006,
    0x068369a7,
    0x06844006,
    0x068449a7,
    0x06852006,
    0x068529a7,
    0x06860006,
    0x068609a7,
    0x0686e006,
    0x0686e9a7,
    0x0687c006,
    0x0687c9a7,
    0x0688a006,
    0x0688a9a7,
    0x06898006,
    0x068989a7,
    0x068a6006,
    0x068a69a7,
    0x068b4006,
    0x068b49a7,
    0x068c2006,
    0x068c29a7,
    0x068d0006,
    0x068d09a7,
    0x068de006,
    0x068de9a7,
    0x068ec006,
    0x068ec9a7,
    0x068fa006,
    0x068fa9a7,
    0x06908006,
    0x069089a7,
    0x06916006,
    0x069169a7,
    0x06924006,
    0x069249a7,
    0x06932006,
    0x069329a7,
    0x06940006,
    0x069409a7,
    0x0694e006,
    0x0694e9a7,
    0x0695c006,
    0x0695c9a7,
    0x0696a006,
    0x0696a9a7,
    0x06978006,
    0x069789a7,
    0x06986006,
    0x069869a7,
    0x06994006,
    0x069949a7,
    0x069a2006,
    0x069a29a7,
    0x069b0006,
    0x069b09a7,
    0x069be006,
    0x069be9a7,
    0x069cc006,
    0x069cc9a7,
    0x069da006,
    0x069da9a7,
    0x069e8006,
    0x069e89a7,
    0x069f6006,
    0x069f69a7,
    0x06a04006,
    0x06a049a7,
    0x06a12006,
    0x06a129a7,
    0x06a20006,
    0x06a209a7,
    0x06a2e006,
    0x06a2e9a7,
    0x06a3c006,
    0x06a3c9a7,
    0x06a4a006,
    0x06a4a9a7,
    0x06a58006,
    0x06a589a7,
    0x06a66006,
    0x06a669a7,
    0x06a74006,
    0x06a749a7,
    0x06a82006,
    0x06a829a7,
    0x06a90006,
    0x06a909a7,
    0x06a9e006,
    0x06a9e9a7,
    0x06aac006,
    0x06aac9a7,
    0x06aba006,
    0x06aba9a7,
    0x06ac8006,
    0x06ac89a7,
    0x06ad6006,
    0x06ad69a7,
    0x06ae4006,
    0x06ae49a7,
    0x06af2006,
    0x06af29a7,
    0x06b00006,
    0x06b009a7,
    0x06b0e006,
    0x06b0e9a7,
    0x06b1c006,
    0x06b1c9a7,
    0x06b2a006,
    0x06b2a9a7,
    0x06b38006,
    0x06b389a7,
    0x06b46006,
    0x06b469a7,
    0x06b54006,
    0x06b549a7,
    0x06b62006,
    0x06b629a7,
    0x06b70006,
    0x06b709a7,
    0x06b7e006,
    0x06b7e9a7,
    0x06b8c006,
    0x06b8c9a7,
    0x06b9a006,
    0x06b9a9a7,
    0x06ba8006,
    0x06ba89a7,
    0x06bb6006,
    0x06bb69a7,
    0x06bc4006,
    0x06bc49a7,
    0x06bd816c,
    0x06be5b0b,
    0x07d8f002,
    0x07f000f2,
    0x07f100f2,
    0x07f7f801,
    0x07fcf012,
    0x07ff80b1,
    0x080fe802,
    0x08170002,
    0x081bb042,
    0x08500822,
    0x08502812,
    0x08506032,
    0x0851c022,
    0x0851f802,
    0x08572812,
    0x08692032,
    0x08755812,
    0x0877e822,
    0x087a30a2,
    0x087c1032,
    0x0880000a,
    0x08800802,
    0x0880100a,
    0x0881c0e2,
    0x08838002,
    0x08839812,
    0x0883f822,
    0x0884100a,
    0x0885802a,
    0x08859832,
    0x0885b81a,
    0x0885c812,
    0x0885e808,
    0x08861002,
    0x08866808,
    0x08880022,
    0x08893842,
    0x0889600a,
    0x08896872,
    0x088a281a,
    0x088b9802,
    0x088c0012,
    0x088c100a,
    0x088d982a,
    0x088db082,
    0x088df81a,
    0x088e1018,
    0x088e4832,
    0x088e700a,
    0x088e7802,
    0x0891602a,
    0x08917822,
    0x0891901a,
    0x0891a002,
    0x0891a80a,
    0x0891b012,
    0x0891f002,
    0x08920802,
    0x0896f802,
    0x0897002a,
    0x08971872,
    0x08980012,
    0x0898101a,
    0x0899d812,
    0x0899f002,
    0x0899f80a,
    0x089a0002,
    0x089a083a,
    0x089a381a,
    0x089a582a,
    0x089ab802,
    0x089b101a,
    0x089b3062,
    0x089b8042,
    0x08a1a82a,
    0x08a1c072,
    0x08a2001a,
    0x08a21022,
    0x08a2280a,
    0x08a23002,
    0x08a2f002,
    0x08a58002,
    0x08a5881a,
    0x08a59852,
    0x08a5c80a,
    0x08a5d002,
    0x08a5d81a,
    0x08a5e802,
    0x08a5f00a,
    0x08a5f812,
    0x08a6080a,
    0x08a61012,
    0x08ad7802,
    0x08ad801a,
    0x08ad9032,
    0x08adc03a,
    0x08ade012,
    0x08adf00a,
    0x08adf812,
    0x08aee012,
    0x08b1802a,
    0x08b19872,
    0x08b1d81a,
    0x08b1e802,
    0x08b1f00a,
    0x08b1f812,
    0x08b55802,
    0x08b5600a,
    0x08b56802,
    0x08b5701a,
    0x08b58052,
    0x08b5b00a,
    0x08b5b802,
    0x08b8e822,
    0x08b91032,
    0x08b9300a,
    0x08b93842,
    0x08c1602a,
    0x08c17882,
    0x08c1c00a,
    0x08c1c812,
    0x08c98002,
    0x08c9884a,
    0x08c9b81a,
    0x08c9d812,
    0x08c9e80a,
    0x08c9f002,
    0x08c9f808,
    0x08ca000a,
    0x08ca0808,
    0x08ca100a,
    0x08ca1802,
    0x08ce882a,
    0x08cea032,
    0x08ced012,
    0x08cee03a,
    0x08cf0002,
    0x08cf200a,
    0x08d00892,
    0x08d19852,
    0x08d1c80a,
    0x08d1d008,
    0x08d1d832,
    0x08d23802,
    0x08d28852,
    0x08d2b81a,
    0x08d2c822,
    0x08d42058,
    0x08d450c2,
    0x08d4b80a,
    0x08d4c012,
    0x08e1780a,
    0x08e18062,
    0x08e1c052,
    0x08e1f00a,
    0x08e1f802,
    0x08e49152,
    0x08e5480a,
    0x08e55062,
    0x08e5880a,
    0x08e59012,
    0x08e5a00a,
    0x08e5a812,
    0x08e98852,
    0x08e9d002,
    0x08e9e012,
    0x08e9f862,
    0x08ea3008,
    0x08ea3802,
    0x08ec504a,
    0x08ec8012,
    0x08ec981a,
    0x08eca802,
    0x08ecb00a,
    0x08ecb802,
    0x08f79812,
    0x08f7a81a,
    0x08f80012,
    0x08f81008,
    0x08f8180a,
    0x08f9a01a,
    0x08f9b042,
    0x08f9f01a,
    0x08fa0002,
    0x08fa080a,
    0x08fa1002,
    0x09a180f1,
    0x09a20002,
    0x09a238e2,
    0x0b578042,
    0x0b598062,
    0x0b7a7802,
    0x0b7a8b6a,
    0x0b7c7832,
    0x0b7f2002,
    0x0b7f801a,
    0x0de4e812,
    0x0de50031,
    0x0e7802d2,
    0x0e798162,
    0x0e8b2802,
    0x0e8b300a,
    0x0e8b3822,
    0x0e8b680a,
    0x0e8b7042,
    0x0e8b9871,
    0x0e8bd872,
    0x0e8c2862,
    0x0e8d5032,
    0x0e921022,
    0x0ed00362,
    0x0ed1db12,
    0x0ed3a802,
    0x0ed42002,
    0x0ed4d842,
    0x0ed508e2,
    0x0f000062,
    0x0f004102,
    0x0f00d862,
    0x0f011812,
    0x0f013042,
    0x0f047802,
    0x0f098062,
    0x0f157002,
    0x0f176032,
    0x0f276032,
    0x0f468062,
    0x0f4a2062,
    0x0f8007f3,
    0x0f8407f3,
    0x0f886823,
    0x0f897803,
    0x0f8b6053,
    0x0f8bf013,
    0x0f8c7003,
    0x0f8c8893,
    0x0f8d6b83,
    0x0f8f3199,
    0x0f9008e3,
    0x0f90d003,
    0x0f917803,
    0x0f919083,
    0x0f91e033,
    0x0f924ff3,
    0x0f964ff3,
    0x0f9a4ff3,
    0x0f9e4b13,
    0x0f9fd842,
    0x0fa007f3,
    0x0fa407f3,
    0x0fa803d3,
    0x0faa37f3,
    0x0fae37f3,
    0x0fb23093,
    0x0fb407f3,
    0x0fbba0b3,
    0x0fbeaaa3,
    0x0fc06033,
    0x0fc24073,
    0x0fc2d053,
    0x0fc44073,
    0x0fc57513,
    0x0fc862e3,
    0x0fc9e093,
    0x0fca3ff3,
    0x0fce3ff3,
    0x0fd23ff3,
    0x0fd63b83,
    0x0fe007f3,
    0x0fe407f3,
    0x0fe807f3,
    0x0fec07f3,
    0x0ff007f3,
    0x0ff407f3,
    0x0ff807f3,
    0x0ffc07d3,
    0x700001f1,
    0x700105f2,
    0x700407f1,
    0x700807f2,
    0x700c06f2,
    0x700f87f1,
    0x701387f1,
    0x701787f1,
    0x701b87f1,
    0x701f87f1,
    0x702387f1,
    0x702787f1,
    0x702b87f1,
    0x702f87f1,
    0x703387f1,
    0x703787f1,
    0x703b87f1,
    0x703f87f1,
    0x704387f1,
    0x704787f1,
    0x704b87f1,
    0x704f87f1,
    0x705387f1,
    0x705787f1,
    0x705b87f1,
    0x705f87f1,
    0x706387f1,
    0x706787f1,
    0x706b87f1,
    0x706f87f1,
    0x707387f1,
    0x707787f1,
    0x707b87f1,
    0x707f80f1};

/// Returns the extended grapheme cluster bondary property of a code point.
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __property __get_property(const char32_t __code_point) noexcept {
  // The algorithm searches for the upper bound of the range and, when found,
  // steps back one entry. This algorithm is used since the code point can be
  // anywhere in the range. After a lower bound is found the next step is to
  // compare whether the code unit is indeed in the range.
  //
  // Since the entry contains a code unit, size, and property the code point
  // being sought needs to be adjusted. Just shifting the code point to the
  // proper position doesn't work; suppose an entry has property 0, size 1,
  // and lower bound 3. This results in the entry 0x1810.
  // When searching for code point 3 it will search for 0x1800, find 0x1810
  // and moves to the previous entry. Thus the lower bound value will never
  // be found.
  // The simple solution is to set the bits belonging to the property and
  // size. Then the upper bound for code point 3 will return the entry after
  // 0x1810. After moving to the previous entry the algorithm arrives at the
  // correct entry.
  ptrdiff_t __i = std::ranges::upper_bound(__entries, (__code_point << 11) | 0x7ffu) - __entries;
  if (__i == 0)
    return __property::__none;

  --__i;
  uint32_t __upper_bound = (__entries[__i] >> 11) + ((__entries[__i] >> 4) & 0x7f);
  if (__code_point <= __upper_bound)
    return static_cast<__property>(__entries[__i] & 0xf);

  return __property::__none;
}

} // namespace __extended_grapheme_custer_property_boundary

#endif //_LIBCPP_STD_VER >= 20
# 1658 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H
# 1662 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/extended_grapheme_cluster_table.h" 3
#endif /* extended_grapheme_cluster_table.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/readable_traits.h> // iter_value_t
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <string_view>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3

namespace __unicode {

// Helper struct for the result of a consume operation.
//
// The status value for a correct code point is 0. This allows a valid value to
// be used without masking.
// When the decoding fails it know the number of code units affected. For the
// current use-cases that value is not needed, therefore it is not stored.
// The escape routine needs the number of code units for both a valid and
// invalid character and keeps track of it itself. Doing it in this result
// unconditionally would give some overhead when the value is unneeded.
struct __consume_result {
  // When __status == __ok it contains the decoded code point.
  // Else it contains the replacement character U+FFFD
  char32_t __code_point : 31;

  enum : char32_t {
    // Consumed a well-formed code point.
    __ok = 0,
    // Encountered invalid UTF-8
    __error = 1
  } __status : 1 {__ok};
};
static_assert(sizeof(__consume_result) == sizeof(char32_t));

#  ifndef _LIBCPP_HAS_NO_UNICODE

/// Implements the grapheme cluster boundary rules
///
/// These rules are used to implement format's width estimation as stated in
/// [format.string.std]/11
///
/// The Standard refers to UAX \#29 for Unicode 12.0.0
/// https://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundary_Rules
///
/// The data tables used are
/// https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakProperty.txt
/// https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-data.txt
/// https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakTest.txt (for testing only)

inline constexpr char32_t __replacement_character = U'\ufffd';

// The error of a consume operation.
//
// This sets the code point to the replacement character. This code point does
// not participate in the grapheme clustering, so grapheme clustering code can
// ignore the error status and always use the code point.
inline constexpr __consume_result __consume_result_error{__replacement_character, __consume_result::__error};

[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool __is_high_surrogate(char32_t __value) {
  return __value >= 0xd800 && __value <= 0xdbff;
}

[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool __is_low_surrogate(char32_t __value) {
  return __value >= 0xdc00 && __value <= 0xdfff;
}

// https://www.unicode.org/glossary/#surrogate_code_point
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr bool __is_surrogate(char32_t __value) {
  return __value >= 0xd800 && __value <= 0xdfff;
}

// https://www.unicode.org/glossary/#code_point
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr bool __is_code_point(char32_t __value) {
  return __value <= 0x10ffff;
}

// https://www.unicode.org/glossary/#unicode_scalar_value
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr bool __is_scalar_value(char32_t __value) {
  return __unicode::__is_code_point(__value) && !__unicode::__is_surrogate(__value);
}

template <contiguous_iterator _Iterator>
  requires same_as<iter_value_t<_Iterator>, char>
_LIBCPP_HIDE_FROM_ABI constexpr bool __is_continuation(_Iterator __char, int __count) {
  do {
    if ((*__char & 0b1100'0000) != 0b1000'0000)
      return false;
    --__count;
    ++__char;
  } while (__count);
  return true;
}

/// Helper class to extract a code unit from a Unicode character range.
///
/// The stored range is a view. There are multiple specialization for different
/// character types.
template <class _CharT>
class __code_point_view;

/// UTF-8 specialization.
template <>
class __code_point_view<char> {
  using _Iterator = basic_string_view<char>::const_iterator;

public:
  _LIBCPP_HIDE_FROM_ABI constexpr explicit __code_point_view(_Iterator __first, _Iterator __last)
      : __first_(__first), __last_(__last) {}

  _LIBCPP_HIDE_FROM_ABI constexpr bool __at_end() const noexcept { return __first_ == __last_; }
  _LIBCPP_HIDE_FROM_ABI constexpr _Iterator __position() const noexcept { return __first_; }

  // https://www.unicode.org/versions/latest/ch03.pdf#G7404
  // Based on Table 3-7, Well-Formed UTF-8 Byte Sequences
  //
  // Code Points        First Byte Second Byte Third Byte Fourth Byte  Remarks
  // U+0000..U+007F     00..7F                                         U+0000..U+007F 1 code unit range
  //                    C0..C1     80..BF                              invalid overlong encoding
  // U+0080..U+07FF     C2..DF     80..BF                              U+0080..U+07FF 2 code unit range
  //                    E0         80..9F      80..BF                  invalid overlong encoding
  // U+0800..U+0FFF     E0         A0..BF      80..BF                  U+0800..U+FFFF 3 code unit range
  // U+1000..U+CFFF     E1..EC     80..BF      80..BF
  // U+D000..U+D7FF     ED         80..9F      80..BF
  // U+D800..U+DFFF     ED         A0..BF      80..BF                  invalid encoding of surrogate code point
  // U+E000..U+FFFF     EE..EF     80..BF      80..BF
  //                    F0         80..8F      80..BF     80..BF       invalid overlong encoding
  // U+10000..U+3FFFF   F0         90..BF      80..BF     80..BF       U+10000..U+10FFFF 4 code unit range
  // U+40000..U+FFFFF   F1..F3     80..BF      80..BF     80..BF
  // U+100000..U+10FFFF F4         80..8F      80..BF     80..BF
  //                    F4         90..BF      80..BF     80..BF       U+110000.. invalid code point range
  //
  // Unlike other parsers, these invalid entries are tested after decoding.
  // - The parser always needs to consume these code units
  // - The code is optimized for well-formed UTF-8
  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __consume_result __consume() noexcept {
    _LIBCPP_ASSERT_UNCATEGORIZED(__first_ != __last_, "can't move beyond the end of input");

    // Based on the number of leading 1 bits the number of code units in the
    // code point can be determined. See
    // https://en.wikipedia.org/wiki/UTF-8#Encoding
    switch (std::countl_one(static_cast<unsigned char>(*__first_))) {
    case 0:
      return {static_cast<unsigned char>(*__first_++)};

    case 2: {
      if (__last_ - __first_ < 2 || !__unicode::__is_continuation(__first_ + 1, 1)) [[unlikely]]
        break;

      char32_t __value = static_cast<unsigned char>(*__first_++) & 0x1f;
      __value <<= 6;
      __value |= static_cast<unsigned char>(*__first_++) & 0x3f;

      // These values should be encoded in 1 UTF-8 code unit.
      if (__value < 0x0080) [[unlikely]]
        return __consume_result_error;

      return {__value};
    }

    case 3: {
      if (__last_ - __first_ < 3 || !__unicode::__is_continuation(__first_ + 1, 2)) [[unlikely]]
        break;

      char32_t __value = static_cast<unsigned char>(*__first_++) & 0x0f;
      __value <<= 6;
      __value |= static_cast<unsigned char>(*__first_++) & 0x3f;
      __value <<= 6;
      __value |= static_cast<unsigned char>(*__first_++) & 0x3f;

      // These values should be encoded in 1 or 2 UTF-8 code units.
      if (__value < 0x0800) [[unlikely]]
        return __consume_result_error;

      // A surrogate value is always encoded in 3 UTF-8 code units.
      if (__unicode::__is_surrogate(__value)) [[unlikely]]
        return __consume_result_error;

      return {__value};
    }

    case 4: {
      if (__last_ - __first_ < 4 || !__unicode::__is_continuation(__first_ + 1, 3)) [[unlikely]]
        break;

      char32_t __value = static_cast<unsigned char>(*__first_++) & 0x07;
      __value <<= 6;
      __value |= static_cast<unsigned char>(*__first_++) & 0x3f;
      __value <<= 6;
      __value |= static_cast<unsigned char>(*__first_++) & 0x3f;
      __value <<= 6;
      __value |= static_cast<unsigned char>(*__first_++) & 0x3f;

      // These values should be encoded in 1, 2, or 3 UTF-8 code units.
      if (__value < 0x10000) [[unlikely]]
        return __consume_result_error;

      // A value too large is always encoded in 4 UTF-8 code units.
      if (!__unicode::__is_code_point(__value)) [[unlikely]]
        return __consume_result_error;

      return {__value};
    }
    }
    // An invalid number of leading ones can be garbage or a code unit in the
    // middle of a code point. By consuming one code unit the parser may get
    // "in sync" after a few code units.
    ++__first_;
    return __consume_result_error;
  }

private:
  _Iterator __first_;
  _Iterator __last_;
};

#    ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
_LIBCPP_HIDE_FROM_ABI constexpr bool __is_surrogate_pair_high(wchar_t __value) {
  return __value >= 0xd800 && __value <= 0xdbff;
}

_LIBCPP_HIDE_FROM_ABI constexpr bool __is_surrogate_pair_low(wchar_t __value) {
  return __value >= 0xdc00 && __value <= 0xdfff;
}

/// This specialization depends on the size of wchar_t
/// - 2 UTF-16 (for example Windows and AIX)
/// - 4 UTF-32 (for example Linux)
template <>
class __code_point_view<wchar_t> {
  using _Iterator = typename basic_string_view<wchar_t>::const_iterator;

public:
  static_assert(sizeof(wchar_t) == 2 || sizeof(wchar_t) == 4, "sizeof(wchar_t) has a not implemented value");

  _LIBCPP_HIDE_FROM_ABI constexpr explicit __code_point_view(_Iterator __first, _Iterator __last)
      : __first_(__first), __last_(__last) {}

  _LIBCPP_HIDE_FROM_ABI constexpr _Iterator __position() const noexcept { return __first_; }
  _LIBCPP_HIDE_FROM_ABI constexpr bool __at_end() const noexcept { return __first_ == __last_; }

  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __consume_result __consume() noexcept {
    _LIBCPP_ASSERT_UNCATEGORIZED(__first_ != __last_, "can't move beyond the end of input");

    char32_t __value = static_cast<char32_t>(*__first_++);
    if constexpr (sizeof(wchar_t) == 2) {
      if (__unicode::__is_low_surrogate(__value)) [[unlikely]]
        return __consume_result_error;

      if (__unicode::__is_high_surrogate(__value)) {
        if (__first_ == __last_ || !__unicode::__is_low_surrogate(static_cast<char32_t>(*__first_))) [[unlikely]]
          return __consume_result_error;

        __value -= 0xd800;
        __value <<= 10;
        __value += static_cast<char32_t>(*__first_++) - 0xdc00;
        __value += 0x10000;

        if (!__unicode::__is_code_point(__value)) [[unlikely]]
          return __consume_result_error;
      }
    } else {
      if (!__unicode::__is_scalar_value(__value)) [[unlikely]]
        return __consume_result_error;
    }

    return {__value};
  }

private:
  _Iterator __first_;
  _Iterator __last_;
};
#    endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 294 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3

_LIBCPP_HIDE_FROM_ABI constexpr bool __at_extended_grapheme_cluster_break(
    bool& __ri_break_allowed,
    bool __has_extened_pictographic,
    __extended_grapheme_custer_property_boundary::__property __prev,
    __extended_grapheme_custer_property_boundary::__property __next) {
  using __extended_grapheme_custer_property_boundary::__property;

  __has_extened_pictographic |= __prev == __property::__Extended_Pictographic;

  // https://www.unicode.org/reports/tr29/tr29-39.html#Grapheme_Cluster_Boundary_Rules

  // *** Break at the start and end of text, unless the text is empty. ***

  _LIBCPP_ASSERT_UNCATEGORIZED(__prev != __property::__sot, "should be handled in the constructor"); // GB1
  _LIBCPP_ASSERT_UNCATEGORIZED(__prev != __property::__eot, "should be handled by our caller");      // GB2

  // *** Do not break between a CR and LF. Otherwise, break before and after controls. ***
  if (__prev == __property::__CR && __next == __property::__LF) // GB3
    return false;

  if (__prev == __property::__Control || __prev == __property::__CR || __prev == __property::__LF) // GB4
    return true;

  if (__next == __property::__Control || __next == __property::__CR || __next == __property::__LF) // GB5
    return true;

  // *** Do not break Hangul syllable sequences. ***
  if (__prev == __property::__L &&
      (__next == __property::__L || __next == __property::__V || __next == __property::__LV ||
       __next == __property::__LVT)) // GB6
    return false;

  if ((__prev == __property::__LV || __prev == __property::__V) &&
      (__next == __property::__V || __next == __property::__T)) // GB7
    return false;

  if ((__prev == __property::__LVT || __prev == __property::__T) && __next == __property::__T) // GB8
    return false;

  // *** Do not break before extending characters or ZWJ. ***
  if (__next == __property::__Extend || __next == __property::__ZWJ)
    return false; // GB9

  // *** Do not break before SpacingMarks, or after Prepend characters. ***
  if (__next == __property::__SpacingMark) // GB9a
    return false;

  if (__prev == __property::__Prepend) // GB9b
    return false;

  // *** Do not break within emoji modifier sequences or emoji zwj sequences. ***

  // GB11 \p{Extended_Pictographic} Extend* ZWJ x \p{Extended_Pictographic}
  //
  // Note that several parts of this rule are matched by GB9: Any x (Extend | ZWJ)
  // - \p{Extended_Pictographic} x Extend
  // - Extend x Extend
  // - \p{Extended_Pictographic} x ZWJ
  // - Extend x ZWJ
  //
  // So the only case left to test is
  // - \p{Extended_Pictographic}' x ZWJ x \p{Extended_Pictographic}
  //   where  \p{Extended_Pictographic}' is stored in __has_extened_pictographic
  if (__has_extened_pictographic && __prev == __property::__ZWJ && __next == __property::__Extended_Pictographic)
    return false;

  // *** Do not break within emoji flag sequences ***

  // That is, do not break between regional indicator (RI) symbols if there
  // is an odd number of RI characters before the break point.

  if (__prev == __property::__Regional_Indicator && __next == __property::__Regional_Indicator) { // GB12 + GB13
    __ri_break_allowed = !__ri_break_allowed;
    return __ri_break_allowed;
  }

  // *** Otherwise, break everywhere. ***
  return true; // GB999
}

/// Helper class to extract an extended grapheme cluster from a Unicode character range.
///
/// This function is used to determine the column width of an extended grapheme
/// cluster. In order to do that only the first code point is evaluated.
/// Therefore only this code point is extracted.
template <class _CharT>
class __extended_grapheme_cluster_view {
  using _Iterator = typename basic_string_view<_CharT>::const_iterator;

public:
  _LIBCPP_HIDE_FROM_ABI constexpr explicit __extended_grapheme_cluster_view(_Iterator __first, _Iterator __last)
      : __code_point_view_(__first, __last),
        __next_code_point_(__code_point_view_.__consume().__code_point),
        __next_prop_(__extended_grapheme_custer_property_boundary::__get_property(__next_code_point_)) {}

  struct __cluster {
    /// The first code point of the extended grapheme cluster.
    ///
    /// The first code point is used to estimate the width of the extended
    /// grapheme cluster.
    char32_t __code_point_;

    /// Points one beyond the last code unit in the extended grapheme cluster.
    ///
    /// It's expected the caller has the start position and thus can determine
    /// the code unit range of the extended grapheme cluster.
    _Iterator __last_;
  };

  _LIBCPP_HIDE_FROM_ABI constexpr __cluster __consume() {
    _LIBCPP_ASSERT_UNCATEGORIZED(
        __next_prop_ != __extended_grapheme_custer_property_boundary::__property::__eot,
        "can't move beyond the end of input");

    char32_t __code_point = __next_code_point_;
    if (!__code_point_view_.__at_end())
      return {__code_point, __get_break()};

    __next_prop_ = __extended_grapheme_custer_property_boundary::__property::__eot;
    return {__code_point, __code_point_view_.__position()};
  }

private:
  __code_point_view<_CharT> __code_point_view_;

  char32_t __next_code_point_;
  __extended_grapheme_custer_property_boundary::__property __next_prop_;

  _LIBCPP_HIDE_FROM_ABI constexpr _Iterator __get_break() {
    bool __ri_break_allowed         = true;
    bool __has_extened_pictographic = false;
    while (true) {
      _Iterator __result                                              = __code_point_view_.__position();
      __extended_grapheme_custer_property_boundary::__property __prev = __next_prop_;
      if (__code_point_view_.__at_end()) {
        __next_prop_ = __extended_grapheme_custer_property_boundary::__property::__eot;
        return __result;
      }
      __next_code_point_ = __code_point_view_.__consume().__code_point;
      __next_prop_       = __extended_grapheme_custer_property_boundary::__get_property(__next_code_point_);

      __has_extened_pictographic |=
          __prev == __extended_grapheme_custer_property_boundary::__property::__Extended_Pictographic;

      if (__at_extended_grapheme_cluster_break(__ri_break_allowed, __has_extened_pictographic, __prev, __next_prop_))
        return __result;
    }
  }
};

template <contiguous_iterator _Iterator>
__extended_grapheme_cluster_view(_Iterator, _Iterator) -> __extended_grapheme_cluster_view<iter_value_t<_Iterator>>;

#  else //  _LIBCPP_HAS_NO_UNICODE
# 449 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3

// For ASCII every character is a "code point".
// This makes it easier to write code agnostic of the _LIBCPP_HAS_NO_UNICODE define.
template <class _CharT>
class __code_point_view {
  using _Iterator = typename basic_string_view<_CharT>::const_iterator;

public:
  _LIBCPP_HIDE_FROM_ABI constexpr explicit __code_point_view(_Iterator __first, _Iterator __last)
      : __first_(__first), __last_(__last) {}

  _LIBCPP_HIDE_FROM_ABI constexpr bool __at_end() const noexcept { return __first_ == __last_; }
  _LIBCPP_HIDE_FROM_ABI constexpr _Iterator __position() const noexcept { return __first_; }

  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __consume_result __consume() noexcept {
    _LIBCPP_ASSERT_UNCATEGORIZED(__first_ != __last_, "can't move beyond the end of input");
    return {static_cast<char32_t>(*__first_++)};
  }

private:
  _Iterator __first_;
  _Iterator __last_;
};

#  endif //  _LIBCPP_HAS_NO_UNICODE
# 474 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3

} // namespace __unicode

#endif //_LIBCPP_STD_VER >= 20
# 478 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FORMAT_UNICODE_H
# 482 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/unicode.h" 3
#endif /* unicode.h expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* width_estimation_table.h expanded by -frewrite-includes */
#include <__format/width_estimation_table.h>
#else /* width_estimation_table.h expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/width_estimation_table.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// WARNING, this entire header is generated by
// utils/generate_width_estimation_table.py
// DO NOT MODIFY!

// UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
//
// See Terms of Use <https://www.unicode.org/copyright.html>
// for definitions of Unicode Inc.'s Data Files and Software.
//
// NOTICE TO USER: Carefully read the following legal agreement.
// BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
// DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
// YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
// TERMS AND CONDITIONS OF THIS AGREEMENT.
// IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
// THE DATA FILES OR SOFTWARE.
//
// COPYRIGHT AND PERMISSION NOTICE
//
// Copyright (c) 1991-2022 Unicode, Inc. All rights reserved.
// Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of the Unicode data files and any associated documentation
// (the "Data Files") or Unicode software and any associated documentation
// (the "Software") to deal in the Data Files or Software
// without restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, and/or sell copies of
// the Data Files or Software, and to permit persons to whom the Data Files
// or Software are furnished to do so, provided that either
// (a) this copyright and permission notice appear with all copies
// of the Data Files or Software, or
// (b) this copyright and permission notice appear in associated
// Documentation.
//
// THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT OF THIRD PARTY RIGHTS.
// IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
// NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
// DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
// DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
// TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THE DATA FILES OR SOFTWARE.
//
// Except as contained in this notice, the name of a copyright holder
// shall not be used in advertising or otherwise to promote the sale,
// use or other dealings in these Data Files or Software without prior
// written authorization of the copyright holder.

#ifndef _LIBCPP___FORMAT_WIDTH_ESTIMATION_TABLE_H
#define _LIBCPP___FORMAT_WIDTH_ESTIMATION_TABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/ranges_upper_bound.h>
#endif /* expanded by -frewrite-includes */
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/width_estimation_table.h" 3
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/width_estimation_table.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/width_estimation_table.h" 3
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/width_estimation_table.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/width_estimation_table.h" 3
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/width_estimation_table.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/width_estimation_table.h" 3
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/width_estimation_table.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/width_estimation_table.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/width_estimation_table.h" 3
#endif
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/width_estimation_table.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/width_estimation_table.h" 3

namespace __width_estimation_table {

/// The entries of the characters with an estimated width of 2.
///
/// Contains the entries for [format.string.std]/12
///  -  Any code point with the East_Asian_Width="W" or East_Asian_Width="F"
///     Derived Extracted Property as described by UAX #44
/// - U+4DC0 - U+4DFF (Yijing Hexagram Symbols)
/// - U+1F300 - U+1F5FF (Miscellaneous Symbols and Pictographs)
/// - U+1F900 - U+1F9FF (Supplemental Symbols and Pictographs)
///
/// The data is generated from
/// - https://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt
/// - The "overrides" in [format.string.std]/12
///
/// The format of EastAsianWidth.txt is two fields separated by a semicolon.
/// Field 0: Unicode code point value or range of code point values
/// Field 1: East_Asian_Width property, consisting of one of the following values:
///         "A", "F", "H", "N", "Na", "W"
///  - All code points, assigned or unassigned, that are not listed
///      explicitly are given the value "N".
///  - The unassigned code points in the following blocks default to "W":
///         CJK Unified Ideographs Extension A: U+3400..U+4DBF
///         CJK Unified Ideographs:             U+4E00..U+9FFF
///         CJK Compatibility Ideographs:       U+F900..U+FAFF
///  - All undesignated code points in Planes 2 and 3, whether inside or
///      outside of allocated blocks, default to "W":
///         Plane 2:                            U+20000..U+2FFFD
///         Plane 3:                            U+30000..U+3FFFD
///
/// The table is similar to the table
///  __extended_grapheme_custer_property_boundary::__entries
/// which explains the details of these classes. The only difference is this
/// table lacks a property, thus having more bits available for the size.
///
/// The maximum code point that has an estimated width of 2 is U+3FFFD. This
/// value can be encoded in 18 bits. Thus the upper 3 bits of the code point
/// are always 0. These 3 bits are used to enlarge the offset range. This
/// optimization reduces the table in Unicode 15 from 184 to 104 entries,
/// saving 320 bytes.
///
/// The data has 2 values:
/// - bits [0, 13] The size of the range, allowing 16384 elements.
/// - bits [14, 31] The lower bound code point of the range. The upper bound of
///   the range is lower bound + size.
inline constexpr uint32_t __entries[108] = {
    0x0440005f /* 00001100 - 0000115f [   96] */, //
    0x08c68001 /* 0000231a - 0000231b [    2] */, //
    0x08ca4001 /* 00002329 - 0000232a [    2] */, //
    0x08fa4003 /* 000023e9 - 000023ec [    4] */, //
    0x08fc0000 /* 000023f0 - 000023f0 [    1] */, //
    0x08fcc000 /* 000023f3 - 000023f3 [    1] */, //
    0x097f4001 /* 000025fd - 000025fe [    2] */, //
    0x09850001 /* 00002614 - 00002615 [    2] */, //
    0x0992000b /* 00002648 - 00002653 [   12] */, //
    0x099fc000 /* 0000267f - 0000267f [    1] */, //
    0x09a4c000 /* 00002693 - 00002693 [    1] */, //
    0x09a84000 /* 000026a1 - 000026a1 [    1] */, //
    0x09aa8001 /* 000026aa - 000026ab [    2] */, //
    0x09af4001 /* 000026bd - 000026be [    2] */, //
    0x09b10001 /* 000026c4 - 000026c5 [    2] */, //
    0x09b38000 /* 000026ce - 000026ce [    1] */, //
    0x09b50000 /* 000026d4 - 000026d4 [    1] */, //
    0x09ba8000 /* 000026ea - 000026ea [    1] */, //
    0x09bc8001 /* 000026f2 - 000026f3 [    2] */, //
    0x09bd4000 /* 000026f5 - 000026f5 [    1] */, //
    0x09be8000 /* 000026fa - 000026fa [    1] */, //
    0x09bf4000 /* 000026fd - 000026fd [    1] */, //
    0x09c14000 /* 00002705 - 00002705 [    1] */, //
    0x09c28001 /* 0000270a - 0000270b [    2] */, //
    0x09ca0000 /* 00002728 - 00002728 [    1] */, //
    0x09d30000 /* 0000274c - 0000274c [    1] */, //
    0x09d38000 /* 0000274e - 0000274e [    1] */, //
    0x09d4c002 /* 00002753 - 00002755 [    3] */, //
    0x09d5c000 /* 00002757 - 00002757 [    1] */, //
    0x09e54002 /* 00002795 - 00002797 [    3] */, //
    0x09ec0000 /* 000027b0 - 000027b0 [    1] */, //
    0x09efc000 /* 000027bf - 000027bf [    1] */, //
    0x0ac6c001 /* 00002b1b - 00002b1c [    2] */, //
    0x0ad40000 /* 00002b50 - 00002b50 [    1] */, //
    0x0ad54000 /* 00002b55 - 00002b55 [    1] */, //
    0x0ba00019 /* 00002e80 - 00002e99 [   26] */, //
    0x0ba6c058 /* 00002e9b - 00002ef3 [   89] */, //
    0x0bc000d5 /* 00002f00 - 00002fd5 [  214] */, //
    0x0bfc000b /* 00002ff0 - 00002ffb [   12] */, //
    0x0c00003e /* 00003000 - 0000303e [   63] */, //
    0x0c104055 /* 00003041 - 00003096 [   86] */, //
    0x0c264066 /* 00003099 - 000030ff [  103] */, //
    0x0c41402a /* 00003105 - 0000312f [   43] */, //
    0x0c4c405d /* 00003131 - 0000318e [   94] */, //
    0x0c640053 /* 00003190 - 000031e3 [   84] */, //
    0x0c7c002e /* 000031f0 - 0000321e [   47] */, //
    0x0c880027 /* 00003220 - 00003247 [   40] */, //
    0x0c943fff /* 00003250 - 0000724f [16384] */, //
    0x1c94323c /* 00007250 - 0000a48c [12861] */, //
    0x29240036 /* 0000a490 - 0000a4c6 [   55] */, //
    0x2a58001c /* 0000a960 - 0000a97c [   29] */, //
    0x2b002ba3 /* 0000ac00 - 0000d7a3 [11172] */, //
    0x3e4001ff /* 0000f900 - 0000faff [  512] */, //
    0x3f840009 /* 0000fe10 - 0000fe19 [   10] */, //
    0x3f8c0022 /* 0000fe30 - 0000fe52 [   35] */, //
    0x3f950012 /* 0000fe54 - 0000fe66 [   19] */, //
    0x3f9a0003 /* 0000fe68 - 0000fe6b [    4] */, //
    0x3fc0405f /* 0000ff01 - 0000ff60 [   96] */, //
    0x3ff80006 /* 0000ffe0 - 0000ffe6 [    7] */, //
    0x5bf80004 /* 00016fe0 - 00016fe4 [    5] */, //
    0x5bfc0001 /* 00016ff0 - 00016ff1 [    2] */, //
    0x5c0017f7 /* 00017000 - 000187f7 [ 6136] */, //
    0x620004d5 /* 00018800 - 00018cd5 [ 1238] */, //
    0x63400008 /* 00018d00 - 00018d08 [    9] */, //
    0x6bfc0003 /* 0001aff0 - 0001aff3 [    4] */, //
    0x6bfd4006 /* 0001aff5 - 0001affb [    7] */, //
    0x6bff4001 /* 0001affd - 0001affe [    2] */, //
    0x6c000122 /* 0001b000 - 0001b122 [  291] */, //
    0x6c4c8000 /* 0001b132 - 0001b132 [    1] */, //
    0x6c540002 /* 0001b150 - 0001b152 [    3] */, //
    0x6c554000 /* 0001b155 - 0001b155 [    1] */, //
    0x6c590003 /* 0001b164 - 0001b167 [    4] */, //
    0x6c5c018b /* 0001b170 - 0001b2fb [  396] */, //
    0x7c010000 /* 0001f004 - 0001f004 [    1] */, //
    0x7c33c000 /* 0001f0cf - 0001f0cf [    1] */, //
    0x7c638000 /* 0001f18e - 0001f18e [    1] */, //
    0x7c644009 /* 0001f191 - 0001f19a [   10] */, //
    0x7c800002 /* 0001f200 - 0001f202 [    3] */, //
    0x7c84002b /* 0001f210 - 0001f23b [   44] */, //
    0x7c900008 /* 0001f240 - 0001f248 [    9] */, //
    0x7c940001 /* 0001f250 - 0001f251 [    2] */, //
    0x7c980005 /* 0001f260 - 0001f265 [    6] */, //
    0x7cc0034f /* 0001f300 - 0001f64f [  848] */, //
    0x7da00045 /* 0001f680 - 0001f6c5 [   70] */, //
    0x7db30000 /* 0001f6cc - 0001f6cc [    1] */, //
    0x7db40002 /* 0001f6d0 - 0001f6d2 [    3] */, //
    0x7db54002 /* 0001f6d5 - 0001f6d7 [    3] */, //
    0x7db70003 /* 0001f6dc - 0001f6df [    4] */, //
    0x7dbac001 /* 0001f6eb - 0001f6ec [    2] */, //
    0x7dbd0008 /* 0001f6f4 - 0001f6fc [    9] */, //
    0x7df8000b /* 0001f7e0 - 0001f7eb [   12] */, //
    0x7dfc0000 /* 0001f7f0 - 0001f7f0 [    1] */, //
    0x7e4000ff /* 0001f900 - 0001f9ff [  256] */, //
    0x7e9c000c /* 0001fa70 - 0001fa7c [   13] */, //
    0x7ea00008 /* 0001fa80 - 0001fa88 [    9] */, //
    0x7ea4002d /* 0001fa90 - 0001fabd [   46] */, //
    0x7eafc006 /* 0001fabf - 0001fac5 [    7] */, //
    0x7eb3800d /* 0001face - 0001fadb [   14] */, //
    0x7eb80008 /* 0001fae0 - 0001fae8 [    9] */, //
    0x7ebc0008 /* 0001faf0 - 0001faf8 [    9] */, //
    0x80003fff /* 00020000 - 00023fff [16384] */, //
    0x90003fff /* 00024000 - 00027fff [16384] */, //
    0xa0003fff /* 00028000 - 0002bfff [16384] */, //
    0xb0003ffd /* 0002c000 - 0002fffd [16382] */, //
    0xc0003fff /* 00030000 - 00033fff [16384] */, //
    0xd0003fff /* 00034000 - 00037fff [16384] */, //
    0xe0003fff /* 00038000 - 0003bfff [16384] */, //
    0xf0003ffd /* 0003c000 - 0003fffd [16382] */};

/// The upper bound entry of EastAsianWidth.txt.
///
/// Values greater than this value may have more than 18 significant bits.
/// They always have a width of 1. This property makes it possible to store
/// the table in its compact form.
inline constexpr uint32_t __table_upper_bound = 0x0003fffd;

/// Returns the estimated width of a Unicode code point.
///
/// \pre The code point is a valid Unicode code point.
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr int __estimated_width(const char32_t __code_point) noexcept {
  // Since __table_upper_bound contains the unshifted range do the
  // comparison without shifting.
  if (__code_point > __table_upper_bound) [[unlikely]]
    return 1;

  // When the code-point is less than the first element in the table
  // the lookup is quite expensive. Since quite some scripts are in
  // that range, it makes sense to validate that first.
  // The std_format_spec_string_unicode benchmark gives a measurable
  // improvement.
  if (__code_point < (__entries[0] >> 14))
    return 1;

  ptrdiff_t __i = std::ranges::upper_bound(__entries, (__code_point << 14) | 0x3fffu) - __entries;
  if (__i == 0)
    return 1;

  --__i;
  uint32_t __upper_bound = (__entries[__i] >> 14) + (__entries[__i] & 0x3fffu);
  return 1 + (__code_point <= __upper_bound);
}

} // namespace __width_estimation_table

#endif //_LIBCPP_STD_VER >= 20
# 268 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/width_estimation_table.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FORMAT_WIDTH_ESTIMATION_TABLE_H
# 272 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/width_estimation_table.h" 3
#endif /* width_estimation_table.h expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h> // iter_value_t
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/common_type.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constant_evaluated.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copyable.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__variant/monostate.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <string>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <string_view>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#endif
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3

namespace __format_spec {

_LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI inline void
__throw_invalid_option_format_error(const char* __id, const char* __option) {
  std::__throw_format_error(
      (string("The format specifier for ") + __id + " does not allow the " + __option + " option").c_str());
}

_LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI inline void __throw_invalid_type_format_error(const char* __id) {
  std::__throw_format_error(
      (string("The type option contains an invalid value for ") + __id + " formatting argument").c_str());
}

template <contiguous_iterator _Iterator, class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr __format::__parse_number_result<_Iterator>
__parse_arg_id(_Iterator __begin, _Iterator __end, _ParseContext& __ctx) {
  using _CharT = iter_value_t<_Iterator>;
  // This function is a wrapper to call the real parser. But it does the
  // validation for the pre-conditions and post-conditions.
  if (__begin == __end)
    std::__throw_format_error("End of input while parsing an argument index");

  __format::__parse_number_result __r = __format::__parse_arg_id(__begin, __end, __ctx);

  if (__r.__last == __end || *__r.__last != _CharT('}'))
    std::__throw_format_error("The argument index is invalid");

  ++__r.__last;
  return __r;
}

template <class _Context>
_LIBCPP_HIDE_FROM_ABI constexpr uint32_t
__substitute_arg_id(basic_format_arg<_Context> __format_arg) {
  // [format.string.std]/8
  //   If the corresponding formatting argument is not of integral type...
  // This wording allows char and bool too. LWG-3720 changes the wording to
  //    If the corresponding formatting argument is not of standard signed or
  //    unsigned integer type,
  // This means the 128-bit will not be valid anymore.
  // TODO FMT Verify this resolution is accepted and add a test to verify
  //          128-bit integrals fail and switch to visit_format_arg.
  return _VSTD::__visit_format_arg(
      [](auto __arg) -> uint32_t {
        using _Type = decltype(__arg);
        if constexpr (same_as<_Type, monostate>)
          std::__throw_format_error("The argument index value is too large for the number of arguments supplied");

        // [format.string.std]/8
        // If { arg-idopt } is used in a width or precision, the value of the
        // corresponding formatting argument is used in its place. If the
        // corresponding formatting argument is not of standard signed or unsigned
        // integer type, or its value is negative for precision or non-positive for
        // width, an exception of type format_error is thrown.
        //
        // When an integral is used in a format function, it is stored as one of
        // the types checked below. Other integral types are promoted. For example,
        // a signed char is stored as an int.
        if constexpr (same_as<_Type, int> || same_as<_Type, unsigned int> || //
                      same_as<_Type, long long> || same_as<_Type, unsigned long long>) {
          if constexpr (signed_integral<_Type>) {
            if (__arg < 0)
              std::__throw_format_error("An argument index may not have a negative value");
          }

          using _CT = common_type_t<_Type, decltype(__format::__number_max)>;
          if (static_cast<_CT>(__arg) > static_cast<_CT>(__format::__number_max))
            std::__throw_format_error("The value of the argument index exceeds its maximum value");

          return __arg;
        } else
          std::__throw_format_error("Replacement argument isn't a standard signed or unsigned integer type");
      },
      __format_arg);
}

/// These fields are a filter for which elements to parse.
///
/// They default to false so when a new field is added it needs to be opted in
/// explicitly.
// TODO FMT Use an ABI tag for this struct.
struct __fields {
  uint16_t __sign_                 : 1 {false};
  uint16_t __alternate_form_       : 1 {false};
  uint16_t __zero_padding_         : 1 {false};
  uint16_t __precision_            : 1 {false};
  uint16_t __locale_specific_form_ : 1 {false};
  uint16_t __type_                 : 1 {false};
  // Determines the valid values for fill.
  //
  // Originally the fill could be any character except { and }. Range-based
  // formatters use the colon to mark the beginning of the
  // underlying-format-spec. To avoid parsing ambiguities these formatter
  // specializations prohibit the use of the colon as a fill character.
  uint16_t __use_range_fill_ : 1 {false};
  uint16_t __clear_brackets_ : 1 {false};
  uint16_t __consume_all_    : 1 {false};
};

// By not placing this constant in the formatter class it's not duplicated for
// char and wchar_t.
inline constexpr __fields __fields_bool{.__locale_specific_form_ = true, .__type_ = true, .__consume_all_ = true};
inline constexpr __fields __fields_integral{
    .__sign_                 = true,
    .__alternate_form_       = true,
    .__zero_padding_         = true,
    .__locale_specific_form_ = true,
    .__type_                 = true,
    .__consume_all_          = true};
inline constexpr __fields __fields_floating_point{
    .__sign_                 = true,
    .__alternate_form_       = true,
    .__zero_padding_         = true,
    .__precision_            = true,
    .__locale_specific_form_ = true,
    .__type_                 = true,
    .__consume_all_          = true};
inline constexpr __fields __fields_string{.__precision_ = true, .__type_ = true, .__consume_all_ = true};
inline constexpr __fields __fields_pointer{.__zero_padding_ = true, .__type_ = true, .__consume_all_ = true};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 174 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
inline constexpr __fields __fields_tuple{.__use_range_fill_ = true, .__clear_brackets_ = true};
inline constexpr __fields __fields_range{.__use_range_fill_ = true, .__clear_brackets_ = true};
inline constexpr __fields __fields_fill_align_width{};
#  endif
# 178 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3

enum class __alignment : uint8_t {
  /// No alignment is set in the format string.
  __default,
  __left,
  __center,
  __right,
  __zero_padding
};

enum class __sign : uint8_t {
  /// No sign is set in the format string.
  ///
  /// The sign isn't allowed for certain format-types. By using this value
  /// it's possible to detect whether or not the user explicitly set the sign
  /// flag. For formatting purposes it behaves the same as \ref __minus.
  __default,
  __minus,
  __plus,
  __space
};

enum class __type : uint8_t {
  __default = 0,
  __string,
  __binary_lower_case,
  __binary_upper_case,
  __octal,
  __decimal,
  __hexadecimal_lower_case,
  __hexadecimal_upper_case,
  __pointer_lower_case,
  __pointer_upper_case,
  __char,
  __hexfloat_lower_case,
  __hexfloat_upper_case,
  __scientific_lower_case,
  __scientific_upper_case,
  __fixed_lower_case,
  __fixed_upper_case,
  __general_lower_case,
  __general_upper_case,
  __debug
};

_LIBCPP_HIDE_FROM_ABI inline constexpr uint32_t __create_type_mask(__type __t) {
  uint32_t __shift = static_cast<uint32_t>(__t);
  if (__shift == 0)
    return 1;

  if (__shift > 31)
    std::__throw_format_error("The type does not fit in the mask");

  return 1 << __shift;
}

inline constexpr uint32_t __type_mask_integer =
    __create_type_mask(__type::__binary_lower_case) |      //
    __create_type_mask(__type::__binary_upper_case) |      //
    __create_type_mask(__type::__decimal) |                //
    __create_type_mask(__type::__octal) |                  //
    __create_type_mask(__type::__hexadecimal_lower_case) | //
    __create_type_mask(__type::__hexadecimal_upper_case);

struct __std {
  __alignment __alignment_ : 3;
  __sign __sign_ : 2;
  bool __alternate_form_ : 1;
  bool __locale_specific_form_ : 1;
  __type __type_;
};

struct __chrono {
  __alignment __alignment_ : 3;
  bool __locale_specific_form_ : 1;
  bool __hour_                 : 1;
  bool __weekday_name_ : 1;
  bool __weekday_              : 1;
  bool __day_of_year_          : 1;
  bool __week_of_year_         : 1;
  bool __month_name_ : 1;
};

// The fill UCS scalar value.
//
// This is always an array, with 1, 2, or 4 elements.
// The size of the data structure is always 32-bits.
template <class _CharT>
struct __code_point;

template <>
struct __code_point<char> {
  char __data[4] = {' '};
};

#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
struct __code_point<wchar_t> {
  wchar_t __data[4 / sizeof(wchar_t)] = {L' '};
};
#  endif
# 279 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3

/// Contains the parsed formatting specifications.
///
/// This contains information for both the std-format-spec and the
/// chrono-format-spec. This results in some unused members for both
/// specifications. However these unused members don't increase the size
/// of the structure.
///
/// This struct doesn't cross ABI boundaries so its layout doesn't need to be
/// kept stable.
template <class _CharT>
struct __parsed_specifications {
  union {
    // The field __alignment_ is the first element in __std_ and __chrono_.
    // This allows the code to always inspect this value regards which member
    // of the union is the active member [class.union.general]/2.
    //
    // This is needed since the generic output routines handle the alignment of
    // the output.
    __alignment __alignment_ : 3;
    __std __std_;
    __chrono __chrono_;
  };

  /// The requested width.
  ///
  /// When the format-spec used an arg-id for this field it has already been
  /// replaced with the value of that arg-id.
  int32_t __width_;

  /// The requested precision.
  ///
  /// When the format-spec used an arg-id for this field it has already been
  /// replaced with the value of that arg-id.
  int32_t __precision_;

  __code_point<_CharT> __fill_;

  _LIBCPP_HIDE_FROM_ABI constexpr bool __has_width() const { return __width_ > 0; }

  _LIBCPP_HIDE_FROM_ABI constexpr bool __has_precision() const { return __precision_ >= 0; }
};

// Validate the struct is small and cheap to copy since the struct is passed by
// value in formatting functions.
static_assert(sizeof(__parsed_specifications<char>) == 16);
static_assert(is_trivially_copyable_v<__parsed_specifications<char>>);
#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
static_assert(sizeof(__parsed_specifications<wchar_t>) == 16);
static_assert(is_trivially_copyable_v<__parsed_specifications<wchar_t>>);
#  endif
# 330 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3

/// The parser for the std-format-spec.
///
/// Note this class is a member of std::formatter specializations. It's
/// expected developers will create their own formatter specializations that
/// inherit from the std::formatter specializations. This means this class
/// must be ABI stable. To aid the stability the unused bits in the class are
/// set to zero. That way they can be repurposed if a future revision of the
/// Standards adds new fields to std-format-spec.
template <class _CharT>
class _LIBCPP_TEMPLATE_VIS __parser {
public:
  // Parses the format specification.
  //
  // Depending on whether the parsing is done compile-time or run-time
  // the method slightly differs.
  // - Only parses a field when it is in the __fields. Accepting all
  //   fields and then validating the valid ones has a performance impact.
  //   This is faster but gives slighly worse error messages.
  // - At compile-time when a field is not accepted the parser will still
  //   parse it and give an error when it's present. This gives a more
  //   accurate error.
  // The idea is that most times the format instead of the vformat
  // functions are used. In that case the error will be detected during
  // compilation and there is no need to pay for the run-time overhead.
  template <class _ParseContext>
  _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator __parse(_ParseContext& __ctx, __fields __fields) {
    auto __begin = __ctx.begin();
    auto __end   = __ctx.end();
    if (__begin == __end)
      return __begin;

    if (__parse_fill_align(__begin, __end, __fields.__use_range_fill_) && __begin == __end)
      return __begin;

    if (__fields.__sign_) {
      if (__parse_sign(__begin) && __begin == __end)
        return __begin;
    } else if (std::is_constant_evaluated() && __parse_sign(__begin)) {
      std::__throw_format_error("The format specification does not allow the sign option");
    }

    if (__fields.__alternate_form_) {
      if (__parse_alternate_form(__begin) && __begin == __end)
        return __begin;
    } else if (std::is_constant_evaluated() && __parse_alternate_form(__begin)) {
      std::__throw_format_error("The format specifier does not allow the alternate form option");
    }

    if (__fields.__zero_padding_) {
      if (__parse_zero_padding(__begin) && __begin == __end)
        return __begin;
    } else if (std::is_constant_evaluated() && __parse_zero_padding(__begin)) {
      std::__throw_format_error("The format specifier does not allow the zero-padding option");
    }

    if (__parse_width(__begin, __end, __ctx) && __begin == __end)
      return __begin;

    if (__fields.__precision_) {
      if (__parse_precision(__begin, __end, __ctx) && __begin == __end)
        return __begin;
    } else if (std::is_constant_evaluated() && __parse_precision(__begin, __end, __ctx)) {
      std::__throw_format_error("The format specifier does not allow the precision option");
    }

    if (__fields.__locale_specific_form_) {
      if (__parse_locale_specific_form(__begin) && __begin == __end)
        return __begin;
    } else if (std::is_constant_evaluated() && __parse_locale_specific_form(__begin)) {
      std::__throw_format_error("The format specifier does not allow the locale-specific form option");
    }

    if (__fields.__clear_brackets_) {
      if (__parse_clear_brackets(__begin) && __begin == __end)
        return __begin;
    } else if (std::is_constant_evaluated() && __parse_clear_brackets(__begin)) {
      std::__throw_format_error("The format specifier does not allow the n option");
    }

    if (__fields.__type_)
      __parse_type(__begin);

    if (!__fields.__consume_all_)
      return __begin;

    if (__begin != __end && *__begin != _CharT('}'))
      std::__throw_format_error("The format specifier should consume the input or end with a '}'");

    return __begin;
  }

  // Validates the selected the parsed data.
  //
  // The valid fields in the parser may depend on the display type
  // selected. But the type is the last optional field, so by the time
  // it's known an option can't be used, it already has been parsed.
  // This does the validation again.
  //
  // For example an integral may have a sign, zero-padding, or alternate
  // form when the type option is not 'c'. So the generic approach is:
  //
  // typename _ParseContext::iterator __result = __parser_.__parse(__ctx, __format_spec::__fields_integral);
  // if (__parser.__type_ == __format_spec::__type::__char) {
  //   __parser.__validate((__format_spec::__fields_bool, "an integer");
  //   ... // more char adjustments
  // } else {
  //   ... // validate an integral type.
  // }
  //
  // For some types all valid options need a second validation run, like
  // boolean types.
  //
  // Depending on whether the validation is done at compile-time or
  // run-time the error differs
  // - run-time the exception is thrown and contains the type of field
  //   being validated.
  // - at compile-time the line with `std::__throw_format_error` is shown
  //   in the output. In that case it's important for the error to be on one
  //   line.
  // Note future versions of C++ may allow better compile-time error
  // reporting.
  _LIBCPP_HIDE_FROM_ABI constexpr void
  __validate(__fields __fields, const char* __id, uint32_t __type_mask = -1) const {
    if (!__fields.__sign_ && __sign_ != __sign::__default) {
      if (std::is_constant_evaluated())
        std::__throw_format_error("The format specifier does not allow the sign option");
      else
        __format_spec::__throw_invalid_option_format_error(__id, "sign");
    }

    if (!__fields.__alternate_form_ && __alternate_form_) {
      if (std::is_constant_evaluated())
        std::__throw_format_error("The format specifier does not allow the alternate form option");
      else
        __format_spec::__throw_invalid_option_format_error(__id, "alternate form");
    }

    if (!__fields.__zero_padding_ && __alignment_ == __alignment::__zero_padding) {
      if (std::is_constant_evaluated())
        std::__throw_format_error("The format specifier does not allow the zero-padding option");
      else
        __format_spec::__throw_invalid_option_format_error(__id, "zero-padding");
    }

    if (!__fields.__precision_ && __precision_ != -1) { // Works both when the precision has a value or an arg-id.
      if (std::is_constant_evaluated())
        std::__throw_format_error("The format specifier does not allow the precision option");
      else
        __format_spec::__throw_invalid_option_format_error(__id, "precision");
    }

    if (!__fields.__locale_specific_form_ && __locale_specific_form_) {
      if (std::is_constant_evaluated())
        std::__throw_format_error("The format specifier does not allow the locale-specific form option");
      else
        __format_spec::__throw_invalid_option_format_error(__id, "locale-specific form");
    }

    if ((__create_type_mask(__type_) & __type_mask) == 0) {
      if (std::is_constant_evaluated())
        std::__throw_format_error("The format specifier uses an invalid value for the type option");
      else
        __format_spec::__throw_invalid_type_format_error(__id);
    }
  }

  /// \returns the `__parsed_specifications` with the resolved dynamic sizes..
  _LIBCPP_HIDE_FROM_ABI
  __parsed_specifications<_CharT> __get_parsed_std_specifications(auto& __ctx) const {
    return __parsed_specifications<_CharT>{
        .__std_ = __std{.__alignment_            = __alignment_,
                        .__sign_                 = __sign_,
                        .__alternate_form_       = __alternate_form_,
                        .__locale_specific_form_ = __locale_specific_form_,
                        .__type_                 = __type_},
        .__width_{__get_width(__ctx)},
        .__precision_{__get_precision(__ctx)},
        .__fill_{__fill_}};
  }

  _LIBCPP_HIDE_FROM_ABI __parsed_specifications<_CharT> __get_parsed_chrono_specifications(auto& __ctx) const {
    return __parsed_specifications<_CharT>{
        .__chrono_ =
            __chrono{.__alignment_            = __alignment_,
                     .__locale_specific_form_ = __locale_specific_form_,
                     .__hour_                 = __hour_,
                     .__weekday_name_         = __weekday_name_,
                     .__weekday_              = __weekday_,
                     .__day_of_year_          = __day_of_year_,
                     .__week_of_year_         = __week_of_year_,
                     .__month_name_           = __month_name_},
        .__width_{__get_width(__ctx)},
        .__precision_{__get_precision(__ctx)},
        .__fill_{__fill_}};
  }

  __alignment __alignment_ : 3 {__alignment::__default};
  __sign __sign_ : 2 {__sign::__default};
  bool __alternate_form_ : 1 {false};
  bool __locale_specific_form_ : 1 {false};
  bool __clear_brackets_       : 1 {false};
  __type __type_{__type::__default};

  // These flags are only used for formatting chrono. Since the struct has
  // padding space left it's added to this structure.
  bool __hour_ : 1 {false};

  bool __weekday_name_ : 1 {false};
  bool __weekday_      : 1 {false};

  bool __day_of_year_  : 1 {false};
  bool __week_of_year_ : 1 {false};

  bool __month_name_ : 1 {false};

  uint8_t __reserved_0_ : 2 {0};
  uint8_t __reserved_1_ : 6 {0};
  // These two flags are only used internally and not part of the
  // __parsed_specifications. Therefore put them at the end.
  bool __width_as_arg_ : 1 {false};
  bool __precision_as_arg_ : 1 {false};

  /// The requested width, either the value or the arg-id.
  int32_t __width_{0};

  /// The requested precision, either the value or the arg-id.
  int32_t __precision_{-1};

  __code_point<_CharT> __fill_{};

private:
  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_alignment(_CharT __c) {
    switch (__c) {
    case _CharT('<'):
      __alignment_ = __alignment::__left;
      return true;

    case _CharT('^'):
      __alignment_ = __alignment::__center;
      return true;

    case _CharT('>'):
      __alignment_ = __alignment::__right;
      return true;
    }
    return false;
  }

  _LIBCPP_HIDE_FROM_ABI constexpr void __validate_fill_character(_CharT __fill, bool __use_range_fill) {
    // The forbidden fill characters all code points formed from a single code unit, thus the
    // check can be omitted when more code units are used.
    if (__use_range_fill && (__fill == _CharT('{') || __fill == _CharT('}') || __fill == _CharT(':')))
      std::__throw_format_error("The fill option contains an invalid value");
    else if (__fill == _CharT('{') || __fill == _CharT('}'))
      std::__throw_format_error("The fill option contains an invalid value");
  }

#  ifndef _LIBCPP_HAS_NO_UNICODE
  // range-fill and tuple-fill are identical
  template <contiguous_iterator _Iterator>
    requires same_as<_CharT, char>
#    ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
          || (same_as<_CharT, wchar_t> && sizeof(wchar_t) == 2)
#    endif
# 595 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_fill_align(_Iterator& __begin, _Iterator __end, bool __use_range_fill) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__begin != __end,
                                 "when called with an empty input the function will cause "
                                 "undefined behavior by evaluating data not in the input");
    __unicode::__code_point_view<_CharT> __view{__begin, __end};
    __unicode::__consume_result __consumed = __view.__consume();
    if (__consumed.__status != __unicode::__consume_result::__ok)
      std::__throw_format_error("The format specifier contains malformed Unicode characters");

    if (__view.__position() < __end && __parse_alignment(*__view.__position())) {
      ptrdiff_t __code_units = __view.__position() - __begin;
      if (__code_units == 1)
        // The forbidden fill characters all are code points encoded
        // in one code unit, thus the check can be omitted when more
        // code units are used.
        __validate_fill_character(*__begin, __use_range_fill);

      std::copy_n(__begin, __code_units, std::addressof(__fill_.__data[0]));
      __begin += __code_units + 1;
      return true;
    }

    if (!__parse_alignment(*__begin))
      return false;

    ++__begin;
    return true;
  }

#    ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
  template <contiguous_iterator _Iterator>
    requires(same_as<_CharT, wchar_t> && sizeof(wchar_t) == 4)
  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_fill_align(_Iterator& __begin, _Iterator __end, bool __use_range_fill) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__begin != __end,
                                 "when called with an empty input the function will cause "
                                 "undefined behavior by evaluating data not in the input");
    if (__begin + 1 != __end && __parse_alignment(*(__begin + 1))) {
      if (!__unicode::__is_scalar_value(*__begin))
        std::__throw_format_error("The fill option contains an invalid value");

      __validate_fill_character(*__begin, __use_range_fill);

      __fill_.__data[0] = *__begin;
      __begin += 2;
      return true;
    }

    if (!__parse_alignment(*__begin))
      return false;

    ++__begin;
    return true;
  }

#    endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 650 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3

#  else // _LIBCPP_HAS_NO_UNICODE
# 652 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
  // range-fill and tuple-fill are identical
  template <contiguous_iterator _Iterator>
  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_fill_align(_Iterator& __begin, _Iterator __end, bool __use_range_fill) {
    _LIBCPP_ASSERT_UNCATEGORIZED(__begin != __end,
                                 "when called with an empty input the function will cause "
                                 "undefined behavior by evaluating data not in the input");
    if (__begin + 1 != __end) {
      if (__parse_alignment(*(__begin + 1))) {
        __validate_fill_character(*__begin, __use_range_fill);

        __fill_.__data[0] = *__begin;
        __begin += 2;
        return true;
      }
    }

    if (!__parse_alignment(*__begin))
      return false;

    ++__begin;
    return true;
  }

#  endif // _LIBCPP_HAS_NO_UNICODE
# 676 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3

  template <contiguous_iterator _Iterator>
  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_sign(_Iterator& __begin) {
    switch (*__begin) {
    case _CharT('-'):
      __sign_ = __sign::__minus;
      break;
    case _CharT('+'):
      __sign_ = __sign::__plus;
      break;
    case _CharT(' '):
      __sign_ = __sign::__space;
      break;
    default:
      return false;
    }
    ++__begin;
    return true;
  }

  template <contiguous_iterator _Iterator>
  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_alternate_form(_Iterator& __begin) {
    if (*__begin != _CharT('#'))
      return false;

    __alternate_form_ = true;
    ++__begin;
    return true;
  }

  template <contiguous_iterator _Iterator>
  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_zero_padding(_Iterator& __begin) {
    if (*__begin != _CharT('0'))
      return false;

    if (__alignment_ == __alignment::__default)
      __alignment_ = __alignment::__zero_padding;
    ++__begin;
    return true;
  }

  template <contiguous_iterator _Iterator>
  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_width(_Iterator& __begin, _Iterator __end, auto& __ctx) {
    if (*__begin == _CharT('0'))
      std::__throw_format_error("The width option should not have a leading zero");

    if (*__begin == _CharT('{')) {
      __format::__parse_number_result __r = __format_spec::__parse_arg_id(++__begin, __end, __ctx);
      __width_as_arg_ = true;
      __width_ = __r.__value;
      __begin = __r.__last;
      return true;
    }

    if (*__begin < _CharT('0') || *__begin > _CharT('9'))
      return false;

    __format::__parse_number_result __r = __format::__parse_number(__begin, __end);
    __width_ = __r.__value;
    _LIBCPP_ASSERT_UNCATEGORIZED(__width_ != 0, "A zero value isn't allowed and should be impossible, "
                                                "due to validations in this function");
    __begin = __r.__last;
    return true;
  }

  template <contiguous_iterator _Iterator>
  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_precision(_Iterator& __begin, _Iterator __end, auto& __ctx) {
    if (*__begin != _CharT('.'))
      return false;

    ++__begin;
    if (__begin == __end)
      std::__throw_format_error("End of input while parsing format specifier precision");

    if (*__begin == _CharT('{')) {
      __format::__parse_number_result __arg_id = __format_spec::__parse_arg_id(++__begin, __end, __ctx);
      __precision_as_arg_ = true;
      __precision_ = __arg_id.__value;
      __begin = __arg_id.__last;
      return true;
    }

    if (*__begin < _CharT('0') || *__begin > _CharT('9'))
      std::__throw_format_error("The precision option does not contain a value or an argument index");

    __format::__parse_number_result __r = __format::__parse_number(__begin, __end);
    __precision_ = __r.__value;
    __precision_as_arg_ = false;
    __begin = __r.__last;
    return true;
  }

  template <contiguous_iterator _Iterator>
  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_locale_specific_form(_Iterator& __begin) {
    if (*__begin != _CharT('L'))
      return false;

    __locale_specific_form_ = true;
    ++__begin;
    return true;
  }

  template <contiguous_iterator _Iterator>
  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_clear_brackets(_Iterator& __begin) {
    if (*__begin != _CharT('n'))
      return false;

    __clear_brackets_ = true;
    ++__begin;
    return true;
  }

  template <contiguous_iterator _Iterator>
  _LIBCPP_HIDE_FROM_ABI constexpr void __parse_type(_Iterator& __begin) {
    // Determines the type. It does not validate whether the selected type is
    // valid. Most formatters have optional fields that are only allowed for
    // certain types. These parsers need to do validation after the type has
    // been parsed. So its easier to implement the validation for all types in
    // the specific parse function.
    switch (*__begin) {
    case 'A':
      __type_ = __type::__hexfloat_upper_case;
      break;
    case 'B':
      __type_ = __type::__binary_upper_case;
      break;
    case 'E':
      __type_ = __type::__scientific_upper_case;
      break;
    case 'F':
      __type_ = __type::__fixed_upper_case;
      break;
    case 'G':
      __type_ = __type::__general_upper_case;
      break;
    case 'X':
      __type_ = __type::__hexadecimal_upper_case;
      break;
    case 'a':
      __type_ = __type::__hexfloat_lower_case;
      break;
    case 'b':
      __type_ = __type::__binary_lower_case;
      break;
    case 'c':
      __type_ = __type::__char;
      break;
    case 'd':
      __type_ = __type::__decimal;
      break;
    case 'e':
      __type_ = __type::__scientific_lower_case;
      break;
    case 'f':
      __type_ = __type::__fixed_lower_case;
      break;
    case 'g':
      __type_ = __type::__general_lower_case;
      break;
    case 'o':
      __type_ = __type::__octal;
      break;
    case 'p':
      __type_ = __type::__pointer_lower_case;
      break;
    case 'P':
      __type_ = __type::__pointer_upper_case;
      break;
    case 's':
      __type_ = __type::__string;
      break;
    case 'x':
      __type_ = __type::__hexadecimal_lower_case;
      break;
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 851 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
    case '?':
      __type_ = __type::__debug;
      break;
#  endif
# 855 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
    default:
      return;
    }
    ++__begin;
  }

  _LIBCPP_HIDE_FROM_ABI
  int32_t __get_width(auto& __ctx) const {
    if (!__width_as_arg_)
      return __width_;

    return __format_spec::__substitute_arg_id(__ctx.arg(__width_));
  }

  _LIBCPP_HIDE_FROM_ABI
  int32_t __get_precision(auto& __ctx) const {
    if (!__precision_as_arg_)
      return __precision_;

    return __format_spec::__substitute_arg_id(__ctx.arg(__precision_));
  }
};

// Validates whether the reserved bitfields don't change the size.
static_assert(sizeof(__parser<char>) == 16);
#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
static_assert(sizeof(__parser<wchar_t>) == 16);
#  endif
# 883 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3

_LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_string(__format_spec::__type __type) {
  switch (__type) {
  case __format_spec::__type::__default:
  case __format_spec::__type::__string:
  case __format_spec::__type::__debug:
    break;

  default:
    std::__throw_format_error("The type option contains an invalid value for a string formatting argument");
  }
}

template <class _CharT>
_LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_bool_string(__parser<_CharT>& __parser, const char* __id) {
  __parser.__validate(__format_spec::__fields_bool, __id);
  if (__parser.__alignment_ == __alignment::__default)
    __parser.__alignment_ = __alignment::__left;
}

template <class _CharT>
_LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_char(__parser<_CharT>& __parser, const char* __id) {
  __format_spec::__process_display_type_bool_string(__parser, __id);
}

template <class _CharT>
_LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_bool(__parser<_CharT>& __parser, const char* __id) {
  switch (__parser.__type_) {
  case __format_spec::__type::__default:
  case __format_spec::__type::__string:
    __format_spec::__process_display_type_bool_string(__parser, __id);
    break;

  case __format_spec::__type::__binary_lower_case:
  case __format_spec::__type::__binary_upper_case:
  case __format_spec::__type::__octal:
  case __format_spec::__type::__decimal:
  case __format_spec::__type::__hexadecimal_lower_case:
  case __format_spec::__type::__hexadecimal_upper_case:
    break;

  default:
    __format_spec::__throw_invalid_type_format_error(__id);
  }
}

template <class _CharT>
_LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_char(__parser<_CharT>& __parser, const char* __id) {
  switch (__parser.__type_) {
  case __format_spec::__type::__default:
  case __format_spec::__type::__char:
  case __format_spec::__type::__debug:
    __format_spec::__process_display_type_char(__parser, __id);
    break;

  case __format_spec::__type::__binary_lower_case:
  case __format_spec::__type::__binary_upper_case:
  case __format_spec::__type::__octal:
  case __format_spec::__type::__decimal:
  case __format_spec::__type::__hexadecimal_lower_case:
  case __format_spec::__type::__hexadecimal_upper_case:
    break;

  default:
    __format_spec::__throw_invalid_type_format_error(__id);
  }
}

template <class _CharT>
_LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_integer(__parser<_CharT>& __parser, const char* __id) {
  switch (__parser.__type_) {
  case __format_spec::__type::__default:
  case __format_spec::__type::__binary_lower_case:
  case __format_spec::__type::__binary_upper_case:
  case __format_spec::__type::__octal:
  case __format_spec::__type::__decimal:
  case __format_spec::__type::__hexadecimal_lower_case:
  case __format_spec::__type::__hexadecimal_upper_case:
    break;

  case __format_spec::__type::__char:
    __format_spec::__process_display_type_char(__parser, __id);
    break;

  default:
    __format_spec::__throw_invalid_type_format_error(__id);
  }
}

template <class _CharT>
_LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_floating_point(__parser<_CharT>& __parser, const char* __id) {
  switch (__parser.__type_) {
  case __format_spec::__type::__default:
  case __format_spec::__type::__hexfloat_lower_case:
  case __format_spec::__type::__hexfloat_upper_case:
    // Precision specific behavior will be handled later.
    break;
  case __format_spec::__type::__scientific_lower_case:
  case __format_spec::__type::__scientific_upper_case:
  case __format_spec::__type::__fixed_lower_case:
  case __format_spec::__type::__fixed_upper_case:
  case __format_spec::__type::__general_lower_case:
  case __format_spec::__type::__general_upper_case:
    if (!__parser.__precision_as_arg_ && __parser.__precision_ == -1)
      // Set the default precision for the call to to_chars.
      __parser.__precision_ = 6;
    break;

  default:
    __format_spec::__throw_invalid_type_format_error(__id);
  }
}

_LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_pointer(__format_spec::__type __type, const char* __id) {
  switch (__type) {
  case __format_spec::__type::__default:
  case __format_spec::__type::__pointer_lower_case:
  case __format_spec::__type::__pointer_upper_case:
    break;

  default:
    __format_spec::__throw_invalid_type_format_error(__id);
  }
}

template <contiguous_iterator _Iterator>
struct __column_width_result {
  /// The number of output columns.
  size_t __width_;
  /// One beyond the last code unit used in the estimation.
  ///
  /// This limits the original output to fit in the wanted number of columns.
  _Iterator __last_;
};

template <contiguous_iterator _Iterator>
__column_width_result(size_t, _Iterator) -> __column_width_result<_Iterator>;

/// Since a column width can be two it's possible that the requested column
/// width can't be achieved. Depending on the intended usage the policy can be
/// selected.
/// - When used as precision the maximum width may not be exceeded and the
///   result should be "rounded down" to the previous boundary.
/// - When used as a width we're done once the minimum is reached, but
///   exceeding is not an issue. Rounding down is an issue since that will
///   result in writing fill characters. Therefore the result needs to be
///   "rounded up".
enum class __column_width_rounding { __down, __up };

#  ifndef _LIBCPP_HAS_NO_UNICODE

namespace __detail {
template <contiguous_iterator _Iterator>
_LIBCPP_HIDE_FROM_ABI constexpr __column_width_result<_Iterator> __estimate_column_width_grapheme_clustering(
    _Iterator __first, _Iterator __last, size_t __maximum, __column_width_rounding __rounding) noexcept {
  using _CharT = iter_value_t<_Iterator>;
  __unicode::__extended_grapheme_cluster_view<_CharT> __view{__first, __last};

  __column_width_result<_Iterator> __result{0, __first};
  while (__result.__last_ != __last && __result.__width_ <= __maximum) {
    typename __unicode::__extended_grapheme_cluster_view<_CharT>::__cluster __cluster = __view.__consume();
    int __width = __width_estimation_table::__estimated_width(__cluster.__code_point_);

    // When the next entry would exceed the maximum width the previous width
    // might be returned. For example when a width of 100 is requested the
    // returned width might be 99, since the next code point has an estimated
    // column width of 2. This depends on the rounding flag.
    // When the maximum is exceeded the loop will abort the next iteration.
    if (__rounding == __column_width_rounding::__down && __result.__width_ + __width > __maximum)
      return __result;

    __result.__width_ += __width;
    __result.__last_ = __cluster.__last_;
  }

  return __result;
}

} // namespace __detail

// Unicode can be stored in several formats: UTF-8, UTF-16, and UTF-32.
// Depending on format the relation between the number of code units stored and
// the number of output columns differs. The first relation is the number of
// code units forming a code point. (The text assumes the code units are
// unsigned.)
// - UTF-8 The number of code units is between one and four. The first 127
//   Unicode code points match the ASCII character set. When the highest bit is
//   set it means the code point has more than one code unit.
// - UTF-16: The number of code units is between 1 and 2. When the first
//   code unit is in the range [0xd800,0xdfff) it means the code point uses two
//   code units.
// - UTF-32: The number of code units is always one.
//
// The code point to the number of columns is specified in
// [format.string.std]/11. This list might change in the future.
//
// Another thing to be taken into account is Grapheme clustering. This means
// that in some cases multiple code points are combined one element in the
// output. For example:
// - an ASCII character with a combined diacritical mark
// - an emoji with a skin tone modifier
// - a group of combined people emoji to create a family
// - a combination of flag emoji
//
// See also:
// - [format.string.general]/11
// - https://en.wikipedia.org/wiki/UTF-8#Encoding
// - https://en.wikipedia.org/wiki/UTF-16#U+D800_to_U+DFFF

_LIBCPP_HIDE_FROM_ABI constexpr bool __is_ascii(char32_t __c) { return __c < 0x80; }

/// Determines the number of output columns needed to render the input.
///
/// \note When the scanner encounters malformed Unicode it acts as-if every
/// code unit is a one column code point. Typically a terminal uses the same
/// strategy and replaces every malformed code unit with a one column
/// replacement character.
///
/// \param __first    Points to the first element of the input range.
/// \param __last     Points beyond the last element of the input range.
/// \param __maximum  The maximum number of output columns. The returned number
///                   of estimated output columns will not exceed this value.
/// \param __rounding Selects the rounding method.
///                   \c __down result.__width_ <= __maximum
///                   \c __up result.__width_ <= __maximum + 1
template <class _CharT, class _Iterator = typename basic_string_view<_CharT>::const_iterator>
_LIBCPP_HIDE_FROM_ABI constexpr __column_width_result<_Iterator> __estimate_column_width(
    basic_string_view<_CharT> __str, size_t __maximum, __column_width_rounding __rounding) noexcept {
  // The width estimation is done in two steps:
  // - Quickly process for the ASCII part. ASCII has the following properties
  //   - One code unit is one code point
  //   - Every code point has an estimated width of one
  // - When needed it will a Unicode Grapheme clustering algorithm to find
  //   the proper place for truncation.

  if (__str.empty() || __maximum == 0)
    return {0, __str.begin()};

  // ASCII has one caveat; when an ASCII character is followed by a non-ASCII
  // character they might be part of an extended grapheme cluster. For example:
  //   an ASCII letter and a COMBINING ACUTE ACCENT
  // The truncate should happen after the COMBINING ACUTE ACCENT. Therefore we
  // need to scan one code unit beyond the requested precision. When this code
  // unit is non-ASCII we omit the current code unit and let the Grapheme
  // clustering algorithm do its work.
  auto __it = __str.begin();
  if (__format_spec::__is_ascii(*__it)) {
    do {
      --__maximum;
      ++__it;
      if (__it == __str.end())
        return {__str.size(), __str.end()};

      if (__maximum == 0) {
        if (__format_spec::__is_ascii(*__it))
          return {static_cast<size_t>(__it - __str.begin()), __it};

        break;
      }
    } while (__format_spec::__is_ascii(*__it));
    --__it;
    ++__maximum;
  }

  ptrdiff_t __ascii_size = __it - __str.begin();
  __column_width_result __result =
      __detail::__estimate_column_width_grapheme_clustering(__it, __str.end(), __maximum, __rounding);

  __result.__width_ += __ascii_size;
  return __result;
}
#  else // !defined(_LIBCPP_HAS_NO_UNICODE)
# 1155 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
template <class _CharT>
_LIBCPP_HIDE_FROM_ABI constexpr __column_width_result<typename basic_string_view<_CharT>::const_iterator>
__estimate_column_width(basic_string_view<_CharT> __str, size_t __maximum, __column_width_rounding) noexcept {
  // When Unicode isn't supported assume ASCII and every code unit is one code
  // point. In ASCII the estimated column width is always one. Thus there's no
  // need for rounding.
  size_t __width_ = _VSTD::min(__str.size(), __maximum);
  return {__width_, __str.begin() + __width_};
}

#  endif // !defined(_LIBCPP_HAS_NO_UNICODE)
# 1166 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3

} // namespace __format_spec

#endif //_LIBCPP_STD_VER >= 20
# 1170 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___FORMAT_PARSER_STD_FORMAT_SPEC_H
# 1176 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/parser_std_format_spec.h" 3
#endif /* parser_std_format_spec.h expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/unicode.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/back_insert_iterator.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/concepts.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h> // iter_value_t
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/unreachable.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <string_view>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#endif
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3

namespace __formatter {

_LIBCPP_HIDE_FROM_ABI constexpr char __hex_to_upper(char __c) {
  switch (__c) {
  case 'a':
    return 'A';
  case 'b':
    return 'B';
  case 'c':
    return 'C';
  case 'd':
    return 'D';
  case 'e':
    return 'E';
  case 'f':
    return 'F';
  }
  return __c;
}

struct _LIBCPP_EXPORTED_FROM_ABI __padding_size_result {
  size_t __before_;
  size_t __after_;
};

_LIBCPP_HIDE_FROM_ABI constexpr __padding_size_result
__padding_size(size_t __size, size_t __width, __format_spec::__alignment __align) {
  _LIBCPP_ASSERT_UNCATEGORIZED(__width > __size, "don't call this function when no padding is required");
  _LIBCPP_ASSERT_UNCATEGORIZED(
      __align != __format_spec::__alignment::__zero_padding, "the caller should have handled the zero-padding");

  size_t __fill = __width - __size;
  switch (__align) {
  case __format_spec::__alignment::__zero_padding:
    __libcpp_unreachable();

  case __format_spec::__alignment::__left:
    return {0, __fill};

  case __format_spec::__alignment::__center: {
    // The extra padding is divided per [format.string.std]/3
    // __before = floor(__fill, 2);
    // __after = ceil(__fill, 2);
    size_t __before = __fill / 2;
    size_t __after  = __fill - __before;
    return {__before, __after};
  }
  case __format_spec::__alignment::__default:
  case __format_spec::__alignment::__right:
    return {__fill, 0};
  }
  __libcpp_unreachable();
}

/// Copy wrapper.
///
/// This uses a "mass output function" of __format::__output_buffer when possible.
template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT>
_LIBCPP_HIDE_FROM_ABI auto __copy(basic_string_view<_CharT> __str, output_iterator<const _OutCharT&> auto __out_it)
    -> decltype(__out_it) {
  if constexpr (_VSTD::same_as<decltype(__out_it), _VSTD::back_insert_iterator<__format::__output_buffer<_OutCharT>>>) {
    __out_it.__get_container()->__copy(__str);
    return __out_it;
  } else if constexpr (_VSTD::same_as<decltype(__out_it),
                                      typename __format::__retarget_buffer<_OutCharT>::__iterator>) {
    __out_it.__buffer_->__copy(__str);
    return __out_it;
  } else {
    return std::ranges::copy(__str, _VSTD::move(__out_it)).out;
  }
}

template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT>
_LIBCPP_HIDE_FROM_ABI auto
__copy(const _CharT* __first, const _CharT* __last, output_iterator<const _OutCharT&> auto __out_it)
    -> decltype(__out_it) {
  return __formatter::__copy(basic_string_view{__first, __last}, _VSTD::move(__out_it));
}

template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT>
_LIBCPP_HIDE_FROM_ABI auto __copy(const _CharT* __first, size_t __n, output_iterator<const _OutCharT&> auto __out_it)
    -> decltype(__out_it) {
  return __formatter::__copy(basic_string_view{__first, __n}, _VSTD::move(__out_it));
}

/// Transform wrapper.
///
/// This uses a "mass output function" of __format::__output_buffer when possible.
template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT, class _UnaryOperation>
_LIBCPP_HIDE_FROM_ABI auto
__transform(const _CharT* __first,
            const _CharT* __last,
            output_iterator<const _OutCharT&> auto __out_it,
            _UnaryOperation __operation) -> decltype(__out_it) {
  if constexpr (_VSTD::same_as<decltype(__out_it), _VSTD::back_insert_iterator<__format::__output_buffer<_OutCharT>>>) {
    __out_it.__get_container()->__transform(__first, __last, _VSTD::move(__operation));
    return __out_it;
  } else if constexpr (_VSTD::same_as<decltype(__out_it),
                                      typename __format::__retarget_buffer<_OutCharT>::__iterator>) {
    __out_it.__buffer_->__transform(__first, __last, _VSTD::move(__operation));
    return __out_it;
  } else {
    return std::ranges::transform(__first, __last, _VSTD::move(__out_it), __operation).out;
  }
}

/// Fill wrapper.
///
/// This uses a "mass output function" of __format::__output_buffer when possible.
template <__fmt_char_type _CharT, output_iterator<const _CharT&> _OutIt>
_LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, _CharT __value) {
  if constexpr (_VSTD::same_as<decltype(__out_it), _VSTD::back_insert_iterator<__format::__output_buffer<_CharT>>>) {
    __out_it.__get_container()->__fill(__n, __value);
    return __out_it;
  } else if constexpr (_VSTD::same_as<decltype(__out_it), typename __format::__retarget_buffer<_CharT>::__iterator>) {
    __out_it.__buffer_->__fill(__n, __value);
    return __out_it;
  } else {
    return std::ranges::fill_n(_VSTD::move(__out_it), __n, __value);
  }
}

#  ifndef _LIBCPP_HAS_NO_UNICODE
template <__fmt_char_type _CharT, output_iterator<const _CharT&> _OutIt>
  requires(same_as<_CharT, char>)
_LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, __format_spec::__code_point<_CharT> __value) {
  std::size_t __bytes = std::countl_one(static_cast<unsigned char>(__value.__data[0]));
  if (__bytes == 0)
    return __formatter::__fill(std::move(__out_it), __n, __value.__data[0]);

  for (size_t __i = 0; __i < __n; ++__i)
    __out_it = __formatter::__copy(
        std::addressof(__value.__data[0]), std::addressof(__value.__data[0]) + __bytes, std::move(__out_it));
  return __out_it;
}

#    ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <__fmt_char_type _CharT, output_iterator<const _CharT&> _OutIt>
  requires(same_as<_CharT, wchar_t> && sizeof(wchar_t) == 2)
_LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, __format_spec::__code_point<_CharT> __value) {
  if (!__unicode::__is_high_surrogate(__value.__data[0]))
    return __formatter::__fill(std::move(__out_it), __n, __value.__data[0]);

  for (size_t __i = 0; __i < __n; ++__i)
    __out_it = __formatter::__copy(
        std::addressof(__value.__data[0]), std::addressof(__value.__data[0]) + 2, std::move(__out_it));
  return __out_it;
}

template <__fmt_char_type _CharT, output_iterator<const _CharT&> _OutIt>
  requires(same_as<_CharT, wchar_t> && sizeof(wchar_t) == 4)
_LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, __format_spec::__code_point<_CharT> __value) {
  return __formatter::__fill(std::move(__out_it), __n, __value.__data[0]);
}
#    endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
# 196 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#  else    // _LIBCPP_HAS_NO_UNICODE
# 197 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
template <__fmt_char_type _CharT, output_iterator<const _CharT&> _OutIt>
_LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, __format_spec::__code_point<_CharT> __value) {
  return __formatter::__fill(std::move(__out_it), __n, __value.__data[0]);
}
#  endif   // _LIBCPP_HAS_NO_UNICODE
# 202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3

/// Writes the input to the output with the required padding.
///
/// Since the output column width is specified the function can be used for
/// ASCII and Unicode output.
///
/// \pre \a __size <= \a __width. Using this function when this pre-condition
///      doesn't hold incurs an unwanted overhead.
///
/// \param __str       The string to write.
/// \param __out_it    The output iterator to write to.
/// \param __specs     The parsed formatting specifications.
/// \param __size      The (estimated) output column width. When the elements
///                    to be written are ASCII the following condition holds
///                    \a __size == \a __last - \a __first.
///
/// \returns           An iterator pointing beyond the last element written.
///
/// \note The type of the elements in range [\a __first, \a __last) can differ
/// from the type of \a __specs. Integer output uses \c std::to_chars for its
/// conversion, which means the [\a __first, \a __last) always contains elements
/// of the type \c char.
template <class _CharT, class _ParserCharT>
_LIBCPP_HIDE_FROM_ABI auto
__write(basic_string_view<_CharT> __str,
        output_iterator<const _CharT&> auto __out_it,
        __format_spec::__parsed_specifications<_ParserCharT> __specs,
        ptrdiff_t __size) -> decltype(__out_it) {
  if (__size >= __specs.__width_)
    return __formatter::__copy(__str, _VSTD::move(__out_it));

  __padding_size_result __padding = __formatter::__padding_size(__size, __specs.__width_, __specs.__std_.__alignment_);
  __out_it                        = __formatter::__fill(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
  __out_it                        = __formatter::__copy(__str, _VSTD::move(__out_it));
  return __formatter::__fill(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
}

template <contiguous_iterator _Iterator, class _ParserCharT>
_LIBCPP_HIDE_FROM_ABI auto
__write(_Iterator __first,
        _Iterator __last,
        output_iterator<const iter_value_t<_Iterator>&> auto __out_it,
        __format_spec::__parsed_specifications<_ParserCharT> __specs,
        ptrdiff_t __size) -> decltype(__out_it) {
  _LIBCPP_ASSERT_UNCATEGORIZED(__first <= __last, "Not a valid range");
  return __formatter::__write(basic_string_view{__first, __last}, _VSTD::move(__out_it), __specs, __size);
}

/// \overload
///
/// Calls the function above where \a __size = \a __last - \a __first.
template <contiguous_iterator _Iterator, class _ParserCharT>
_LIBCPP_HIDE_FROM_ABI auto
__write(_Iterator __first,
        _Iterator __last,
        output_iterator<const iter_value_t<_Iterator>&> auto __out_it,
        __format_spec::__parsed_specifications<_ParserCharT> __specs) -> decltype(__out_it) {
  _LIBCPP_ASSERT_UNCATEGORIZED(__first <= __last, "Not a valid range");
  return __formatter::__write(__first, __last, _VSTD::move(__out_it), __specs, __last - __first);
}

template <class _CharT, class _ParserCharT, class _UnaryOperation>
_LIBCPP_HIDE_FROM_ABI auto __write_transformed(const _CharT* __first, const _CharT* __last,
                                               output_iterator<const _CharT&> auto __out_it,
                                               __format_spec::__parsed_specifications<_ParserCharT> __specs,
                                               _UnaryOperation __op) -> decltype(__out_it) {
  _LIBCPP_ASSERT_UNCATEGORIZED(__first <= __last, "Not a valid range");

  ptrdiff_t __size = __last - __first;
  if (__size >= __specs.__width_)
    return __formatter::__transform(__first, __last, _VSTD::move(__out_it), __op);

  __padding_size_result __padding = __formatter::__padding_size(__size, __specs.__width_, __specs.__alignment_);
  __out_it                        = __formatter::__fill(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
  __out_it                        = __formatter::__transform(__first, __last, _VSTD::move(__out_it), __op);
  return __formatter::__fill(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
}

/// Writes a string using format's width estimation algorithm.
///
/// \pre !__specs.__has_precision()
///
/// \note When \c _LIBCPP_HAS_NO_UNICODE is defined the function assumes the
/// input is ASCII.
template <class _CharT>
_LIBCPP_HIDE_FROM_ABI auto __write_string_no_precision(
    basic_string_view<_CharT> __str,
    output_iterator<const _CharT&> auto __out_it,
    __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
  _LIBCPP_ASSERT_UNCATEGORIZED(!__specs.__has_precision(), "use __write_string");

  // No padding -> copy the string
  if (!__specs.__has_width())
    return __formatter::__copy(__str, _VSTD::move(__out_it));

  // Note when the estimated width is larger than size there's no padding. So
  // there's no reason to get the real size when the estimate is larger than or
  // equal to the minimum field width.
  size_t __size =
      __format_spec::__estimate_column_width(__str, __specs.__width_, __format_spec::__column_width_rounding::__up)
          .__width_;
  return __formatter::__write(__str, _VSTD::move(__out_it), __specs, __size);
}

template <class _CharT>
_LIBCPP_HIDE_FROM_ABI int __truncate(basic_string_view<_CharT>& __str, int __precision) {
  __format_spec::__column_width_result __result =
      __format_spec::__estimate_column_width(__str, __precision, __format_spec::__column_width_rounding::__down);
  __str = basic_string_view<_CharT>{__str.begin(), __result.__last_};
  return __result.__width_;
}

} // namespace __formatter

#endif //_LIBCPP_STD_VER >= 20
# 317 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FORMAT_FORMATTER_OUTPUT_H
# 321 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_output.h" 3
#endif /* formatter_output.h expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/parser_std_format_spec.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__system_error/errc.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/unreachable.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <array>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <string>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <string_view>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3

#ifndef _LIBCPP_HAS_NO_LOCALIZATION
#if 0 /* expanded by -frewrite-includes */
#  include <locale>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#endif
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3

namespace __formatter {

//
// Generic
//

_LIBCPP_HIDE_FROM_ABI inline char* __insert_sign(char* __buf, bool __negative, __format_spec::__sign __sign) {
  if (__negative)
    *__buf++ = '-';
  else
    switch (__sign) {
    case __format_spec::__sign::__default:
    case __format_spec::__sign::__minus:
      // No sign added.
      break;
    case __format_spec::__sign::__plus:
      *__buf++ = '+';
      break;
    case __format_spec::__sign::__space:
      *__buf++ = ' ';
      break;
    }

  return __buf;
}

/**
 * Determines the required grouping based on the size of the input.
 *
 * The grouping's last element will be repeated. For simplicity this repeating
 * is unwrapped based on the length of the input. (When the input is short some
 * groups are not processed.)
 *
 * @returns The size of the groups to write. This means the number of
 * separator characters written is size() - 1.
 *
 * @note Since zero-sized groups cause issues they are silently ignored.
 *
 * @note The grouping field of the locale is always a @c std::string,
 * regardless whether the @c std::numpunct's type is @c char or @c wchar_t.
 */
_LIBCPP_HIDE_FROM_ABI inline string __determine_grouping(ptrdiff_t __size, const string& __grouping) {
  _LIBCPP_ASSERT_UNCATEGORIZED(!__grouping.empty() && __size > __grouping[0],
                               "The slow grouping formatting is used while there will be no "
                               "separators written");
  string __r;
  auto __end = __grouping.end() - 1;
  auto __ptr = __grouping.begin();

  while (true) {
    __size -= *__ptr;
    if (__size > 0)
      __r.push_back(*__ptr);
    else {
      // __size <= 0 so the value pushed will be <= *__ptr.
      __r.push_back(*__ptr + __size);
      return __r;
    }

    // Proceed to the next group.
    if (__ptr != __end) {
      do {
        ++__ptr;
        // Skip grouping with a width of 0.
      } while (*__ptr == 0 && __ptr != __end);
    }
  }

  __libcpp_unreachable();
}

//
// Char
//

template <__fmt_char_type _CharT>
_LIBCPP_HIDE_FROM_ABI auto __format_char(
    integral auto __value,
    output_iterator<const _CharT&> auto __out_it,
    __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
  using _Tp = decltype(__value);
  if constexpr (!same_as<_CharT, _Tp>) {
    // cmp_less and cmp_greater can't be used for character types.
    if constexpr (signed_integral<_CharT> == signed_integral<_Tp>) {
      if (__value < numeric_limits<_CharT>::min() || __value > numeric_limits<_CharT>::max())
        std::__throw_format_error("Integral value outside the range of the char type");
    } else if constexpr (signed_integral<_CharT>) {
      // _CharT is signed _Tp is unsigned
      if (__value > static_cast<make_unsigned_t<_CharT>>(numeric_limits<_CharT>::max()))
        std::__throw_format_error("Integral value outside the range of the char type");
    } else {
      // _CharT is unsigned _Tp is signed
      if (__value < 0 || static_cast<make_unsigned_t<_Tp>>(__value) > numeric_limits<_CharT>::max())
        std::__throw_format_error("Integral value outside the range of the char type");
    }
  }

  const auto __c = static_cast<_CharT>(__value);
  return __formatter::__write(_VSTD::addressof(__c), _VSTD::addressof(__c) + 1, _VSTD::move(__out_it), __specs);
}

//
// Integer
//

/** Wrapper around @ref to_chars, returning the output pointer. */
template <integral _Tp>
_LIBCPP_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value, int __base) {
  // TODO FMT Evaluate code overhead due to not calling the internal function
  // directly. (Should be zero overhead.)
  to_chars_result __r = _VSTD::to_chars(__first, __last, __value, __base);
  _LIBCPP_ASSERT_UNCATEGORIZED(__r.ec == errc(0), "Internal buffer too small");
  return __r.ptr;
}

/**
 * Helper to determine the buffer size to output a integer in Base @em x.
 *
 * There are several overloads for the supported bases. The function uses the
 * base as template argument so it can be used in a constant expression.
 */
template <unsigned_integral _Tp, size_t _Base>
consteval size_t __buffer_size() noexcept
  requires(_Base == 2)
{
  return numeric_limits<_Tp>::digits // The number of binary digits.
       + 2                           // Reserve space for the '0[Bb]' prefix.
       + 1;                          // Reserve space for the sign.
}

template <unsigned_integral _Tp, size_t _Base>
consteval size_t __buffer_size() noexcept
  requires(_Base == 8)
{
  return numeric_limits<_Tp>::digits // The number of binary digits.
           / 3                       // Adjust to octal.
       + 1                           // Turn floor to ceil.
       + 1                           // Reserve space for the '0' prefix.
       + 1;                          // Reserve space for the sign.
}

template <unsigned_integral _Tp, size_t _Base>
consteval size_t __buffer_size() noexcept
  requires(_Base == 10)
{
  return numeric_limits<_Tp>::digits10 // The floored value.
       + 1                             // Turn floor to ceil.
       + 1;                            // Reserve space for the sign.
}

template <unsigned_integral _Tp, size_t _Base>
consteval size_t __buffer_size() noexcept
  requires(_Base == 16)
{
  return numeric_limits<_Tp>::digits // The number of binary digits.
           / 4                       // Adjust to hexadecimal.
       + 2                           // Reserve space for the '0[Xx]' prefix.
       + 1;                          // Reserve space for the sign.
}

template <class _OutIt, class _CharT>
_LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, const char* __begin, const char* __first,
                                                              const char* __last, string&& __grouping, _CharT __sep,
                                                              __format_spec::__parsed_specifications<_CharT> __specs) {
  int __size = (__first - __begin) +    // [sign][prefix]
               (__last - __first) +     // data
               (__grouping.size() - 1); // number of separator characters

  __padding_size_result __padding = {0, 0};
  if (__specs.__alignment_ == __format_spec::__alignment::__zero_padding) {
    // Write [sign][prefix].
    __out_it = __formatter::__copy(__begin, __first, _VSTD::move(__out_it));

    if (__specs.__width_ > __size) {
      // Write zero padding.
      __padding.__before_ = __specs.__width_ - __size;
      __out_it            = __formatter::__fill(_VSTD::move(__out_it), __specs.__width_ - __size, _CharT('0'));
    }
  } else {
    if (__specs.__width_ > __size) {
      // Determine padding and write padding.
      __padding = __formatter::__padding_size(__size, __specs.__width_, __specs.__alignment_);

      __out_it = __formatter::__fill(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
    }
    // Write [sign][prefix].
    __out_it = __formatter::__copy(__begin, __first, _VSTD::move(__out_it));
  }

  auto __r = __grouping.rbegin();
  auto __e = __grouping.rend() - 1;
  _LIBCPP_ASSERT_UNCATEGORIZED(__r != __e, "The slow grouping formatting is used while "
                                           "there will be no separators written.");
  // The output is divided in small groups of numbers to write:
  // - A group before the first separator.
  // - A separator and a group, repeated for the number of separators.
  // - A group after the last separator.
  // This loop achieves that process by testing the termination condition
  // midway in the loop.
  //
  // TODO FMT This loop evaluates the loop invariant `__parser.__type !=
  // _Flags::_Type::__hexadecimal_upper_case` for every iteration. (This test
  // happens in the __write call.) Benchmark whether making two loops and
  // hoisting the invariant is worth the effort.
  while (true) {
    if (__specs.__std_.__type_ == __format_spec::__type::__hexadecimal_upper_case) {
      __last = __first + *__r;
      __out_it = __formatter::__transform(__first, __last, _VSTD::move(__out_it), __hex_to_upper);
      __first = __last;
    } else {
      __out_it = __formatter::__copy(__first, *__r, _VSTD::move(__out_it));
      __first += *__r;
    }

    if (__r == __e)
      break;

    ++__r;
    *__out_it++ = __sep;
  }

  return __formatter::__fill(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
}



template <unsigned_integral _Tp, class _CharT, class _FormatContext>
_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator __format_integer(
    _Tp __value,
    _FormatContext& __ctx,
    __format_spec::__parsed_specifications<_CharT> __specs,
    bool __negative,
    char* __begin,
    char* __end,
    const char* __prefix,
    int __base) {
  char* __first = __formatter::__insert_sign(__begin, __negative, __specs.__std_.__sign_);
  if (__specs.__std_.__alternate_form_ && __prefix)
    while (*__prefix)
      *__first++ = *__prefix++;

  char* __last = __formatter::__to_buffer(__first, __end, __value, __base);

#  ifndef _LIBCPP_HAS_NO_LOCALIZATION
  if (__specs.__std_.__locale_specific_form_) {
    const auto& __np  = std::use_facet<numpunct<_CharT>>(__ctx.locale());
    string __grouping = __np.grouping();
    ptrdiff_t __size  = __last - __first;
    // Writing the grouped form has more overhead than the normal output
    // routines. If there will be no separators written the locale-specific
    // form is identical to the normal routine. Test whether to grouped form
    // is required.
    if (!__grouping.empty() && __size > __grouping[0])
      return __formatter::__write_using_decimal_separators(
          __ctx.out(),
          __begin,
          __first,
          __last,
          __formatter::__determine_grouping(__size, __grouping),
          __np.thousands_sep(),
          __specs);
  }
#  endif
# 309 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
  auto __out_it = __ctx.out();
  if (__specs.__alignment_ != __format_spec::__alignment::__zero_padding)
    __first = __begin;
  else {
    // __buf contains [sign][prefix]data
    //                              ^ location of __first
    // The zero padding is done like:
    // - Write [sign][prefix]
    // - Write data right aligned with '0' as fill character.
    __out_it             = __formatter::__copy(__begin, __first, _VSTD::move(__out_it));
    __specs.__alignment_ = __format_spec::__alignment::__right;
    __specs.__fill_.__data[0] = _CharT('0');
    int32_t __size       = __first - __begin;

    __specs.__width_ -= _VSTD::min(__size, __specs.__width_);
  }

  if (__specs.__std_.__type_ != __format_spec::__type::__hexadecimal_upper_case) [[likely]]
    return __formatter::__write(__first, __last, __ctx.out(), __specs);

  return __formatter::__write_transformed(__first, __last, __ctx.out(), __specs, __formatter::__hex_to_upper);
}

template <unsigned_integral _Tp, class _CharT, class _FormatContext>
_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
__format_integer(_Tp __value,
                 _FormatContext& __ctx,
                 __format_spec::__parsed_specifications<_CharT> __specs,
                 bool __negative = false) {
  switch (__specs.__std_.__type_) {
  case __format_spec::__type::__binary_lower_case: {
    array<char, __formatter::__buffer_size<decltype(__value), 2>()> __array;
    return __formatter::__format_integer(__value, __ctx, __specs, __negative, __array.begin(), __array.end(), "0b", 2);
  }
  case __format_spec::__type::__binary_upper_case: {
    array<char, __formatter::__buffer_size<decltype(__value), 2>()> __array;
    return __formatter::__format_integer(__value, __ctx, __specs, __negative, __array.begin(), __array.end(), "0B", 2);
  }
  case __format_spec::__type::__octal: {
    // Octal is special; if __value == 0 there's no prefix.
    array<char, __formatter::__buffer_size<decltype(__value), 8>()> __array;
    return __formatter::__format_integer(
        __value, __ctx, __specs, __negative, __array.begin(), __array.end(), __value != 0 ? "0" : nullptr, 8);
  }
  case __format_spec::__type::__default:
  case __format_spec::__type::__decimal: {
    array<char, __formatter::__buffer_size<decltype(__value), 10>()> __array;
    return __formatter::__format_integer(
        __value, __ctx, __specs, __negative, __array.begin(), __array.end(), nullptr, 10);
  }
  case __format_spec::__type::__hexadecimal_lower_case: {
    array<char, __formatter::__buffer_size<decltype(__value), 16>()> __array;
    return __formatter::__format_integer(__value, __ctx, __specs, __negative, __array.begin(), __array.end(), "0x", 16);
  }
  case __format_spec::__type::__hexadecimal_upper_case: {
    array<char, __formatter::__buffer_size<decltype(__value), 16>()> __array;
    return __formatter::__format_integer(__value, __ctx, __specs, __negative, __array.begin(), __array.end(), "0X", 16);
  }
  default:
    _LIBCPP_ASSERT_UNCATEGORIZED(false, "The parse function should have validated the type");
    __libcpp_unreachable();
  }
}

template <signed_integral _Tp, class _CharT, class _FormatContext>
_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
__format_integer(_Tp __value, _FormatContext& __ctx, __format_spec::__parsed_specifications<_CharT> __specs) {
  // Depending on the std-format-spec string the sign and the value
  // might not be outputted together:
  // - alternate form may insert a prefix string.
  // - zero-padding may insert additional '0' characters.
  // Therefore the value is processed as a positive unsigned value.
  // The function @ref __insert_sign will a '-' when the value was negative.
  auto __r        = std::__to_unsigned_like(__value);
  bool __negative = __value < 0;
  if (__negative)
    __r = std::__complement(__r);

  return __formatter::__format_integer(__r, __ctx, __specs, __negative);
}

//
// Formatter arithmetic (bool)
//

template <class _CharT>
struct _LIBCPP_TEMPLATE_VIS __bool_strings;

template <>
struct _LIBCPP_TEMPLATE_VIS __bool_strings<char> {
  static constexpr string_view __true{"true"};
  static constexpr string_view __false{"false"};
};

#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
struct _LIBCPP_TEMPLATE_VIS __bool_strings<wchar_t> {
  static constexpr wstring_view __true{L"true"};
  static constexpr wstring_view __false{L"false"};
};
#  endif
# 410 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3

template <class _CharT, class _FormatContext>
_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
__format_bool(bool __value, _FormatContext& __ctx, __format_spec::__parsed_specifications<_CharT> __specs) {
#  ifndef _LIBCPP_HAS_NO_LOCALIZATION
  if (__specs.__std_.__locale_specific_form_) {
    const auto& __np           = std::use_facet<numpunct<_CharT>>(__ctx.locale());
    basic_string<_CharT> __str = __value ? __np.truename() : __np.falsename();
    return __formatter::__write_string_no_precision(basic_string_view<_CharT>{__str}, __ctx.out(), __specs);
  }
#  endif
# 421 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
  basic_string_view<_CharT> __str =
      __value ? __formatter::__bool_strings<_CharT>::__true : __formatter::__bool_strings<_CharT>::__false;
  return __formatter::__write(__str.begin(), __str.end(), __ctx.out(), __specs);
}

} // namespace __formatter

#endif //_LIBCPP_STD_VER >= 20
# 429 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___FORMAT_FORMATTER_INTEGRAL_H
# 435 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_integral.h" 3
#endif /* formatter_integral.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__format/parser_std_format_spec.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/unreachable.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3

#ifndef _LIBCPP_HAS_NO_LOCALIZATION
#if 0 /* expanded by -frewrite-includes */
#  include <locale>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
#endif
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
#endif
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3

template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<bool, _CharT> {
public:
  template <class _ParseContext>
  _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
    typename _ParseContext::iterator __result = __parser_.__parse(__ctx, __format_spec::__fields_integral);
    __format_spec::__process_parsed_bool(__parser_, "a bool");
    return __result;
  }

  template <class _FormatContext>
  _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator format(bool __value, _FormatContext& __ctx) const {
    switch (__parser_.__type_) {
    case __format_spec::__type::__default:
    case __format_spec::__type::__string:
      return __formatter::__format_bool(__value, __ctx, __parser_.__get_parsed_std_specifications(__ctx));

    case __format_spec::__type::__binary_lower_case:
    case __format_spec::__type::__binary_upper_case:
    case __format_spec::__type::__octal:
    case __format_spec::__type::__decimal:
    case __format_spec::__type::__hexadecimal_lower_case:
    case __format_spec::__type::__hexadecimal_upper_case:
      // Promotes bool to an integral type. This reduces the number of
      // instantiations of __format_integer reducing code size.
      return __formatter::__format_integer(
          static_cast<unsigned>(__value), __ctx, __parser_.__get_parsed_std_specifications(__ctx));

    default:
      _LIBCPP_ASSERT_UNCATEGORIZED(false, "The parse function should have validated the type");
      __libcpp_unreachable();
    }
  }

  __format_spec::__parser<_CharT> __parser_;
};

#endif //_LIBCPP_STD_VER >= 20
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FORMAT_FORMATTER_BOOL_H
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__format/formatter_bool.h" 3
#endif /* formatter_bool.h expanded by -frewrite-includes */
# 322 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/hash.h>
#endif /* expanded by -frewrite-includes */
# 322 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 323 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 323 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 324 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/advance.h>
#endif /* expanded by -frewrite-includes */
# 324 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 325 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 325 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 326 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 326 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 327 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 327 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 328 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/wrap_iter.h>
#endif /* expanded by -frewrite-includes */
# 328 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 329 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 329 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 330 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocate_at_least.h>
#endif /* expanded by -frewrite-includes */
# 330 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 331 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 331 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 332 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 332 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 333 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/swap_allocator.h>
#endif /* expanded by -frewrite-includes */
# 333 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 334 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* temp_value.h expanded by -frewrite-includes */
#include <__memory/temp_value.h>
#else /* temp_value.h expanded by -frewrite-includes */
# 334 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_TEMP_VALUE_H
#define _LIBCPP___MEMORY_TEMP_VALUE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/aligned_storage.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, class _Alloc>
struct __temp_value {
    typedef allocator_traits<_Alloc> _Traits;

#ifdef _LIBCPP_CXX03_LANG
    typename aligned_storage<sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)>::type __v;
#else
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
    union { _Tp __v; };
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
    _Alloc &__a;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp *__addr() {
#ifdef _LIBCPP_CXX03_LANG
        return reinterpret_cast<_Tp*>(std::addressof(__v));
#else
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
        return std::addressof(__v);
#endif
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp & get() { return *__addr(); }

    template<class... _Args>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI
    _LIBCPP_CONSTEXPR_SINCE_CXX20 __temp_value(_Alloc &__alloc, _Args&& ... __args) : __a(__alloc) {
      _Traits::construct(__a, __addr(), std::forward<_Args>(__args)...);
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 ~__temp_value() { _Traits::destroy(__a, __addr()); }
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_TEMP_VALUE_H
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/temp_value.h" 3
#endif /* temp_value.h expanded by -frewrite-includes */
# 335 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/uninitialized_algorithms.h>
#endif /* expanded by -frewrite-includes */
# 335 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 336 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory_resource/polymorphic_allocator.h>
#endif /* expanded by -frewrite-includes */
# 336 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 337 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/access.h>
#endif /* expanded by -frewrite-includes */
# 337 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 338 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 338 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 339 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/container_compatible_range.h>
#endif /* expanded by -frewrite-includes */
# 339 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 340 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/from_range.h>
#endif /* expanded by -frewrite-includes */
# 340 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 341 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/size.h>
#endif /* expanded by -frewrite-includes */
# 341 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 342 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __split_buffer expanded by -frewrite-includes */
#include <__split_buffer>
#else /* __split_buffer expanded by -frewrite-includes */
# 342 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___SPLIT_BUFFER
#define _LIBCPP___SPLIT_BUFFER

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/max.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/move.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/move_backward.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/move_iterator.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocate_at_least.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/compressed_pair.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/swap_allocator.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_lvalue_reference.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_swappable.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_destructible.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#endif
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 2 3


_LIBCPP_BEGIN_NAMESPACE_STD

// __split_buffer allocates a contiguous chunk of memory and stores objects in the range [__begin_, __end_).
// It has uninitialized memory in the ranges  [__first_, __begin_) and [__end_, __end_cap_.first()). That allows
// it to grow both in the front and back without having to move the data.

template <class _Tp, class _Allocator = allocator<_Tp> >
struct __split_buffer
{
public:
  using value_type      = _Tp;
  using allocator_type  = _Allocator;
  using __alloc_rr      = __libcpp_remove_reference_t<allocator_type>;
  using __alloc_traits  = allocator_traits<__alloc_rr>;
  using reference       = value_type&;
  using const_reference = const value_type&;
  using size_type       = typename __alloc_traits::size_type;
  using difference_type = typename __alloc_traits::difference_type;
  using pointer         = typename __alloc_traits::pointer;
  using const_pointer   = typename __alloc_traits::const_pointer;
  using iterator        = pointer;
  using const_iterator  = const_pointer;

  pointer __first_;
  pointer __begin_;
  pointer __end_;
  __compressed_pair<pointer, allocator_type> __end_cap_;

  using __alloc_ref       = __add_lvalue_reference_t<allocator_type>;
  using __alloc_const_ref = __add_lvalue_reference_t<allocator_type>;

  __split_buffer(const __split_buffer&) = delete;
  __split_buffer& operator=(const __split_buffer&) = delete;

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __split_buffer()
      _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
      : __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __default_init_tag()) {}

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI explicit __split_buffer(__alloc_rr& __a)
      : __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __a) {}

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI explicit __split_buffer(const __alloc_rr& __a)
      : __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __a) {}

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  __split_buffer(size_type __cap, size_type __start, __alloc_rr& __a);

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __split_buffer(__split_buffer&& __c)
      _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __split_buffer(__split_buffer&& __c, const __alloc_rr& __a);

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __split_buffer& operator=(__split_buffer&& __c)
      _NOEXCEPT_((__alloc_traits::propagate_on_container_move_assignment::value &&
                  is_nothrow_move_assignable<allocator_type>::value) ||
                 !__alloc_traits::propagate_on_container_move_assignment::value);

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI ~__split_buffer();

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __alloc_rr& __alloc() _NOEXCEPT { return __end_cap_.second(); }
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const __alloc_rr& __alloc() const _NOEXCEPT {
    return __end_cap_.second();
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pointer& __end_cap() _NOEXCEPT { return __end_cap_.first(); }
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const pointer& __end_cap() const _NOEXCEPT {
    return __end_cap_.first();
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT { return __begin_; }
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT { return __begin_; }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT { return __end_; }
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT { return __end_; }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT { __destruct_at_end(__begin_); }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type size() const {
    return static_cast<size_type>(__end_ - __begin_);
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool empty() const { return __end_ == __begin_; }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type capacity() const {
    return static_cast<size_type>(__end_cap() - __first_);
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type __front_spare() const {
    return static_cast<size_type>(__begin_ - __first_);
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type __back_spare() const {
    return static_cast<size_type>(__end_cap() - __end_);
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference front() { return *__begin_; }
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference front() const { return *__begin_; }
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference back() { return *(__end_ - 1); }
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference back() const { return *(__end_ - 1); }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void reserve(size_type __n);
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void shrink_to_fit() _NOEXCEPT;
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_front(const_reference __x);
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back(const_reference __x);
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_front(value_type&& __x);
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back(value_type&& __x);

  template <class... _Args>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void emplace_back(_Args&&... __args);

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void pop_front() { __destruct_at_begin(__begin_ + 1); }
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void pop_back() { __destruct_at_end(__end_ - 1); }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n);
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n, const_reference __x);

  template <class _InputIter, __enable_if_t<__has_exactly_input_iterator_category<_InputIter>::value, int> = 0>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  void __construct_at_end(_InputIter __first, _InputIter __last);

  template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  void __construct_at_end(_ForwardIterator __first, _ForwardIterator __last);

  template <class _Iterator, class _Sentinel>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  void __construct_at_end_with_sentinel(_Iterator __first, _Sentinel __last);

  template <class _Iterator>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  void __construct_at_end_with_size(_Iterator __first, size_type __n);

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __destruct_at_begin(pointer __new_begin) {
    __destruct_at_begin(__new_begin, is_trivially_destructible<value_type>());
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __destruct_at_begin(pointer __new_begin, false_type);
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __destruct_at_begin(pointer __new_begin, true_type);

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __destruct_at_end(pointer __new_last) _NOEXCEPT {
    __destruct_at_end(__new_last, false_type());
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __destruct_at_end(pointer __new_last, false_type) _NOEXCEPT;
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __destruct_at_end(pointer __new_last, true_type) _NOEXCEPT;

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void swap(__split_buffer& __x)
      _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable<__alloc_rr>::value);

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool __invariants() const;

private:
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__split_buffer& __c, true_type)
      _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value) {
    __alloc() = _VSTD::move(__c.__alloc());
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc(__split_buffer&, false_type) _NOEXCEPT {}

  struct _ConstructTransaction {
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI explicit _ConstructTransaction(
        pointer* __p, size_type __n) _NOEXCEPT
        : __pos_(*__p),
          __end_(*__p + __n),
          __dest_(__p) {}

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI ~_ConstructTransaction() { *__dest_ = __pos_; }

    pointer __pos_;
    const pointer __end_;

  private:
    pointer* __dest_;
  };
};

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
bool
__split_buffer<_Tp, _Allocator>::__invariants() const
{
    if (__first_ == nullptr)
    {
        if (__begin_ != nullptr)
            return false;
        if (__end_ != nullptr)
            return false;
        if (__end_cap() != nullptr)
            return false;
    }
    else
    {
        if (__begin_ < __first_)
            return false;
        if (__end_ < __begin_)
            return false;
        if (__end_cap() < __end_)
            return false;
    }
    return true;
}

//  Default constructs __n objects starting at __end_
//  throws if construction throws
//  Precondition:  __n > 0
//  Precondition:  size() + __n <= capacity()
//  Postcondition:  size() == size() + __n
template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n)
{
    _ConstructTransaction __tx(&this->__end_, __n);
    for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
        __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_));
    }
}

//  Copy constructs __n objects starting at __end_ from __x
//  throws if construction throws
//  Precondition:  __n > 0
//  Precondition:  size() + __n <= capacity()
//  Postcondition:  size() == old size() + __n
//  Postcondition:  [i] == __x for all i in [size() - __n, __n)
template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
{
    _ConstructTransaction __tx(&this->__end_, __n);
    for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
        __alloc_traits::construct(this->__alloc(),
            _VSTD::__to_address(__tx.__pos_), __x);
    }
}

template <class _Tp, class _Allocator>
template <class _InputIter, __enable_if_t<__has_exactly_input_iterator_category<_InputIter>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20
void __split_buffer<_Tp, _Allocator>::__construct_at_end(_InputIter __first, _InputIter __last)
{
  __construct_at_end_with_sentinel(__first, __last);
}

template <class _Tp, class _Allocator>
template <class _Iterator, class _Sentinel>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void __split_buffer<_Tp, _Allocator>::__construct_at_end_with_sentinel(_Iterator __first, _Sentinel __last) {
    __alloc_rr& __a = this->__alloc();
    for (; __first != __last; ++__first)
    {
        if (__end_ == __end_cap())
        {
            size_type __old_cap = __end_cap() - __first_;
            size_type __new_cap = _VSTD::max<size_type>(2 * __old_cap, 8);
            __split_buffer __buf(__new_cap, 0, __a);
            for (pointer __p = __begin_; __p != __end_; ++__p, (void) ++__buf.__end_)
                __alloc_traits::construct(__buf.__alloc(),
                        _VSTD::__to_address(__buf.__end_), _VSTD::move(*__p));
            swap(__buf);
        }
        __alloc_traits::construct(__a, _VSTD::__to_address(this->__end_), *__first);
        ++this->__end_;
    }
}
template <class _Tp, class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20
void __split_buffer<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last)
{
  __construct_at_end_with_size(__first, std::distance(__first, __last));
}

template <class _Tp, class _Allocator>
template <class _ForwardIterator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void __split_buffer<_Tp, _Allocator>::__construct_at_end_with_size(_ForwardIterator __first, size_type __n) {
    _ConstructTransaction __tx(&this->__end_, __n);
    for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, (void) ++__first) {
        __alloc_traits::construct(this->__alloc(),
            _VSTD::__to_address(__tx.__pos_), *__first);
    }
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline
void
__split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, false_type)
{
    while (__begin_ != __new_begin)
        __alloc_traits::destroy(__alloc(), _VSTD::__to_address(__begin_++));
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline
void
__split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, true_type)
{
    __begin_ = __new_begin;
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
void
__split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, false_type) _NOEXCEPT
{
    while (__new_last != __end_)
        __alloc_traits::destroy(__alloc(), _VSTD::__to_address(--__end_));
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
void
__split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, true_type) _NOEXCEPT
{
    __end_ = __new_last;
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
__split_buffer<_Tp, _Allocator>::__split_buffer(size_type __cap, size_type __start, __alloc_rr& __a)
    : __end_cap_(nullptr, __a)
{
    if (__cap == 0) {
        __first_ = nullptr;
    } else {
        auto __allocation = std::__allocate_at_least(__alloc(), __cap);
        __first_ = __allocation.ptr;
        __cap = __allocation.count;
    }
    __begin_ = __end_ = __first_ + __start;
    __end_cap() = __first_ + __cap;
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
__split_buffer<_Tp, _Allocator>::~__split_buffer()
{
    clear();
    if (__first_)
        __alloc_traits::deallocate(__alloc(), __first_, capacity());
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
__split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c)
    _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
    : __first_(_VSTD::move(__c.__first_)),
      __begin_(_VSTD::move(__c.__begin_)),
      __end_(_VSTD::move(__c.__end_)),
      __end_cap_(_VSTD::move(__c.__end_cap_))
{
    __c.__first_ = nullptr;
    __c.__begin_ = nullptr;
    __c.__end_ = nullptr;
    __c.__end_cap() = nullptr;
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
__split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c, const __alloc_rr& __a)
    : __end_cap_(nullptr, __a)
{
    if (__a == __c.__alloc())
    {
        __first_ = __c.__first_;
        __begin_ = __c.__begin_;
        __end_ = __c.__end_;
        __end_cap() = __c.__end_cap();
        __c.__first_ = nullptr;
        __c.__begin_ = nullptr;
        __c.__end_ = nullptr;
        __c.__end_cap() = nullptr;
    }
    else
    {
        auto __allocation = std::__allocate_at_least(__alloc(), __c.size());
        __first_ = __allocation.ptr;
        __begin_ = __end_ = __first_;
        __end_cap() = __first_ + __allocation.count;
        typedef move_iterator<iterator> _Ip;
        __construct_at_end(_Ip(__c.begin()), _Ip(__c.end()));
    }
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
__split_buffer<_Tp, _Allocator>&
__split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c)
    _NOEXCEPT_((__alloc_traits::propagate_on_container_move_assignment::value &&
                is_nothrow_move_assignable<allocator_type>::value) ||
               !__alloc_traits::propagate_on_container_move_assignment::value)
{
    clear();
    shrink_to_fit();
    __first_ = __c.__first_;
    __begin_ = __c.__begin_;
    __end_ = __c.__end_;
    __end_cap() = __c.__end_cap();
    __move_assign_alloc(__c,
        integral_constant<bool,
                          __alloc_traits::propagate_on_container_move_assignment::value>());
    __c.__first_ = __c.__begin_ = __c.__end_ = __c.__end_cap() = nullptr;
    return *this;
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::swap(__split_buffer& __x)
        _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value||
                   __is_nothrow_swappable<__alloc_rr>::value)
{
    _VSTD::swap(__first_, __x.__first_);
    _VSTD::swap(__begin_, __x.__begin_);
    _VSTD::swap(__end_, __x.__end_);
    _VSTD::swap(__end_cap(), __x.__end_cap());
    _VSTD::__swap_allocator(__alloc(), __x.__alloc());
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::reserve(size_type __n)
{
    if (__n < capacity())
    {
        __split_buffer<value_type, __alloc_rr&> __t(__n, 0, __alloc());
        __t.__construct_at_end(move_iterator<pointer>(__begin_),
                               move_iterator<pointer>(__end_));
        _VSTD::swap(__first_, __t.__first_);
        _VSTD::swap(__begin_, __t.__begin_);
        _VSTD::swap(__end_, __t.__end_);
        _VSTD::swap(__end_cap(), __t.__end_cap());
    }
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT
{
    if (capacity() > size())
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 499 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
            __split_buffer<value_type, __alloc_rr&> __t(size(), 0, __alloc());
            __t.__construct_at_end(move_iterator<pointer>(__begin_),
                                   move_iterator<pointer>(__end_));
            __t.__end_ = __t.__begin_ + (__end_ - __begin_);
            _VSTD::swap(__first_, __t.__first_);
            _VSTD::swap(__begin_, __t.__begin_);
            _VSTD::swap(__end_, __t.__end_);
            _VSTD::swap(__end_cap(), __t.__end_cap());
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 513 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
    }
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::push_front(const_reference __x)
{
    if (__begin_ == __first_)
    {
        if (__end_ < __end_cap())
        {
            difference_type __d = __end_cap() - __end_;
            __d = (__d + 1) / 2;
            __begin_ = _VSTD::move_backward(__begin_, __end_, __end_ + __d);
            __end_ += __d;
        }
        else
        {
            size_type __c = std::max<size_type>(2 * static_cast<size_t>(__end_cap() - __first_), 1);
            __split_buffer<value_type, __alloc_rr&> __t(__c, (__c + 3) / 4, __alloc());
            __t.__construct_at_end(move_iterator<pointer>(__begin_),
                                   move_iterator<pointer>(__end_));
            _VSTD::swap(__first_, __t.__first_);
            _VSTD::swap(__begin_, __t.__begin_);
            _VSTD::swap(__end_, __t.__end_);
            _VSTD::swap(__end_cap(), __t.__end_cap());
        }
    }
    __alloc_traits::construct(__alloc(), _VSTD::__to_address(__begin_-1), __x);
    --__begin_;
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::push_front(value_type&& __x)
{
    if (__begin_ == __first_)
    {
        if (__end_ < __end_cap())
        {
            difference_type __d = __end_cap() - __end_;
            __d = (__d + 1) / 2;
            __begin_ = _VSTD::move_backward(__begin_, __end_, __end_ + __d);
            __end_ += __d;
        }
        else
        {
            size_type __c = std::max<size_type>(2 * static_cast<size_t>(__end_cap() - __first_), 1);
            __split_buffer<value_type, __alloc_rr&> __t(__c, (__c + 3) / 4, __alloc());
            __t.__construct_at_end(move_iterator<pointer>(__begin_),
                                   move_iterator<pointer>(__end_));
            _VSTD::swap(__first_, __t.__first_);
            _VSTD::swap(__begin_, __t.__begin_);
            _VSTD::swap(__end_, __t.__end_);
            _VSTD::swap(__end_cap(), __t.__end_cap());
        }
    }
    __alloc_traits::construct(__alloc(), _VSTD::__to_address(__begin_-1),
            _VSTD::move(__x));
    --__begin_;
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
void
__split_buffer<_Tp, _Allocator>::push_back(const_reference __x)
{
    if (__end_ == __end_cap())
    {
        if (__begin_ > __first_)
        {
            difference_type __d = __begin_ - __first_;
            __d = (__d + 1) / 2;
            __end_ = _VSTD::move(__begin_, __end_, __begin_ - __d);
            __begin_ -= __d;
        }
        else
        {
            size_type __c = std::max<size_type>(2 * static_cast<size_t>(__end_cap() - __first_), 1);
            __split_buffer<value_type, __alloc_rr&> __t(__c, __c / 4, __alloc());
            __t.__construct_at_end(move_iterator<pointer>(__begin_),
                                   move_iterator<pointer>(__end_));
            _VSTD::swap(__first_, __t.__first_);
            _VSTD::swap(__begin_, __t.__begin_);
            _VSTD::swap(__end_, __t.__end_);
            _VSTD::swap(__end_cap(), __t.__end_cap());
        }
    }
    __alloc_traits::construct(__alloc(), _VSTD::__to_address(__end_), __x);
    ++__end_;
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::push_back(value_type&& __x)
{
    if (__end_ == __end_cap())
    {
        if (__begin_ > __first_)
        {
            difference_type __d = __begin_ - __first_;
            __d = (__d + 1) / 2;
            __end_ = _VSTD::move(__begin_, __end_, __begin_ - __d);
            __begin_ -= __d;
        }
        else
        {
            size_type __c = std::max<size_type>(2 * static_cast<size_t>(__end_cap() - __first_), 1);
            __split_buffer<value_type, __alloc_rr&> __t(__c, __c / 4, __alloc());
            __t.__construct_at_end(move_iterator<pointer>(__begin_),
                                   move_iterator<pointer>(__end_));
            _VSTD::swap(__first_, __t.__first_);
            _VSTD::swap(__begin_, __t.__begin_);
            _VSTD::swap(__end_, __t.__end_);
            _VSTD::swap(__end_cap(), __t.__end_cap());
        }
    }
    __alloc_traits::construct(__alloc(), _VSTD::__to_address(__end_),
            _VSTD::move(__x));
    ++__end_;
}

template <class _Tp, class _Allocator>
template <class... _Args>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
__split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args)
{
    if (__end_ == __end_cap())
    {
        if (__begin_ > __first_)
        {
            difference_type __d = __begin_ - __first_;
            __d = (__d + 1) / 2;
            __end_ = _VSTD::move(__begin_, __end_, __begin_ - __d);
            __begin_ -= __d;
        }
        else
        {
            size_type __c = std::max<size_type>(2 * static_cast<size_t>(__end_cap() - __first_), 1);
            __split_buffer<value_type, __alloc_rr&> __t(__c, __c / 4, __alloc());
            __t.__construct_at_end(move_iterator<pointer>(__begin_),
                                   move_iterator<pointer>(__end_));
            _VSTD::swap(__first_, __t.__first_);
            _VSTD::swap(__begin_, __t.__begin_);
            _VSTD::swap(__end_, __t.__end_);
            _VSTD::swap(__end_cap(), __t.__end_cap());
        }
    }
    __alloc_traits::construct(__alloc(), _VSTD::__to_address(__end_),
                              _VSTD::forward<_Args>(__args)...);
    ++__end_;
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
void
swap(__split_buffer<_Tp, _Allocator>& __x, __split_buffer<_Tp, _Allocator>& __y)
        _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
    __x.swap(__y);
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___SPLIT_BUFFER
# 686 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__split_buffer" 3
#endif /* __split_buffer expanded by -frewrite-includes */
# 343 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_allocator.h>
#endif /* expanded by -frewrite-includes */
# 343 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 344 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 344 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 345 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 345 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 346 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/noexcept_move_assign_container.h>
#endif /* expanded by -frewrite-includes */
# 346 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 347 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/type_identity.h>
#endif /* expanded by -frewrite-includes */
# 347 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 348 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/exception_guard.h>
#endif /* expanded by -frewrite-includes */
# 348 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 349 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 349 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 350 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 350 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 351 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 351 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 352 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 352 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 353 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <climits>
#endif /* expanded by -frewrite-includes */
# 353 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 354 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstring>
#endif /* expanded by -frewrite-includes */
# 354 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 355 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd> // for forward declaration of vector
#endif /* expanded by -frewrite-includes */
# 355 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 356 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 356 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 357 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 357 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 358 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 358 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 359 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

// standard-mandated includes

// [iterator.range]
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/access.h>
#endif /* expanded by -frewrite-includes */
# 363 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 364 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/data.h>
#endif /* expanded by -frewrite-includes */
# 364 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 365 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/empty.h>
#endif /* expanded by -frewrite-includes */
# 365 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 366 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_access.h>
#endif /* expanded by -frewrite-includes */
# 366 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 367 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/size.h>
#endif /* expanded by -frewrite-includes */
# 367 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 368 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

// [vector.syn]
#if 0 /* expanded by -frewrite-includes */
#include <compare>
#endif /* expanded by -frewrite-includes */
# 370 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 371 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 371 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 372 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 374 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 375 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#endif
# 376 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 378 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 379 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, class _Allocator /* = allocator<_Tp> */>
class _LIBCPP_TEMPLATE_VIS vector
{
private:
    typedef allocator<_Tp>                                  __default_allocator_type;
public:
    typedef vector                                          __self;
    typedef _Tp                                             value_type;
    typedef _Allocator                                      allocator_type;
    typedef allocator_traits<allocator_type>                __alloc_traits;
    typedef value_type&                                     reference;
    typedef const value_type&                               const_reference;
    typedef typename __alloc_traits::size_type              size_type;
    typedef typename __alloc_traits::difference_type        difference_type;
    typedef typename __alloc_traits::pointer                pointer;
    typedef typename __alloc_traits::const_pointer          const_pointer;
    // TODO: Implement iterator bounds checking without requiring the global database.
    typedef __wrap_iter<pointer>                            iterator;
    typedef __wrap_iter<const_pointer>                      const_iterator;
    typedef std::reverse_iterator<iterator>               reverse_iterator;
    typedef std::reverse_iterator<const_iterator>         const_reverse_iterator;

    static_assert((is_same<typename allocator_type::value_type, value_type>::value),
                  "Allocator::value_type must be same type as value_type");

    static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
                  "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
                  "original allocator");

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
    {
    }
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI explicit vector(const allocator_type& __a)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
#else
# 419 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        _NOEXCEPT
#endif
# 421 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        : __end_cap_(nullptr, __a)
    {
    }
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI explicit vector(size_type __n);
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 426 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI explicit vector(size_type __n, const allocator_type& __a);
#endif
# 428 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(size_type __n, const value_type& __x);

    template <class = __enable_if_t<__is_allocator<_Allocator>::value> >
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    vector(size_type __n, const value_type& __x, const allocator_type& __a)
        : __end_cap_(nullptr, __a)
    {
      if (__n > 0)
      {
          __vallocate(__n);
          __construct_at_end(__n, __x);
      }
    }

  template <class _InputIterator,
            __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
                              is_constructible<value_type, typename iterator_traits<_InputIterator>::reference>::value,
                          int> = 0>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(_InputIterator __first, _InputIterator __last);
  template <class _InputIterator,
            __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
                              is_constructible<value_type, typename iterator_traits<_InputIterator>::reference>::value,
                          int> = 0>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a);

  template <
      class _ForwardIterator,
      __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
                        is_constructible<value_type, typename iterator_traits<_ForwardIterator>::reference>::value,
                    int> = 0>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(_ForwardIterator __first, _ForwardIterator __last);

  template <class _ForwardIterator,
      __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
                        is_constructible<value_type, typename iterator_traits<_ForwardIterator>::reference>::value,
                    int> = 0>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 469 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
  template <_ContainerCompatibleRange<_Tp> _Range>
  _LIBCPP_HIDE_FROM_ABI constexpr vector(from_range_t, _Range&& __range,
      const allocator_type& __alloc = allocator_type()) : __end_cap_(nullptr, __alloc) {
    if constexpr (ranges::forward_range<_Range> || ranges::sized_range<_Range>) {
      auto __n = static_cast<size_type>(ranges::distance(__range));
      __init_with_size(ranges::begin(__range), ranges::end(__range), __n);

    } else {
      __init_with_sentinel(ranges::begin(__range), ranges::end(__range));
    }
  }
#endif
# 481 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

private:
  class __destroy_vector {
    public:
      _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI __destroy_vector(vector& __vec) : __vec_(__vec) {}

      _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void operator()() {
          if (__vec_.__begin_ != nullptr) {
            __vec_.__clear();
            __vec_.__annotate_delete();
            __alloc_traits::deallocate(__vec_.__alloc(), __vec_.__begin_, __vec_.capacity());
          }
      }

    private:
      vector& __vec_;
  };

public:
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI ~vector() { __destroy_vector(*this)(); }

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(const vector& __x);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(const vector& __x, const __type_identity_t<allocator_type>& __a);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    vector& operator=(const vector& __x);

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    vector(initializer_list<value_type> __il);

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    vector(initializer_list<value_type> __il, const allocator_type& __a);

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    vector& operator=(initializer_list<value_type> __il)
        {assign(__il.begin(), __il.end()); return *this;}
#endif // !_LIBCPP_CXX03_LANG
# 518 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    vector(vector&& __x)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 522 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        noexcept;
#else
# 524 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
#endif
# 526 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    vector(vector&& __x, const __type_identity_t<allocator_type>& __a);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    vector& operator=(vector&& __x)
        _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));

  template <class _InputIterator,
            __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
                              is_constructible<value_type, typename iterator_traits<_InputIterator>::reference>::value,
                          int> = 0>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void assign(_InputIterator __first, _InputIterator __last);
  template <
      class _ForwardIterator,
      __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
                        is_constructible<value_type, typename iterator_traits<_ForwardIterator>::reference>::value,
                    int> = 0>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void assign(_ForwardIterator __first, _ForwardIterator __last);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 546 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    template <_ContainerCompatibleRange<_Tp> _Range>
    _LIBCPP_HIDE_FROM_ABI
    constexpr void assign_range(_Range&& __range) {
      if constexpr (ranges::forward_range<_Range> || ranges::sized_range<_Range>) {
        auto __n = static_cast<size_type>(ranges::distance(__range));
        __assign_with_size(ranges::begin(__range), ranges::end(__range), __n);

      } else {
        __assign_with_sentinel(ranges::begin(__range), ranges::end(__range));
      }
    }
#endif
# 558 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void assign(size_type __n, const_reference __u);

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void assign(initializer_list<value_type> __il)
        {assign(__il.begin(), __il.end());}
#endif
# 566 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    allocator_type get_allocator() const _NOEXCEPT
        {return this->__alloc();}

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator               begin() _NOEXCEPT;
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_iterator         begin()   const _NOEXCEPT;
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator               end() _NOEXCEPT;
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_iterator         end()     const _NOEXCEPT;

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    reverse_iterator       rbegin() _NOEXCEPT
        {return       reverse_iterator(end());}
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    const_reverse_iterator rbegin()  const _NOEXCEPT
        {return const_reverse_iterator(end());}
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    reverse_iterator       rend() _NOEXCEPT
        {return       reverse_iterator(begin());}
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    const_reverse_iterator rend()    const _NOEXCEPT
        {return const_reverse_iterator(begin());}

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    const_iterator         cbegin()  const _NOEXCEPT
        {return begin();}
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    const_iterator         cend()    const _NOEXCEPT
        {return end();}
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    const_reverse_iterator crbegin() const _NOEXCEPT
        {return rbegin();}
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    const_reverse_iterator crend()   const _NOEXCEPT
        {return rend();}

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    size_type size() const _NOEXCEPT
        {return static_cast<size_type>(this->__end_ - this->__begin_);}
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    size_type capacity() const _NOEXCEPT
        {return static_cast<size_type>(__end_cap() - this->__begin_);}
    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    bool empty() const _NOEXCEPT
        {return this->__begin_ == this->__end_;}
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT;
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void reserve(size_type __n);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void shrink_to_fit() _NOEXCEPT;

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference       operator[](size_type __n) _NOEXCEPT;
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference operator[](size_type __n) const _NOEXCEPT;
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference       at(size_type __n);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference at(size_type __n) const;

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference       front() _NOEXCEPT
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "front() called on an empty vector");
        return *this->__begin_;
    }
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference front() const _NOEXCEPT
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "front() called on an empty vector");
        return *this->__begin_;
    }
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI reference       back() _NOEXCEPT
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "back() called on an empty vector");
        return *(this->__end_ - 1);
    }
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI const_reference back()  const _NOEXCEPT
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "back() called on an empty vector");
        return *(this->__end_ - 1);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    value_type*       data() _NOEXCEPT
        {return std::__to_address(this->__begin_);}

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    const value_type* data() const _NOEXCEPT
        {return std::__to_address(this->__begin_);}

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back(const_reference __x);

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back(value_type&& __x);

    template <class... _Args>
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 656 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        reference emplace_back(_Args&&... __args);
#else
# 658 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        void      emplace_back(_Args&&... __args);
#endif
# 660 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 662 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    template <_ContainerCompatibleRange<_Tp> _Range>
    _LIBCPP_HIDE_FROM_ABI
    constexpr void append_range(_Range&& __range) {
      insert_range(end(), std::forward<_Range>(__range));
    }
#endif
# 668 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void pop_back();

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __position, const_reference __x);

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator __position, value_type&& __x);
    template <class... _Args>
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator emplace(const_iterator __position, _Args&&... __args);

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    iterator insert(const_iterator __position, size_type __n, const_reference __x);

  template <class _InputIterator,
            __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
                              is_constructible< value_type, typename iterator_traits<_InputIterator>::reference>::value,
                          int> = 0>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator
  insert(const_iterator __position, _InputIterator __first, _InputIterator __last);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 689 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    template <_ContainerCompatibleRange<_Tp> _Range>
    _LIBCPP_HIDE_FROM_ABI
    constexpr iterator insert_range(const_iterator __position, _Range&& __range) {
      if constexpr (ranges::forward_range<_Range> || ranges::sized_range<_Range>) {
        auto __n = static_cast<size_type>(ranges::distance(__range));
        return __insert_with_size(__position, ranges::begin(__range), ranges::end(__range), __n);

      } else {
        return __insert_with_sentinel(__position, ranges::begin(__range), ranges::end(__range));
      }
    }
#endif
# 701 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

  template <
      class _ForwardIterator,
      __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
                        is_constructible< value_type, typename iterator_traits<_ForwardIterator>::reference>::value,
                    int> = 0>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator
  insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    iterator insert(const_iterator __position, initializer_list<value_type> __il)
        {return insert(__position, __il.begin(), __il.end());}
#endif
# 715 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __position);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __first, const_iterator __last);

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void clear() _NOEXCEPT
    {
        size_type __old_size = size();
        __clear();
        __annotate_shrink(__old_size);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void resize(size_type __sz);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void resize(size_type __sz, const_reference __x);

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void swap(vector&)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 732 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        _NOEXCEPT;
#else
# 734 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
                    __is_nothrow_swappable<allocator_type>::value);
#endif
# 737 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool __invariants() const;

private:
    pointer __begin_ = nullptr;
    pointer __end_ = nullptr;
    __compressed_pair<pointer, allocator_type> __end_cap_ =
        __compressed_pair<pointer, allocator_type>(nullptr, __default_init_tag());

    //  Allocate space for __n objects
    //  throws length_error if __n > max_size()
    //  throws (probably bad_alloc) if memory run out
    //  Precondition:  __begin_ == __end_ == __end_cap() == 0
    //  Precondition:  __n > 0
    //  Postcondition:  capacity() >= __n
    //  Postcondition:  size() == 0
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __vallocate(size_type __n) {
        if (__n > max_size())
            __throw_length_error();
        auto __allocation = std::__allocate_at_least(__alloc(), __n);
        __begin_ = __allocation.ptr;
        __end_ = __allocation.ptr;
        __end_cap() = __begin_ + __allocation.count;
        __annotate_new(0);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __vdeallocate() _NOEXCEPT;
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI size_type __recommend(size_type __new_size) const;
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void __construct_at_end(size_type __n, const_reference __x);

    template <class _InputIterator, class _Sentinel>
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void __init_with_size(_InputIterator __first, _Sentinel __last, size_type __n) {
      auto __guard = std::__make_exception_guard(__destroy_vector(*this));

      if (__n > 0) {
        __vallocate(__n);
        __construct_at_end(__first, __last, __n);
      }

      __guard.__complete();
    }

    template <class _InputIterator, class _Sentinel>
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void __init_with_sentinel(_InputIterator __first, _Sentinel __last) {
      auto __guard = std::__make_exception_guard(__destroy_vector(*this));

      for (; __first != __last; ++__first)
        emplace_back(*__first);

      __guard.__complete();
    }

    template <class _Iterator, class _Sentinel>
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void __assign_with_sentinel(_Iterator __first, _Sentinel __last);

    template <class _ForwardIterator, class _Sentinel>
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void __assign_with_size(_ForwardIterator __first, _Sentinel __last, difference_type __n);

    template <class _InputIterator, class _Sentinel>
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    iterator __insert_with_sentinel(const_iterator __position, _InputIterator __first, _Sentinel __last);

    template <class _Iterator, class _Sentinel>
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    iterator __insert_with_size(const_iterator __position, _Iterator __first, _Sentinel __last, difference_type __n);

    template <class _InputIterator, class _Sentinel>
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void __construct_at_end(_InputIterator __first, _Sentinel __last, size_type __n);

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __append(size_type __n);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __append(size_type __n, const_reference __x);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    iterator       __make_iter(pointer __p) _NOEXCEPT { return iterator(__p); }
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    const_iterator __make_iter(const_pointer __p) const _NOEXCEPT { return const_iterator(__p); }
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pointer __swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v, pointer __p);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_range(pointer __from_s, pointer __from_e, pointer __to);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_assign(vector& __c, true_type)
        _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_assign(vector& __c, false_type)
        _NOEXCEPT_(__alloc_traits::is_always_equal::value);
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void __destruct_at_end(pointer __new_last) _NOEXCEPT
    {
        size_type __old_size = size();
        __base_destruct_at_end(__new_last);
        __annotate_shrink(__old_size);
    }

    template <class _Up>
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    inline pointer __push_back_slow_path(_Up&& __x);

    template <class... _Args>
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    inline pointer __emplace_back_slow_path(_Args&&... __args);

    // The following functions are no-ops outside of AddressSanitizer mode.
    // We call annotations for every allocator, unless explicitly disabled.
    //
    // To disable annotations for a particular allocator, change value of
    // __asan_annotate_container_with_allocator to false.
    // For more details, see the "Using libc++" documentation page or
    // the documentation for __sanitizer_annotate_contiguous_container.
#ifndef _LIBCPP_HAS_NO_ASAN
    _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __annotate_contiguous_container(const void *__beg, const void *__end,
                                         const void *__old_mid,
                                         const void *__new_mid) const
    {
      if (!__libcpp_is_constant_evaluated() && __beg != nullptr && __asan_annotate_container_with_allocator<_Allocator>::value)
        __sanitizer_annotate_contiguous_container(__beg, __end, __old_mid, __new_mid);
    }
#else
# 859 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void __annotate_contiguous_container(const void*, const void*, const void*,
                                         const void*) const _NOEXCEPT {}
#endif
# 863 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void __annotate_new(size_type __current_size) const _NOEXCEPT {
      __annotate_contiguous_container(data(), data() + capacity(),
                                      data() + capacity(), data() + __current_size);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void __annotate_delete() const _NOEXCEPT {
      __annotate_contiguous_container(data(), data() + capacity(),
                                      data() + size(), data() + capacity());
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void __annotate_increase(size_type __n) const _NOEXCEPT
    {
      __annotate_contiguous_container(data(), data() + capacity(),
                                      data() + size(), data() + size() + __n);
    }

    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    void __annotate_shrink(size_type __old_size) const _NOEXCEPT
    {
      __annotate_contiguous_container(data(), data() + capacity(),
                                      data() + __old_size, data() + size());
    }

  struct _ConstructTransaction {
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
    explicit _ConstructTransaction(vector &__v, size_type __n)
      : __v_(__v), __pos_(__v.__end_), __new_end_(__v.__end_ + __n) {
#ifndef _LIBCPP_HAS_NO_ASAN
      __v_.__annotate_increase(__n);
#endif
# 896 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    }
    _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI ~_ConstructTransaction() {
      __v_.__end_ = __pos_;
#ifndef _LIBCPP_HAS_NO_ASAN
      if (__pos_ != __new_end_) {
        __v_.__annotate_shrink(__new_end_ - __v_.__begin_);
      }
#endif
# 904 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    }

    vector &__v_;
    pointer __pos_;
    const_pointer const __new_end_;

  private:
    _ConstructTransaction(_ConstructTransaction const&) = delete;
    _ConstructTransaction& operator=(_ConstructTransaction const&) = delete;
  };

  template <class ..._Args>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  void __construct_one_at_end(_Args&& ...__args) {
    _ConstructTransaction __tx(*this, 1);
    __alloc_traits::construct(this->__alloc(), std::__to_address(__tx.__pos_),
        std::forward<_Args>(__args)...);
    ++__tx.__pos_;
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  allocator_type& __alloc() _NOEXCEPT
      {return this->__end_cap_.second();}
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  const allocator_type& __alloc() const _NOEXCEPT
      {return this->__end_cap_.second();}
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  pointer& __end_cap() _NOEXCEPT
      {return this->__end_cap_.first();}
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  const pointer& __end_cap() const _NOEXCEPT
      {return this->__end_cap_.first();}

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  void __clear() _NOEXCEPT {__base_destruct_at_end(this->__begin_);}

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  void __base_destruct_at_end(pointer __new_last) _NOEXCEPT {
    pointer __soon_to_be_end = this->__end_;
    while (__new_last != __soon_to_be_end)
        __alloc_traits::destroy(__alloc(), std::__to_address(--__soon_to_be_end));
    this->__end_ = __new_last;
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  void __copy_assign_alloc(const vector& __c)
      {__copy_assign_alloc(__c, integral_constant<bool,
                    __alloc_traits::propagate_on_container_copy_assignment::value>());}

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  void __move_assign_alloc(vector& __c)
      _NOEXCEPT_(
          !__alloc_traits::propagate_on_container_move_assignment::value ||
          is_nothrow_move_assignable<allocator_type>::value)
      {__move_assign_alloc(__c, integral_constant<bool,
                    __alloc_traits::propagate_on_container_move_assignment::value>());}

  _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
  void __throw_length_error() const {
      std::__throw_length_error("vector");
  }

  _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
  void __throw_out_of_range() const {
      std::__throw_out_of_range("vector");
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  void __copy_assign_alloc(const vector& __c, true_type)
  {
    if (__alloc() != __c.__alloc())
    {
      __clear();
      __annotate_delete();
      __alloc_traits::deallocate(__alloc(), this->__begin_, capacity());
      this->__begin_ = this->__end_ = __end_cap() = nullptr;
    }
    __alloc() = __c.__alloc();
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  void __copy_assign_alloc(const vector&, false_type)
  {}

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  void __move_assign_alloc(vector& __c, true_type)
      _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
  {
    __alloc() = std::move(__c.__alloc());
  }

  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  void __move_assign_alloc(vector&, false_type)
      _NOEXCEPT
  {}
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1002 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
template<class _InputIterator,
         class _Alloc = allocator<__iter_value_type<_InputIterator>>,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
         class = enable_if_t<__is_allocator<_Alloc>::value>
         >
vector(_InputIterator, _InputIterator)
  -> vector<__iter_value_type<_InputIterator>, _Alloc>;

template<class _InputIterator,
         class _Alloc,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
         class = enable_if_t<__is_allocator<_Alloc>::value>
         >
vector(_InputIterator, _InputIterator, _Alloc)
  -> vector<__iter_value_type<_InputIterator>, _Alloc>;
#endif
# 1018 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1020 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
template <ranges::input_range _Range,
          class _Alloc = allocator<ranges::range_value_t<_Range>>,
          class = enable_if_t<__is_allocator<_Alloc>::value>
          >
vector(from_range_t, _Range&&, _Alloc = _Alloc())
  -> vector<ranges::range_value_t<_Range>, _Alloc>;
#endif
# 1027 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v)
{
    __annotate_delete();
    using _RevIter = std::reverse_iterator<pointer>;
    __v.__begin_   = std::__uninitialized_allocator_move_if_noexcept(
                       __alloc(), _RevIter(__end_), _RevIter(__begin_), _RevIter(__v.__begin_))
                       .base();
    std::swap(this->__begin_, __v.__begin_);
    std::swap(this->__end_, __v.__end_);
    std::swap(this->__end_cap(), __v.__end_cap());
    __v.__first_ = __v.__begin_;
    __annotate_new(size());
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::pointer
vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v, pointer __p)
{
    __annotate_delete();
    pointer __r = __v.__begin_;
    using _RevIter = std::reverse_iterator<pointer>;
    __v.__begin_   = std::__uninitialized_allocator_move_if_noexcept(
                       __alloc(), _RevIter(__p), _RevIter(__begin_), _RevIter(__v.__begin_))
                       .base();
    __v.__end_ = std::__uninitialized_allocator_move_if_noexcept(__alloc(), __p, __end_, __v.__end_);
    std::swap(this->__begin_, __v.__begin_);
    std::swap(this->__end_, __v.__end_);
    std::swap(this->__end_cap(), __v.__end_cap());
    __v.__first_ = __v.__begin_;
    __annotate_new(size());
    return __r;
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__vdeallocate() _NOEXCEPT
{
    if (this->__begin_ != nullptr)
    {
        clear();
        __annotate_delete();
        __alloc_traits::deallocate(this->__alloc(), this->__begin_, capacity());
        this->__begin_ = this->__end_ = this->__end_cap() = nullptr;
    }
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::size_type
vector<_Tp, _Allocator>::max_size() const _NOEXCEPT
{
    return std::min<size_type>(__alloc_traits::max_size(this->__alloc()),
                                 numeric_limits<difference_type>::max());
}

//  Precondition:  __new_size > capacity()
template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::size_type
vector<_Tp, _Allocator>::__recommend(size_type __new_size) const
{
    const size_type __ms = max_size();
    if (__new_size > __ms)
        this->__throw_length_error();
    const size_type __cap = capacity();
    if (__cap >= __ms / 2)
        return __ms;
    return std::max<size_type>(2 * __cap, __new_size);
}

//  Default constructs __n objects starting at __end_
//  throws if construction throws
//  Precondition:  __n > 0
//  Precondition:  size() + __n <= capacity()
//  Postcondition:  size() == size() + __n
template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__construct_at_end(size_type __n)
{
    _ConstructTransaction __tx(*this, __n);
    const_pointer __new_end = __tx.__new_end_;
    for (pointer __pos = __tx.__pos_; __pos != __new_end; __tx.__pos_ = ++__pos) {
        __alloc_traits::construct(this->__alloc(), std::__to_address(__pos));
    }
}

//  Copy constructs __n objects starting at __end_ from __x
//  throws if construction throws
//  Precondition:  __n > 0
//  Precondition:  size() + __n <= capacity()
//  Postcondition:  size() == old size() + __n
//  Postcondition:  [i] == __x for all i in [size() - __n, __n)
template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline
void
vector<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
{
    _ConstructTransaction __tx(*this, __n);
    const_pointer __new_end = __tx.__new_end_;
    for (pointer __pos = __tx.__pos_; __pos != __new_end; __tx.__pos_ = ++__pos) {
        __alloc_traits::construct(this->__alloc(), std::__to_address(__pos), __x);
    }
}

template <class _Tp, class _Allocator>
template <class _InputIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<_Tp, _Allocator>::__construct_at_end(_InputIterator __first, _Sentinel __last, size_type __n) {
  _ConstructTransaction __tx(*this, __n);
  __tx.__pos_ = std::__uninitialized_allocator_copy(__alloc(), __first, __last, __tx.__pos_);
}

//  Default constructs __n objects starting at __end_
//  throws if construction throws
//  Postcondition:  size() == size() + __n
//  Exception safety: strong.
template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__append(size_type __n)
{
    if (static_cast<size_type>(this->__end_cap() - this->__end_) >= __n)
        this->__construct_at_end(__n);
    else
    {
        allocator_type& __a = this->__alloc();
        __split_buffer<value_type, allocator_type&> __v(__recommend(size() + __n), size(), __a);
        __v.__construct_at_end(__n);
        __swap_out_circular_buffer(__v);
    }
}

//  Default constructs __n objects starting at __end_
//  throws if construction throws
//  Postcondition:  size() == size() + __n
//  Exception safety: strong.
template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__append(size_type __n, const_reference __x)
{
    if (static_cast<size_type>(this->__end_cap() - this->__end_) >= __n)
        this->__construct_at_end(__n, __x);
    else
    {
        allocator_type& __a = this->__alloc();
        __split_buffer<value_type, allocator_type&> __v(__recommend(size() + __n), size(), __a);
        __v.__construct_at_end(__n, __x);
        __swap_out_circular_buffer(__v);
    }
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(size_type __n)
{
    auto __guard = std::__make_exception_guard(__destroy_vector(*this));
    if (__n > 0)
    {
        __vallocate(__n);
        __construct_at_end(__n);
    }
    __guard.__complete();
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(size_type __n, const allocator_type& __a)
    : __end_cap_(nullptr, __a)
{
    auto __guard = std::__make_exception_guard(__destroy_vector(*this));
    if (__n > 0)
    {
        __vallocate(__n);
        __construct_at_end(__n);
    }
    __guard.__complete();
}
#endif
# 1216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(size_type __n, const value_type& __x)
{
    auto __guard = std::__make_exception_guard(__destroy_vector(*this));
    if (__n > 0)
    {
        __vallocate(__n);
        __construct_at_end(__n, __x);
    }
    __guard.__complete();
}

template <class _Tp, class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
                              is_constructible<_Tp, typename iterator_traits<_InputIterator>::reference>::value,
                          int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last)
{
  __init_with_sentinel(__first, __last);
}

template <class _Tp, class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
                              is_constructible<_Tp, typename iterator_traits<_InputIterator>::reference>::value,
                          int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a)
    : __end_cap_(nullptr, __a)
{
  __init_with_sentinel(__first, __last);
}

template <class _Tp, class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
                        is_constructible<_Tp, typename iterator_traits<_ForwardIterator>::reference>::value,
                    int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last)
{
  size_type __n = static_cast<size_type>(std::distance(__first, __last));
  __init_with_size(__first, __last, __n);
}

template <class _Tp, class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
                        is_constructible<_Tp, typename iterator_traits<_ForwardIterator>::reference>::value,
                    int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a)
    : __end_cap_(nullptr, __a)
{
  size_type __n = static_cast<size_type>(std::distance(__first, __last));
  __init_with_size(__first, __last, __n);
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(const vector& __x)
    : __end_cap_(nullptr, __alloc_traits::select_on_container_copy_construction(__x.__alloc()))
{
  __init_with_size(__x.__begin_, __x.__end_, __x.size());
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<_Tp, _Allocator>::vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
    : __end_cap_(nullptr, __a)
{
  __init_with_size(__x.__begin_, __x.__end_, __x.size());
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
vector<_Tp, _Allocator>::vector(vector&& __x)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1295 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        noexcept
#else
# 1297 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
#endif
# 1299 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    : __end_cap_(nullptr, std::move(__x.__alloc()))
{
    this->__begin_ = __x.__begin_;
    this->__end_ = __x.__end_;
    this->__end_cap() = __x.__end_cap();
    __x.__begin_ = __x.__end_ = __x.__end_cap() = nullptr;
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
vector<_Tp, _Allocator>::vector(vector&& __x, const __type_identity_t<allocator_type>& __a)
    : __end_cap_(nullptr, __a)
{
    if (__a == __x.__alloc())
    {
        this->__begin_ = __x.__begin_;
        this->__end_ = __x.__end_;
        this->__end_cap() = __x.__end_cap();
        __x.__begin_ = __x.__end_ = __x.__end_cap() = nullptr;
    }
    else
    {
        typedef move_iterator<iterator> _Ip;
        auto __guard = std::__make_exception_guard(__destroy_vector(*this));
        assign(_Ip(__x.begin()), _Ip(__x.end()));
        __guard.__complete();
    }
}

#ifndef _LIBCPP_CXX03_LANG

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il)
{
    auto __guard = std::__make_exception_guard(__destroy_vector(*this));
    if (__il.size() > 0)
    {
        __vallocate(__il.size());
        __construct_at_end(__il.begin(), __il.end(), __il.size());
    }
    __guard.__complete();
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il, const allocator_type& __a)
    : __end_cap_(nullptr, __a)
{
    auto __guard = std::__make_exception_guard(__destroy_vector(*this));
    if (__il.size() > 0)
    {
        __vallocate(__il.size());
        __construct_at_end(__il.begin(), __il.end(), __il.size());
    }
    __guard.__complete();
}

#endif // _LIBCPP_CXX03_LANG
# 1361 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
vector<_Tp, _Allocator>&
vector<_Tp, _Allocator>::operator=(vector&& __x)
    _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value))
{
    __move_assign(__x, integral_constant<bool,
          __alloc_traits::propagate_on_container_move_assignment::value>());
    return *this;
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__move_assign(vector& __c, false_type)
    _NOEXCEPT_(__alloc_traits::is_always_equal::value)
{
    if (__alloc() != __c.__alloc())
    {
        typedef move_iterator<iterator> _Ip;
        assign(_Ip(__c.begin()), _Ip(__c.end()));
    }
    else
        __move_assign(__c, true_type());
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type)
    _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
{
    __vdeallocate();
    __move_assign_alloc(__c); // this can throw
    this->__begin_ = __c.__begin_;
    this->__end_ = __c.__end_;
    this->__end_cap() = __c.__end_cap();
    __c.__begin_ = __c.__end_ = __c.__end_cap() = nullptr;
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
vector<_Tp, _Allocator>&
vector<_Tp, _Allocator>::operator=(const vector& __x)
{
    if (this != std::addressof(__x))
    {
        __copy_assign_alloc(__x);
        assign(__x.__begin_, __x.__end_);
    }
    return *this;
}

template <class _Tp, class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
                              is_constructible<_Tp, typename iterator_traits<_InputIterator>::reference>::value,
                          int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<_Tp, _Allocator>::assign(_InputIterator __first, _InputIterator __last)
{
  __assign_with_sentinel(__first, __last);
}

template <class _Tp, class _Allocator>
template <class _Iterator, class _Sentinel>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void vector<_Tp, _Allocator>::__assign_with_sentinel(_Iterator __first, _Sentinel __last) {
    clear();
    for (; __first != __last; ++__first)
        emplace_back(*__first);
}

template <class _Tp, class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
                        is_constructible<_Tp, typename iterator_traits<_ForwardIterator>::reference>::value,
                    int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<_Tp, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last)
{
  __assign_with_size(__first, __last, std::distance(__first, __last));
}

template <class _Tp, class _Allocator>
template <class _ForwardIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void vector<_Tp, _Allocator>::__assign_with_size(_ForwardIterator __first, _Sentinel __last, difference_type __n) {
    size_type __new_size = static_cast<size_type>(__n);
    if (__new_size <= capacity())
    {
        if (__new_size > size())
        {
            _ForwardIterator __mid = std::next(__first, size());
            std::copy(__first, __mid, this->__begin_);
            __construct_at_end(__mid, __last, __new_size - size());
        }
        else
        {
            pointer __m = std::__copy<_ClassicAlgPolicy>(__first, __last, this->__begin_).second;
            this->__destruct_at_end(__m);
        }
    }
    else
    {
        __vdeallocate();
        __vallocate(__recommend(__new_size));
        __construct_at_end(__first, __last, __new_size);
    }
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::assign(size_type __n, const_reference __u)
{
    if (__n <= capacity())
    {
        size_type __s = size();
        std::fill_n(this->__begin_, std::min(__n, __s), __u);
        if (__n > __s)
            __construct_at_end(__n - __s, __u);
        else
            this->__destruct_at_end(this->__begin_ + __n);
    }
    else
    {
        __vdeallocate();
        __vallocate(__recommend(static_cast<size_type>(__n)));
        __construct_at_end(__n, __u);
    }
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::begin() _NOEXCEPT
{
    return __make_iter(this->__begin_);
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::const_iterator
vector<_Tp, _Allocator>::begin() const _NOEXCEPT
{
    return __make_iter(this->__begin_);
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::end() _NOEXCEPT
{
    return __make_iter(this->__end_);
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::const_iterator
vector<_Tp, _Allocator>::end() const _NOEXCEPT
{
    return __make_iter(this->__end_);
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::reference
vector<_Tp, _Allocator>::operator[](size_type __n) _NOEXCEPT
{
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n < size(), "vector[] index out of bounds");
    return this->__begin_[__n];
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::const_reference
vector<_Tp, _Allocator>::operator[](size_type __n) const _NOEXCEPT
{
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n < size(), "vector[] index out of bounds");
    return this->__begin_[__n];
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::reference
vector<_Tp, _Allocator>::at(size_type __n)
{
    if (__n >= size())
        this->__throw_out_of_range();
    return this->__begin_[__n];
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::const_reference
vector<_Tp, _Allocator>::at(size_type __n) const
{
    if (__n >= size())
        this->__throw_out_of_range();
    return this->__begin_[__n];
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::reserve(size_type __n)
{
    if (__n > capacity())
    {
        if (__n > max_size())
            this->__throw_length_error();
        allocator_type& __a = this->__alloc();
        __split_buffer<value_type, allocator_type&> __v(__n, size(), __a);
        __swap_out_circular_buffer(__v);
    }
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT
{
    if (capacity() > size())
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1597 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
            allocator_type& __a = this->__alloc();
            __split_buffer<value_type, allocator_type&> __v(size(), size(), __a);
            __swap_out_circular_buffer(__v);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1606 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    }
}

template <class _Tp, class _Allocator>
template <class _Up>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::pointer
vector<_Tp, _Allocator>::__push_back_slow_path(_Up&& __x)
{
    allocator_type& __a = this->__alloc();
    __split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), size(), __a);
    // __v.push_back(std::forward<_Up>(__x));
    __alloc_traits::construct(__a, std::__to_address(__v.__end_), std::forward<_Up>(__x));
    __v.__end_++;
    __swap_out_circular_buffer(__v);
    return this->__end_;
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
void
vector<_Tp, _Allocator>::push_back(const_reference __x)
{
    pointer __end = this->__end_;
    if (__end < this->__end_cap()) {
        __construct_one_at_end(__x);
        ++__end;
    } else {
        __end = __push_back_slow_path(__x);
    }
    this->__end_ = __end;
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
void
vector<_Tp, _Allocator>::push_back(value_type&& __x)
{
    pointer __end = this->__end_;
    if (__end < this->__end_cap()) {
        __construct_one_at_end(std::move(__x));
        ++__end;
    } else {
        __end = __push_back_slow_path(std::move(__x));
    }
    this->__end_ = __end;
}

template <class _Tp, class _Allocator>
template <class... _Args>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::pointer
vector<_Tp, _Allocator>::__emplace_back_slow_path(_Args&&... __args)
{
    allocator_type& __a = this->__alloc();
    __split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), size(), __a);
//    __v.emplace_back(std::forward<_Args>(__args)...);
    __alloc_traits::construct(__a, std::__to_address(__v.__end_), std::forward<_Args>(__args)...);
    __v.__end_++;
    __swap_out_circular_buffer(__v);
    return this->__end_;
}

template <class _Tp, class _Allocator>
template <class... _Args>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1676 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
typename vector<_Tp, _Allocator>::reference
#else
# 1678 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
void
#endif
# 1680 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
vector<_Tp, _Allocator>::emplace_back(_Args&&... __args)
{
    pointer __end = this->__end_;
    if (__end < this->__end_cap()) {
        __construct_one_at_end(std::forward<_Args>(__args)...);
        ++__end;
    } else {
        __end = __emplace_back_slow_path(std::forward<_Args>(__args)...);
    }
    this->__end_ = __end;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1691 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    return *(__end - 1);
#endif
# 1693 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline
void
vector<_Tp, _Allocator>::pop_back()
{
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(!empty(), "vector::pop_back called on an empty vector");
    this->__destruct_at_end(this->__end_ - 1);
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::erase(const_iterator __position)
{
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__position != end(),
        "vector::erase(iterator) called with a non-dereferenceable iterator");
    difference_type __ps = __position - cbegin();
    pointer __p = this->__begin_ + __ps;
    this->__destruct_at_end(std::move(__p + 1, this->__end_, __p));
    return __make_iter(__p);
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::erase(const_iterator __first, const_iterator __last)
{
    _LIBCPP_ASSERT_VALID_INPUT_RANGE(__first <= __last, "vector::erase(first, last) called with invalid range");
    pointer __p = this->__begin_ + (__first - begin());
    if (__first != __last) {
        this->__destruct_at_end(std::move(__p + (__last - __first), this->__end_, __p));
    }
    return __make_iter(__p);
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::__move_range(pointer __from_s, pointer __from_e, pointer __to)
{
    pointer __old_last = this->__end_;
    difference_type __n = __old_last - __to;
    {
      pointer __i = __from_s + __n;
      _ConstructTransaction __tx(*this, __from_e - __i);
      for (pointer __pos = __tx.__pos_; __i < __from_e;
           ++__i, (void) ++__pos, __tx.__pos_ = __pos) {
          __alloc_traits::construct(this->__alloc(),
                                    std::__to_address(__pos),
                                    std::move(*__i));
      }
    }
    std::move_backward(__from_s, __from_s + __n, __old_last);
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, const_reference __x)
{
    pointer __p = this->__begin_ + (__position - begin());
    // We can't compare unrelated pointers inside constant expressions
    if (!__libcpp_is_constant_evaluated() && this->__end_ < this->__end_cap())
    {
        if (__p == this->__end_)
        {
            __construct_one_at_end(__x);
        }
        else
        {
            __move_range(__p, this->__end_, __p + 1);
            const_pointer __xr = pointer_traits<const_pointer>::pointer_to(__x);
            if (__p <= __xr && __xr < this->__end_)
                ++__xr;
            *__p = *__xr;
        }
    }
    else
    {
        allocator_type& __a = this->__alloc();
        __split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), __p - this->__begin_, __a);
        __v.push_back(__x);
        __p = __swap_out_circular_buffer(__v, __p);
    }
    return __make_iter(__p);
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, value_type&& __x)
{
    pointer __p = this->__begin_ + (__position - begin());
    if (this->__end_ < this->__end_cap())
    {
        if (__p == this->__end_)
        {
            __construct_one_at_end(std::move(__x));
        }
        else
        {
            __move_range(__p, this->__end_, __p + 1);
            *__p = std::move(__x);
        }
    }
    else
    {
        allocator_type& __a = this->__alloc();
        __split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), __p - this->__begin_, __a);
        __v.push_back(std::move(__x));
        __p = __swap_out_circular_buffer(__v, __p);
    }
    return __make_iter(__p);
}

template <class _Tp, class _Allocator>
template <class... _Args>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args)
{
    pointer __p = this->__begin_ + (__position - begin());
    if (this->__end_ < this->__end_cap())
    {
        if (__p == this->__end_)
        {
            __construct_one_at_end(std::forward<_Args>(__args)...);
        }
        else
        {
            __temp_value<value_type, _Allocator> __tmp(this->__alloc(), std::forward<_Args>(__args)...);
            __move_range(__p, this->__end_, __p + 1);
            *__p = std::move(__tmp.get());
        }
    }
    else
    {
        allocator_type& __a = this->__alloc();
        __split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), __p - this->__begin_, __a);
        __v.emplace_back(std::forward<_Args>(__args)...);
        __p = __swap_out_circular_buffer(__v, __p);
    }
    return __make_iter(__p);
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, size_type __n, const_reference __x)
{
    pointer __p = this->__begin_ + (__position - begin());
    if (__n > 0)
    {
        // We can't compare unrelated pointers inside constant expressions
        if (!__libcpp_is_constant_evaluated() && __n <= static_cast<size_type>(this->__end_cap() - this->__end_))
        {
            size_type __old_n = __n;
            pointer __old_last = this->__end_;
            if (__n > static_cast<size_type>(this->__end_ - __p))
            {
                size_type __cx = __n - (this->__end_ - __p);
                __construct_at_end(__cx, __x);
                __n -= __cx;
            }
            if (__n > 0)
            {
                __move_range(__p, __old_last, __p + __old_n);
                const_pointer __xr = pointer_traits<const_pointer>::pointer_to(__x);
                if (__p <= __xr && __xr < this->__end_)
                    __xr += __old_n;
                std::fill_n(__p, __n, *__xr);
            }
        }
        else
        {
            allocator_type& __a = this->__alloc();
            __split_buffer<value_type, allocator_type&> __v(__recommend(size() + __n), __p - this->__begin_, __a);
            __v.__construct_at_end(__n, __x);
            __p = __swap_out_circular_buffer(__v, __p);
        }
    }
    return __make_iter(__p);
}
template <class _Tp, class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value &&
                              is_constructible<_Tp, typename iterator_traits<_InputIterator>::reference>::value,
                          int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, _InputIterator __first, _InputIterator __last)
{
  return __insert_with_sentinel(__position, __first, __last);
}

template <class _Tp, class _Allocator>
template <class _InputIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::__insert_with_sentinel(const_iterator __position, _InputIterator __first, _Sentinel __last) {
    difference_type __off = __position - begin();
    pointer __p = this->__begin_ + __off;
    allocator_type& __a = this->__alloc();
    pointer __old_last = this->__end_;
    for (; this->__end_ != this->__end_cap() && __first != __last; ++__first)
    {
        __construct_one_at_end(*__first);
    }
    __split_buffer<value_type, allocator_type&> __v(__a);
    if (__first != __last)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1910 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
            __v.__construct_at_end_with_sentinel(std::move(__first), std::move(__last));
            difference_type __old_size = __old_last - this->__begin_;
            difference_type __old_p = __p - this->__begin_;
            reserve(__recommend(size() + __v.size()));
            __p = this->__begin_ + __old_p;
            __old_last = this->__begin_ + __old_size;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            erase(__make_iter(__old_last), end());
            throw;
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1924 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    }
    __p = std::rotate(__p, __old_last, this->__end_);
    insert(__make_iter(__p), std::make_move_iterator(__v.begin()),
                             std::make_move_iterator(__v.end()));
    return begin() + __off;
}

template <class _Tp, class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value &&
                        is_constructible<_Tp, typename iterator_traits<_ForwardIterator>::reference>::value,
                    int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last)
{
  return __insert_with_size(__position, __first, __last, std::distance(__first, __last));
}

template <class _Tp, class _Allocator>
template <class _Iterator, class _Sentinel>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::__insert_with_size(const_iterator __position, _Iterator __first, _Sentinel __last,
                                            difference_type __n) {
    auto __insertion_size = __n;
    pointer __p = this->__begin_ + (__position - begin());
    if (__n > 0)
    {
        if (__n <= this->__end_cap() - this->__end_)
        {
            size_type __old_n = __n;
            pointer __old_last = this->__end_;
            _Iterator __m = std::next(__first, __n);
            difference_type __dx = this->__end_ - __p;
            if (__n > __dx)
            {
                __m = __first;
                difference_type __diff = this->__end_ - __p;
                std::advance(__m, __diff);
                __construct_at_end(__m, __last, __n - __diff);
                __n = __dx;
            }
            if (__n > 0)
            {
                __move_range(__p, __old_last, __p + __old_n);
                std::copy(__first, __m, __p);
            }
        }
        else
        {
            allocator_type& __a = this->__alloc();
            __split_buffer<value_type, allocator_type&> __v(__recommend(size() + __n), __p - this->__begin_, __a);
            __v.__construct_at_end_with_size(__first, __insertion_size);
            __p = __swap_out_circular_buffer(__v, __p);
        }
    }
    return __make_iter(__p);
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::resize(size_type __sz)
{
    size_type __cs = size();
    if (__cs < __sz)
        this->__append(__sz - __cs);
    else if (__cs > __sz)
        this->__destruct_at_end(this->__begin_ + __sz);
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::resize(size_type __sz, const_reference __x)
{
    size_type __cs = size();
    if (__cs < __sz)
        this->__append(__sz - __cs, __x);
    else if (__cs > __sz)
        this->__destruct_at_end(this->__begin_ + __sz);
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<_Tp, _Allocator>::swap(vector& __x)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2011 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _NOEXCEPT
#else
# 2013 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
                __is_nothrow_swappable<allocator_type>::value)
#endif
# 2016 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
{
    _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__alloc_traits::propagate_on_container_swap::value ||
                                        this->__alloc() == __x.__alloc(),
                                        "vector::swap: Either propagate_on_container_swap must be true"
                                        " or the allocators must compare equal");
    std::swap(this->__begin_, __x.__begin_);
    std::swap(this->__end_, __x.__end_);
    std::swap(this->__end_cap(), __x.__end_cap());
    std::__swap_allocator(this->__alloc(), __x.__alloc(),
        integral_constant<bool,__alloc_traits::propagate_on_container_swap::value>());
}

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
bool
vector<_Tp, _Allocator>::__invariants() const
{
    if (this->__begin_ == nullptr)
    {
        if (this->__end_ != nullptr || this->__end_cap() != nullptr)
            return false;
    }
    else
    {
        if (this->__begin_ > this->__end_)
            return false;
        if (this->__begin_ == this->__end_cap())
            return false;
        if (this->__end_ > this->__end_cap())
            return false;
    }
    return true;
}

// vector<bool>

template <class _Allocator> class vector<bool, _Allocator>;

template <class _Allocator> struct hash<vector<bool, _Allocator> >;

template <class _Allocator>
struct __has_storage_type<vector<bool, _Allocator> >
{
    static const bool value = true;
};

template <class _Allocator>
class _LIBCPP_TEMPLATE_VIS vector<bool, _Allocator>
{
public:
    typedef vector                                   __self;
    typedef bool                                     value_type;
    typedef _Allocator                               allocator_type;
    typedef allocator_traits<allocator_type>         __alloc_traits;
    typedef typename __alloc_traits::size_type       size_type;
    typedef typename __alloc_traits::difference_type difference_type;
    typedef size_type __storage_type;
    typedef __bit_iterator<vector, false>            pointer;
    typedef __bit_iterator<vector, true>             const_pointer;
    typedef pointer                                  iterator;
    typedef const_pointer                            const_iterator;
    typedef std::reverse_iterator<iterator>         reverse_iterator;
    typedef std::reverse_iterator<const_iterator>   const_reverse_iterator;

private:
    typedef __rebind_alloc<__alloc_traits, __storage_type> __storage_allocator;
    typedef allocator_traits<__storage_allocator>    __storage_traits;
    typedef typename __storage_traits::pointer       __storage_pointer;
    typedef typename __storage_traits::const_pointer __const_storage_pointer;

    __storage_pointer                                      __begin_;
    size_type                                              __size_;
    __compressed_pair<size_type, __storage_allocator> __cap_alloc_;
public:
    typedef __bit_reference<vector>                  reference;
#ifdef _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
    using const_reference = bool;
#else
# 2094 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    typedef __bit_const_reference<vector>            const_reference;
#endif
# 2096 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
private:
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type& __cap() _NOEXCEPT
        {return __cap_alloc_.first();}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const size_type& __cap() const _NOEXCEPT
        {return __cap_alloc_.first();}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    __storage_allocator& __alloc() _NOEXCEPT
        {return __cap_alloc_.second();}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const __storage_allocator& __alloc() const _NOEXCEPT
        {return __cap_alloc_.second();}

    static const unsigned __bits_per_word = static_cast<unsigned>(sizeof(__storage_type) * CHAR_BIT);

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    static size_type __internal_cap_to_external(size_type __n) _NOEXCEPT
        {return __n * __bits_per_word;}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    static size_type __external_cap_to_internal(size_type __n) _NOEXCEPT
        {return (__n - 1) / __bits_per_word + 1;}

public:
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit vector(const allocator_type& __a)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value);
#else
# 2127 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        _NOEXCEPT;
#endif
# 2129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

private:
  class __destroy_vector {
    public:
      _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI __destroy_vector(vector& __vec) : __vec_(__vec) {}

      _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void operator()() {
        if (__vec_.__begin_ != nullptr)
            __storage_traits::deallocate(__vec_.__alloc(), __vec_.__begin_, __vec_.__cap());
      }

    private:
      vector& __vec_;
  };

public:
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 ~vector() { __destroy_vector(*this)(); }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit vector(size_type __n);
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2149 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit vector(size_type __n, const allocator_type& __a);
#endif
# 2151 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(size_type __n, const value_type& __v);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(size_type __n, const value_type& __v, const allocator_type& __a);
    template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_InputIterator __first, _InputIterator __last);
    template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a);
    template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_ForwardIterator __first, _ForwardIterator __last);
    template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2163 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    template <_ContainerCompatibleRange<bool> _Range>
    _LIBCPP_HIDE_FROM_ABI constexpr
    vector(from_range_t, _Range&& __range, const allocator_type& __a = allocator_type())
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, static_cast<__storage_allocator>(__a)) {
      if constexpr (ranges::forward_range<_Range> || ranges::sized_range<_Range>) {
        auto __n = static_cast<size_type>(ranges::distance(__range));
        __init_with_size(ranges::begin(__range), ranges::end(__range), __n);

      } else {
        __init_with_sentinel(ranges::begin(__range), ranges::end(__range));
      }
    }
#endif
# 2178 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(const vector& __v);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(const vector& __v, const allocator_type& __a);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector& operator=(const vector& __v);

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(initializer_list<value_type> __il);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(initializer_list<value_type> __il, const allocator_type& __a);

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    vector& operator=(initializer_list<value_type> __il)
        {assign(__il.begin(), __il.end()); return *this;}

#endif // !_LIBCPP_CXX03_LANG
# 2192 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    vector(vector&& __v)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2196 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        noexcept;
#else
# 2198 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
#endif
# 2200 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector(vector&& __v, const __type_identity_t<allocator_type>& __a);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    vector& operator=(vector&& __v)
        _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));

    template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
    void
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 assign(_InputIterator __first, _InputIterator __last);
    template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
    void
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 assign(_ForwardIterator __first, _ForwardIterator __last);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    template <_ContainerCompatibleRange<bool> _Range>
    _LIBCPP_HIDE_FROM_ABI
    constexpr void assign_range(_Range&& __range) {
      if constexpr (ranges::forward_range<_Range> || ranges::sized_range<_Range>) {
        auto __n = static_cast<size_type>(ranges::distance(__range));
        __assign_with_size(ranges::begin(__range), ranges::end(__range), __n);

      } else {
        __assign_with_sentinel(ranges::begin(__range), ranges::end(__range));
      }
    }
#endif
# 2225 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void assign(size_type __n, const value_type& __x);

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void assign(initializer_list<value_type> __il)
        {assign(__il.begin(), __il.end());}
#endif
# 2233 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 allocator_type get_allocator() const _NOEXCEPT
        {return allocator_type(this->__alloc());}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type max_size() const _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type capacity() const _NOEXCEPT
        {return __internal_cap_to_external(__cap());}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_type size() const _NOEXCEPT
        {return __size_;}
    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    bool empty() const _NOEXCEPT
        {return __size_ == 0;}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void reserve(size_type __n);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void shrink_to_fit() _NOEXCEPT;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    iterator begin() _NOEXCEPT
        {return __make_iter(0);}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_iterator begin() const _NOEXCEPT
        {return __make_iter(0);}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    iterator end() _NOEXCEPT
        {return __make_iter(__size_);}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_iterator end()   const _NOEXCEPT
        {return __make_iter(__size_);}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    reverse_iterator rbegin() _NOEXCEPT
        {return       reverse_iterator(end());}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_reverse_iterator rbegin() const _NOEXCEPT
        {return const_reverse_iterator(end());}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    reverse_iterator rend() _NOEXCEPT
        {return       reverse_iterator(begin());}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_reverse_iterator rend()   const _NOEXCEPT
        {return const_reverse_iterator(begin());}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_iterator         cbegin()  const _NOEXCEPT
        {return __make_iter(0);}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_iterator         cend()    const _NOEXCEPT
        {return __make_iter(__size_);}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_reverse_iterator crbegin() const _NOEXCEPT
        {return rbegin();}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_reverse_iterator crend()   const _NOEXCEPT
        {return rend();}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference       operator[](size_type __n)       {return __make_ref(__n);}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference operator[](size_type __n) const {return __make_ref(__n);}
    _LIBCPP_HIDE_FROM_ABI reference       at(size_type __n);
    _LIBCPP_HIDE_FROM_ABI const_reference at(size_type __n) const;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference       front()       {return __make_ref(0);}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference front() const {return __make_ref(0);}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference       back()        {return __make_ref(__size_ - 1);}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 const_reference back()  const {return __make_ref(__size_ - 1);}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void push_back(const value_type& __x);
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2301 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    template <class... _Args>
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2303 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference emplace_back(_Args&&... __args)
#else
# 2305 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _LIBCPP_HIDE_FROM_ABI void      emplace_back(_Args&&... __args)
#endif
# 2307 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    {
        push_back ( value_type ( std::forward<_Args>(__args)... ));
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2310 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        return this->back();
#endif
# 2312 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    }
#endif
# 2314 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2316 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    template <_ContainerCompatibleRange<bool> _Range>
    _LIBCPP_HIDE_FROM_ABI
    constexpr void append_range(_Range&& __range) {
      insert_range(end(), std::forward<_Range>(__range));
    }
#endif
# 2322 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void pop_back() {--__size_;}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2326 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    template <class... _Args>
   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator emplace(const_iterator __position, _Args&&... __args)
        { return insert ( __position, value_type ( std::forward<_Args>(__args)... )); }
#endif
# 2330 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator insert(const_iterator __position, const value_type& __x);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator insert(const_iterator __position, size_type __n, const value_type& __x);
    template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> = 0>
        iterator
        _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert(const_iterator __position, _InputIterator __first, _InputIterator __last);
    template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> = 0>
        iterator
        _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2341 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    template <_ContainerCompatibleRange<bool> _Range>
    _LIBCPP_HIDE_FROM_ABI
    constexpr iterator insert_range(const_iterator __position, _Range&& __range) {
      if constexpr (ranges::forward_range<_Range> || ranges::sized_range<_Range>) {
        auto __n = static_cast<size_type>(ranges::distance(__range));
        return __insert_with_size(__position, ranges::begin(__range), ranges::end(__range), __n);

      } else {
        return __insert_with_sentinel(__position, ranges::begin(__range), ranges::end(__range));
      }
    }
#endif
# 2353 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    iterator insert(const_iterator __position, initializer_list<value_type> __il)
        {return insert(__position, __il.begin(), __il.end());}
#endif
# 2359 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator erase(const_iterator __position);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 iterator erase(const_iterator __first, const_iterator __last);

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void clear() _NOEXCEPT {__size_ = 0;}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(vector&)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2368 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        _NOEXCEPT;
#else
# 2370 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
                    __is_nothrow_swappable<allocator_type>::value);
#endif
# 2373 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static void swap(reference __x, reference __y) _NOEXCEPT { std::swap(__x, __y); }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void resize(size_type __sz, value_type __x = false);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void flip() _NOEXCEPT;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __invariants() const;

private:
    _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
    void __throw_length_error() const {
        std::__throw_length_error("vector");
    }

    _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
    void __throw_out_of_range() const {
        std::__throw_out_of_range("vector");
    }

    template <class _InputIterator, class _Sentinel>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __init_with_size(_InputIterator __first, _Sentinel __last, size_type __n) {
      auto __guard = std::__make_exception_guard(__destroy_vector(*this));

      if (__n > 0) {
        __vallocate(__n);
        __construct_at_end(std::move(__first), std::move(__last), __n);
      }

      __guard.__complete();
    }

    template <class _InputIterator, class _Sentinel>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __init_with_sentinel(_InputIterator __first, _Sentinel __last) {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
      try {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 2410 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        for (; __first != __last; ++__first)
            push_back(*__first);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
      } catch (...) {
        if (__begin_ != nullptr)
          __storage_traits::deallocate(__alloc(), __begin_, __cap());
        throw;
      }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 2419 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    }

  template <class _Iterator, class _Sentinel>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  void __assign_with_sentinel(_Iterator __first, _Sentinel __last);

  template <class _ForwardIterator, class _Sentinel>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  void __assign_with_size(_ForwardIterator __first, _Sentinel __last, difference_type __ns);

  template <class _InputIterator, class _Sentinel>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  iterator __insert_with_sentinel(const_iterator __position, _InputIterator __first, _Sentinel __last);

  template <class _Iterator, class _Sentinel>
  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
  iterator __insert_with_size(const_iterator __position, _Iterator __first, _Sentinel __last, difference_type __n);

    //  Allocate space for __n objects
    //  throws length_error if __n > max_size()
    //  throws (probably bad_alloc) if memory run out
    //  Precondition:  __begin_ == __end_ == __cap() == 0
    //  Precondition:  __n > 0
    //  Postcondition:  capacity() >= __n
    //  Postcondition:  size() == 0
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __vallocate(size_type __n) {
        if (__n > max_size())
            __throw_length_error();
        auto __allocation = std::__allocate_at_least(__alloc(), __external_cap_to_internal(__n));
        __begin_ = __allocation.ptr;
        __size_ = 0;
        __cap() = __allocation.count;
        if (__libcpp_is_constant_evaluated()) {
            for (size_type __i = 0; __i != __cap(); ++__i)
                std::__construct_at(std::__to_address(__begin_) + __i);
        }
    }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __vdeallocate() _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    static size_type __align_it(size_type __new_size) _NOEXCEPT
        {return (__new_size + (__bits_per_word-1)) & ~((size_type)__bits_per_word-1);}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20  size_type __recommend(size_type __new_size) const;
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __construct_at_end(size_type __n, bool __x);
    template <class _InputIterator, class _Sentinel>
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __construct_at_end(_InputIterator __first, _Sentinel __last, size_type __n);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __append(size_type __n, const_reference __x);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    reference __make_ref(size_type __pos) _NOEXCEPT
        {return reference(__begin_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_reference __make_ref(size_type __pos) const _NOEXCEPT {
        return __bit_const_reference<vector>(__begin_ + __pos / __bits_per_word,
                                             __storage_type(1) << __pos % __bits_per_word);
    }
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    iterator __make_iter(size_type __pos) _NOEXCEPT
        {return iterator(__begin_ + __pos / __bits_per_word, static_cast<unsigned>(__pos % __bits_per_word));}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    const_iterator __make_iter(size_type __pos) const _NOEXCEPT
        {return const_iterator(__begin_ + __pos / __bits_per_word, static_cast<unsigned>(__pos % __bits_per_word));}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    iterator __const_iterator_cast(const_iterator __p) _NOEXCEPT
        {return begin() + (__p - cbegin());}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __copy_assign_alloc(const vector& __v)
        {__copy_assign_alloc(__v, integral_constant<bool,
                      __storage_traits::propagate_on_container_copy_assignment::value>());}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __copy_assign_alloc(const vector& __c, true_type)
        {
            if (__alloc() != __c.__alloc())
                __vdeallocate();
            __alloc() = __c.__alloc();
        }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __copy_assign_alloc(const vector&, false_type)
        {}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign(vector& __c, false_type);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __move_assign(vector& __c, true_type)
        _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __move_assign_alloc(vector& __c)
        _NOEXCEPT_(
            !__storage_traits::propagate_on_container_move_assignment::value ||
            is_nothrow_move_assignable<allocator_type>::value)
        {__move_assign_alloc(__c, integral_constant<bool,
                      __storage_traits::propagate_on_container_move_assignment::value>());}
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __move_assign_alloc(vector& __c, true_type)
        _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
        {
            __alloc() = std::move(__c.__alloc());
        }

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    void __move_assign_alloc(vector&, false_type)
        _NOEXCEPT
        {}

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_t __hash_code() const _NOEXCEPT;

    friend class __bit_reference<vector>;
    friend class __bit_const_reference<vector>;
    friend class __bit_iterator<vector, false>;
    friend class __bit_iterator<vector, true>;
    friend struct __bit_array<vector>;
    friend struct _LIBCPP_TEMPLATE_VIS hash<vector>;
};

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::__vdeallocate() _NOEXCEPT
{
    if (this->__begin_ != nullptr)
    {
        __storage_traits::deallocate(this->__alloc(), this->__begin_, __cap());
        this->__begin_ = nullptr;
        this->__size_ = this->__cap() = 0;
    }
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<bool, _Allocator>::size_type
vector<bool, _Allocator>::max_size() const _NOEXCEPT
{
    size_type __amax = __storage_traits::max_size(__alloc());
    size_type __nmax = numeric_limits<size_type>::max() / 2;  // end() >= begin(), always
    if (__nmax / __bits_per_word <= __amax)
        return __nmax;
    return __internal_cap_to_external(__amax);
}

//  Precondition:  __new_size > capacity()
template <class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<bool, _Allocator>::size_type
vector<bool, _Allocator>::__recommend(size_type __new_size) const
{
    const size_type __ms = max_size();
    if (__new_size > __ms)
        this->__throw_length_error();
    const size_type __cap = capacity();
    if (__cap >= __ms / 2)
        return __ms;
    return std::max(2 * __cap, __align_it(__new_size));
}

//  Default constructs __n objects starting at __end_
//  Precondition:  __n > 0
//  Precondition:  size() + __n <= capacity()
//  Postcondition:  size() == size() + __n
template <class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<bool, _Allocator>::__construct_at_end(size_type __n, bool __x)
{
    size_type __old_size = this->__size_;
    this->__size_ += __n;
    if (__old_size == 0 || ((__old_size - 1) / __bits_per_word) != ((this->__size_ - 1) / __bits_per_word))
    {
        if (this->__size_ <= __bits_per_word)
            this->__begin_[0] = __storage_type(0);
        else
            this->__begin_[(this->__size_ - 1) / __bits_per_word] = __storage_type(0);
    }
    std::fill_n(__make_iter(__old_size), __n, __x);
}

template <class _Allocator>
template <class _InputIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_SINCE_CXX20
void vector<bool, _Allocator>::__construct_at_end(_InputIterator __first, _Sentinel __last, size_type __n) {
    size_type __old_size = this->__size_;
    this->__size_ += __n;
    if (__old_size == 0 || ((__old_size - 1) / __bits_per_word) != ((this->__size_ - 1) / __bits_per_word))
    {
        if (this->__size_ <= __bits_per_word)
            this->__begin_[0] = __storage_type(0);
        else
            this->__begin_[(this->__size_ - 1) / __bits_per_word] = __storage_type(0);
    }
    std::__copy<_ClassicAlgPolicy>(__first, __last, __make_iter(__old_size));
}

template <class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector()
    _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, __default_init_tag())
{
}

template <class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(const allocator_type& __a)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2623 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
#else
# 2625 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
        _NOEXCEPT
#endif
# 2627 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, static_cast<__storage_allocator>(__a))
{
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(size_type __n)
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, __default_init_tag())
{
    if (__n > 0)
    {
        __vallocate(__n);
        __construct_at_end(__n, false);
    }
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2648 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(size_type __n, const allocator_type& __a)
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, static_cast<__storage_allocator>(__a))
{
    if (__n > 0)
    {
        __vallocate(__n);
        __construct_at_end(__n, false);
    }
}
#endif
# 2662 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(size_type __n, const value_type& __x)
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, __default_init_tag())
{
    if (__n > 0)
    {
        __vallocate(__n);
        __construct_at_end(__n, __x);
    }
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(size_type __n, const value_type& __x, const allocator_type& __a)
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, static_cast<__storage_allocator>(__a))
{
    if (__n > 0)
    {
        __vallocate(__n);
        __construct_at_end(__n, __x);
    }
}

template <class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last)
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, __default_init_tag())
{
  __init_with_sentinel(__first, __last);
}

template <class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a)
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, static_cast<__storage_allocator>(__a))
{
  __init_with_sentinel(__first, __last);
}

template <class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last)
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, __default_init_tag())
{
  auto __n = static_cast<size_type>(std::distance(__first, __last));
  __init_with_size(__first, __last, __n);
}

template <class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a)
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, static_cast<__storage_allocator>(__a))
{
  auto __n = static_cast<size_type>(std::distance(__first, __last));
  __init_with_size(__first, __last, __n);
}

#ifndef _LIBCPP_CXX03_LANG

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(initializer_list<value_type> __il)
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, __default_init_tag())
{
    size_type __n = static_cast<size_type>(__il.size());
    if (__n > 0)
    {
        __vallocate(__n);
        __construct_at_end(__il.begin(), __il.end(), __n);
    }
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(initializer_list<value_type> __il, const allocator_type& __a)
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, static_cast<__storage_allocator>(__a))
{
    size_type __n = static_cast<size_type>(__il.size());
    if (__n > 0)
    {
        __vallocate(__n);
        __construct_at_end(__il.begin(), __il.end(), __n);
    }
}

#endif // _LIBCPP_CXX03_LANG
# 2770 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(const vector& __v)
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, __storage_traits::select_on_container_copy_construction(__v.__alloc()))
{
    if (__v.size() > 0)
    {
        __vallocate(__v.size());
        __construct_at_end(__v.begin(), __v.end(), __v.size());
    }
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(const vector& __v, const allocator_type& __a)
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, __a)
{
    if (__v.size() > 0)
    {
        __vallocate(__v.size());
        __construct_at_end(__v.begin(), __v.end(), __v.size());
    }
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>&
vector<bool, _Allocator>::operator=(const vector& __v)
{
    if (this != std::addressof(__v))
    {
        __copy_assign_alloc(__v);
        if (__v.__size_)
        {
            if (__v.__size_ > capacity())
            {
                __vdeallocate();
                __vallocate(__v.__size_);
            }
            std::copy(__v.__begin_, __v.__begin_ + __external_cap_to_internal(__v.__size_), __begin_);
        }
        __size_ = __v.__size_;
    }
    return *this;
}

template <class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 vector<bool, _Allocator>::vector(vector&& __v)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2824 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _NOEXCEPT
#else
# 2826 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
#endif
# 2828 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    : __begin_(__v.__begin_),
      __size_(__v.__size_),
      __cap_alloc_(std::move(__v.__cap_alloc_)) {
    __v.__begin_ = nullptr;
    __v.__size_ = 0;
    __v.__cap() = 0;
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>::vector(vector&& __v, const __type_identity_t<allocator_type>& __a)
    : __begin_(nullptr),
      __size_(0),
      __cap_alloc_(0, __a)
{
    if (__a == allocator_type(__v.__alloc()))
    {
        this->__begin_ = __v.__begin_;
        this->__size_ = __v.__size_;
        this->__cap() = __v.__cap();
        __v.__begin_ = nullptr;
        __v.__cap() = __v.__size_ = 0;
    }
    else if (__v.size() > 0)
    {
        __vallocate(__v.size());
        __construct_at_end(__v.begin(), __v.end(), __v.size());
    }
}

template <class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
vector<bool, _Allocator>&
vector<bool, _Allocator>::operator=(vector&& __v)
    _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value))
{
    __move_assign(__v, integral_constant<bool,
          __storage_traits::propagate_on_container_move_assignment::value>());
    return *this;
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::__move_assign(vector& __c, false_type)
{
    if (__alloc() != __c.__alloc())
        assign(__c.begin(), __c.end());
    else
        __move_assign(__c, true_type());
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::__move_assign(vector& __c, true_type)
    _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
{
    __vdeallocate();
    __move_assign_alloc(__c);
    this->__begin_ = __c.__begin_;
    this->__size_ = __c.__size_;
    this->__cap() = __c.__cap();
    __c.__begin_ = nullptr;
    __c.__cap() = __c.__size_ = 0;
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::assign(size_type __n, const value_type& __x)
{
    __size_ = 0;
    if (__n > 0)
    {
        size_type __c = capacity();
        if (__n <= __c)
            __size_ = __n;
        else
        {
            vector __v(get_allocator());
            __v.reserve(__recommend(__n));
            __v.__size_ = __n;
            swap(__v);
        }
        std::fill_n(begin(), __n, __x);
    }
}

template <class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<bool, _Allocator>::assign(_InputIterator __first, _InputIterator __last)
{
  __assign_with_sentinel(__first, __last);
}

template <class _Allocator>
template <class _Iterator, class _Sentinel>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void vector<bool, _Allocator>::__assign_with_sentinel(_Iterator __first, _Sentinel __last) {
    clear();
    for (; __first != __last; ++__first)
        push_back(*__first);
}

template <class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20
void
vector<bool, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last)
{
  __assign_with_size(__first, __last, std::distance(__first, __last));
}

template <class _Allocator>
template <class _ForwardIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
void vector<bool, _Allocator>::__assign_with_size(_ForwardIterator __first, _Sentinel __last, difference_type __ns) {
    _LIBCPP_ASSERT_VALID_INPUT_RANGE(__ns >= 0, "invalid range specified");

    clear();

    const size_t __n = static_cast<size_type>(__ns);
    if (__n)
    {
        if (__n > capacity())
        {
            __vdeallocate();
            __vallocate(__n);
        }
        __construct_at_end(__first, __last, __n);
    }
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::reserve(size_type __n)
{
    if (__n > capacity())
    {
        if (__n > max_size())
            this->__throw_length_error();
        vector __v(this->get_allocator());
        __v.__vallocate(__n);
        __v.__construct_at_end(this->begin(), this->end(), this->size());
        swap(__v);
    }
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::shrink_to_fit() _NOEXCEPT
{
    if (__external_cap_to_internal(size()) > __cap())
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 2986 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
            vector(*this, allocator_type(__alloc())).swap(*this);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 2993 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    }
}

template <class _Allocator>
typename vector<bool, _Allocator>::reference
vector<bool, _Allocator>::at(size_type __n)
{
    if (__n >= size())
        this->__throw_out_of_range();
    return (*this)[__n];
}

template <class _Allocator>
typename vector<bool, _Allocator>::const_reference
vector<bool, _Allocator>::at(size_type __n) const
{
    if (__n >= size())
        this->__throw_out_of_range();
    return (*this)[__n];
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::push_back(const value_type& __x)
{
    if (this->__size_ == this->capacity())
        reserve(__recommend(this->__size_ + 1));
    ++this->__size_;
    back() = __x;
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::insert(const_iterator __position, const value_type& __x)
{
    iterator __r;
    if (size() < capacity())
    {
        const_iterator __old_end = end();
        ++__size_;
        std::copy_backward(__position, __old_end, end());
        __r = __const_iterator_cast(__position);
    }
    else
    {
        vector __v(get_allocator());
        __v.reserve(__recommend(__size_ + 1));
        __v.__size_ = __size_ + 1;
        __r = std::copy(cbegin(), __position, __v.begin());
        std::copy_backward(__position, cend(), __v.end());
        swap(__v);
    }
    *__r = __x;
    return __r;
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::insert(const_iterator __position, size_type __n, const value_type& __x)
{
    iterator __r;
    size_type __c = capacity();
    if (__n <= __c && size() <= __c - __n)
    {
        const_iterator __old_end = end();
        __size_ += __n;
        std::copy_backward(__position, __old_end, end());
        __r = __const_iterator_cast(__position);
    }
    else
    {
        vector __v(get_allocator());
        __v.reserve(__recommend(__size_ + __n));
        __v.__size_ = __size_ + __n;
        __r = std::copy(cbegin(), __position, __v.begin());
        std::copy_backward(__position, cend(), __v.end());
        swap(__v);
    }
    std::fill_n(__r, __n, __x);
    return __r;
}

template <class _Allocator>
template <class _InputIterator, __enable_if_t<__has_exactly_input_iterator_category<_InputIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::insert(const_iterator __position, _InputIterator __first, _InputIterator __last)
{
  return __insert_with_sentinel(__position, __first, __last);
}

template <class _Allocator>
template <class _InputIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::__insert_with_sentinel(const_iterator __position, _InputIterator __first, _Sentinel __last) {
    difference_type __off = __position - begin();
    iterator __p = __const_iterator_cast(__position);
    iterator __old_end = end();
    for (; size() != capacity() && __first != __last; ++__first)
    {
        ++this->__size_;
        back() = *__first;
    }
    vector __v(get_allocator());
    if (__first != __last)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 3104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
            __v.__assign_with_sentinel(std::move(__first), std::move(__last));
            difference_type __old_size = static_cast<difference_type>(__old_end - begin());
            difference_type __old_p = __p - begin();
            reserve(__recommend(size() + __v.size()));
            __p = begin() + __old_p;
            __old_end = begin() + __old_size;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            erase(__old_end, end());
            throw;
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 3118 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    }
    __p = std::rotate(__p, __old_end, end());
    insert(__p, __v.begin(), __v.end());
    return begin() + __off;
}

template <class _Allocator>
template <class _ForwardIterator, __enable_if_t<__has_forward_iterator_category<_ForwardIterator>::value, int> >
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last)
{
  return __insert_with_size(__position, __first, __last, std::distance(__first, __last));
}

template <class _Allocator>
template <class _ForwardIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::__insert_with_size(const_iterator __position, _ForwardIterator __first, _Sentinel __last,
                                             difference_type __n_signed) {
    _LIBCPP_ASSERT_VALID_INPUT_RANGE(__n_signed >= 0, "invalid range specified");
    const size_type __n = static_cast<size_type>(__n_signed);
    iterator __r;
    size_type __c = capacity();
    if (__n <= __c && size() <= __c - __n)
    {
        const_iterator __old_end = end();
        __size_ += __n;
        std::copy_backward(__position, __old_end, end());
        __r = __const_iterator_cast(__position);
    }
    else
    {
        vector __v(get_allocator());
        __v.reserve(__recommend(__size_ + __n));
        __v.__size_ = __size_ + __n;
        __r = std::copy(cbegin(), __position, __v.begin());
        std::copy_backward(__position, cend(), __v.end());
        swap(__v);
    }
    std::__copy<_ClassicAlgPolicy>(__first, __last, __r);
    return __r;
}

template <class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::erase(const_iterator __position)
{
    iterator __r = __const_iterator_cast(__position);
    std::copy(__position + 1, this->cend(), __r);
    --__size_;
    return __r;
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
typename vector<bool, _Allocator>::iterator
vector<bool, _Allocator>::erase(const_iterator __first, const_iterator __last)
{
    iterator __r = __const_iterator_cast(__first);
    difference_type __d = __last - __first;
    std::copy(__last, this->cend(), __r);
    __size_ -= __d;
    return __r;
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::swap(vector& __x)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 3190 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _NOEXCEPT
#else
# 3192 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
    _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
                __is_nothrow_swappable<allocator_type>::value)
#endif
# 3195 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
{
    std::swap(this->__begin_, __x.__begin_);
    std::swap(this->__size_, __x.__size_);
    std::swap(this->__cap(), __x.__cap());
    std::__swap_allocator(this->__alloc(), __x.__alloc(),
        integral_constant<bool, __alloc_traits::propagate_on_container_swap::value>());
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::resize(size_type __sz, value_type __x)
{
    size_type __cs = size();
    if (__cs < __sz)
    {
        iterator __r;
        size_type __c = capacity();
        size_type __n = __sz - __cs;
        if (__n <= __c && __cs <= __c - __n)
        {
            __r = end();
            __size_ += __n;
        }
        else
        {
            vector __v(get_allocator());
            __v.reserve(__recommend(__size_ + __n));
            __v.__size_ = __size_ + __n;
            __r = std::copy(cbegin(), cend(), __v.begin());
            swap(__v);
        }
        std::fill_n(__r, __n, __x);
    }
    else
        __size_ = __sz;
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
vector<bool, _Allocator>::flip() _NOEXCEPT
{
    // do middle whole words
    size_type __n = __size_;
    __storage_pointer __p = __begin_;
    for (; __n >= __bits_per_word; ++__p, __n -= __bits_per_word)
        *__p = ~*__p;
    // do last partial word
    if (__n > 0)
    {
        __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
        __storage_type __b = *__p & __m;
        *__p &= ~__m;
        *__p |= ~__b & __m;
    }
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 bool
vector<bool, _Allocator>::__invariants() const
{
    if (this->__begin_ == nullptr)
    {
        if (this->__size_ != 0 || this->__cap() != 0)
            return false;
    }
    else
    {
        if (this->__cap() == 0)
            return false;
        if (this->__size_ > this->capacity())
            return false;
    }
    return true;
}

template <class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 size_t
vector<bool, _Allocator>::__hash_code() const _NOEXCEPT
{
    size_t __h = 0;
    // do middle whole words
    size_type __n = __size_;
    __storage_pointer __p = __begin_;
    for (; __n >= __bits_per_word; ++__p, __n -= __bits_per_word)
        __h ^= *__p;
    // do last partial word
    if (__n > 0)
    {
        const __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
        __h ^= *__p & __m;
    }
    return __h;
}

template <class _Allocator>
struct _LIBCPP_TEMPLATE_VIS hash<vector<bool, _Allocator> >
    : public __unary_function<vector<bool, _Allocator>, size_t>
{
    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
    size_t operator()(const vector<bool, _Allocator>& __vec) const _NOEXCEPT
        {return __vec.__hash_code();}
};

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
bool
operator==(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
{
    const typename vector<_Tp, _Allocator>::size_type __sz = __x.size();
    return __sz == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin());
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 3309 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

template <class _Tp, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator!=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
{
    return !(__x == __y);
}

template <class _Tp, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator< (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
{
    return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
}

template <class _Tp, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator> (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
{
    return __y < __x;
}

template <class _Tp, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator>=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
{
    return !(__x < __y);
}

template <class _Tp, class _Allocator>
inline _LIBCPP_HIDE_FROM_ABI
bool
operator<=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
{
    return !(__y < __x);
}

#else // _LIBCPP_STD_VER <= 17
# 3351 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

template <class _Tp, class _Allocator>
_LIBCPP_HIDE_FROM_ABI constexpr __synth_three_way_result<_Tp>
operator<=>(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y) {
    return std::lexicographical_compare_three_way(
        __x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way<_Tp, _Tp>);
}

#endif // _LIBCPP_STD_VER <= 17
# 3360 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI
void
swap(vector<_Tp, _Allocator>& __x, vector<_Tp, _Allocator>& __y)
    _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
    __x.swap(__y);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 3372 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
template <class _Tp, class _Allocator, class _Up>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::size_type
erase(vector<_Tp, _Allocator>& __c, const _Up& __v) {
  auto __old_size = __c.size();
  __c.erase(std::remove(__c.begin(), __c.end(), __v), __c.end());
  return __old_size - __c.size();
}

template <class _Tp, class _Allocator, class _Predicate>
_LIBCPP_CONSTEXPR_SINCE_CXX20
inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::size_type
erase_if(vector<_Tp, _Allocator>& __c, _Predicate __pred) {
  auto __old_size = __c.size();
  __c.erase(std::remove_if(__c.begin(), __c.end(), __pred), __c.end());
  return __old_size - __c.size();
}

template <>
inline constexpr bool __format::__enable_insertable<vector<char>> = true;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
template <>
inline constexpr bool __format::__enable_insertable<vector<wchar_t>> = true;
#endif
# 3396 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

#endif // _LIBCPP_STD_VER >= 20
# 3398 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 3400 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
template <class _Tp, class _CharT>
// Since is-vector-bool-reference is only used once it's inlined here.
  requires same_as<typename _Tp::__container, vector<bool, typename _Tp::__container::allocator_type>>
struct _LIBCPP_TEMPLATE_VIS formatter<_Tp, _CharT> {
private:
  formatter<bool, _CharT> __underlying_;

public:
  template <class _ParseContext>
  _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
        return __underlying_.parse(__ctx);
  }

  template <class _FormatContext>
  _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator format(const _Tp& __ref, _FormatContext& __ctx) const {
        return __underlying_.format(__ref, __ctx);
  }
};
#endif // _LIBCPP_STD_VER >= 23
# 3419 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

_LIBCPP_END_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 3423 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
_LIBCPP_BEGIN_NAMESPACE_STD
namespace pmr {
template <class _ValueT>
using vector _LIBCPP_AVAILABILITY_PMR = std::vector<_ValueT, polymorphic_allocator<_ValueT>>;
} // namespace pmr
_LIBCPP_END_NAMESPACE_STD
#endif
# 3430 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

_LIBCPP_POP_MACROS

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 3434 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#  include <algorithm>
#endif /* expanded by -frewrite-includes */
# 3434 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 3435 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#  include <atomic>
#endif /* expanded by -frewrite-includes */
# 3435 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 3436 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 3436 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 3437 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 3437 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 3438 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 3438 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 3439 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#  include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 3439 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 3440 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#if 0 /* expanded by -frewrite-includes */
#  include <utility>
#endif /* expanded by -frewrite-includes */
# 3440 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
# 3441 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#endif
# 3442 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3

#endif // _LIBCPP_VECTOR
# 3444 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/vector" 3
#endif /* vector expanded by -frewrite-includes */
# 58 "../../third_party/googletest/src/googletest/include/gtest/gtest.h" 2

#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-assertion-result.h expanded by -frewrite-includes */
#include "gtest/gtest-assertion-result.h"
#else /* gtest-assertion-result.h expanded by -frewrite-includes */
# 59 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h" 1
// Copyright 2005, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// The Google C++ Testing and Mocking Framework (Google Test)
//
// This file implements the AssertionResult type.

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_ASSERTION_RESULT_H_
#define GOOGLETEST_INCLUDE_GTEST_GTEST_ASSERTION_RESULT_H_

#if 0 /* expanded by -frewrite-includes */
#include <memory>
#endif /* expanded by -frewrite-includes */
# 41 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"
# 42 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"
#if 0 /* expanded by -frewrite-includes */
#include <ostream>
#endif /* expanded by -frewrite-includes */
# 42 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"
# 43 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"
#if 0 /* expanded by -frewrite-includes */
#include <string>
#endif /* expanded by -frewrite-includes */
# 43 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"
# 44 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 44 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"
# 45 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-message.h expanded by -frewrite-includes */
#include "gtest/gtest-message.h"
#else /* gtest-message.h expanded by -frewrite-includes */
# 46 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/gtest-message.h" 1
// Copyright 2005, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// The Google C++ Testing and Mocking Framework (Google Test)
//
// This header file defines the Message class.
//
// IMPORTANT NOTE: Due to limitation of the C++ language, we have to
// leave some internal implementation details in this header file.
// They are clearly marked by comments like this:
//
//   // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
//
// Such code is NOT meant to be used by a user directly, and is subject
// to CHANGE WITHOUT NOTICE.  Therefore DO NOT DEPEND ON IT in a user
// program!

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
#define GOOGLETEST_INCLUDE_GTEST_GTEST_MESSAGE_H_

#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 51 "../../third_party/googletest/src/googletest/include/gtest/gtest-message.h"
# 52 "../../third_party/googletest/src/googletest/include/gtest/gtest-message.h"
#if 0 /* expanded by -frewrite-includes */
#include <memory>
#endif /* expanded by -frewrite-includes */
# 52 "../../third_party/googletest/src/googletest/include/gtest/gtest-message.h"
# 53 "../../third_party/googletest/src/googletest/include/gtest/gtest-message.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* sstream expanded by -frewrite-includes */
#include <sstream>
#else /* sstream expanded by -frewrite-includes */
# 53 "../../third_party/googletest/src/googletest/include/gtest/gtest-message.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_SSTREAM
#define _LIBCPP_SSTREAM

/*
    sstream synopsis [sstream.syn]

// Class template basic_stringbuf [stringbuf]
template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
class basic_stringbuf
    : public basic_streambuf<charT, traits>
{
public:
    typedef charT                          char_type;
    typedef traits                         traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;
    typedef Allocator                      allocator_type;

    // [stringbuf.cons] constructors:
    explicit basic_stringbuf(ios_base::openmode which = ios_base::in | ios_base::out); // before C++20
    basic_stringbuf() : basic_stringbuf(ios_base::in | ios_base::out) {}               // C++20
    explicit basic_stringbuf(ios_base::openmode which);                                // C++20
    explicit basic_stringbuf(const basic_string<char_type, traits_type, allocator_type>& s,
                             ios_base::openmode which = ios_base::in | ios_base::out);
    explicit basic_stringbuf(const allocator_type& a)
        : basic_stringbuf(ios_base::in | ios_base::out, a) {}                          // C++20
    basic_stringbuf(ios_base::openmode which, const allocator_type& a);                // C++20
    explicit basic_stringbuf(basic_string<char_type, traits_type, allocator_type>&& s,
                             ios_base::openmode which = ios_base::in | ios_base::out); // C++20
    template <class SAlloc>
    basic_stringbuf(const basic_string<char_type, traits_type, SAlloc>& s, const allocator_type& a)
        : basic_stringbuf(s, ios_base::in | ios_base::out, a) {}                       // C++20
    template <class SAlloc>
    basic_stringbuf(const basic_string<char_type, traits_type, SAlloc>& s,
                    ios_base::openmode which, const allocator_type& a);                // C++20
    template <class SAlloc>
    explicit basic_stringbuf(const basic_string<char_type, traits_type, SAlloc>& s,
                             ios_base::openmode which = ios_base::in | ios_base::out); // C++20
    basic_stringbuf(basic_stringbuf&& rhs);
    basic_stringbuf(basic_stringbuf&& rhs, const allocator_type& a);                   // C++20

    // [stringbuf.assign] Assign and swap:
    basic_stringbuf& operator=(basic_stringbuf&& rhs);
    void swap(basic_stringbuf& rhs) noexcept(see below);                               // conditionally noexcept since C++20

    // [stringbuf.members] Member functions:
    allocator_type get_allocator() const noexcept;                                     // C++20
    basic_string<char_type, traits_type, allocator_type> str() const;                  // before C++20
    basic_string<char_type, traits_type, allocator_type> str() const &;                // C++20
    template <class SAlloc>
    basic_string<char_type, traits_type, SAlloc> str(const SAlloc& sa) const;          // C++20
    basic_string<char_type, traits_type, allocator_type> str() &&;                     // C++20
    basic_string_view<char_type, traits_type> view() const noexcept;                   // C++20
    void str(const basic_string<char_type, traits_type, allocator_type>& s);
    template <class SAlloc>
    void str(const basic_string<char_type, traits_type, SAlloc>& s);                   // C++20
    void str(basic_string<char_type, traits_type, allocator_type>&& s);                // C++20

protected:
    // [stringbuf.virtuals] Overridden virtual functions:
    virtual int_type underflow();
    virtual int_type pbackfail(int_type c = traits_type::eof());
    virtual int_type overflow (int_type c = traits_type::eof());
    virtual basic_streambuf<char_type, traits_type>* setbuf(char_type*, streamsize);
    virtual pos_type seekoff(off_type off, ios_base::seekdir way,
                             ios_base::openmode which = ios_base::in | ios_base::out);
    virtual pos_type seekpos(pos_type sp,
                             ios_base::openmode which = ios_base::in | ios_base::out);
};

// [stringbuf.assign] non member swap
template <class charT, class traits, class Allocator>
void swap(basic_stringbuf<charT, traits, Allocator>& x,
          basic_stringbuf<charT, traits, Allocator>& y); // conditionally noexcept since C++20

typedef basic_stringbuf<char>    stringbuf;
typedef basic_stringbuf<wchar_t> wstringbuf;

// Class template basic_istringstream [istringstream]
template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
class basic_istringstream
    : public basic_istream<charT, traits>
{
public:
    typedef charT                          char_type;
    typedef traits                         traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;
    typedef Allocator                      allocator_type;

    // [istringstream.cons] Constructors:
    explicit basic_istringstream(ios_base::openmode which = ios_base::in);             // before C++20
    basic_istringstream() : basic_istringstream(ios_base::in) {}                       // C++20
    explicit basic_istringstream(ios_base::openmode which);                            // C++20
    explicit basic_istringstream(const basic_string<char_type, traits_type, allocator_type>& s,
                                 ios_base::openmode which = ios_base::in);
    basic_istringstream(ios_base::openmode which, const allocator_type& a);            // C++20
    explicit basic_istringstream(basic_string<char_type, traits_type, allocator_type>&& s,
                                 ios_base::openmode which = ios_base::in);             // C++20
    template <class SAlloc>
    basic_istringstream(const basic_string<char_type, traits_type, SAlloc>& s, const allocator_type& a)
        : basic_istringstream(s, ios_base::in, a) {}                                   // C++20
    template <class SAlloc>
    basic_istringstream(const basic_string<char_type, traits_type, SAlloc>& s,
                        ios_base::openmode which, const allocator_type& a);            // C++20
    template <class SAlloc>
    explicit basic_istringstream(const basic_string<char_type, traits_type, SAlloc>& s,
                                 ios_base::openmode which = ios_base::in);             // C++20
    basic_istringstream(basic_istringstream&& rhs);

    // [istringstream.assign] Assign and swap:
    basic_istringstream& operator=(basic_istringstream&& rhs);
    void swap(basic_istringstream& rhs);

    // [istringstream.members] Member functions:
    basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const;
    basic_string<char_type, traits_type, allocator_type> str() const;                  // before C++20
    basic_string<char_type, traits_type, allocator_type> str() const &;                // C++20
    template <class SAlloc>
    basic_string<char_type, traits_type, SAlloc> str(const SAlloc& sa) const;          // C++20
    basic_string<char_type, traits_type, allocator_type> str() &&;                     // C++20
    basic_string_view<char_type, traits_type> view() const noexcept;                   // C++20
    void str(const basic_string<char_type, traits_type, allocator_type>& s);
    template <class SAlloc>
    void str(const basic_string<char_type, traits_type, SAlloc>& s);                   // C++20
    void str(basic_string<char_type, traits_type, allocator_type>&& s);                // C++20
};

template <class charT, class traits, class Allocator>
void swap(basic_istringstream<charT, traits, Allocator>& x,
          basic_istringstream<charT, traits, Allocator>& y);

typedef basic_istringstream<char>    istringstream;
typedef basic_istringstream<wchar_t> wistringstream;

// Class template basic_ostringstream [ostringstream]
template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
class basic_ostringstream
    : public basic_ostream<charT, traits>
{
public:
    // types:
    typedef charT                          char_type;
    typedef traits                         traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;
    typedef Allocator                      allocator_type;

    // [ostringstream.cons] Constructors:
    explicit basic_ostringstream(ios_base::openmode which = ios_base::out);            // before C++20
    basic_ostringstream() : basic_ostringstream(ios_base::out) {}                      // C++20
    explicit basic_ostringstream(ios_base::openmode which);                            // C++20
    explicit basic_ostringstream(const basic_string<char_type, traits_type, allocator_type>& s,
                                 ios_base::openmode which = ios_base::out);
    basic_ostringstream(ios_base::openmode which, const allocator_type& a);            // C++20
    explicit basic_ostringstream(basic_string<char_type, traits_type, allocator_type>&& s,
                                 ios_base::openmode which = ios_base::out);            // C++20
    template <class SAlloc>
    basic_ostringstream(const basic_string<char_type, traits_type, SAlloc>& s, const allocator_type& a)
        : basic_ostringstream(s, ios_base::out, a) {}                                  // C++20
    template <class SAlloc>
    basic_ostringstream(const basic_string<char_type, traits_type, SAlloc>& s,
                        ios_base::openmode which, const allocator_type& a);            // C++20
    template <class SAlloc>
    explicit basic_ostringstream(const basic_string<char_type, traits_type, SAlloc>& s,
                                 ios_base::openmode which = ios_base::out);            // C++20
    basic_ostringstream(basic_ostringstream&& rhs);

    // [ostringstream.assign] Assign and swap:
    basic_ostringstream& operator=(basic_ostringstream&& rhs);
    void swap(basic_ostringstream& rhs);

    // [ostringstream.members] Member functions:
    basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const;
    basic_string<char_type, traits_type, allocator_type> str() const;                  // before C++20
    basic_string<char_type, traits_type, allocator_type> str() const &;                // C++20
    template <class SAlloc>
    basic_string<char_type, traits_type, SAlloc> str(const SAlloc& sa) const;          // C++20
    basic_string<char_type, traits_type, allocator_type> str() &&;                     // C++20
    basic_string_view<char_type, traits_type> view() const noexcept;                   // C++20
    void str(const basic_string<char_type, traits_type, allocator_type>& s);
    template <class SAlloc>
    void str(const basic_string<char_type, traits_type, SAlloc>& s);                   // C++20
    void str(basic_string<char_type, traits_type, allocator_type>&& s);                // C++20
};

template <class charT, class traits, class Allocator>
void swap(basic_ostringstream<charT, traits, Allocator>& x,
          basic_ostringstream<charT, traits, Allocator>& y);

typedef basic_ostringstream<char>    ostringstream;
typedef basic_ostringstream<wchar_t> wostringstream;

// Class template basic_stringstream [stringstream]
template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
class basic_stringstream
    : public basic_iostream<charT, traits>
{
public:
    // types:
    typedef charT                          char_type;
    typedef traits                         traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;
    typedef Allocator                      allocator_type;

    // [stringstream.cons] constructors
    explicit basic_stringstream(ios_base::openmode which = ios_base::out | ios_base::in); // before C++20
    basic_stringstream() : basic_stringstream(ios_base::out | ios_base::in) {}            // C++20
    explicit basic_stringstream(ios_base::openmode which);                                // C++20
    explicit basic_stringstream(const basic_string<char_type, traits_type, allocator_type>& s,
                                ios_base::openmode which = ios_base::out | ios_base::in);
    basic_stringstream(ios_base::openmode which, const allocator_type& a);                // C++20
    explicit basic_stringstream(basic_string<char_type, traits_type, allocator_type>&& s,
                                ios_base::openmode which = ios_base::out | ios_base::in); // C++20
    template <class SAlloc>
    basic_stringstream(const basic_string<char_type, traits_type, SAlloc>& s, const allocator_type& a)
        : basic_stringstream(s, ios_base::out | ios_base::in, a) {}                       // C++20
    template <class SAlloc>
    basic_stringstream(const basic_string<char_type, traits_type, SAlloc>& s,
                       ios_base::openmode which, const allocator_type& a);                // C++20
    template <class SAlloc>
    explicit basic_stringstream(const basic_string<char_type, traits_type, SAlloc>& s,
                                ios_base::openmode which = ios_base::out | ios_base::in); // C++20
    basic_stringstream(basic_stringstream&& rhs);

    // [stringstream.assign] Assign and swap:
    basic_stringstream& operator=(basic_stringstream&& rhs);
    void swap(basic_stringstream& rhs);

    // [stringstream.members] Member functions:
    basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const;
    basic_string<char_type, traits_type, allocator_type> str() const;                     // before C++20
    basic_string<char_type, traits_type, allocator_type> str() const &;                   // C++20
    template <class SAlloc>
    basic_string<char_type, traits_type, SAlloc> str(const SAlloc& sa) const;             // C++20
    basic_string<char_type, traits_type, allocator_type> str() &&;                        // C++20
    basic_string_view<char_type, traits_type> view() const noexcept;                      // C++20
    void str(const basic_string<char_type, traits_type, allocator_type>& s);
    template <class SAlloc>
    void str(const basic_string<char_type, traits_type, SAlloc>& s);                      // C++20
    void str(basic_string<char_type, traits_type, allocator_type>&& s);                   // C++20
};

template <class charT, class traits, class Allocator>
void swap(basic_stringstream<charT, traits, Allocator>& x,
          basic_stringstream<charT, traits, Allocator>& y);

typedef basic_stringstream<char>    stringstream;
typedef basic_stringstream<wchar_t> wstringstream;

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 269 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
# 270 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 270 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
# 271 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 271 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
# 272 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/sstream.h>
#endif /* expanded by -frewrite-includes */
# 272 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
# 273 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 273 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
# 274 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* istream expanded by -frewrite-includes */
#include <istream>
#else /* istream expanded by -frewrite-includes */
# 274 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_ISTREAM
#define _LIBCPP_ISTREAM

/*
    istream synopsis

template <class charT, class traits = char_traits<charT> >
class basic_istream
    : virtual public basic_ios<charT,traits>
{
public:
    // types (inherited from basic_ios (27.5.4)):
    typedef charT                          char_type;
    typedef traits                         traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;

    // 27.7.1.1.1 Constructor/destructor:
    explicit basic_istream(basic_streambuf<char_type, traits_type>* sb);
    basic_istream(basic_istream&& rhs);
    virtual ~basic_istream();

    // 27.7.1.1.2 Assign/swap:
    basic_istream& operator=(basic_istream&& rhs);
    void swap(basic_istream& rhs);

    // 27.7.1.1.3 Prefix/suffix:
    class sentry;

    // 27.7.1.2 Formatted input:
    basic_istream& operator>>(basic_istream& (*pf)(basic_istream&));
    basic_istream& operator>>(basic_ios<char_type, traits_type>&
                              (*pf)(basic_ios<char_type, traits_type>&));
    basic_istream& operator>>(ios_base& (*pf)(ios_base&));
    basic_istream& operator>>(basic_streambuf<char_type, traits_type>* sb);
    basic_istream& operator>>(bool& n);
    basic_istream& operator>>(short& n);
    basic_istream& operator>>(unsigned short& n);
    basic_istream& operator>>(int& n);
    basic_istream& operator>>(unsigned int& n);
    basic_istream& operator>>(long& n);
    basic_istream& operator>>(unsigned long& n);
    basic_istream& operator>>(long long& n);
    basic_istream& operator>>(unsigned long long& n);
    basic_istream& operator>>(float& f);
    basic_istream& operator>>(double& f);
    basic_istream& operator>>(long double& f);
    basic_istream& operator>>(void*& p);

    // 27.7.1.3 Unformatted input:
    streamsize gcount() const;
    int_type get();
    basic_istream& get(char_type& c);
    basic_istream& get(char_type* s, streamsize n);
    basic_istream& get(char_type* s, streamsize n, char_type delim);
    basic_istream& get(basic_streambuf<char_type,traits_type>& sb);
    basic_istream& get(basic_streambuf<char_type,traits_type>& sb, char_type delim);

    basic_istream& getline(char_type* s, streamsize n);
    basic_istream& getline(char_type* s, streamsize n, char_type delim);

    basic_istream& ignore(streamsize n = 1, int_type delim = traits_type::eof());
    int_type peek();
    basic_istream& read (char_type* s, streamsize n);
    streamsize readsome(char_type* s, streamsize n);

    basic_istream& putback(char_type c);
    basic_istream& unget();
    int sync();

    pos_type tellg();
    basic_istream& seekg(pos_type);
    basic_istream& seekg(off_type, ios_base::seekdir);
protected:
    basic_istream(const basic_istream& rhs) = delete;
    basic_istream(basic_istream&& rhs);
    // 27.7.2.1.2 Assign/swap:
    basic_istream& operator=(const basic_istream& rhs) = delete;
    basic_istream& operator=(basic_istream&& rhs);
    void swap(basic_istream& rhs);
};

// 27.7.1.2.3 character extraction templates:
template<class charT, class traits>
  basic_istream<charT,traits>& operator>>(basic_istream<charT,traits>&, charT&);

template<class traits>
  basic_istream<char,traits>& operator>>(basic_istream<char,traits>&, unsigned char&);

template<class traits>
  basic_istream<char,traits>& operator>>(basic_istream<char,traits>&, signed char&);

template<class charT, class traits>
  basic_istream<charT,traits>& operator>>(basic_istream<charT,traits>&, charT*);

template<class traits>
  basic_istream<char,traits>& operator>>(basic_istream<char,traits>&, unsigned char*);

template<class traits>
  basic_istream<char,traits>& operator>>(basic_istream<char,traits>&, signed char*);

template <class charT, class traits>
  void
  swap(basic_istream<charT, traits>& x, basic_istream<charT, traits>& y);

typedef basic_istream<char> istream;
typedef basic_istream<wchar_t> wistream;

template <class charT, class traits = char_traits<charT> >
class basic_iostream :
    public basic_istream<charT,traits>,
    public basic_ostream<charT,traits>
{
public:
    // types:
    typedef charT                          char_type;
    typedef traits                         traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;

    // constructor/destructor
    explicit basic_iostream(basic_streambuf<char_type, traits_type>* sb);
    basic_iostream(basic_iostream&& rhs);
    virtual ~basic_iostream();

    // assign/swap
    basic_iostream& operator=(basic_iostream&& rhs);
    void swap(basic_iostream& rhs);
};

template <class charT, class traits>
  void
  swap(basic_iostream<charT, traits>& x, basic_iostream<charT, traits>& y);

typedef basic_iostream<char> iostream;
typedef basic_iostream<wchar_t> wiostream;

template <class charT, class traits>
  basic_istream<charT,traits>&
  ws(basic_istream<charT,traits>& is);

// rvalue stream extraction
template <class Stream, class T>
  Stream&& operator>>(Stream&& is, T&& x);

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 161 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
# 162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
# 163 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/istream.h>
#endif /* expanded by -frewrite-includes */
# 163 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
# 164 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/istreambuf_iterator.h>
#endif /* expanded by -frewrite-includes */
# 164 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
# 165 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conjunction.h>
#endif /* expanded by -frewrite-includes */
# 165 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
# 166 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 166 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
# 167 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_base_of.h>
#endif /* expanded by -frewrite-includes */
# 167 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
# 168 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/declval.h>
#endif /* expanded by -frewrite-includes */
# 168 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
# 169 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 169 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
# 170 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#if 0 /* expanded by -frewrite-includes */
#include <ostream>
#endif /* expanded by -frewrite-includes */
# 170 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
# 171 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 171 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
# 172 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 174 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 175 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#endif
# 176 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 178 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 179 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 2 3


_LIBCPP_BEGIN_NAMESPACE_STD

template <class _CharT, class _Traits>
class _LIBCPP_TEMPLATE_VIS basic_istream
    : virtual public basic_ios<_CharT, _Traits>
{
    streamsize __gc_;

    _LIBCPP_HIDE_FROM_ABI void __inc_gcount() {
      if (__gc_ < numeric_limits<streamsize>::max())
        ++__gc_;
    }
public:
    // types (inherited from basic_ios (27.5.4)):
    typedef _CharT                         char_type;
    typedef _Traits                        traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;

    // 27.7.1.1.1 Constructor/destructor:
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    explicit basic_istream(basic_streambuf<char_type, traits_type>* __sb) : __gc_(0)
    { this->init(__sb); }
    ~basic_istream() override;
protected:
    inline _LIBCPP_INLINE_VISIBILITY
    basic_istream(basic_istream&& __rhs);

    // 27.7.1.1.2 Assign/swap:
    inline _LIBCPP_INLINE_VISIBILITY
    basic_istream& operator=(basic_istream&& __rhs);

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    void swap(basic_istream& __rhs) {
      _VSTD::swap(__gc_, __rhs.__gc_);
      basic_ios<char_type, traits_type>::swap(__rhs);
    }

    basic_istream           (const basic_istream& __rhs) = delete;
    basic_istream& operator=(const basic_istream& __rhs) = delete;
public:

    // 27.7.1.1.3 Prefix/suffix:
    class _LIBCPP_TEMPLATE_VIS sentry;

    // 27.7.1.2 Formatted input:
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    basic_istream& operator>>(basic_istream& (*__pf)(basic_istream&))
    { return __pf(*this); }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    basic_istream& operator>>(basic_ios<char_type, traits_type>&
                              (*__pf)(basic_ios<char_type, traits_type>&))
    { __pf(*this); return *this; }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    basic_istream& operator>>(ios_base& (*__pf)(ios_base&))
    { __pf(*this); return *this; }

    basic_istream& operator>>(basic_streambuf<char_type, traits_type>* __sb);
    basic_istream& operator>>(bool& __n);
    basic_istream& operator>>(short& __n);
    basic_istream& operator>>(unsigned short& __n);
    basic_istream& operator>>(int& __n);
    basic_istream& operator>>(unsigned int& __n);
    basic_istream& operator>>(long& __n);
    basic_istream& operator>>(unsigned long& __n);
    basic_istream& operator>>(long long& __n);
    basic_istream& operator>>(unsigned long long& __n);
    basic_istream& operator>>(float& __f);
    basic_istream& operator>>(double& __f);
    basic_istream& operator>>(long double& __f);
    basic_istream& operator>>(void*& __p);

    // 27.7.1.3 Unformatted input:
    _LIBCPP_INLINE_VISIBILITY
    streamsize gcount() const {return __gc_;}
    int_type get();

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    basic_istream& get(char_type& __c) {
      int_type __ch = get();
      if (__ch != traits_type::eof())
        __c = traits_type::to_char_type(__ch);
      return *this;
    }

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    basic_istream& get(char_type* __s, streamsize __n)
    { return get(__s, __n, this->widen('\n')); }

    basic_istream& get(char_type* __s, streamsize __n, char_type __dlm);

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    basic_istream& get(basic_streambuf<char_type, traits_type>& __sb)
    { return get(__sb, this->widen('\n')); }

    basic_istream& get(basic_streambuf<char_type, traits_type>& __sb, char_type __dlm);

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    basic_istream& getline(char_type* __s, streamsize __n)
    { return getline(__s, __n, this->widen('\n')); }

    basic_istream& getline(char_type* __s, streamsize __n, char_type __dlm);

    basic_istream& ignore(streamsize __n = 1, int_type __dlm = traits_type::eof());
    int_type peek();
    basic_istream& read (char_type* __s, streamsize __n);
    streamsize readsome(char_type* __s, streamsize __n);

    basic_istream& putback(char_type __c);
    basic_istream& unget();
    int sync();

    pos_type tellg();
    basic_istream& seekg(pos_type __pos);
    basic_istream& seekg(off_type __off, ios_base::seekdir __dir);
};

template <class _CharT, class _Traits>
class _LIBCPP_TEMPLATE_VIS basic_istream<_CharT, _Traits>::sentry
{
    bool __ok_;

public:
    explicit sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false);
//    ~sentry() = default;

    _LIBCPP_INLINE_VISIBILITY
    explicit operator bool() const {return __ok_;}

    sentry(const sentry&) = delete;
    sentry& operator=(const sentry&) = delete;
};

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>::sentry::sentry(basic_istream<_CharT, _Traits>& __is,
                                               bool __noskipws)
    : __ok_(false)
{
    if (__is.good())
    {
        if (__is.tie())
            __is.tie()->flush();
        if (!__noskipws && (__is.flags() & ios_base::skipws))
        {
            typedef istreambuf_iterator<_CharT, _Traits> _Ip;
            const ctype<_CharT>& __ct = std::use_facet<ctype<_CharT> >(__is.getloc());
            _Ip __i(__is);
            _Ip __eof;
            for (; __i != __eof; ++__i)
                if (!__ct.is(__ct.space, *__i))
                    break;
            if (__i == __eof)
                __is.setstate(ios_base::failbit | ios_base::eofbit);
        }
        __ok_ = __is.good();
    }
    else
        __is.setstate(ios_base::failbit);
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>::basic_istream(basic_istream&& __rhs)
    : __gc_(__rhs.__gc_)
{
    __rhs.__gc_ = 0;
    this->move(__rhs);
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::operator=(basic_istream&& __rhs)
{
    swap(__rhs);
    return *this;
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>::~basic_istream()
{
}

template <class _Tp, class _CharT, class _Traits>
_LIBCPP_INLINE_VISIBILITY
basic_istream<_CharT, _Traits>&
__input_arithmetic(basic_istream<_CharT, _Traits>& __is, _Tp& __n) {
    ios_base::iostate __state = ios_base::goodbit;
    typename basic_istream<_CharT, _Traits>::sentry __s(__is);
    if (__s)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 377 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            typedef istreambuf_iterator<_CharT, _Traits> _Ip;
            typedef num_get<_CharT, _Ip> _Fp;
            std::use_facet<_Fp>(__is.getloc()).get(_Ip(__is), _Ip(), __is, __state, __n);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            __is.__setstate_nothrow(__state);
            if (__is.exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif
# 392 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        __is.setstate(__state);
    }
    return __is;
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::operator>>(unsigned short& __n)
{
    return _VSTD::__input_arithmetic<unsigned short>(*this, __n);
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::operator>>(unsigned int& __n)
{
    return _VSTD::__input_arithmetic<unsigned int>(*this, __n);
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::operator>>(long& __n)
{
    return _VSTD::__input_arithmetic<long>(*this, __n);
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::operator>>(unsigned long& __n)
{
    return _VSTD::__input_arithmetic<unsigned long>(*this, __n);
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::operator>>(long long& __n)
{
    return _VSTD::__input_arithmetic<long long>(*this, __n);
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::operator>>(unsigned long long& __n)
{
    return _VSTD::__input_arithmetic<unsigned long long>(*this, __n);
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::operator>>(float& __n)
{
    return _VSTD::__input_arithmetic<float>(*this, __n);
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::operator>>(double& __n)
{
    return _VSTD::__input_arithmetic<double>(*this, __n);
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::operator>>(long double& __n)
{
    return _VSTD::__input_arithmetic<long double>(*this, __n);
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::operator>>(bool& __n)
{
    return _VSTD::__input_arithmetic<bool>(*this, __n);
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::operator>>(void*& __n)
{
    return _VSTD::__input_arithmetic<void*>(*this, __n);
}

template <class _Tp, class _CharT, class _Traits>
_LIBCPP_INLINE_VISIBILITY
basic_istream<_CharT, _Traits>&
__input_arithmetic_with_numeric_limits(basic_istream<_CharT, _Traits>& __is, _Tp& __n) {
    ios_base::iostate __state = ios_base::goodbit;
    typename basic_istream<_CharT, _Traits>::sentry __s(__is);
    if (__s)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 486 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            typedef istreambuf_iterator<_CharT, _Traits> _Ip;
            typedef num_get<_CharT, _Ip> _Fp;
            long __temp;
            std::use_facet<_Fp>(__is.getloc()).get(_Ip(__is), _Ip(), __is, __state, __temp);
            if (__temp < numeric_limits<_Tp>::min())
            {
                __state |= ios_base::failbit;
                __n = numeric_limits<_Tp>::min();
            }
            else if (__temp > numeric_limits<_Tp>::max())
            {
                __state |= ios_base::failbit;
                __n = numeric_limits<_Tp>::max();
            }
            else
            {
                __n = static_cast<_Tp>(__temp);
            }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            __is.__setstate_nothrow(__state);
            if (__is.exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 516 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        __is.setstate(__state);
    }
    return __is;
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::operator>>(short& __n)
{
    return _VSTD::__input_arithmetic_with_numeric_limits<short>(*this, __n);
}

template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::operator>>(int& __n)
{
    return _VSTD::__input_arithmetic_with_numeric_limits<int>(*this, __n);
}

template<class _CharT, class _Traits>
_LIBCPP_INLINE_VISIBILITY
basic_istream<_CharT, _Traits>&
__input_c_string(basic_istream<_CharT, _Traits>& __is, _CharT* __p, size_t __n)
{
    ios_base::iostate __state = ios_base::goodbit;
    typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif
# 548 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            _CharT* __s = __p;
            const ctype<_CharT>& __ct = std::use_facet<ctype<_CharT> >(__is.getloc());
            while (__s != __p + (__n-1))
            {
                typename _Traits::int_type __i = __is.rdbuf()->sgetc();
                if (_Traits::eq_int_type(__i, _Traits::eof()))
                {
                   __state |= ios_base::eofbit;
                   break;
                }
                _CharT __ch = _Traits::to_char_type(__i);
                if (__ct.is(__ct.space, __ch))
                    break;
                *__s++ = __ch;
                 __is.rdbuf()->sbumpc();
            }
            *__s = _CharT();
            __is.width(0);
            if (__s == __p)
               __state |= ios_base::failbit;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            __is.__setstate_nothrow(__state);
            if (__is.exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif
# 580 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        __is.setstate(__state);
    }
    return __is;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 586 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3

template<class _CharT, class _Traits, size_t _Np>
inline _LIBCPP_INLINE_VISIBILITY
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _CharT (&__buf)[_Np])
{
    size_t __n = _Np;
    if (__is.width() > 0)
        __n = _VSTD::min(size_t(__is.width()), _Np);
    return _VSTD::__input_c_string(__is, __buf, __n);
}

template<class _Traits, size_t _Np>
inline _LIBCPP_INLINE_VISIBILITY
basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __is, unsigned char (&__buf)[_Np])
{
    return __is >> (char(&)[_Np])__buf;
}

template<class _Traits, size_t _Np>
inline _LIBCPP_INLINE_VISIBILITY
basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __is, signed char (&__buf)[_Np])
{
    return __is >> (char(&)[_Np])__buf;
}

#else
# 615 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3

template<class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _CharT* __s)
{
    streamsize __n = __is.width();
    if (__n <= 0)
        __n = numeric_limits<streamsize>::max() / sizeof(_CharT) - 1;
    return _VSTD::__input_c_string(__is, __s, size_t(__n));
}

template<class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __is, unsigned char* __s)
{
    return __is >> (char*)__s;
}

template<class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __is, signed char* __s)
{
    return __is >> (char*)__s;
}

#endif // _LIBCPP_STD_VER >= 20
# 644 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3

template<class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c)
{
    ios_base::iostate __state = ios_base::goodbit;
    typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif
# 657 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            typename _Traits::int_type __i = __is.rdbuf()->sbumpc();
            if (_Traits::eq_int_type(__i, _Traits::eof()))
                __state |= ios_base::eofbit | ios_base::failbit;
            else
                __c = _Traits::to_char_type(__i);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            __is.__setstate_nothrow(__state);
            if (__is.exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif
# 674 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        __is.setstate(__state);
    }
    return __is;
}

template<class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __is, unsigned char& __c)
{
    return __is >> (char&)__c;
}

template<class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
basic_istream<char, _Traits>&
operator>>(basic_istream<char, _Traits>& __is, signed char& __c)
{
    return __is >> (char&)__c;
}

template<class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::operator>>(basic_streambuf<char_type, traits_type>* __sb)
{
    ios_base::iostate __state = ios_base::goodbit;
    __gc_ = 0;
    sentry __s(*this, true);
    if (__s)
    {
        if (__sb)
        {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
            try
            {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 710 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
                while (true)
                {
                    typename traits_type::int_type __i = this->rdbuf()->sgetc();
                    if (traits_type::eq_int_type(__i, _Traits::eof()))
                    {
                       __state |= ios_base::eofbit;
                       break;
                    }
                    if (traits_type::eq_int_type(
                            __sb->sputc(traits_type::to_char_type(__i)),
                            traits_type::eof()))
                        break;
                    __inc_gcount();
                    this->rdbuf()->sbumpc();
                }
                if (__gc_ == 0)
                   __state |= ios_base::failbit;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
            }
            catch (...)
            {
                __state |= ios_base::badbit;
                if (__gc_ == 0)
                    __state |= ios_base::failbit;

                this->__setstate_nothrow(__state);
                if (this->exceptions() & ios_base::failbit || this->exceptions() & ios_base::badbit)
                {
                    throw;
                }
            }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 742 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        }
        else
        {
            __state |= ios_base::failbit;
        }
        this->setstate(__state);
    }
    return *this;
}

template<class _CharT, class _Traits>
typename basic_istream<_CharT, _Traits>::int_type
basic_istream<_CharT, _Traits>::get()
{
    ios_base::iostate __state = ios_base::goodbit;
    __gc_ = 0;
    int_type __r = traits_type::eof();
    sentry __s(*this, true);
    if (__s)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif
# 766 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            __r = this->rdbuf()->sbumpc();
            if (traits_type::eq_int_type(__r, traits_type::eof()))
               __state |= ios_base::failbit | ios_base::eofbit;
            else
                __gc_ = 1;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            this->__setstate_nothrow(this->rdstate() | ios_base::badbit);
            if (this->exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif
# 782 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        this->setstate(__state);
    }
    return __r;
}

template<class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::get(char_type* __s, streamsize __n, char_type __dlm)
{
    ios_base::iostate __state = ios_base::goodbit;
    __gc_ = 0;
    sentry __sen(*this, true);
    if (__sen)
    {
        if (__n > 0)
        {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
            try
            {
#endif
# 802 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
                while (__gc_ < __n-1)
                {
                    int_type __i = this->rdbuf()->sgetc();
                    if (traits_type::eq_int_type(__i, traits_type::eof()))
                    {
                       __state |= ios_base::eofbit;
                       break;
                    }
                    char_type __ch = traits_type::to_char_type(__i);
                    if (traits_type::eq(__ch, __dlm))
                        break;
                    *__s++ = __ch;
                    __inc_gcount();
                     this->rdbuf()->sbumpc();
                }
                if (__gc_ == 0)
                   __state |= ios_base::failbit;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
            }
            catch (...)
            {
                __state |= ios_base::badbit;
                this->__setstate_nothrow(__state);
                if (this->exceptions() & ios_base::badbit)
                {
                    if (__n > 0)
                        *__s = char_type();
                    throw;
                }
            }
#endif
# 833 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        }
        else
        {
            __state |= ios_base::failbit;
        }

        if (__n > 0)
            *__s = char_type();
        this->setstate(__state);
    }
    if (__n > 0)
        *__s = char_type();
    return *this;
}

template<class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::get(basic_streambuf<char_type, traits_type>& __sb,
                                    char_type __dlm)
{
    ios_base::iostate __state = ios_base::goodbit;
    __gc_ = 0;
    sentry __sen(*this, true);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 862 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            while (true)
            {
                typename traits_type::int_type __i = this->rdbuf()->sgetc();
                if (traits_type::eq_int_type(__i, traits_type::eof()))
                {
                   __state |= ios_base::eofbit;
                   break;
                }
                char_type __ch = traits_type::to_char_type(__i);
                if (traits_type::eq(__ch, __dlm))
                    break;
                if (traits_type::eq_int_type(__sb.sputc(__ch), traits_type::eof()))
                    break;
                __inc_gcount();
                this->rdbuf()->sbumpc();
            }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            // according to the spec, exceptions here are caught but not rethrown
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 886 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        if (__gc_ == 0)
           __state |= ios_base::failbit;
        this->setstate(__state);
    }
    return *this;
}

template<class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::getline(char_type* __s, streamsize __n, char_type __dlm)
{
    ios_base::iostate __state = ios_base::goodbit;
    __gc_ = 0;
    sentry __sen(*this, true);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 906 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            while (true)
            {
                typename traits_type::int_type __i = this->rdbuf()->sgetc();
                if (traits_type::eq_int_type(__i, traits_type::eof()))
                {
                   __state |= ios_base::eofbit;
                   break;
                }
                char_type __ch = traits_type::to_char_type(__i);
                if (traits_type::eq(__ch, __dlm))
                {
                    this->rdbuf()->sbumpc();
                    __inc_gcount();
                    break;
                }
                if (__gc_ >= __n-1)
                {
                    __state |= ios_base::failbit;
                    break;
                }
                *__s++ = __ch;
                this->rdbuf()->sbumpc();
                __inc_gcount();
            }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            this->__setstate_nothrow(__state);
            if (this->exceptions() & ios_base::badbit)
            {
                if (__n > 0)
                    *__s = char_type();
                if (__gc_ == 0)
                    __state |= ios_base::failbit;
                throw;
            }
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 946 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
    }
    if (__n > 0)
        *__s = char_type();
    if (__gc_ == 0)
        __state |= ios_base::failbit;
    this->setstate(__state);
    return *this;
}

template<class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __dlm)
{
    ios_base::iostate __state = ios_base::goodbit;
    __gc_ = 0;
    sentry __sen(*this, true);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 968 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            if (__n == numeric_limits<streamsize>::max())
            {
                while (true)
                {
                    typename traits_type::int_type __i = this->rdbuf()->sbumpc();
                    if (traits_type::eq_int_type(__i, traits_type::eof()))
                    {
                       __state |= ios_base::eofbit;
                       break;
                    }
                    __inc_gcount();
                    if (traits_type::eq_int_type(__i, __dlm))
                        break;
                }
            }
            else
            {
                while (__gc_ < __n)
                {
                    typename traits_type::int_type __i = this->rdbuf()->sbumpc();
                    if (traits_type::eq_int_type(__i, traits_type::eof()))
                    {
                       __state |= ios_base::eofbit;
                       break;
                    }
                    __inc_gcount();
                    if (traits_type::eq_int_type(__i, __dlm))
                        break;
                }
            }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            this->__setstate_nothrow(__state);
            if (this->exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1010 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        this->setstate(__state);
    }
    return *this;
}

template<class _CharT, class _Traits>
typename basic_istream<_CharT, _Traits>::int_type
basic_istream<_CharT, _Traits>::peek()
{
    ios_base::iostate __state = ios_base::goodbit;
    __gc_ = 0;
    int_type __r = traits_type::eof();
    sentry __sen(*this, true);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1029 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            __r = this->rdbuf()->sgetc();
            if (traits_type::eq_int_type(__r, traits_type::eof()))
                __state |= ios_base::eofbit;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            this->__setstate_nothrow(__state);
            if (this->exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1044 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        this->setstate(__state);
    }
    return __r;
}

template<class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::read(char_type* __s, streamsize __n)
{
    ios_base::iostate __state = ios_base::goodbit;
    __gc_ = 0;
    sentry __sen(*this, true);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1062 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            __gc_ = this->rdbuf()->sgetn(__s, __n);
            if (__gc_ != __n)
                __state |= ios_base::failbit | ios_base::eofbit;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            this->__setstate_nothrow(__state);
            if (this->exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1077 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
    }
    else
    {
        __state |= ios_base::failbit;
    }
    this->setstate(__state);
    return *this;
}

template<class _CharT, class _Traits>
streamsize
basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __n)
{
    ios_base::iostate __state = ios_base::goodbit;
    __gc_ = 0;
    sentry __sen(*this, true);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1099 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            streamsize __c = this->rdbuf()->in_avail();
            switch (__c)
            {
            case -1:
                __state |= ios_base::eofbit;
                break;
            case 0:
                break;
            default:
                __n = _VSTD::min(__c, __n);
                __gc_ = this->rdbuf()->sgetn(__s, __n);
                if (__gc_ != __n)
                    __state |= ios_base::failbit | ios_base::eofbit;
                break;
            }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            this->__setstate_nothrow(__state);
            if (this->exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
    }
    else
    {
        __state |= ios_base::failbit;
    }
    this->setstate(__state);
    return __gc_;
}

template<class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::putback(char_type __c)
{
    ios_base::iostate __state = this->rdstate() & ~ios_base::eofbit;
    __gc_ = 0;
    this->clear(__state);
    sentry __sen(*this, true);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1149 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            if (this->rdbuf() == nullptr || this->rdbuf()->sputbackc(__c) == traits_type::eof())
                __state |= ios_base::badbit;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            this->__setstate_nothrow(__state);
            if (this->exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1163 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
    }
    else
    {
        __state |= ios_base::failbit;
    }
    this->setstate(__state);
    return *this;
}

template<class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::unget()
{
    ios_base::iostate __state = this->rdstate() & ~ios_base::eofbit;
    __gc_ = 0;
    this->clear(__state);
    sentry __sen(*this, true);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1186 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            if (this->rdbuf() == nullptr || this->rdbuf()->sungetc() == traits_type::eof())
                __state |= ios_base::badbit;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            this->__setstate_nothrow(__state);
            if (this->exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1200 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
    }
    else
    {
        __state |= ios_base::failbit;
    }
    this->setstate(__state);
    return *this;
}

template<class _CharT, class _Traits>
int
basic_istream<_CharT, _Traits>::sync()
{
    ios_base::iostate __state = ios_base::goodbit;
    int __r = 0;
    sentry __sen(*this, true);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1222 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            if (this->rdbuf() == nullptr)
                return -1;
            if (this->rdbuf()->pubsync() == -1)
            {
                __state |= ios_base::badbit;
                return -1;
            }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            this->__setstate_nothrow(__state);
            if (this->exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1241 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        this->setstate(__state);
    }
    return __r;
}

template<class _CharT, class _Traits>
typename basic_istream<_CharT, _Traits>::pos_type
basic_istream<_CharT, _Traits>::tellg()
{
    ios_base::iostate __state = ios_base::goodbit;
    pos_type __r(-1);
    sentry __sen(*this, true);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1259 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        __r = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in);
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            this->__setstate_nothrow(__state);
            if (this->exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1272 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        this->setstate(__state);
    }
    return __r;
}

template<class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::seekg(pos_type __pos)
{
    ios_base::iostate __state = this->rdstate() & ~ios_base::eofbit;
    this->clear(__state);
    sentry __sen(*this, true);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1290 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            if (this->rdbuf()->pubseekpos(__pos, ios_base::in) == pos_type(-1))
                __state |= ios_base::failbit;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            this->__setstate_nothrow(__state);
            if (this->exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1304 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        this->setstate(__state);
    }
    return *this;
}

template<class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir)
{
    ios_base::iostate __state = this->rdstate() & ~ios_base::eofbit;
    this->clear(__state);
    sentry __sen(*this, true);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1322 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            if (this->rdbuf()->pubseekoff(__off, __dir, ios_base::in) == pos_type(-1))
                __state |= ios_base::failbit;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            this->__setstate_nothrow(__state);
            if (this->exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1336 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        this->setstate(__state);
    }
    return *this;
}

template <class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
ws(basic_istream<_CharT, _Traits>& __is)
{
    ios_base::iostate __state = ios_base::goodbit;
    typename basic_istream<_CharT, _Traits>::sentry __sen(__is, true);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1353 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            const ctype<_CharT>& __ct = std::use_facet<ctype<_CharT> >(__is.getloc());
            while (true)
            {
                typename _Traits::int_type __i = __is.rdbuf()->sgetc();
                if (_Traits::eq_int_type(__i, _Traits::eof()))
                {
                   __state |= ios_base::eofbit;
                   break;
                }
                if (!__ct.is(__ct.space, _Traits::to_char_type(__i)))
                    break;
                __is.rdbuf()->sbumpc();
            }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            __is.__setstate_nothrow(__state);
            if (__is.exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1378 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        __is.setstate(__state);
    }
    return __is;
}

template <class _Stream, class _Tp, class = void>
struct __is_istreamable : false_type { };

template <class _Stream, class _Tp>
struct __is_istreamable<_Stream, _Tp, decltype(
    std::declval<_Stream>() >> std::declval<_Tp>(), void()
)> : true_type { };

template <class _Stream, class _Tp, __enable_if_t<
    _And<is_base_of<ios_base, _Stream>, __is_istreamable<_Stream&, _Tp&&> >::value, int> = 0>
_LIBCPP_INLINE_VISIBILITY
_Stream&& operator>>(_Stream&& __is, _Tp&& __x)
{
    __is >> _VSTD::forward<_Tp>(__x);
    return _VSTD::move(__is);
}

template <class _CharT, class _Traits>
class _LIBCPP_TEMPLATE_VIS basic_iostream
    : public basic_istream<_CharT, _Traits>,
      public basic_ostream<_CharT, _Traits>
{
public:
    // types:
    typedef _CharT                         char_type;
    typedef _Traits                        traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;

    // constructor/destructor
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    explicit basic_iostream(basic_streambuf<char_type, traits_type>* __sb)
      : basic_istream<_CharT, _Traits>(__sb)
    {}

    ~basic_iostream() override;
protected:
    inline _LIBCPP_INLINE_VISIBILITY
    basic_iostream(basic_iostream&& __rhs);

    // assign/swap
    inline _LIBCPP_INLINE_VISIBILITY
    basic_iostream& operator=(basic_iostream&& __rhs);

    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
    void swap(basic_iostream& __rhs)
    { basic_istream<char_type, traits_type>::swap(__rhs); }
};

template <class _CharT, class _Traits>
basic_iostream<_CharT, _Traits>::basic_iostream(basic_iostream&& __rhs)
    : basic_istream<_CharT, _Traits>(_VSTD::move(__rhs))
{
}

template <class _CharT, class _Traits>
basic_iostream<_CharT, _Traits>&
basic_iostream<_CharT, _Traits>::operator=(basic_iostream&& __rhs)
{
    swap(__rhs);
    return *this;
}

template <class _CharT, class _Traits>
basic_iostream<_CharT, _Traits>::~basic_iostream()
{
}

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
           basic_string<_CharT, _Traits, _Allocator>& __str)
{
    ios_base::iostate __state = ios_base::goodbit;
    typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif
# 1465 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            __str.clear();
            streamsize __n = __is.width();
            if (__n <= 0)
                __n = __str.max_size();
            if (__n <= 0)
                __n = numeric_limits<streamsize>::max();
            streamsize __c = 0;
            const ctype<_CharT>& __ct = std::use_facet<ctype<_CharT> >(__is.getloc());
            while (__c < __n)
            {
                typename _Traits::int_type __i = __is.rdbuf()->sgetc();
                if (_Traits::eq_int_type(__i, _Traits::eof()))
                {
                   __state |= ios_base::eofbit;
                   break;
                }
                _CharT __ch = _Traits::to_char_type(__i);
                if (__ct.is(__ct.space, __ch))
                    break;
                __str.push_back(__ch);
                ++__c;
                 __is.rdbuf()->sbumpc();
            }
            __is.width(0);
            if (__c == 0)
               __state |= ios_base::failbit;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            __is.__setstate_nothrow(__state);
            if (__is.exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif
# 1503 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        __is.setstate(__state);
    }
    return __is;
}

template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>& __is,
        basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm)
{
    ios_base::iostate __state = ios_base::goodbit;
    typename basic_istream<_CharT, _Traits>::sentry __sen(__is, true);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif
# 1521 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            __str.clear();
            streamsize __extr = 0;
            while (true)
            {
                typename _Traits::int_type __i = __is.rdbuf()->sbumpc();
                if (_Traits::eq_int_type(__i, _Traits::eof()))
                {
                   __state |= ios_base::eofbit;
                   break;
                }
                ++__extr;
                _CharT __ch = _Traits::to_char_type(__i);
                if (_Traits::eq(__ch, __dlm))
                    break;
                __str.push_back(__ch);
                if (__str.size() == __str.max_size())
                {
                    __state |= ios_base::failbit;
                    break;
                }
            }
            if (__extr == 0)
               __state |= ios_base::failbit;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            __is.__setstate_nothrow(__state);
            if (__is.exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif
# 1556 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        __is.setstate(__state);
    }
    return __is;
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>& __is,
        basic_string<_CharT, _Traits, _Allocator>& __str)
{
    return std::getline(__is, __str, __is.widen('\n'));
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>&& __is,
        basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm)
{
    return std::getline(__is, __str, __dlm);
}

template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>&& __is,
        basic_string<_CharT, _Traits, _Allocator>& __str)
{
    return std::getline(__is, __str, __is.widen('\n'));
}

template <class _CharT, class _Traits, size_t _Size>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
{
    ios_base::iostate __state = ios_base::goodbit;
    typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
    if (__sen)
    {
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif
# 1600 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
            basic_string<_CharT, _Traits> __str;
            const ctype<_CharT>& __ct = std::use_facet<ctype<_CharT> >(__is.getloc());
            size_t __c = 0;
            _CharT __zero = __ct.widen('0');
            _CharT __one = __ct.widen('1');
            while (__c != _Size)
            {
                typename _Traits::int_type __i = __is.rdbuf()->sgetc();
                if (_Traits::eq_int_type(__i, _Traits::eof()))
                {
                   __state |= ios_base::eofbit;
                   break;
                }
                _CharT __ch = _Traits::to_char_type(__i);
                if (!_Traits::eq(__ch, __zero) && !_Traits::eq(__ch, __one))
                    break;
                __str.push_back(__ch);
                ++__c;
                 __is.rdbuf()->sbumpc();
            }
            __x = bitset<_Size>(__str);
            if (_Size > 0 && __c == 0)
               __state |= ios_base::failbit;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __state |= ios_base::badbit;
            __is.__setstate_nothrow(__state);
            if (__is.exceptions() & ios_base::badbit)
            {
                throw;
            }
        }
#endif
# 1635 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
        __is.setstate(__state);
    }
    return __is;
}

extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istream<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istream<wchar_t>;
#endif
# 1644 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_iostream<char>;

_LIBCPP_END_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1649 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 1649 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
# 1650 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 1650 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
# 1651 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#endif
# 1652 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3

_LIBCPP_POP_MACROS

#endif // _LIBCPP_ISTREAM
# 1656 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/istream" 3
#endif /* istream expanded by -frewrite-includes */
# 275 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <ostream>
#endif /* expanded by -frewrite-includes */
# 275 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
# 276 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
#if 0 /* expanded by -frewrite-includes */
#include <string>
#endif /* expanded by -frewrite-includes */
# 276 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
# 277 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 277 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
# 278 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 280 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 281 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
#endif
# 282 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 284 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 285 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 2 3


// TODO(LLVM-19): Remove this once we drop support for Clang 16,
// which had this bug: https://github.com/llvm/llvm-project/issues/40363
#ifdef _WIN32
#define _LIBCPP_HIDE_FROM_ABI_SSTREAM _LIBCPP_ALWAYS_INLINE
#else
# 292 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
#define _LIBCPP_HIDE_FROM_ABI_SSTREAM _LIBCPP_HIDE_FROM_ABI
#endif
# 294 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// Class template basic_stringbuf [stringbuf]

template <class _CharT, class _Traits, class _Allocator>
class _LIBCPP_TEMPLATE_VIS basic_stringbuf
    : public basic_streambuf<_CharT, _Traits>
{
public:
    typedef _CharT                         char_type;
    typedef _Traits                        traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;
    typedef _Allocator                     allocator_type;

    typedef basic_string<char_type, traits_type, allocator_type> string_type;

private:

    string_type __str_;
    mutable char_type* __hm_;
    ios_base::openmode __mode_;
    _LIBCPP_HIDE_FROM_ABI void __init_buf_ptrs();
    _LIBCPP_HIDE_FROM_ABI void __move_init(basic_stringbuf&& __rhs);

public:
    // [stringbuf.cons] constructors:
    _LIBCPP_INLINE_VISIBILITY
    basic_stringbuf()
        : __hm_(nullptr), __mode_(ios_base::in | ios_base::out) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit basic_stringbuf(ios_base::openmode __wch)
        : __hm_(nullptr), __mode_(__wch) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit basic_stringbuf(const string_type& __s,
                             ios_base::openmode __wch = ios_base::in | ios_base::out)
        : __str_(__s.get_allocator()), __hm_(nullptr), __mode_(__wch)
    {
        str(__s);
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 340 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    _LIBCPP_HIDE_FROM_ABI explicit basic_stringbuf(const allocator_type& __a)
        : basic_stringbuf(ios_base::in | ios_base::out, __a) {}

    _LIBCPP_HIDE_FROM_ABI basic_stringbuf(ios_base::openmode __wch, const allocator_type& __a)
        : __str_(__a), __hm_(nullptr), __mode_(__wch) {}

    _LIBCPP_HIDE_FROM_ABI explicit basic_stringbuf(string_type&& __s,
                                                   ios_base::openmode __wch = ios_base::in | ios_base::out)
        : __str_(std::move(__s)), __hm_(nullptr), __mode_(__wch) {
        __init_buf_ptrs();
    }

    template <class _SAlloc>
    _LIBCPP_HIDE_FROM_ABI
    basic_stringbuf(const basic_string<char_type, traits_type, _SAlloc>& __s, const allocator_type& __a)
        : basic_stringbuf(__s, ios_base::in | ios_base::out, __a) {}

    template <class _SAlloc>
    _LIBCPP_HIDE_FROM_ABI basic_stringbuf(
        const basic_string<char_type, traits_type, _SAlloc>& __s, ios_base::openmode __wch, const allocator_type& __a)
        : __str_(__s, __a), __hm_(nullptr), __mode_(__wch) {
        __init_buf_ptrs();
    }

    template <class _SAlloc>
      requires (!is_same_v<_SAlloc, allocator_type>)
    _LIBCPP_HIDE_FROM_ABI explicit basic_stringbuf(const basic_string<char_type, traits_type, _SAlloc>& __s,
                                                   ios_base::openmode __wch = ios_base::in | ios_base::out)
        : __str_(__s), __hm_(nullptr), __mode_(__wch) {
        __init_buf_ptrs();
    }
#endif // _LIBCPP_STD_VER >= 20
# 372 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

    basic_stringbuf(basic_stringbuf&& __rhs) : __mode_(__rhs.__mode_) { __move_init(std::move(__rhs)); }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    _LIBCPP_HIDE_FROM_ABI basic_stringbuf(basic_stringbuf&& __rhs, const allocator_type& __a)
        : basic_stringbuf(__rhs.__mode_, __a) {
        __move_init(std::move(__rhs));
    }
#endif
# 381 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

    // [stringbuf.assign] Assign and swap:
    basic_stringbuf& operator=(basic_stringbuf&& __rhs);
    void swap(basic_stringbuf& __rhs)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 386 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
        noexcept(allocator_traits<allocator_type>::propagate_on_container_swap::value ||
                 allocator_traits<allocator_type>::is_always_equal::value)
#endif
# 389 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
        ;

    // [stringbuf.members] Member functions:

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 394 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    _LIBCPP_HIDE_FROM_ABI allocator_type get_allocator() const noexcept { return __str_.get_allocator(); }
#endif
# 396 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_BUILDING_LIBRARY)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 398 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    string_type str() const;
#else
# 400 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    _LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() const & { return str(__str_.get_allocator()); }

    _LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() && {
        string_type __result;
        const basic_string_view<_CharT, _Traits> __view = view();
        if (!__view.empty()) {
            auto __pos = __view.data() - __str_.data();
            __result.assign(std::move(__str_), __pos, __view.size());
        }
        __str_.clear();
        __init_buf_ptrs();
        return __result;
    }
#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_BUILDING_LIBRARY)
# 414 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 416 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    template <class _SAlloc>
      requires __is_allocator<_SAlloc>::value
    _LIBCPP_HIDE_FROM_ABI basic_string<char_type, traits_type, _SAlloc> str(const _SAlloc& __sa) const {
        return basic_string<_CharT, _Traits, _SAlloc>(view(), __sa);
    }

    _LIBCPP_HIDE_FROM_ABI basic_string_view<char_type, traits_type> view() const noexcept;
#endif // _LIBCPP_STD_VER >= 20
# 424 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

    void str(const string_type& __s) {
        __str_ = __s;
        __init_buf_ptrs();
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 431 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    template <class _SAlloc>
      requires (!is_same_v<_SAlloc, allocator_type>)
    _LIBCPP_HIDE_FROM_ABI void str(const basic_string<char_type, traits_type, _SAlloc>& __s) {
        __str_ = __s;
        __init_buf_ptrs();
    }

    _LIBCPP_HIDE_FROM_ABI void str(string_type&& __s) {
        __str_ = std::move(__s);
        __init_buf_ptrs();
    }
#endif // _LIBCPP_STD_VER >= 20
# 443 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

protected:
    // [stringbuf.virtuals] Overridden virtual functions:
    int_type underflow() override;
    int_type pbackfail(int_type __c = traits_type::eof()) override;
    int_type overflow (int_type __c = traits_type::eof()) override;
    pos_type seekoff(off_type __off, ios_base::seekdir __way,
                     ios_base::openmode __wch = ios_base::in | ios_base::out) override;
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL
    pos_type seekpos(pos_type __sp,
                     ios_base::openmode __wch = ios_base::in | ios_base::out) override {
        return seekoff(__sp, ios_base::beg, __wch);
    }
};

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI void basic_stringbuf<_CharT, _Traits, _Allocator>::__move_init(basic_stringbuf&& __rhs) {
    char_type* __p = const_cast<char_type*>(__rhs.__str_.data());
    ptrdiff_t __binp = -1;
    ptrdiff_t __ninp = -1;
    ptrdiff_t __einp = -1;
    if (__rhs.eback() != nullptr)
    {
        __binp = __rhs.eback() - __p;
        __ninp = __rhs.gptr() - __p;
        __einp = __rhs.egptr() - __p;
    }
    ptrdiff_t __bout = -1;
    ptrdiff_t __nout = -1;
    ptrdiff_t __eout = -1;
    if (__rhs.pbase() != nullptr)
    {
        __bout = __rhs.pbase() - __p;
        __nout = __rhs.pptr() - __p;
        __eout = __rhs.epptr() - __p;
    }
    ptrdiff_t __hm = __rhs.__hm_ == nullptr ? -1 : __rhs.__hm_ - __p;
    __str_ = _VSTD::move(__rhs.__str_);
    __p = const_cast<char_type*>(__str_.data());
    if (__binp != -1)
        this->setg(__p + __binp, __p + __ninp, __p + __einp);
    if (__bout != -1)
    {
        this->setp(__p + __bout, __p + __eout);
        this->__pbump(__nout);
    }
    __hm_ = __hm == -1 ? nullptr : __p + __hm;
    __p = const_cast<char_type*>(__rhs.__str_.data());
    __rhs.setg(__p, __p, __p);
    __rhs.setp(__p, __p);
    __rhs.__hm_ = __p;
    this->pubimbue(__rhs.getloc());
}

template <class _CharT, class _Traits, class _Allocator>
basic_stringbuf<_CharT, _Traits, _Allocator>&
basic_stringbuf<_CharT, _Traits, _Allocator>::operator=(basic_stringbuf&& __rhs)
{
    char_type* __p = const_cast<char_type*>(__rhs.__str_.data());
    ptrdiff_t __binp = -1;
    ptrdiff_t __ninp = -1;
    ptrdiff_t __einp = -1;
    if (__rhs.eback() != nullptr)
    {
        __binp = __rhs.eback() - __p;
        __ninp = __rhs.gptr() - __p;
        __einp = __rhs.egptr() - __p;
    }
    ptrdiff_t __bout = -1;
    ptrdiff_t __nout = -1;
    ptrdiff_t __eout = -1;
    if (__rhs.pbase() != nullptr)
    {
        __bout = __rhs.pbase() - __p;
        __nout = __rhs.pptr() - __p;
        __eout = __rhs.epptr() - __p;
    }
    ptrdiff_t __hm = __rhs.__hm_ == nullptr ? -1 : __rhs.__hm_ - __p;
    __str_ = _VSTD::move(__rhs.__str_);
    __p = const_cast<char_type*>(__str_.data());
    if (__binp != -1)
        this->setg(__p + __binp, __p + __ninp, __p + __einp);
    else
        this->setg(nullptr, nullptr, nullptr);
    if (__bout != -1)
    {
        this->setp(__p + __bout, __p + __eout);
        this->__pbump(__nout);
    }
    else
        this->setp(nullptr, nullptr);

    __hm_ = __hm == -1 ? nullptr : __p + __hm;
    __mode_ = __rhs.__mode_;
    __p = const_cast<char_type*>(__rhs.__str_.data());
    __rhs.setg(__p, __p, __p);
    __rhs.setp(__p, __p);
    __rhs.__hm_ = __p;
    this->pubimbue(__rhs.getloc());
    return *this;
}

template <class _CharT, class _Traits, class _Allocator>
void
basic_stringbuf<_CharT, _Traits, _Allocator>::swap(basic_stringbuf& __rhs)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 549 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    noexcept(allocator_traits<_Allocator>::propagate_on_container_swap::value ||
             allocator_traits<_Allocator>::is_always_equal::value)
#endif
# 552 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
{
    char_type* __p = const_cast<char_type*>(__rhs.__str_.data());
    ptrdiff_t __rbinp = -1;
    ptrdiff_t __rninp = -1;
    ptrdiff_t __reinp = -1;
    if (__rhs.eback() != nullptr)
    {
        __rbinp = __rhs.eback() - __p;
        __rninp = __rhs.gptr() - __p;
        __reinp = __rhs.egptr() - __p;
    }
    ptrdiff_t __rbout = -1;
    ptrdiff_t __rnout = -1;
    ptrdiff_t __reout = -1;
    if (__rhs.pbase() != nullptr)
    {
        __rbout = __rhs.pbase() - __p;
        __rnout = __rhs.pptr() - __p;
        __reout = __rhs.epptr() - __p;
    }
    ptrdiff_t __rhm = __rhs.__hm_ == nullptr ? -1 : __rhs.__hm_ - __p;
    __p = const_cast<char_type*>(__str_.data());
    ptrdiff_t __lbinp = -1;
    ptrdiff_t __lninp = -1;
    ptrdiff_t __leinp = -1;
    if (this->eback() != nullptr)
    {
        __lbinp = this->eback() - __p;
        __lninp = this->gptr() - __p;
        __leinp = this->egptr() - __p;
    }
    ptrdiff_t __lbout = -1;
    ptrdiff_t __lnout = -1;
    ptrdiff_t __leout = -1;
    if (this->pbase() != nullptr)
    {
        __lbout = this->pbase() - __p;
        __lnout = this->pptr() - __p;
        __leout = this->epptr() - __p;
    }
    ptrdiff_t __lhm = __hm_ == nullptr ? -1 : __hm_ - __p;
    _VSTD::swap(__mode_, __rhs.__mode_);
    __str_.swap(__rhs.__str_);
    __p = const_cast<char_type*>(__str_.data());
    if (__rbinp != -1)
        this->setg(__p + __rbinp, __p + __rninp, __p + __reinp);
    else
        this->setg(nullptr, nullptr, nullptr);
    if (__rbout != -1)
    {
        this->setp(__p + __rbout, __p + __reout);
        this->__pbump(__rnout);
    }
    else
        this->setp(nullptr, nullptr);
    __hm_ = __rhm == -1 ? nullptr : __p + __rhm;
    __p = const_cast<char_type*>(__rhs.__str_.data());
    if (__lbinp != -1)
        __rhs.setg(__p + __lbinp, __p + __lninp, __p + __leinp);
    else
        __rhs.setg(nullptr, nullptr, nullptr);
    if (__lbout != -1)
    {
        __rhs.setp(__p + __lbout, __p + __leout);
        __rhs.__pbump(__lnout);
    }
    else
        __rhs.setp(nullptr, nullptr);
    __rhs.__hm_ = __lhm == -1 ? nullptr : __p + __lhm;
    locale __tl = __rhs.getloc();
    __rhs.pubimbue(this->getloc());
    this->pubimbue(__tl);
}

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x,
     basic_stringbuf<_CharT, _Traits, _Allocator>& __y)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 632 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    noexcept(noexcept(__x.swap(__y)))
#endif
# 634 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
{
    __x.swap(__y);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_BUILDING_LIBRARY)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 639 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
template <class _CharT, class _Traits, class _Allocator>
basic_string<_CharT, _Traits, _Allocator>
basic_stringbuf<_CharT, _Traits, _Allocator>::str() const {
    if (__mode_ & ios_base::out) {
        if (__hm_ < this->pptr())
            __hm_ = this->pptr();
        return string_type(this->pbase(), __hm_, __str_.get_allocator());
    } else if (__mode_ & ios_base::in)
        return string_type(this->eback(), this->egptr(), __str_.get_allocator());
    return string_type(__str_.get_allocator());
}
#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_BUILDING_LIBRARY)
# 651 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI void basic_stringbuf<_CharT, _Traits, _Allocator>::__init_buf_ptrs() {
    __hm_ = nullptr;
    char_type* __data = const_cast<char_type*>(__str_.data());
    typename string_type::size_type __sz = __str_.size();
    if (__mode_ & ios_base::in) {
        __hm_ = __data + __sz;
        this->setg(__data, __data, __hm_);
    }
    if (__mode_ & ios_base::out) {
        __hm_ = __data + __sz;
        __str_.resize(__str_.capacity());
        this->setp(__data, __data + __str_.size());
        if (__mode_ & (ios_base::app | ios_base::ate)) {
            while (__sz > INT_MAX) {
                this->pbump(INT_MAX);
                __sz -= INT_MAX;
            }
            if (__sz > 0)
                this->pbump(__sz);
        }
    }
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 677 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI basic_string_view<_CharT, _Traits>
basic_stringbuf<_CharT, _Traits, _Allocator>::view() const noexcept {
    if (__mode_ & ios_base::out) {
        if (__hm_ < this->pptr())
            __hm_ = this->pptr();
        return basic_string_view<_CharT, _Traits>(this->pbase(), __hm_);
    } else if (__mode_ & ios_base::in)
        return basic_string_view<_CharT, _Traits>(this->eback(), this->egptr());
    return basic_string_view<_CharT, _Traits>();
}
#endif // _LIBCPP_STD_VER >= 20
# 689 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

template <class _CharT, class _Traits, class _Allocator>
typename basic_stringbuf<_CharT, _Traits, _Allocator>::int_type
basic_stringbuf<_CharT, _Traits, _Allocator>::underflow()
{
    if (__hm_ < this->pptr())
        __hm_ = this->pptr();
    if (__mode_ & ios_base::in)
    {
        if (this->egptr() < __hm_)
            this->setg(this->eback(), this->gptr(), __hm_);
        if (this->gptr() < this->egptr())
            return traits_type::to_int_type(*this->gptr());
    }
    return traits_type::eof();
}

template <class _CharT, class _Traits, class _Allocator>
typename basic_stringbuf<_CharT, _Traits, _Allocator>::int_type
basic_stringbuf<_CharT, _Traits, _Allocator>::pbackfail(int_type __c)
{
    if (__hm_ < this->pptr())
        __hm_ = this->pptr();
    if (this->eback() < this->gptr())
    {
        if (traits_type::eq_int_type(__c, traits_type::eof()))
        {
            this->setg(this->eback(), this->gptr()-1, __hm_);
            return traits_type::not_eof(__c);
        }
        if ((__mode_ & ios_base::out) ||
            traits_type::eq(traits_type::to_char_type(__c), this->gptr()[-1]))
        {
            this->setg(this->eback(), this->gptr()-1, __hm_);
            *this->gptr() = traits_type::to_char_type(__c);
            return __c;
        }
    }
    return traits_type::eof();
}

template <class _CharT, class _Traits, class _Allocator>
typename basic_stringbuf<_CharT, _Traits, _Allocator>::int_type
basic_stringbuf<_CharT, _Traits, _Allocator>::overflow(int_type __c)
{
    if (!traits_type::eq_int_type(__c, traits_type::eof()))
    {
        ptrdiff_t __ninp = this->gptr() - this->eback();
        if (this->pptr() == this->epptr())
        {
            if (!(__mode_ & ios_base::out))
                return traits_type::eof();
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
            try
            {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 745 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
                ptrdiff_t __nout = this->pptr() - this->pbase();
                ptrdiff_t __hm = __hm_ - this->pbase();
                __str_.push_back(char_type());
                __str_.resize(__str_.capacity());
                char_type* __p = const_cast<char_type*>(__str_.data());
                this->setp(__p, __p + __str_.size());
                this->__pbump(__nout);
                __hm_ = this->pbase() + __hm;
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
            }
            catch (...)
            {
                return traits_type::eof();
            }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 760 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
        }
        __hm_ = _VSTD::max(this->pptr() + 1, __hm_);
        if (__mode_ & ios_base::in)
        {
            char_type* __p = const_cast<char_type*>(__str_.data());
            this->setg(__p, __p + __ninp, __hm_);
        }
        return this->sputc(traits_type::to_char_type(__c));
    }
    return traits_type::not_eof(__c);
}

template <class _CharT, class _Traits, class _Allocator>
typename basic_stringbuf<_CharT, _Traits, _Allocator>::pos_type
basic_stringbuf<_CharT, _Traits, _Allocator>::seekoff(off_type __off,
                                                      ios_base::seekdir __way,
                                                      ios_base::openmode __wch)
{
    if (__hm_ < this->pptr())
        __hm_ = this->pptr();
    if ((__wch & (ios_base::in | ios_base::out)) == 0)
        return pos_type(-1);
    if ((__wch & (ios_base::in | ios_base::out)) == (ios_base::in | ios_base::out)
        && __way == ios_base::cur)
        return pos_type(-1);
    const ptrdiff_t __hm = __hm_ == nullptr ? 0 : __hm_ - __str_.data();
    off_type __noff;
    switch (__way)
    {
    case ios_base::beg:
        __noff = 0;
        break;
    case ios_base::cur:
        if (__wch & ios_base::in)
            __noff = this->gptr() - this->eback();
        else
            __noff = this->pptr() - this->pbase();
        break;
    case ios_base::end:
        __noff = __hm;
        break;
    default:
        return pos_type(-1);
    }
    __noff += __off;
    if (__noff < 0 || __hm < __noff)
        return pos_type(-1);
    if (__noff != 0)
    {
        if ((__wch & ios_base::in) && this->gptr() == nullptr)
            return pos_type(-1);
        if ((__wch & ios_base::out) && this->pptr() == nullptr)
            return pos_type(-1);
    }
    if (__wch & ios_base::in)
        this->setg(this->eback(), this->eback() + __noff, __hm_);
    if (__wch & ios_base::out)
    {
        this->setp(this->pbase(), this->epptr());
        this->__pbump(__noff);
    }
    return pos_type(__noff);
}

// Class template basic_istringstream [istringstream]

template <class _CharT, class _Traits, class _Allocator>
class _LIBCPP_TEMPLATE_VIS basic_istringstream
    : public basic_istream<_CharT, _Traits>
{
public:
    typedef _CharT                         char_type;
    typedef _Traits                        traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;
    typedef _Allocator                     allocator_type;

    typedef basic_string<char_type, traits_type, allocator_type> string_type;

private:
    basic_stringbuf<char_type, traits_type, allocator_type> __sb_;

public:
    // [istringstream.cons] Constructors:
    _LIBCPP_INLINE_VISIBILITY
    basic_istringstream()
        : basic_istream<_CharT, _Traits>(&__sb_), __sb_(ios_base::in) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit basic_istringstream(ios_base::openmode __wch)
        : basic_istream<_CharT, _Traits>(&__sb_), __sb_(__wch | ios_base::in) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit basic_istringstream(const string_type& __s,
                                 ios_base::openmode __wch = ios_base::in)
        : basic_istream<_CharT, _Traits>(&__sb_)
        , __sb_(__s, __wch | ios_base::in)
    { }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 861 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    _LIBCPP_HIDE_FROM_ABI basic_istringstream(ios_base::openmode __wch, const _Allocator& __a)
        : basic_istream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(__wch | ios_base::in, __a) {}

    _LIBCPP_HIDE_FROM_ABI explicit basic_istringstream(string_type&& __s, ios_base::openmode __wch = ios_base::in)
        : basic_istream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(std::move(__s), __wch | ios_base::in) {}

    template <class _SAlloc>
    _LIBCPP_HIDE_FROM_ABI basic_istringstream(const basic_string<_CharT, _Traits, _SAlloc>& __s, const _Allocator& __a)
        : basic_istringstream(__s, ios_base::in, __a) {}

    template <class _SAlloc>
    _LIBCPP_HIDE_FROM_ABI basic_istringstream(
        const basic_string<_CharT, _Traits, _SAlloc>& __s, ios_base::openmode __wch, const _Allocator& __a)
        : basic_istream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(__s, __wch | ios_base::in, __a) {}

    template <class _SAlloc>
    _LIBCPP_HIDE_FROM_ABI explicit basic_istringstream(const basic_string<_CharT, _Traits, _SAlloc>& __s,
                                                       ios_base::openmode __wch = ios_base::in)
        : basic_istream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(__s, __wch | ios_base::in) {}
#endif // _LIBCPP_STD_VER >= 20
# 881 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

    _LIBCPP_INLINE_VISIBILITY
    basic_istringstream(basic_istringstream&& __rhs)
        : basic_istream<_CharT, _Traits>(_VSTD::move(__rhs))
        , __sb_(_VSTD::move(__rhs.__sb_))
    {
        basic_istream<_CharT, _Traits>::set_rdbuf(&__sb_);
    }

    // [istringstream.assign] Assign and swap:
    basic_istringstream& operator=(basic_istringstream&& __rhs) {
        basic_istream<char_type, traits_type>::operator=(_VSTD::move(__rhs));
        __sb_ = _VSTD::move(__rhs.__sb_);
        return *this;
    }
    _LIBCPP_INLINE_VISIBILITY
    void swap(basic_istringstream& __rhs) {
        basic_istream<char_type, traits_type>::swap(__rhs);
        __sb_.swap(__rhs.__sb_);
    }

    // [istringstream.members] Member functions:
    _LIBCPP_INLINE_VISIBILITY
    basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const {
        return const_cast<basic_stringbuf<char_type, traits_type, allocator_type>*>(&__sb_);
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_BUILDING_LIBRARY)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 909 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    _LIBCPP_HIDE_FROM_ABI string_type str() const { return __sb_.str(); }
#else
# 911 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    _LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() const & { return __sb_.str(); }

    _LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() && { return std::move(__sb_).str(); }
#endif
# 915 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 917 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    template <class _SAlloc>
      requires __is_allocator<_SAlloc>::value
    _LIBCPP_HIDE_FROM_ABI basic_string<char_type, traits_type, _SAlloc> str(const _SAlloc& __sa) const {
        return __sb_.str(__sa);
    }

    _LIBCPP_HIDE_FROM_ABI basic_string_view<char_type, traits_type> view() const noexcept { return __sb_.view(); }
#endif // _LIBCPP_STD_VER >= 20
# 925 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

    _LIBCPP_HIDE_FROM_ABI void str(const string_type& __s) { __sb_.str(__s); }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 929 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    template <class _SAlloc>
    _LIBCPP_HIDE_FROM_ABI void str(const basic_string<char_type, traits_type, _SAlloc>& __s) {
        __sb_.str(__s);
    }

    _LIBCPP_HIDE_FROM_ABI void str(string_type&& __s) { __sb_.str(std::move(__s)); }
#endif // _LIBCPP_STD_VER >= 20
# 936 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
};

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x,
     basic_istringstream<_CharT, _Traits, _Allocator>& __y)
{
    __x.swap(__y);
}

// Class template basic_ostringstream [ostringstream]

template <class _CharT, class _Traits, class _Allocator>
class _LIBCPP_TEMPLATE_VIS basic_ostringstream
    : public basic_ostream<_CharT, _Traits>
{
public:
    typedef _CharT                         char_type;
    typedef _Traits                        traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;
    typedef _Allocator                     allocator_type;

    typedef basic_string<char_type, traits_type, allocator_type> string_type;

private:
    basic_stringbuf<char_type, traits_type, allocator_type> __sb_;

public:
    // [ostringstream.cons] Constructors:
    _LIBCPP_INLINE_VISIBILITY
    basic_ostringstream()
        : basic_ostream<_CharT, _Traits>(&__sb_), __sb_(ios_base::out) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit basic_ostringstream(ios_base::openmode __wch)
        : basic_ostream<_CharT, _Traits>(&__sb_), __sb_(__wch | ios_base::out) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit basic_ostringstream(const string_type& __s,
                                 ios_base::openmode __wch = ios_base::out)
        : basic_ostream<_CharT, _Traits>(&__sb_)
        , __sb_(__s, __wch | ios_base::out)
    { }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 984 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    _LIBCPP_HIDE_FROM_ABI basic_ostringstream(ios_base::openmode __wch, const _Allocator& __a)
        : basic_ostream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(__wch | ios_base::out, __a) {}

    _LIBCPP_HIDE_FROM_ABI explicit basic_ostringstream(string_type&& __s, ios_base::openmode __wch = ios_base::out)
        : basic_ostream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(std::move(__s), __wch | ios_base::out) {}

    template <class _SAlloc>
    _LIBCPP_HIDE_FROM_ABI basic_ostringstream(const basic_string<_CharT, _Traits, _SAlloc>& __s, const _Allocator& __a)
        : basic_ostringstream(__s, ios_base::out, __a) {}

    template <class _SAlloc>
    _LIBCPP_HIDE_FROM_ABI basic_ostringstream(
        const basic_string<_CharT, _Traits, _SAlloc>& __s, ios_base::openmode __wch, const _Allocator& __a)
        : basic_ostream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(__s, __wch | ios_base::out, __a) {}

    template <class _SAlloc>
      requires (!is_same_v<_SAlloc, allocator_type>)
    _LIBCPP_HIDE_FROM_ABI explicit basic_ostringstream(const basic_string<_CharT, _Traits, _SAlloc>& __s,
                                                       ios_base::openmode __wch = ios_base::out)
        : basic_ostream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(__s, __wch | ios_base::out) {}
#endif // _LIBCPP_STD_VER >= 20
# 1005 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

    _LIBCPP_INLINE_VISIBILITY
    basic_ostringstream(basic_ostringstream&& __rhs)
        : basic_ostream<_CharT, _Traits>(_VSTD::move(__rhs))
        , __sb_(_VSTD::move(__rhs.__sb_))
    {
        basic_ostream<_CharT, _Traits>::set_rdbuf(&__sb_);
    }

    // [ostringstream.assign] Assign and swap:
    basic_ostringstream& operator=(basic_ostringstream&& __rhs) {
        basic_ostream<char_type, traits_type>::operator=(_VSTD::move(__rhs));
        __sb_ = _VSTD::move(__rhs.__sb_);
        return *this;
    }

    _LIBCPP_INLINE_VISIBILITY
    void swap(basic_ostringstream& __rhs) {
        basic_ostream<char_type, traits_type>::swap(__rhs);
        __sb_.swap(__rhs.__sb_);
    }

    // [ostringstream.members] Member functions:
    _LIBCPP_INLINE_VISIBILITY
    basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const {
        return const_cast<basic_stringbuf<char_type, traits_type, allocator_type>*>(&__sb_);
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_BUILDING_LIBRARY)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1034 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    _LIBCPP_HIDE_FROM_ABI string_type str() const { return __sb_.str(); }
#else
# 1036 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    _LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() const & { return __sb_.str(); }

    _LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() && { return std::move(__sb_).str(); }
#endif
# 1040 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1042 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    template <class _SAlloc>
      requires __is_allocator<_SAlloc>::value
    _LIBCPP_HIDE_FROM_ABI basic_string<char_type, traits_type, _SAlloc> str(const _SAlloc& __sa) const {
        return __sb_.str(__sa);
    }

    _LIBCPP_HIDE_FROM_ABI basic_string_view<char_type, traits_type> view() const noexcept { return __sb_.view(); }
#endif // _LIBCPP_STD_VER >= 20
# 1050 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

    _LIBCPP_HIDE_FROM_ABI void str(const string_type& __s) { __sb_.str(__s); }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1054 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    template <class _SAlloc>
    _LIBCPP_HIDE_FROM_ABI void str(const basic_string<char_type, traits_type, _SAlloc>& __s) {
        __sb_.str(__s);
    }

    _LIBCPP_HIDE_FROM_ABI void str(string_type&& __s) { __sb_.str(std::move(__s)); }
#endif // _LIBCPP_STD_VER >= 20
# 1061 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
};

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x,
     basic_ostringstream<_CharT, _Traits, _Allocator>& __y)
{
    __x.swap(__y);
}

// Class template basic_stringstream [stringstream]

template <class _CharT, class _Traits, class _Allocator>
class _LIBCPP_TEMPLATE_VIS basic_stringstream
    : public basic_iostream<_CharT, _Traits>
{
public:
    typedef _CharT                         char_type;
    typedef _Traits                        traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;
    typedef _Allocator                     allocator_type;

    typedef basic_string<char_type, traits_type, allocator_type> string_type;

private:
    basic_stringbuf<char_type, traits_type, allocator_type> __sb_;

public:
    // [stringstream.cons] constructors
    _LIBCPP_INLINE_VISIBILITY
    basic_stringstream()
        : basic_iostream<_CharT, _Traits>(&__sb_), __sb_(ios_base::in | ios_base::out) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit basic_stringstream(ios_base::openmode __wch)
        : basic_iostream<_CharT, _Traits>(&__sb_), __sb_(__wch) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit basic_stringstream(const string_type& __s,
                                ios_base::openmode __wch = ios_base::in | ios_base::out)
        : basic_iostream<_CharT, _Traits>(&__sb_)
        , __sb_(__s, __wch)
    { }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    _LIBCPP_HIDE_FROM_ABI basic_stringstream(ios_base::openmode __wch, const _Allocator& __a)
        : basic_iostream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(__wch, __a) {}

    _LIBCPP_HIDE_FROM_ABI explicit basic_stringstream(string_type&& __s, ios_base::openmode __wch = ios_base::out | ios_base::in)
        : basic_iostream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(std::move(__s), __wch) {}

    template <class _SAlloc>
    _LIBCPP_HIDE_FROM_ABI basic_stringstream(const basic_string<_CharT, _Traits, _SAlloc>& __s, const _Allocator& __a)
        : basic_stringstream(__s, ios_base::out | ios_base::in, __a) {}

    template <class _SAlloc>
    _LIBCPP_HIDE_FROM_ABI basic_stringstream(
        const basic_string<_CharT, _Traits, _SAlloc>& __s, ios_base::openmode __wch, const _Allocator& __a)
        : basic_iostream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(__s, __wch, __a) {}

    template <class _SAlloc>
      requires (!is_same_v<_SAlloc, allocator_type>)
    _LIBCPP_HIDE_FROM_ABI explicit basic_stringstream(const basic_string<_CharT, _Traits, _SAlloc>& __s,
                                                      ios_base::openmode __wch = ios_base::out | ios_base::in)
        : basic_iostream<_CharT, _Traits>(std::addressof(__sb_)), __sb_(__s, __wch) {}
#endif // _LIBCPP_STD_VER >= 20
# 1130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

    _LIBCPP_INLINE_VISIBILITY
    basic_stringstream(basic_stringstream&& __rhs)
        : basic_iostream<_CharT, _Traits>(_VSTD::move(__rhs))
        , __sb_(_VSTD::move(__rhs.__sb_))
    {
        basic_istream<_CharT, _Traits>::set_rdbuf(&__sb_);
    }

    // [stringstream.assign] Assign and swap:
    basic_stringstream& operator=(basic_stringstream&& __rhs) {
        basic_iostream<char_type, traits_type>::operator=(_VSTD::move(__rhs));
        __sb_ = _VSTD::move(__rhs.__sb_);
        return *this;
    }
    _LIBCPP_INLINE_VISIBILITY
    void swap(basic_stringstream& __rhs) {
        basic_iostream<char_type, traits_type>::swap(__rhs);
        __sb_.swap(__rhs.__sb_);
    }

    // [stringstream.members] Member functions:
    _LIBCPP_INLINE_VISIBILITY
    basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const {
        return const_cast<basic_stringbuf<char_type, traits_type, allocator_type>*>(&__sb_);
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_BUILDING_LIBRARY)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    _LIBCPP_HIDE_FROM_ABI string_type str() const { return __sb_.str(); }
#else
# 1160 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    _LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() const & { return __sb_.str(); }

    _LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() && { return std::move(__sb_).str(); }
#endif
# 1164 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1166 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    template <class _SAlloc>
      requires __is_allocator<_SAlloc>::value
    _LIBCPP_HIDE_FROM_ABI basic_string<char_type, traits_type, _SAlloc> str(const _SAlloc& __sa) const {
        return __sb_.str(__sa);
    }

    _LIBCPP_HIDE_FROM_ABI basic_string_view<char_type, traits_type> view() const noexcept { return __sb_.view(); }
#endif // _LIBCPP_STD_VER >= 20
# 1174 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

    _LIBCPP_HIDE_FROM_ABI void str(const string_type& __s) { __sb_.str(__s); }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1178 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
    template <class _SAlloc>
    _LIBCPP_HIDE_FROM_ABI void str(const basic_string<char_type, traits_type, _SAlloc>& __s) {
        __sb_.str(__s);
    }

    _LIBCPP_HIDE_FROM_ABI void str(string_type&& __s) { __sb_.str(std::move(__s)); }
#endif // _LIBCPP_STD_VER >= 20
# 1185 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
};

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x,
     basic_stringstream<_CharT, _Traits, _Allocator>& __y)
{
    __x.swap(__y);
}

#ifndef _LIBCPP_AVAILABILITY_HAS_NO_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_stringbuf<char>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_stringstream<char>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostringstream<char>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istringstream<char>;
#endif
# 1202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 20 && !defined(_LIPCPP_REMOVE_TRANSITIVE_INCLUDES)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 1208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
# 1209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
#endif
# 1210 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3

#endif // _LIBCPP_SSTREAM
# 1212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/sstream" 3
#endif /* sstream expanded by -frewrite-includes */
# 54 "../../third_party/googletest/src/googletest/include/gtest/gtest-message.h" 2

#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-port.h expanded by -frewrite-includes */
#include "gtest/internal/gtest-port.h"
#else /* gtest-port.h expanded by -frewrite-includes */
# 55 "../../third_party/googletest/src/googletest/include/gtest/gtest-message.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" 1
// Copyright 2005, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// Low-level types and utilities for porting Google Test to various
// platforms.  All macros ending with _ and symbols defined in an
// internal namespace are subject to change without notice.  Code
// outside Google Test MUST NOT USE THEM DIRECTLY.  Macros that don't
// end with _ are part of Google Test's public API and can be used by
// code outside Google Test.
//
// This file is fundamental to Google Test.  All other Google Test source
// files are expected to #include this.  Therefore, it cannot #include
// any other Google Test header.

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_

// Environment-describing macros
// -----------------------------
//
// Google Test can be used in many different environments.  Macros in
// this section tell Google Test what kind of environment it is being
// used in, such that Google Test can provide environment-specific
// features and implementations.
//
// Google Test tries to automatically detect the properties of its
// environment, so users usually don't need to worry about these
// macros.  However, the automatic detection is not perfect.
// Sometimes it's necessary for a user to define some of the following
// macros in the build script to override Google Test's decisions.
//
// If the user doesn't define a macro in the list, Google Test will
// provide a default definition.  After this header is #included, all
// macros in this list will be defined to either 1 or 0.
//
// Notes to maintainers:
//   - Each macro here is a user-tweakable knob; do not grow the list
//     lightly.
//   - Use #if to key off these macros.  Don't use #ifdef or "#if
//     defined(...)", which will not work as these macros are ALWAYS
//     defined.
//
//   GTEST_HAS_CLONE          - Define it to 1/0 to indicate that clone(2)
//                              is/isn't available.
//   GTEST_HAS_EXCEPTIONS     - Define it to 1/0 to indicate that exceptions
//                              are enabled.
//   GTEST_HAS_POSIX_RE       - Define it to 1/0 to indicate that POSIX regular
//                              expressions are/aren't available.
//   GTEST_HAS_PTHREAD        - Define it to 1/0 to indicate that <pthread.h>
//                              is/isn't available.
//   GTEST_HAS_RTTI           - Define it to 1/0 to indicate that RTTI is/isn't
//                              enabled.
//   GTEST_HAS_STD_WSTRING    - Define it to 1/0 to indicate that
//                              std::wstring does/doesn't work (Google Test can
//                              be used where std::wstring is unavailable).
//   GTEST_HAS_SEH            - Define it to 1/0 to indicate whether the
//                              compiler supports Microsoft's "Structured
//                              Exception Handling".
//   GTEST_HAS_STREAM_REDIRECTION
//                            - Define it to 1/0 to indicate whether the
//                              platform supports I/O stream redirection using
//                              dup() and dup2().
//   GTEST_LINKED_AS_SHARED_LIBRARY
//                            - Define to 1 when compiling tests that use
//                              Google Test as a shared library (known as
//                              DLL on Windows).
//   GTEST_CREATE_SHARED_LIBRARY
//                            - Define to 1 when compiling Google Test itself
//                              as a shared library.
//   GTEST_DEFAULT_DEATH_TEST_STYLE
//                            - The default value of --gtest_death_test_style.
//                              The legacy default has been "fast" in the open
//                              source version since 2008. The recommended value
//                              is "threadsafe", and can be set in
//                              custom/gtest-port.h.

// Platform-indicating macros
// --------------------------
//
// Macros indicating the platform on which Google Test is being used
// (a macro is defined to 1 if compiled on the given platform;
// otherwise UNDEFINED -- it's never defined to 0.).  Google Test
// defines these macros automatically.  Code outside Google Test MUST
// NOT define them.
//
//   GTEST_OS_AIX      - IBM AIX
//   GTEST_OS_CYGWIN   - Cygwin
//   GTEST_OS_DRAGONFLY - DragonFlyBSD
//   GTEST_OS_FREEBSD  - FreeBSD
//   GTEST_OS_FUCHSIA  - Fuchsia
//   GTEST_OS_GNU_HURD - GNU/Hurd
//   GTEST_OS_GNU_KFREEBSD - GNU/kFreeBSD
//   GTEST_OS_HAIKU    - Haiku
//   GTEST_OS_HPUX     - HP-UX
//   GTEST_OS_LINUX    - Linux
//     GTEST_OS_LINUX_ANDROID - Google Android
//   GTEST_OS_MAC      - Mac OS X
//     GTEST_OS_IOS    - iOS
//   GTEST_OS_NACL     - Google Native Client (NaCl)
//   GTEST_OS_NETBSD   - NetBSD
//   GTEST_OS_OPENBSD  - OpenBSD
//   GTEST_OS_OS2      - OS/2
//   GTEST_OS_QNX      - QNX
//   GTEST_OS_SOLARIS  - Sun Solaris
//   GTEST_OS_WINDOWS  - Windows (Desktop, MinGW, or Mobile)
//     GTEST_OS_WINDOWS_DESKTOP  - Windows Desktop
//     GTEST_OS_WINDOWS_MINGW    - MinGW
//     GTEST_OS_WINDOWS_MOBILE   - Windows Mobile
//     GTEST_OS_WINDOWS_PHONE    - Windows Phone
//     GTEST_OS_WINDOWS_RT       - Windows Store App/WinRT
//   GTEST_OS_ZOS      - z/OS
//
// Among the platforms, Cygwin, Linux, Mac OS X, and Windows have the
// most stable support.  Since core members of the Google Test project
// don't have access to other platforms, support for them may be less
// stable.  If you notice any problems on your platform, please notify
// googletestframework@googlegroups.com (patches for fixing them are
// even more welcome!).
//
// It is possible that none of the GTEST_OS_* macros are defined.

// Feature-indicating macros
// -------------------------
//
// Macros indicating which Google Test features are available (a macro
// is defined to 1 if the corresponding feature is supported;
// otherwise UNDEFINED -- it's never defined to 0.).  Google Test
// defines these macros automatically.  Code outside Google Test MUST
// NOT define them.
//
// These macros are public so that portable tests can be written.
// Such tests typically surround code using a feature with an #if
// which controls that code.  For example:
//
// #if GTEST_HAS_DEATH_TEST
//   EXPECT_DEATH(DoSomethingDeadly());
// #endif
//
//   GTEST_HAS_DEATH_TEST   - death tests
//   GTEST_HAS_TYPED_TEST   - typed tests
//   GTEST_HAS_TYPED_TEST_P - type-parameterized tests
//   GTEST_IS_THREADSAFE    - Google Test is thread-safe.
//   GTEST_USES_RE2         - the RE2 regular expression library is used
//   GTEST_USES_POSIX_RE    - enhanced POSIX regex is used. Do not confuse with
//                            GTEST_HAS_POSIX_RE (see above) which users can
//                            define themselves.
//   GTEST_USES_SIMPLE_RE   - our own simple regex is used;
//                            the above RE\b(s) are mutually exclusive.

// Misc public macros
// ------------------
//
//   GTEST_FLAG(flag_name)  - references the variable corresponding to
//                            the given Google Test flag.

// Internal utilities
// ------------------
//
// The following macros and utilities are for Google Test's INTERNAL
// use only.  Code outside Google Test MUST NOT USE THEM DIRECTLY.
//
// Macros for basic C++ coding:
//   GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning.
//   GTEST_ATTRIBUTE_UNUSED_  - declares that a class' instances or a
//                              variable don't have to be used.
//   GTEST_MUST_USE_RESULT_   - declares that a function's result must be used.
//   GTEST_INTENTIONAL_CONST_COND_PUSH_ - start code section where MSVC C4127 is
//                                        suppressed (constant conditional).
//   GTEST_INTENTIONAL_CONST_COND_POP_  - finish code section where MSVC C4127
//                                        is suppressed.
//   GTEST_INTERNAL_HAS_ANY - for enabling UniversalPrinter<std::any> or
//                            UniversalPrinter<absl::any> specializations.
//   GTEST_INTERNAL_HAS_OPTIONAL - for enabling UniversalPrinter<std::optional>
//   or
//                                 UniversalPrinter<absl::optional>
//                                 specializations.
//   GTEST_INTERNAL_HAS_STRING_VIEW - for enabling Matcher<std::string_view> or
//                                    Matcher<absl::string_view>
//                                    specializations.
//   GTEST_INTERNAL_HAS_VARIANT - for enabling UniversalPrinter<std::variant> or
//                                UniversalPrinter<absl::variant>
//                                specializations.
//
// Synchronization:
//   Mutex, MutexLock, ThreadLocal, GetThreadCount()
//                            - synchronization primitives.
//
// Regular expressions:
//   RE             - a simple regular expression class using
//                     1) the RE2 syntax on all platforms when built with RE2
//                        and Abseil as dependencies
//                     2) the POSIX Extended Regular Expression syntax on
//                        UNIX-like platforms,
//                     3) A reduced regular exception syntax on other platforms,
//                        including Windows.
// Logging:
//   GTEST_LOG_()   - logs messages at the specified severity level.
//   LogToStderr()  - directs all log messages to stderr.
//   FlushInfoLog() - flushes informational log messages.
//
// Stdout and stderr capturing:
//   CaptureStdout()     - starts capturing stdout.
//   GetCapturedStdout() - stops capturing stdout and returns the captured
//                         string.
//   CaptureStderr()     - starts capturing stderr.
//   GetCapturedStderr() - stops capturing stderr and returns the captured
//                         string.
//
// Integer types:
//   TypeWithSize   - maps an integer to a int type.
//   TimeInMillis   - integers of known sizes.
//   BiggestInt     - the biggest signed integer type.
//
// Command-line utilities:
//   GetInjectableArgvs() - returns the command line as a vector of strings.
//
// Environment variable utilities:
//   GetEnv()             - gets the value of an environment variable.
//   BoolFromGTestEnv()   - parses a bool environment variable.
//   Int32FromGTestEnv()  - parses an int32_t environment variable.
//   StringFromGTestEnv() - parses a string environment variable.
//
// Deprecation warnings:
//   GTEST_INTERNAL_DEPRECATED(message) - attribute marking a function as
//                                        deprecated; calling a marked function
//                                        should generate a compiler warning

#if 0 /* expanded by -frewrite-includes */
#include <ctype.h>   // for isspace, etc
#endif /* expanded by -frewrite-includes */
# 258 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 259 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stddef.h expanded by -frewrite-includes */
#include <stddef.h>  // for ptrdiff_t
#else /* stddef.h expanded by -frewrite-includes */
# 259 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_ptrdiff_t) || defined(__need_size_t) || \
    defined(__need_wchar_t) || defined(__need_NULL) || defined(__need_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#endif
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* expanded by -frewrite-includes */
#include_next <stddef.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_STDDEF_H)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#define _LIBCPP_STDDEF_H

/*
    stddef.h synopsis

Macros:

    offsetof(type,member-designator)
    NULL

Types:

    ptrdiff_t
    size_t
    max_align_t // C++11
    nullptr_t

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<stddef.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#    include_next <stddef.h>
#endif /* expanded by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#  endif
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#ifdef __cplusplus
    typedef decltype(nullptr) nullptr_t;
#endif
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#endif // _LIBCPP_STDDEF_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#endif /* stddef.h expanded by -frewrite-includes */
# 260 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdio.h expanded by -frewrite-includes */
#include <stdio.h>
#else /* stdio.h expanded by -frewrite-includes */
# 260 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_FILE) || defined(__need___FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 11 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#endif
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#if 0 /* expanded by -frewrite-includes */
#include_next <stdio.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_STDIO_H)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#define _LIBCPP_STDIO_H

/*
    stdio.h synopsis

Macros:

    BUFSIZ
    EOF
    FILENAME_MAX
    FOPEN_MAX
    L_tmpnam
    NULL
    SEEK_CUR
    SEEK_END
    SEEK_SET
    TMP_MAX
    _IOFBF
    _IOLBF
    _IONBF
    stderr
    stdin
    stdout

Types:

FILE
fpos_t
size_t

int remove(const char* filename);
int rename(const char* old, const char* new);
FILE* tmpfile(void);
char* tmpnam(char* s);
int fclose(FILE* stream);
int fflush(FILE* stream);
FILE* fopen(const char* restrict filename, const char* restrict mode);
FILE* freopen(const char* restrict filename, const char * restrict mode,
              FILE * restrict stream);
void setbuf(FILE* restrict stream, char* restrict buf);
int setvbuf(FILE* restrict stream, char* restrict buf, int mode, size_t size);
int fprintf(FILE* restrict stream, const char* restrict format, ...);
int fscanf(FILE* restrict stream, const char * restrict format, ...);
int printf(const char* restrict format, ...);
int scanf(const char* restrict format, ...);
int snprintf(char* restrict s, size_t n, const char* restrict format, ...);    // C99
int sprintf(char* restrict s, const char* restrict format, ...);
int sscanf(const char* restrict s, const char* restrict format, ...);
int vfprintf(FILE* restrict stream, const char* restrict format, va_list arg);
int vfscanf(FILE* restrict stream, const char* restrict format, va_list arg);  // C99
int vprintf(const char* restrict format, va_list arg);
int vscanf(const char* restrict format, va_list arg);                          // C99
int vsnprintf(char* restrict s, size_t n, const char* restrict format,         // C99
              va_list arg);
int vsprintf(char* restrict s, const char* restrict format, va_list arg);
int vsscanf(const char* restrict s, const char* restrict format, va_list arg); // C99
int fgetc(FILE* stream);
char* fgets(char* restrict s, int n, FILE* restrict stream);
int fputc(int c, FILE* stream);
int fputs(const char* restrict s, FILE* restrict stream);
int getc(FILE* stream);
int getchar(void);
char* gets(char* s);  // removed in C++14
int putc(int c, FILE* stream);
int putchar(int c);
int puts(const char* s);
int ungetc(int c, FILE* stream);
size_t fread(void* restrict ptr, size_t size, size_t nmemb,
             FILE* restrict stream);
size_t fwrite(const void* restrict ptr, size_t size, size_t nmemb,
              FILE* restrict stream);
int fgetpos(FILE* restrict stream, fpos_t* restrict pos);
int fseek(FILE* stream, long offset, int whence);
int fsetpos(FILE*stream, const fpos_t* pos);
long ftell(FILE* stream);
void rewind(FILE* stream);
void clearerr(FILE* stream);
int feof(FILE* stream);
int ferror(FILE* stream);
void perror(const char* s);
*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#endif
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<stdio.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#if 0 /* expanded by -frewrite-includes */
#    include_next <stdio.h>
#endif /* expanded by -frewrite-includes */
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#  endif
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#ifdef __cplusplus

#undef getc
#undef putc
#undef clearerr
#undef feof
#undef ferror
#undef putchar
#undef getchar

#endif
# 122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#endif // _LIBCPP_STDIO_H
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#endif /* stdio.h expanded by -frewrite-includes */
# 261 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdlib.h expanded by -frewrite-includes */
#include <stdlib.h>
#else /* stdlib.h expanded by -frewrite-includes */
# 261 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_malloc_and_calloc)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 11 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* expanded by -frewrite-includes */
#include_next <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_STDLIB_H)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#define _LIBCPP_STDLIB_H

/*
    stdlib.h synopsis

Macros:

    EXIT_FAILURE
    EXIT_SUCCESS
    MB_CUR_MAX
    NULL
    RAND_MAX

Types:

    size_t
    div_t
    ldiv_t
    lldiv_t                                                               // C99

double    atof (const char* nptr);
int       atoi (const char* nptr);
long      atol (const char* nptr);
long long atoll(const char* nptr);                                        // C99
double             strtod  (const char* restrict nptr, char** restrict endptr);
float              strtof  (const char* restrict nptr, char** restrict endptr); // C99
long double        strtold (const char* restrict nptr, char** restrict endptr); // C99
long               strtol  (const char* restrict nptr, char** restrict endptr, int base);
long long          strtoll (const char* restrict nptr, char** restrict endptr, int base); // C99
unsigned long      strtoul (const char* restrict nptr, char** restrict endptr, int base);
unsigned long long strtoull(const char* restrict nptr, char** restrict endptr, int base); // C99
int rand(void);
void srand(unsigned int seed);
void* calloc(size_t nmemb, size_t size);
void free(void* ptr);
void* malloc(size_t size);
void* realloc(void* ptr, size_t size);
void abort(void);
int atexit(void (*func)(void));
void exit(int status);
void _Exit(int status);
char* getenv(const char* name);
int system(const char* string);
void* bsearch(const void* key, const void* base, size_t nmemb, size_t size,
              int (*compar)(const void *, const void *));
void qsort(void* base, size_t nmemb, size_t size,
           int (*compar)(const void *, const void *));
int         abs(      int j);
long        abs(     long j);
long long   abs(long long j);                                             // C++0X
long       labs(     long j);
long long llabs(long long j);                                             // C99
div_t     div(      int numer,       int denom);
ldiv_t    div(     long numer,      long denom);
lldiv_t   div(long long numer, long long denom);                          // C++0X
ldiv_t   ldiv(     long numer,      long denom);
lldiv_t lldiv(long long numer, long long denom);                          // C99
int mblen(const char* s, size_t n);
int mbtowc(wchar_t* restrict pwc, const char* restrict s, size_t n);
int wctomb(char* s, wchar_t wchar);
size_t mbstowcs(wchar_t* restrict pwcs, const char* restrict s, size_t n);
size_t wcstombs(char* restrict s, const wchar_t* restrict pwcs, size_t n);
int at_quick_exit(void (*func)(void))                                     // C++11
void quick_exit(int status);                                              // C++11
void *aligned_alloc(size_t alignment, size_t size);                       // C11

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<stdlib.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#if 0 /* expanded by -frewrite-includes */
#    include_next <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#  endif
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#ifdef __cplusplus
extern "C++" {
// abs

#ifdef abs
# undef abs
#endif
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef labs
# undef labs
#endif
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef llabs
# undef llabs
#endif
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

// MSVCRT already has the correct prototype in <stdlib.h> if __cplusplus is defined
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_MSVCRT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long abs(long __x) _NOEXCEPT {
  return __builtin_labs(__x);
}
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {
  return __builtin_llabs(__x);
}
#endif // !defined(_LIBCPP_MSVCRT)
# 120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY float abs(float __lcpp_x) _NOEXCEPT {
  return __builtin_fabsf(__lcpp_x); // Use builtins to prevent needing math.h
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY double abs(double __lcpp_x) _NOEXCEPT {
  return __builtin_fabs(__lcpp_x);
}

_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long double
abs(long double __lcpp_x) _NOEXCEPT {
  return __builtin_fabsl(__lcpp_x);
}

// div

#ifdef div
# undef div
#endif
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef ldiv
# undef ldiv
#endif
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#ifdef lldiv
# undef lldiv
#endif
# 145 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

// MSVCRT already has the correct prototype in <stdlib.h> if __cplusplus is defined
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_MSVCRT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 148 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
  return ::ldiv(__x, __y);
}
#if 0 /* disabled by -frewrite-includes */
#if !(defined(__FreeBSD__) && !defined(__LONG_LONG_SUPPORTED))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,
                                             long long __y) _NOEXCEPT {
  return ::lldiv(__x, __y);
}
#endif
# 157 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif // _LIBCPP_MSVCRT
# 158 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
} // extern "C++"
#endif // __cplusplus
# 160 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3

#endif // _LIBCPP_STDLIB_H
# 162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdlib.h" 3
#endif /* stdlib.h expanded by -frewrite-includes */
# 262 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <string.h>
#endif /* expanded by -frewrite-includes */
# 262 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 263 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* expanded by -frewrite-includes */
#include <cerrno>
#endif /* expanded by -frewrite-includes */
# 264 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 265 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// #include <condition_variable>  // Guarded by GTEST_IS_THREADSAFE below
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 266 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 267 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* iostream expanded by -frewrite-includes */
#include <iostream>
#else /* iostream expanded by -frewrite-includes */
# 267 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_IOSTREAM
#define _LIBCPP_IOSTREAM

/*
    iostream synopsis

#include <ios>
#include <istream>
#include <ostream>
#include <streambuf>

namespace std {

extern istream cin;
extern ostream cout;
extern ostream cerr;
extern ostream clog;
extern wistream wcin;
extern wostream wcout;
extern wostream wcerr;
extern wostream wclog;

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3

// standard-mandated includes

// [iostream.syn]
#if 0 /* expanded by -frewrite-includes */
#include <ios>
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3
#if 0 /* expanded by -frewrite-includes */
#include <istream>
#endif /* expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3
#if 0 /* expanded by -frewrite-includes */
#include <ostream>
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3
#if 0 /* expanded by -frewrite-includes */
#include <streambuf>
#endif /* expanded by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3
#endif
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3

_LIBCPP_BEGIN_NAMESPACE_STD

extern _LIBCPP_EXPORTED_FROM_ABI istream cin;
extern _LIBCPP_EXPORTED_FROM_ABI ostream cout;
extern _LIBCPP_EXPORTED_FROM_ABI ostream cerr;
extern _LIBCPP_EXPORTED_FROM_ABI ostream clog;

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern _LIBCPP_EXPORTED_FROM_ABI wistream wcin;
extern _LIBCPP_EXPORTED_FROM_ABI wostream wcout;
extern _LIBCPP_EXPORTED_FROM_ABI wostream wcerr;
extern _LIBCPP_EXPORTED_FROM_ABI wostream wclog;
#endif
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_IOSTREAM
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iostream" 3
#endif /* iostream expanded by -frewrite-includes */
# 268 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 268 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 269 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* expanded by -frewrite-includes */
#include <locale>
#endif /* expanded by -frewrite-includes */
# 269 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 270 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* expanded by -frewrite-includes */
#include <memory>
#endif /* expanded by -frewrite-includes */
# 270 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 271 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* expanded by -frewrite-includes */
#include <string>
#endif /* expanded by -frewrite-includes */
# 271 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 272 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// #include <mutex>  // Guarded by GTEST_IS_THREADSAFE below
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 273 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 274 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 274 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 275 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* expanded by -frewrite-includes */
#include <vector>
#endif /* expanded by -frewrite-includes */
# 275 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 276 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#ifndef _WIN32_WCE
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stat.h expanded by -frewrite-includes */
#include <sys/stat.h>
#else /* stat.h expanded by -frewrite-includes */
# 278 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 1 "gen/zircon/public/sysroot/cpp/include/sys/stat.h" 1 3 4
#ifndef SYSROOT_SYS_STAT_H_
#define SYSROOT_SYS_STAT_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/sys/stat.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/sys/stat.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/sys/stat.h" 3 4

#define __NEED_dev_t
#define __NEED_ino_t
#define __NEED_mode_t
#define __NEED_nlink_t
#define __NEED_uid_t
#define __NEED_gid_t
#define __NEED_off_t
#define __NEED_time_t
#define __NEED_blksize_t
#define __NEED_blkcnt_t
#define __NEED_struct_timespec

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 22 "gen/zircon/public/sysroot/cpp/include/sys/stat.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/sys/stat.h" 2 3 4
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stat.h expanded by -frewrite-includes */
#include <bits/stat.h>
#else /* stat.h expanded by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/sys/stat.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/stat.h" 1 3 4
#ifdef __aarch64__
struct stat {
  dev_t st_dev;
  ino_t st_ino;
  mode_t st_mode;
  nlink_t st_nlink;
  uid_t st_uid;
  gid_t st_gid;
  dev_t st_rdev;
  unsigned long __pad;
  off_t st_size;
  blksize_t st_blksize;
  int __pad2;
  blkcnt_t st_blocks;
  struct timespec st_atim;
  struct timespec st_mtim;
  struct timespec st_ctim;
  unsigned __unused1[2];
};
#else
# 21 "gen/zircon/public/sysroot/cpp/include/bits/stat.h" 3 4
struct stat {
  dev_t st_dev;
  ino_t st_ino;
  nlink_t st_nlink;

  mode_t st_mode;
  uid_t st_uid;
  gid_t st_gid;
  unsigned int __pad0;
  dev_t st_rdev;
  off_t st_size;
  blksize_t st_blksize;
  blkcnt_t st_blocks;

  struct timespec st_atim;
  struct timespec st_mtim;
  struct timespec st_ctim;
  long __unused1[3];
};
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/stat.h" 3 4
#endif /* stat.h expanded by -frewrite-includes */
# 24 "gen/zircon/public/sysroot/cpp/include/sys/stat.h" 2 3 4

#define st_atime st_atim.tv_sec
#define st_mtime st_mtim.tv_sec
#define st_ctime st_ctim.tv_sec

#define S_IFMT 0170000

#define S_IFDIR 0040000
#define S_IFCHR 0020000
#define S_IFBLK 0060000
#define S_IFREG 0100000
#define S_IFIFO 0010000
#define S_IFLNK 0120000
#define S_IFSOCK 0140000

#define S_TYPEISMQ(buf) 0
#define S_TYPEISSEM(buf) 0
#define S_TYPEISSHM(buf) 0
#define S_TYPEISTMO(buf) 0

#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR)
#define S_ISCHR(mode) (((mode)&S_IFMT) == S_IFCHR)
#define S_ISBLK(mode) (((mode)&S_IFMT) == S_IFBLK)
#define S_ISREG(mode) (((mode)&S_IFMT) == S_IFREG)
#define S_ISFIFO(mode) (((mode)&S_IFMT) == S_IFIFO)
#define S_ISLNK(mode) (((mode)&S_IFMT) == S_IFLNK)
#define S_ISSOCK(mode) (((mode)&S_IFMT) == S_IFSOCK)

#ifndef S_IRUSR
#define S_ISUID 04000
#define S_ISGID 02000
#define S_ISVTX 01000
#define S_IRUSR 0400
#define S_IWUSR 0200
#define S_IXUSR 0100
#define S_IRWXU 0700
#define S_IRGRP 0040
#define S_IWGRP 0020
#define S_IXGRP 0010
#define S_IRWXG 0070
#define S_IROTH 0004
#define S_IWOTH 0002
#define S_IXOTH 0001
#define S_IRWXO 0007
#endif
# 69 "gen/zircon/public/sysroot/cpp/include/sys/stat.h" 3 4

#define UTIME_NOW 0x3fffffff
#define UTIME_OMIT 0x3ffffffe

int stat(const char* __restrict, struct stat* __restrict);
int fstat(int, struct stat*);
int lstat(const char* __restrict, struct stat* __restrict);
int fstatat(int, const char* __restrict, struct stat* __restrict, int);
int chmod(const char*, mode_t);
int fchmod(int, mode_t);
int fchmodat(int, const char*, mode_t, int);
mode_t umask(mode_t);
int mkdir(const char*, mode_t);
int mknod(const char*, mode_t, dev_t);
int mkfifo(const char*, mode_t);
int mkdirat(int, const char*, mode_t);
int mknodat(int, const char*, mode_t, dev_t);
int mkfifoat(int, const char*, mode_t);

int futimens(int, const struct timespec[2]);
int utimensat(int, const char*, const struct timespec[2], int);

#if 0 /* disabled by -frewrite-includes */
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 92 "gen/zircon/public/sysroot/cpp/include/sys/stat.h" 3 4
int lchmod(const char*, mode_t);
#define S_IREAD S_IRUSR
#define S_IWRITE S_IWUSR
#define S_IEXEC S_IXUSR
#endif
# 97 "gen/zircon/public/sysroot/cpp/include/sys/stat.h" 3 4

#ifdef __cplusplus
}
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/sys/stat.h" 3 4

#endif  // SYSROOT_SYS_STAT_H_
# 103 "gen/zircon/public/sysroot/cpp/include/sys/stat.h" 3 4
#endif /* stat.h expanded by -frewrite-includes */
# 279 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* types.h expanded by -frewrite-includes */
#include <sys/types.h>
#else /* types.h expanded by -frewrite-includes */
# 279 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 1 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 1 3 4
#ifndef SYSROOT_SYS_TYPES_H_
#define SYSROOT_SYS_TYPES_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 3 4

#define __NEED_ino_t
#define __NEED_dev_t
#define __NEED_uid_t
#define __NEED_gid_t
#define __NEED_mode_t
#define __NEED_nlink_t
#define __NEED_off_t
#define __NEED_pid_t
#define __NEED_size_t
#define __NEED_ssize_t
#define __NEED_time_t
#define __NEED_timer_t
#define __NEED_clockid_t

#define __NEED_blkcnt_t
#define __NEED_fsblkcnt_t
#define __NEED_fsfilcnt_t

#define __NEED_id_t
#define __NEED_key_t
#define __NEED_clock_t
#define __NEED_suseconds_t
#define __NEED_blksize_t

#define __NEED_pthread_t
#define __NEED_pthread_attr_t
#define __NEED_pthread_mutexattr_t
#define __NEED_pthread_condattr_t
#define __NEED_pthread_rwlockattr_t
#define __NEED_pthread_barrierattr_t
#define __NEED_pthread_mutex_t
#define __NEED_pthread_cond_t
#define __NEED_pthread_rwlock_t
#define __NEED_pthread_barrier_t
#define __NEED_pthread_spinlock_t
#define __NEED_pthread_key_t
#define __NEED_pthread_once_t
#define __NEED_useconds_t

#if 0 /* disabled by -frewrite-includes */
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 50 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <stdint.h>
#endif /* expanded by -frewrite-includes */
# 50 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 3 4
# 51 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 3 4
#define __NEED_u_int64_t
#define __NEED_register_t
#endif
# 54 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 3 4

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 55 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 56 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 2 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 3 4
typedef unsigned char u_int8_t;
typedef unsigned short u_int16_t;
typedef unsigned u_int32_t;
typedef char* caddr_t;
typedef unsigned char u_char;
typedef unsigned short u_short, ushort;
typedef unsigned u_int, uint;
typedef unsigned long u_long, ulong;
typedef long long quad_t;
typedef unsigned long long u_quad_t;
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* endian.h expanded by -frewrite-includes */
#include <endian.h>
#else /* endian.h expanded by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/endian.h" 1 3 4
#ifndef SYSROOT_ENDIAN_H_
#define SYSROOT_ENDIAN_H_

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 4 "gen/zircon/public/sysroot/cpp/include/endian.h" 3 4
# 5 "gen/zircon/public/sysroot/cpp/include/endian.h" 3 4

#ifndef __BYTE_ORDER__
#error "Compiler must define __BYTE_ORDER__"
#endif
# 9 "gen/zircon/public/sysroot/cpp/include/endian.h" 3 4

#ifndef __ORDER_LITTLE_ENDIAN__
#error "Compiler must define __ORDER_LITTLE_ENDIAN__"
#endif
# 13 "gen/zircon/public/sysroot/cpp/include/endian.h" 3 4

#ifndef __ORDER_BIG_ENDIAN__
#error "Compiler must define __ORDER_BIG_ENDIAN__"
#endif
# 17 "gen/zircon/public/sysroot/cpp/include/endian.h" 3 4

#ifndef __ORDER_PDP_ENDIAN__
#error "Compiler must define __ORDER_PDP_ENDIAN__"
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/endian.h" 3 4

#define __BYTE_ORDER __BYTE_ORDER__
#define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
#define __BIG_ENDIAN __ORDER_BIG_ENDIAN__
#define __PDP_ENDIAN __ORDER_PDP_ENDIAN__

#if 0 /* disabled by -frewrite-includes */
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/endian.h" 3 4

#define BIG_ENDIAN __BIG_ENDIAN
#define LITTLE_ENDIAN __LITTLE_ENDIAN
#define PDP_ENDIAN __PDP_ENDIAN
#define BYTE_ORDER __BYTE_ORDER

#if 0 /* expanded by -frewrite-includes */
#include <stdint.h>
#endif /* expanded by -frewrite-includes */
# 34 "gen/zircon/public/sysroot/cpp/include/endian.h" 3 4
# 35 "gen/zircon/public/sysroot/cpp/include/endian.h" 3 4

static __inline uint16_t __bswap16(uint16_t __x) { return (uint16_t)(__x << 8 | __x >> 8); }

static __inline uint32_t __bswap32(uint32_t __x) {
  return (uint32_t)(__x >> 24 | ((__x >> 8) & 0xff00) | ((__x << 8) & 0xff0000) | __x << 24);
}

static __inline uint64_t __bswap64(uint64_t __x) {
  return ((uint64_t)__bswap32((uint32_t)__x)) << 32 | (uint64_t)__bswap32((uint32_t)(__x >> 32));
}

#if 0 /* disabled by -frewrite-includes */
#if __BYTE_ORDER == __LITTLE_ENDIAN
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 47 "gen/zircon/public/sysroot/cpp/include/endian.h" 3 4
#define htobe16(x) __bswap16(x)
#define be16toh(x) __bswap16(x)
#define betoh16(x) __bswap16(x)
#define htobe32(x) __bswap32(x)
#define be32toh(x) __bswap32(x)
#define betoh32(x) __bswap32(x)
#define htobe64(x) __bswap64(x)
#define be64toh(x) __bswap64(x)
#define betoh64(x) __bswap64(x)
#define htole16(x) (uint16_t)(x)
#define le16toh(x) (uint16_t)(x)
#define letoh16(x) (uint16_t)(x)
#define htole32(x) (uint32_t)(x)
#define le32toh(x) (uint32_t)(x)
#define letoh32(x) (uint32_t)(x)
#define htole64(x) (uint64_t)(x)
#define le64toh(x) (uint64_t)(x)
#define letoh64(x) (uint64_t)(x)
#else
# 66 "gen/zircon/public/sysroot/cpp/include/endian.h" 3 4
#define htobe16(x) (uint16_t)(x)
#define be16toh(x) (uint16_t)(x)
#define betoh16(x) (uint16_t)(x)
#define htobe32(x) (uint32_t)(x)
#define be32toh(x) (uint32_t)(x)
#define betoh32(x) (uint32_t)(x)
#define htobe64(x) (uint64_t)(x)
#define be64toh(x) (uint64_t)(x)
#define betoh64(x) (uint64_t)(x)
#define htole16(x) __bswap16(x)
#define le16toh(x) __bswap16(x)
#define letoh16(x) __bswap16(x)
#define htole32(x) __bswap32(x)
#define le32toh(x) __bswap32(x)
#define letoh32(x) __bswap32(x)
#define htole64(x) __bswap64(x)
#define le64toh(x) __bswap64(x)
#define letoh64(x) __bswap64(x)
#endif
# 85 "gen/zircon/public/sysroot/cpp/include/endian.h" 3 4

#endif
# 87 "gen/zircon/public/sysroot/cpp/include/endian.h" 3 4

#endif  // SYSROOT_ENDIAN_H_
# 89 "gen/zircon/public/sysroot/cpp/include/endian.h" 3 4
#endif /* endian.h expanded by -frewrite-includes */
# 69 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 2 3 4
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* select.h expanded by -frewrite-includes */
#include <sys/select.h>
#else /* select.h expanded by -frewrite-includes */
# 69 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/sys/select.h" 1 3 4
#ifndef SYSROOT_SYS_SELECT_H_
#define SYSROOT_SYS_SELECT_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/sys/select.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/sys/select.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/sys/select.h" 3 4

#define __NEED_size_t
#define __NEED_time_t
#define __NEED_suseconds_t
#define __NEED_struct_timeval
#define __NEED_struct_timespec
#define __NEED_sigset_t

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 17 "gen/zircon/public/sysroot/cpp/include/sys/select.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/sys/select.h" 2 3 4

#define FD_SETSIZE 1024

typedef unsigned long fd_mask;

typedef struct {
  unsigned long fds_bits[FD_SETSIZE / 8 / sizeof(long)];
} fd_set;

#define FD_ZERO(s)                                        \
  do {                                                    \
    int __i;                                              \
    unsigned long* __b = (s)->fds_bits;                   \
    for (__i = sizeof(fd_set) / sizeof(long); __i; __i--) \
      *__b++ = 0;                                         \
  } while (0)
#define FD_SET(d, s) \
  ((s)->fds_bits[(d) / (8 * sizeof(long))] |= (1UL << ((d) % (8 * sizeof(long)))))
#define FD_CLR(d, s) \
  ((s)->fds_bits[(d) / (8 * sizeof(long))] &= ~(1UL << ((d) % (8 * sizeof(long)))))
#define FD_ISSET(d, s) \
  !!((s)->fds_bits[(d) / (8 * sizeof(long))] & (1UL << ((d) % (8 * sizeof(long)))))

int select(int, fd_set* __restrict, fd_set* __restrict, fd_set* __restrict,
           struct timeval* __restrict);
int pselect(int, fd_set* __restrict, fd_set* __restrict, fd_set* __restrict,
            const struct timespec* __restrict, const sigset_t* __restrict);

#if 0 /* disabled by -frewrite-includes */
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 47 "gen/zircon/public/sysroot/cpp/include/sys/select.h" 3 4
#define NFDBITS (8 * (int)sizeof(long))
#endif
# 49 "gen/zircon/public/sysroot/cpp/include/sys/select.h" 3 4

#ifdef __cplusplus
}
#endif
# 53 "gen/zircon/public/sysroot/cpp/include/sys/select.h" 3 4

#endif  // SYSROOT_SYS_SELECT_H_
# 55 "gen/zircon/public/sysroot/cpp/include/sys/select.h" 3 4
#endif /* select.h expanded by -frewrite-includes */
# 70 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 2 3 4
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 3 4

#ifdef __cplusplus
}
#endif
# 75 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 3 4

#endif  // SYSROOT_SYS_TYPES_H_
# 77 "gen/zircon/public/sysroot/cpp/include/sys/types.h" 3 4
#endif /* types.h expanded by -frewrite-includes */
# 280 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" 2
#endif  // !_WIN32_WCE
# 281 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if defined __APPLE__
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 283 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* expanded by -frewrite-includes */
#include <AvailabilityMacros.h>
#endif /* expanded by -frewrite-includes */
# 283 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 284 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* expanded by -frewrite-includes */
#include <TargetConditionals.h>
#endif /* expanded by -frewrite-includes */
# 284 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 285 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif
# 286 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-port.h expanded by -frewrite-includes */
#include "gtest/internal/custom/gtest-port.h"
#else /* gtest-port.h expanded by -frewrite-includes */
# 287 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/internal/custom/gtest-port.h" 1
// Copyright 2015, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.
//
// Injection point for custom user configurations. See README for details
//
// ** Custom implementation starts here **

#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_
#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_

#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_
# 38 "../../third_party/googletest/src/googletest/include/gtest/internal/custom/gtest-port.h"
#endif /* gtest-port.h expanded by -frewrite-includes */
# 288 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-port-arch.h expanded by -frewrite-includes */
#include "gtest/internal/gtest-port-arch.h"
#else /* gtest-port-arch.h expanded by -frewrite-includes */
# 288 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h" 1
// Copyright 2015, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// The Google C++ Testing and Mocking Framework (Google Test)
//
// This header file defines the GTEST_OS_* macro.
// It is separate from gtest-port.h so that custom/gtest-port.h can include it.

#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_
#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_

// Determines the platform on which Google Test is compiled.
#ifdef __CYGWIN__
#define GTEST_OS_CYGWIN 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 42 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_WINDOWS_MINGW 1
#define GTEST_OS_WINDOWS 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined _WIN32
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 45 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_WINDOWS 1
#ifdef _WIN32_WCE
#define GTEST_OS_WINDOWS_MOBILE 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(WINAPI_FAMILY)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 49 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#if 0 /* expanded by -frewrite-includes */
#include <winapifamily.h>
#endif /* expanded by -frewrite-includes */
# 49 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
# 50 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#if 0 /* disabled by -frewrite-includes */
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 51 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_WINDOWS_DESKTOP 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 53 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_WINDOWS_PHONE 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 55 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_WINDOWS_RT 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_TV_TITLE)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 57 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_WINDOWS_PHONE 1
#define GTEST_OS_WINDOWS_TV_TITLE 1
#else
# 60 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
// WINAPI_FAMILY defined but no known partition matched.
// Default to desktop.
#define GTEST_OS_WINDOWS_DESKTOP 1
#endif
# 64 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#else
# 65 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_WINDOWS_DESKTOP 1
#endif  // _WIN32_WCE
# 67 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined __OS2__
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 68 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_OS2 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined __APPLE__
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 70 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_MAC 1
#if 0 /* expanded by -frewrite-includes */
#include <TargetConditionals.h>
#endif /* expanded by -frewrite-includes */
# 71 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
# 72 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#if 0 /* disabled by -frewrite-includes */
#if TARGET_OS_IPHONE
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_IOS 1
#endif
# 75 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined __DragonFly__
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 76 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_DRAGONFLY 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined __FreeBSD__
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 78 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_FREEBSD 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined __Fuchsia__
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 80 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_FUCHSIA 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__GNU__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 82 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_GNU_HURD 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__GLIBC__) && defined(__FreeBSD_kernel__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 84 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_GNU_KFREEBSD 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined __linux__
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 86 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_LINUX 1
#if 0 /* disabled by -frewrite-includes */
#if defined __ANDROID__
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_LINUX_ANDROID 1
#endif
# 90 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined __MVS__
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 91 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_ZOS 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__sun) && defined(__SVR4)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 93 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_SOLARIS 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_AIX)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 95 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_AIX 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__hpux)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 97 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_HPUX 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined __native_client__
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 99 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_NACL 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined __NetBSD__
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 101 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_NETBSD 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined __OpenBSD__
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 103 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_OPENBSD 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined __QNX__
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 105 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_QNX 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__HAIKU__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 107 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_HAIKU 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined ESP8266
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 109 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_ESP8266 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined ESP32
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 111 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_ESP32 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__XTENSA__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 113 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_XTENSA 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__hexagon__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 115 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#define GTEST_OS_QURT 1
#endif  // __CYGWIN__
# 117 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"

#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_
# 119 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port-arch.h"
#endif /* gtest-port-arch.h expanded by -frewrite-includes */
# 289 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" 2

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_ABSL
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 291 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* expanded by -frewrite-includes */
#include "absl/flags/declare.h"
#endif /* expanded by -frewrite-includes */
# 291 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 292 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* expanded by -frewrite-includes */
#include "absl/flags/flag.h"
#endif /* expanded by -frewrite-includes */
# 292 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 293 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* expanded by -frewrite-includes */
#include "absl/flags/reflection.h"
#endif /* expanded by -frewrite-includes */
# 293 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 294 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif
# 295 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if !defined(GTEST_DEV_EMAIL_)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 297 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com"
#define GTEST_FLAG_PREFIX_ "gtest_"
#define GTEST_FLAG_PREFIX_DASH_ "gtest-"
#define GTEST_FLAG_PREFIX_UPPER_ "GTEST_"
#define GTEST_NAME_ "Google Test"
#define GTEST_PROJECT_URL_ "https://github.com/google/googletest/"
#endif  // !defined(GTEST_DEV_EMAIL_)
# 304 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if !defined(GTEST_INIT_GOOGLE_TEST_NAME_)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 306 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_INIT_GOOGLE_TEST_NAME_ "testing::InitGoogleTest"
#endif  // !defined(GTEST_INIT_GOOGLE_TEST_NAME_)
# 308 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Determines the version of gcc that is used to compile this.
#ifdef __GNUC__
// 40302 means version 4.3.2.
#define GTEST_GCC_VER_ \
  (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#endif  // __GNUC__
# 315 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Macros for disabling Microsoft Visual C++ warnings.
//
//   GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 4385)
//   /* code that triggers warnings C4800 and C4385 */
//   GTEST_DISABLE_MSC_WARNINGS_POP_()
#if 0 /* disabled by -frewrite-includes */
#if defined(_MSC_VER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 322 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings) \
  __pragma(warning(push)) __pragma(warning(disable : warnings))
#define GTEST_DISABLE_MSC_WARNINGS_POP_() __pragma(warning(pop))
#else
# 326 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Not all compilers are MSVC
#define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings)
#define GTEST_DISABLE_MSC_WARNINGS_POP_()
#endif
# 330 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Clang on Windows does not understand MSVC's pragma warning.
// We need clang-specific way to disable function deprecation warning.
#ifdef __clang__
#define GTEST_DISABLE_MSC_DEPRECATED_PUSH_()                            \
  _Pragma("clang diagnostic push")                                      \
      _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") \
          _Pragma("clang diagnostic ignored \"-Wdeprecated-implementations\"")
#define GTEST_DISABLE_MSC_DEPRECATED_POP_() _Pragma("clang diagnostic pop")
#else
# 340 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_DISABLE_MSC_DEPRECATED_PUSH_() \
  GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996)
#define GTEST_DISABLE_MSC_DEPRECATED_POP_() GTEST_DISABLE_MSC_WARNINGS_POP_()
#endif
# 344 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Brings in definitions for functions used in the testing::internal::posix
// namespace (read, write, close, chdir, isatty, stat). We do not currently
// use them on Windows Mobile.
#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_WINDOWS
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 349 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* disabled by -frewrite-includes */
#if !GTEST_OS_WINDOWS_MOBILE
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 350 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* expanded by -frewrite-includes */
#include <direct.h>
#endif /* expanded by -frewrite-includes */
# 350 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 351 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* expanded by -frewrite-includes */
#include <io.h>
#endif /* expanded by -frewrite-includes */
# 351 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 352 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif
# 353 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// In order to avoid having to include <windows.h>, use forward declaration
#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_WINDOWS_MINGW && !defined(__MINGW64_VERSION_MAJOR)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 355 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// MinGW defined _CRITICAL_SECTION and _RTL_CRITICAL_SECTION as two
// separate (equivalent) structs, instead of using typedef
typedef struct _CRITICAL_SECTION GTEST_CRITICAL_SECTION;
#else
# 359 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Assume CRITICAL_SECTION is a typedef of _RTL_CRITICAL_SECTION.
// This assumption is verified by
// WindowsTypesTest.CRITICAL_SECTIONIs_RTL_CRITICAL_SECTION.
typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
#endif
# 364 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif GTEST_OS_XTENSA
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 365 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* expanded by -frewrite-includes */
#include <unistd.h>
#endif /* expanded by -frewrite-includes */
# 365 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 366 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Xtensa toolchains define strcasecmp in the string.h header instead of
// strings.h. string.h is already included.
#else
# 369 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// This assumes that non-Windows OSes provide unistd.h. For OSes where this
// is not the case, we need to include headers that provide the functions
// mentioned above.
#if 0 /* expanded by -frewrite-includes */
#include <strings.h>
#endif /* expanded by -frewrite-includes */
# 372 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 373 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* unistd.h expanded by -frewrite-includes */
#include <unistd.h>
#else /* unistd.h expanded by -frewrite-includes */
# 373 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 1 "gen/zircon/public/sysroot/cpp/include/unistd.h" 1 3 4
#ifndef SYSROOT_UNISTD_H_
#define SYSROOT_UNISTD_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <bits/null.h>
#endif /* expanded by -frewrite-includes */
# 10 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4
# 11 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4

#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2

#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2

#define __NEED_size_t
#define __NEED_ssize_t
#define __NEED_uid_t
#define __NEED_gid_t
#define __NEED_off_t
#define __NEED_pid_t
#define __NEED_intptr_t
#define __NEED_useconds_t

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 29 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 30 "gen/zircon/public/sysroot/cpp/include/unistd.h" 2 3 4

int pipe(int[2]);
int pipe2(int[2], int);
int close(int);
int posix_close(int, int);
int dup(int);
int dup2(int, int);
int dup3(int, int, int);
off_t lseek(int, off_t, int);
int fsync(int);
int fdatasync(int);

ssize_t read(int, void*, size_t);
ssize_t write(int, const void*, size_t);
ssize_t pread(int, void*, size_t, off_t);
ssize_t pwrite(int, const void*, size_t, off_t);

int chown(const char*, uid_t, gid_t);
int fchown(int, uid_t, gid_t);
int lchown(const char*, uid_t, gid_t);
int fchownat(int, const char*, uid_t, gid_t, int);

int link(const char*, const char*);
int linkat(int, const char*, int, const char*, int);
int symlink(const char*, const char*);
int symlinkat(const char*, int, const char*);
ssize_t readlink(const char* __restrict, char* __restrict, size_t);
ssize_t readlinkat(int, const char* __restrict, char* __restrict, size_t);
int unlink(const char*);
int unlinkat(int, const char*, int);
int rmdir(const char*);
int truncate(const char*, off_t);
int ftruncate(int, off_t);

#define F_OK 0
#define R_OK 4
#define W_OK 2
#define X_OK 1

int access(const char*, int);
int faccessat(int, const char*, int, int);

int chdir(const char*);
char* getcwd(char*, size_t);

unsigned alarm(unsigned);
unsigned sleep(unsigned);
int pause(void);

pid_t fork(void);
int execve(const char*, char* const[], char* const[]);
int execv(const char*, char* const[]);
int execle(const char*, const char*, ...);
int execl(const char*, const char*, ...);
int execvp(const char*, char* const[]);
int execlp(const char*, const char*, ...);
int fexecve(int, char* const[], char* const[]);
_Noreturn void _exit(int);

pid_t getpid(void);
pid_t getppid(void);
pid_t getpgrp(void);
pid_t getpgid(pid_t);
int setpgid(pid_t, pid_t);
pid_t setsid(void);
pid_t getsid(pid_t);
char* ttyname(int);
int ttyname_r(int, char*, size_t);
int isatty(int);
pid_t tcgetpgrp(int);
int tcsetpgrp(int, pid_t);

uid_t getuid(void);
uid_t geteuid(void);
gid_t getgid(void);
gid_t getegid(void);
int getgroups(int, gid_t[]);
int setuid(uid_t);
int setreuid(uid_t, uid_t);
int seteuid(uid_t);
int setgid(gid_t);
int setregid(gid_t, gid_t);
int setegid(gid_t);

char* getlogin(void);
int getlogin_r(char*, size_t);
int gethostname(char*, size_t);
char* ctermid(char*);

int getopt(int, char* const[], const char*);
extern char* optarg;
extern int optind, opterr, optopt;

long pathconf(const char*, int);
long fpathconf(int, int);
long sysconf(int);
size_t confstr(int, char*, size_t);

#define F_ULOCK 0
#define F_LOCK 1
#define F_TLOCK 2
#define F_TEST 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 134 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4
int lockf(int, int, off_t);
long gethostid(void);
void sync(void);
int syncfs(int);
pid_t setpgrp(void);
void swab(const void* __restrict, void* __restrict, ssize_t);
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || \
    (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE + 0 < 700)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 144 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4
int usleep(unsigned);
unsigned ualarm(unsigned, unsigned);
#endif
# 147 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4
#define L_SET 0
#define L_INCR 1
#define L_XTND 2
int vhangup(void);
int chroot(const char*);
int getpagesize(void);
int getdtablesize(void);
int sethostname(const char*, size_t);
int getdomainname(char*, size_t);
int setdomainname(const char*, size_t);
int setgroups(size_t, const gid_t*);
char* getpass(const char*)
    __attribute__((deprecated("getpass is not supported and will always fail")));
int acct(const char*);
int execvpe(const char*, char* const[], char* const[]);
int issetugid(void);
#endif
# 166 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4

#ifdef _GNU_SOURCE
extern char** environ;
int setresuid(uid_t, uid_t, uid_t);
int setresgid(gid_t, gid_t, gid_t);
int getresuid(uid_t*, uid_t*, uid_t*);
int getresgid(gid_t*, gid_t*, gid_t*);
char* get_current_dir_name(void);
int euidaccess(const char*, int);
int eaccess(const char*, int);
#endif
# 177 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4

#define POSIX_CLOSE_RESTART 0

#define _XOPEN_VERSION 700
#define _XOPEN_UNIX 1
#define _XOPEN_ENH_I18N 1

#define _POSIX_VERSION 200809L
#define _POSIX2_VERSION _POSIX_VERSION

#define _POSIX_ADVISORY_INFO _POSIX_VERSION
#define _POSIX_CHOWN_RESTRICTED 1
#define _POSIX_IPV6 _POSIX_VERSION
#define _POSIX_JOB_CONTROL 1
#define _POSIX_MAPPED_FILES _POSIX_VERSION
#define _POSIX_MEMLOCK _POSIX_VERSION
#define _POSIX_MEMLOCK_RANGE _POSIX_VERSION
#define _POSIX_MEMORY_PROTECTION _POSIX_VERSION
#define _POSIX_MESSAGE_PASSING _POSIX_VERSION
#define _POSIX_FSYNC _POSIX_VERSION
#define _POSIX_NO_TRUNC 1
#define _POSIX_RAW_SOCKETS _POSIX_VERSION
#define _POSIX_REALTIME_SIGNALS _POSIX_VERSION
#define _POSIX_REGEXP 1
#define _POSIX_SAVED_IDS 1
#define _POSIX_SHELL 1
#define _POSIX_SPAWN _POSIX_VERSION
#define _POSIX_VDISABLE 0

#define _POSIX_THREADS _POSIX_VERSION
#define _POSIX_THREAD_PROCESS_SHARED _POSIX_VERSION
#define _POSIX_THREAD_SAFE_FUNCTIONS _POSIX_VERSION
#define _POSIX_THREAD_ATTR_STACKADDR _POSIX_VERSION
#define _POSIX_THREAD_ATTR_STACKSIZE _POSIX_VERSION
/* #define _POSIX_THREAD_PRIORITY_SCHEDULING -1 */
#define _POSIX_THREAD_CPUTIME _POSIX_VERSION
#define _POSIX_TIMERS _POSIX_VERSION
#define _POSIX_TIMEOUTS _POSIX_VERSION
#define _POSIX_MONOTONIC_CLOCK _POSIX_VERSION
#define _POSIX_CPUTIME _POSIX_VERSION
#define _POSIX_CLOCK_SELECTION _POSIX_VERSION
#define _POSIX_BARRIERS _POSIX_VERSION
#define _POSIX_SPIN_LOCKS _POSIX_VERSION
#define _POSIX_READER_WRITER_LOCKS _POSIX_VERSION
#define _POSIX_ASYNCHRONOUS_IO _POSIX_VERSION
#define _POSIX_SEMAPHORES _POSIX_VERSION
#define _POSIX_SHARED_MEMORY_OBJECTS _POSIX_VERSION

#define _POSIX2_C_BIND _POSIX_VERSION

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* posix.h expanded by -frewrite-includes */
#include <bits/posix.h>
#else /* posix.h expanded by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/posix.h" 1 3 4
#define _POSIX_V6_LP64_OFF64 1
#define _POSIX_V7_LP64_OFF64 1
#endif /* posix.h expanded by -frewrite-includes */
# 228 "gen/zircon/public/sysroot/cpp/include/unistd.h" 2 3 4

#define _PC_LINK_MAX 0
#define _PC_MAX_CANON 1
#define _PC_MAX_INPUT 2
#define _PC_NAME_MAX 3
#define _PC_PATH_MAX 4
#define _PC_PIPE_BUF 5
#define _PC_CHOWN_RESTRICTED 6
#define _PC_NO_TRUNC 7
#define _PC_VDISABLE 8
#define _PC_SYNC_IO 9
#define _PC_ASYNC_IO 10
#define _PC_PRIO_IO 11
#define _PC_SOCK_MAXBUF 12
#define _PC_FILESIZEBITS 13
#define _PC_REC_INCR_XFER_SIZE 14
#define _PC_REC_MAX_XFER_SIZE 15
#define _PC_REC_MIN_XFER_SIZE 16
#define _PC_REC_XFER_ALIGN 17
#define _PC_ALLOC_SIZE_MIN 18
#define _PC_SYMLINK_MAX 19
#define _PC_2_SYMLINKS 20

#define _SC_ARG_MAX 0
#define _SC_CHILD_MAX 1
#define _SC_CLK_TCK 2
#define _SC_NGROUPS_MAX 3
#define _SC_OPEN_MAX 4
#define _SC_STREAM_MAX 5
#define _SC_TZNAME_MAX 6
#define _SC_JOB_CONTROL 7
#define _SC_SAVED_IDS 8
#define _SC_REALTIME_SIGNALS 9
#define _SC_PRIORITY_SCHEDULING 10
#define _SC_TIMERS 11
#define _SC_ASYNCHRONOUS_IO 12
#define _SC_PRIORITIZED_IO 13
#define _SC_SYNCHRONIZED_IO 14
#define _SC_FSYNC 15
#define _SC_MAPPED_FILES 16
#define _SC_MEMLOCK 17
#define _SC_MEMLOCK_RANGE 18
#define _SC_MEMORY_PROTECTION 19
#define _SC_MESSAGE_PASSING 20
#define _SC_SEMAPHORES 21
#define _SC_SHARED_MEMORY_OBJECTS 22
#define _SC_AIO_LISTIO_MAX 23
#define _SC_AIO_MAX 24
#define _SC_AIO_PRIO_DELTA_MAX 25
#define _SC_DELAYTIMER_MAX 26
#define _SC_MQ_OPEN_MAX 27
#define _SC_MQ_PRIO_MAX 28
#define _SC_VERSION 29
#define _SC_PAGE_SIZE 30
#define _SC_PAGESIZE 30 /* !! */
#define _SC_RTSIG_MAX 31
#define _SC_SEM_NSEMS_MAX 32
#define _SC_SEM_VALUE_MAX 33
#define _SC_SIGQUEUE_MAX 34
#define _SC_TIMER_MAX 35
#define _SC_BC_BASE_MAX 36
#define _SC_BC_DIM_MAX 37
#define _SC_BC_SCALE_MAX 38
#define _SC_BC_STRING_MAX 39
#define _SC_COLL_WEIGHTS_MAX 40
#define _SC_EXPR_NEST_MAX 42
#define _SC_LINE_MAX 43
#define _SC_RE_DUP_MAX 44
#define _SC_2_VERSION 46
#define _SC_2_C_BIND 47
#define _SC_2_C_DEV 48
#define _SC_2_FORT_DEV 49
#define _SC_2_FORT_RUN 50
#define _SC_2_SW_DEV 51
#define _SC_2_LOCALEDEF 52
#define _SC_UIO_MAXIOV 60 /* !! */
#define _SC_IOV_MAX 60
#define _SC_THREADS 67
#define _SC_THREAD_SAFE_FUNCTIONS 68
#define _SC_GETGR_R_SIZE_MAX 69
#define _SC_GETPW_R_SIZE_MAX 70
#define _SC_LOGIN_NAME_MAX 71
#define _SC_TTY_NAME_MAX 72
#define _SC_THREAD_DESTRUCTOR_ITERATIONS 73
#define _SC_THREAD_KEYS_MAX 74
#define _SC_THREAD_STACK_MIN 75
#define _SC_THREAD_THREADS_MAX 76
#define _SC_THREAD_ATTR_STACKADDR 77
#define _SC_THREAD_ATTR_STACKSIZE 78
#define _SC_THREAD_PRIORITY_SCHEDULING 79
#define _SC_THREAD_PRIO_INHERIT 80
#define _SC_THREAD_PRIO_PROTECT 81
#define _SC_THREAD_PROCESS_SHARED 82
#define _SC_NPROCESSORS_CONF 83
#define _SC_NPROCESSORS_ONLN 84
#define _SC_PHYS_PAGES 85
#define _SC_AVPHYS_PAGES 86
#define _SC_ATEXIT_MAX 87
#define _SC_PASS_MAX 88
#define _SC_XOPEN_VERSION 89
#define _SC_XOPEN_XCU_VERSION 90
#define _SC_XOPEN_UNIX 91
#define _SC_XOPEN_CRYPT 92
#define _SC_XOPEN_ENH_I18N 93
#define _SC_XOPEN_SHM 94
#define _SC_2_CHAR_TERM 95
#define _SC_2_UPE 97
#define _SC_XOPEN_XPG2 98
#define _SC_XOPEN_XPG3 99
#define _SC_XOPEN_XPG4 100
#define _SC_NZERO 109
#define _SC_XBS5_ILP32_OFF32 125
#define _SC_XBS5_ILP32_OFFBIG 126
#define _SC_XBS5_LP64_OFF64 127
#define _SC_XBS5_LPBIG_OFFBIG 128
#define _SC_XOPEN_LEGACY 129
#define _SC_XOPEN_REALTIME 130
#define _SC_XOPEN_REALTIME_THREADS 131
#define _SC_ADVISORY_INFO 132
#define _SC_BARRIERS 133
#define _SC_CLOCK_SELECTION 137
#define _SC_CPUTIME 138
#define _SC_THREAD_CPUTIME 139
#define _SC_MONOTONIC_CLOCK 149
#define _SC_READER_WRITER_LOCKS 153
#define _SC_SPIN_LOCKS 154
#define _SC_REGEXP 155
#define _SC_SHELL 157
#define _SC_SPAWN 159
#define _SC_SPORADIC_SERVER 160
#define _SC_THREAD_SPORADIC_SERVER 161
#define _SC_TIMEOUTS 164
#define _SC_TYPED_MEMORY_OBJECTS 165
#define _SC_2_PBS 168
#define _SC_2_PBS_ACCOUNTING 169
#define _SC_2_PBS_LOCATE 170
#define _SC_2_PBS_MESSAGE 171
#define _SC_2_PBS_TRACK 172
#define _SC_SYMLOOP_MAX 173
#define _SC_STREAMS 174
#define _SC_2_PBS_CHECKPOINT 175
#define _SC_V6_ILP32_OFF32 176
#define _SC_V6_ILP32_OFFBIG 177
#define _SC_V6_LP64_OFF64 178
#define _SC_V6_LPBIG_OFFBIG 179
#define _SC_HOST_NAME_MAX 180
#define _SC_TRACE 181
#define _SC_TRACE_EVENT_FILTER 182
#define _SC_TRACE_INHERIT 183
#define _SC_TRACE_LOG 184

#define _SC_IPV6 235
#define _SC_RAW_SOCKETS 236
#define _SC_V7_ILP32_OFF32 237
#define _SC_V7_ILP32_OFFBIG 238
#define _SC_V7_LP64_OFF64 239
#define _SC_V7_LPBIG_OFFBIG 240
#define _SC_SS_REPL_MAX 241
#define _SC_TRACE_EVENT_NAME_MAX 242
#define _SC_TRACE_NAME_MAX 243
#define _SC_TRACE_SYS_MAX 244
#define _SC_TRACE_USER_EVENT_MAX 245
#define _SC_XOPEN_STREAMS 246
#define _SC_THREAD_ROBUST_PRIO_INHERIT 247
#define _SC_THREAD_ROBUST_PRIO_PROTECT 248

#define _CS_PATH 0
#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 1
#define _CS_GNU_LIBC_VERSION 2
#define _CS_GNU_LIBPTHREAD_VERSION 3
#define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS 4
#define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS 5

#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 1116
#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 1117
#define _CS_POSIX_V6_ILP32_OFF32_LIBS 1118
#define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS 1119
#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 1120
#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 1121
#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 1122
#define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS 1123
#define _CS_POSIX_V6_LP64_OFF64_CFLAGS 1124
#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 1125
#define _CS_POSIX_V6_LP64_OFF64_LIBS 1126
#define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS 1127
#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 1128
#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 1129
#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 1130
#define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS 1131
#define _CS_POSIX_V7_ILP32_OFF32_CFLAGS 1132
#define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 1133
#define _CS_POSIX_V7_ILP32_OFF32_LIBS 1134
#define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS 1135
#define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS 1136
#define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS 1137
#define _CS_POSIX_V7_ILP32_OFFBIG_LIBS 1138
#define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS 1139
#define _CS_POSIX_V7_LP64_OFF64_CFLAGS 1140
#define _CS_POSIX_V7_LP64_OFF64_LDFLAGS 1141
#define _CS_POSIX_V7_LP64_OFF64_LIBS 1142
#define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS 1143
#define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS 1144
#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 1145
#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 1146
#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS 1147

#ifdef __cplusplus
}
#endif
# 437 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4

#endif  // SYSROOT_UNISTD_H_
# 439 "gen/zircon/public/sysroot/cpp/include/unistd.h" 3 4
#endif /* unistd.h expanded by -frewrite-includes */
# 374 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" 2
#endif  // GTEST_OS_WINDOWS
# 375 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_LINUX_ANDROID
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 377 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Used to define __ANDROID_API__ matching the target NDK API level.
#if 0 /* expanded by -frewrite-includes */
#include <android/api-level.h>  // NOLINT
#endif /* expanded by -frewrite-includes */
# 378 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 379 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif
# 380 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Defines this to true if and only if Google Test can use POSIX regular
// expressions.
#ifndef GTEST_HAS_POSIX_RE
#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_LINUX_ANDROID
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 385 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// On Android, <regex.h> is only available starting with Gingerbread.
#define GTEST_HAS_POSIX_RE (__ANDROID_API__ >= 9)
#else
# 388 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_POSIX_RE \
  !(GTEST_OS_WINDOWS || GTEST_OS_XTENSA || GTEST_OS_QURT)
#endif
# 391 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif
# 392 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Select the regular expression implementation.
#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_ABSL
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 395 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// When using Abseil, RE2 is required.
#if 0 /* expanded by -frewrite-includes */
#include "absl/strings/string_view.h"
#endif /* expanded by -frewrite-includes */
# 396 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 397 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* expanded by -frewrite-includes */
#include "re2/re2.h"
#endif /* expanded by -frewrite-includes */
# 397 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 398 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_USES_RE2 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif GTEST_HAS_POSIX_RE
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 400 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* regex.h expanded by -frewrite-includes */
#include <regex.h>  // NOLINT
#else /* regex.h expanded by -frewrite-includes */
# 400 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 1 "gen/zircon/public/sysroot/cpp/include/regex.h" 1 3 4
#ifndef SYSROOT_REGEX_H_
#define SYSROOT_REGEX_H_

#ifdef __cplusplus
extern "C" {
#endif
# 7 "gen/zircon/public/sysroot/cpp/include/regex.h" 3 4

#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/regex.h" 3 4
# 9 "gen/zircon/public/sysroot/cpp/include/regex.h" 3 4

#define __NEED_regoff_t
#define __NEED_size_t

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* alltypes.h expanded by -frewrite-includes */
#include <bits/alltypes.h>
#else /* alltypes.h expanded by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/regex.h" 3 4
# 1 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 1 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__cplusplus) && !defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) t
#else
# 4 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#define __C11_ATOMIC(t) _Atomic(t)
#endif
# 6 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 8 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT8_TYPE__ uint8_t;
#define __DEFINED_uint8_t
#endif
# 11 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT16_TYPE__ uint16_t;
#define __DEFINED_uint16_t
#endif
# 16 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT32_TYPE__ uint32_t;
#define __DEFINED_uint32_t
#endif
# 21 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT64_TYPE__ uint64_t;
#define __DEFINED_uint64_t
#endif
# 26 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT8_TYPE__ int8_t;
#define __DEFINED_int8_t
#endif
# 31 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 33 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT16_TYPE__ int16_t;
#define __DEFINED_int16_t
#endif
# 36 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 38 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT32_TYPE__ int32_t;
#define __DEFINED_int32_t
#endif
# 41 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 43 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT64_TYPE__ int64_t;
#define __DEFINED_int64_t
#endif
# 46 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least8_t) && !defined(__DEFINED_uint_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 48 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
#define __DEFINED_uint_least8_t
#endif
# 51 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least16_t) && !defined(__DEFINED_uint_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 53 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
#define __DEFINED_uint_least16_t
#endif
# 56 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least32_t) && !defined(__DEFINED_uint_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 58 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
#define __DEFINED_uint_least32_t
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_least64_t) && !defined(__DEFINED_uint_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 63 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_LEAST64_TYPE__ uint_least64_t;
#define __DEFINED_uint_least64_t
#endif
# 66 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least8_t) && !defined(__DEFINED_int_least8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 68 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST8_TYPE__ int_least8_t;
#define __DEFINED_int_least8_t
#endif
# 71 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least16_t) && !defined(__DEFINED_int_least16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 73 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST16_TYPE__ int_least16_t;
#define __DEFINED_int_least16_t
#endif
# 76 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least32_t) && !defined(__DEFINED_int_least32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST32_TYPE__ int_least32_t;
#define __DEFINED_int_least32_t
#endif
# 81 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_least64_t) && !defined(__DEFINED_int_least64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 83 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __DEFINED_int_least64_t
#endif
# 86 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast8_t) && !defined(__DEFINED_uint_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 88 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST8_TYPE__ uint_fast8_t;
#define __DEFINED_uint_fast8_t
#endif
# 91 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast16_t) && !defined(__DEFINED_uint_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 93 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST16_TYPE__ uint_fast16_t;
#define __DEFINED_uint_fast16_t
#endif
# 96 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast32_t) && !defined(__DEFINED_uint_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 98 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
#define __DEFINED_uint_fast32_t
#endif
# 101 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uint_fast64_t) && !defined(__DEFINED_uint_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 103 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINT_FAST64_TYPE__ uint_fast64_t;
#define __DEFINED_uint_fast64_t
#endif
# 106 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast8_t) && !defined(__DEFINED_int_fast8_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST8_TYPE__ int_fast8_t;
#define __DEFINED_int_fast8_t
#endif
# 111 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast16_t) && !defined(__DEFINED_int_fast16_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 113 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST16_TYPE__ int_fast16_t;
#define __DEFINED_int_fast16_t
#endif
# 116 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast32_t) && !defined(__DEFINED_int_fast32_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 118 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST32_TYPE__ int_fast32_t;
#define __DEFINED_int_fast32_t
#endif
# 121 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_int_fast64_t) && !defined(__DEFINED_int_fast64_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 123 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INT_FAST64_TYPE__ int_fast64_t;
#define __DEFINED_int_fast64_t
#endif
# 126 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 128 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTPTR_TYPE__ intptr_t;
#define __DEFINED_intptr_t
#endif
# 131 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 133 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTPTR_TYPE__ uintptr_t;
#define __DEFINED_uintptr_t
#endif
# 136 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 138 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __INTMAX_TYPE__ intmax_t;
#define __DEFINED_intmax_t
#endif
# 141 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 143 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __UINTMAX_TYPE__ uintmax_t;
#define __DEFINED_uintmax_t
#endif
# 146 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifndef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 149 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#define __DEFINED_wchar_t
#endif
# 152 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif
# 153 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 155 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned wint_t;
#define __DEFINED_wint_t
#endif
# 158 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 160 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long wctype_t;
#define __DEFINED_wctype_t
#endif
# 163 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 165 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __SIZE_TYPE__ size_t;
#define __DEFINED_size_t
#endif
# 168 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 170 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define __DEFINED_ptrdiff_t
#endif
# 173 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 175 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;
#define __DEFINED_va_list
#endif
# 178 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 180 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __builtin_va_list __isoc_va_list;
#define __DEFINED___isoc_va_list
#endif
# 183 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 185 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long ssize_t;
#define __DEFINED_ssize_t
#endif
# 188 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 190 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long time_t;
#define __DEFINED_time_t
#endif
# 193 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 195 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  long long __ll;
  long double __ld;
} max_align_t;
#define __DEFINED_max_align_t
#endif
# 201 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__x86_64__) && defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 203 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 204 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double float_t;
#define __DEFINED_float_t
#endif
# 207 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 209 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long double double_t;
#define __DEFINED_double_t
#endif
# 212 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 214 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 215 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef float float_t;
#define __DEFINED_float_t
#endif
# 218 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 220 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef double double_t;
#define __DEFINED_double_t
#endif
# 223 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 225 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 227 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long suseconds_t;
#define __DEFINED_suseconds_t
#endif
# 230 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 232 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned useconds_t;
#define __DEFINED_useconds_t
#endif
# 235 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 237 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int clockid_t;
#define __DEFINED_clockid_t
#endif
# 240 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 242 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long clock_t;
#define __DEFINED_clock_t
#endif
# 245 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 247 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int pid_t;
#define __DEFINED_pid_t
#endif
# 250 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 252 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned id_t;
#define __DEFINED_id_t
#endif
# 255 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 257 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;
#define __DEFINED_uid_t
#endif
# 260 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 262 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned gid_t;
#define __DEFINED_gid_t
#endif
# 265 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 267 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long register_t;
#define __DEFINED_register_t
#endif
# 270 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 272 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long nlink_t;
#define __DEFINED_nlink_t
#endif
# 275 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 277 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long off_t;
#define __DEFINED_off_t
#endif
# 280 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 282 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long ino_t;
#define __DEFINED_ino_t
#endif
# 285 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 287 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long dev_t;
#define __DEFINED_dev_t
#endif
# 290 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 292 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long blksize_t;
#define __DEFINED_blksize_t
#endif
# 295 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 297 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long long blkcnt_t;
#define __DEFINED_blkcnt_t
#endif
# 300 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsblkcnt_t;
#define __DEFINED_fsblkcnt_t
#endif
# 305 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 307 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long long fsfilcnt_t;
#define __DEFINED_fsfilcnt_t
#endif
# 310 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 312 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct iovec {
  void* iov_base;
  size_t iov_len;
};
#define __DEFINED_struct_iovec
#endif
# 318 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 320 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timeval {
  time_t tv_sec;
  suseconds_t tv_usec;
};
#define __DEFINED_struct_timeval
#endif
# 326 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 328 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
struct timespec {
  time_t tv_sec;
  long tv_nsec;
};
#define __DEFINED_struct_timespec
#endif
# 334 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 336 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef int key_t;
#define __DEFINED_key_t
#endif
# 339 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 341 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef void* timer_t;
#define __DEFINED_timer_t
#endif
# 344 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 346 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef long regoff_t;
#define __DEFINED_regoff_t
#endif
# 349 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 351 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned socklen_t;
#define __DEFINED_socklen_t
#endif
# 354 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 356 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned short sa_family_t;
#define __DEFINED_sa_family_t
#endif
# 359 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 361 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
#define __DEFINED_FILE
#endif
# 364 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 366 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __locale_struct* locale_t;
#define __DEFINED_locale_t
#endif
# 369 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 371 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;
#define __DEFINED_mode_t
#endif
# 374 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 376 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __sigset_t {
  unsigned long __bits[128 / sizeof(long)];
} sigset_t;
#define __DEFINED_sigset_t
#endif
# 381 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 383 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_once_t;
#define __DEFINED_pthread_once_t
#endif
# 386 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_once_flag) && !defined(__DEFINED_once_flag)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 388 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) once_flag;
#define __DEFINED_once_flag
#endif
# 391 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 393 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned pthread_key_t;
#define __DEFINED_pthread_key_t
#endif
# 396 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 398 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef __C11_ATOMIC(int) pthread_spinlock_t;
#define __DEFINED_pthread_spinlock_t
#endif
# 401 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 403 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_mutexattr_t;
#define __DEFINED_pthread_mutexattr_t
#endif
# 408 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 410 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_condattr_t;
#define __DEFINED_pthread_condattr_t
#endif
# 415 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 417 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr;
} pthread_barrierattr_t;
#define __DEFINED_pthread_barrierattr_t
#endif
# 422 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 424 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned __attr[2];
} pthread_rwlockattr_t;
#define __DEFINED_pthread_rwlockattr_t
#endif
# 429 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#ifdef __cplusplus
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 432 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef unsigned long pthread_t;
#define __DEFINED_pthread_t
#endif
# 435 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#else
# 437 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 438 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __pthread* pthread_t;
#define __DEFINED_pthread_t
#endif
# 441 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#endif
# 443 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 445 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct __mbstate_t {
  unsigned __opaque1, __opaque2;
} mbstate_t;
#define __DEFINED_mbstate_t
#endif
# 450 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 452 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  const char* __name;
  int __c11;
  size_t _a_stacksize;
  size_t _a_guardsize;
  void* _a_stackaddr;
  int _a_detach;
  int _a_sched;
  int _a_policy;
  int _a_prio;
} pthread_attr_t;
#define __DEFINED_pthread_attr_t
#endif
# 465 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 467 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  unsigned _m_attr;
  __C11_ATOMIC(int)
  _m_lock;
  __C11_ATOMIC(int)
  _m_waiters;
  int _m_count;
} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
# 477 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 479 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 481 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
    __attribute__((__capability__("mutex")))
#endif
# 483 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
{
  int __i[1];
} mtx_t;
#define __DEFINED_mtx_t
#endif
# 488 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 490 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int)
  _c_lock;
} pthread_cond_t;
#define __DEFINED_pthread_cond_t
#endif
# 499 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 501 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  void* _c_head;
  int _c_clock;
  void* _c_tail;
  __C11_ATOMIC(int) _c_lock;
} cnd_t;
#define __DEFINED_cnd_t
#endif
# 509 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 511 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _rw_lock;
  __C11_ATOMIC(int)
  _rw_waiters;
} pthread_rwlock_t;
#define __DEFINED_pthread_rwlock_t
#endif
# 519 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 521 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _b_lock;
  __C11_ATOMIC(int)
  _b_waiters;
  unsigned int _b_limit;
  __C11_ATOMIC(int)
  _b_count;
  __C11_ATOMIC(int)
  _b_waiters2;
  void* _b_inst;
} pthread_barrier_t;
#define __DEFINED_pthread_barrier_t
#endif
# 535 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if defined(__NEED_sem_t) && !defined(__DEFINED_sem_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 537 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
typedef struct {
  __C11_ATOMIC(int)
  _s_value;
  __C11_ATOMIC(int)
  _s_waiters;
} sem_t;
#define __DEFINED_sem_t
#endif
# 545 "gen/zircon/public/sysroot/cpp/include/bits/alltypes.h" 3 4
#endif /* alltypes.h expanded by -frewrite-includes */
# 14 "gen/zircon/public/sysroot/cpp/include/regex.h" 2 3 4

typedef struct re_pattern_buffer {
  size_t re_nsub;
  void *__opaque, *__padding[4];
  size_t __nsub2;
  char __padding2;
} regex_t;

typedef struct {
  regoff_t rm_so;
  regoff_t rm_eo;
} regmatch_t;

#define REG_EXTENDED 1
#define REG_ICASE 2
#define REG_NEWLINE 4
#define REG_NOSUB 8

#define REG_NOTBOL 1
#define REG_NOTEOL 2

#define REG_OK 0
#define REG_NOMATCH 1
#define REG_BADPAT 2
#define REG_ECOLLATE 3
#define REG_ECTYPE 4
#define REG_EESCAPE 5
#define REG_ESUBREG 6
#define REG_EBRACK 7
#define REG_EPAREN 8
#define REG_EBRACE 9
#define REG_BADBR 10
#define REG_ERANGE 11
#define REG_ESPACE 12
#define REG_BADRPT 13

#define REG_ENOSYS -1

int regcomp(regex_t* __restrict, const char* __restrict, int);
int regexec(const regex_t* __restrict, const char* __restrict, size_t, regmatch_t* __restrict, int);
void regfree(regex_t*);

size_t regerror(int, const regex_t* __restrict, char* __restrict, size_t);

#ifdef __cplusplus
}
#endif
# 61 "gen/zircon/public/sysroot/cpp/include/regex.h" 3 4

#endif  // SYSROOT_REGEX_H_
# 63 "gen/zircon/public/sysroot/cpp/include/regex.h" 3 4
#endif /* regex.h expanded by -frewrite-includes */
# 401 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" 2
#define GTEST_USES_POSIX_RE 1
#else
# 403 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Use our own simple regex implementation.
#define GTEST_USES_SIMPLE_RE 1
#endif
# 406 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#ifndef GTEST_HAS_EXCEPTIONS
// The user didn't tell us whether exceptions are enabled, so we need
// to figure it out.
#if 0 /* disabled by -frewrite-includes */
#if defined(_MSC_VER) && defined(_CPPUNWIND)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 411 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// MSVC defines _CPPUNWIND to 1 if and only if exceptions are enabled.
#define GTEST_HAS_EXCEPTIONS 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__BORLANDC__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 414 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// C++Builder's implementation of the STL uses the _HAS_EXCEPTIONS
// macro to enable exceptions, so we'll do the same.
// Assumes that exceptions are enabled by default.
#ifndef _HAS_EXCEPTIONS
#define _HAS_EXCEPTIONS 1
#endif  // _HAS_EXCEPTIONS
# 420 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 422 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// clang defines __EXCEPTIONS if and only if exceptions are enabled before clang
// 220714, but if and only if cleanups are enabled after that. In Obj-C++ files,
// there can be cleanups for ObjC exceptions which also need cleanups, even if
// C++ exceptions are disabled. clang has __has_feature(cxx_exceptions) which
// checks for C++ exceptions starting at clang r206352, but which checked for
// cleanups prior to that. To reliably check for C++ exception availability with
// clang, check for
// __EXCEPTIONS && __has_feature(cxx_exceptions).
#define GTEST_HAS_EXCEPTIONS (__EXCEPTIONS && __has_feature(cxx_exceptions))
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__GNUC__) && __EXCEPTIONS
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 432 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// gcc defines __EXCEPTIONS to 1 if and only if exceptions are enabled.
#define GTEST_HAS_EXCEPTIONS 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__SUNPRO_CC)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 435 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Sun Pro CC supports exceptions.  However, there is no compile-time way of
// detecting whether they are enabled or not.  Therefore, we assume that
// they are enabled unless the user tells us otherwise.
#define GTEST_HAS_EXCEPTIONS 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__IBMCPP__) && __EXCEPTIONS
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 440 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// xlC defines __EXCEPTIONS to 1 if and only if exceptions are enabled.
#define GTEST_HAS_EXCEPTIONS 1
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__HP_aCC)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 443 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Exception handling is in effect by default in HP aCC compiler. It has to
// be turned of by +noeh compiler option if desired.
#define GTEST_HAS_EXCEPTIONS 1
#else
# 447 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// For other compilers, we assume exceptions are disabled to be
// conservative.
#define GTEST_HAS_EXCEPTIONS 0
#endif  // defined(_MSC_VER) || defined(__BORLANDC__)
# 451 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif  // GTEST_HAS_EXCEPTIONS
# 452 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#ifndef GTEST_HAS_STD_WSTRING
// The user didn't tell us whether ::std::wstring is available, so we need
// to figure it out.
// Cygwin 1.7 and below doesn't support ::std::wstring.
// Solaris' libc++ doesn't support it either.  Android has
// no support for it at least as recent as Froyo (2.2).
#define GTEST_HAS_STD_WSTRING                                         \
  (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
     GTEST_OS_HAIKU || GTEST_OS_ESP32 || GTEST_OS_ESP8266 ||          \
     GTEST_OS_XTENSA || GTEST_OS_QURT))

#endif  // GTEST_HAS_STD_WSTRING
# 465 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Determines whether RTTI is available.
#ifndef GTEST_HAS_RTTI
// The user didn't tell us whether RTTI is enabled, so we need to
// figure it out.

#ifdef _MSC_VER

#ifdef _CPPRTTI  // MSVC defines this macro if and only if RTTI is enabled.
#define GTEST_HAS_RTTI 1
#else
# 476 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_RTTI 0
#endif
# 478 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Starting with version 4.3.2, gcc defines __GXX_RTTI if and only if RTTI is
// enabled.
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__GNUC__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 482 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#ifdef __GXX_RTTI
// When building against STLport with the Android NDK and with
// -frtti -fno-exceptions, the build fails at link time with undefined
// references to __cxa_bad_typeid. Note sure if STL or toolchain bug,
// so disable RTTI when detected.
#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) && !defined(__EXCEPTIONS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 489 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_RTTI 0
#else
# 491 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_RTTI 1
#endif  // GTEST_OS_LINUX_ANDROID && __STLPORT_MAJOR && !__EXCEPTIONS
# 493 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#else
# 494 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_RTTI 0
#endif  // __GXX_RTTI
# 496 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Clang defines __GXX_RTTI starting with version 3.0, but its manual recommends
// using has_feature instead. has_feature(cxx_rtti) is supported since 2.7, the
// first version with C++ support.
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 501 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#define GTEST_HAS_RTTI __has_feature(cxx_rtti)

// Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if
// both the typeid and dynamic_cast features are present.
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__IBMCPP__) && (__IBMCPP__ >= 900)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 507 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#ifdef __RTTI_ALL__
#define GTEST_HAS_RTTI 1
#else
# 511 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_RTTI 0
#endif
# 513 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#else
# 515 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// For all other compilers, we assume RTTI is enabled.
#define GTEST_HAS_RTTI 1

#endif  // _MSC_VER
# 520 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#endif  // GTEST_HAS_RTTI
# 522 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// It's this header's responsibility to #include <typeinfo> when RTTI
// is enabled.
#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_RTTI
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 526 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* expanded by -frewrite-includes */
#include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 526 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 527 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif
# 528 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Determines whether Google Test can use the pthreads library.
#ifndef GTEST_HAS_PTHREAD
// The user didn't tell us explicitly, so we make reasonable assumptions about
// which platforms have pthreads support.
//
// To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0
// to your compiler flags.
#define GTEST_HAS_PTHREAD                                                      \
  (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX || GTEST_OS_QNX ||          \
   GTEST_OS_FREEBSD || GTEST_OS_NACL || GTEST_OS_NETBSD || GTEST_OS_FUCHSIA || \
   GTEST_OS_DRAGONFLY || GTEST_OS_GNU_KFREEBSD || GTEST_OS_OPENBSD ||          \
   GTEST_OS_HAIKU || GTEST_OS_GNU_HURD)
#endif  // GTEST_HAS_PTHREAD
# 542 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_PTHREAD
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 544 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// gtest-port.h guarantees to #include <pthread.h> when GTEST_HAS_PTHREAD is
// true.
#if 0 /* expanded by -frewrite-includes */
#include <pthread.h>  // NOLINT
#endif /* expanded by -frewrite-includes */
# 546 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 547 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// For timespec and nanosleep, used below.
#if 0 /* expanded by -frewrite-includes */
#include <time.h>  // NOLINT
#endif /* expanded by -frewrite-includes */
# 549 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 550 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif
# 551 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Determines whether clone(2) is supported.
// Usually it will only be available on Linux, excluding
// Linux on the Itanium architecture.
// Also see http://linux.die.net/man/2/clone.
#ifndef GTEST_HAS_CLONE
// The user didn't tell us, so we need to figure it out.

#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_LINUX && !defined(__ia64__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 560 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_LINUX_ANDROID
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 561 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// On Android, clone() became available at different API levels for each 32-bit
// architecture.
#if 0 /* disabled by -frewrite-includes */
#if defined(__LP64__) || (defined(__arm__) && __ANDROID_API__ >= 9) || \
    (defined(__mips__) && __ANDROID_API__ >= 12) ||                    \
    (defined(__i386__) && __ANDROID_API__ >= 17)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 566 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_CLONE 1
#else
# 568 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_CLONE 0
#endif
# 570 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#else
# 571 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_CLONE 1
#endif
# 573 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#else
# 574 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_CLONE 0
#endif  // GTEST_OS_LINUX && !defined(__ia64__)
# 576 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#endif  // GTEST_HAS_CLONE
# 578 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Determines whether to support stream redirection. This is used to test
// output correctness and to implement death tests.
#ifndef GTEST_HAS_STREAM_REDIRECTION
// By default, we assume that stream redirection is supported on all
// platforms except known mobile / embedded ones.
#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE ||          \
    GTEST_OS_WINDOWS_RT || GTEST_OS_ESP8266 || GTEST_OS_XTENSA || \
    GTEST_OS_QURT
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 587 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_STREAM_REDIRECTION 0
#else
# 589 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_STREAM_REDIRECTION 1
#endif  // !GTEST_OS_WINDOWS_MOBILE
# 591 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif  // GTEST_HAS_STREAM_REDIRECTION
# 592 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Determines whether to support death tests.
// pops up a dialog window that cannot be suppressed programmatically.
#if 0 /* disabled by -frewrite-includes */
#if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS ||             \
     (GTEST_OS_MAC && !GTEST_OS_IOS) ||                                   \
     (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER) || GTEST_OS_WINDOWS_MINGW ||  \
     GTEST_OS_AIX || GTEST_OS_HPUX || GTEST_OS_OPENBSD || GTEST_OS_QNX || \
     GTEST_OS_FREEBSD || GTEST_OS_NETBSD || GTEST_OS_FUCHSIA ||           \
     GTEST_OS_DRAGONFLY || GTEST_OS_GNU_KFREEBSD || GTEST_OS_HAIKU ||     \
     GTEST_OS_GNU_HURD)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 602 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_DEATH_TEST 1
#endif
# 604 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Determines whether to support type-driven tests.

// Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
// Sun Pro CC, IBM Visual Age, and HP aCC support.
#if 0 /* disabled by -frewrite-includes */
#if defined(__GNUC__) || defined(_MSC_VER) || defined(__SUNPRO_CC) || \
    defined(__IBMCPP__) || defined(__HP_aCC)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 611 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_TYPED_TEST 1
#define GTEST_HAS_TYPED_TEST_P 1
#endif
# 614 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Determines whether the system compiler uses UTF-16 for encoding wide strings.
#define GTEST_WIDE_STRING_USES_UTF16_ \
  (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_AIX || GTEST_OS_OS2)

// Determines whether test results can be streamed to a socket.
#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_LINUX || GTEST_OS_GNU_KFREEBSD || GTEST_OS_DRAGONFLY || \
    GTEST_OS_FREEBSD || GTEST_OS_NETBSD || GTEST_OS_OPENBSD ||       \
    GTEST_OS_GNU_HURD
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 623 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_CAN_STREAM_RESULTS_ 1
#endif
# 625 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Defines some utility macros.

// The GNU compiler emits a warning if nested "if" statements are followed by
// an "else" statement and braces are not used to explicitly disambiguate the
// "else" binding.  This leads to problems with code like:
//
//   if (gate)
//     ASSERT_*(condition) << "Some message";
//
// The "switch (0) case 0:" idiom is used to suppress this.
#ifdef __INTEL_COMPILER
#define GTEST_AMBIGUOUS_ELSE_BLOCKER_
#else
# 639 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
  switch (0)                          \
  case 0:                             \
  default:  // NOLINT
#endif
# 644 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Use this annotation at the end of a struct/class definition to
// prevent the compiler from optimizing away instances that are never
// used.  This is useful when all interesting logic happens inside the
// c'tor and / or d'tor.  Example:
//
//   struct Foo {
//     Foo() { ... }
//   } GTEST_ATTRIBUTE_UNUSED_;
//
// Also use it after a variable or parameter declaration to tell the
// compiler the variable/parameter does not have to be used.
#if 0 /* disabled by -frewrite-includes */
#if defined(__GNUC__) && !defined(COMPILER_ICC)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 657 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_UNUSED_ __attribute__((unused))
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 659 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* disabled by -frewrite-includes */
#if __has_attribute(unused)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 660 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_UNUSED_ __attribute__((unused))
#endif
# 662 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif
# 663 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#ifndef GTEST_ATTRIBUTE_UNUSED_
#define GTEST_ATTRIBUTE_UNUSED_
#endif
# 666 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Use this annotation before a function that takes a printf format string.
#if 0 /* disabled by -frewrite-includes */
#if (defined(__GNUC__) || defined(__clang__)) && !defined(COMPILER_ICC)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 669 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* disabled by -frewrite-includes */
#if defined(__MINGW_PRINTF_FORMAT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 670 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// MinGW has two different printf implementations. Ensure the format macro
// matches the selected implementation. See
// https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/.
#define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) \
  __attribute__((                                             \
      __format__(__MINGW_PRINTF_FORMAT, string_index, first_to_check)))
#else
# 677 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) \
  __attribute__((__format__(__printf__, string_index, first_to_check)))
#endif
# 680 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#else
# 681 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check)
#endif
# 683 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Tell the compiler to warn about unused return values for functions declared
// with this macro.  The macro should be used on function declarations
// following the argument list:
//
//   Sprocket* AllocateSprocket() GTEST_MUST_USE_RESULT_;
#if 0 /* disabled by -frewrite-includes */
#if defined(__GNUC__) && !defined(COMPILER_ICC)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 690 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_MUST_USE_RESULT_ __attribute__((warn_unused_result))
#else
# 692 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_MUST_USE_RESULT_
#endif  // __GNUC__ && !COMPILER_ICC
# 694 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// MS C++ compiler emits warning when a conditional expression is compile time
// constant. In some contexts this warning is false positive and needs to be
// suppressed. Use the following two macros in such cases:
//
// GTEST_INTENTIONAL_CONST_COND_PUSH_()
// while (true) {
// GTEST_INTENTIONAL_CONST_COND_POP_()
// }
#define GTEST_INTENTIONAL_CONST_COND_PUSH_() \
  GTEST_DISABLE_MSC_WARNINGS_PUSH_(4127)
#define GTEST_INTENTIONAL_CONST_COND_POP_() GTEST_DISABLE_MSC_WARNINGS_POP_()

// Determine whether the compiler supports Microsoft's Structured Exception
// Handling.  This is supported by several Windows compilers but generally
// does not exist on any other system.
#ifndef GTEST_HAS_SEH
// The user didn't tell us, so we need to figure it out.

#if 0 /* disabled by -frewrite-includes */
#if defined(_MSC_VER) || defined(__BORLANDC__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 714 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// These two compilers are known to support SEH.
#define GTEST_HAS_SEH 1
#else
# 717 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Assume no SEH.
#define GTEST_HAS_SEH 0
#endif
# 720 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#endif  // GTEST_HAS_SEH
# 722 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#ifndef GTEST_IS_THREADSAFE

#define GTEST_IS_THREADSAFE                                                 \
  (GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ ||                                     \
   (GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT) || \
   GTEST_HAS_PTHREAD)

#endif  // GTEST_IS_THREADSAFE
# 731 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_IS_THREADSAFE
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 733 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Some platforms don't support including these threading related headers.
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* condition_variable expanded by -frewrite-includes */
#include <condition_variable>  // NOLINT
#else /* condition_variable expanded by -frewrite-includes */
# 734 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CONDITION_VARIABLE
#define _LIBCPP_CONDITION_VARIABLE

/*
    condition_variable synopsis

namespace std
{

enum class cv_status { no_timeout, timeout };

class condition_variable
{
public:
    condition_variable();
    ~condition_variable();

    condition_variable(const condition_variable&) = delete;
    condition_variable& operator=(const condition_variable&) = delete;

    void notify_one() noexcept;
    void notify_all() noexcept;

    void wait(unique_lock<mutex>& lock);
    template <class Predicate>
        void wait(unique_lock<mutex>& lock, Predicate pred);

    template <class Clock, class Duration>
        cv_status
        wait_until(unique_lock<mutex>& lock,
                   const chrono::time_point<Clock, Duration>& abs_time);

    template <class Clock, class Duration, class Predicate>
        bool
        wait_until(unique_lock<mutex>& lock,
                   const chrono::time_point<Clock, Duration>& abs_time,
                   Predicate pred);

    template <class Rep, class Period>
        cv_status
        wait_for(unique_lock<mutex>& lock,
                 const chrono::duration<Rep, Period>& rel_time);

    template <class Rep, class Period, class Predicate>
        bool
        wait_for(unique_lock<mutex>& lock,
                 const chrono::duration<Rep, Period>& rel_time,
                 Predicate pred);

    typedef pthread_cond_t* native_handle_type;
    native_handle_type native_handle();
};

void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);

class condition_variable_any
{
public:
    condition_variable_any();
    ~condition_variable_any();

    condition_variable_any(const condition_variable_any&) = delete;
    condition_variable_any& operator=(const condition_variable_any&) = delete;

    void notify_one() noexcept;
    void notify_all() noexcept;

    template <class Lock>
        void wait(Lock& lock);
    template <class Lock, class Predicate>
        void wait(Lock& lock, Predicate pred);

    template <class Lock, class Clock, class Duration>
        cv_status
        wait_until(Lock& lock,
                   const chrono::time_point<Clock, Duration>& abs_time);

    template <class Lock, class Clock, class Duration, class Predicate>
        bool
        wait_until(Lock& lock,
                   const chrono::time_point<Clock, Duration>& abs_time,
                   Predicate pred);

    template <class Lock, class Rep, class Period>
        cv_status
        wait_for(Lock& lock,
                 const chrono::duration<Rep, Period>& rel_time);

    template <class Lock, class Rep, class Period, class Predicate>
        bool
        wait_for(Lock& lock,
                 const chrono::duration<Rep, Period>& rel_time,
                 Predicate pred);

    // [thread.condvarany.intwait], interruptible waits
    template <class Lock, class Predicate>
      bool wait(Lock& lock, stop_token stoken, Predicate pred);                               // since C++20

    template <class Lock, class Clock, class Duration, class Predicate>
      bool wait_until(Lock& lock, stop_token stoken,
                      const chrono::time_point<Clock, Duration>& abs_time, Predicate pred);   // since C++20

    template <class Lock, class Rep, class Period, class Predicate>
      bool wait_for(Lock& lock, stop_token stoken,
                    const chrono::duration<Rep, Period>& rel_time, Predicate pred);           // since C++20
};

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 121 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 123 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#include <__chrono/duration.h>
#endif /* expanded by -frewrite-includes */
# 123 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#include <__chrono/steady_clock.h>
#endif /* expanded by -frewrite-includes */
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#include <__chrono/time_point.h>
#endif /* expanded by -frewrite-includes */
# 125 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* condition_variable.h expanded by -frewrite-includes */
#include <__condition_variable/condition_variable.h>
#else /* condition_variable.h expanded by -frewrite-includes */
# 126 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CONDITION_VARIABLE_CONDITION_VARIABLE_H
#define _LIBCPP___CONDITION_VARIABLE_CONDITION_VARIABLE_H

#if 0 /* expanded by -frewrite-includes */
#include <__chrono/steady_clock.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__chrono/system_clock.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__chrono/time_point.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* mutex.h expanded by -frewrite-includes */
#include <__mutex/mutex.h>
#else /* mutex.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/mutex.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MUTEX_MUTEX_H
#define _LIBCPP___MUTEX_MUTEX_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/mutex.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/mutex.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__threading_support>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/mutex.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/mutex.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/mutex.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/mutex.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/mutex.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/mutex.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/mutex.h" 3

#ifndef _LIBCPP_HAS_NO_THREADS

_LIBCPP_BEGIN_NAMESPACE_STD

class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex {
  __libcpp_mutex_t __m_ = _LIBCPP_MUTEX_INITIALIZER;

public:
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR mutex() = default;

  mutex(const mutex&)            = delete;
  mutex& operator=(const mutex&) = delete;

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_HAS_TRIVIAL_MUTEX_DESTRUCTION)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/mutex.h" 3
  _LIBCPP_HIDE_FROM_ABI ~mutex() = default;
#  else
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/mutex.h" 3
  ~mutex() _NOEXCEPT;
#  endif
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/mutex.h" 3

  void lock() _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_capability());
  bool try_lock() _NOEXCEPT _LIBCPP_THREAD_SAFETY_ANNOTATION(try_acquire_capability(true));
  void unlock() _NOEXCEPT _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability());

  typedef __libcpp_mutex_t* native_handle_type;
  _LIBCPP_HIDE_FROM_ABI native_handle_type native_handle() { return &__m_; }
};

static_assert(is_nothrow_default_constructible<mutex>::value, "the default constructor for std::mutex must be nothrow");

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_HAS_NO_THREADS
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/mutex.h" 3

#endif // _LIBCPP___MUTEX_MUTEX_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/mutex.h" 3
#endif /* mutex.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* unique_lock.h expanded by -frewrite-includes */
#include <__mutex/unique_lock.h>
#else /* unique_lock.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MUTEX_UNIQUE_LOCK_H
#define _LIBCPP___MUTEX_UNIQUE_LOCK_H

#if 0 /* expanded by -frewrite-includes */
#include <__chrono/duration.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__chrono/time_point.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* tag_types.h expanded by -frewrite-includes */
#include <__mutex/tag_types.h>
#else /* tag_types.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/tag_types.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MUTEX_TAG_TYPES_H
#define _LIBCPP___MUTEX_TAG_TYPES_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/tag_types.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/tag_types.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/tag_types.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/tag_types.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/tag_types.h" 3

#ifndef _LIBCPP_HAS_NO_THREADS

_LIBCPP_BEGIN_NAMESPACE_STD

struct _LIBCPP_EXPORTED_FROM_ABI defer_lock_t {
  explicit defer_lock_t() = default;
};

struct _LIBCPP_EXPORTED_FROM_ABI try_to_lock_t {
  explicit try_to_lock_t() = default;
};

struct _LIBCPP_EXPORTED_FROM_ABI adopt_lock_t {
  explicit adopt_lock_t() = default;
};

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/tag_types.h" 3
inline constexpr defer_lock_t defer_lock   = defer_lock_t();
inline constexpr try_to_lock_t try_to_lock = try_to_lock_t();
inline constexpr adopt_lock_t adopt_lock   = adopt_lock_t();
#if 0 /* disabled by -frewrite-includes */
#if 0
#  elif !defined(_LIBCPP_CXX03_LANG)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/tag_types.h" 3
constexpr defer_lock_t defer_lock   = defer_lock_t();
constexpr try_to_lock_t try_to_lock = try_to_lock_t();
constexpr adopt_lock_t adopt_lock   = adopt_lock_t();
#  endif
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/tag_types.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_HAS_NO_THREADS
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/tag_types.h" 3

#endif // _LIBCPP___MUTEX_TAG_TYPES_H
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/tag_types.h" 3
#endif /* tag_types.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__system_error/system_error.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cerrno>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3

#ifndef _LIBCPP_HAS_NO_THREADS

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Mutex>
class _LIBCPP_TEMPLATE_VIS unique_lock {
public:
  typedef _Mutex mutex_type;

private:
  mutex_type* __m_;
  bool __owns_;

public:
  _LIBCPP_HIDE_FROM_ABI unique_lock() _NOEXCEPT : __m_(nullptr), __owns_(false) {}
  _LIBCPP_HIDE_FROM_ABI explicit unique_lock(mutex_type& __m) : __m_(std::addressof(__m)), __owns_(true) {
    __m_->lock();
  }

  _LIBCPP_HIDE_FROM_ABI unique_lock(mutex_type& __m, defer_lock_t) _NOEXCEPT
      : __m_(std::addressof(__m)),
        __owns_(false) {}

  _LIBCPP_HIDE_FROM_ABI unique_lock(mutex_type& __m, try_to_lock_t)
      : __m_(std::addressof(__m)), __owns_(__m.try_lock()) {}

  _LIBCPP_HIDE_FROM_ABI unique_lock(mutex_type& __m, adopt_lock_t) : __m_(std::addressof(__m)), __owns_(true) {}

  template <class _Clock, class _Duration>
  _LIBCPP_HIDE_FROM_ABI unique_lock(mutex_type& __m, const chrono::time_point<_Clock, _Duration>& __t)
      : __m_(std::addressof(__m)), __owns_(__m.try_lock_until(__t)) {}

  template <class _Rep, class _Period>
  _LIBCPP_HIDE_FROM_ABI unique_lock(mutex_type& __m, const chrono::duration<_Rep, _Period>& __d)
      : __m_(std::addressof(__m)), __owns_(__m.try_lock_for(__d)) {}

  _LIBCPP_HIDE_FROM_ABI ~unique_lock() {
    if (__owns_)
      __m_->unlock();
  }

  unique_lock(unique_lock const&)            = delete;
  unique_lock& operator=(unique_lock const&) = delete;

  _LIBCPP_HIDE_FROM_ABI unique_lock(unique_lock&& __u) _NOEXCEPT : __m_(__u.__m_), __owns_(__u.__owns_) {
    __u.__m_    = nullptr;
    __u.__owns_ = false;
  }

  _LIBCPP_HIDE_FROM_ABI unique_lock& operator=(unique_lock&& __u) _NOEXCEPT {
    if (__owns_)
      __m_->unlock();

    __m_        = __u.__m_;
    __owns_     = __u.__owns_;
    __u.__m_    = nullptr;
    __u.__owns_ = false;
    return *this;
  }

  void lock();
  bool try_lock();

  template <class _Rep, class _Period>
  bool try_lock_for(const chrono::duration<_Rep, _Period>& __d);

  template <class _Clock, class _Duration>
  bool try_lock_until(const chrono::time_point<_Clock, _Duration>& __t);

  void unlock();

  _LIBCPP_HIDE_FROM_ABI void swap(unique_lock& __u) _NOEXCEPT {
    std::swap(__m_, __u.__m_);
    std::swap(__owns_, __u.__owns_);
  }

  _LIBCPP_HIDE_FROM_ABI mutex_type* release() _NOEXCEPT {
    mutex_type* __m = __m_;
    __m_            = nullptr;
    __owns_         = false;
    return __m;
  }

  _LIBCPP_HIDE_FROM_ABI bool owns_lock() const _NOEXCEPT { return __owns_; }
  _LIBCPP_HIDE_FROM_ABI explicit operator bool() const _NOEXCEPT { return __owns_; }
  _LIBCPP_HIDE_FROM_ABI mutex_type* mutex() const _NOEXCEPT { return __m_; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(unique_lock);

template <class _Mutex>
void unique_lock<_Mutex>::lock() {
  if (__m_ == nullptr)
    __throw_system_error(EPERM, "unique_lock::lock: references null mutex");
  if (__owns_)
    __throw_system_error(EDEADLK, "unique_lock::lock: already locked");
  __m_->lock();
  __owns_ = true;
}

template <class _Mutex>
bool unique_lock<_Mutex>::try_lock() {
  if (__m_ == nullptr)
    __throw_system_error(EPERM, "unique_lock::try_lock: references null mutex");
  if (__owns_)
    __throw_system_error(EDEADLK, "unique_lock::try_lock: already locked");
  __owns_ = __m_->try_lock();
  return __owns_;
}

template <class _Mutex>
template <class _Rep, class _Period>
bool unique_lock<_Mutex>::try_lock_for(const chrono::duration<_Rep, _Period>& __d) {
  if (__m_ == nullptr)
    __throw_system_error(EPERM, "unique_lock::try_lock_for: references null mutex");
  if (__owns_)
    __throw_system_error(EDEADLK, "unique_lock::try_lock_for: already locked");
  __owns_ = __m_->try_lock_for(__d);
  return __owns_;
}

template <class _Mutex>
template <class _Clock, class _Duration>
bool unique_lock<_Mutex>::try_lock_until(const chrono::time_point<_Clock, _Duration>& __t) {
  if (__m_ == nullptr)
    __throw_system_error(EPERM, "unique_lock::try_lock_until: references null mutex");
  if (__owns_)
    __throw_system_error(EDEADLK, "unique_lock::try_lock_until: already locked");
  __owns_ = __m_->try_lock_until(__t);
  return __owns_;
}

template <class _Mutex>
void unique_lock<_Mutex>::unlock() {
  if (!__owns_)
    __throw_system_error(EPERM, "unique_lock::unlock: not locked");
  __m_->unlock();
  __owns_ = false;
}

template <class _Mutex>
inline _LIBCPP_HIDE_FROM_ABI void swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) _NOEXCEPT {
  __x.swap(__y);
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_HAS_NO_THREADS
# 172 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3

#endif // _LIBCPP___MUTEX_UNIQUE_LOCK_H
# 174 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/unique_lock.h" 3
#endif /* unique_lock.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__system_error/system_error.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__threading_support>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_floating_point.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <ratio>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#ifndef _LIBCPP_HAS_NO_THREADS

// enum class cv_status
_LIBCPP_DECLARE_STRONG_ENUM(cv_status){no_timeout, timeout};
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(cv_status)

class _LIBCPP_EXPORTED_FROM_ABI condition_variable {
  __libcpp_condvar_t __cv_ = _LIBCPP_CONDVAR_INITIALIZER;

public:
  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR condition_variable() _NOEXCEPT = default;

#  ifdef _LIBCPP_HAS_TRIVIAL_CONDVAR_DESTRUCTION
  ~condition_variable() = default;
#  else
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
  ~condition_variable();
#  endif
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3

  condition_variable(const condition_variable&)            = delete;
  condition_variable& operator=(const condition_variable&) = delete;

  void notify_one() _NOEXCEPT;
  void notify_all() _NOEXCEPT;

  void wait(unique_lock<mutex>& __lk) _NOEXCEPT;
  template <class _Predicate>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS void wait(unique_lock<mutex>& __lk, _Predicate __pred);

  template <class _Clock, class _Duration>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS cv_status
  wait_until(unique_lock<mutex>& __lk, const chrono::time_point<_Clock, _Duration>& __t);

  template <class _Clock, class _Duration, class _Predicate>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS bool
  wait_until(unique_lock<mutex>& __lk, const chrono::time_point<_Clock, _Duration>& __t, _Predicate __pred);

  template <class _Rep, class _Period>
  _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS cv_status
  wait_for(unique_lock<mutex>& __lk, const chrono::duration<_Rep, _Period>& __d);

  template <class _Rep, class _Period, class _Predicate>
  bool _LIBCPP_HIDE_FROM_ABI
  wait_for(unique_lock<mutex>& __lk, const chrono::duration<_Rep, _Period>& __d, _Predicate __pred);

  typedef __libcpp_condvar_t* native_handle_type;
  _LIBCPP_HIDE_FROM_ABI native_handle_type native_handle() { return &__cv_; }

private:
  void
  __do_timed_wait(unique_lock<mutex>& __lk, chrono::time_point<chrono::system_clock, chrono::nanoseconds>) _NOEXCEPT;
#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_HAS_COND_CLOCKWAIT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
  _LIBCPP_HIDE_FROM_ABI void
  __do_timed_wait(unique_lock<mutex>& __lk, chrono::time_point<chrono::steady_clock, chrono::nanoseconds>) _NOEXCEPT;
#  endif
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
  template <class _Clock>
  _LIBCPP_HIDE_FROM_ABI void
  __do_timed_wait(unique_lock<mutex>& __lk, chrono::time_point<_Clock, chrono::nanoseconds>) _NOEXCEPT;
};
#endif // !_LIBCPP_HAS_NO_THREADS
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3

template <class _Rep, class _Period, __enable_if_t<is_floating_point<_Rep>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI chrono::nanoseconds __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) {
  using namespace chrono;
  using __ratio       = ratio_divide<_Period, nano>;
  using __ns_rep      = nanoseconds::rep;
  _Rep __result_float = __d.count() * __ratio::num / __ratio::den;

  _Rep __result_max = numeric_limits<__ns_rep>::max();
  if (__result_float >= __result_max) {
    return nanoseconds::max();
  }

  _Rep __result_min = numeric_limits<__ns_rep>::min();
  if (__result_float <= __result_min) {
    return nanoseconds::min();
  }

  return nanoseconds(static_cast<__ns_rep>(__result_float));
}

template <class _Rep, class _Period, __enable_if_t<!is_floating_point<_Rep>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI chrono::nanoseconds __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) {
  using namespace chrono;
  if (__d.count() == 0) {
    return nanoseconds(0);
  }

  using __ratio         = ratio_divide<_Period, nano>;
  using __ns_rep        = nanoseconds::rep;
  __ns_rep __result_max = numeric_limits<__ns_rep>::max();
  if (__d.count() > 0 && __d.count() > __result_max / __ratio::num) {
    return nanoseconds::max();
  }

  __ns_rep __result_min = numeric_limits<__ns_rep>::min();
  if (__d.count() < 0 && __d.count() < __result_min / __ratio::num) {
    return nanoseconds::min();
  }

  __ns_rep __result = __d.count() * __ratio::num / __ratio::den;
  if (__result == 0) {
    return nanoseconds(1);
  }

  return nanoseconds(__result);
}

#ifndef _LIBCPP_HAS_NO_THREADS
template <class _Predicate>
void condition_variable::wait(unique_lock<mutex>& __lk, _Predicate __pred) {
  while (!__pred())
    wait(__lk);
}

template <class _Clock, class _Duration>
cv_status condition_variable::wait_until(unique_lock<mutex>& __lk, const chrono::time_point<_Clock, _Duration>& __t) {
  using namespace chrono;
  using __clock_tp_ns = time_point<_Clock, nanoseconds>;

  typename _Clock::time_point __now = _Clock::now();
  if (__t <= __now)
    return cv_status::timeout;

  __clock_tp_ns __t_ns = __clock_tp_ns(std::__safe_nanosecond_cast(__t.time_since_epoch()));

  __do_timed_wait(__lk, __t_ns);
  return _Clock::now() < __t ? cv_status::no_timeout : cv_status::timeout;
}

template <class _Clock, class _Duration, class _Predicate>
bool condition_variable::wait_until(
    unique_lock<mutex>& __lk, const chrono::time_point<_Clock, _Duration>& __t, _Predicate __pred) {
  while (!__pred()) {
    if (wait_until(__lk, __t) == cv_status::timeout)
      return __pred();
  }
  return true;
}

template <class _Rep, class _Period>
cv_status condition_variable::wait_for(unique_lock<mutex>& __lk, const chrono::duration<_Rep, _Period>& __d) {
  using namespace chrono;
  if (__d <= __d.zero())
    return cv_status::timeout;
  using __ns_rep                   = nanoseconds::rep;
  steady_clock::time_point __c_now = steady_clock::now();

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_HAS_COND_CLOCKWAIT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 183 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
  using __clock_tp_ns     = time_point<steady_clock, nanoseconds>;
  __ns_rep __now_count_ns = std::__safe_nanosecond_cast(__c_now.time_since_epoch()).count();
#  else
# 186 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
  using __clock_tp_ns     = time_point<system_clock, nanoseconds>;
  __ns_rep __now_count_ns = std::__safe_nanosecond_cast(system_clock::now().time_since_epoch()).count();
#  endif
# 189 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3

  __ns_rep __d_ns_count = std::__safe_nanosecond_cast(__d).count();

  if (__now_count_ns > numeric_limits<__ns_rep>::max() - __d_ns_count) {
    __do_timed_wait(__lk, __clock_tp_ns::max());
  } else {
    __do_timed_wait(__lk, __clock_tp_ns(nanoseconds(__now_count_ns + __d_ns_count)));
  }

  return steady_clock::now() - __c_now < __d ? cv_status::no_timeout : cv_status::timeout;
}

template <class _Rep, class _Period, class _Predicate>
inline bool
condition_variable::wait_for(unique_lock<mutex>& __lk, const chrono::duration<_Rep, _Period>& __d, _Predicate __pred) {
  return wait_until(__lk, chrono::steady_clock::now() + __d, std::move(__pred));
}

#if 0 /* disabled by -frewrite-includes */
#  if defined(_LIBCPP_HAS_COND_CLOCKWAIT)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
inline void condition_variable::__do_timed_wait(
    unique_lock<mutex>& __lk, chrono::time_point<chrono::steady_clock, chrono::nanoseconds> __tp) _NOEXCEPT {
  using namespace chrono;
  if (!__lk.owns_lock())
    __throw_system_error(EPERM, "condition_variable::timed wait: mutex not locked");
  nanoseconds __d = __tp.time_since_epoch();
  timespec __ts;
  seconds __s                 = duration_cast<seconds>(__d);
  using __ts_sec              = decltype(__ts.tv_sec);
  const __ts_sec __ts_sec_max = numeric_limits<__ts_sec>::max();
  if (__s.count() < __ts_sec_max) {
    __ts.tv_sec  = static_cast<__ts_sec>(__s.count());
    __ts.tv_nsec = (__d - __s).count();
  } else {
    __ts.tv_sec  = __ts_sec_max;
    __ts.tv_nsec = giga::num - 1;
  }
  int __ec = pthread_cond_clockwait(&__cv_, __lk.mutex()->native_handle(), CLOCK_MONOTONIC, &__ts);
  if (__ec != 0 && __ec != ETIMEDOUT)
    __throw_system_error(__ec, "condition_variable timed_wait failed");
}
#  endif // _LIBCPP_HAS_COND_CLOCKWAIT
# 230 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3

template <class _Clock>
inline void condition_variable::__do_timed_wait(unique_lock<mutex>& __lk,
                                                chrono::time_point<_Clock, chrono::nanoseconds> __tp) _NOEXCEPT {
  wait_for(__lk, __tp - _Clock::now());
}

#endif // _LIBCPP_HAS_NO_THREADS
# 238 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___CONDITION_VARIABLE_CONDITION_VARIABLE_H
# 244 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__condition_variable/condition_variable.h" 3
#endif /* condition_variable.h expanded by -frewrite-includes */
# 127 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 127 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/shared_ptr.h>
#endif /* expanded by -frewrite-includes */
# 128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/unique_ptr.h>
#endif /* expanded by -frewrite-includes */
# 129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* lock_guard.h expanded by -frewrite-includes */
#include <__mutex/lock_guard.h>
#else /* lock_guard.h expanded by -frewrite-includes */
# 130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/lock_guard.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MUTEX_LOCK_GUARD_H
#define _LIBCPP___MUTEX_LOCK_GUARD_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/lock_guard.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/lock_guard.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__mutex/tag_types.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/lock_guard.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/lock_guard.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/lock_guard.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/lock_guard.h" 3
#endif
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/lock_guard.h" 3

#ifndef _LIBCPP_HAS_NO_THREADS

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Mutex>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable) lock_guard {
public:
  typedef _Mutex mutex_type;

private:
  mutex_type& __m_;

public:
  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI explicit lock_guard(mutex_type& __m)
      _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_capability(__m))
      : __m_(__m) {
    __m_.lock();
  }

  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI lock_guard(mutex_type& __m, adopt_lock_t)
      _LIBCPP_THREAD_SAFETY_ANNOTATION(requires_capability(__m))
      : __m_(__m) {}
  _LIBCPP_HIDE_FROM_ABI ~lock_guard() _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability()) { __m_.unlock(); }

private:
  lock_guard(lock_guard const&)            = delete;
  lock_guard& operator=(lock_guard const&) = delete;
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(lock_guard);

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_HAS_NO_THREADS
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/lock_guard.h" 3

#endif // _LIBCPP___MUTEX_LOCK_GUARD_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__mutex/lock_guard.h" 3
#endif /* lock_guard.h expanded by -frewrite-includes */
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__mutex/mutex.h>
#endif /* expanded by -frewrite-includes */
# 131 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#include <__mutex/tag_types.h>
#endif /* expanded by -frewrite-includes */
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#include <__mutex/unique_lock.h>
#endif /* expanded by -frewrite-includes */
# 133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stop_token.h expanded by -frewrite-includes */
#include <__stop_token/stop_token.h>
#else /* stop_token.h expanded by -frewrite-includes */
# 134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_token.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___STOP_TOKEN_STOP_TOKEN_H
#define _LIBCPP___STOP_TOKEN_STOP_TOKEN_H

#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_token.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_token.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_token.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_token.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* intrusive_shared_ptr.h expanded by -frewrite-includes */
#include <__stop_token/intrusive_shared_ptr.h>
#else /* intrusive_shared_ptr.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_token.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___STOP_TOKEN_INTRUSIVE_SHARED_PTR_H
#define _LIBCPP___STOP_TOKEN_INTRUSIVE_SHARED_PTR_H

#if 0 /* expanded by -frewrite-includes */
#include <__atomic/atomic.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/memory_order.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3

// For intrusive_shared_ptr to work with a type T, specialize __intrusive_shared_ptr_traits<T> and implement
// the following function:
//
// static std::atomic<U>& __get_atomic_ref_count(T&);
//
// where U must be an integral type representing the number of references to the object.
template <class _Tp>
struct __intrusive_shared_ptr_traits;

// A reference counting shared_ptr for types whose reference counter
// is stored inside the class _Tp itself.
// When the reference count goes to zero, the destructor of _Tp will be called
template <class _Tp>
struct __intrusive_shared_ptr {
  _LIBCPP_HIDE_FROM_ABI __intrusive_shared_ptr() = default;

  _LIBCPP_HIDE_FROM_ABI explicit __intrusive_shared_ptr(_Tp* __raw_ptr) : __raw_ptr_(__raw_ptr) {
    if (__raw_ptr_)
      __increment_ref_count(*__raw_ptr_);
  }

  _LIBCPP_HIDE_FROM_ABI __intrusive_shared_ptr(const __intrusive_shared_ptr& __other) noexcept
      : __raw_ptr_(__other.__raw_ptr_) {
    if (__raw_ptr_)
      __increment_ref_count(*__raw_ptr_);
  }

  _LIBCPP_HIDE_FROM_ABI __intrusive_shared_ptr(__intrusive_shared_ptr&& __other) noexcept
      : __raw_ptr_(__other.__raw_ptr_) {
    __other.__raw_ptr_ = nullptr;
  }

  _LIBCPP_HIDE_FROM_ABI __intrusive_shared_ptr& operator=(const __intrusive_shared_ptr& __other) noexcept {
    if (__other.__raw_ptr_ != __raw_ptr_) {
      if (__other.__raw_ptr_) {
        __increment_ref_count(*__other.__raw_ptr_);
      }
      if (__raw_ptr_) {
        __decrement_ref_count(*__raw_ptr_);
      }
      __raw_ptr_ = __other.__raw_ptr_;
    }
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI __intrusive_shared_ptr& operator=(__intrusive_shared_ptr&& __other) noexcept {
    __intrusive_shared_ptr(std::move(__other)).swap(*this);
    return *this;
  }

  _LIBCPP_HIDE_FROM_ABI ~__intrusive_shared_ptr() {
    if (__raw_ptr_) {
      __decrement_ref_count(*__raw_ptr_);
    }
  }

  _LIBCPP_HIDE_FROM_ABI _Tp* operator->() const noexcept { return __raw_ptr_; }
  _LIBCPP_HIDE_FROM_ABI _Tp& operator*() const noexcept { return *__raw_ptr_; }
  _LIBCPP_HIDE_FROM_ABI explicit operator bool() const noexcept { return __raw_ptr_ != nullptr; }

  _LIBCPP_HIDE_FROM_ABI void swap(__intrusive_shared_ptr& __other) { std::swap(__raw_ptr_, __other.__raw_ptr_); }

  _LIBCPP_HIDE_FROM_ABI friend void swap(__intrusive_shared_ptr& __lhs, __intrusive_shared_ptr& __rhs) {
    __lhs.swap(__rhs);
  }

  _LIBCPP_HIDE_FROM_ABI friend bool constexpr
  operator==(const __intrusive_shared_ptr&, const __intrusive_shared_ptr&) = default;

  _LIBCPP_HIDE_FROM_ABI friend bool constexpr operator==(const __intrusive_shared_ptr& __ptr, std::nullptr_t) {
    return __ptr.__raw_ptr_ == nullptr;
  }

private:
  _Tp* __raw_ptr_ = nullptr;

  // the memory order for increment/decrement the counter is the same for shared_ptr
  // increment is relaxed and decrement is acq_rel
  _LIBCPP_HIDE_FROM_ABI static void __increment_ref_count(_Tp& __obj) {
    __get_atomic_ref_count(__obj).fetch_add(1, std::memory_order_relaxed);
  }

  _LIBCPP_HIDE_FROM_ABI static void __decrement_ref_count(_Tp& __obj) {
    if (__get_atomic_ref_count(__obj).fetch_sub(1, std::memory_order_acq_rel) == 1) {
      delete &__obj;
    }
  }

  _LIBCPP_HIDE_FROM_ABI static decltype(auto) __get_atomic_ref_count(_Tp& __obj) {
    using __ret_type = decltype(__intrusive_shared_ptr_traits<_Tp>::__get_atomic_ref_count(__obj));
    static_assert(
        std::is_reference_v<__ret_type>, "__get_atomic_ref_count should return a reference to the atomic counter");
    return __intrusive_shared_ptr_traits<_Tp>::__get_atomic_ref_count(__obj);
  }
};

#endif // _LIBCPP_STD_VER >= 20
# 129 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___STOP_TOKEN_INTRUSIVE_SHARED_PTR_H
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_shared_ptr.h" 3
#endif /* intrusive_shared_ptr.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_token.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stop_state.h expanded by -frewrite-includes */
#include <__stop_token/stop_state.h>
#else /* stop_state.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_token.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___STOP_TOKEN_STOP_STATE_H
#define _LIBCPP___STOP_TOKEN_STOP_STATE_H

#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* atomic_unique_lock.h expanded by -frewrite-includes */
#include <__stop_token/atomic_unique_lock.h>
#else /* atomic_unique_lock.h expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/atomic_unique_lock.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___STOP_TOKEN_ATOMIC_UNIQUE_GUARD_H
#define _LIBCPP___STOP_TOKEN_ATOMIC_UNIQUE_GUARD_H

#if 0 /* expanded by -frewrite-includes */
#include <__bit/popcount.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/atomic_unique_lock.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/atomic_unique_lock.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/atomic_unique_lock.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/atomic_unique_lock.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* atomic expanded by -frewrite-includes */
#include <atomic>
#else /* atomic expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/atomic_unique_lock.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_ATOMIC
#define _LIBCPP_ATOMIC

/*
    atomic synopsis

namespace std
{

// feature test macro [version.syn]

#define __cpp_lib_atomic_is_always_lock_free
#define __cpp_lib_atomic_flag_test
#define __cpp_lib_atomic_lock_free_type_aliases
#define __cpp_lib_atomic_wait

 // order and consistency

 enum memory_order: unspecified // enum class in C++20
 {
    relaxed,
    consume, // load-consume
    acquire, // load-acquire
    release, // store-release
    acq_rel, // store-release load-acquire
    seq_cst // store-release load-acquire
 };

 inline constexpr auto memory_order_relaxed = memory_order::relaxed;
 inline constexpr auto memory_order_consume = memory_order::consume;
 inline constexpr auto memory_order_acquire = memory_order::acquire;
 inline constexpr auto memory_order_release = memory_order::release;
 inline constexpr auto memory_order_acq_rel = memory_order::acq_rel;
 inline constexpr auto memory_order_seq_cst = memory_order::seq_cst;

template <class T> T kill_dependency(T y) noexcept;

// lock-free property

#define ATOMIC_BOOL_LOCK_FREE unspecified
#define ATOMIC_CHAR_LOCK_FREE unspecified
#define ATOMIC_CHAR8_T_LOCK_FREE unspecified // C++20
#define ATOMIC_CHAR16_T_LOCK_FREE unspecified
#define ATOMIC_CHAR32_T_LOCK_FREE unspecified
#define ATOMIC_WCHAR_T_LOCK_FREE unspecified
#define ATOMIC_SHORT_LOCK_FREE unspecified
#define ATOMIC_INT_LOCK_FREE unspecified
#define ATOMIC_LONG_LOCK_FREE unspecified
#define ATOMIC_LLONG_LOCK_FREE unspecified
#define ATOMIC_POINTER_LOCK_FREE unspecified

template <class T>
struct atomic
{
    using value_type = T;

    static constexpr bool is_always_lock_free;
    bool is_lock_free() const volatile noexcept;
    bool is_lock_free() const noexcept;

    atomic() noexcept = default; // until C++20
    constexpr atomic() noexcept(is_nothrow_default_constructible_v<T>); // since C++20
    constexpr atomic(T desr) noexcept;
    atomic(const atomic&) = delete;
    atomic& operator=(const atomic&) = delete;
    atomic& operator=(const atomic&) volatile = delete;

    T load(memory_order m = memory_order_seq_cst) const volatile noexcept;
    T load(memory_order m = memory_order_seq_cst) const noexcept;
    operator T() const volatile noexcept;
    operator T() const noexcept;
    void store(T desr, memory_order m = memory_order_seq_cst) volatile noexcept;
    void store(T desr, memory_order m = memory_order_seq_cst) noexcept;
    T operator=(T) volatile noexcept;
    T operator=(T) noexcept;

    T exchange(T desr, memory_order m = memory_order_seq_cst) volatile noexcept;
    T exchange(T desr, memory_order m = memory_order_seq_cst) noexcept;
    bool compare_exchange_weak(T& expc, T desr,
                               memory_order s, memory_order f) volatile noexcept;
    bool compare_exchange_weak(T& expc, T desr, memory_order s, memory_order f) noexcept;
    bool compare_exchange_strong(T& expc, T desr,
                                 memory_order s, memory_order f) volatile noexcept;
    bool compare_exchange_strong(T& expc, T desr,
                                 memory_order s, memory_order f) noexcept;
    bool compare_exchange_weak(T& expc, T desr,
                               memory_order m = memory_order_seq_cst) volatile noexcept;
    bool compare_exchange_weak(T& expc, T desr,
                               memory_order m = memory_order_seq_cst) noexcept;
    bool compare_exchange_strong(T& expc, T desr,
                                memory_order m = memory_order_seq_cst) volatile noexcept;
    bool compare_exchange_strong(T& expc, T desr,
                                 memory_order m = memory_order_seq_cst) noexcept;

    void wait(T, memory_order = memory_order::seq_cst) const volatile noexcept;
    void wait(T, memory_order = memory_order::seq_cst) const noexcept;
    void notify_one() volatile noexcept;
    void notify_one() noexcept;
    void notify_all() volatile noexcept;
    void notify_all() noexcept;
};

template <>
struct atomic<integral>
{
    using value_type = integral;
    using difference_type = value_type;

    static constexpr bool is_always_lock_free;
    bool is_lock_free() const volatile noexcept;
    bool is_lock_free() const noexcept;

    atomic() noexcept = default;
    constexpr atomic(integral desr) noexcept;
    atomic(const atomic&) = delete;
    atomic& operator=(const atomic&) = delete;
    atomic& operator=(const atomic&) volatile = delete;

    integral load(memory_order m = memory_order_seq_cst) const volatile noexcept;
    integral load(memory_order m = memory_order_seq_cst) const noexcept;
    operator integral() const volatile noexcept;
    operator integral() const noexcept;
    void store(integral desr, memory_order m = memory_order_seq_cst) volatile noexcept;
    void store(integral desr, memory_order m = memory_order_seq_cst) noexcept;
    integral operator=(integral desr) volatile noexcept;
    integral operator=(integral desr) noexcept;

    integral exchange(integral desr,
                      memory_order m = memory_order_seq_cst) volatile noexcept;
    integral exchange(integral desr, memory_order m = memory_order_seq_cst) noexcept;
    bool compare_exchange_weak(integral& expc, integral desr,
                               memory_order s, memory_order f) volatile noexcept;
    bool compare_exchange_weak(integral& expc, integral desr,
                               memory_order s, memory_order f) noexcept;
    bool compare_exchange_strong(integral& expc, integral desr,
                                 memory_order s, memory_order f) volatile noexcept;
    bool compare_exchange_strong(integral& expc, integral desr,
                                 memory_order s, memory_order f) noexcept;
    bool compare_exchange_weak(integral& expc, integral desr,
                               memory_order m = memory_order_seq_cst) volatile noexcept;
    bool compare_exchange_weak(integral& expc, integral desr,
                               memory_order m = memory_order_seq_cst) noexcept;
    bool compare_exchange_strong(integral& expc, integral desr,
                                memory_order m = memory_order_seq_cst) volatile noexcept;
    bool compare_exchange_strong(integral& expc, integral desr,
                                 memory_order m = memory_order_seq_cst) noexcept;

    integral fetch_add(integral op, memory_order m = memory_order_seq_cst) volatile noexcept;
    integral fetch_add(integral op, memory_order m = memory_order_seq_cst) noexcept;
    integral fetch_sub(integral op, memory_order m = memory_order_seq_cst) volatile noexcept;
    integral fetch_sub(integral op, memory_order m = memory_order_seq_cst) noexcept;
    integral fetch_and(integral op, memory_order m = memory_order_seq_cst) volatile noexcept;
    integral fetch_and(integral op, memory_order m = memory_order_seq_cst) noexcept;
    integral fetch_or(integral op, memory_order m = memory_order_seq_cst) volatile noexcept;
    integral fetch_or(integral op, memory_order m = memory_order_seq_cst) noexcept;
    integral fetch_xor(integral op, memory_order m = memory_order_seq_cst) volatile noexcept;
    integral fetch_xor(integral op, memory_order m = memory_order_seq_cst) noexcept;

    integral operator++(int) volatile noexcept;
    integral operator++(int) noexcept;
    integral operator--(int) volatile noexcept;
    integral operator--(int) noexcept;
    integral operator++() volatile noexcept;
    integral operator++() noexcept;
    integral operator--() volatile noexcept;
    integral operator--() noexcept;
    integral operator+=(integral op) volatile noexcept;
    integral operator+=(integral op) noexcept;
    integral operator-=(integral op) volatile noexcept;
    integral operator-=(integral op) noexcept;
    integral operator&=(integral op) volatile noexcept;
    integral operator&=(integral op) noexcept;
    integral operator|=(integral op) volatile noexcept;
    integral operator|=(integral op) noexcept;
    integral operator^=(integral op) volatile noexcept;
    integral operator^=(integral op) noexcept;

    void wait(integral, memory_order = memory_order::seq_cst) const volatile noexcept;
    void wait(integral, memory_order = memory_order::seq_cst) const noexcept;
    void notify_one() volatile noexcept;
    void notify_one() noexcept;
    void notify_all() volatile noexcept;
    void notify_all() noexcept;
};

template <class T>
struct atomic<T*>
{
    using value_type = T*;
    using difference_type = ptrdiff_t;

    static constexpr bool is_always_lock_free;
    bool is_lock_free() const volatile noexcept;
    bool is_lock_free() const noexcept;

    atomic() noexcept = default; // until C++20
    constexpr atomic() noexcept; // since C++20
    constexpr atomic(T* desr) noexcept;
    atomic(const atomic&) = delete;
    atomic& operator=(const atomic&) = delete;
    atomic& operator=(const atomic&) volatile = delete;

    T* load(memory_order m = memory_order_seq_cst) const volatile noexcept;
    T* load(memory_order m = memory_order_seq_cst) const noexcept;
    operator T*() const volatile noexcept;
    operator T*() const noexcept;
    void store(T* desr, memory_order m = memory_order_seq_cst) volatile noexcept;
    void store(T* desr, memory_order m = memory_order_seq_cst) noexcept;
    T* operator=(T*) volatile noexcept;
    T* operator=(T*) noexcept;

    T* exchange(T* desr, memory_order m = memory_order_seq_cst) volatile noexcept;
    T* exchange(T* desr, memory_order m = memory_order_seq_cst) noexcept;
    bool compare_exchange_weak(T*& expc, T* desr,
                               memory_order s, memory_order f) volatile noexcept;
    bool compare_exchange_weak(T*& expc, T* desr,
                               memory_order s, memory_order f) noexcept;
    bool compare_exchange_strong(T*& expc, T* desr,
                                 memory_order s, memory_order f) volatile noexcept;
    bool compare_exchange_strong(T*& expc, T* desr,
                                 memory_order s, memory_order f) noexcept;
    bool compare_exchange_weak(T*& expc, T* desr,
                               memory_order m = memory_order_seq_cst) volatile noexcept;
    bool compare_exchange_weak(T*& expc, T* desr,
                               memory_order m = memory_order_seq_cst) noexcept;
    bool compare_exchange_strong(T*& expc, T* desr,
                                memory_order m = memory_order_seq_cst) volatile noexcept;
    bool compare_exchange_strong(T*& expc, T* desr,
                                 memory_order m = memory_order_seq_cst) noexcept;
    T* fetch_add(ptrdiff_t op, memory_order m = memory_order_seq_cst) volatile noexcept;
    T* fetch_add(ptrdiff_t op, memory_order m = memory_order_seq_cst) noexcept;
    T* fetch_sub(ptrdiff_t op, memory_order m = memory_order_seq_cst) volatile noexcept;
    T* fetch_sub(ptrdiff_t op, memory_order m = memory_order_seq_cst) noexcept;

    T* operator++(int) volatile noexcept;
    T* operator++(int) noexcept;
    T* operator--(int) volatile noexcept;
    T* operator--(int) noexcept;
    T* operator++() volatile noexcept;
    T* operator++() noexcept;
    T* operator--() volatile noexcept;
    T* operator--() noexcept;
    T* operator+=(ptrdiff_t op) volatile noexcept;
    T* operator+=(ptrdiff_t op) noexcept;
    T* operator-=(ptrdiff_t op) volatile noexcept;
    T* operator-=(ptrdiff_t op) noexcept;

    void wait(T*, memory_order = memory_order::seq_cst) const volatile noexcept;
    void wait(T*, memory_order = memory_order::seq_cst) const noexcept;
    void notify_one() volatile noexcept;
    void notify_one() noexcept;
    void notify_all() volatile noexcept;
    void notify_all() noexcept;
};


// [atomics.nonmembers], non-member functions
template<class T>
  bool atomic_is_lock_free(const volatile atomic<T>*) noexcept;
template<class T>
  bool atomic_is_lock_free(const atomic<T>*) noexcept;
template<class T>
  void atomic_store(volatile atomic<T>*, atomic<T>::value_type) noexcept;
template<class T>
  void atomic_store(atomic<T>*, atomic<T>::value_type) noexcept;
template<class T>
  void atomic_store_explicit(volatile atomic<T>*, atomic<T>::value_type,
                             memory_order) noexcept;
template<class T>
  void atomic_store_explicit(atomic<T>*, atomic<T>::value_type,
                             memory_order) noexcept;
template<class T>
  T atomic_load(const volatile atomic<T>*) noexcept;
template<class T>
  T atomic_load(const atomic<T>*) noexcept;
template<class T>
  T atomic_load_explicit(const volatile atomic<T>*, memory_order) noexcept;
template<class T>
  T atomic_load_explicit(const atomic<T>*, memory_order) noexcept;
template<class T>
  T atomic_exchange(volatile atomic<T>*, atomic<T>::value_type) noexcept;
template<class T>
  T atomic_exchange(atomic<T>*, atomic<T>::value_type) noexcept;
template<class T>
  T atomic_exchange_explicit(volatile atomic<T>*, atomic<T>::value_type,
                             memory_order) noexcept;
template<class T>
  T atomic_exchange_explicit(atomic<T>*, atomic<T>::value_type,
                             memory_order) noexcept;
template<class T>
  bool atomic_compare_exchange_weak(volatile atomic<T>*, atomic<T>::value_type*,
                                    atomic<T>::value_type) noexcept;
template<class T>
  bool atomic_compare_exchange_weak(atomic<T>*, atomic<T>::value_type*,
                                    atomic<T>::value_type) noexcept;
template<class T>
  bool atomic_compare_exchange_strong(volatile atomic<T>*, atomic<T>::value_type*,
                                      atomic<T>::value_type) noexcept;
template<class T>
  bool atomic_compare_exchange_strong(atomic<T>*, atomic<T>::value_type*,
                                      atomic<T>::value_type) noexcept;
template<class T>
  bool atomic_compare_exchange_weak_explicit(volatile atomic<T>*, atomic<T>::value_type*,
                                             atomic<T>::value_type,
                                             memory_order, memory_order) noexcept;
template<class T>
  bool atomic_compare_exchange_weak_explicit(atomic<T>*, atomic<T>::value_type*,
                                             atomic<T>::value_type,
                                             memory_order, memory_order) noexcept;
template<class T>
  bool atomic_compare_exchange_strong_explicit(volatile atomic<T>*, atomic<T>::value_type*,
                                               atomic<T>::value_type,
                                               memory_order, memory_order) noexcept;
template<class T>
  bool atomic_compare_exchange_strong_explicit(atomic<T>*, atomic<T>::value_type*,
                                               atomic<T>::value_type,
                                               memory_order, memory_order) noexcept;

template<class T>
  T atomic_fetch_add(volatile atomic<T>*, atomic<T>::difference_type) noexcept;
template<class T>
  T atomic_fetch_add(atomic<T>*, atomic<T>::difference_type) noexcept;
template<class T>
  T atomic_fetch_add_explicit(volatile atomic<T>*, atomic<T>::difference_type,
                              memory_order) noexcept;
template<class T>
  T atomic_fetch_add_explicit(atomic<T>*, atomic<T>::difference_type,
                              memory_order) noexcept;
template<class T>
  T atomic_fetch_sub(volatile atomic<T>*, atomic<T>::difference_type) noexcept;
template<class T>
  T atomic_fetch_sub(atomic<T>*, atomic<T>::difference_type) noexcept;
template<class T>
  T atomic_fetch_sub_explicit(volatile atomic<T>*, atomic<T>::difference_type,
                              memory_order) noexcept;
template<class T>
  T atomic_fetch_sub_explicit(atomic<T>*, atomic<T>::difference_type,
                              memory_order) noexcept;
template<class T>
  T atomic_fetch_and(volatile atomic<T>*, atomic<T>::value_type) noexcept;
template<class T>
  T atomic_fetch_and(atomic<T>*, atomic<T>::value_type) noexcept;
template<class T>
  T atomic_fetch_and_explicit(volatile atomic<T>*, atomic<T>::value_type,
                              memory_order) noexcept;
template<class T>
  T atomic_fetch_and_explicit(atomic<T>*, atomic<T>::value_type,
                              memory_order) noexcept;
template<class T>
  T atomic_fetch_or(volatile atomic<T>*, atomic<T>::value_type) noexcept;
template<class T>
  T atomic_fetch_or(atomic<T>*, atomic<T>::value_type) noexcept;
template<class T>
  T atomic_fetch_or_explicit(volatile atomic<T>*, atomic<T>::value_type,
                             memory_order) noexcept;
template<class T>
  T atomic_fetch_or_explicit(atomic<T>*, atomic<T>::value_type,
                             memory_order) noexcept;
template<class T>
  T atomic_fetch_xor(volatile atomic<T>*, atomic<T>::value_type) noexcept;
template<class T>
  T atomic_fetch_xor(atomic<T>*, atomic<T>::value_type) noexcept;
template<class T>
  T atomic_fetch_xor_explicit(volatile atomic<T>*, atomic<T>::value_type,
                              memory_order) noexcept;
template<class T>
  T atomic_fetch_xor_explicit(atomic<T>*, atomic<T>::value_type,
                              memory_order) noexcept;

template<class T>
  void atomic_wait(const volatile atomic<T>*, atomic<T>::value_type) noexcept;
template<class T>
  void atomic_wait(const atomic<T>*, atomic<T>::value_type) noexcept;
template<class T>
  void atomic_wait_explicit(const volatile atomic<T>*, atomic<T>::value_type,
                            memory_order) noexcept;
template<class T>
  void atomic_wait_explicit(const atomic<T>*, atomic<T>::value_type,
                            memory_order) noexcept;
template<class T>
  void atomic_notify_one(volatile atomic<T>*) noexcept;
template<class T>
  void atomic_notify_one(atomic<T>*) noexcept;
template<class T>
  void atomic_notify_all(volatile atomic<T>*) noexcept;
template<class T>
  void atomic_notify_all(atomic<T>*) noexcept;

// Atomics for standard typedef types

typedef atomic<bool>               atomic_bool;
typedef atomic<char>               atomic_char;
typedef atomic<signed char>        atomic_schar;
typedef atomic<unsigned char>      atomic_uchar;
typedef atomic<short>              atomic_short;
typedef atomic<unsigned short>     atomic_ushort;
typedef atomic<int>                atomic_int;
typedef atomic<unsigned int>       atomic_uint;
typedef atomic<long>               atomic_long;
typedef atomic<unsigned long>      atomic_ulong;
typedef atomic<long long>          atomic_llong;
typedef atomic<unsigned long long> atomic_ullong;
typedef atomic<char8_t>            atomic_char8_t; // C++20
typedef atomic<char16_t>           atomic_char16_t;
typedef atomic<char32_t>           atomic_char32_t;
typedef atomic<wchar_t>            atomic_wchar_t;

typedef atomic<int_least8_t>   atomic_int_least8_t;
typedef atomic<uint_least8_t>  atomic_uint_least8_t;
typedef atomic<int_least16_t>  atomic_int_least16_t;
typedef atomic<uint_least16_t> atomic_uint_least16_t;
typedef atomic<int_least32_t>  atomic_int_least32_t;
typedef atomic<uint_least32_t> atomic_uint_least32_t;
typedef atomic<int_least64_t>  atomic_int_least64_t;
typedef atomic<uint_least64_t> atomic_uint_least64_t;

typedef atomic<int_fast8_t>   atomic_int_fast8_t;
typedef atomic<uint_fast8_t>  atomic_uint_fast8_t;
typedef atomic<int_fast16_t>  atomic_int_fast16_t;
typedef atomic<uint_fast16_t> atomic_uint_fast16_t;
typedef atomic<int_fast32_t>  atomic_int_fast32_t;
typedef atomic<uint_fast32_t> atomic_uint_fast32_t;
typedef atomic<int_fast64_t>  atomic_int_fast64_t;
typedef atomic<uint_fast64_t> atomic_uint_fast64_t;

typedef atomic<int8_t>   atomic_int8_t;
typedef atomic<uint8_t>  atomic_uint8_t;
typedef atomic<int16_t>  atomic_int16_t;
typedef atomic<uint16_t> atomic_uint16_t;
typedef atomic<int32_t>  atomic_int32_t;
typedef atomic<uint32_t> atomic_uint32_t;
typedef atomic<int64_t>  atomic_int64_t;
typedef atomic<uint64_t> atomic_uint64_t;

typedef atomic<intptr_t>  atomic_intptr_t;
typedef atomic<uintptr_t> atomic_uintptr_t;
typedef atomic<size_t>    atomic_size_t;
typedef atomic<ptrdiff_t> atomic_ptrdiff_t;
typedef atomic<intmax_t>  atomic_intmax_t;
typedef atomic<uintmax_t> atomic_uintmax_t;

// flag type and operations

typedef struct atomic_flag
{
    atomic_flag() noexcept = default; // until C++20
    constexpr atomic_flag() noexcept; // since C++20
    atomic_flag(const atomic_flag&) = delete;
    atomic_flag& operator=(const atomic_flag&) = delete;
    atomic_flag& operator=(const atomic_flag&) volatile = delete;

    bool test(memory_order m = memory_order_seq_cst) volatile noexcept;
    bool test(memory_order m = memory_order_seq_cst) noexcept;
    bool test_and_set(memory_order m = memory_order_seq_cst) volatile noexcept;
    bool test_and_set(memory_order m = memory_order_seq_cst) noexcept;
    void clear(memory_order m = memory_order_seq_cst) volatile noexcept;
    void clear(memory_order m = memory_order_seq_cst) noexcept;

    void wait(bool, memory_order = memory_order::seq_cst) const volatile noexcept;
    void wait(bool, memory_order = memory_order::seq_cst) const noexcept;
    void notify_one() volatile noexcept;
    void notify_one() noexcept;
    void notify_all() volatile noexcept;
    void notify_all() noexcept;
} atomic_flag;

bool atomic_flag_test(volatile atomic_flag* obj) noexcept;
bool atomic_flag_test(atomic_flag* obj) noexcept;
bool atomic_flag_test_explicit(volatile atomic_flag* obj,
                               memory_order m) noexcept;
bool atomic_flag_test_explicit(atomic_flag* obj, memory_order m) noexcept;
bool atomic_flag_test_and_set(volatile atomic_flag* obj) noexcept;
bool atomic_flag_test_and_set(atomic_flag* obj) noexcept;
bool atomic_flag_test_and_set_explicit(volatile atomic_flag* obj,
                                       memory_order m) noexcept;
bool atomic_flag_test_and_set_explicit(atomic_flag* obj, memory_order m) noexcept;
void atomic_flag_clear(volatile atomic_flag* obj) noexcept;
void atomic_flag_clear(atomic_flag* obj) noexcept;
void atomic_flag_clear_explicit(volatile atomic_flag* obj, memory_order m) noexcept;
void atomic_flag_clear_explicit(atomic_flag* obj, memory_order m) noexcept;

void atomic_wait(const volatile atomic_flag* obj, T old) noexcept;
void atomic_wait(const atomic_flag* obj, T old) noexcept;
void atomic_wait_explicit(const volatile atomic_flag* obj, T old, memory_order m) noexcept;
void atomic_wait_explicit(const atomic_flag* obj, T old, memory_order m) noexcept;
void atomic_one(volatile atomic_flag* obj) noexcept;
void atomic_one(atomic_flag* obj) noexcept;
void atomic_all(volatile atomic_flag* obj) noexcept;
void atomic_all(atomic_flag* obj) noexcept;

// fences

void atomic_thread_fence(memory_order m) noexcept;
void atomic_signal_fence(memory_order m) noexcept;

// deprecated

template <class T>
  void atomic_init(volatile atomic<T>* obj, atomic<T>::value_type desr) noexcept;

template <class T>
  void atomic_init(atomic<T>* obj, atomic<T>::value_type desr) noexcept;

#define ATOMIC_VAR_INIT(value) see below

#define ATOMIC_FLAG_INIT see below

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 521 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 522 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* aliases.h expanded by -frewrite-includes */
#include <__atomic/aliases.h>
#else /* aliases.h expanded by -frewrite-includes */
# 522 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ATOMIC_ALIASES_H
#define _LIBCPP___ATOMIC_ALIASES_H

#if 0 /* expanded by -frewrite-includes */
#include <__atomic/atomic.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* atomic_lock_free.h expanded by -frewrite-includes */
#include <__atomic/atomic_lock_free.h>
#else /* atomic_lock_free.h expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_lock_free.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ATOMIC_ATOMIC_LOCK_FREE_H
#define _LIBCPP___ATOMIC_ATOMIC_LOCK_FREE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_lock_free.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_lock_free.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_lock_free.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_lock_free.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_lock_free.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__CLANG_ATOMIC_BOOL_LOCK_FREE)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_lock_free.h" 3
# define ATOMIC_BOOL_LOCK_FREE      __CLANG_ATOMIC_BOOL_LOCK_FREE
# define ATOMIC_CHAR_LOCK_FREE      __CLANG_ATOMIC_CHAR_LOCK_FREE
#ifndef _LIBCPP_HAS_NO_CHAR8_T
# define ATOMIC_CHAR8_T_LOCK_FREE   __CLANG_ATOMIC_CHAR8_T_LOCK_FREE
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_lock_free.h" 3
# define ATOMIC_CHAR16_T_LOCK_FREE  __CLANG_ATOMIC_CHAR16_T_LOCK_FREE
# define ATOMIC_CHAR32_T_LOCK_FREE  __CLANG_ATOMIC_CHAR32_T_LOCK_FREE
# define ATOMIC_WCHAR_T_LOCK_FREE   __CLANG_ATOMIC_WCHAR_T_LOCK_FREE
# define ATOMIC_SHORT_LOCK_FREE     __CLANG_ATOMIC_SHORT_LOCK_FREE
# define ATOMIC_INT_LOCK_FREE       __CLANG_ATOMIC_INT_LOCK_FREE
# define ATOMIC_LONG_LOCK_FREE      __CLANG_ATOMIC_LONG_LOCK_FREE
# define ATOMIC_LLONG_LOCK_FREE     __CLANG_ATOMIC_LLONG_LOCK_FREE
# define ATOMIC_POINTER_LOCK_FREE   __CLANG_ATOMIC_POINTER_LOCK_FREE
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__GCC_ATOMIC_BOOL_LOCK_FREE)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_lock_free.h" 3
# define ATOMIC_BOOL_LOCK_FREE      __GCC_ATOMIC_BOOL_LOCK_FREE
# define ATOMIC_CHAR_LOCK_FREE      __GCC_ATOMIC_CHAR_LOCK_FREE
#ifndef _LIBCPP_HAS_NO_CHAR8_T
# define ATOMIC_CHAR8_T_LOCK_FREE   __GCC_ATOMIC_CHAR8_T_LOCK_FREE
#endif
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_lock_free.h" 3
# define ATOMIC_CHAR16_T_LOCK_FREE  __GCC_ATOMIC_CHAR16_T_LOCK_FREE
# define ATOMIC_CHAR32_T_LOCK_FREE  __GCC_ATOMIC_CHAR32_T_LOCK_FREE
# define ATOMIC_WCHAR_T_LOCK_FREE   __GCC_ATOMIC_WCHAR_T_LOCK_FREE
# define ATOMIC_SHORT_LOCK_FREE     __GCC_ATOMIC_SHORT_LOCK_FREE
# define ATOMIC_INT_LOCK_FREE       __GCC_ATOMIC_INT_LOCK_FREE
# define ATOMIC_LONG_LOCK_FREE      __GCC_ATOMIC_LONG_LOCK_FREE
# define ATOMIC_LLONG_LOCK_FREE     __GCC_ATOMIC_LLONG_LOCK_FREE
# define ATOMIC_POINTER_LOCK_FREE   __GCC_ATOMIC_POINTER_LOCK_FREE
#endif
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_lock_free.h" 3

#endif // _LIBCPP___ATOMIC_ATOMIC_LOCK_FREE_H
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_lock_free.h" 3
#endif /* atomic_lock_free.h expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/contention_t.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/is_always_lock_free.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

using atomic_bool   = atomic<bool>;
using atomic_char   = atomic<char>;
using atomic_schar  = atomic<signed char>;
using atomic_uchar  = atomic<unsigned char>;
using atomic_short  = atomic<short>;
using atomic_ushort = atomic<unsigned short>;
using atomic_int    = atomic<int>;
using atomic_uint   = atomic<unsigned int>;
using atomic_long   = atomic<long>;
using atomic_ulong  = atomic<unsigned long>;
using atomic_llong  = atomic<long long>;
using atomic_ullong = atomic<unsigned long long>;
#ifndef _LIBCPP_HAS_NO_CHAR8_T
using atomic_char8_t = atomic<char8_t>;
#endif
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
using atomic_char16_t = atomic<char16_t>;
using atomic_char32_t = atomic<char32_t>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using atomic_wchar_t = atomic<wchar_t>;
#endif
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3

using atomic_int_least8_t   = atomic<int_least8_t>;
using atomic_uint_least8_t  = atomic<uint_least8_t>;
using atomic_int_least16_t  = atomic<int_least16_t>;
using atomic_uint_least16_t = atomic<uint_least16_t>;
using atomic_int_least32_t  = atomic<int_least32_t>;
using atomic_uint_least32_t = atomic<uint_least32_t>;
using atomic_int_least64_t  = atomic<int_least64_t>;
using atomic_uint_least64_t = atomic<uint_least64_t>;

using atomic_int_fast8_t   = atomic<int_fast8_t>;
using atomic_uint_fast8_t  = atomic<uint_fast8_t>;
using atomic_int_fast16_t  = atomic<int_fast16_t>;
using atomic_uint_fast16_t = atomic<uint_fast16_t>;
using atomic_int_fast32_t  = atomic<int_fast32_t>;
using atomic_uint_fast32_t = atomic<uint_fast32_t>;
using atomic_int_fast64_t  = atomic<int_fast64_t>;
using atomic_uint_fast64_t = atomic<uint_fast64_t>;

using atomic_int8_t   = atomic< int8_t>;
using atomic_uint8_t  = atomic<uint8_t>;
using atomic_int16_t  = atomic< int16_t>;
using atomic_uint16_t = atomic<uint16_t>;
using atomic_int32_t  = atomic< int32_t>;
using atomic_uint32_t = atomic<uint32_t>;
using atomic_int64_t  = atomic< int64_t>;
using atomic_uint64_t = atomic<uint64_t>;

using atomic_intptr_t  = atomic<intptr_t>;
using atomic_uintptr_t = atomic<uintptr_t>;
using atomic_size_t    = atomic<size_t>;
using atomic_ptrdiff_t = atomic<ptrdiff_t>;
using atomic_intmax_t  = atomic<intmax_t>;
using atomic_uintmax_t = atomic<uintmax_t>;

// atomic_*_lock_free : prefer the contention type most highly, then the largest lock-free type

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
#  define _LIBCPP_CONTENTION_LOCK_FREE ::std::__libcpp_is_always_lock_free<__cxx_contention_t>::__value
#else
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
#  define _LIBCPP_CONTENTION_LOCK_FREE false
#endif
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3

#if 0 /* disabled by -frewrite-includes */
#if ATOMIC_LLONG_LOCK_FREE == 2
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
using __libcpp_signed_lock_free = __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, long long>;
using __libcpp_unsigned_lock_free =
    __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned long long>;
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif ATOMIC_INT_LOCK_FREE == 2
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
using __libcpp_signed_lock_free   = __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, int>;
using __libcpp_unsigned_lock_free = __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned int>;
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif ATOMIC_SHORT_LOCK_FREE == 2
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
using __libcpp_signed_lock_free   = __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, short>;
using __libcpp_unsigned_lock_free = __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned short>;
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif ATOMIC_CHAR_LOCK_FREE == 2
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
using __libcpp_signed_lock_free   = __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, char>;
using __libcpp_unsigned_lock_free = __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned char>;
#else
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
// No signed/unsigned lock-free types
#  define _LIBCPP_NO_LOCK_FREE_TYPES
#endif
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_NO_LOCK_FREE_TYPES)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
using atomic_signed_lock_free   = atomic<__libcpp_signed_lock_free>;
using atomic_unsigned_lock_free = atomic<__libcpp_unsigned_lock_free>;
#endif
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ATOMIC_ALIASES_H
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/aliases.h" 3
#endif /* aliases.h expanded by -frewrite-includes */
# 523 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/atomic.h>
#endif /* expanded by -frewrite-includes */
# 523 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 524 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/atomic_base.h>
#endif /* expanded by -frewrite-includes */
# 524 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 525 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* atomic_flag.h expanded by -frewrite-includes */
#include <__atomic/atomic_flag.h>
#else /* atomic_flag.h expanded by -frewrite-includes */
# 525 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ATOMIC_ATOMIC_FLAG_H
#define _LIBCPP___ATOMIC_ATOMIC_FLAG_H

#if 0 /* expanded by -frewrite-includes */
#include <__atomic/atomic_sync.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/contention_t.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/cxx_atomic_impl.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/memory_order.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__chrono/duration.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__threading_support>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

struct atomic_flag
{
    __cxx_atomic_impl<_LIBCPP_ATOMIC_FLAG_TYPE> __a_;

    _LIBCPP_HIDE_FROM_ABI
    bool test(memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT
        {return _LIBCPP_ATOMIC_FLAG_TYPE(true) == __cxx_atomic_load(&__a_, __m);}
    _LIBCPP_HIDE_FROM_ABI
    bool test(memory_order __m = memory_order_seq_cst) const _NOEXCEPT
        {return _LIBCPP_ATOMIC_FLAG_TYPE(true) == __cxx_atomic_load(&__a_, __m);}

    _LIBCPP_HIDE_FROM_ABI
    bool test_and_set(memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
        {return __cxx_atomic_exchange(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(true), __m);}
    _LIBCPP_HIDE_FROM_ABI
    bool test_and_set(memory_order __m = memory_order_seq_cst) _NOEXCEPT
        {return __cxx_atomic_exchange(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(true), __m);}
    _LIBCPP_HIDE_FROM_ABI
    void clear(memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
        {__cxx_atomic_store(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(false), __m);}
    _LIBCPP_HIDE_FROM_ABI
    void clear(memory_order __m = memory_order_seq_cst) _NOEXCEPT
        {__cxx_atomic_store(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(false), __m);}

    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
    void wait(bool __v, memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT
        {__cxx_atomic_wait(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(__v), __m);}
    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
    void wait(bool __v, memory_order __m = memory_order_seq_cst) const _NOEXCEPT
        {__cxx_atomic_wait(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(__v), __m);}
    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
    void notify_one() volatile _NOEXCEPT
        {__cxx_atomic_notify_one(&__a_);}
    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
    void notify_one() _NOEXCEPT
        {__cxx_atomic_notify_one(&__a_);}
    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
    void notify_all() volatile _NOEXCEPT
        {__cxx_atomic_notify_all(&__a_);}
    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
    void notify_all() _NOEXCEPT
        {__cxx_atomic_notify_all(&__a_);}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
    _LIBCPP_HIDE_FROM_ABI constexpr
    atomic_flag() _NOEXCEPT : __a_(false) {}
#else
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
    atomic_flag() _NOEXCEPT = default;
#endif
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
    atomic_flag(bool __b) _NOEXCEPT : __a_(__b) {} // EXTENSION

    atomic_flag(const atomic_flag&) = delete;
    atomic_flag& operator=(const atomic_flag&) = delete;
    atomic_flag& operator=(const atomic_flag&) volatile = delete;

};

inline _LIBCPP_HIDE_FROM_ABI
bool
atomic_flag_test(const volatile atomic_flag* __o) _NOEXCEPT
{
    return __o->test();
}

inline _LIBCPP_HIDE_FROM_ABI
bool
atomic_flag_test(const atomic_flag* __o) _NOEXCEPT
{
    return __o->test();
}

inline _LIBCPP_HIDE_FROM_ABI
bool
atomic_flag_test_explicit(const volatile atomic_flag* __o, memory_order __m) _NOEXCEPT
{
    return __o->test(__m);
}

inline _LIBCPP_HIDE_FROM_ABI
bool
atomic_flag_test_explicit(const atomic_flag* __o, memory_order __m) _NOEXCEPT
{
    return __o->test(__m);
}

inline _LIBCPP_HIDE_FROM_ABI
bool
atomic_flag_test_and_set(volatile atomic_flag* __o) _NOEXCEPT
{
    return __o->test_and_set();
}

inline _LIBCPP_HIDE_FROM_ABI
bool
atomic_flag_test_and_set(atomic_flag* __o) _NOEXCEPT
{
    return __o->test_and_set();
}

inline _LIBCPP_HIDE_FROM_ABI
bool
atomic_flag_test_and_set_explicit(volatile atomic_flag* __o, memory_order __m) _NOEXCEPT
{
    return __o->test_and_set(__m);
}

inline _LIBCPP_HIDE_FROM_ABI
bool
atomic_flag_test_and_set_explicit(atomic_flag* __o, memory_order __m) _NOEXCEPT
{
    return __o->test_and_set(__m);
}

inline _LIBCPP_HIDE_FROM_ABI
void
atomic_flag_clear(volatile atomic_flag* __o) _NOEXCEPT
{
    __o->clear();
}

inline _LIBCPP_HIDE_FROM_ABI
void
atomic_flag_clear(atomic_flag* __o) _NOEXCEPT
{
    __o->clear();
}

inline _LIBCPP_HIDE_FROM_ABI
void
atomic_flag_clear_explicit(volatile atomic_flag* __o, memory_order __m) _NOEXCEPT
{
    __o->clear(__m);
}

inline _LIBCPP_HIDE_FROM_ABI
void
atomic_flag_clear_explicit(atomic_flag* __o, memory_order __m) _NOEXCEPT
{
    __o->clear(__m);
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC
void
atomic_flag_wait(const volatile atomic_flag* __o, bool __v) _NOEXCEPT
{
    __o->wait(__v);
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC
void
atomic_flag_wait(const atomic_flag* __o, bool __v) _NOEXCEPT
{
    __o->wait(__v);
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC
void
atomic_flag_wait_explicit(const volatile atomic_flag* __o,
                          bool __v, memory_order __m) _NOEXCEPT
{
    __o->wait(__v, __m);
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC
void
atomic_flag_wait_explicit(const atomic_flag* __o,
                          bool __v, memory_order __m) _NOEXCEPT
{
    __o->wait(__v, __m);
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC
void
atomic_flag_notify_one(volatile atomic_flag* __o) _NOEXCEPT
{
    __o->notify_one();
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC
void
atomic_flag_notify_one(atomic_flag* __o) _NOEXCEPT
{
    __o->notify_one();
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC
void
atomic_flag_notify_all(volatile atomic_flag* __o) _NOEXCEPT
{
    __o->notify_all();
}

inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC
void
atomic_flag_notify_all(atomic_flag* __o) _NOEXCEPT
{
    __o->notify_all();
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ATOMIC_ATOMIC_FLAG_H
# 231 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_flag.h" 3
#endif /* atomic_flag.h expanded by -frewrite-includes */
# 526 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* atomic_init.h expanded by -frewrite-includes */
#include <__atomic/atomic_init.h>
#else /* atomic_init.h expanded by -frewrite-includes */
# 526 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_init.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ATOMIC_ATOMIC_INIT_H
#define _LIBCPP___ATOMIC_ATOMIC_INIT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_init.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_init.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_init.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_init.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_init.h" 3

#define ATOMIC_FLAG_INIT {false}
#define ATOMIC_VAR_INIT(__v) {__v}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_init.h" 3
#if 0 /* disabled by -frewrite-includes */
# if defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER >= 1400
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_init.h" 3
#  pragma clang deprecated(ATOMIC_VAR_INIT)
# endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_init.h" 3
#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_init.h" 3

#endif // _LIBCPP___ATOMIC_ATOMIC_INIT_H
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/atomic_init.h" 3
#endif /* atomic_init.h expanded by -frewrite-includes */
# 527 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/atomic_lock_free.h>
#endif /* expanded by -frewrite-includes */
# 527 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 528 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/atomic_sync.h>
#endif /* expanded by -frewrite-includes */
# 528 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 529 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/check_memory_order.h>
#endif /* expanded by -frewrite-includes */
# 529 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 530 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/contention_t.h>
#endif /* expanded by -frewrite-includes */
# 530 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 531 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/cxx_atomic_impl.h>
#endif /* expanded by -frewrite-includes */
# 531 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 532 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* fence.h expanded by -frewrite-includes */
#include <__atomic/fence.h>
#else /* fence.h expanded by -frewrite-includes */
# 532 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/fence.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ATOMIC_FENCE_H
#define _LIBCPP___ATOMIC_FENCE_H

#if 0 /* expanded by -frewrite-includes */
#include <__atomic/cxx_atomic_impl.h>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/fence.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/fence.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/memory_order.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/fence.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/fence.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/fence.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/fence.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/fence.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/fence.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/fence.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

inline _LIBCPP_HIDE_FROM_ABI
void
atomic_thread_fence(memory_order __m) _NOEXCEPT
{
    __cxx_atomic_thread_fence(__m);
}

inline _LIBCPP_HIDE_FROM_ABI
void
atomic_signal_fence(memory_order __m) _NOEXCEPT
{
    __cxx_atomic_signal_fence(__m);
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ATOMIC_FENCE_H
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/fence.h" 3
#endif /* fence.h expanded by -frewrite-includes */
# 533 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/is_always_lock_free.h>
#endif /* expanded by -frewrite-includes */
# 533 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 534 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* kill_dependency.h expanded by -frewrite-includes */
#include <__atomic/kill_dependency.h>
#else /* kill_dependency.h expanded by -frewrite-includes */
# 534 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/kill_dependency.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ATOMIC_KILL_DEPENDENCY_H
#define _LIBCPP___ATOMIC_KILL_DEPENDENCY_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/kill_dependency.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/kill_dependency.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/kill_dependency.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/kill_dependency.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/kill_dependency.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI
_Tp kill_dependency(_Tp __y) _NOEXCEPT
{
    return __y;
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ATOMIC_KILL_DEPENDENCY_H
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__atomic/kill_dependency.h" 3
#endif /* kill_dependency.h expanded by -frewrite-includes */
# 535 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__atomic/memory_order.h>
#endif /* expanded by -frewrite-includes */
# 535 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 536 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 536 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 537 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 537 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 538 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 540 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 541 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#endif
# 542 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3

#ifdef _LIBCPP_HAS_NO_ATOMIC_HEADER
#  error <atomic> is not implemented
#endif
# 546 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3

#ifdef kill_dependency
#  error <atomic> is incompatible with <stdatomic.h> before C++23. Please compile with -std=c++23.
#endif
# 550 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 552 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cmath>
#endif /* expanded by -frewrite-includes */
# 552 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 553 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if 0 /* expanded by -frewrite-includes */
#  include <compare>
#endif /* expanded by -frewrite-includes */
# 553 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 554 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstring>
#endif /* expanded by -frewrite-includes */
# 554 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 555 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 555 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
# 556 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#endif
# 557 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3

#endif // _LIBCPP_ATOMIC
# 559 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/atomic" 3
#endif /* atomic expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/atomic_unique_lock.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/atomic_unique_lock.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/atomic_unique_lock.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/atomic_unique_lock.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/atomic_unique_lock.h" 3

// This class implements an RAII unique_lock without a mutex.
// It uses std::atomic<State>,
// where State contains a lock bit and might contain other data,
// and LockedBit is the value of State when the lock bit is set, e.g  1 << 2
template <class _State, _State _LockedBit>
class _LIBCPP_AVAILABILITY_SYNC __atomic_unique_lock {
  static_assert(std::__libcpp_popcount(static_cast<unsigned long long>(_LockedBit)) == 1,
                "LockedBit must be an integer where only one bit is set");

  std::atomic<_State>& __state_;
  bool __is_locked_;

public:
  _LIBCPP_HIDE_FROM_ABI explicit __atomic_unique_lock(std::atomic<_State>& __state) noexcept
      : __state_(__state), __is_locked_(true) {
    __lock();
  }

  template <class _Pred>
  _LIBCPP_HIDE_FROM_ABI __atomic_unique_lock(std::atomic<_State>& __state, _Pred&& __give_up_locking) noexcept
      : __state_(__state), __is_locked_(false) {
    __is_locked_ = __lock_impl(__give_up_locking, __set_locked_bit, std::memory_order_acquire);
  }

  template <class _Pred, class _UnaryFunction>
  _LIBCPP_HIDE_FROM_ABI __atomic_unique_lock(
      std::atomic<_State>& __state,
      _Pred&& __give_up_locking,
      _UnaryFunction&& __state_after_lock,
      std::memory_order __locked_ordering) noexcept
      : __state_(__state), __is_locked_(false) {
    __is_locked_ = __lock_impl(__give_up_locking, __state_after_lock, __locked_ordering);
  }

  __atomic_unique_lock(const __atomic_unique_lock&)            = delete;
  __atomic_unique_lock(__atomic_unique_lock&&)                 = delete;
  __atomic_unique_lock& operator=(const __atomic_unique_lock&) = delete;
  __atomic_unique_lock& operator=(__atomic_unique_lock&&)      = delete;

  _LIBCPP_HIDE_FROM_ABI ~__atomic_unique_lock() {
    if (__is_locked_) {
      __unlock();
    }
  }

  _LIBCPP_HIDE_FROM_ABI bool __owns_lock() const noexcept { return __is_locked_; }

  _LIBCPP_HIDE_FROM_ABI void __lock() noexcept {
    const auto __never_give_up_locking = [](_State) { return false; };
    // std::memory_order_acquire because we'd like to make sure that all the read operations after the lock can read the
    // up-to-date values.
    __lock_impl(__never_give_up_locking, __set_locked_bit, std::memory_order_acquire);
    __is_locked_ = true;
  }

  _LIBCPP_HIDE_FROM_ABI void __unlock() noexcept {
    // unset the _LockedBit. `memory_order_release` because we need to make sure all the write operations before calling
    // `__unlock` will be made visible to other threads
    __state_.fetch_and(static_cast<_State>(~_LockedBit), std::memory_order_release);
    __state_.notify_all();
    __is_locked_ = false;
  }

private:
  template <class _Pred, class _UnaryFunction>
  _LIBCPP_HIDE_FROM_ABI bool
  __lock_impl(_Pred&& __give_up_locking, // while trying to lock the state, if the predicate returns true, give up
                                         // locking and return
              _UnaryFunction&& __state_after_lock,
              std::memory_order __locked_ordering) noexcept {
    // At this stage, until we exit the inner while loop, other than the atomic state, we are not reading any order
    // dependent values that is written on other threads, or writing anything that needs to be seen on other threads.
    // Therefore `memory_order_relaxed` is enough.
    _State __current_state = __state_.load(std::memory_order_relaxed);
    do {
      while (true) {
        if (__give_up_locking(__current_state)) {
          // user provided early return condition. fail to lock
          return false;
        } else if ((__current_state & _LockedBit) != 0) {
          // another thread has locked the state, we need to wait
          __state_.wait(__current_state, std::memory_order_relaxed);
          // when it is woken up by notifyAll or spuriously, the __state_
          // might have changed. reload the state
          // Note that the new state's _LockedBit may or may not equal to 0
          __current_state = __state_.load(std::memory_order_relaxed);
        } else {
          // at least for now, it is not locked. we can try `compare_exchange_weak` to lock it.
          // Note that the variable `__current_state`'s lock bit has to be 0 at this point.
          break;
        }
      }
    } while (!__state_.compare_exchange_weak(
        __current_state, // if __state_ has the same value of __current_state, lock bit must be zero before exchange and
                         // we are good to lock/exchange and return. If _state has a different value, because other
                         // threads locked it between the `break` statement above and this statement, exchange will fail
                         // and go back to the inner while loop above.
        __state_after_lock(__current_state), // state after lock. Usually it should be __current_state | _LockedBit.
                                             // Some use cases need to set other bits at the same time as an atomic
                                             // operation therefore we accept a function
        __locked_ordering,        // sucessful exchange order. Usually it should be std::memory_order_acquire.
                                  // Some use cases need more strict ordering therefore we accept it as a parameter
        std::memory_order_relaxed // fail to exchange order. We don't need any ordering as we are going back to the
                                  // inner while loop
        ));
    return true;
  }

  _LIBCPP_HIDE_FROM_ABI static constexpr auto __set_locked_bit = [](_State __state) { return __state | _LockedBit; };
};

#endif // _LIBCPP_STD_VER >= 20
# 137 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/atomic_unique_lock.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___STOP_TOKEN_ATOMIC_UNIQUE_GUARD_H
# 141 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/atomic_unique_lock.h" 3
#endif /* atomic_unique_lock.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* intrusive_list_view.h expanded by -frewrite-includes */
#include <__stop_token/intrusive_list_view.h>
#else /* intrusive_list_view.h expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_list_view.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___STOP_TOKEN_INTRUSIVE_LIST_VIEW_H
#define _LIBCPP___STOP_TOKEN_INTRUSIVE_LIST_VIEW_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_list_view.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_list_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_list_view.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_list_view.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_list_view.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_list_view.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_list_view.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_list_view.h" 3

template <class _Derived>
struct __intrusive_node_base {
  _Derived* __next_ = nullptr;
  _Derived* __prev_ = nullptr;
};

// This class is a view of underlying double-linked list.
// It does not own the nodes. It provides user-friendly
// operations on the linked list.
template <class _Node>
struct __intrusive_list_view {
  _LIBCPP_HIDE_FROM_ABI __intrusive_list_view()                                        = default;
  _LIBCPP_HIDE_FROM_ABI __intrusive_list_view(__intrusive_list_view const&)            = default;
  _LIBCPP_HIDE_FROM_ABI __intrusive_list_view(__intrusive_list_view&&)                 = default;
  _LIBCPP_HIDE_FROM_ABI __intrusive_list_view& operator=(__intrusive_list_view const&) = default;
  _LIBCPP_HIDE_FROM_ABI __intrusive_list_view& operator=(__intrusive_list_view&&)      = default;
  _LIBCPP_HIDE_FROM_ABI ~__intrusive_list_view()                                       = default;

  _LIBCPP_HIDE_FROM_ABI bool __empty() const noexcept { return __head_ == nullptr; }

  _LIBCPP_HIDE_FROM_ABI void __push_front(_Node* __node) noexcept {
    __node->__next_ = __head_;
    if (__head_) {
      __head_->__prev_ = __node;
    }
    __head_ = __node;
  }

  _LIBCPP_HIDE_FROM_ABI _Node* __pop_front() noexcept {
    _Node* __front = __head_;
    __head_        = __head_->__next_;
    if (__head_) {
      __head_->__prev_ = nullptr;
    }
    // OK not to set __front->__next_ = nullptr as __front is not part of the list anymore
    return __front;
  }

  _LIBCPP_HIDE_FROM_ABI void __remove(_Node* __node) noexcept {
    if (__node->__prev_) {
      // prev exists, set its next to our next to skip __node
      __node->__prev_->__next_ = __node->__next_;
      if (__node->__next_) {
        __node->__next_->__prev_ = __node->__prev_;
      }
    } else {
      _LIBCPP_ASSERT_INTERNAL(__node == __head_, "Node to be removed has no prev node, so it has to be the head");
      __pop_front();
    }
  }

  _LIBCPP_HIDE_FROM_ABI bool __is_head(_Node* __node) noexcept { return __node == __head_; }

private:
  _Node* __head_ = nullptr;
};

#endif // _LIBCPP_STD_VER >= 20
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_list_view.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___STOP_TOKEN_INTRUSIVE_LIST_VIEW_H
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/intrusive_list_view.h" 3
#endif /* intrusive_list_view.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* id.h expanded by -frewrite-includes */
#include <__thread/id.h>
#else /* id.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___THREAD_ID_H
#define _LIBCPP___THREAD_ID_H

#if 0 /* expanded by -frewrite-includes */
#include <__compare/ordering.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/hash.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__threading_support>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#ifndef _LIBCPP_HAS_NO_THREADS
class _LIBCPP_EXPORTED_FROM_ABI __thread_id;

namespace this_thread {

_LIBCPP_HIDE_FROM_ABI __thread_id get_id() _NOEXCEPT;

} // namespace this_thread

template <>
struct hash<__thread_id>;

class _LIBCPP_TEMPLATE_VIS __thread_id {
  // FIXME: pthread_t is a pointer on Darwin but a long on Linux.
  // NULL is the no-thread value on Darwin.  Someone needs to check
  // on other platforms.  We assume 0 works everywhere for now.
  __libcpp_thread_id __id_;

  static _LIBCPP_HIDE_FROM_ABI bool
  __lt_impl(__thread_id __x, __thread_id __y) _NOEXCEPT { // id==0 is always less than any other thread_id
    if (__x.__id_ == 0)
      return __y.__id_ != 0;
    if (__y.__id_ == 0)
      return false;
    return __libcpp_thread_id_less(__x.__id_, __y.__id_);
  }

public:
  _LIBCPP_HIDE_FROM_ABI __thread_id() _NOEXCEPT : __id_(0) {}

  _LIBCPP_HIDE_FROM_ABI void __reset() { __id_ = 0; }

  friend _LIBCPP_HIDE_FROM_ABI bool operator==(__thread_id __x, __thread_id __y) _NOEXCEPT;
#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3
  friend _LIBCPP_HIDE_FROM_ABI bool operator<(__thread_id __x, __thread_id __y) _NOEXCEPT;
#  else  // _LIBCPP_STD_VER <= 17
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3
  friend _LIBCPP_HIDE_FROM_ABI strong_ordering operator<=>(__thread_id __x, __thread_id __y) noexcept;
#  endif // _LIBCPP_STD_VER <= 17
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3

  template <class _CharT, class _Traits>
  friend _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
  operator<<(basic_ostream<_CharT, _Traits>& __os, __thread_id __id);

private:
  _LIBCPP_HIDE_FROM_ABI __thread_id(__libcpp_thread_id __id) : __id_(__id) {}

  _LIBCPP_HIDE_FROM_ABI friend __libcpp_thread_id __get_underlying_id(const __thread_id __id) { return __id.__id_; }

  friend __thread_id this_thread::get_id() _NOEXCEPT;
  friend class _LIBCPP_EXPORTED_FROM_ABI thread;
  friend struct _LIBCPP_TEMPLATE_VIS hash<__thread_id>;
};

inline _LIBCPP_HIDE_FROM_ABI bool operator==(__thread_id __x, __thread_id __y) _NOEXCEPT {
  // Don't pass id==0 to underlying routines
  if (__x.__id_ == 0)
    return __y.__id_ == 0;
  if (__y.__id_ == 0)
    return false;
  return __libcpp_thread_id_equal(__x.__id_, __y.__id_);
}

#if 0 /* disabled by -frewrite-includes */
#  if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3

inline _LIBCPP_HIDE_FROM_ABI bool operator!=(__thread_id __x, __thread_id __y) _NOEXCEPT { return !(__x == __y); }

inline _LIBCPP_HIDE_FROM_ABI bool operator<(__thread_id __x, __thread_id __y) _NOEXCEPT {
  return __thread_id::__lt_impl(__x.__id_, __y.__id_);
}

inline _LIBCPP_HIDE_FROM_ABI bool operator<=(__thread_id __x, __thread_id __y) _NOEXCEPT { return !(__y < __x); }
inline _LIBCPP_HIDE_FROM_ABI bool operator>(__thread_id __x, __thread_id __y) _NOEXCEPT { return __y < __x; }
inline _LIBCPP_HIDE_FROM_ABI bool operator>=(__thread_id __x, __thread_id __y) _NOEXCEPT { return !(__x < __y); }

#  else // _LIBCPP_STD_VER <= 17
# 100 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3

inline _LIBCPP_HIDE_FROM_ABI strong_ordering operator<=>(__thread_id __x, __thread_id __y) noexcept {
  if (__x == __y)
    return strong_ordering::equal;
  if (__thread_id::__lt_impl(__x, __y))
    return strong_ordering::less;
  return strong_ordering::greater;
}

#  endif // _LIBCPP_STD_VER <= 17
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3

namespace this_thread {

inline _LIBCPP_HIDE_FROM_ABI __thread_id get_id() _NOEXCEPT { return __libcpp_thread_get_current_id(); }

} // namespace this_thread

#endif // !_LIBCPP_HAS_NO_THREADS
# 118 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___THREAD_ID_H
# 122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__thread/id.h" 3
#endif /* id.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <atomic>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3
#endif
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_THREADS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3

struct __stop_callback_base : __intrusive_node_base<__stop_callback_base> {
  using __callback_fn_t = void(__stop_callback_base*) noexcept;
  _LIBCPP_HIDE_FROM_ABI explicit __stop_callback_base(__callback_fn_t* __callback_fn) : __callback_fn_(__callback_fn) {}

  _LIBCPP_HIDE_FROM_ABI void __invoke() noexcept { __callback_fn_(this); }

  __callback_fn_t* __callback_fn_;
  atomic<bool> __completed_ = false;
  bool* __destroyed_        = nullptr;
};

class __stop_state {
  static constexpr uint32_t __stop_requested_bit        = 1;
  static constexpr uint32_t __callback_list_locked_bit  = 1 << 1;
  static constexpr uint32_t __stop_source_counter_shift = 2;

  // The "stop_source counter" is not used for lifetime reference counting.
  // When the number of stop_source reaches 0, the remaining stop_tokens's
  // stop_possible will return false. We need this counter to track this.
  //
  // The "callback list locked" bit implements the atomic_unique_lock to
  // guard the operations on the callback list
  //
  //       31 - 2          |  1                   |    0           |
  //  stop_source counter  | callback list locked | stop_requested |
  atomic<uint32_t> __state_ = 0;

  // Reference count for stop_token + stop_callback + stop_source
  // When the counter reaches zero, the state is destroyed
  // It is used by __intrusive_shared_ptr, but it is stored here for better layout
  atomic<uint32_t> __ref_count_ = 0;

  using __state_t            = uint32_t;
  using __callback_list_lock = __atomic_unique_lock<__state_t, __callback_list_locked_bit>;
  using __callback_list      = __intrusive_list_view<__stop_callback_base>;

  __callback_list __callback_list_;
  __thread_id __requesting_thread_;

public:
  _LIBCPP_HIDE_FROM_ABI __stop_state() noexcept = default;

  _LIBCPP_HIDE_FROM_ABI void __increment_stop_source_counter() noexcept {
    _LIBCPP_ASSERT_UNCATEGORIZED(
        __state_.load(std::memory_order_relaxed) <= static_cast<__state_t>(~(1 << __stop_source_counter_shift)),
        "stop_source's counter reaches the maximum. Incrementing the counter will overflow");
    __state_.fetch_add(1 << __stop_source_counter_shift, std::memory_order_relaxed);
  }

  // We are not destroying the object after counter decrements to zero, nor do we have
  // operations depend on the ordering of decrementing the counter. relaxed is enough.
  _LIBCPP_HIDE_FROM_ABI void __decrement_stop_source_counter() noexcept {
    _LIBCPP_ASSERT_UNCATEGORIZED(
        __state_.load(std::memory_order_relaxed) >= static_cast<__state_t>(1 << __stop_source_counter_shift),
        "stop_source's counter is 0. Decrementing the counter will underflow");
    __state_.fetch_sub(1 << __stop_source_counter_shift, std::memory_order_relaxed);
  }

  _LIBCPP_HIDE_FROM_ABI bool __stop_requested() const noexcept {
    // acquire because [thread.stoptoken.intro] A call to request_stop that returns true
    // synchronizes with a call to stop_requested on an associated stop_token or stop_source
    // object that returns true.
    // request_stop's compare_exchange_weak has release which syncs with this acquire
    return (__state_.load(std::memory_order_acquire) & __stop_requested_bit) != 0;
  }

  _LIBCPP_HIDE_FROM_ABI bool __stop_possible_for_stop_token() const noexcept {
    // [stoptoken.mem] false if "a stop request was not made and there are no associated stop_source objects"
    // Todo: Can this be std::memory_order_relaxed as the standard does not say anything except not to introduce data
    // race?
    __state_t __curent_state = __state_.load(std::memory_order_acquire);
    return ((__curent_state & __stop_requested_bit) != 0) || ((__curent_state >> __stop_source_counter_shift) != 0);
  }

  _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI bool __request_stop() noexcept {
    auto __cb_list_lock = __try_lock_for_request_stop();
    if (!__cb_list_lock.__owns_lock()) {
      return false;
    }
    __requesting_thread_ = this_thread::get_id();

    while (!__callback_list_.__empty()) {
      auto __cb = __callback_list_.__pop_front();

      // allow other callbacks to be removed while invoking the current callback
      __cb_list_lock.__unlock();

      bool __destroyed   = false;
      __cb->__destroyed_ = &__destroyed;

      __cb->__invoke();

      // __cb's invoke function could potentially delete itself. We need to check before accessing __cb's member
      if (!__destroyed) {
        // needs to set __destroyed_ pointer to nullptr, otherwise it points to a local variable
        // which is to be destroyed at the end of the loop
        __cb->__destroyed_ = nullptr;

        // [stopcallback.cons] If callback is concurrently executing on another thread, then the return
        // from the invocation of callback strongly happens before ([intro.races]) callback is destroyed.
        // this release syncs with the acquire in the remove_callback
        __cb->__completed_.store(true, std::memory_order_release);
        __cb->__completed_.notify_all();
      }

      __cb_list_lock.__lock();
    }

    return true;
  }

  _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI bool __add_callback(__stop_callback_base* __cb) noexcept {
    // If it is already stop_requested. Do not try to request it again.
    const auto __give_up_trying_to_lock_condition = [__cb](__state_t __state) {
      if ((__state & __stop_requested_bit) != 0) {
        // already stop requested, synchronously run the callback and no need to lock the list again
        __cb->__invoke();
        return true;
      }
      // no stop source. no need to lock the list to add the callback as it can never be invoked
      return (__state >> __stop_source_counter_shift) == 0;
    };

    __callback_list_lock __cb_list_lock(__state_, __give_up_trying_to_lock_condition);

    if (!__cb_list_lock.__owns_lock()) {
      return false;
    }

    __callback_list_.__push_front(__cb);

    return true;
    // unlock here: [thread.stoptoken.intro] Registration of a callback synchronizes with the invocation of
    // that callback.
    // Note: this release sync with the acquire in the request_stop' __try_lock_for_request_stop
  }

  // called by the destructor of stop_callback
  _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void __remove_callback(__stop_callback_base* __cb) noexcept {
    __callback_list_lock __cb_list_lock(__state_);

    // under below condition, the request_stop call just popped __cb from the list and could execute it now
    bool __potentially_executing_now = __cb->__prev_ == nullptr && !__callback_list_.__is_head(__cb);

    if (__potentially_executing_now) {
      auto __requested_thread = __requesting_thread_;
      __cb_list_lock.__unlock();

      if (std::this_thread::get_id() != __requested_thread) {
        // [stopcallback.cons] If callback is concurrently executing on another thread, then the return
        // from the invocation of callback strongly happens before ([intro.races]) callback is destroyed.
        __cb->__completed_.wait(false, std::memory_order_acquire);
      } else {
        // The destructor of stop_callback runs on the same thread of the thread that invokes the callback.
        // The callback is potentially invoking its own destuctor. Set the flag to avoid accessing destroyed
        // members on the invoking side
        if (__cb->__destroyed_) {
          *__cb->__destroyed_ = true;
        }
      }
    } else {
      __callback_list_.__remove(__cb);
    }
  }

private:
  _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI __callback_list_lock __try_lock_for_request_stop() noexcept {
    // If it is already stop_requested, do not try to request stop or lock the list again.
    const auto __lock_fail_condition = [](__state_t __state) { return (__state & __stop_requested_bit) != 0; };

    // set locked and requested bit at the same time
    const auto __after_lock_state = [](__state_t __state) {
      return __state | __callback_list_locked_bit | __stop_requested_bit;
    };

    // acq because [thread.stoptoken.intro] Registration of a callback synchronizes with the invocation of that
    //     callback. We are going to invoke the callback after getting the lock, acquire so that we can see the
    //     registration of a callback (and other writes that happens-before the add_callback)
    //     Note: the rel (unlock) in the add_callback syncs with this acq
    // rel because [thread.stoptoken.intro] A call to request_stop that returns true synchronizes with a call
    //     to stop_requested on an associated stop_token or stop_source object that returns true.
    //     We need to make sure that all writes (including user code) before request_stop will be made visible
    //     to the threads that waiting for `stop_requested == true`
    //     Note: this rel syncs with the acq in `stop_requested`
    const auto __locked_ordering = std::memory_order_acq_rel;

    return __callback_list_lock(__state_, __lock_fail_condition, __after_lock_state, __locked_ordering);
  }

  template <class _Tp>
  friend struct __intrusive_shared_ptr_traits;
};

template <class _Tp>
struct __intrusive_shared_ptr_traits;

template <>
struct __intrusive_shared_ptr_traits<__stop_state> {
  _LIBCPP_HIDE_FROM_ABI static atomic<uint32_t>& __get_atomic_ref_count(__stop_state& __state) {
    return __state.__ref_count_;
  }
};

#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_THREADS)
# 233 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___STOP_TOKEN_STOP_STATE_H
# 237 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_state.h" 3
#endif /* stop_state.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_token.h" 2 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_token.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_token.h" 3
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_token.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN) && !defined(_LIBCPP_HAS_NO_THREADS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_token.h" 3

class _LIBCPP_AVAILABILITY_SYNC stop_token {
public:
  _LIBCPP_HIDE_FROM_ABI stop_token() noexcept = default;

  _LIBCPP_HIDE_FROM_ABI stop_token(const stop_token&) noexcept            = default;
  _LIBCPP_HIDE_FROM_ABI stop_token(stop_token&&) noexcept                 = default;
  _LIBCPP_HIDE_FROM_ABI stop_token& operator=(const stop_token&) noexcept = default;
  _LIBCPP_HIDE_FROM_ABI stop_token& operator=(stop_token&&) noexcept      = default;
  _LIBCPP_HIDE_FROM_ABI ~stop_token()                                     = default;

  _LIBCPP_HIDE_FROM_ABI void swap(stop_token& __other) noexcept { __state_.swap(__other.__state_); }

  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool stop_requested() const noexcept {
    return __state_ != nullptr && __state_->__stop_requested();
  }

  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool stop_possible() const noexcept {
    return __state_ != nullptr && __state_->__stop_possible_for_stop_token();
  }

  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI friend bool operator==(const stop_token&, const stop_token&) noexcept = default;

  _LIBCPP_HIDE_FROM_ABI friend void swap(stop_token& __lhs, stop_token& __rhs) noexcept { __lhs.swap(__rhs); }

private:
  __intrusive_shared_ptr<__stop_state> __state_;

  friend class stop_source;
  template <class _Tp>
  friend class stop_callback;

  _LIBCPP_HIDE_FROM_ABI explicit stop_token(const __intrusive_shared_ptr<__stop_state>& __state) : __state_(__state) {}
};

#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN) && !defined(_LIBCPP_HAS_NO_THREADS)
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_token.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___STOP_TOKEN_STOP_TOKEN_H
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__stop_token/stop_token.h" 3
#endif /* stop_token.h expanded by -frewrite-includes */
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 137 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 140 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#endif
# 141 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3

#ifndef _LIBCPP_HAS_NO_THREADS

_LIBCPP_BEGIN_NAMESPACE_STD

class _LIBCPP_EXPORTED_FROM_ABI condition_variable_any
{
    condition_variable __cv_;
    shared_ptr<mutex>  __mut_;
public:
    _LIBCPP_INLINE_VISIBILITY
    condition_variable_any();

    _LIBCPP_INLINE_VISIBILITY
    void notify_one() _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY
    void notify_all() _NOEXCEPT;

    template <class _Lock>
        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
        void wait(_Lock& __lock);
    template <class _Lock, class _Predicate>
        _LIBCPP_INLINE_VISIBILITY
        void wait(_Lock& __lock, _Predicate __pred);

    template <class _Lock, class _Clock, class _Duration>
        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
        cv_status
        wait_until(_Lock& __lock,
                   const chrono::time_point<_Clock, _Duration>& __t);

    template <class _Lock, class _Clock, class _Duration, class _Predicate>
        bool
        _LIBCPP_INLINE_VISIBILITY
        wait_until(_Lock& __lock,
                   const chrono::time_point<_Clock, _Duration>& __t,
                   _Predicate __pred);

    template <class _Lock, class _Rep, class _Period>
        cv_status
        _LIBCPP_INLINE_VISIBILITY
        wait_for(_Lock& __lock,
                 const chrono::duration<_Rep, _Period>& __d);

    template <class _Lock, class _Rep, class _Period, class _Predicate>
        bool
        _LIBCPP_INLINE_VISIBILITY
        wait_for(_Lock& __lock,
                 const chrono::duration<_Rep, _Period>& __d,
                 _Predicate __pred);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 193 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3

    template <class _Lock, class _Predicate>
    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI bool wait(_Lock& __lock, stop_token __stoken, _Predicate __pred);

    template <class _Lock, class _Clock, class _Duration, class _Predicate>
    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI bool wait_until(_Lock& __lock, stop_token __stoken,
                const chrono::time_point<_Clock, _Duration>& __abs_time, _Predicate __pred);

    template <class _Lock, class _Rep, class _Period, class _Predicate>
    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI bool wait_for(_Lock& __lock, stop_token __stoken,
                const chrono::duration<_Rep, _Period>& __rel_time, _Predicate __pred);

#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN)
# 206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
};

inline
condition_variable_any::condition_variable_any()
    : __mut_(make_shared<mutex>()) {}

inline
void
condition_variable_any::notify_one() _NOEXCEPT
{
    {lock_guard<mutex> __lx(*__mut_);}
    __cv_.notify_one();
}

inline
void
condition_variable_any::notify_all() _NOEXCEPT
{
    {lock_guard<mutex> __lx(*__mut_);}
    __cv_.notify_all();
}

struct __lock_external
{
    template <class _Lock>
    _LIBCPP_HIDE_FROM_ABI void operator()(_Lock* __m) {__m->lock();}
};

template <class _Lock>
void
condition_variable_any::wait(_Lock& __lock)
{
    shared_ptr<mutex> __mut = __mut_;
    unique_lock<mutex> __lk(*__mut);
    __lock.unlock();
    unique_ptr<_Lock, __lock_external> __lxx(&__lock);
    lock_guard<unique_lock<mutex> > __lx(__lk, adopt_lock_t());
    __cv_.wait(__lk);
}  // __mut_.unlock(), __lock.lock()

template <class _Lock, class _Predicate>
inline
void
condition_variable_any::wait(_Lock& __lock, _Predicate __pred)
{
    while (!__pred())
        wait(__lock);
}

template <class _Lock, class _Clock, class _Duration>
cv_status
condition_variable_any::wait_until(_Lock& __lock,
                                   const chrono::time_point<_Clock, _Duration>& __t)
{
    shared_ptr<mutex> __mut = __mut_;
    unique_lock<mutex> __lk(*__mut);
    __lock.unlock();
    unique_ptr<_Lock, __lock_external> __lxx(&__lock);
    lock_guard<unique_lock<mutex> > __lx(__lk, adopt_lock_t());
    return __cv_.wait_until(__lk, __t);
}  // __mut_.unlock(), __lock.lock()

template <class _Lock, class _Clock, class _Duration, class _Predicate>
inline
bool
condition_variable_any::wait_until(_Lock& __lock,
                                   const chrono::time_point<_Clock, _Duration>& __t,
                                   _Predicate __pred)
{
    while (!__pred())
        if (wait_until(__lock, __t) == cv_status::timeout)
            return __pred();
    return true;
}

template <class _Lock, class _Rep, class _Period>
inline
cv_status
condition_variable_any::wait_for(_Lock& __lock,
                                 const chrono::duration<_Rep, _Period>& __d)
{
    return wait_until(__lock, chrono::steady_clock::now() + __d);
}

template <class _Lock, class _Rep, class _Period, class _Predicate>
inline
bool
condition_variable_any::wait_for(_Lock& __lock,
                                 const chrono::duration<_Rep, _Period>& __d,
                                 _Predicate __pred)
{
    return wait_until(__lock, chrono::steady_clock::now() + __d,
                      _VSTD::move(__pred));
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 302 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3

template <class _Lock, class _Predicate>
bool condition_variable_any::wait(_Lock& __lock, stop_token __stoken, _Predicate __pred) {
    while (!__stoken.stop_requested()) {
        if (__pred())
            return true;
        wait(__lock);
    }
    return __pred();
}

template <class _Lock, class _Clock, class _Duration, class _Predicate>
bool condition_variable_any::wait_until(
    _Lock& __lock, stop_token __stoken, const chrono::time_point<_Clock, _Duration>& __abs_time, _Predicate __pred) {
    while (!__stoken.stop_requested()) {
        if (__pred())
            return true;
        if (wait_until(__lock, __abs_time) == cv_status::timeout)
            return __pred();
    }
    return __pred();
}

template <class _Lock, class _Rep, class _Period, class _Predicate>
bool condition_variable_any::wait_for(
    _Lock& __lock, stop_token __stoken, const chrono::duration<_Rep, _Period>& __rel_time, _Predicate __pred) {
    return wait_until(__lock, std::move(__stoken), chrono::steady_clock::now() + __rel_time, std::move(__pred));
}

#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN)
# 332 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3

_LIBCPP_EXPORTED_FROM_ABI void notify_all_at_thread_exit(condition_variable&, unique_lock<mutex>);

_LIBCPP_END_NAMESPACE_STD

#endif // !_LIBCPP_HAS_NO_THREADS
# 338 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 340 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#  include <atomic>
#endif /* expanded by -frewrite-includes */
# 340 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 341 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 341 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 342 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdint>
#endif /* expanded by -frewrite-includes */
# 342 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 343 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 343 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 344 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstring>
#endif /* expanded by -frewrite-includes */
# 344 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 345 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#  include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 345 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 346 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#  include <new>
#endif /* expanded by -frewrite-includes */
# 346 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 347 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#  include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 347 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 348 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#  include <system_error>
#endif /* expanded by -frewrite-includes */
# 348 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 349 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 349 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 350 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#if 0 /* expanded by -frewrite-includes */
#  include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 350 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
# 351 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#endif
# 352 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3

#endif // _LIBCPP_CONDITION_VARIABLE
# 354 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/condition_variable" 3
#endif /* condition_variable expanded by -frewrite-includes */
# 735 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* mutex expanded by -frewrite-includes */
#include <mutex>               // NOLINT
#else /* mutex expanded by -frewrite-includes */
# 735 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_MUTEX
#define _LIBCPP_MUTEX

/*
    mutex synopsis

namespace std
{

class mutex
{
public:
     constexpr mutex() noexcept;
     ~mutex();

    mutex(const mutex&) = delete;
    mutex& operator=(const mutex&) = delete;

    void lock();
    bool try_lock();
    void unlock();

    typedef pthread_mutex_t* native_handle_type;
    native_handle_type native_handle();
};

class recursive_mutex
{
public:
     recursive_mutex();
     ~recursive_mutex();

    recursive_mutex(const recursive_mutex&) = delete;
    recursive_mutex& operator=(const recursive_mutex&) = delete;

    void lock();
    bool try_lock() noexcept;
    void unlock();

    typedef pthread_mutex_t* native_handle_type;
    native_handle_type native_handle();
};

class timed_mutex
{
public:
     timed_mutex();
     ~timed_mutex();

    timed_mutex(const timed_mutex&) = delete;
    timed_mutex& operator=(const timed_mutex&) = delete;

    void lock();
    bool try_lock();
    template <class Rep, class Period>
        bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
    template <class Clock, class Duration>
        bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
    void unlock();
};

class recursive_timed_mutex
{
public:
     recursive_timed_mutex();
     ~recursive_timed_mutex();

    recursive_timed_mutex(const recursive_timed_mutex&) = delete;
    recursive_timed_mutex& operator=(const recursive_timed_mutex&) = delete;

    void lock();
    bool try_lock() noexcept;
    template <class Rep, class Period>
        bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
    template <class Clock, class Duration>
        bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
    void unlock();
};

struct defer_lock_t { explicit defer_lock_t() = default; };
struct try_to_lock_t { explicit try_to_lock_t() = default; };
struct adopt_lock_t { explicit adopt_lock_t() = default; };

inline constexpr defer_lock_t  defer_lock{};
inline constexpr try_to_lock_t try_to_lock{};
inline constexpr adopt_lock_t  adopt_lock{};

template <class Mutex>
class lock_guard
{
public:
    typedef Mutex mutex_type;

    explicit lock_guard(mutex_type& m);
    lock_guard(mutex_type& m, adopt_lock_t);
    ~lock_guard();

    lock_guard(lock_guard const&) = delete;
    lock_guard& operator=(lock_guard const&) = delete;
};

template <class... MutexTypes>
class scoped_lock // C++17
{
public:
    using mutex_type = Mutex;  // Only if sizeof...(MutexTypes) == 1

    explicit scoped_lock(MutexTypes&... m);
    scoped_lock(adopt_lock_t, MutexTypes&... m);
    ~scoped_lock();
    scoped_lock(scoped_lock const&) = delete;
    scoped_lock& operator=(scoped_lock const&) = delete;
private:
    tuple<MutexTypes&...> pm; // exposition only
};

template <class Mutex>
class unique_lock
{
public:
    typedef Mutex mutex_type;
    unique_lock() noexcept;
    explicit unique_lock(mutex_type& m);
    unique_lock(mutex_type& m, defer_lock_t) noexcept;
    unique_lock(mutex_type& m, try_to_lock_t);
    unique_lock(mutex_type& m, adopt_lock_t);
    template <class Clock, class Duration>
        unique_lock(mutex_type& m, const chrono::time_point<Clock, Duration>& abs_time);
    template <class Rep, class Period>
        unique_lock(mutex_type& m, const chrono::duration<Rep, Period>& rel_time);
    ~unique_lock();

    unique_lock(unique_lock const&) = delete;
    unique_lock& operator=(unique_lock const&) = delete;

    unique_lock(unique_lock&& u) noexcept;
    unique_lock& operator=(unique_lock&& u) noexcept;

    void lock();
    bool try_lock();

    template <class Rep, class Period>
        bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
    template <class Clock, class Duration>
        bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);

    void unlock();

    void swap(unique_lock& u) noexcept;
    mutex_type* release() noexcept;

    bool owns_lock() const noexcept;
    explicit operator bool () const noexcept;
    mutex_type* mutex() const noexcept;
};

template <class Mutex>
  void swap(unique_lock<Mutex>& x, unique_lock<Mutex>& y) noexcept;

template <class L1, class L2, class... L3>
  int try_lock(L1&, L2&, L3&...);
template <class L1, class L2, class... L3>
  void lock(L1&, L2&, L3&...);

struct once_flag
{
    constexpr once_flag() noexcept;

    once_flag(const once_flag&) = delete;
    once_flag& operator=(const once_flag&) = delete;
};

template<class Callable, class ...Args>
  void call_once(once_flag& flag, Callable&& func, Args&&... args);

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 189 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 190 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <__chrono/steady_clock.h>
#endif /* expanded by -frewrite-includes */
# 190 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 191 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <__chrono/time_point.h>
#endif /* expanded by -frewrite-includes */
# 191 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 192 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <__condition_variable/condition_variable.h>
#endif /* expanded by -frewrite-includes */
# 192 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 193 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 193 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 194 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/shared_ptr.h>
#endif /* expanded by -frewrite-includes */
# 194 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 195 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <__mutex/lock_guard.h>
#endif /* expanded by -frewrite-includes */
# 195 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 196 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <__mutex/mutex.h>
#endif /* expanded by -frewrite-includes */
# 196 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 197 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <__mutex/once_flag.h>
#endif /* expanded by -frewrite-includes */
# 197 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 198 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <__mutex/tag_types.h>
#endif /* expanded by -frewrite-includes */
# 198 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 199 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <__mutex/unique_lock.h>
#endif /* expanded by -frewrite-includes */
# 199 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 200 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <__thread/id.h>
#endif /* expanded by -frewrite-includes */
# 200 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 201 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <__threading_support>
#endif /* expanded by -frewrite-includes */
# 201 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 202 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 203 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 203 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 205 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#ifndef _LIBCPP_CXX03_LANG
#if 0 /* expanded by -frewrite-includes */
# include <tuple>
#endif /* expanded by -frewrite-includes */
# 206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 207 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#endif
# 208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 208 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 209 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 211 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 212 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#endif
# 213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 215 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 216 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 2 3


_LIBCPP_BEGIN_NAMESPACE_STD

#ifndef _LIBCPP_HAS_NO_THREADS

class _LIBCPP_EXPORTED_FROM_ABI recursive_mutex
{
    __libcpp_recursive_mutex_t __m_;

public:
    recursive_mutex();
    ~recursive_mutex();

    recursive_mutex(const recursive_mutex&) = delete;
    recursive_mutex& operator=(const recursive_mutex&) = delete;

    void lock();
    bool try_lock() _NOEXCEPT;
    void unlock()  _NOEXCEPT;

    typedef __libcpp_recursive_mutex_t* native_handle_type;

    _LIBCPP_INLINE_VISIBILITY
    native_handle_type native_handle() {return &__m_;}
};

class _LIBCPP_EXPORTED_FROM_ABI timed_mutex
{
    mutex              __m_;
    condition_variable __cv_;
    bool               __locked_;
public:
     timed_mutex();
     ~timed_mutex();

    timed_mutex(const timed_mutex&) = delete;
    timed_mutex& operator=(const timed_mutex&) = delete;

public:
    void lock();
    bool try_lock() _NOEXCEPT;
    template <class _Rep, class _Period>
        _LIBCPP_INLINE_VISIBILITY
        bool try_lock_for(const chrono::duration<_Rep, _Period>& __d)
            {return try_lock_until(chrono::steady_clock::now() + __d);}
    template <class _Clock, class _Duration>
        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
        bool try_lock_until(const chrono::time_point<_Clock, _Duration>& __t);
    void unlock() _NOEXCEPT;
};

template <class _Clock, class _Duration>
bool
timed_mutex::try_lock_until(const chrono::time_point<_Clock, _Duration>& __t)
{
    using namespace chrono;
    unique_lock<mutex> __lk(__m_);
    bool __no_timeout = _Clock::now() < __t;
    while (__no_timeout && __locked_)
        __no_timeout = __cv_.wait_until(__lk, __t) == cv_status::no_timeout;
    if (!__locked_)
    {
        __locked_ = true;
        return true;
    }
    return false;
}

class _LIBCPP_EXPORTED_FROM_ABI recursive_timed_mutex
{
    mutex              __m_;
    condition_variable __cv_;
    size_t             __count_;
    __thread_id        __id_;
public:
    recursive_timed_mutex();
    ~recursive_timed_mutex();

    recursive_timed_mutex(const recursive_timed_mutex&) = delete;
    recursive_timed_mutex& operator=(const recursive_timed_mutex&) = delete;

    void lock();
    bool try_lock() _NOEXCEPT;
    template <class _Rep, class _Period>
        _LIBCPP_INLINE_VISIBILITY
        bool try_lock_for(const chrono::duration<_Rep, _Period>& __d)
            {return try_lock_until(chrono::steady_clock::now() + __d);}
    template <class _Clock, class _Duration>
        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
        bool try_lock_until(const chrono::time_point<_Clock, _Duration>& __t);
    void unlock() _NOEXCEPT;
};

template <class _Clock, class _Duration>
bool
recursive_timed_mutex::try_lock_until(const chrono::time_point<_Clock, _Duration>& __t)
{
    using namespace chrono;
    __thread_id __id = this_thread::get_id();
    unique_lock<mutex> __lk(__m_);
    if (__id == __id_)
    {
        if (__count_ == numeric_limits<size_t>::max())
            return false;
        ++__count_;
        return true;
    }
    bool __no_timeout = _Clock::now() < __t;
    while (__no_timeout && __count_ != 0)
        __no_timeout = __cv_.wait_until(__lk, __t) == cv_status::no_timeout;
    if (__count_ == 0)
    {
        __count_ = 1;
        __id_ = __id;
        return true;
    }
    return false;
}

template <class _L0, class _L1>
_LIBCPP_HIDE_FROM_ABI int
try_lock(_L0& __l0, _L1& __l1)
{
    unique_lock<_L0> __u0(__l0, try_to_lock_t());
    if (__u0.owns_lock())
    {
        if (__l1.try_lock())
        {
            __u0.release();
            return -1;
        }
        else
            return 1;
    }
    return 0;
}

#ifndef _LIBCPP_CXX03_LANG

template <class _L0, class _L1, class _L2, class... _L3>
_LIBCPP_HIDE_FROM_ABI int
try_lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3)
{
    int __r = 0;
    unique_lock<_L0> __u0(__l0, try_to_lock);
    if (__u0.owns_lock())
    {
        __r = std::try_lock(__l1, __l2, __l3...);
        if (__r == -1)
            __u0.release();
        else
            ++__r;
    }
    return __r;
}

#endif // _LIBCPP_CXX03_LANG
# 374 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3

template <class _L0, class _L1>
_LIBCPP_HIDE_FROM_ABI void
lock(_L0& __l0, _L1& __l1)
{
    while (true)
    {
        {
            unique_lock<_L0> __u0(__l0);
            if (__l1.try_lock())
            {
                __u0.release();
                break;
            }
        }
        __libcpp_thread_yield();
        {
            unique_lock<_L1> __u1(__l1);
            if (__l0.try_lock())
            {
                __u1.release();
                break;
            }
        }
        __libcpp_thread_yield();
    }
}

#ifndef _LIBCPP_CXX03_LANG

template <class _L0, class _L1, class _L2, class ..._L3>
void
__lock_first(int __i, _L0& __l0, _L1& __l1, _L2& __l2, _L3& ...__l3)
{
    while (true)
    {
        switch (__i)
        {
        case 0:
            {
                unique_lock<_L0> __u0(__l0);
                __i = std::try_lock(__l1, __l2, __l3...);
                if (__i == -1)
                {
                    __u0.release();
                    return;
                }
            }
            ++__i;
            __libcpp_thread_yield();
            break;
        case 1:
            {
                unique_lock<_L1> __u1(__l1);
                __i = std::try_lock(__l2, __l3..., __l0);
                if (__i == -1)
                {
                    __u1.release();
                    return;
                }
            }
            if (__i == sizeof...(_L3) + 1)
                __i = 0;
            else
                __i += 2;
            __libcpp_thread_yield();
            break;
        default:
            std::__lock_first(__i - 2, __l2, __l3..., __l0, __l1);
            return;
        }
    }
}

template <class _L0, class _L1, class _L2, class ..._L3>
inline _LIBCPP_INLINE_VISIBILITY
void
lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3& ...__l3)
{
    std::__lock_first(0, __l0, __l1, __l2, __l3...);
}

template <class _L0>
inline _LIBCPP_INLINE_VISIBILITY
void __unlock(_L0& __l0) {
    __l0.unlock();
}

template <class _L0, class _L1>
inline _LIBCPP_INLINE_VISIBILITY
void __unlock(_L0& __l0, _L1& __l1) {
    __l0.unlock();
    __l1.unlock();
}

template <class _L0, class _L1, class _L2, class ..._L3>
inline _LIBCPP_INLINE_VISIBILITY
void __unlock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3) {
    __l0.unlock();
    __l1.unlock();
    _VSTD::__unlock(__l2, __l3...);
}

#endif // _LIBCPP_CXX03_LANG
# 478 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 480 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
template <class ..._Mutexes>
class _LIBCPP_TEMPLATE_VIS scoped_lock;

template <>
class _LIBCPP_TEMPLATE_VIS scoped_lock<> {
public:
    explicit scoped_lock() {}
    ~scoped_lock() = default;

    _LIBCPP_INLINE_VISIBILITY
    explicit scoped_lock(adopt_lock_t) {}

    scoped_lock(scoped_lock const&) = delete;
    scoped_lock& operator=(scoped_lock const&) = delete;
};

template <class _Mutex>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable) scoped_lock<_Mutex> {
public:
    typedef _Mutex  mutex_type;
private:
    mutex_type& __m_;
public:
    explicit scoped_lock(mutex_type & __m) _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_capability(__m))
        : __m_(__m) {__m_.lock();}

    ~scoped_lock() _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability()) {__m_.unlock();}

    _LIBCPP_INLINE_VISIBILITY
    explicit scoped_lock(adopt_lock_t, mutex_type& __m) _LIBCPP_THREAD_SAFETY_ANNOTATION(requires_capability(__m))
        : __m_(__m) {}

    scoped_lock(scoped_lock const&) = delete;
    scoped_lock& operator=(scoped_lock const&) = delete;
};

template <class ..._MArgs>
class _LIBCPP_TEMPLATE_VIS scoped_lock
{
    static_assert(sizeof...(_MArgs) > 1, "At least 2 lock types required");
    typedef tuple<_MArgs&...> _MutexTuple;

public:
    _LIBCPP_INLINE_VISIBILITY
    explicit scoped_lock(_MArgs&... __margs)
      : __t_(__margs...)
    {
        _VSTD::lock(__margs...);
    }

    _LIBCPP_INLINE_VISIBILITY
    scoped_lock(adopt_lock_t, _MArgs&... __margs)
        : __t_(__margs...)
    {
    }

    _LIBCPP_INLINE_VISIBILITY
    ~scoped_lock() {
        typedef typename __make_tuple_indices<sizeof...(_MArgs)>::type _Indices;
        __unlock_unpack(_Indices{}, __t_);
    }

    scoped_lock(scoped_lock const&) = delete;
    scoped_lock& operator=(scoped_lock const&) = delete;

private:
    template <size_t ..._Indx>
    _LIBCPP_INLINE_VISIBILITY
    static void __unlock_unpack(__tuple_indices<_Indx...>, _MutexTuple& __mt) {
        _VSTD::__unlock(_VSTD::get<_Indx>(__mt)...);
    }

    _MutexTuple __t_;
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(scoped_lock);

#endif // _LIBCPP_STD_VER >= 17
# 557 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#endif // !_LIBCPP_HAS_NO_THREADS
# 558 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 564 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#  include <atomic>
#endif /* expanded by -frewrite-includes */
# 564 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 565 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 565 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 566 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 566 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 567 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstring>
#endif /* expanded by -frewrite-includes */
# 567 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 568 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#  include <ctime>
#endif /* expanded by -frewrite-includes */
# 568 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 569 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#  include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 569 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 570 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#  include <new>
#endif /* expanded by -frewrite-includes */
# 570 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 571 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#  include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 571 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 572 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#  include <system_error>
#endif /* expanded by -frewrite-includes */
# 572 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 573 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 573 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 574 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#if 0 /* expanded by -frewrite-includes */
#  include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 574 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
# 575 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#endif
# 576 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3

#endif // _LIBCPP_MUTEX
# 578 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/mutex" 3
#endif /* mutex expanded by -frewrite-includes */
# 736 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" 2
#endif                         // GTEST_IS_THREADSAFE
# 737 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// GTEST_API_ qualifies all symbols that must be exported. The definitions below
// are guarded by #ifndef to give embedders a chance to define GTEST_API_ in
// gtest/internal/custom/gtest-port.h
#ifndef GTEST_API_

#ifdef _MSC_VER
#if 0 /* disabled by -frewrite-includes */
#if GTEST_LINKED_AS_SHARED_LIBRARY
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 745 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_API_ __declspec(dllimport)
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif GTEST_CREATE_SHARED_LIBRARY
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 747 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_API_ __declspec(dllexport)
#endif
# 749 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif __GNUC__ >= 4 || defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 750 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_API_ __attribute__((visibility("default")))
#endif  // _MSC_VER
# 752 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#endif  // GTEST_API_
# 754 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#ifndef GTEST_API_
#define GTEST_API_
#endif  // GTEST_API_
# 758 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#ifndef GTEST_DEFAULT_DEATH_TEST_STYLE
#define GTEST_DEFAULT_DEATH_TEST_STYLE "fast"
#endif  // GTEST_DEFAULT_DEATH_TEST_STYLE
# 762 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#ifdef __GNUC__
// Ask the compiler to never inline a given function.
#define GTEST_NO_INLINE_ __attribute__((noinline))
#else
# 767 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_NO_INLINE_
#endif
# 769 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 771 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Nested ifs to avoid triggering MSVC warning.
#if 0 /* disabled by -frewrite-includes */
#if __has_attribute(disable_tail_calls)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 773 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Ask the compiler not to perform tail call optimization inside
// the marked function.
#define GTEST_NO_TAIL_CALL_ __attribute__((disable_tail_calls))
#endif
# 777 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif __GNUC__
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 778 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_NO_TAIL_CALL_ \
  __attribute__((optimize("no-optimize-sibling-calls")))
#else
# 781 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_NO_TAIL_CALL_
#endif
# 783 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// _LIBCPP_VERSION is defined by the libc++ library from the LLVM project.
#if 0 /* disabled by -frewrite-includes */
#if !defined(GTEST_HAS_CXXABI_H_)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 786 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* disabled by -frewrite-includes */
#if defined(__GLIBCXX__) || (defined(_LIBCPP_VERSION) && !defined(_MSC_VER))
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 787 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_CXXABI_H_ 1
#else
# 789 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_HAS_CXXABI_H_ 0
#endif
# 791 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif
# 792 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// A function level attribute to disable checking for use of uninitialized
// memory when built with MemorySanitizer.
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 796 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* disabled by -frewrite-includes */
#if __has_feature(memory_sanitizer)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 797 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ __attribute__((no_sanitize_memory))
#else
# 799 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_
#endif  // __has_feature(memory_sanitizer)
# 801 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#else
# 802 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_
#endif  // __clang__
# 804 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// A function level attribute to disable AddressSanitizer instrumentation.
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 807 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* disabled by -frewrite-includes */
#if __has_feature(address_sanitizer)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 808 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ \
  __attribute__((no_sanitize_address))
#else
# 811 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
#endif  // __has_feature(address_sanitizer)
# 813 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#else
# 814 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
#endif  // __clang__
# 816 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// A function level attribute to disable HWAddressSanitizer instrumentation.
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 819 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* disabled by -frewrite-includes */
#if __has_feature(hwaddress_sanitizer)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 820 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ \
  __attribute__((no_sanitize("hwaddress")))
#else
# 823 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_
#endif  // __has_feature(hwaddress_sanitizer)
# 825 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#else
# 826 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_
#endif  // __clang__
# 828 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// A function level attribute to disable ThreadSanitizer instrumentation.
#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 831 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* disabled by -frewrite-includes */
#if __has_feature(thread_sanitizer)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 832 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ __attribute__((no_sanitize_thread))
#else
# 834 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_
#endif  // __has_feature(thread_sanitizer)
# 836 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#else
# 837 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_
#endif  // __clang__
# 839 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

namespace testing {

class Message;

// Legacy imports for backwards compatibility.
// New code should use std:: names directly.
using std::get;
using std::make_tuple;
using std::tuple;
using std::tuple_element;
using std::tuple_size;

namespace internal {

// A secret type that Google Test users don't know about.  It has no
// definition on purpose.  Therefore it's impossible to create a
// Secret object, which is what we want.
class Secret;

// A helper for suppressing warnings on constant condition.  It just
// returns 'condition'.
GTEST_API_ bool IsTrue(bool condition);

// Defines RE.

#if 0 /* disabled by -frewrite-includes */
#if GTEST_USES_RE2
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 866 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// This is almost `using RE = ::RE2`, except it is copy-constructible, and it
// needs to disambiguate the `std::string`, `absl::string_view`, and `const
// char*` constructors.
class GTEST_API_ RE {
 public:
  RE(absl::string_view regex) : regex_(regex) {}                  // NOLINT
  RE(const char* regex) : RE(absl::string_view(regex)) {}         // NOLINT
  RE(const std::string& regex) : RE(absl::string_view(regex)) {}  // NOLINT
  RE(const RE& other) : RE(other.pattern()) {}

  const std::string& pattern() const { return regex_.pattern(); }

  static bool FullMatch(absl::string_view str, const RE& re) {
    return RE2::FullMatch(str, re.regex_);
  }
  static bool PartialMatch(absl::string_view str, const RE& re) {
    return RE2::PartialMatch(str, re.regex_);
  }

 private:
  RE2 regex_;
};

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif GTEST_USES_POSIX_RE || GTEST_USES_SIMPLE_RE
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 891 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// A simple C++ wrapper for <regex.h>.  It uses the POSIX Extended
// Regular Expression syntax.
class GTEST_API_ RE {
 public:
  // A copy constructor is required by the Standard to initialize object
  // references from r-values.
  RE(const RE& other) { Init(other.pattern()); }

  // Constructs an RE from a string.
  RE(const ::std::string& regex) { Init(regex.c_str()); }  // NOLINT

  RE(const char* regex) { Init(regex); }  // NOLINT
  ~RE();

  // Returns the string representation of the regex.
  const char* pattern() const { return pattern_; }

  // FullMatch(str, re) returns true if and only if regular expression re
  // matches the entire str.
  // PartialMatch(str, re) returns true if and only if regular expression re
  // matches a substring of str (including str itself).
  static bool FullMatch(const ::std::string& str, const RE& re) {
    return FullMatch(str.c_str(), re);
  }
  static bool PartialMatch(const ::std::string& str, const RE& re) {
    return PartialMatch(str.c_str(), re);
  }

  static bool FullMatch(const char* str, const RE& re);
  static bool PartialMatch(const char* str, const RE& re);

 private:
  void Init(const char* regex);
  const char* pattern_;
  bool is_valid_;

#if 0 /* disabled by -frewrite-includes */
#if GTEST_USES_POSIX_RE
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 929 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

  regex_t full_regex_;     // For FullMatch().
  regex_t partial_regex_;  // For PartialMatch().

#else  // GTEST_USES_SIMPLE_RE
# 934 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

  const char* full_pattern_;  // For FullMatch();

#endif
# 938 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
};

#endif  // ::testing::internal::RE implementation
# 941 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Formats a source file path and a line number as they would appear
// in an error message from the compiler used to compile this code.
GTEST_API_ ::std::string FormatFileLocation(const char* file, int line);

// Formats a file location for compiler-independent XML output.
// Although this function is not platform dependent, we put it next to
// FormatFileLocation in order to contrast the two functions.
GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(const char* file,
                                                               int line);

// Defines logging utilities:
//   GTEST_LOG_(severity) - logs messages at the specified severity level. The
//                          message itself is streamed into the macro.
//   LogToStderr()  - directs all log messages to stderr.
//   FlushInfoLog() - flushes informational log messages.

enum GTestLogSeverity { GTEST_INFO, GTEST_WARNING, GTEST_ERROR, GTEST_FATAL };

// Formats log entry severity, provides a stream object for streaming the
// log message, and terminates the message with a newline when going out of
// scope.
class GTEST_API_ GTestLog {
 public:
  GTestLog(GTestLogSeverity severity, const char* file, int line);

  // Flushes the buffers and, if severity is GTEST_FATAL, aborts the program.
  ~GTestLog();

  ::std::ostream& GetStream() { return ::std::cerr; }

 private:
  const GTestLogSeverity severity_;

  GTestLog(const GTestLog&) = delete;
  GTestLog& operator=(const GTestLog&) = delete;
};

#if 0 /* disabled by -frewrite-includes */
#if !defined(GTEST_LOG_)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 980 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#define GTEST_LOG_(severity)                                           \
  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
                                __FILE__, __LINE__)                    \
      .GetStream()

inline void LogToStderr() {}
inline void FlushInfoLog() { fflush(nullptr); }

#endif  // !defined(GTEST_LOG_)
# 990 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if !defined(GTEST_CHECK_)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 992 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// INTERNAL IMPLEMENTATION - DO NOT USE.
//
// GTEST_CHECK_ is an all-mode assert. It aborts the program if the condition
// is not satisfied.
//  Synopsis:
//    GTEST_CHECK_(boolean_condition);
//     or
//    GTEST_CHECK_(boolean_condition) << "Additional message";
//
//    This checks the condition and if the condition is not satisfied
//    it prints message about the condition violation, including the
//    condition itself, plus additional message streamed into it, if any,
//    and then it aborts the program. It aborts the program irrespective of
//    whether it is built in the debug mode or not.
#define GTEST_CHECK_(condition)               \
  GTEST_AMBIGUOUS_ELSE_BLOCKER_               \
  if (::testing::internal::IsTrue(condition)) \
    ;                                         \
  else                                        \
    GTEST_LOG_(FATAL) << "Condition " #condition " failed. "
#endif  // !defined(GTEST_CHECK_)
# 1013 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// An all-mode assert to verify that the given POSIX-style function
// call returns 0 (indicating success).  Known limitation: this
// doesn't expand to a balanced 'if' statement, so enclose the macro
// in {} if you need to use it as the only statement in an 'if'
// branch.
#define GTEST_CHECK_POSIX_SUCCESS_(posix_call) \
  if (const int gtest_error = (posix_call))    \
  GTEST_LOG_(FATAL) << #posix_call << "failed with error " << gtest_error

// Transforms "T" into "const T&" according to standard reference collapsing
// rules (this is only needed as a backport for C++98 compilers that do not
// support reference collapsing). Specifically, it transforms:
//
//   char         ==> const char&
//   const char   ==> const char&
//   char&        ==> char&
//   const char&  ==> const char&
//
// Note that the non-const reference will not have "const" added. This is
// standard, and necessary so that "T" can always bind to "const T&".
template <typename T>
struct ConstRef {
  typedef const T& type;
};
template <typename T>
struct ConstRef<T&> {
  typedef T& type;
};

// The argument T must depend on some template parameters.
#define GTEST_REFERENCE_TO_CONST_(T) \
  typename ::testing::internal::ConstRef<T>::type

// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
//
// Use ImplicitCast_ as a safe version of static_cast for upcasting in
// the type hierarchy (e.g. casting a Foo* to a SuperclassOfFoo* or a
// const Foo*).  When you use ImplicitCast_, the compiler checks that
// the cast is safe.  Such explicit ImplicitCast_s are necessary in
// surprisingly many situations where C++ demands an exact type match
// instead of an argument type convertible to a target type.
//
// The syntax for using ImplicitCast_ is the same as for static_cast:
//
//   ImplicitCast_<ToType>(expr)
//
// ImplicitCast_ would have been part of the C++ standard library,
// but the proposal was submitted too late.  It will probably make
// its way into the language in the future.
//
// This relatively ugly name is intentional. It prevents clashes with
// similar functions users may have (e.g., implicit_cast). The internal
// namespace alone is not enough because the function can be found by ADL.
template <typename To>
inline To ImplicitCast_(To x) {
  return x;
}

// When you upcast (that is, cast a pointer from type Foo to type
// SuperclassOfFoo), it's fine to use ImplicitCast_<>, since upcasts
// always succeed.  When you downcast (that is, cast a pointer from
// type Foo to type SubclassOfFoo), static_cast<> isn't safe, because
// how do you know the pointer is really of type SubclassOfFoo?  It
// could be a bare Foo, or of type DifferentSubclassOfFoo.  Thus,
// when you downcast, you should use this macro.  In debug mode, we
// use dynamic_cast<> to double-check the downcast is legal (we die
// if it's not).  In normal mode, we do the efficient static_cast<>
// instead.  Thus, it's important to test in debug mode to make sure
// the cast is legal!
//    This is the only place in the code we should use dynamic_cast<>.
// In particular, you SHOULDN'T be using dynamic_cast<> in order to
// do RTTI (eg code like this:
//    if (dynamic_cast<Subclass1>(foo)) HandleASubclass1Object(foo);
//    if (dynamic_cast<Subclass2>(foo)) HandleASubclass2Object(foo);
// You should design the code some other way not to need this.
//
// This relatively ugly name is intentional. It prevents clashes with
// similar functions users may have (e.g., down_cast). The internal
// namespace alone is not enough because the function can be found by ADL.
template <typename To, typename From>  // use like this: DownCast_<T*>(foo);
inline To DownCast_(From* f) {         // so we only accept pointers
  // Ensures that To is a sub-type of From *.  This test is here only
  // for compile-time type checking, and has no overhead in an
  // optimized build at run-time, as it will be optimized away
  // completely.
  GTEST_INTENTIONAL_CONST_COND_PUSH_()
  if (false) {
    GTEST_INTENTIONAL_CONST_COND_POP_()
    const To to = nullptr;
    ::testing::internal::ImplicitCast_<From*>(to);
  }

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_RTTI
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1107 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
  // RTTI: debug mode only!
  GTEST_CHECK_(f == nullptr || dynamic_cast<To>(f) != nullptr);
#endif
# 1110 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
  return static_cast<To>(f);
}

// Downcasts the pointer of type Base to Derived.
// Derived must be a subclass of Base. The parameter MUST
// point to a class of type Derived, not any subclass of it.
// When RTTI is available, the function performs a runtime
// check to enforce this.
template <class Derived, class Base>
Derived* CheckedDowncastToActualType(Base* base) {
#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_RTTI
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1121 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
  GTEST_CHECK_(typeid(*base) == typeid(Derived));
#endif
# 1123 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_DOWNCAST_
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1125 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
  return ::down_cast<Derived*>(base);
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif GTEST_HAS_RTTI
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 1127 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
  return dynamic_cast<Derived*>(base);  // NOLINT
#else
# 1129 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
  return static_cast<Derived*>(base);  // Poor man's downcast.
#endif
# 1131 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
}

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_STREAM_REDIRECTION
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1134 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Defines the stderr capturer:
//   CaptureStdout     - starts capturing stdout.
//   GetCapturedStdout - stops capturing stdout and returns the captured string.
//   CaptureStderr     - starts capturing stderr.
//   GetCapturedStderr - stops capturing stderr and returns the captured string.
//
GTEST_API_ void CaptureStdout();
GTEST_API_ std::string GetCapturedStdout();
GTEST_API_ void CaptureStderr();
GTEST_API_ std::string GetCapturedStderr();

#endif  // GTEST_HAS_STREAM_REDIRECTION
# 1147 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Returns the size (in bytes) of a file.
GTEST_API_ size_t GetFileSize(FILE* file);

// Reads the entire content of a file as a string.
GTEST_API_ std::string ReadEntireFile(FILE* file);

// All command line arguments.
GTEST_API_ std::vector<std::string> GetArgvs();

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_DEATH_TEST
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1157 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

std::vector<std::string> GetInjectableArgvs();
// Deprecated: pass the args vector by value instead.
void SetInjectableArgvs(const std::vector<std::string>* new_argvs);
void SetInjectableArgvs(const std::vector<std::string>& new_argvs);
void ClearInjectableArgvs();

#endif  // GTEST_HAS_DEATH_TEST
# 1165 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Defines synchronization primitives.
#if 0 /* disabled by -frewrite-includes */
#if GTEST_IS_THREADSAFE
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1168 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_WINDOWS
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1170 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Provides leak-safe Windows kernel handle ownership.
// Used in death tests and in threading support.
class GTEST_API_ AutoHandle {
 public:
  // Assume that Win32 HANDLE type is equivalent to void*. Doing so allows us to
  // avoid including <windows.h> in this header file. Including <windows.h> is
  // undesirable because it defines a lot of symbols and macros that tend to
  // conflict with client code. This assumption is verified by
  // WindowsTypesTest.HANDLEIsVoidStar.
  typedef void* Handle;
  AutoHandle();
  explicit AutoHandle(Handle handle);

  ~AutoHandle();

  Handle Get() const;
  void Reset();
  void Reset(Handle handle);

 private:
  // Returns true if and only if the handle is a valid handle object that can be
  // closed.
  bool IsCloseable() const;

  Handle handle_;

  AutoHandle(const AutoHandle&) = delete;
  AutoHandle& operator=(const AutoHandle&) = delete;
};
#endif
# 1200 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_NOTIFICATION_
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1202 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Notification has already been imported into the namespace.
// Nothing to do here.

#else
# 1206 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
/* class A needs to have dll-interface to be used by clients of class B */)

// Allows a controller thread to pause execution of newly created
// threads until notified.  Instances of this class must be created
// and destroyed in the controller thread.
//
// This class is only for testing Google Test's own constructs. Do not
// use it in user tests, either directly or indirectly.
// TODO(b/203539622): Replace unconditionally with absl::Notification.
class GTEST_API_ Notification {
 public:
  Notification() : notified_(false) {}
  Notification(const Notification&) = delete;
  Notification& operator=(const Notification&) = delete;

  // Notifies all threads created with this notification to start. Must
  // be called from the controller thread.
  void Notify() {
    std::lock_guard<std::mutex> lock(mu_);
    notified_ = true;
    cv_.notify_all();
  }

  // Blocks until the controller thread notifies. Must be called from a test
  // thread.
  void WaitForNotification() {
    std::unique_lock<std::mutex> lock(mu_);
    cv_.wait(lock, [this]() { return notified_; });
  }

 private:
  std::mutex mu_;
  std::condition_variable cv_;
  bool notified_;
};
GTEST_DISABLE_MSC_WARNINGS_POP_()  // 4251
#endif  // GTEST_HAS_NOTIFICATION_
# 1244 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// On MinGW, we can have both GTEST_OS_WINDOWS and GTEST_HAS_PTHREAD
// defined, but we don't want to use MinGW's pthreads implementation, which
// has conformance problems with some versions of the POSIX standard.
#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_PTHREAD && !GTEST_OS_WINDOWS_MINGW
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1249 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// As a C-function, ThreadFuncWithCLinkage cannot be templated itself.
// Consequently, it cannot select a correct instantiation of ThreadWithParam
// in order to call its Run(). Introducing ThreadWithParamBase as a
// non-templated base class for ThreadWithParam allows us to bypass this
// problem.
class ThreadWithParamBase {
 public:
  virtual ~ThreadWithParamBase() {}
  virtual void Run() = 0;
};

// pthread_create() accepts a pointer to a function type with the C linkage.
// According to the Standard (7.5/1), function types with different linkages
// are different even if they are otherwise identical.  Some compilers (for
// example, SunStudio) treat them as different types.  Since class methods
// cannot be defined with C-linkage we need to define a free C-function to
// pass into pthread_create().
extern "C" inline void* ThreadFuncWithCLinkage(void* thread) {
  static_cast<ThreadWithParamBase*>(thread)->Run();
  return nullptr;
}

// Helper class for testing Google Test's multi-threading constructs.
// To use it, write:
//
//   void ThreadFunc(int param) { /* Do things with param */ }
//   Notification thread_can_start;
//   ...
//   // The thread_can_start parameter is optional; you can supply NULL.
//   ThreadWithParam<int> thread(&ThreadFunc, 5, &thread_can_start);
//   thread_can_start.Notify();
//
// These classes are only for testing Google Test's own constructs. Do
// not use them in user tests, either directly or indirectly.
template <typename T>
class ThreadWithParam : public ThreadWithParamBase {
 public:
  typedef void UserThreadFunc(T);

  ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start)
      : func_(func),
        param_(param),
        thread_can_start_(thread_can_start),
        finished_(false) {
    ThreadWithParamBase* const base = this;
    // The thread can be created only after all fields except thread_
    // have been initialized.
    GTEST_CHECK_POSIX_SUCCESS_(
        pthread_create(&thread_, nullptr, &ThreadFuncWithCLinkage, base));
  }
  ~ThreadWithParam() override { Join(); }

  void Join() {
    if (!finished_) {
      GTEST_CHECK_POSIX_SUCCESS_(pthread_join(thread_, nullptr));
      finished_ = true;
    }
  }

  void Run() override {
    if (thread_can_start_ != nullptr) thread_can_start_->WaitForNotification();
    func_(param_);
  }

 private:
  UserThreadFunc* const func_;  // User-supplied thread function.
  const T param_;  // User-supplied parameter to the thread function.
  // When non-NULL, used to block execution until the controller thread
  // notifies.
  Notification* const thread_can_start_;
  bool finished_;  // true if and only if we know that the thread function has
                   // finished.
  pthread_t thread_;  // The native thread object.

  ThreadWithParam(const ThreadWithParam&) = delete;
  ThreadWithParam& operator=(const ThreadWithParam&) = delete;
};
#endif  // !GTEST_OS_WINDOWS && GTEST_HAS_PTHREAD ||
# 1328 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
        // GTEST_HAS_MUTEX_AND_THREAD_LOCAL_

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_MUTEX_AND_THREAD_LOCAL_
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1331 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Mutex and ThreadLocal have already been imported into the namespace.
// Nothing to do here.

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 1335 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Mutex implements mutex on Windows platforms.  It is used in conjunction
// with class MutexLock:
//
//   Mutex mutex;
//   ...
//   MutexLock lock(&mutex);  // Acquires the mutex and releases it at the
//                            // end of the current scope.
//
// A static Mutex *must* be defined or declared using one of the following
// macros:
//   GTEST_DEFINE_STATIC_MUTEX_(g_some_mutex);
//   GTEST_DECLARE_STATIC_MUTEX_(g_some_mutex);
//
// (A non-static Mutex is defined/declared in the usual way).
class GTEST_API_ Mutex {
 public:
  enum MutexType { kStatic = 0, kDynamic = 1 };
  // We rely on kStaticMutex being 0 as it is to what the linker initializes
  // type_ in static mutexes.  critical_section_ will be initialized lazily
  // in ThreadSafeLazyInit().
  enum StaticConstructorSelector { kStaticMutex = 0 };

  // This constructor intentionally does nothing.  It relies on type_ being
  // statically initialized to 0 (effectively setting it to kStatic) and on
  // ThreadSafeLazyInit() to lazily initialize the rest of the members.
  explicit Mutex(StaticConstructorSelector /*dummy*/) {}

  Mutex();
  ~Mutex();

  void Lock();

  void Unlock();

  // Does nothing if the current thread holds the mutex. Otherwise, crashes
  // with high probability.
  void AssertHeld();

 private:
  // Initializes owner_thread_id_ and critical_section_ in static mutexes.
  void ThreadSafeLazyInit();

  // Per https://blogs.msdn.microsoft.com/oldnewthing/20040223-00/?p=40503,
  // we assume that 0 is an invalid value for thread IDs.
  unsigned int owner_thread_id_;

  // For static mutexes, we rely on these members being initialized to zeros
  // by the linker.
  MutexType type_;
  long critical_section_init_phase_;  // NOLINT
  GTEST_CRITICAL_SECTION* critical_section_;

  Mutex(const Mutex&) = delete;
  Mutex& operator=(const Mutex&) = delete;
};

#define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
  extern ::testing::internal::Mutex mutex

#define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
  ::testing::internal::Mutex mutex(::testing::internal::Mutex::kStaticMutex)

// We cannot name this class MutexLock because the ctor declaration would
// conflict with a macro named MutexLock, which is defined on some
// platforms. That macro is used as a defensive measure to prevent against
// inadvertent misuses of MutexLock like "MutexLock(&mu)" rather than
// "MutexLock l(&mu)".  Hence the typedef trick below.
class GTestMutexLock {
 public:
  explicit GTestMutexLock(Mutex* mutex) : mutex_(mutex) { mutex_->Lock(); }

  ~GTestMutexLock() { mutex_->Unlock(); }

 private:
  Mutex* const mutex_;

  GTestMutexLock(const GTestMutexLock&) = delete;
  GTestMutexLock& operator=(const GTestMutexLock&) = delete;
};

typedef GTestMutexLock MutexLock;

// Base class for ValueHolder<T>.  Allows a caller to hold and delete a value
// without knowing its type.
class ThreadLocalValueHolderBase {
 public:
  virtual ~ThreadLocalValueHolderBase() {}
};

// Provides a way for a thread to send notifications to a ThreadLocal
// regardless of its parameter type.
class ThreadLocalBase {
 public:
  // Creates a new ValueHolder<T> object holding a default value passed to
  // this ThreadLocal<T>'s constructor and returns it.  It is the caller's
  // responsibility not to call this when the ThreadLocal<T> instance already
  // has a value on the current thread.
  virtual ThreadLocalValueHolderBase* NewValueForCurrentThread() const = 0;

 protected:
  ThreadLocalBase() {}
  virtual ~ThreadLocalBase() {}

 private:
  ThreadLocalBase(const ThreadLocalBase&) = delete;
  ThreadLocalBase& operator=(const ThreadLocalBase&) = delete;
};

// Maps a thread to a set of ThreadLocals that have values instantiated on that
// thread and notifies them when the thread exits.  A ThreadLocal instance is
// expected to persist until all threads it has values on have terminated.
class GTEST_API_ ThreadLocalRegistry {
 public:
  // Registers thread_local_instance as having value on the current thread.
  // Returns a value that can be used to identify the thread from other threads.
  static ThreadLocalValueHolderBase* GetValueOnCurrentThread(
      const ThreadLocalBase* thread_local_instance);

  // Invoked when a ThreadLocal instance is destroyed.
  static void OnThreadLocalDestroyed(
      const ThreadLocalBase* thread_local_instance);
};

class GTEST_API_ ThreadWithParamBase {
 public:
  void Join();

 protected:
  class Runnable {
   public:
    virtual ~Runnable() {}
    virtual void Run() = 0;
  };

  ThreadWithParamBase(Runnable* runnable, Notification* thread_can_start);
  virtual ~ThreadWithParamBase();

 private:
  AutoHandle thread_;
};

// Helper class for testing Google Test's multi-threading constructs.
template <typename T>
class ThreadWithParam : public ThreadWithParamBase {
 public:
  typedef void UserThreadFunc(T);

  ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start)
      : ThreadWithParamBase(new RunnableImpl(func, param), thread_can_start) {}
  virtual ~ThreadWithParam() {}

 private:
  class RunnableImpl : public Runnable {
   public:
    RunnableImpl(UserThreadFunc* func, T param) : func_(func), param_(param) {}
    virtual ~RunnableImpl() {}
    virtual void Run() { func_(param_); }

   private:
    UserThreadFunc* const func_;
    const T param_;

    RunnableImpl(const RunnableImpl&) = delete;
    RunnableImpl& operator=(const RunnableImpl&) = delete;
  };

  ThreadWithParam(const ThreadWithParam&) = delete;
  ThreadWithParam& operator=(const ThreadWithParam&) = delete;
};

// Implements thread-local storage on Windows systems.
//
//   // Thread 1
//   ThreadLocal<int> tl(100);  // 100 is the default value for each thread.
//
//   // Thread 2
//   tl.set(150);  // Changes the value for thread 2 only.
//   EXPECT_EQ(150, tl.get());
//
//   // Thread 1
//   EXPECT_EQ(100, tl.get());  // In thread 1, tl has the original value.
//   tl.set(200);
//   EXPECT_EQ(200, tl.get());
//
// The template type argument T must have a public copy constructor.
// In addition, the default ThreadLocal constructor requires T to have
// a public default constructor.
//
// The users of a TheadLocal instance have to make sure that all but one
// threads (including the main one) using that instance have exited before
// destroying it. Otherwise, the per-thread objects managed for them by the
// ThreadLocal instance are not guaranteed to be destroyed on all platforms.
//
// Google Test only uses global ThreadLocal objects.  That means they
// will die after main() has returned.  Therefore, no per-thread
// object managed by Google Test will be leaked as long as all threads
// using Google Test have exited when main() returns.
template <typename T>
class ThreadLocal : public ThreadLocalBase {
 public:
  ThreadLocal() : default_factory_(new DefaultValueHolderFactory()) {}
  explicit ThreadLocal(const T& value)
      : default_factory_(new InstanceValueHolderFactory(value)) {}

  ~ThreadLocal() override { ThreadLocalRegistry::OnThreadLocalDestroyed(this); }

  T* pointer() { return GetOrCreateValue(); }
  const T* pointer() const { return GetOrCreateValue(); }
  const T& get() const { return *pointer(); }
  void set(const T& value) { *pointer() = value; }

 private:
  // Holds a value of T.  Can be deleted via its base class without the caller
  // knowing the type of T.
  class ValueHolder : public ThreadLocalValueHolderBase {
   public:
    ValueHolder() : value_() {}
    explicit ValueHolder(const T& value) : value_(value) {}

    T* pointer() { return &value_; }

   private:
    T value_;
    ValueHolder(const ValueHolder&) = delete;
    ValueHolder& operator=(const ValueHolder&) = delete;
  };

  T* GetOrCreateValue() const {
    return static_cast<ValueHolder*>(
               ThreadLocalRegistry::GetValueOnCurrentThread(this))
        ->pointer();
  }

  ThreadLocalValueHolderBase* NewValueForCurrentThread() const override {
    return default_factory_->MakeNewHolder();
  }

  class ValueHolderFactory {
   public:
    ValueHolderFactory() {}
    virtual ~ValueHolderFactory() {}
    virtual ValueHolder* MakeNewHolder() const = 0;

   private:
    ValueHolderFactory(const ValueHolderFactory&) = delete;
    ValueHolderFactory& operator=(const ValueHolderFactory&) = delete;
  };

  class DefaultValueHolderFactory : public ValueHolderFactory {
   public:
    DefaultValueHolderFactory() {}
    ValueHolder* MakeNewHolder() const override { return new ValueHolder(); }

   private:
    DefaultValueHolderFactory(const DefaultValueHolderFactory&) = delete;
    DefaultValueHolderFactory& operator=(const DefaultValueHolderFactory&) =
        delete;
  };

  class InstanceValueHolderFactory : public ValueHolderFactory {
   public:
    explicit InstanceValueHolderFactory(const T& value) : value_(value) {}
    ValueHolder* MakeNewHolder() const override {
      return new ValueHolder(value_);
    }

   private:
    const T value_;  // The value for each thread.

    InstanceValueHolderFactory(const InstanceValueHolderFactory&) = delete;
    InstanceValueHolderFactory& operator=(const InstanceValueHolderFactory&) =
        delete;
  };

  std::unique_ptr<ValueHolderFactory> default_factory_;

  ThreadLocal(const ThreadLocal&) = delete;
  ThreadLocal& operator=(const ThreadLocal&) = delete;
};

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif GTEST_HAS_PTHREAD
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 1617 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// MutexBase and Mutex implement mutex on pthreads-based platforms.
class MutexBase {
 public:
  // Acquires this mutex.
  void Lock() {
    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));
    owner_ = pthread_self();
    has_owner_ = true;
  }

  // Releases this mutex.
  void Unlock() {
    // Since the lock is being released the owner_ field should no longer be
    // considered valid. We don't protect writing to has_owner_ here, as it's
    // the caller's responsibility to ensure that the current thread holds the
    // mutex when this is called.
    has_owner_ = false;
    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_));
  }

  // Does nothing if the current thread holds the mutex. Otherwise, crashes
  // with high probability.
  void AssertHeld() const {
    GTEST_CHECK_(has_owner_ && pthread_equal(owner_, pthread_self()))
        << "The current thread is not holding the mutex @" << this;
  }

  // A static mutex may be used before main() is entered.  It may even
  // be used before the dynamic initialization stage.  Therefore we
  // must be able to initialize a static mutex object at link time.
  // This means MutexBase has to be a POD and its member variables
  // have to be public.
 public:
  pthread_mutex_t mutex_;  // The underlying pthread mutex.
  // has_owner_ indicates whether the owner_ field below contains a valid thread
  // ID and is therefore safe to inspect (e.g., to use in pthread_equal()). All
  // accesses to the owner_ field should be protected by a check of this field.
  // An alternative might be to memset() owner_ to all zeros, but there's no
  // guarantee that a zero'd pthread_t is necessarily invalid or even different
  // from pthread_self().
  bool has_owner_;
  pthread_t owner_;  // The thread holding the mutex.
};

// Forward-declares a static mutex.
#define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
  extern ::testing::internal::MutexBase mutex

// Defines and statically (i.e. at link time) initializes a static mutex.
// The initialization list here does not explicitly initialize each field,
// instead relying on default initialization for the unspecified fields. In
// particular, the owner_ field (a pthread_t) is not explicitly initialized.
// This allows initialization to work whether pthread_t is a scalar or struct.
// The flag -Wmissing-field-initializers must not be specified for this to work.
#define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
  ::testing::internal::MutexBase mutex = {PTHREAD_MUTEX_INITIALIZER, false, 0}

// The Mutex class can only be used for mutexes created at runtime. It
// shares its API with MutexBase otherwise.
class Mutex : public MutexBase {
 public:
  Mutex() {
    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, nullptr));
    has_owner_ = false;
  }
  ~Mutex() { GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_destroy(&mutex_)); }

 private:
  Mutex(const Mutex&) = delete;
  Mutex& operator=(const Mutex&) = delete;
};

// We cannot name this class MutexLock because the ctor declaration would
// conflict with a macro named MutexLock, which is defined on some
// platforms. That macro is used as a defensive measure to prevent against
// inadvertent misuses of MutexLock like "MutexLock(&mu)" rather than
// "MutexLock l(&mu)".  Hence the typedef trick below.
class GTestMutexLock {
 public:
  explicit GTestMutexLock(MutexBase* mutex) : mutex_(mutex) { mutex_->Lock(); }

  ~GTestMutexLock() { mutex_->Unlock(); }

 private:
  MutexBase* const mutex_;

  GTestMutexLock(const GTestMutexLock&) = delete;
  GTestMutexLock& operator=(const GTestMutexLock&) = delete;
};

typedef GTestMutexLock MutexLock;

// Helpers for ThreadLocal.

// pthread_key_create() requires DeleteThreadLocalValue() to have
// C-linkage.  Therefore it cannot be templatized to access
// ThreadLocal<T>.  Hence the need for class
// ThreadLocalValueHolderBase.
class GTEST_API_ ThreadLocalValueHolderBase {
 public:
  virtual ~ThreadLocalValueHolderBase() {}
};

// Called by pthread to delete thread-local data stored by
// pthread_setspecific().
extern "C" inline void DeleteThreadLocalValue(void* value_holder) {
  delete static_cast<ThreadLocalValueHolderBase*>(value_holder);
}

// Implements thread-local storage on pthreads-based systems.
template <typename T>
class GTEST_API_ ThreadLocal {
 public:
  ThreadLocal()
      : key_(CreateKey()), default_factory_(new DefaultValueHolderFactory()) {}
  explicit ThreadLocal(const T& value)
      : key_(CreateKey()),
        default_factory_(new InstanceValueHolderFactory(value)) {}

  ~ThreadLocal() {
    // Destroys the managed object for the current thread, if any.
    DeleteThreadLocalValue(pthread_getspecific(key_));

    // Releases resources associated with the key.  This will *not*
    // delete managed objects for other threads.
    GTEST_CHECK_POSIX_SUCCESS_(pthread_key_delete(key_));
  }

  T* pointer() { return GetOrCreateValue(); }
  const T* pointer() const { return GetOrCreateValue(); }
  const T& get() const { return *pointer(); }
  void set(const T& value) { *pointer() = value; }

 private:
  // Holds a value of type T.
  class ValueHolder : public ThreadLocalValueHolderBase {
   public:
    ValueHolder() : value_() {}
    explicit ValueHolder(const T& value) : value_(value) {}

    T* pointer() { return &value_; }

   private:
    T value_;
    ValueHolder(const ValueHolder&) = delete;
    ValueHolder& operator=(const ValueHolder&) = delete;
  };

  static pthread_key_t CreateKey() {
    pthread_key_t key;
    // When a thread exits, DeleteThreadLocalValue() will be called on
    // the object managed for that thread.
    GTEST_CHECK_POSIX_SUCCESS_(
        pthread_key_create(&key, &DeleteThreadLocalValue));
    return key;
  }

  T* GetOrCreateValue() const {
    ThreadLocalValueHolderBase* const holder =
        static_cast<ThreadLocalValueHolderBase*>(pthread_getspecific(key_));
    if (holder != nullptr) {
      return CheckedDowncastToActualType<ValueHolder>(holder)->pointer();
    }

    ValueHolder* const new_holder = default_factory_->MakeNewHolder();
    ThreadLocalValueHolderBase* const holder_base = new_holder;
    GTEST_CHECK_POSIX_SUCCESS_(pthread_setspecific(key_, holder_base));
    return new_holder->pointer();
  }

  class ValueHolderFactory {
   public:
    ValueHolderFactory() {}
    virtual ~ValueHolderFactory() {}
    virtual ValueHolder* MakeNewHolder() const = 0;

   private:
    ValueHolderFactory(const ValueHolderFactory&) = delete;
    ValueHolderFactory& operator=(const ValueHolderFactory&) = delete;
  };

  class DefaultValueHolderFactory : public ValueHolderFactory {
   public:
    DefaultValueHolderFactory() {}
    ValueHolder* MakeNewHolder() const override { return new ValueHolder(); }

   private:
    DefaultValueHolderFactory(const DefaultValueHolderFactory&) = delete;
    DefaultValueHolderFactory& operator=(const DefaultValueHolderFactory&) =
        delete;
  };

  class InstanceValueHolderFactory : public ValueHolderFactory {
   public:
    explicit InstanceValueHolderFactory(const T& value) : value_(value) {}
    ValueHolder* MakeNewHolder() const override {
      return new ValueHolder(value_);
    }

   private:
    const T value_;  // The value for each thread.

    InstanceValueHolderFactory(const InstanceValueHolderFactory&) = delete;
    InstanceValueHolderFactory& operator=(const InstanceValueHolderFactory&) =
        delete;
  };

  // A key pthreads uses for looking up per-thread values.
  const pthread_key_t key_;
  std::unique_ptr<ValueHolderFactory> default_factory_;

  ThreadLocal(const ThreadLocal&) = delete;
  ThreadLocal& operator=(const ThreadLocal&) = delete;
};

#endif  // GTEST_HAS_MUTEX_AND_THREAD_LOCAL_
# 1834 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#else  // GTEST_IS_THREADSAFE
# 1836 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// A dummy implementation of synchronization primitives (mutex, lock,
// and thread-local variable).  Necessary for compiling Google Test where
// mutex is not supported - using Google Test in multiple threads is not
// supported on such platforms.

class Mutex {
 public:
  Mutex() {}
  void Lock() {}
  void Unlock() {}
  void AssertHeld() const {}
};

#define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
  extern ::testing::internal::Mutex mutex

#define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex

// We cannot name this class MutexLock because the ctor declaration would
// conflict with a macro named MutexLock, which is defined on some
// platforms. That macro is used as a defensive measure to prevent against
// inadvertent misuses of MutexLock like "MutexLock(&mu)" rather than
// "MutexLock l(&mu)".  Hence the typedef trick below.
class GTestMutexLock {
 public:
  explicit GTestMutexLock(Mutex*) {}  // NOLINT
};

typedef GTestMutexLock MutexLock;

template <typename T>
class GTEST_API_ ThreadLocal {
 public:
  ThreadLocal() : value_() {}
  explicit ThreadLocal(const T& value) : value_(value) {}
  T* pointer() { return &value_; }
  const T* pointer() const { return &value_; }
  const T& get() const { return value_; }
  void set(const T& value) { value_ = value; }

 private:
  T value_;
};

#endif  // GTEST_IS_THREADSAFE
# 1882 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Returns the number of threads running in the process, or 0 to indicate that
// we cannot detect it.
GTEST_API_ size_t GetThreadCount();

#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_WINDOWS
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1888 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_PATH_SEP_ "\\"
#define GTEST_HAS_ALT_PATH_SEP_ 1
#else
# 1891 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_PATH_SEP_ "/"
#define GTEST_HAS_ALT_PATH_SEP_ 0
#endif  // GTEST_OS_WINDOWS
# 1894 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Utilities for char.

// isspace(int ch) and friends accept an unsigned char or EOF.  char
// may be signed, depending on the compiler (or compiler flags).
// Therefore we need to cast a char to unsigned char before calling
// isspace(), etc.

inline bool IsAlpha(char ch) {
  return isalpha(static_cast<unsigned char>(ch)) != 0;
}
inline bool IsAlNum(char ch) {
  return isalnum(static_cast<unsigned char>(ch)) != 0;
}
inline bool IsDigit(char ch) {
  return isdigit(static_cast<unsigned char>(ch)) != 0;
}
inline bool IsLower(char ch) {
  return islower(static_cast<unsigned char>(ch)) != 0;
}
inline bool IsSpace(char ch) {
  return isspace(static_cast<unsigned char>(ch)) != 0;
}
inline bool IsUpper(char ch) {
  return isupper(static_cast<unsigned char>(ch)) != 0;
}
inline bool IsXDigit(char ch) {
  return isxdigit(static_cast<unsigned char>(ch)) != 0;
}
#ifdef __cpp_char8_t
inline bool IsXDigit(char8_t ch) {
  return isxdigit(static_cast<unsigned char>(ch)) != 0;
}
#endif
# 1928 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
inline bool IsXDigit(char16_t ch) {
  const unsigned char low_byte = static_cast<unsigned char>(ch);
  return ch == low_byte && isxdigit(low_byte) != 0;
}
inline bool IsXDigit(char32_t ch) {
  const unsigned char low_byte = static_cast<unsigned char>(ch);
  return ch == low_byte && isxdigit(low_byte) != 0;
}
inline bool IsXDigit(wchar_t ch) {
  const unsigned char low_byte = static_cast<unsigned char>(ch);
  return ch == low_byte && isxdigit(low_byte) != 0;
}

inline char ToLower(char ch) {
  return static_cast<char>(tolower(static_cast<unsigned char>(ch)));
}
inline char ToUpper(char ch) {
  return static_cast<char>(toupper(static_cast<unsigned char>(ch)));
}

inline std::string StripTrailingSpaces(std::string str) {
  std::string::iterator it = str.end();
  while (it != str.begin() && IsSpace(*--it)) it = str.erase(it);
  return str;
}

// The testing::internal::posix namespace holds wrappers for common
// POSIX functions.  These wrappers hide the differences between
// Windows/MSVC and POSIX systems.  Since some compilers define these
// standard functions as macros, the wrapper cannot have the same name
// as the wrapped function.

namespace posix {

// Functions with a different name on Windows.

#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_WINDOWS
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1965 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

typedef struct _stat StatStruct;

#ifdef __BORLANDC__
inline int DoIsATTY(int fd) { return isatty(fd); }
inline int StrCaseCmp(const char* s1, const char* s2) {
  return stricmp(s1, s2);
}
inline char* StrDup(const char* src) { return strdup(src); }
#else  // !__BORLANDC__
# 1975 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_ZOS || GTEST_OS_IOS || \
    GTEST_OS_WINDOWS_PHONE || GTEST_OS_WINDOWS_RT || defined(ESP_PLATFORM)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1977 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
inline int DoIsATTY(int /* fd */) { return 0; }
#else
# 1979 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
inline int DoIsATTY(int fd) { return _isatty(fd); }
#endif  // GTEST_OS_WINDOWS_MOBILE
# 1981 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
inline int StrCaseCmp(const char* s1, const char* s2) {
  return _stricmp(s1, s2);
}
inline char* StrDup(const char* src) { return _strdup(src); }
#endif  // __BORLANDC__
# 1986 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_WINDOWS_MOBILE
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1988 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
inline int FileNo(FILE* file) { return reinterpret_cast<int>(_fileno(file)); }
// Stat(), RmDir(), and IsDir() are not needed on Windows CE at this
// time and thus not defined there.
#else
# 1992 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
inline int FileNo(FILE* file) { return _fileno(file); }
inline int Stat(const char* path, StatStruct* buf) { return _stat(path, buf); }
inline int RmDir(const char* dir) { return _rmdir(dir); }
inline bool IsDir(const StatStruct& st) { return (_S_IFDIR & st.st_mode) != 0; }
#endif  // GTEST_OS_WINDOWS_MOBILE
# 1997 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif GTEST_OS_ESP8266
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 1999 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
typedef struct stat StatStruct;

inline int FileNo(FILE* file) { return fileno(file); }
inline int DoIsATTY(int fd) { return isatty(fd); }
inline int Stat(const char* path, StatStruct* buf) {
  // stat function not implemented on ESP8266
  return 0;
}
inline int StrCaseCmp(const char* s1, const char* s2) {
  return strcasecmp(s1, s2);
}
inline char* StrDup(const char* src) { return strdup(src); }
inline int RmDir(const char* dir) { return rmdir(dir); }
inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); }

#else
# 2015 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

typedef struct stat StatStruct;

inline int FileNo(FILE* file) { return fileno(file); }
inline int DoIsATTY(int fd) { return isatty(fd); }
inline int Stat(const char* path, StatStruct* buf) { return stat(path, buf); }
inline int StrCaseCmp(const char* s1, const char* s2) {
  return strcasecmp(s1, s2);
}
inline char* StrDup(const char* src) { return strdup(src); }
#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_QURT
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2026 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// QuRT doesn't support any directory functions, including rmdir
inline int RmDir(const char*) { return 0; }
#else
# 2029 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
inline int RmDir(const char* dir) { return rmdir(dir); }
#endif
# 2031 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); }

#endif  // GTEST_OS_WINDOWS
# 2034 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

inline int IsATTY(int fd) {
  // DoIsATTY might change errno (for example ENOTTY in case you redirect stdout
  // to a file on Linux), which is unexpected, so save the previous value, and
  // restore it after the call.
  int savedErrno = errno;
  int isAttyValue = DoIsATTY(fd);
  errno = savedErrno;

  return isAttyValue;
}

// Functions deprecated by MSVC 8.0.

GTEST_DISABLE_MSC_DEPRECATED_PUSH_()

// ChDir(), FReopen(), FDOpen(), Read(), Write(), Close(), and
// StrError() aren't needed on Windows CE at this time and thus not
// defined there.

#if 0 /* disabled by -frewrite-includes */
#if !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_WINDOWS_PHONE &&           \
    !GTEST_OS_WINDOWS_RT && !GTEST_OS_ESP8266 && !GTEST_OS_XTENSA && \
    !GTEST_OS_QURT
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2057 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
inline int ChDir(const char* dir) { return chdir(dir); }
#endif
# 2059 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
inline FILE* FOpen(const char* path, const char* mode) {
#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2061 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
  struct wchar_codecvt : public std::codecvt<wchar_t, char, std::mbstate_t> {};
  std::wstring_convert<wchar_codecvt> converter;
  std::wstring wide_path = converter.from_bytes(path);
  std::wstring wide_mode = converter.from_bytes(mode);
  return _wfopen(wide_path.c_str(), wide_mode.c_str());
#else   // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW
# 2067 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
  return fopen(path, mode);
#endif  // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW
# 2069 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
}
#if 0 /* disabled by -frewrite-includes */
#if !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_QURT
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2071 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
inline FILE* FReopen(const char* path, const char* mode, FILE* stream) {
  return freopen(path, mode, stream);
}
inline FILE* FDOpen(int fd, const char* mode) { return fdopen(fd, mode); }
#endif
# 2076 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
inline int FClose(FILE* fp) { return fclose(fp); }
#if 0 /* disabled by -frewrite-includes */
#if !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_QURT
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2078 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
inline int Read(int fd, void* buf, unsigned int count) {
  return static_cast<int>(read(fd, buf, count));
}
inline int Write(int fd, const void* buf, unsigned int count) {
  return static_cast<int>(write(fd, buf, count));
}
inline int Close(int fd) { return close(fd); }
inline const char* StrError(int errnum) { return strerror(errnum); }
#endif
# 2087 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
inline const char* GetEnv(const char* name) {
#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE ||          \
    GTEST_OS_WINDOWS_RT || GTEST_OS_ESP8266 || GTEST_OS_XTENSA || \
    GTEST_OS_QURT
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2091 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
  // We are on an embedded platform, which has no environment variables.
  static_cast<void>(name);  // To prevent 'unused argument' warning.
  return nullptr;
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 2095 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
  // Environment variables which we programmatically clear will be set to the
  // empty string rather than unset (NULL).  Handle that case.
  const char* const env = getenv(name);
  return (env != nullptr && env[0] != '\0') ? env : nullptr;
#else
# 2100 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
  return getenv(name);
#endif
# 2102 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
}

GTEST_DISABLE_MSC_DEPRECATED_POP_()

#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_WINDOWS_MOBILE
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2107 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Windows CE has no C library. The abort() function is used in
// several places in Google Test. This implementation provides a reasonable
// imitation of standard behaviour.
[[noreturn]] void Abort();
#else
# 2112 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
[[noreturn]] inline void Abort() { abort(); }
#endif  // GTEST_OS_WINDOWS_MOBILE
# 2114 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

}  // namespace posix

// MSVC "deprecates" snprintf and issues warnings wherever it is used.  In
// order to avoid these warnings, we need to use _snprintf or _snprintf_s on
// MSVC-based platforms.  We map the GTEST_SNPRINTF_ macro to the appropriate
// function in order to achieve that.  We use macro definition here because
// snprintf is a variadic function.
#if 0 /* disabled by -frewrite-includes */
#if _MSC_VER && !GTEST_OS_WINDOWS_MOBILE
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2123 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// MSVC 2005 and above support variadic macros.
#define GTEST_SNPRINTF_(buffer, size, format, ...) \
  _snprintf_s(buffer, size, size, format, __VA_ARGS__)
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_MSC_VER)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 2127 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Windows CE does not define _snprintf_s
#define GTEST_SNPRINTF_ _snprintf
#else
# 2130 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_SNPRINTF_ snprintf
#endif
# 2132 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// The biggest signed integer type the compiler supports.
//
// long long is guaranteed to be at least 64-bits in C++11.
using BiggestInt = long long;  // NOLINT

// The maximum number a BiggestInt can represent.
constexpr BiggestInt kMaxBiggestInt = (std::numeric_limits<BiggestInt>::max)();

// This template class serves as a compile-time function from size to
// type.  It maps a size in bytes to a primitive type with that
// size. e.g.
//
//   TypeWithSize<4>::UInt
//
// is typedef-ed to be unsigned int (unsigned integer made up of 4
// bytes).
//
// Such functionality should belong to STL, but I cannot find it
// there.
//
// Google Test uses this class in the implementation of floating-point
// comparison.
//
// For now it only handles UInt (unsigned int) as that's all Google Test
// needs.  Other types can be easily added in the future if need
// arises.
template <size_t size>
class TypeWithSize {
 public:
  // This prevents the user from using TypeWithSize<N> with incorrect
  // values of N.
  using UInt = void;
};

// The specialization for size 4.
template <>
class TypeWithSize<4> {
 public:
  using Int = std::int32_t;
  using UInt = std::uint32_t;
};

// The specialization for size 8.
template <>
class TypeWithSize<8> {
 public:
  using Int = std::int64_t;
  using UInt = std::uint64_t;
};

// Integer types of known sizes.
using TimeInMillis = int64_t;  // Represents time in milliseconds.

// Utilities for command line flags and environment variables.

// Macro for referencing flags.
#if 0 /* disabled by -frewrite-includes */
#if !defined(GTEST_FLAG)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2190 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_FLAG_NAME_(name) gtest_##name
#define GTEST_FLAG(name) FLAGS_gtest_##name
#endif  // !defined(GTEST_FLAG)
# 2193 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Pick a command line flags implementation.
#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_ABSL
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2196 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Macros for defining flags.
#define GTEST_DEFINE_bool_(name, default_val, doc) \
  ABSL_FLAG(bool, GTEST_FLAG_NAME_(name), default_val, doc)
#define GTEST_DEFINE_int32_(name, default_val, doc) \
  ABSL_FLAG(int32_t, GTEST_FLAG_NAME_(name), default_val, doc)
#define GTEST_DEFINE_string_(name, default_val, doc) \
  ABSL_FLAG(std::string, GTEST_FLAG_NAME_(name), default_val, doc)

// Macros for declaring flags.
#define GTEST_DECLARE_bool_(name) \
  ABSL_DECLARE_FLAG(bool, GTEST_FLAG_NAME_(name))
#define GTEST_DECLARE_int32_(name) \
  ABSL_DECLARE_FLAG(int32_t, GTEST_FLAG_NAME_(name))
#define GTEST_DECLARE_string_(name) \
  ABSL_DECLARE_FLAG(std::string, GTEST_FLAG_NAME_(name))

#define GTEST_FLAG_SAVER_ ::absl::FlagSaver

#define GTEST_FLAG_GET(name) ::absl::GetFlag(GTEST_FLAG(name))
#define GTEST_FLAG_SET(name, value) \
  (void)(::absl::SetFlag(&GTEST_FLAG(name), value))
#define GTEST_USE_OWN_FLAGFILE_FLAG_ 0

#else  // GTEST_HAS_ABSL
# 2221 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Macros for defining flags.
#define GTEST_DEFINE_bool_(name, default_val, doc)  \
  namespace testing {                               \
  GTEST_API_ bool GTEST_FLAG(name) = (default_val); \
  }                                                 \
  static_assert(true, "no-op to require trailing semicolon")
#define GTEST_DEFINE_int32_(name, default_val, doc)         \
  namespace testing {                                       \
  GTEST_API_ std::int32_t GTEST_FLAG(name) = (default_val); \
  }                                                         \
  static_assert(true, "no-op to require trailing semicolon")
#define GTEST_DEFINE_string_(name, default_val, doc)         \
  namespace testing {                                        \
  GTEST_API_ ::std::string GTEST_FLAG(name) = (default_val); \
  }                                                          \
  static_assert(true, "no-op to require trailing semicolon")

// Macros for declaring flags.
#define GTEST_DECLARE_bool_(name)          \
  namespace testing {                      \
  GTEST_API_ extern bool GTEST_FLAG(name); \
  }                                        \
  static_assert(true, "no-op to require trailing semicolon")
#define GTEST_DECLARE_int32_(name)                 \
  namespace testing {                              \
  GTEST_API_ extern std::int32_t GTEST_FLAG(name); \
  }                                                \
  static_assert(true, "no-op to require trailing semicolon")
#define GTEST_DECLARE_string_(name)                 \
  namespace testing {                               \
  GTEST_API_ extern ::std::string GTEST_FLAG(name); \
  }                                                 \
  static_assert(true, "no-op to require trailing semicolon")

#define GTEST_FLAG_SAVER_ ::testing::internal::GTestFlagSaver

#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
#define GTEST_USE_OWN_FLAGFILE_FLAG_ 1

#endif  // GTEST_HAS_ABSL
# 2263 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Thread annotations
#if 0 /* disabled by -frewrite-includes */
#if !defined(GTEST_EXCLUSIVE_LOCK_REQUIRED_)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2266 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)
#define GTEST_LOCK_EXCLUDED_(locks)
#endif  // !defined(GTEST_EXCLUSIVE_LOCK_REQUIRED_)
# 2269 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Parses 'str' for a 32-bit signed integer.  If successful, writes the result
// to *value and returns true; otherwise leaves *value unchanged and returns
// false.
GTEST_API_ bool ParseInt32(const Message& src_text, const char* str,
                           int32_t* value);

// Parses a bool/int32_t/string from the environment variable
// corresponding to the given Google Test flag.
bool BoolFromGTestEnv(const char* flag, bool default_val);
GTEST_API_ int32_t Int32FromGTestEnv(const char* flag, int32_t default_val);
std::string OutputFlagAlsoCheckEnvVar();
const char* StringFromGTestEnv(const char* flag, const char* default_val);

}  // namespace internal
}  // namespace testing

#if 0 /* disabled by -frewrite-includes */
#if !defined(GTEST_INTERNAL_DEPRECATED)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2287 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

// Internal Macro to mark an API deprecated, for googletest usage only
// Usage: class GTEST_INTERNAL_DEPRECATED(message) MyClass or
// GTEST_INTERNAL_DEPRECATED(message) <return_type> myFunction(); Every usage of
// a deprecated entity will trigger a warning when compiled with
// `-Wdeprecated-declarations` option (clang, gcc, any __GNUC__ compiler).
// For msvc /W3 option will need to be used
// Note that for 'other' compilers this macro evaluates to nothing to prevent
// compilations errors.
#if 0 /* disabled by -frewrite-includes */
#if defined(_MSC_VER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2297 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_INTERNAL_DEPRECATED(message) __declspec(deprecated(message))
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__GNUC__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 1 /* evaluated by -frewrite-includes */
# 2299 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_INTERNAL_DEPRECATED(message) __attribute__((deprecated(message)))
#else
# 2301 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#define GTEST_INTERNAL_DEPRECATED(message)
#endif
# 2303 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#endif  // !defined(GTEST_INTERNAL_DEPRECATED)
# 2305 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_ABSL
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2307 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Always use absl::any for UniversalPrinter<> specializations if googletest
// is built with absl support.
#define GTEST_INTERNAL_HAS_ANY 1
#if 0 /* expanded by -frewrite-includes */
#include "absl/types/any.h"
#endif /* expanded by -frewrite-includes */
# 2310 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 2311 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
namespace testing {
namespace internal {
using Any = ::absl::any;
}  // namespace internal
}  // namespace testing
#else
# 2317 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#ifdef __has_include
#if 0 /* disabled by -frewrite-includes */
#if __has_include(<any>) && __cplusplus >= 201703L
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2319 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Otherwise for C++17 and higher use std::any for UniversalPrinter<>
// specializations.
#define GTEST_INTERNAL_HAS_ANY 1
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* any expanded by -frewrite-includes */
#include <any>
#else /* any expanded by -frewrite-includes */
# 2322 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_ANY
#define _LIBCPP_ANY

/*
   any synopsis

namespace std {

  class bad_any_cast : public bad_cast
  {
  public:
    virtual const char* what() const noexcept;
  };

  class any
  {
  public:

    // 6.3.1 any construct/destruct
    any() noexcept;

    any(const any& other);
    any(any&& other) noexcept;

    template <class ValueType>
      any(ValueType&& value);

    ~any();

    // 6.3.2 any assignments
    any& operator=(const any& rhs);
    any& operator=(any&& rhs) noexcept;

    template <class ValueType>
      any& operator=(ValueType&& rhs);

    // 6.3.3 any modifiers
    template <class ValueType, class... Args>
      decay_t<ValueType>& emplace(Args&&... args);
    template <class ValueType, class U, class... Args>
      decay_t<ValueType>& emplace(initializer_list<U>, Args&&...);
    void reset() noexcept;
    void swap(any& rhs) noexcept;

    // 6.3.4 any observers
    bool has_value() const noexcept;
    const type_info& type() const noexcept;
  };

   // 6.4 Non-member functions
  void swap(any& x, any& y) noexcept;

  template <class T, class ...Args>
    any make_any(Args&& ...args);
  template <class T, class U, class ...Args>
    any make_any(initializer_list<U>, Args&& ...args);

  template<class ValueType>
    ValueType any_cast(const any& operand);
  template<class ValueType>
    ValueType any_cast(any& operand);
  template<class ValueType>
    ValueType any_cast(any&& operand);

  template<class ValueType>
    const ValueType* any_cast(const any* operand) noexcept;
  template<class ValueType>
    ValueType* any_cast(any* operand) noexcept;

} // namespace std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 83 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 85 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator.h>
#endif /* expanded by -frewrite-includes */
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_destructor.h>
#endif /* expanded by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/unique_ptr.h>
#endif /* expanded by -frewrite-includes */
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_const.h>
#endif /* expanded by -frewrite-includes */
# 90 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_pointer.h>
#endif /* expanded by -frewrite-includes */
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/aligned_storage.h>
#endif /* expanded by -frewrite-includes */
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 93 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/alignment_of.h>
#endif /* expanded by -frewrite-includes */
# 93 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_function.h>
#endif /* expanded by -frewrite-includes */
# 98 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 100 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 100 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cv.h>
#endif /* expanded by -frewrite-includes */
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_reference.h>
#endif /* expanded by -frewrite-includes */
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/in_place.h>
#endif /* expanded by -frewrite-includes */
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/unreachable.h>
#endif /* expanded by -frewrite-includes */
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <__verbose_abort>
#endif /* expanded by -frewrite-includes */
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 112 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 113 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 115 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#endif
# 117 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 119 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 2 3

namespace std {
class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast
{
public:
    const char* what() const _NOEXCEPT override;
};
} // namespace std

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 132 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3

_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
void __throw_bad_any_cast()
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    throw bad_any_cast();
#else
# 140 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
    _LIBCPP_VERBOSE_ABORT("bad_any_cast was thrown in -fno-exceptions mode");
#endif
# 142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
}

// Forward declarations
class _LIBCPP_TEMPLATE_VIS any;

template <class _ValueType>
_LIBCPP_INLINE_VISIBILITY
add_pointer_t<add_const_t<_ValueType>>
any_cast(any const *) _NOEXCEPT;

template <class _ValueType>
_LIBCPP_INLINE_VISIBILITY
add_pointer_t<_ValueType> any_cast(any *) _NOEXCEPT;

namespace __any_imp
{
  _LIBCPP_SUPPRESS_DEPRECATED_PUSH
  using _Buffer = aligned_storage_t<3*sizeof(void*), alignment_of<void*>::value>;
  _LIBCPP_SUPPRESS_DEPRECATED_POP

  template <class _Tp>
  using _IsSmallObject = integral_constant<bool
        , sizeof(_Tp) <= sizeof(_Buffer)
          && alignment_of<_Buffer>::value
             % alignment_of<_Tp>::value == 0
          && is_nothrow_move_constructible<_Tp>::value
        >;

  enum class _Action {
    _Destroy,
    _Copy,
    _Move,
    _Get,
    _TypeInfo
  };

  template <class _Tp> struct _SmallHandler;
  template <class _Tp> struct _LargeHandler;

  template <class _Tp>
  struct  _LIBCPP_TEMPLATE_VIS __unique_typeinfo { static constexpr int __id = 0; };
  template <class _Tp> constexpr int __unique_typeinfo<_Tp>::__id;

  template <class _Tp>
  inline _LIBCPP_INLINE_VISIBILITY
  constexpr const void* __get_fallback_typeid() {
      return &__unique_typeinfo<remove_cv_t<remove_reference_t<_Tp>>>::__id;
  }

  template <class _Tp>
  inline _LIBCPP_INLINE_VISIBILITY
  bool __compare_typeid(type_info const* __id, const void* __fallback_id)
  {
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_RTTI)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 196 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
      if (__id && *__id == typeid(_Tp))
          return true;
#endif
# 199 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
      if (!__id && __fallback_id == __any_imp::__get_fallback_typeid<_Tp>())
          return true;
      return false;
  }

  template <class _Tp>
  using _Handler = conditional_t<
    _IsSmallObject<_Tp>::value, _SmallHandler<_Tp>, _LargeHandler<_Tp>>;

} // namespace __any_imp

class _LIBCPP_TEMPLATE_VIS any
{
public:
  // construct/destruct
  _LIBCPP_INLINE_VISIBILITY
  constexpr any() _NOEXCEPT : __h_(nullptr) {}

  _LIBCPP_INLINE_VISIBILITY
  any(any const & __other) : __h_(nullptr)
  {
    if (__other.__h_) __other.__call(_Action::_Copy, this);
  }

  _LIBCPP_INLINE_VISIBILITY
  any(any && __other) _NOEXCEPT : __h_(nullptr)
  {
    if (__other.__h_) __other.__call(_Action::_Move, this);
  }

  template <
      class _ValueType
    , class _Tp = decay_t<_ValueType>
    , class = enable_if_t<
        !is_same<_Tp, any>::value &&
        !__is_inplace_type<_ValueType>::value &&
        is_copy_constructible<_Tp>::value>
    >
  _LIBCPP_INLINE_VISIBILITY
  any(_ValueType && __value);

  template <class _ValueType, class ..._Args,
    class _Tp = decay_t<_ValueType>,
    class = enable_if_t<
        is_constructible<_Tp, _Args...>::value &&
        is_copy_constructible<_Tp>::value
    >
  >
  _LIBCPP_INLINE_VISIBILITY
  explicit any(in_place_type_t<_ValueType>, _Args&&... __args);

  template <class _ValueType, class _Up, class ..._Args,
    class _Tp = decay_t<_ValueType>,
    class = enable_if_t<
        is_constructible<_Tp, initializer_list<_Up>&, _Args...>::value &&
        is_copy_constructible<_Tp>::value>
  >
  _LIBCPP_INLINE_VISIBILITY
  explicit any(in_place_type_t<_ValueType>, initializer_list<_Up>, _Args&&... __args);

  _LIBCPP_INLINE_VISIBILITY
  ~any() { this->reset(); }

  // assignments
  _LIBCPP_INLINE_VISIBILITY
  any & operator=(any const & __rhs) {
    any(__rhs).swap(*this);
    return *this;
  }

  _LIBCPP_INLINE_VISIBILITY
  any & operator=(any && __rhs) _NOEXCEPT {
    any(_VSTD::move(__rhs)).swap(*this);
    return *this;
  }

  template <
      class _ValueType
    , class _Tp = decay_t<_ValueType>
    , class = enable_if_t<
          !is_same<_Tp, any>::value
          && is_copy_constructible<_Tp>::value>
    >
  _LIBCPP_INLINE_VISIBILITY
  any & operator=(_ValueType && __rhs);

  template <class _ValueType, class ..._Args,
    class _Tp = decay_t<_ValueType>,
    class = enable_if_t<
        is_constructible<_Tp, _Args...>::value &&
        is_copy_constructible<_Tp>::value>
    >
  _LIBCPP_INLINE_VISIBILITY
  _Tp& emplace(_Args&&...);

  template <class _ValueType, class _Up, class ..._Args,
    class _Tp = decay_t<_ValueType>,
    class = enable_if_t<
        is_constructible<_Tp, initializer_list<_Up>&, _Args...>::value &&
        is_copy_constructible<_Tp>::value>
  >
  _LIBCPP_INLINE_VISIBILITY
  _Tp& emplace(initializer_list<_Up>, _Args&&...);

  // 6.3.3 any modifiers
  _LIBCPP_INLINE_VISIBILITY
  void reset() _NOEXCEPT { if (__h_) this->__call(_Action::_Destroy); }

  _LIBCPP_INLINE_VISIBILITY
  void swap(any & __rhs) _NOEXCEPT;

  // 6.3.4 any observers
  _LIBCPP_INLINE_VISIBILITY
  bool has_value() const _NOEXCEPT { return __h_ != nullptr; }

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_RTTI)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 315 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
  _LIBCPP_INLINE_VISIBILITY
  const type_info & type() const _NOEXCEPT {
    if (__h_) {
        return *static_cast<type_info const *>(this->__call(_Action::_TypeInfo));
    } else {
        return typeid(void);
    }
  }
#endif
# 324 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3

private:
    typedef __any_imp::_Action _Action;
    using _HandleFuncPtr =  void* (*)(_Action, any const *, any *, const type_info *,
      const void* __fallback_info);

    union _Storage {
        _LIBCPP_HIDE_FROM_ABI constexpr _Storage() : __ptr(nullptr) {}
        void *  __ptr;
        __any_imp::_Buffer __buf;
    };

    _LIBCPP_INLINE_VISIBILITY
    void * __call(_Action __a, any * __other = nullptr,
                  type_info const * __info = nullptr,
                   const void* __fallback_info = nullptr) const
    {
        return __h_(__a, this, __other, __info, __fallback_info);
    }

    _LIBCPP_INLINE_VISIBILITY
    void * __call(_Action __a, any * __other = nullptr,
                  type_info const * __info = nullptr,
                  const void* __fallback_info = nullptr)
    {
        return __h_(__a, this, __other, __info, __fallback_info);
    }

    template <class>
    friend struct __any_imp::_SmallHandler;
    template <class>
    friend struct __any_imp::_LargeHandler;

    template <class _ValueType>
    friend add_pointer_t<add_const_t<_ValueType>>
    any_cast(any const *) _NOEXCEPT;

    template <class _ValueType>
    friend add_pointer_t<_ValueType>
    any_cast(any *) _NOEXCEPT;

    _HandleFuncPtr __h_ = nullptr;
    _Storage __s_;
};

namespace __any_imp
{
  template <class _Tp>
  struct _LIBCPP_TEMPLATE_VIS _SmallHandler
  {
     _LIBCPP_INLINE_VISIBILITY
     static void* __handle(_Action __act, any const * __this, any * __other,
                           type_info const * __info, const void* __fallback_info)
     {
        switch (__act)
        {
        case _Action::_Destroy:
          __destroy(const_cast<any &>(*__this));
          return nullptr;
        case _Action::_Copy:
            __copy(*__this, *__other);
            return nullptr;
        case _Action::_Move:
          __move(const_cast<any &>(*__this), *__other);
          return nullptr;
        case _Action::_Get:
            return __get(const_cast<any &>(*__this), __info, __fallback_info);
        case _Action::_TypeInfo:
          return __type_info();
        }
        __libcpp_unreachable();
    }

    template <class ..._Args>
    _LIBCPP_INLINE_VISIBILITY
    static _Tp& __create(any & __dest, _Args&&... __args) {
        typedef allocator<_Tp> _Alloc;
        typedef allocator_traits<_Alloc> _ATraits;
        _Alloc __a;
        _Tp * __ret = static_cast<_Tp*>(static_cast<void*>(&__dest.__s_.__buf));
        _ATraits::construct(__a, __ret, _VSTD::forward<_Args>(__args)...);
        __dest.__h_ = &_SmallHandler::__handle;
        return *__ret;
    }

  private:
    _LIBCPP_INLINE_VISIBILITY
    static void __destroy(any & __this) {
        typedef allocator<_Tp> _Alloc;
        typedef allocator_traits<_Alloc> _ATraits;
        _Alloc __a;
        _Tp * __p = static_cast<_Tp *>(static_cast<void*>(&__this.__s_.__buf));
        _ATraits::destroy(__a, __p);
        __this.__h_ = nullptr;
    }

    _LIBCPP_INLINE_VISIBILITY
    static void __copy(any const & __this, any & __dest) {
        _SmallHandler::__create(__dest, *static_cast<_Tp const *>(
            static_cast<void const *>(&__this.__s_.__buf)));
    }

    _LIBCPP_INLINE_VISIBILITY
    static void __move(any & __this, any & __dest) {
        _SmallHandler::__create(__dest, _VSTD::move(
            *static_cast<_Tp*>(static_cast<void*>(&__this.__s_.__buf))));
        __destroy(__this);
    }

    _LIBCPP_INLINE_VISIBILITY
    static void* __get(any & __this,
                       type_info const * __info,
                       const void* __fallback_id)
    {
        if (__any_imp::__compare_typeid<_Tp>(__info, __fallback_id))
            return static_cast<void*>(&__this.__s_.__buf);
        return nullptr;
    }

    _LIBCPP_INLINE_VISIBILITY
    static void* __type_info()
    {
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_RTTI)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 447 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
        return const_cast<void*>(static_cast<void const *>(&typeid(_Tp)));
#else
# 449 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
        return nullptr;
#endif
# 451 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
    }
  };

  template <class _Tp>
  struct _LIBCPP_TEMPLATE_VIS _LargeHandler
  {
    _LIBCPP_INLINE_VISIBILITY
    static void* __handle(_Action __act, any const * __this,
                          any * __other, type_info const * __info,
                          void const* __fallback_info)
    {
        switch (__act)
        {
        case _Action::_Destroy:
          __destroy(const_cast<any &>(*__this));
          return nullptr;
        case _Action::_Copy:
          __copy(*__this, *__other);
          return nullptr;
        case _Action::_Move:
          __move(const_cast<any &>(*__this), *__other);
          return nullptr;
        case _Action::_Get:
            return __get(const_cast<any &>(*__this), __info, __fallback_info);
        case _Action::_TypeInfo:
          return __type_info();
        }
        __libcpp_unreachable();
    }

    template <class ..._Args>
    _LIBCPP_INLINE_VISIBILITY
    static _Tp& __create(any & __dest, _Args&&... __args) {
        typedef allocator<_Tp> _Alloc;
        typedef allocator_traits<_Alloc> _ATraits;
        typedef __allocator_destructor<_Alloc> _Dp;
        _Alloc __a;
        unique_ptr<_Tp, _Dp> __hold(_ATraits::allocate(__a, 1), _Dp(__a, 1));
        _Tp * __ret = __hold.get();
        _ATraits::construct(__a, __ret, _VSTD::forward<_Args>(__args)...);
        __dest.__s_.__ptr = __hold.release();
        __dest.__h_ = &_LargeHandler::__handle;
        return *__ret;
    }

  private:

    _LIBCPP_INLINE_VISIBILITY
    static void __destroy(any & __this){
        typedef allocator<_Tp> _Alloc;
        typedef allocator_traits<_Alloc> _ATraits;
        _Alloc __a;
        _Tp * __p = static_cast<_Tp *>(__this.__s_.__ptr);
        _ATraits::destroy(__a, __p);
        _ATraits::deallocate(__a, __p, 1);
        __this.__h_ = nullptr;
    }

    _LIBCPP_INLINE_VISIBILITY
    static void __copy(any const & __this, any & __dest) {
        _LargeHandler::__create(__dest, *static_cast<_Tp const *>(__this.__s_.__ptr));
    }

    _LIBCPP_INLINE_VISIBILITY
    static void __move(any & __this, any & __dest) {
      __dest.__s_.__ptr = __this.__s_.__ptr;
      __dest.__h_ = &_LargeHandler::__handle;
      __this.__h_ = nullptr;
    }

    _LIBCPP_INLINE_VISIBILITY
    static void* __get(any & __this, type_info const * __info,
                       void const* __fallback_info)
    {
        if (__any_imp::__compare_typeid<_Tp>(__info, __fallback_info))
            return static_cast<void*>(__this.__s_.__ptr);
        return nullptr;

    }

    _LIBCPP_INLINE_VISIBILITY
    static void* __type_info()
    {
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_RTTI)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 535 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
        return const_cast<void*>(static_cast<void const *>(&typeid(_Tp)));
#else
# 537 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
        return nullptr;
#endif
# 539 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
    }
  };

} // namespace __any_imp


template <class _ValueType, class _Tp, class>
any::any(_ValueType && __v) : __h_(nullptr)
{
  __any_imp::_Handler<_Tp>::__create(*this, _VSTD::forward<_ValueType>(__v));
}

template <class _ValueType, class ..._Args, class _Tp, class>
any::any(in_place_type_t<_ValueType>, _Args&&... __args) {
  __any_imp::_Handler<_Tp>::__create(*this, _VSTD::forward<_Args>(__args)...);
}

template <class _ValueType, class _Up, class ..._Args, class _Tp, class>
any::any(in_place_type_t<_ValueType>, initializer_list<_Up> __il, _Args&&... __args) {
  __any_imp::_Handler<_Tp>::__create(*this, __il, _VSTD::forward<_Args>(__args)...);
}

template <class _ValueType, class, class>
inline _LIBCPP_INLINE_VISIBILITY
any & any::operator=(_ValueType && __v)
{
  any(_VSTD::forward<_ValueType>(__v)).swap(*this);
  return *this;
}

template <class _ValueType, class ..._Args, class _Tp, class>
inline _LIBCPP_INLINE_VISIBILITY
_Tp& any::emplace(_Args&&... __args) {
  reset();
  return __any_imp::_Handler<_Tp>::__create(*this, _VSTD::forward<_Args>(__args)...);
}

template <class _ValueType, class _Up, class ..._Args, class _Tp, class>
inline _LIBCPP_INLINE_VISIBILITY
_Tp& any::emplace(initializer_list<_Up> __il, _Args&&... __args) {
  reset();
  return __any_imp::_Handler<_Tp>::__create(*this, __il, _VSTD::forward<_Args>(__args)...);
}

inline _LIBCPP_INLINE_VISIBILITY
void any::swap(any & __rhs) _NOEXCEPT
{
    if (this == &__rhs)
      return;
    if (__h_ && __rhs.__h_) {
        any __tmp;
        __rhs.__call(_Action::_Move, &__tmp);
        this->__call(_Action::_Move, &__rhs);
        __tmp.__call(_Action::_Move, this);
    }
    else if (__h_) {
        this->__call(_Action::_Move, &__rhs);
    }
    else if (__rhs.__h_) {
        __rhs.__call(_Action::_Move, this);
    }
}

// 6.4 Non-member functions

inline _LIBCPP_INLINE_VISIBILITY
void swap(any & __lhs, any & __rhs) _NOEXCEPT
{
    __lhs.swap(__rhs);
}

template <class _Tp, class ..._Args>
inline _LIBCPP_INLINE_VISIBILITY
any make_any(_Args&&... __args) {
    return any(in_place_type<_Tp>, _VSTD::forward<_Args>(__args)...);
}

template <class _Tp, class _Up, class ..._Args>
inline _LIBCPP_INLINE_VISIBILITY
any make_any(initializer_list<_Up> __il, _Args&&... __args) {
    return any(in_place_type<_Tp>, __il, _VSTD::forward<_Args>(__args)...);
}

template <class _ValueType>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
_ValueType any_cast(any const & __v)
{
    using _RawValueType = __remove_cvref_t<_ValueType>;
    static_assert(is_constructible<_ValueType, _RawValueType const &>::value,
                  "ValueType is required to be a const lvalue reference "
                  "or a CopyConstructible type");
    auto __tmp = _VSTD::any_cast<add_const_t<_RawValueType>>(&__v);
    if (__tmp == nullptr)
        __throw_bad_any_cast();
    return static_cast<_ValueType>(*__tmp);
}

template <class _ValueType>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
_ValueType any_cast(any & __v)
{
    using _RawValueType = __remove_cvref_t<_ValueType>;
    static_assert(is_constructible<_ValueType, _RawValueType &>::value,
                  "ValueType is required to be an lvalue reference "
                  "or a CopyConstructible type");
    auto __tmp = _VSTD::any_cast<_RawValueType>(&__v);
    if (__tmp == nullptr)
        __throw_bad_any_cast();
    return static_cast<_ValueType>(*__tmp);
}

template <class _ValueType>
inline _LIBCPP_INLINE_VISIBILITY
_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
_ValueType any_cast(any && __v)
{
    using _RawValueType = __remove_cvref_t<_ValueType>;
    static_assert(is_constructible<_ValueType, _RawValueType>::value,
                  "ValueType is required to be an rvalue reference "
                  "or a CopyConstructible type");
    auto __tmp = _VSTD::any_cast<_RawValueType>(&__v);
    if (__tmp == nullptr)
        __throw_bad_any_cast();
    return static_cast<_ValueType>(_VSTD::move(*__tmp));
}

template <class _ValueType>
inline _LIBCPP_INLINE_VISIBILITY
add_pointer_t<add_const_t<_ValueType>>
any_cast(any const * __any) _NOEXCEPT
{
    static_assert(!is_reference<_ValueType>::value,
                  "_ValueType may not be a reference.");
    return _VSTD::any_cast<_ValueType>(const_cast<any *>(__any));
}

template <class _RetType>
inline _LIBCPP_INLINE_VISIBILITY
_RetType __pointer_or_func_cast(void* __p, /*IsFunction*/false_type) noexcept {
  return static_cast<_RetType>(__p);
}

template <class _RetType>
inline _LIBCPP_INLINE_VISIBILITY
_RetType __pointer_or_func_cast(void*, /*IsFunction*/true_type) noexcept {
  return nullptr;
}

template <class _ValueType>
_LIBCPP_HIDE_FROM_ABI
add_pointer_t<_ValueType>
any_cast(any * __any) _NOEXCEPT
{
    using __any_imp::_Action;
    static_assert(!is_reference<_ValueType>::value,
                  "_ValueType may not be a reference.");
    typedef add_pointer_t<_ValueType> _ReturnType;
    if (__any && __any->__h_) {
      void *__p = __any->__call(_Action::_Get, nullptr,
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_RTTI)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 701 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
                          &typeid(_ValueType),
#else
# 703 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
                          nullptr,
#endif
# 705 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
                          __any_imp::__get_fallback_typeid<_ValueType>());
        return _VSTD::__pointer_or_func_cast<_ReturnType>(
            __p, is_function<_ValueType>{});
    }
    return nullptr;
}

#endif // _LIBCPP_STD_VER >= 17
# 713 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 719 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#  include <chrono>
#endif /* expanded by -frewrite-includes */
# 719 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 720 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#endif
# 721 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 723 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#  include <atomic>
#endif /* expanded by -frewrite-includes */
# 723 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 724 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 724 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 725 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 725 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 726 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 726 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 727 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iterator>
#endif /* expanded by -frewrite-includes */
# 727 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 728 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#  include <memory>
#endif /* expanded by -frewrite-includes */
# 728 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 729 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#  include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 729 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 730 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 730 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 731 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#if 0 /* expanded by -frewrite-includes */
#  include <variant>
#endif /* expanded by -frewrite-includes */
# 731 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
# 732 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#endif
# 733 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3

#endif // _LIBCPP_ANY
# 735 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/any" 3
#endif /* any expanded by -frewrite-includes */
# 2323 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" 2
namespace testing {
namespace internal {
using Any = ::std::any;
}  // namespace internal
}  // namespace testing
// The case where absl is configured NOT to alias std::any is not
// supported.
#endif  // __has_include(<any>) && __cplusplus >= 201703L
# 2331 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif  // __has_include
# 2332 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif  // GTEST_HAS_ABSL
# 2333 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_ABSL
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2335 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Always use absl::optional for UniversalPrinter<> specializations if
// googletest is built with absl support.
#define GTEST_INTERNAL_HAS_OPTIONAL 1
#if 0 /* expanded by -frewrite-includes */
#include "absl/types/optional.h"
#endif /* expanded by -frewrite-includes */
# 2338 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 2339 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
namespace testing {
namespace internal {
template <typename T>
using Optional = ::absl::optional<T>;
inline ::absl::nullopt_t Nullopt() { return ::absl::nullopt; }
}  // namespace internal
}  // namespace testing
#else
# 2347 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#ifdef __has_include
#if 0 /* disabled by -frewrite-includes */
#if __has_include(<optional>) && __cplusplus >= 201703L
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2349 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Otherwise for C++17 and higher use std::optional for UniversalPrinter<>
// specializations.
#define GTEST_INTERNAL_HAS_OPTIONAL 1
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 2352 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 2353 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
namespace testing {
namespace internal {
template <typename T>
using Optional = ::std::optional<T>;
inline ::std::nullopt_t Nullopt() { return ::std::nullopt; }
}  // namespace internal
}  // namespace testing
// The case where absl is configured NOT to alias std::optional is not
// supported.
#endif  // __has_include(<optional>) && __cplusplus >= 201703L
# 2363 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif  // __has_include
# 2364 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif  // GTEST_HAS_ABSL
# 2365 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_ABSL
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2367 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Always use absl::string_view for Matcher<> specializations if googletest
// is built with absl support.
#define GTEST_INTERNAL_HAS_STRING_VIEW 1
#if 0 /* expanded by -frewrite-includes */
#include "absl/strings/string_view.h"
#endif /* expanded by -frewrite-includes */
# 2370 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 2371 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
namespace testing {
namespace internal {
using StringView = ::absl::string_view;
}  // namespace internal
}  // namespace testing
#else
# 2377 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#ifdef __has_include
#if 0 /* disabled by -frewrite-includes */
#if __has_include(<string_view>) && __cplusplus >= 201703L
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2379 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Otherwise for C++17 and higher use std::string_view for Matcher<>
// specializations.
#define GTEST_INTERNAL_HAS_STRING_VIEW 1
#if 0 /* expanded by -frewrite-includes */
#include <string_view>
#endif /* expanded by -frewrite-includes */
# 2382 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 2383 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
namespace testing {
namespace internal {
using StringView = ::std::string_view;
}  // namespace internal
}  // namespace testing
// The case where absl is configured NOT to alias std::string_view is not
// supported.
#endif  // __has_include(<string_view>) && __cplusplus >= 201703L
# 2391 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif  // __has_include
# 2392 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif  // GTEST_HAS_ABSL
# 2393 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_ABSL
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2395 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Always use absl::variant for UniversalPrinter<> specializations if googletest
// is built with absl support.
#define GTEST_INTERNAL_HAS_VARIANT 1
#if 0 /* expanded by -frewrite-includes */
#include "absl/types/variant.h"
#endif /* expanded by -frewrite-includes */
# 2398 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 2399 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
namespace testing {
namespace internal {
template <typename... T>
using Variant = ::absl::variant<T...>;
}  // namespace internal
}  // namespace testing
#else
# 2406 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#ifdef __has_include
#if 0 /* disabled by -frewrite-includes */
#if __has_include(<variant>) && __cplusplus >= 201703L
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2408 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
// Otherwise for C++17 and higher use std::variant for UniversalPrinter<>
// specializations.
#define GTEST_INTERNAL_HAS_VARIANT 1
#if 0 /* expanded by -frewrite-includes */
#include <variant>
#endif /* expanded by -frewrite-includes */
# 2411 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
# 2412 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
namespace testing {
namespace internal {
template <typename... T>
using Variant = ::std::variant<T...>;
}  // namespace internal
}  // namespace testing
// The case where absl is configured NOT to alias std::variant is not supported.
#endif  // __has_include(<variant>) && __cplusplus >= 201703L
# 2420 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif  // __has_include
# 2421 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif  // GTEST_HAS_ABSL
# 2422 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"

#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
# 2424 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h"
#endif /* gtest-port.h expanded by -frewrite-includes */
# 56 "../../third_party/googletest/src/googletest/include/gtest/gtest-message.h" 2

GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
/* class A needs to have dll-interface to be used by clients of class B */)

// Ensures that there is at least one operator<< in the global namespace.
// See Message& operator<<(...) below for why.
void operator<<(const testing::internal::Secret&, int);

namespace testing {

// The Message class works like an ostream repeater.
//
// Typical usage:
//
//   1. You stream a bunch of values to a Message object.
//      It will remember the text in a stringstream.
//   2. Then you stream the Message object to an ostream.
//      This causes the text in the Message to be streamed
//      to the ostream.
//
// For example;
//
//   testing::Message foo;
//   foo << 1 << " != " << 2;
//   std::cout << foo;
//
// will print "1 != 2".
//
// Message is not intended to be inherited from.  In particular, its
// destructor is not virtual.
//
// Note that stringstream behaves differently in gcc and in MSVC.  You
// can stream a NULL char pointer to it in the former, but not in the
// latter (it causes an access violation if you do).  The Message
// class hides this difference by treating a NULL char pointer as
// "(null)".
class GTEST_API_ Message {
 private:
  // The type of basic IO manipulators (endl, ends, and flush) for
  // narrow streams.
  typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&);

 public:
  // Constructs an empty Message.
  Message();

  // Copy constructor.
  Message(const Message& msg) : ss_(new ::std::stringstream) {  // NOLINT
    *ss_ << msg.GetString();
  }

  // Constructs a Message from a C-string.
  explicit Message(const char* str) : ss_(new ::std::stringstream) {
    *ss_ << str;
  }

  // Streams a non-pointer value to this object.
  template <typename T>
  inline Message& operator<<(const T& val) {
        // Some libraries overload << for STL containers.  These
    // overloads are defined in the global namespace instead of ::std.
    //
    // C++'s symbol lookup rule (i.e. Koenig lookup) says that these
    // overloads are visible in either the std namespace or the global
    // namespace, but not other namespaces, including the testing
    // namespace which Google Test's Message class is in.
    //
    // To allow STL containers (and other types that has a << operator
    // defined in the global namespace) to be used in Google Test
    // assertions, testing::Message must access the custom << operator
    // from the global namespace.  With this using declaration,
    // overloads of << defined in the global namespace and those
    // visible via Koenig lookup are both exposed in this function.
    using ::operator<<;
    *ss_ << val;
    return *this;
  }

  // Streams a pointer value to this object.
  //
  // This function is an overload of the previous one.  When you
  // stream a pointer to a Message, this definition will be used as it
  // is more specialized.  (The C++ Standard, section
  // [temp.func.order].)  If you stream a non-pointer, then the
  // previous definition will be used.
  //
  // The reason for this overload is that streaming a NULL pointer to
  // ostream is undefined behavior.  Depending on the compiler, you
  // may get "0", "(nil)", "(null)", or an access violation.  To
  // ensure consistent result across compilers, we always treat NULL
  // as "(null)".
  template <typename T>
  inline Message& operator<<(T* const& pointer) {  // NOLINT
    if (pointer == nullptr) {
      *ss_ << "(null)";
    } else {
      *ss_ << pointer;
    }
    return *this;
  }

  // Since the basic IO manipulators are overloaded for both narrow
  // and wide streams, we have to provide this specialized definition
  // of operator <<, even though its body is the same as the
  // templatized version above.  Without this definition, streaming
  // endl or other basic IO manipulators to Message will confuse the
  // compiler.
  Message& operator<<(BasicNarrowIoManip val) {
    *ss_ << val;
    return *this;
  }

  // Instead of 1/0, we want to see true/false for bool values.
  Message& operator<<(bool b) { return *this << (b ? "true" : "false"); }

  // These two overloads allow streaming a wide C string to a Message
  // using the UTF-8 encoding.
  Message& operator<<(const wchar_t* wide_c_str);
  Message& operator<<(wchar_t* wide_c_str);

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_STD_WSTRING
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 177 "../../third_party/googletest/src/googletest/include/gtest/gtest-message.h"
  // Converts the given wide string to a narrow string using the UTF-8
  // encoding, and streams the result to this Message object.
  Message& operator<<(const ::std::wstring& wstr);
#endif  // GTEST_HAS_STD_WSTRING
# 181 "../../third_party/googletest/src/googletest/include/gtest/gtest-message.h"

  // Gets the text streamed to this object so far as an std::string.
  // Each '\0' character in the buffer is replaced with "\\0".
  //
  // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
  std::string GetString() const;

 private:
  // We'll hold the text streamed to this object here.
  const std::unique_ptr< ::std::stringstream> ss_;

  // We declare (but don't implement) this to prevent the compiler
  // from implementing the assignment operator.
  void operator=(const Message&);
};

// Streams a Message to an ostream.
inline std::ostream& operator<<(std::ostream& os, const Message& sb) {
  return os << sb.GetString();
}

namespace internal {

// Converts a streamable value to an std::string.  A NULL pointer is
// converted to "(null)".  When the input value is a ::string,
// ::std::string, ::wstring, or ::std::wstring object, each NUL
// character in it is replaced with "\\0".
template <typename T>
std::string StreamableToString(const T& streamable) {
  return (Message() << streamable).GetString();
}

}  // namespace internal
}  // namespace testing

GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251

#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
# 219 "../../third_party/googletest/src/googletest/include/gtest/gtest-message.h"
#endif /* gtest-message.h expanded by -frewrite-includes */
# 47 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-port.h"
#endif /* expanded by -frewrite-includes */
# 47 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"
# 48 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"

GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251                                   \
/* class A needs to have dll-interface to be used by clients of class B */)

namespace testing {

// A class for indicating whether an assertion was successful.  When
// the assertion wasn't successful, the AssertionResult object
// remembers a non-empty message that describes how it failed.
//
// To create an instance of this class, use one of the factory functions
// (AssertionSuccess() and AssertionFailure()).
//
// This class is useful for two purposes:
//   1. Defining predicate functions to be used with Boolean test assertions
//      EXPECT_TRUE/EXPECT_FALSE and their ASSERT_ counterparts
//   2. Defining predicate-format functions to be
//      used with predicate assertions (ASSERT_PRED_FORMAT*, etc).
//
// For example, if you define IsEven predicate:
//
//   testing::AssertionResult IsEven(int n) {
//     if ((n % 2) == 0)
//       return testing::AssertionSuccess();
//     else
//       return testing::AssertionFailure() << n << " is odd";
//   }
//
// Then the failed expectation EXPECT_TRUE(IsEven(Fib(5)))
// will print the message
//
//   Value of: IsEven(Fib(5))
//     Actual: false (5 is odd)
//   Expected: true
//
// instead of a more opaque
//
//   Value of: IsEven(Fib(5))
//     Actual: false
//   Expected: true
//
// in case IsEven is a simple Boolean predicate.
//
// If you expect your predicate to be reused and want to support informative
// messages in EXPECT_FALSE and ASSERT_FALSE (negative assertions show up
// about half as often as positive ones in our tests), supply messages for
// both success and failure cases:
//
//   testing::AssertionResult IsEven(int n) {
//     if ((n % 2) == 0)
//       return testing::AssertionSuccess() << n << " is even";
//     else
//       return testing::AssertionFailure() << n << " is odd";
//   }
//
// Then a statement EXPECT_FALSE(IsEven(Fib(6))) will print
//
//   Value of: IsEven(Fib(6))
//     Actual: true (8 is even)
//   Expected: false
//
// NB: Predicates that support negative Boolean assertions have reduced
// performance in positive ones so be careful not to use them in tests
// that have lots (tens of thousands) of positive Boolean assertions.
//
// To use this class with EXPECT_PRED_FORMAT assertions such as:
//
//   // Verifies that Foo() returns an even number.
//   EXPECT_PRED_FORMAT1(IsEven, Foo());
//
// you need to define:
//
//   testing::AssertionResult IsEven(const char* expr, int n) {
//     if ((n % 2) == 0)
//       return testing::AssertionSuccess();
//     else
//       return testing::AssertionFailure()
//         << "Expected: " << expr << " is even\n  Actual: it's " << n;
//   }
//
// If Foo() returns 5, you will see the following message:
//
//   Expected: Foo() is even
//     Actual: it's 5
//
class GTEST_API_ AssertionResult {
 public:
  // Copy constructor.
  // Used in EXPECT_TRUE/FALSE(assertion_result).
  AssertionResult(const AssertionResult& other);

// C4800 is a level 3 warning in Visual Studio 2015 and earlier.
// This warning is not emitted in Visual Studio 2017.
// This warning is off by default starting in Visual Studio 2019 but can be
// enabled with command-line options.
#if 0 /* disabled by -frewrite-includes */
#if defined(_MSC_VER) && (_MSC_VER < 1910 || _MSC_VER >= 1920)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 144 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"
  GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 /* forcing value to bool */)
#endif
# 146 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"

  // Used in the EXPECT_TRUE/FALSE(bool_expression).
  //
  // T must be contextually convertible to bool.
  //
  // The second parameter prevents this overload from being considered if
  // the argument is implicitly convertible to AssertionResult. In that case
  // we want AssertionResult's copy constructor to be used.
  template <typename T>
  explicit AssertionResult(
      const T& success,
      typename std::enable_if<
          !std::is_convertible<T, AssertionResult>::value>::type*
      /*enabler*/
      = nullptr)
      : success_(success) {}

#if 0 /* disabled by -frewrite-includes */
#if defined(_MSC_VER) && (_MSC_VER < 1910 || _MSC_VER >= 1920)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 164 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"
  GTEST_DISABLE_MSC_WARNINGS_POP_()
#endif
# 166 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"

  // Assignment operator.
  AssertionResult& operator=(AssertionResult other) {
    swap(other);
    return *this;
  }

  // Returns true if and only if the assertion succeeded.
  operator bool() const { return success_; }  // NOLINT

  // Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE.
  AssertionResult operator!() const;

  // Returns the text streamed into this AssertionResult. Test assertions
  // use it when they fail (i.e., the predicate's outcome doesn't match the
  // assertion's expectation). When nothing has been streamed into the
  // object, returns an empty string.
  const char* message() const {
    return message_.get() != nullptr ? message_->c_str() : "";
  }
  // Deprecated; please use message() instead.
  const char* failure_message() const { return message(); }

  // Streams a custom failure message into this object.
  template <typename T>
  AssertionResult& operator<<(const T& value) {
    AppendMessage(Message() << value);
    return *this;
  }

  // Allows streaming basic output manipulators such as endl or flush into
  // this object.
  AssertionResult& operator<<(
      ::std::ostream& (*basic_manipulator)(::std::ostream& stream)) {
    AppendMessage(Message() << basic_manipulator);
    return *this;
  }

 private:
  // Appends the contents of message to message_.
  void AppendMessage(const Message& a_message) {
    if (message_.get() == nullptr) message_.reset(new ::std::string);
    message_->append(a_message.GetString().c_str());
  }

  // Swap the contents of this AssertionResult with other.
  void swap(AssertionResult& other);

  // Stores result of the assertion predicate.
  bool success_;
  // Stores the message describing the condition in case the expectation
  // construct is not satisfied with the predicate's outcome.
  // Referenced via a pointer to avoid taking too much stack frame space
  // with test assertions.
  std::unique_ptr< ::std::string> message_;
};

// Makes a successful assertion result.
GTEST_API_ AssertionResult AssertionSuccess();

// Makes a failed assertion result.
GTEST_API_ AssertionResult AssertionFailure();

// Makes a failed assertion result with the given failure message.
// Deprecated; use AssertionFailure() << msg.
GTEST_API_ AssertionResult AssertionFailure(const Message& msg);

}  // namespace testing

GTEST_DISABLE_MSC_WARNINGS_POP_()  // 4251

#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_ASSERTION_RESULT_H_
# 238 "../../third_party/googletest/src/googletest/include/gtest/gtest-assertion-result.h"
#endif /* gtest-assertion-result.h expanded by -frewrite-includes */
# 60 "../../third_party/googletest/src/googletest/include/gtest/gtest.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-death-test.h expanded by -frewrite-includes */
#include "gtest/gtest-death-test.h"
#else /* gtest-death-test.h expanded by -frewrite-includes */
# 60 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/gtest-death-test.h" 1
// Copyright 2005, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// The Google C++ Testing and Mocking Framework (Google Test)
//
// This header file defines the public API for death tests.  It is
// #included by gtest.h so a user doesn't need to include this
// directly.

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
#define GOOGLETEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_

#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-death-test-internal.h expanded by -frewrite-includes */
#include "gtest/internal/gtest-death-test-internal.h"
#else /* gtest-death-test-internal.h expanded by -frewrite-includes */
# 43 "../../third_party/googletest/src/googletest/include/gtest/gtest-death-test.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-death-test-internal.h" 1
// Copyright 2005, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// The Google C++ Testing and Mocking Framework (Google Test)
//
// This header file defines internal utilities needed for implementing
// death tests.  They are subject to change without notice.

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdio.h expanded by -frewrite-includes */
#include <stdio.h>
#else /* stdio.h expanded by -frewrite-includes */
# 42 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-death-test-internal.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_FILE) || defined(__need___FILE)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 11 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#endif
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#if 0 /* expanded by -frewrite-includes */
#include_next <stdio.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_STDIO_H)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#define _LIBCPP_STDIO_H

/*
    stdio.h synopsis

Macros:

    BUFSIZ
    EOF
    FILENAME_MAX
    FOPEN_MAX
    L_tmpnam
    NULL
    SEEK_CUR
    SEEK_END
    SEEK_SET
    TMP_MAX
    _IOFBF
    _IOLBF
    _IONBF
    stderr
    stdin
    stdout

Types:

FILE
fpos_t
size_t

int remove(const char* filename);
int rename(const char* old, const char* new);
FILE* tmpfile(void);
char* tmpnam(char* s);
int fclose(FILE* stream);
int fflush(FILE* stream);
FILE* fopen(const char* restrict filename, const char* restrict mode);
FILE* freopen(const char* restrict filename, const char * restrict mode,
              FILE * restrict stream);
void setbuf(FILE* restrict stream, char* restrict buf);
int setvbuf(FILE* restrict stream, char* restrict buf, int mode, size_t size);
int fprintf(FILE* restrict stream, const char* restrict format, ...);
int fscanf(FILE* restrict stream, const char * restrict format, ...);
int printf(const char* restrict format, ...);
int scanf(const char* restrict format, ...);
int snprintf(char* restrict s, size_t n, const char* restrict format, ...);    // C99
int sprintf(char* restrict s, const char* restrict format, ...);
int sscanf(const char* restrict s, const char* restrict format, ...);
int vfprintf(FILE* restrict stream, const char* restrict format, va_list arg);
int vfscanf(FILE* restrict stream, const char* restrict format, va_list arg);  // C99
int vprintf(const char* restrict format, va_list arg);
int vscanf(const char* restrict format, va_list arg);                          // C99
int vsnprintf(char* restrict s, size_t n, const char* restrict format,         // C99
              va_list arg);
int vsprintf(char* restrict s, const char* restrict format, va_list arg);
int vsscanf(const char* restrict s, const char* restrict format, va_list arg); // C99
int fgetc(FILE* stream);
char* fgets(char* restrict s, int n, FILE* restrict stream);
int fputc(int c, FILE* stream);
int fputs(const char* restrict s, FILE* restrict stream);
int getc(FILE* stream);
int getchar(void);
char* gets(char* s);  // removed in C++14
int putc(int c, FILE* stream);
int putchar(int c);
int puts(const char* s);
int ungetc(int c, FILE* stream);
size_t fread(void* restrict ptr, size_t size, size_t nmemb,
             FILE* restrict stream);
size_t fwrite(const void* restrict ptr, size_t size, size_t nmemb,
              FILE* restrict stream);
int fgetpos(FILE* restrict stream, fpos_t* restrict pos);
int fseek(FILE* stream, long offset, int whence);
int fsetpos(FILE*stream, const fpos_t* pos);
long ftell(FILE* stream);
void rewind(FILE* stream);
void clearerr(FILE* stream);
int feof(FILE* stream);
int ferror(FILE* stream);
void perror(const char* s);
*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
# 102 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#endif
# 106 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<stdio.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#if 0 /* expanded by -frewrite-includes */
#    include_next <stdio.h>
#endif /* expanded by -frewrite-includes */
# 108 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
# 109 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#  endif
# 110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#ifdef __cplusplus

#undef getc
#undef putc
#undef clearerr
#undef feof
#undef ferror
#undef putchar
#undef getchar

#endif
# 122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3

#endif // _LIBCPP_STDIO_H
# 124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stdio.h" 3
#endif /* stdio.h expanded by -frewrite-includes */
# 43 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-death-test-internal.h" 2

#if 0 /* expanded by -frewrite-includes */
#include <memory>
#endif /* expanded by -frewrite-includes */
# 44 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-death-test-internal.h"
# 45 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-death-test-internal.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-matchers.h expanded by -frewrite-includes */
#include "gtest/gtest-matchers.h"
#else /* gtest-matchers.h expanded by -frewrite-includes */
# 46 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-death-test-internal.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h" 1
// Copyright 2007, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// The Google C++ Testing and Mocking Framework (Google Test)
//
// This file implements just enough of the matcher interface to allow
// EXPECT_DEATH and friends to accept a matcher argument.

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_MATCHERS_H_
#define GOOGLETEST_INCLUDE_GTEST_GTEST_MATCHERS_H_

#if 0 /* expanded by -frewrite-includes */
#include <atomic>
#endif /* expanded by -frewrite-includes */
# 42 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
# 43 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
#if 0 /* expanded by -frewrite-includes */
#include <memory>
#endif /* expanded by -frewrite-includes */
# 43 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
# 44 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
#if 0 /* expanded by -frewrite-includes */
#include <ostream>
#endif /* expanded by -frewrite-includes */
# 44 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
# 45 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
#if 0 /* expanded by -frewrite-includes */
#include <string>
#endif /* expanded by -frewrite-includes */
# 45 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
# 46 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 46 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
# 47 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-printers.h expanded by -frewrite-includes */
#include "gtest/gtest-printers.h"
#else /* gtest-printers.h expanded by -frewrite-includes */
# 48 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h" 1
// Copyright 2007, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// Google Test - The Google C++ Testing and Mocking Framework
//
// This file implements a universal value printer that can print a
// value of any type T:
//
//   void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
//
// A user can teach this function how to print a class type T by
// defining either operator<<() or PrintTo() in the namespace that
// defines T.  More specifically, the FIRST defined function in the
// following list will be used (assuming T is defined in namespace
// foo):
//
//   1. foo::PrintTo(const T&, ostream*)
//   2. operator<<(ostream&, const T&) defined in either foo or the
//      global namespace.
//
// However if T is an STL-style container then it is printed element-wise
// unless foo::PrintTo(const T&, ostream*) is defined. Note that
// operator<<() is ignored for container types.
//
// If none of the above is defined, it will print the debug string of
// the value if it is a protocol buffer, or print the raw bytes in the
// value otherwise.
//
// To aid debugging: when T is a reference type, the address of the
// value is also printed; when T is a (const) char pointer, both the
// pointer value and the NUL-terminated string it points to are
// printed.
//
// We also provide some convenient wrappers:
//
//   // Prints a value to a string.  For a (const or not) char
//   // pointer, the NUL-terminated string (but not the pointer) is
//   // printed.
//   std::string ::testing::PrintToString(const T& value);
//
//   // Prints a value tersely: for a reference type, the referenced
//   // value (but not the address) is printed; for a (const or not) char
//   // pointer, the NUL-terminated string (but not the pointer) is
//   // printed.
//   void ::testing::internal::UniversalTersePrint(const T& value, ostream*);
//
//   // Prints value using the type inferred by the compiler.  The difference
//   // from UniversalTersePrint() is that this function prints both the
//   // pointer and the NUL-terminated string for a (const or not) char pointer.
//   void ::testing::internal::UniversalPrint(const T& value, ostream*);
//
//   // Prints the fields of a tuple tersely to a string vector, one
//   // element for each field. Tuple support must be enabled in
//   // gtest-port.h.
//   std::vector<string> UniversalTersePrintTupleFieldsToStrings(
//       const Tuple& value);
//
// Known limitation:
//
// The print primitives print the elements of an STL-style container
// using the compiler-inferred type of *iter where iter is a
// const_iterator of the container.  When const_iterator is an input
// iterator but not a forward iterator, this inferred type may not
// match value_type, and the print output may be incorrect.  In
// practice, this is rarely a problem as for most containers
// const_iterator is a forward iterator.  We'll fix this if there's an
// actual need for it.  Note that this fix cannot rely on value_type
// being defined as many user-defined container types don't have
// value_type.

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
#define GOOGLETEST_INCLUDE_GTEST_GTEST_PRINTERS_H_

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* functional expanded by -frewrite-includes */
#include <functional>
#else /* functional expanded by -frewrite-includes */
# 104 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_FUNCTIONAL
#define _LIBCPP_FUNCTIONAL

/*
    functional synopsis

namespace std
{

template <class Arg, class Result>
struct unary_function
{
    typedef Arg    argument_type;
    typedef Result result_type;
};

template <class Arg1, class Arg2, class Result>
struct binary_function
{
    typedef Arg1   first_argument_type;
    typedef Arg2   second_argument_type;
    typedef Result result_type;
};

template <class T>
class reference_wrapper
    : public unary_function<T1, R> // if wrapping a unary functor
    : public binary_function<T1, T2, R> // if wrapping a binary functor
{
public:
    // types
    typedef T type;
    typedef see below result_type; // Not always defined

    // construct/copy/destroy
    template<class U>
      constexpr reference_wrapper(U&&);                                   // constexpr since C++20
    constexpr reference_wrapper(const reference_wrapper<T>& x) noexcept;  // constexpr since C++20

    // assignment
    constexpr reference_wrapper&
    operator=(const reference_wrapper<T>& x) noexcept;                    // constexpr since C++20

    // access
    constexpr operator T& () const noexcept;                              // constexpr since C++20
    constexpr T& get() const noexcept;                                    // constexpr since C++20

    // invoke
    template <class... ArgTypes>
      constexpr typename result_of<T&(ArgTypes&&...)>::type               // constexpr since C++20
          operator() (ArgTypes&&...) const
              noexcept(is_nothrow_invocable_v<T&, ArgTypes...>);          // noexcept since C++17
};

template <class T>
  reference_wrapper(T&) -> reference_wrapper<T>;

template <class T> reference_wrapper<T> ref(T& t) noexcept;
template <class T> void ref(const T&& t) = delete;
template <class T> reference_wrapper<T> ref(reference_wrapper<T>t) noexcept;

template <class T> reference_wrapper<const T> cref(const T& t) noexcept;
template <class T> void cref(const T&& t) = delete;
template <class T> reference_wrapper<const T> cref(reference_wrapper<T> t) noexcept;

template <class T> struct unwrap_reference;                                       // since C++20
template <class T> struct unwrap_ref_decay : unwrap_reference<decay_t<T>> { };    // since C++20
template <class T> using unwrap_reference_t = typename unwrap_reference<T>::type; // since C++20
template <class T> using unwrap_ref_decay_t = typename unwrap_ref_decay<T>::type; // since C++20

template <class T> // <class T=void> in C++14
struct plus {
    T operator()(const T& x, const T& y) const;
};

template <class T> // <class T=void> in C++14
struct minus {
    T operator()(const T& x, const T& y) const;
};

template <class T> // <class T=void> in C++14
struct multiplies {
    T operator()(const T& x, const T& y) const;
};

template <class T> // <class T=void> in C++14
struct divides {
    T operator()(const T& x, const T& y) const;
};

template <class T> // <class T=void> in C++14
struct modulus {
    T operator()(const T& x, const T& y) const;
};

template <class T> // <class T=void> in C++14
struct negate {
    T operator()(const T& x) const;
};

template <class T> // <class T=void> in C++14
struct equal_to {
    bool operator()(const T& x, const T& y) const;
};

template <class T> // <class T=void> in C++14
struct not_equal_to {
    bool operator()(const T& x, const T& y) const;
};

template <class T> // <class T=void> in C++14
struct greater {
    bool operator()(const T& x, const T& y) const;
};

template <class T> // <class T=void> in C++14
struct less {
    bool operator()(const T& x, const T& y) const;
};

template <class T> // <class T=void> in C++14
struct greater_equal {
    bool operator()(const T& x, const T& y) const;
};

template <class T> // <class T=void> in C++14
struct less_equal {
    bool operator()(const T& x, const T& y) const;
};

// [comparisons.three.way], class compare_three_way
struct compare_three_way;

template <class T> // <class T=void> in C++14
struct logical_and {
    bool operator()(const T& x, const T& y) const;
};

template <class T> // <class T=void> in C++14
struct logical_or {
    bool operator()(const T& x, const T& y) const;
};

template <class T> // <class T=void> in C++14
struct logical_not {
    bool operator()(const T& x) const;
};

template <class T> // <class T=void> in C++14
struct bit_and {
    T operator()(const T& x, const T& y) const;
};

template <class T> // <class T=void> in C++14
struct bit_or {
    T operator()(const T& x, const T& y) const;
};

template <class T> // <class T=void> in C++14
struct bit_xor {
    T operator()(const T& x, const T& y) const;
};

template <class T=void> // C++14
struct bit_not {
    T operator()(const T& x) const;
};

struct identity; // C++20

template <class Predicate>
class unary_negate // deprecated in C++17, removed in C++20
    : public unary_function<typename Predicate::argument_type, bool>
{
public:
    explicit unary_negate(const Predicate& pred);
    bool operator()(const typename Predicate::argument_type& x) const;
};

template <class Predicate> // deprecated in C++17, removed in C++20
unary_negate<Predicate> not1(const Predicate& pred);

template <class Predicate>
class binary_negate // deprecated in C++17, removed in C++20
    : public binary_function<typename Predicate::first_argument_type,
                             typename Predicate::second_argument_type,
                             bool>
{
public:
    explicit binary_negate(const Predicate& pred);
    bool operator()(const typename Predicate::first_argument_type& x,
                    const typename Predicate::second_argument_type& y) const;
};

template <class Predicate> // deprecated in C++17, removed in C++20
binary_negate<Predicate> not2(const Predicate& pred);

template <class F>
constexpr unspecified not_fn(F&& f); // C++17, constexpr in C++20

template<class T> struct is_bind_expression;
template<class T> struct is_placeholder;

    // See C++14 20.9.9, Function object binders
template <class T> inline constexpr bool is_bind_expression_v
  = is_bind_expression<T>::value; // C++17
template <class T> inline constexpr int is_placeholder_v
  = is_placeholder<T>::value; // C++17


template<class Fn, class... BoundArgs>
  constexpr unspecified bind(Fn&&, BoundArgs&&...);  // constexpr in C++20
template<class R, class Fn, class... BoundArgs>
  constexpr unspecified bind(Fn&&, BoundArgs&&...);  // constexpr in C++20

// [func.invoke]
template<class F, class... Args>
 constexpr // constexpr in C++20
 invoke_result_t<F, Args...> invoke(F&& f, Args&&... args) // C++17
    noexcept(is_nothrow_invocable_v<F, Args...>);

template<class R, class F, class... Args>
  constexpr R invoke_r(F&& f, Args&&... args)              // C++23
    noexcept(is_nothrow_invocable_r_v<R, F, Args...>);

namespace placeholders {
  // M is the implementation-defined number of placeholders
  extern unspecified _1;
  extern unspecified _2;
  .
  .
  .
  extern unspecified _Mp;
}

template <class Operation>
class binder1st     // deprecated in C++11, removed in C++17
    : public unary_function<typename Operation::second_argument_type,
                            typename Operation::result_type>
{
protected:
    Operation                               op;
    typename Operation::first_argument_type value;
public:
    binder1st(const Operation& x, const typename Operation::first_argument_type y);
    typename Operation::result_type operator()(      typename Operation::second_argument_type& x) const;
    typename Operation::result_type operator()(const typename Operation::second_argument_type& x) const;
};

template <class Operation, class T>
binder1st<Operation> bind1st(const Operation& op, const T& x);                  // deprecated in C++11, removed in C++17

template <class Operation>
class binder2nd                                                                 // deprecated in C++11, removed in C++17
    : public unary_function<typename Operation::first_argument_type,
                            typename Operation::result_type>
{
protected:
    Operation                                op;
    typename Operation::second_argument_type value;
public:
    binder2nd(const Operation& x, const typename Operation::second_argument_type y);
    typename Operation::result_type operator()(      typename Operation::first_argument_type& x) const;
    typename Operation::result_type operator()(const typename Operation::first_argument_type& x) const;
};

template <class Operation, class T>
binder2nd<Operation> bind2nd(const Operation& op, const T& x);                  // deprecated in C++11, removed in C++17

template <class Arg, class Result>                                              // deprecated in C++11, removed in C++17
class pointer_to_unary_function : public unary_function<Arg, Result>
{
public:
    explicit pointer_to_unary_function(Result (*f)(Arg));
    Result operator()(Arg x) const;
};

template <class Arg, class Result>
pointer_to_unary_function<Arg,Result> ptr_fun(Result (*f)(Arg));                // deprecated in C++11, removed in C++17

template <class Arg1, class Arg2, class Result>                                 // deprecated in C++11, removed in C++17
class pointer_to_binary_function : public binary_function<Arg1, Arg2, Result>
{
public:
    explicit pointer_to_binary_function(Result (*f)(Arg1, Arg2));
    Result operator()(Arg1 x, Arg2 y) const;
};

template <class Arg1, class Arg2, class Result>
pointer_to_binary_function<Arg1,Arg2,Result> ptr_fun(Result (*f)(Arg1,Arg2));   // deprecated in C++11, removed in C++17

template<class S, class T>                                                      // deprecated in C++11, removed in C++17
class mem_fun_t : public unary_function<T*, S>
{
public:
    explicit mem_fun_t(S (T::*p)());
    S operator()(T* p) const;
};

template<class S, class T, class A>
class mem_fun1_t : public binary_function<T*, A, S>                             // deprecated in C++11, removed in C++17
{
public:
    explicit mem_fun1_t(S (T::*p)(A));
    S operator()(T* p, A x) const;
};

template<class S, class T>          mem_fun_t<S,T>    mem_fun(S (T::*f)());     // deprecated in C++11, removed in C++17
template<class S, class T, class A> mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A));    // deprecated in C++11, removed in C++17

template<class S, class T>
class mem_fun_ref_t : public unary_function<T, S>                               // deprecated in C++11, removed in C++17
{
public:
    explicit mem_fun_ref_t(S (T::*p)());
    S operator()(T& p) const;
};

template<class S, class T, class A>
class mem_fun1_ref_t : public binary_function<T, A, S>                          // deprecated in C++11, removed in C++17
{
public:
    explicit mem_fun1_ref_t(S (T::*p)(A));
    S operator()(T& p, A x) const;
};

template<class S, class T>
mem_fun_ref_t<S,T>    mem_fun_ref(S (T::*f)());                                 // deprecated in C++11, removed in C++17
template<class S, class T, class A>
mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A));                                // deprecated in C++11, removed in C++17

template <class S, class T>
class const_mem_fun_t : public unary_function<const T*, S>                      // deprecated in C++11, removed in C++17
{
public:
    explicit const_mem_fun_t(S (T::*p)() const);
    S operator()(const T* p) const;
};

template <class S, class T, class A>
class const_mem_fun1_t : public binary_function<const T*, A, S>                 // deprecated in C++11, removed in C++17
{
public:
    explicit const_mem_fun1_t(S (T::*p)(A) const);
    S operator()(const T* p, A x) const;
};

template <class S, class T>
const_mem_fun_t<S,T>    mem_fun(S (T::*f)() const);                             // deprecated in C++11, removed in C++17
template <class S, class T, class A>
const_mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A) const);                            // deprecated in C++11, removed in C++17

template <class S, class T>
class const_mem_fun_ref_t : public unary_function<T, S>                         // deprecated in C++11, removed in C++17
{
public:
    explicit const_mem_fun_ref_t(S (T::*p)() const);
    S operator()(const T& p) const;
};

template <class S, class T, class A>
class const_mem_fun1_ref_t : public binary_function<T, A, S>                    // deprecated in C++11, removed in C++17
{
public:
    explicit const_mem_fun1_ref_t(S (T::*p)(A) const);
    S operator()(const T& p, A x) const;
};

template <class S, class T>
const_mem_fun_ref_t<S,T>    mem_fun_ref(S (T::*f)() const);                     // deprecated in C++11, removed in C++17
template <class S, class T, class A>
const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const);                    // deprecated in C++11, removed in C++17

template<class R, class T> constexpr unspecified mem_fn(R T::*);                // constexpr in C++20

class bad_function_call
    : public exception
{
};

template<class> class function; // undefined

template<class R, class... ArgTypes>
class function<R(ArgTypes...)>
  : public unary_function<T1, R>      // iff sizeof...(ArgTypes) == 1 and
                                      // ArgTypes contains T1
  : public binary_function<T1, T2, R> // iff sizeof...(ArgTypes) == 2 and
                                      // ArgTypes contains T1 and T2
{
public:
    typedef R result_type;

    // construct/copy/destroy:
    function() noexcept;
    function(nullptr_t) noexcept;
    function(const function&);
    function(function&&) noexcept;
    template<class F>
      function(F);
    template<Allocator Alloc>
      function(allocator_arg_t, const Alloc&) noexcept;            // removed in C++17
    template<Allocator Alloc>
      function(allocator_arg_t, const Alloc&, nullptr_t) noexcept; // removed in C++17
    template<Allocator Alloc>
      function(allocator_arg_t, const Alloc&, const function&);    // removed in C++17
    template<Allocator Alloc>
      function(allocator_arg_t, const Alloc&, function&&);         // removed in C++17
    template<class F, Allocator Alloc>
      function(allocator_arg_t, const Alloc&, F);                  // removed in C++17

    function& operator=(const function&);
    function& operator=(function&&) noexcept;
    function& operator=(nullptr_t) noexcept;
    template<class F>
      function& operator=(F&&);
    template<class F>
      function& operator=(reference_wrapper<F>) noexcept;

    ~function();

    // function modifiers:
    void swap(function&) noexcept;
    template<class F, class Alloc>
      void assign(F&&, const Alloc&);                 // Removed in C++17

    // function capacity:
    explicit operator bool() const noexcept;

    // function invocation:
    R operator()(ArgTypes...) const;

    // function target access:
    const std::type_info& target_type() const noexcept;
    template <typename T>       T* target() noexcept;
    template <typename T> const T* target() const noexcept;
};

// Deduction guides
template<class R, class ...Args>
function(R(*)(Args...)) -> function<R(Args...)>; // since C++17

template<class F>
function(F) -> function<see-below>; // since C++17

// Null pointer comparisons:
template <class R, class ... ArgTypes>
  bool operator==(const function<R(ArgTypes...)>&, nullptr_t) noexcept;

template <class R, class ... ArgTypes>
  bool operator==(nullptr_t, const function<R(ArgTypes...)>&) noexcept; // removed in C++20

template <class R, class ... ArgTypes>
  bool operator!=(const function<R(ArgTypes...)>&, nullptr_t) noexcept; // removed in C++20

template <class  R, class ... ArgTypes>
  bool operator!=(nullptr_t, const function<R(ArgTypes...)>&) noexcept; // removed in C++20

// specialized algorithms:
template <class  R, class ... ArgTypes>
  void swap(function<R(ArgTypes...)>&, function<R(ArgTypes...)>&) noexcept;

template <class T> struct hash;

template <> struct hash<bool>;
template <> struct hash<char>;
template <> struct hash<signed char>;
template <> struct hash<unsigned char>;
template <> struct hash<char8_t>; // since C++20
template <> struct hash<char16_t>;
template <> struct hash<char32_t>;
template <> struct hash<wchar_t>;
template <> struct hash<short>;
template <> struct hash<unsigned short>;
template <> struct hash<int>;
template <> struct hash<unsigned int>;
template <> struct hash<long>;
template <> struct hash<long long>;
template <> struct hash<unsigned long>;
template <> struct hash<unsigned long long>;

template <> struct hash<float>;
template <> struct hash<double>;
template <> struct hash<long double>;

template<class T> struct hash<T*>;
template <> struct hash<nullptr_t>;  // C++17

namespace ranges {
  // [range.cmp], concept-constrained comparisons
  struct equal_to;
  struct not_equal_to;
  struct greater;
  struct less;
  struct greater_equal;
  struct less_equal;
}

}  // std

POLICY:  For non-variadic implementations, the number of arguments is limited
         to 3.  It is hoped that the need for non-variadic implementations
         will be minimal.

*/

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/search.h>
#endif /* expanded by -frewrite-includes */
# 515 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 516 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 516 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 517 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__compare/compare_three_way.h>
#endif /* expanded by -frewrite-includes */
# 517 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 518 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 518 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 519 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/binary_function.h>
#endif /* expanded by -frewrite-includes */
# 519 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 520 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* binary_negate.h expanded by -frewrite-includes */
#include <__functional/binary_negate.h>
#else /* binary_negate.h expanded by -frewrite-includes */
# 520 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_negate.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_BINARY_NEGATE_H
#define _LIBCPP___FUNCTIONAL_BINARY_NEGATE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_negate.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_negate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/binary_function.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_negate.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_negate.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_negate.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_negate.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_negate.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_negate.h" 3

template <class _Predicate>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 binary_negate
    : public __binary_function<typename _Predicate::first_argument_type,
                               typename _Predicate::second_argument_type,
                               bool>
{
    _Predicate __pred_;
public:
    _LIBCPP_INLINE_VISIBILITY explicit _LIBCPP_CONSTEXPR_SINCE_CXX14
    binary_negate(const _Predicate& __pred) : __pred_(__pred) {}

    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    bool operator()(const typename _Predicate::first_argument_type& __x,
                    const typename _Predicate::second_argument_type& __y) const
        {return !__pred_(__x, __y);}
};

template <class _Predicate>
_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
binary_negate<_Predicate>
not2(const _Predicate& __pred) {return binary_negate<_Predicate>(__pred);}

#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS)
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_negate.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_BINARY_NEGATE_H
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binary_negate.h" 3
#endif /* binary_negate.h expanded by -frewrite-includes */
# 521 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* bind.h expanded by -frewrite-includes */
#include <__functional/bind.h>
#else /* bind.h expanded by -frewrite-includes */
# 521 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_BIND_H
#define _LIBCPP___FUNCTIONAL_BIND_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/weak_result_type.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference_wrapper.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_void.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template<class _Tp>
struct is_bind_expression : _If<
    _IsSame<_Tp, __remove_cvref_t<_Tp> >::value,
    false_type,
    is_bind_expression<__remove_cvref_t<_Tp> >
> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
template <class _Tp>
inline constexpr bool is_bind_expression_v = is_bind_expression<_Tp>::value;
#endif
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3

template<class _Tp>
struct is_placeholder : _If<
    _IsSame<_Tp, __remove_cvref_t<_Tp> >::value,
    integral_constant<int, 0>,
    is_placeholder<__remove_cvref_t<_Tp> >
> {};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
template <class _Tp>
inline constexpr int is_placeholder_v = is_placeholder<_Tp>::value;
#endif
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3

namespace placeholders
{

template <int _Np> struct __ph {};

// C++17 recommends that we implement placeholders as `inline constexpr`, but allows
// implementing them as `extern <implementation-defined>`. Libc++ implements them as
// `extern const` in all standard modes to avoid an ABI break in C++03: making them
// `inline constexpr` requires removing their definition in the shared library to
// avoid ODR violations, which is an ABI break.
//
// In practice, since placeholders are empty, `extern const` is almost impossible
// to distinguish from `inline constexpr` from a usage stand point.
_LIBCPP_EXPORTED_FROM_ABI extern const __ph<1>   _1;
_LIBCPP_EXPORTED_FROM_ABI extern const __ph<2>   _2;
_LIBCPP_EXPORTED_FROM_ABI extern const __ph<3>   _3;
_LIBCPP_EXPORTED_FROM_ABI extern const __ph<4>   _4;
_LIBCPP_EXPORTED_FROM_ABI extern const __ph<5>   _5;
_LIBCPP_EXPORTED_FROM_ABI extern const __ph<6>   _6;
_LIBCPP_EXPORTED_FROM_ABI extern const __ph<7>   _7;
_LIBCPP_EXPORTED_FROM_ABI extern const __ph<8>   _8;
_LIBCPP_EXPORTED_FROM_ABI extern const __ph<9>   _9;
_LIBCPP_EXPORTED_FROM_ABI extern const __ph<10> _10;

} // namespace placeholders

template<int _Np>
struct is_placeholder<placeholders::__ph<_Np> >
    : public integral_constant<int, _Np> {};


#ifndef _LIBCPP_CXX03_LANG

template <class _Tp, class _Uj>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_Tp&
__mu(reference_wrapper<_Tp> __t, _Uj&)
{
    return __t.get();
}

template <class _Ti, class ..._Uj, size_t ..._Indx>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename __invoke_of<_Ti&, _Uj...>::type
__mu_expand(_Ti& __ti, tuple<_Uj...>& __uj, __tuple_indices<_Indx...>)
{
    return __ti(_VSTD::forward<_Uj>(_VSTD::get<_Indx>(__uj))...);
}

template <class _Ti, class ..._Uj, __enable_if_t<is_bind_expression<_Ti>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename __invoke_of<_Ti&, _Uj...>::type
__mu(_Ti& __ti, tuple<_Uj...>& __uj)
{
    typedef typename __make_tuple_indices<sizeof...(_Uj)>::type __indices;
    return _VSTD::__mu_expand(__ti, __uj, __indices());
}

template <bool IsPh, class _Ti, class _Uj>
struct __mu_return2 {};

template <class _Ti, class _Uj>
struct __mu_return2<true, _Ti, _Uj>
{
    typedef typename tuple_element<is_placeholder<_Ti>::value - 1, _Uj>::type type;
};

template <class _Ti, class _Uj, __enable_if_t<0 < is_placeholder<_Ti>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename __mu_return2<0 < is_placeholder<_Ti>::value, _Ti, _Uj>::type
__mu(_Ti&, _Uj& __uj)
{
    const size_t __indx = is_placeholder<_Ti>::value - 1;
    return _VSTD::forward<typename tuple_element<__indx, _Uj>::type>(_VSTD::get<__indx>(__uj));
}

template <class _Ti, class _Uj, __enable_if_t<!is_bind_expression<_Ti>::value &&
                                              is_placeholder<_Ti>::value == 0 &&
                                              !__is_reference_wrapper<_Ti>::value, int> = 0>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
_Ti&
__mu(_Ti& __ti, _Uj&)
{
    return __ti;
}

template <class _Ti, bool IsReferenceWrapper, bool IsBindEx, bool IsPh,
          class _TupleUj>
struct __mu_return_impl;

template <bool _Invokable, class _Ti, class ..._Uj>
struct __mu_return_invokable  // false
{
    typedef __nat type;
};

template <class _Ti, class ..._Uj>
struct __mu_return_invokable<true, _Ti, _Uj...>
{
    typedef typename __invoke_of<_Ti&, _Uj...>::type type;
};

template <class _Ti, class ..._Uj>
struct __mu_return_impl<_Ti, false, true, false, tuple<_Uj...> >
    : public __mu_return_invokable<__invokable<_Ti&, _Uj...>::value, _Ti, _Uj...>
{
};

template <class _Ti, class _TupleUj>
struct __mu_return_impl<_Ti, false, false, true, _TupleUj>
{
    typedef typename tuple_element<is_placeholder<_Ti>::value - 1,
                                   _TupleUj>::type&& type;
};

template <class _Ti, class _TupleUj>
struct __mu_return_impl<_Ti, true, false, false, _TupleUj>
{
    typedef typename _Ti::type& type;
};

template <class _Ti, class _TupleUj>
struct __mu_return_impl<_Ti, false, false, false, _TupleUj>
{
    typedef _Ti& type;
};

template <class _Ti, class _TupleUj>
struct __mu_return
    : public __mu_return_impl<_Ti,
                              __is_reference_wrapper<_Ti>::value,
                              is_bind_expression<_Ti>::value,
                              0 < is_placeholder<_Ti>::value &&
                              is_placeholder<_Ti>::value <= tuple_size<_TupleUj>::value,
                              _TupleUj>
{
};

template <class _Fp, class _BoundArgs, class _TupleUj>
struct __is_valid_bind_return
{
    static const bool value = false;
};

template <class _Fp, class ..._BoundArgs, class _TupleUj>
struct __is_valid_bind_return<_Fp, tuple<_BoundArgs...>, _TupleUj>
{
    static const bool value = __invokable<_Fp,
                    typename __mu_return<_BoundArgs, _TupleUj>::type...>::value;
};

template <class _Fp, class ..._BoundArgs, class _TupleUj>
struct __is_valid_bind_return<_Fp, const tuple<_BoundArgs...>, _TupleUj>
{
    static const bool value = __invokable<_Fp,
                    typename __mu_return<const _BoundArgs, _TupleUj>::type...>::value;
};

template <class _Fp, class _BoundArgs, class _TupleUj,
          bool = __is_valid_bind_return<_Fp, _BoundArgs, _TupleUj>::value>
struct __bind_return;

template <class _Fp, class ..._BoundArgs, class _TupleUj>
struct __bind_return<_Fp, tuple<_BoundArgs...>, _TupleUj, true>
{
    typedef typename __invoke_of
    <
        _Fp&,
        typename __mu_return
        <
            _BoundArgs,
            _TupleUj
        >::type...
    >::type type;
};

template <class _Fp, class ..._BoundArgs, class _TupleUj>
struct __bind_return<_Fp, const tuple<_BoundArgs...>, _TupleUj, true>
{
    typedef typename __invoke_of
    <
        _Fp&,
        typename __mu_return
        <
            const _BoundArgs,
            _TupleUj
        >::type...
    >::type type;
};

template <class _Fp, class _BoundArgs, size_t ..._Indx, class _Args>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename __bind_return<_Fp, _BoundArgs, _Args>::type
__apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>,
                _Args&& __args)
{
    return _VSTD::__invoke(__f, _VSTD::__mu(_VSTD::get<_Indx>(__bound_args), __args)...);
}

template<class _Fp, class ..._BoundArgs>
class __bind : public __weak_result_type<__decay_t<_Fp> >
{
protected:
    using _Fd = __decay_t<_Fp>;
    typedef tuple<__decay_t<_BoundArgs>...> _Td;
private:
    _Fd __f_;
    _Td __bound_args_;

    typedef typename __make_tuple_indices<sizeof...(_BoundArgs)>::type __indices;
public:
    template <class _Gp, class ..._BA,
              __enable_if_t<is_constructible<_Fd, _Gp>::value && !is_same<__libcpp_remove_reference_t<_Gp>, __bind>::value, int> = 0>
      _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
      explicit __bind(_Gp&& __f, _BA&& ...__bound_args)
        : __f_(_VSTD::forward<_Gp>(__f)),
          __bound_args_(_VSTD::forward<_BA>(__bound_args)...) {}

    template <class ..._Args>
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
        typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type
        operator()(_Args&& ...__args)
        {
            return _VSTD::__apply_functor(__f_, __bound_args_, __indices(),
                                  tuple<_Args&&...>(_VSTD::forward<_Args>(__args)...));
        }

    template <class ..._Args>
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
        typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type
        operator()(_Args&& ...__args) const
        {
            return _VSTD::__apply_functor(__f_, __bound_args_, __indices(),
                                   tuple<_Args&&...>(_VSTD::forward<_Args>(__args)...));
        }
};

template<class _Fp, class ..._BoundArgs>
struct is_bind_expression<__bind<_Fp, _BoundArgs...> > : public true_type {};

template<class _Rp, class _Fp, class ..._BoundArgs>
class __bind_r
    : public __bind<_Fp, _BoundArgs...>
{
    typedef __bind<_Fp, _BoundArgs...> base;
    typedef typename base::_Fd _Fd;
    typedef typename base::_Td _Td;
public:
    typedef _Rp result_type;


    template <class _Gp, class ..._BA,
              __enable_if_t<is_constructible<_Fd, _Gp>::value && !is_same<__libcpp_remove_reference_t<_Gp>, __bind_r>::value, int> = 0>
      _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
      explicit __bind_r(_Gp&& __f, _BA&& ...__bound_args)
        : base(_VSTD::forward<_Gp>(__f),
               _VSTD::forward<_BA>(__bound_args)...) {}

    template <class ..._Args, __enable_if_t<is_convertible<typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type,
                                                           result_type>::value || is_void<_Rp>::value, int> = 0>
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
        result_type
        operator()(_Args&& ...__args)
        {
            typedef __invoke_void_return_wrapper<_Rp> _Invoker;
            return _Invoker::__call(static_cast<base&>(*this), _VSTD::forward<_Args>(__args)...);
        }

    template <class ..._Args, __enable_if_t<is_convertible<typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type,
                                                           result_type>::value || is_void<_Rp>::value, int> = 0>
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
        result_type
        operator()(_Args&& ...__args) const
        {
            typedef __invoke_void_return_wrapper<_Rp> _Invoker;
            return _Invoker::__call(static_cast<base const&>(*this), _VSTD::forward<_Args>(__args)...);
        }
};

template<class _Rp, class _Fp, class ..._BoundArgs>
struct is_bind_expression<__bind_r<_Rp, _Fp, _BoundArgs...> > : public true_type {};

template<class _Fp, class ..._BoundArgs>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__bind<_Fp, _BoundArgs...>
bind(_Fp&& __f, _BoundArgs&&... __bound_args)
{
    typedef __bind<_Fp, _BoundArgs...> type;
    return type(_VSTD::forward<_Fp>(__f), _VSTD::forward<_BoundArgs>(__bound_args)...);
}

template<class _Rp, class _Fp, class ..._BoundArgs>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__bind_r<_Rp, _Fp, _BoundArgs...>
bind(_Fp&& __f, _BoundArgs&&... __bound_args)
{
    typedef __bind_r<_Rp, _Fp, _BoundArgs...> type;
    return type(_VSTD::forward<_Fp>(__f), _VSTD::forward<_BoundArgs>(__bound_args)...);
}

#endif // _LIBCPP_CXX03_LANG
# 353 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_BIND_H
# 357 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind.h" 3
#endif /* bind.h expanded by -frewrite-includes */
# 522 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/bind_back.h>
#endif /* expanded by -frewrite-includes */
# 522 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 523 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* bind_front.h expanded by -frewrite-includes */
#include <__functional/bind_front.h>
#else /* bind_front.h expanded by -frewrite-includes */
# 523 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_BIND_FRONT_H
#define _LIBCPP___FUNCTIONAL_BIND_FRONT_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/perfect_forward.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conjunction.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/enable_if.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_constructible.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
#endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3

struct __bind_front_op {
    template <class ..._Args>
    _LIBCPP_HIDE_FROM_ABI
    constexpr auto operator()(_Args&& ...__args) const
        noexcept(noexcept(_VSTD::invoke(_VSTD::forward<_Args>(__args)...)))
        -> decltype(      _VSTD::invoke(_VSTD::forward<_Args>(__args)...))
        { return          _VSTD::invoke(_VSTD::forward<_Args>(__args)...); }
};

template <class _Fn, class ..._BoundArgs>
struct __bind_front_t : __perfect_forward<__bind_front_op, _Fn, _BoundArgs...> {
    using __perfect_forward<__bind_front_op, _Fn, _BoundArgs...>::__perfect_forward;
};

template <class _Fn, class... _Args>
  requires is_constructible_v<decay_t<_Fn>, _Fn> && is_move_constructible_v<decay_t<_Fn>> &&
           (is_constructible_v<decay_t<_Args>, _Args> && ...) && (is_move_constructible_v<decay_t<_Args>> && ...)
_LIBCPP_HIDE_FROM_ABI
constexpr auto bind_front(_Fn&& __f, _Args&&... __args) {
    return __bind_front_t<decay_t<_Fn>, decay_t<_Args>...>(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)...);
}

#endif // _LIBCPP_STD_VER >= 20
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_BIND_FRONT_H
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/bind_front.h" 3
#endif /* bind_front.h expanded by -frewrite-includes */
# 524 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* binder1st.h expanded by -frewrite-includes */
#include <__functional/binder1st.h>
#else /* binder1st.h expanded by -frewrite-includes */
# 524 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder1st.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_BINDER1ST_H
#define _LIBCPP___FUNCTIONAL_BINDER1ST_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder1st.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder1st.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder1st.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder1st.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder1st.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder1st.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder1st.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder1st.h" 3

template <class _Operation>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder1st
    : public __unary_function<typename _Operation::second_argument_type, typename _Operation::result_type>
{
protected:
    _Operation                               op;
    typename _Operation::first_argument_type value;
public:
    _LIBCPP_INLINE_VISIBILITY binder1st(const _Operation& __x,
                               const typename _Operation::first_argument_type __y)
        : op(__x), value(__y) {}
    _LIBCPP_INLINE_VISIBILITY typename _Operation::result_type operator()
        (typename _Operation::second_argument_type& __x) const
            {return op(value, __x);}
    _LIBCPP_INLINE_VISIBILITY typename _Operation::result_type operator()
        (const typename _Operation::second_argument_type& __x) const
            {return op(value, __x);}
};

template <class _Operation, class _Tp>
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
binder1st<_Operation>
bind1st(const _Operation& __op, const _Tp& __x)
    {return binder1st<_Operation>(__op, __x);}

#endif // _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder1st.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_BINDER1ST_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder1st.h" 3
#endif /* binder1st.h expanded by -frewrite-includes */
# 525 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* binder2nd.h expanded by -frewrite-includes */
#include <__functional/binder2nd.h>
#else /* binder2nd.h expanded by -frewrite-includes */
# 525 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder2nd.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_BINDER2ND_H
#define _LIBCPP___FUNCTIONAL_BINDER2ND_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder2nd.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder2nd.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder2nd.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder2nd.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder2nd.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder2nd.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder2nd.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder2nd.h" 3

template <class _Operation>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder2nd
    : public __unary_function<typename _Operation::first_argument_type, typename _Operation::result_type>
{
protected:
    _Operation                                op;
    typename _Operation::second_argument_type value;
public:
    _LIBCPP_INLINE_VISIBILITY
    binder2nd(const _Operation& __x, const typename _Operation::second_argument_type __y)
        : op(__x), value(__y) {}
    _LIBCPP_INLINE_VISIBILITY typename _Operation::result_type operator()
        (      typename _Operation::first_argument_type& __x) const
            {return op(__x, value);}
    _LIBCPP_INLINE_VISIBILITY typename _Operation::result_type operator()
        (const typename _Operation::first_argument_type& __x) const
            {return op(__x, value);}
};

template <class _Operation, class _Tp>
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
binder2nd<_Operation>
bind2nd(const _Operation& __op, const _Tp& __x)
    {return binder2nd<_Operation>(__op, __x);}

#endif // _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder2nd.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_BINDER2ND_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/binder2nd.h" 3
#endif /* binder2nd.h expanded by -frewrite-includes */
# 526 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* boyer_moore_searcher.h expanded by -frewrite-includes */
#include <__functional/boyer_moore_searcher.h>
#else /* boyer_moore_searcher.h expanded by -frewrite-includes */
# 526 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_BOYER_MOORE_SEARCHER_H
#define _LIBCPP___FUNCTIONAL_BOYER_MOORE_SEARCHER_H

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
#endif
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/fill_n.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/hash.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/shared_ptr.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/make_unsigned.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <array>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* unordered_map expanded by -frewrite-includes */
#include <unordered_map>
#else /* unordered_map expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_UNORDERED_MAP
#define _LIBCPP_UNORDERED_MAP

/*

    unordered_map synopsis

#include <initializer_list>

namespace std
{

template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>,
          class Alloc = allocator<pair<const Key, T>>>
class unordered_map
{
public:
    // types
    typedef Key                                                        key_type;
    typedef T                                                          mapped_type;
    typedef Hash                                                       hasher;
    typedef Pred                                                       key_equal;
    typedef Alloc                                                      allocator_type;
    typedef pair<const key_type, mapped_type>                          value_type;
    typedef value_type&                                                reference;
    typedef const value_type&                                          const_reference;
    typedef typename allocator_traits<allocator_type>::pointer         pointer;
    typedef typename allocator_traits<allocator_type>::const_pointer   const_pointer;
    typedef typename allocator_traits<allocator_type>::size_type       size_type;
    typedef typename allocator_traits<allocator_type>::difference_type difference_type;

    typedef /unspecified/ iterator;
    typedef /unspecified/ const_iterator;
    typedef /unspecified/ local_iterator;
    typedef /unspecified/ const_local_iterator;

    typedef unspecified                             node_type;            // C++17
    typedef INSERT_RETURN_TYPE<iterator, node_type> insert_return_type;   // C++17

    unordered_map()
        noexcept(
            is_nothrow_default_constructible<hasher>::value &&
            is_nothrow_default_constructible<key_equal>::value &&
            is_nothrow_default_constructible<allocator_type>::value);
    explicit unordered_map(size_type n, const hasher& hf = hasher(),
                           const key_equal& eql = key_equal(),
                           const allocator_type& a = allocator_type());
    template <class InputIterator>
        unordered_map(InputIterator f, InputIterator l,
                      size_type n = 0, const hasher& hf = hasher(),
                      const key_equal& eql = key_equal(),
                      const allocator_type& a = allocator_type());
    template<container-compatible-range<value_type> R>
      unordered_map(from_range_t, R&& rg, size_type n = see below,
        const hasher& hf = hasher(), const key_equal& eql = key_equal(),
        const allocator_type& a = allocator_type()); // C++23

    explicit unordered_map(const allocator_type&);
    unordered_map(const unordered_map&);
    unordered_map(const unordered_map&, const Allocator&);
    unordered_map(unordered_map&&)
        noexcept(
            is_nothrow_move_constructible<hasher>::value &&
            is_nothrow_move_constructible<key_equal>::value &&
            is_nothrow_move_constructible<allocator_type>::value);
    unordered_map(unordered_map&&, const Allocator&);
    unordered_map(initializer_list<value_type>, size_type n = 0,
                  const hasher& hf = hasher(), const key_equal& eql = key_equal(),
                  const allocator_type& a = allocator_type());
    unordered_map(size_type n, const allocator_type& a)
      : unordered_map(n, hasher(), key_equal(), a) {}  // C++14
    unordered_map(size_type n, const hasher& hf, const allocator_type& a)
      : unordered_map(n, hf, key_equal(), a) {}  // C++14
    template <class InputIterator>
      unordered_map(InputIterator f, InputIterator l, size_type n, const allocator_type& a)
      : unordered_map(f, l, n, hasher(), key_equal(), a) {}  // C++14
    template <class InputIterator>
      unordered_map(InputIterator f, InputIterator l, size_type n, const hasher& hf,
        const allocator_type& a)
      : unordered_map(f, l, n, hf, key_equal(), a) {}  // C++14
    template<container-compatible-range<value_type> R>
      unordered_map(from_range_t, R&& rg, size_type n, const allocator_type& a)
        : unordered_map(from_range, std::forward<R>(rg), n, hasher(), key_equal(), a) { } // C++23
    template<container-compatible-range<value_type> R>
      unordered_map(from_range_t, R&& rg, size_type n, const hasher& hf, const allocator_type& a)
        : unordered_map(from_range, std::forward<R>(rg), n, hf, key_equal(), a) { }       // C++23
    unordered_map(initializer_list<value_type> il, size_type n, const allocator_type& a)
      : unordered_map(il, n, hasher(), key_equal(), a) {}  // C++14
    unordered_map(initializer_list<value_type> il, size_type n, const hasher& hf,
      const allocator_type& a)
      : unordered_map(il, n, hf, key_equal(), a) {}  // C++14
    ~unordered_map();
    unordered_map& operator=(const unordered_map&);
    unordered_map& operator=(unordered_map&&)
        noexcept(
            allocator_type::propagate_on_container_move_assignment::value &&
            is_nothrow_move_assignable<allocator_type>::value &&
            is_nothrow_move_assignable<hasher>::value &&
            is_nothrow_move_assignable<key_equal>::value);
    unordered_map& operator=(initializer_list<value_type>);

    allocator_type get_allocator() const noexcept;

    bool      empty() const noexcept;
    size_type size() const noexcept;
    size_type max_size() const noexcept;

    iterator       begin() noexcept;
    iterator       end() noexcept;
    const_iterator begin()  const noexcept;
    const_iterator end()    const noexcept;
    const_iterator cbegin() const noexcept;
    const_iterator cend()   const noexcept;

    template <class... Args>
        pair<iterator, bool> emplace(Args&&... args);
    template <class... Args>
        iterator emplace_hint(const_iterator position, Args&&... args);
    pair<iterator, bool> insert(const value_type& obj);
    template <class P>
        pair<iterator, bool> insert(P&& obj);
    iterator insert(const_iterator hint, const value_type& obj);
    template <class P>
        iterator insert(const_iterator hint, P&& obj);
    template <class InputIterator>
        void insert(InputIterator first, InputIterator last);
    template<container-compatible-range<value_type> R>
      void insert_range(R&& rg);                                                      // C++23
    void insert(initializer_list<value_type>);

    node_type extract(const_iterator position);                                       // C++17
    node_type extract(const key_type& x);                                             // C++17
    insert_return_type insert(node_type&& nh);                                        // C++17
    iterator           insert(const_iterator hint, node_type&& nh);                   // C++17

    template <class... Args>
        pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);          // C++17
    template <class... Args>
        pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);               // C++17
    template <class... Args>
        iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args); // C++17
    template <class... Args>
        iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args);      // C++17
    template <class M>
        pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);            // C++17
    template <class M>
        pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);                 // C++17
    template <class M>
        iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj);   // C++17
    template <class M>
        iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);        // C++17

    iterator erase(const_iterator position);
    iterator erase(iterator position);  // C++14
    size_type erase(const key_type& k);
    iterator erase(const_iterator first, const_iterator last);
    void clear() noexcept;

    template<class H2, class P2>
      void merge(unordered_map<Key, T, H2, P2, Allocator>& source);         // C++17
    template<class H2, class P2>
      void merge(unordered_map<Key, T, H2, P2, Allocator>&& source);        // C++17
    template<class H2, class P2>
      void merge(unordered_multimap<Key, T, H2, P2, Allocator>& source);    // C++17
    template<class H2, class P2>
      void merge(unordered_multimap<Key, T, H2, P2, Allocator>&& source);   // C++17

    void swap(unordered_map&)
        noexcept(
            (!allocator_type::propagate_on_container_swap::value ||
             __is_nothrow_swappable<allocator_type>::value) &&
            __is_nothrow_swappable<hasher>::value &&
            __is_nothrow_swappable<key_equal>::value);

    hasher hash_function() const;
    key_equal key_eq() const;

    iterator       find(const key_type& k);
    const_iterator find(const key_type& k) const;
    template<typename K>
        iterator find(const K& x);              // C++20
    template<typename K>
        const_iterator find(const K& x) const;  // C++20
    size_type count(const key_type& k) const;
    template<typename K>
        size_type count(const K& k) const; // C++20
    bool contains(const key_type& k) const; // C++20
    template<typename K>
        bool contains(const K& k) const; // C++20
    pair<iterator, iterator>             equal_range(const key_type& k);
    pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
    template<typename K>
        pair<iterator, iterator>             equal_range(const K& k); // C++20
    template<typename K>
        pair<const_iterator, const_iterator> equal_range(const K& k) const; // C++20

    mapped_type& operator[](const key_type& k);
    mapped_type& operator[](key_type&& k);

    mapped_type&       at(const key_type& k);
    const mapped_type& at(const key_type& k) const;

    size_type bucket_count() const noexcept;
    size_type max_bucket_count() const noexcept;

    size_type bucket_size(size_type n) const;
    size_type bucket(const key_type& k) const;

    local_iterator       begin(size_type n);
    local_iterator       end(size_type n);
    const_local_iterator begin(size_type n) const;
    const_local_iterator end(size_type n) const;
    const_local_iterator cbegin(size_type n) const;
    const_local_iterator cend(size_type n) const;

    float load_factor() const noexcept;
    float max_load_factor() const noexcept;
    void max_load_factor(float z);
    void rehash(size_type n);
    void reserve(size_type n);
};

template<class InputIterator,
    class Hash = hash<iter_key_t<InputIterator>>, class Pred = equal_to<iter_key_t<InputIterator>>,
    class Allocator = allocator<iter_to_alloc_t<InputIterator>>>
unordered_map(InputIterator, InputIterator, typename see below::size_type = see below,
    Hash = Hash(), Pred = Pred(), Allocator = Allocator())
  -> unordered_map<iter_key_t<InputIterator>, iter_value_t<InputIterator>, Hash, Pred,
    Allocator>; // C++17

template<ranges::input_range R, class Hash = hash<range-key-type<R>>,
         class Pred = equal_to<range-key-type<R>>,
         class Allocator = allocator<range-to-alloc-type<R>>>
  unordered_map(from_range_t, R&&, typename see below::size_type = see below,
                Hash = Hash(), Pred = Pred(), Allocator = Allocator())
    -> unordered_map<range-key-type<R>, range-mapped-type<R>, Hash, Pred, Allocator>; // C++23

template<class Key, class T, class Hash = hash<Key>,
    class Pred = equal_to<Key>, class Allocator = allocator<pair<const Key, T>>>
unordered_map(initializer_list<pair<const Key, T>>, typename see below::size_type = see below,
    Hash = Hash(), Pred = Pred(), Allocator = Allocator())
  -> unordered_map<Key, T, Hash, Pred, Allocator>; // C++17

template<class InputIterator, class Allocator>
unordered_map(InputIterator, InputIterator, typename see below::size_type, Allocator)
  -> unordered_map<iter_key_t<InputIterator>, iter_val_t<InputIterator>,
        hash<iter_key_t<InputIterator>>, equal_to<iter_key_t<InputIterator>>, Allocator>; // C++17

template<class InputIterator, class Allocator>
unordered_map(InputIterator, InputIterator, Allocator)
  -> unordered_map<iter_key_t<InputIterator>, iter_val_t<InputIterator>,
        hash<iter_key_t<InputIterator>>, equal_to<iter_key_t<InputIterator>>, Allocator>; // C++17

template<class InputIterator, class Hash, class Allocator>
unordered_map(InputIterator, InputIterator, typename see below::size_type, Hash, Allocator)
  -> unordered_map<iter_key_t<InputIterator>, iter_val_t<InputIterator>, Hash,
          equal_to<iter_key_t<InputIterator>>, Allocator>; // C++17

template<ranges::input_range R, class Allocator>
  unordered_map(from_range_t, R&&, typename see below::size_type, Allocator)
    -> unordered_map<range-key-type<R>, range-mapped-type<R>, hash<range-key-type<R>>,
                      equal_to<range-key-type<R>>, Allocator>;   // C++23

template<ranges::input_range R, class Allocator>
  unordered_map(from_range_t, R&&, Allocator)
    -> unordered_map<range-key-type<R>, range-mapped-type<R>, hash<range-key-type<R>>,
                      equal_to<range-key-type<R>>, Allocator>;   // C++23

template<ranges::input_range R, class Hash, class Allocator>
  unordered_map(from_range_t, R&&, typename see below::size_type, Hash, Allocator)
    -> unordered_map<range-key-type<R>, range-mapped-type<R>, Hash,
                      equal_to<range-key-type<R>>, Allocator>;   // C++23

template<class Key, class T, typename Allocator>
unordered_map(initializer_list<pair<const Key, T>>, typename see below::size_type, Allocator)
  -> unordered_map<Key, T, hash<Key>, equal_to<Key>, Allocator>; // C++17

template<class Key, class T, typename Allocator>
unordered_map(initializer_list<pair<const Key, T>>, Allocator)
  -> unordered_map<Key, T, hash<Key>, equal_to<Key>, Allocator>; // C++17

template<class Key, class T, class Hash, class Allocator>
unordered_map(initializer_list<pair<const Key, T>>, typename see below::size_type, Hash, Allocator)
  -> unordered_map<Key, T, Hash, equal_to<Key>, Allocator>; // C++17

template <class Key, class T, class Hash, class Pred, class Alloc>
    void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x,
              unordered_map<Key, T, Hash, Pred, Alloc>& y)
              noexcept(noexcept(x.swap(y)));

template <class Key, class T, class Hash, class Pred, class Alloc>
    bool
    operator==(const unordered_map<Key, T, Hash, Pred, Alloc>& x,
               const unordered_map<Key, T, Hash, Pred, Alloc>& y);

template <class Key, class T, class Hash, class Pred, class Alloc>
    bool
    operator!=(const unordered_map<Key, T, Hash, Pred, Alloc>& x,
               const unordered_map<Key, T, Hash, Pred, Alloc>& y); // Removed in C++20

template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>,
          class Alloc = allocator<pair<const Key, T>>>
class unordered_multimap
{
public:
    // types
    typedef Key                                                        key_type;
    typedef T                                                          mapped_type;
    typedef Hash                                                       hasher;
    typedef Pred                                                       key_equal;
    typedef Alloc                                                      allocator_type;
    typedef pair<const key_type, mapped_type>                          value_type;
    typedef value_type&                                                reference;
    typedef const value_type&                                          const_reference;
    typedef typename allocator_traits<allocator_type>::pointer         pointer;
    typedef typename allocator_traits<allocator_type>::const_pointer   const_pointer;
    typedef typename allocator_traits<allocator_type>::size_type       size_type;
    typedef typename allocator_traits<allocator_type>::difference_type difference_type;

    typedef /unspecified/ iterator;
    typedef /unspecified/ const_iterator;
    typedef /unspecified/ local_iterator;
    typedef /unspecified/ const_local_iterator;

    typedef unspecified node_type;    // C++17

    unordered_multimap()
        noexcept(
            is_nothrow_default_constructible<hasher>::value &&
            is_nothrow_default_constructible<key_equal>::value &&
            is_nothrow_default_constructible<allocator_type>::value);
    explicit unordered_multimap(size_type n, const hasher& hf = hasher(),
                           const key_equal& eql = key_equal(),
                           const allocator_type& a = allocator_type());
    template <class InputIterator>
        unordered_multimap(InputIterator f, InputIterator l,
                      size_type n = 0, const hasher& hf = hasher(),
                      const key_equal& eql = key_equal(),
                      const allocator_type& a = allocator_type());
    template<container-compatible-range<value_type> R>
      unordered_multimap(from_range_t, R&& rg, size_type n = see below,
        const hasher& hf = hasher(), const key_equal& eql = key_equal(),
        const allocator_type& a = allocator_type()); // C++23
    explicit unordered_multimap(const allocator_type&);
    unordered_multimap(const unordered_multimap&);
    unordered_multimap(const unordered_multimap&, const Allocator&);
    unordered_multimap(unordered_multimap&&)
        noexcept(
            is_nothrow_move_constructible<hasher>::value &&
            is_nothrow_move_constructible<key_equal>::value &&
            is_nothrow_move_constructible<allocator_type>::value);
    unordered_multimap(unordered_multimap&&, const Allocator&);
    unordered_multimap(initializer_list<value_type>, size_type n = 0,
                  const hasher& hf = hasher(), const key_equal& eql = key_equal(),
                  const allocator_type& a = allocator_type());
    unordered_multimap(size_type n, const allocator_type& a)
      : unordered_multimap(n, hasher(), key_equal(), a) {}  // C++14
    unordered_multimap(size_type n, const hasher& hf, const allocator_type& a)
      : unordered_multimap(n, hf, key_equal(), a) {}  // C++14
    template <class InputIterator>
      unordered_multimap(InputIterator f, InputIterator l, size_type n, const allocator_type& a)
      : unordered_multimap(f, l, n, hasher(), key_equal(), a) {}  // C++14
    template <class InputIterator>
      unordered_multimap(InputIterator f, InputIterator l, size_type n, const hasher& hf,
        const allocator_type& a)
      : unordered_multimap(f, l, n, hf, key_equal(), a) {}  // C++14
    template<container-compatible-range<value_type> R>
      unordered_multimap(from_range_t, R&& rg, size_type n, const allocator_type& a)
        : unordered_multimap(from_range, std::forward<R>(rg), n, hasher(), key_equal(), a) { } // C++23
    template<container-compatible-range<value_type> R>
      unordered_multimap(from_range_t, R&& rg, size_type n, const hasher& hf, const allocator_type& a)
        : unordered_multimap(from_range, std::forward<R>(rg), n, hf, key_equal(), a) { }       // C++23
    unordered_multimap(initializer_list<value_type> il, size_type n, const allocator_type& a)
      : unordered_multimap(il, n, hasher(), key_equal(), a) {}  // C++14
    unordered_multimap(initializer_list<value_type> il, size_type n, const hasher& hf,
      const allocator_type& a)
      : unordered_multimap(il, n, hf, key_equal(), a) {}  // C++14
    ~unordered_multimap();
    unordered_multimap& operator=(const unordered_multimap&);
    unordered_multimap& operator=(unordered_multimap&&)
        noexcept(
            allocator_type::propagate_on_container_move_assignment::value &&
            is_nothrow_move_assignable<allocator_type>::value &&
            is_nothrow_move_assignable<hasher>::value &&
            is_nothrow_move_assignable<key_equal>::value);
    unordered_multimap& operator=(initializer_list<value_type>);

    allocator_type get_allocator() const noexcept;

    bool      empty() const noexcept;
    size_type size() const noexcept;
    size_type max_size() const noexcept;

    iterator       begin() noexcept;
    iterator       end() noexcept;
    const_iterator begin()  const noexcept;
    const_iterator end()    const noexcept;
    const_iterator cbegin() const noexcept;
    const_iterator cend()   const noexcept;

    template <class... Args>
        iterator emplace(Args&&... args);
    template <class... Args>
        iterator emplace_hint(const_iterator position, Args&&... args);
    iterator insert(const value_type& obj);
    template <class P>
        iterator insert(P&& obj);
    iterator insert(const_iterator hint, const value_type& obj);
    template <class P>
        iterator insert(const_iterator hint, P&& obj);
    template <class InputIterator>
        void insert(InputIterator first, InputIterator last);
    template<container-compatible-range<value_type> R>
      void insert_range(R&& rg);                               // C++23
    void insert(initializer_list<value_type>);

    node_type extract(const_iterator position);                // C++17
    node_type extract(const key_type& x);                      // C++17
    iterator insert(node_type&& nh);                           // C++17
    iterator insert(const_iterator hint, node_type&& nh);      // C++17

    iterator erase(const_iterator position);
    iterator erase(iterator position);  // C++14
    size_type erase(const key_type& k);
    iterator erase(const_iterator first, const_iterator last);
    void clear() noexcept;

    template<class H2, class P2>
      void merge(unordered_multimap<Key, T, H2, P2, Allocator>& source);    // C++17
    template<class H2, class P2>
      void merge(unordered_multimap<Key, T, H2, P2, Allocator>&& source);   // C++17
    template<class H2, class P2>
      void merge(unordered_map<Key, T, H2, P2, Allocator>& source);         // C++17
    template<class H2, class P2>
      void merge(unordered_map<Key, T, H2, P2, Allocator>&& source);        // C++17

    void swap(unordered_multimap&)
        noexcept(
            (!allocator_type::propagate_on_container_swap::value ||
             __is_nothrow_swappable<allocator_type>::value) &&
            __is_nothrow_swappable<hasher>::value &&
            __is_nothrow_swappable<key_equal>::value);

    hasher hash_function() const;
    key_equal key_eq() const;

    iterator       find(const key_type& k);
    const_iterator find(const key_type& k) const;
    template<typename K>
        iterator find(const K& x);              // C++20
    template<typename K>
        const_iterator find(const K& x) const;  // C++20
    size_type count(const key_type& k) const;
    template<typename K>
        size_type count(const K& k) const; // C++20
    bool contains(const key_type& k) const; // C++20
    template<typename K>
        bool contains(const K& k) const; // C++20
    pair<iterator, iterator>             equal_range(const key_type& k);
    pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
    template<typename K>
        pair<iterator, iterator>             equal_range(const K& k); // C++20
    template<typename K>
        pair<const_iterator, const_iterator> equal_range(const K& k) const; // C++20

    size_type bucket_count() const noexcept;
    size_type max_bucket_count() const noexcept;

    size_type bucket_size(size_type n) const;
    size_type bucket(const key_type& k) const;

    local_iterator       begin(size_type n);
    local_iterator       end(size_type n);
    const_local_iterator begin(size_type n) const;
    const_local_iterator end(size_type n) const;
    const_local_iterator cbegin(size_type n) const;
    const_local_iterator cend(size_type n) const;

    float load_factor() const noexcept;
    float max_load_factor() const noexcept;
    void max_load_factor(float z);
    void rehash(size_type n);
    void reserve(size_type n);
};

template<class InputIterator,
    class Hash = hash<iter_key_t<InputIterator>>, class Pred = equal_to<iter_key_t<InputIterator>>,
    class Allocator = allocator<iter_to_alloc_t<InputIterator>>>
unordered_multimap(InputIterator, InputIterator, typename see below::size_type = see below,
    Hash = Hash(), Pred = Pred(), Allocator = Allocator())
  -> unordered_multimap<iter_key_t<InputIterator>, iter_value_t<InputIterator>, Hash, Pred,
    Allocator>; // C++17

template<ranges::input_range R, class Hash = hash<range-key-type<R>>,
         class Pred = equal_to<range-key-type<R>>,
         class Allocator = allocator<range-to-alloc-type<R>>>
  unordered_multimap(from_range_t, R&&, typename see below::size_type = see below,
                Hash = Hash(), Pred = Pred(), Allocator = Allocator())
    -> unordered_multimap<range-key-type<R>, range-mapped-type<R>, Hash, Pred, Allocator>; // C++23

template<class Key, class T, class Hash = hash<Key>,
    class Pred = equal_to<Key>, class Allocator = allocator<pair<const Key, T>>>
unordered_multimap(initializer_list<pair<const Key, T>>, typename see below::size_type = see below,
    Hash = Hash(), Pred = Pred(), Allocator = Allocator())
  -> unordered_multimap<Key, T, Hash, Pred, Allocator>; // C++17

template<class InputIterator, class Allocator>
unordered_multimap(InputIterator, InputIterator, typename see below::size_type, Allocator)
  -> unordered_multimap<iter_key_t<InputIterator>, iter_val_t<InputIterator>,
        hash<iter_key_t<InputIterator>>, equal_to<iter_key_t<InputIterator>>, Allocator>; // C++17

template<class InputIterator, class Allocator>
unordered_multimap(InputIterator, InputIterator, Allocator)
  -> unordered_multimap<iter_key_t<InputIterator>, iter_val_t<InputIterator>,
        hash<iter_key_t<InputIterator>>, equal_to<iter_key_t<InputIterator>>, Allocator>; // C++17

template<class InputIterator, class Hash, class Allocator>
unordered_multimap(InputIterator, InputIterator, typename see below::size_type, Hash, Allocator)
  -> unordered_multimap<iter_key_t<InputIterator>, iter_val_t<InputIterator>, Hash,
          equal_to<iter_key_t<InputIterator>>, Allocator>; // C++17

template<ranges::input_range R, class Allocator>
  unordered_multimap(from_range_t, R&&, typename see below::size_type, Allocator)
    -> unordered_multimap<range-key-type<R>, range-mapped-type<R>, hash<range-key-type<R>>,
                      equal_to<range-key-type<R>>, Allocator>;   // C++23

template<ranges::input_range R, class Allocator>
  unordered_multimap(from_range_t, R&&, Allocator)
    -> unordered_multimap<range-key-type<R>, range-mapped-type<R>, hash<range-key-type<R>>,
                      equal_to<range-key-type<R>>, Allocator>;   // C++23

template<ranges::input_range R, class Hash, class Allocator>
  unordered_multimap(from_range_t, R&&, typename see below::size_type, Hash, Allocator)
    -> unordered_multimap<range-key-type<R>, range-mapped-type<R>, Hash,
                      equal_to<range-key-type<R>>, Allocator>;   // C++23

template<class Key, class T, typename Allocator>
unordered_multimap(initializer_list<pair<const Key, T>>, typename see below::size_type, Allocator)
  -> unordered_multimap<Key, T, hash<Key>, equal_to<Key>, Allocator>; // C++17

template<class Key, class T, typename Allocator>
unordered_multimap(initializer_list<pair<const Key, T>>, Allocator)
  -> unordered_multimap<Key, T, hash<Key>, equal_to<Key>, Allocator>; // C++17

template<class Key, class T, class Hash, class Allocator>
unordered_multimap(initializer_list<pair<const Key, T>>, typename see below::size_type, Hash,
    Allocator)
  -> unordered_multimap<Key, T, Hash, equal_to<Key>, Allocator>; // C++17

template <class Key, class T, class Hash, class Pred, class Alloc>
    void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
              unordered_multimap<Key, T, Hash, Pred, Alloc>& y)
              noexcept(noexcept(x.swap(y)));

template <class K, class T, class H, class P, class A, class Predicate>
    typename unordered_map<K, T, H, P, A>::size_type
    erase_if(unordered_map<K, T, H, P, A>& c, Predicate pred);       // C++20

template <class K, class T, class H, class P, class A, class Predicate>
    typename unordered_multimap<K, T, H, P, A>::size_type
    erase_if(unordered_multimap<K, T, H, P, A>& c, Predicate pred);  // C++20

template <class Key, class T, class Hash, class Pred, class Alloc>
    bool
    operator==(const unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
               const unordered_multimap<Key, T, Hash, Pred, Alloc>& y);

template <class Key, class T, class Hash, class Pred, class Alloc>
    bool
    operator!=(const unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
               const unordered_multimap<Key, T, Hash, Pred, Alloc>& y); // Removed in C++20

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/is_permutation.h>
#endif /* expanded by -frewrite-includes */
# 586 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 587 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 587 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 588 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 588 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 589 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 589 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 590 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* is_transparent.h expanded by -frewrite-includes */
#include <__functional/is_transparent.h>
#else /* is_transparent.h expanded by -frewrite-includes */
# 590 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/is_transparent.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_IS_TRANSPARENT
#define _LIBCPP___FUNCTIONAL_IS_TRANSPARENT

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/is_transparent.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/is_transparent.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/integral_constant.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/is_transparent.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/is_transparent.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/void_t.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/is_transparent.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/is_transparent.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/is_transparent.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/is_transparent.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/is_transparent.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/is_transparent.h" 3

template <class _Tp, class, class = void>
struct __is_transparent : false_type {};

template <class _Tp, class _Up>
struct __is_transparent<_Tp, _Up, __void_t<typename _Tp::is_transparent> >
   : true_type {};

#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/is_transparent.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_IS_TRANSPARENT
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/is_transparent.h" 3
#endif /* is_transparent.h expanded by -frewrite-includes */
# 591 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 591 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 592 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __hash_table expanded by -frewrite-includes */
#include <__hash_table>
#else /* __hash_table expanded by -frewrite-includes */
# 592 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___HASH_TABLE
#define _LIBCPP___HASH_TABLE

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/max.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__bit/countl.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/hash.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/compressed_pair.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/construct_at.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/swap_allocator.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/unique_ptr.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/can_extract_key.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_const.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_constructible.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_pointer.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_reference.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_swappable.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_const.h>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <cmath>
#endif /* expanded by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstring>
#endif /* expanded by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#include <new> // __launder
#endif /* expanded by -frewrite-includes */
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 50 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#endif
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 2 3


_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Key, class _Tp>
struct __hash_value_type;

template <class _Tp>
struct __is_hash_value_type_imp : false_type {};

template <class _Key, class _Value>
struct __is_hash_value_type_imp<__hash_value_type<_Key, _Value> > : true_type {};

template <class ..._Args>
struct __is_hash_value_type : false_type {};

template <class _One>
struct __is_hash_value_type<_One> : __is_hash_value_type_imp<__remove_cvref_t<_One> > {};

_LIBCPP_EXPORTED_FROM_ABI size_t __next_prime(size_t __n);

template <class _NodePtr>
struct __hash_node_base
{
    typedef typename pointer_traits<_NodePtr>::element_type __node_type;
    typedef __hash_node_base __first_node;
    typedef __rebind_pointer_t<_NodePtr, __first_node> __node_base_pointer;
    typedef _NodePtr __node_pointer;

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_ABI_FIX_UNORDERED_NODE_POINTER_UB)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
  typedef __node_base_pointer __next_pointer;
#else
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
    typedef __conditional_t<is_pointer<__node_pointer>::value, __node_base_pointer, __node_pointer> __next_pointer;
#endif
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3

    __next_pointer    __next_;

    _LIBCPP_INLINE_VISIBILITY
    __next_pointer __ptr() _NOEXCEPT {
        return static_cast<__next_pointer>(
            pointer_traits<__node_base_pointer>::pointer_to(*this));
    }

    _LIBCPP_INLINE_VISIBILITY
    __node_pointer __upcast() _NOEXCEPT {
        return static_cast<__node_pointer>(
            pointer_traits<__node_base_pointer>::pointer_to(*this));
    }

    _LIBCPP_INLINE_VISIBILITY
    size_t __hash() const _NOEXCEPT {
        return static_cast<__node_type const&>(*this).__hash_;
    }

    _LIBCPP_INLINE_VISIBILITY __hash_node_base() _NOEXCEPT : __next_(nullptr) {}
    _LIBCPP_HIDE_FROM_ABI explicit __hash_node_base(__next_pointer __next) _NOEXCEPT : __next_(__next) {}
};

template <class _Tp, class _VoidPtr>
struct __hash_node
    : public __hash_node_base
             <
                 __rebind_pointer_t<_VoidPtr, __hash_node<_Tp, _VoidPtr> >
             >
{
    typedef _Tp __node_value_type;
    using _Base = __hash_node_base<__rebind_pointer_t<_VoidPtr, __hash_node<_Tp, _VoidPtr> > >;
    using __next_pointer = typename _Base::__next_pointer;

    size_t            __hash_;

    // We allow starting the lifetime of nodes without initializing the value held by the node,
    // since that is handled by the hash table itself in order to be allocator-aware.
#ifndef _LIBCPP_CXX03_LANG
private:
    union {
        _Tp __value_;
    };

public:
    _LIBCPP_HIDE_FROM_ABI _Tp& __get_value() { return __value_; }
#else
# 139 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
private:
    _ALIGNAS_TYPE(_Tp) char __buffer_[sizeof(_Tp)];

public:
    _LIBCPP_HIDE_FROM_ABI _Tp& __get_value() {
        return *std::__launder(reinterpret_cast<_Tp*>(&__buffer_));
    }
#endif
# 147 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3

    _LIBCPP_HIDE_FROM_ABI explicit __hash_node(__next_pointer __next, size_t __hash) : _Base(__next), __hash_(__hash) {}
    _LIBCPP_HIDE_FROM_ABI ~__hash_node() {}
};

inline _LIBCPP_INLINE_VISIBILITY
bool
__is_hash_power2(size_t __bc)
{
    return __bc > 2 && !(__bc & (__bc - 1));
}

inline _LIBCPP_INLINE_VISIBILITY
size_t
__constrain_hash(size_t __h, size_t __bc)
{
    return !(__bc & (__bc - 1)) ? __h & (__bc - 1) :
        (__h < __bc ? __h : __h % __bc);
}

inline _LIBCPP_INLINE_VISIBILITY
size_t
__next_hash_pow2(size_t __n)
{
    return __n < 2 ? __n : (size_t(1) << (numeric_limits<size_t>::digits - __libcpp_clz(__n-1)));
}


template <class _Tp, class _Hash, class _Equal, class _Alloc> class __hash_table;

template <class _NodePtr>      class _LIBCPP_TEMPLATE_VIS __hash_iterator;
template <class _ConstNodePtr> class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
template <class _NodePtr>      class _LIBCPP_TEMPLATE_VIS __hash_local_iterator;
template <class _ConstNodePtr> class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
template <class _HashIterator> class _LIBCPP_TEMPLATE_VIS __hash_map_iterator;
template <class _HashIterator> class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;

template <class _Tp>
struct __hash_key_value_types {
  static_assert(!is_reference<_Tp>::value && !is_const<_Tp>::value, "");
  typedef _Tp key_type;
  typedef _Tp __node_value_type;
  typedef _Tp __container_value_type;
  static const bool __is_map = false;

  _LIBCPP_INLINE_VISIBILITY
  static key_type const& __get_key(_Tp const& __v) {
    return __v;
  }
  _LIBCPP_INLINE_VISIBILITY
  static __container_value_type const& __get_value(__node_value_type const& __v) {
    return __v;
  }
  _LIBCPP_INLINE_VISIBILITY
  static __container_value_type* __get_ptr(__node_value_type& __n) {
    return _VSTD::addressof(__n);
  }
  _LIBCPP_INLINE_VISIBILITY
  static __container_value_type&& __move(__node_value_type& __v) {
    return _VSTD::move(__v);
  }
};

template <class _Key, class _Tp>
struct __hash_key_value_types<__hash_value_type<_Key, _Tp> > {
  typedef _Key                                         key_type;
  typedef _Tp                                          mapped_type;
  typedef __hash_value_type<_Key, _Tp>                 __node_value_type;
  typedef pair<const _Key, _Tp>                        __container_value_type;
  typedef __container_value_type                       __map_value_type;
  static const bool __is_map = true;

  _LIBCPP_INLINE_VISIBILITY
  static key_type const& __get_key(__container_value_type const& __v) {
    return __v.first;
  }

  template <class _Up, __enable_if_t<__is_same_uncvref<_Up, __node_value_type>::value, int> = 0>
  _LIBCPP_INLINE_VISIBILITY
  static __container_value_type const&
  __get_value(_Up& __t) {
    return __t.__get_value();
  }

  template <class _Up, __enable_if_t<__is_same_uncvref<_Up, __container_value_type>::value, int> = 0>
  _LIBCPP_INLINE_VISIBILITY
  static __container_value_type const&
  __get_value(_Up& __t) {
    return __t;
  }

  _LIBCPP_INLINE_VISIBILITY
  static __container_value_type* __get_ptr(__node_value_type& __n) {
    return _VSTD::addressof(__n.__get_value());
  }
  _LIBCPP_INLINE_VISIBILITY
  static pair<key_type&&, mapped_type&&> __move(__node_value_type& __v) {
    return __v.__move();
  }
};

template <class _Tp, class _AllocPtr, class _KVTypes = __hash_key_value_types<_Tp>,
          bool = _KVTypes::__is_map>
struct __hash_map_pointer_types {};

template <class _Tp, class _AllocPtr, class _KVTypes>
struct __hash_map_pointer_types<_Tp, _AllocPtr, _KVTypes, true> {
  typedef typename _KVTypes::__map_value_type   _Mv;
  typedef __rebind_pointer_t<_AllocPtr, _Mv>
                                                       __map_value_type_pointer;
  typedef __rebind_pointer_t<_AllocPtr, const _Mv>
                                                 __const_map_value_type_pointer;
};

template <class _NodePtr, class _NodeT = typename pointer_traits<_NodePtr>::element_type>
struct __hash_node_types;

template <class _NodePtr, class _Tp, class _VoidPtr>
struct __hash_node_types<_NodePtr, __hash_node<_Tp, _VoidPtr> >
    : public __hash_key_value_types<_Tp>, __hash_map_pointer_types<_Tp, _VoidPtr>

{
  typedef __hash_key_value_types<_Tp>           __base;

public:
  typedef ptrdiff_t difference_type;
  typedef size_t size_type;

  typedef __rebind_pointer_t<_NodePtr, void>       __void_pointer;

  typedef typename pointer_traits<_NodePtr>::element_type       __node_type;
  typedef _NodePtr                                              __node_pointer;

  typedef __hash_node_base<__node_pointer>                      __node_base_type;
  typedef __rebind_pointer_t<_NodePtr, __node_base_type>
                                                             __node_base_pointer;

  typedef typename __node_base_type::__next_pointer          __next_pointer;

  typedef _Tp                                                 __node_value_type;
  typedef __rebind_pointer_t<_VoidPtr, __node_value_type>
                                                      __node_value_type_pointer;
  typedef __rebind_pointer_t<_VoidPtr, const __node_value_type>
                                                __const_node_value_type_pointer;

private:
    static_assert(!is_const<__node_type>::value,
                "_NodePtr should never be a pointer to const");
    static_assert((is_same<typename pointer_traits<_VoidPtr>::element_type, void>::value),
                  "_VoidPtr does not point to unqualified void type");
    static_assert((is_same<__rebind_pointer_t<_VoidPtr, __node_type>,
                          _NodePtr>::value), "_VoidPtr does not rebind to _NodePtr.");
};

template <class _HashIterator>
struct __hash_node_types_from_iterator;
template <class _NodePtr>
struct __hash_node_types_from_iterator<__hash_iterator<_NodePtr> > : __hash_node_types<_NodePtr> {};
template <class _NodePtr>
struct __hash_node_types_from_iterator<__hash_const_iterator<_NodePtr> > : __hash_node_types<_NodePtr> {};
template <class _NodePtr>
struct __hash_node_types_from_iterator<__hash_local_iterator<_NodePtr> > : __hash_node_types<_NodePtr> {};
template <class _NodePtr>
struct __hash_node_types_from_iterator<__hash_const_local_iterator<_NodePtr> > : __hash_node_types<_NodePtr> {};


template <class _NodeValueTp, class _VoidPtr>
struct __make_hash_node_types {
  typedef __hash_node<_NodeValueTp, _VoidPtr> _NodeTp;
  typedef __rebind_pointer_t<_VoidPtr, _NodeTp> _NodePtr;
  typedef __hash_node_types<_NodePtr> type;
};

template <class _NodePtr>
class _LIBCPP_TEMPLATE_VIS __hash_iterator
{
    typedef __hash_node_types<_NodePtr> _NodeTypes;
    typedef _NodePtr                            __node_pointer;
    typedef typename _NodeTypes::__next_pointer __next_pointer;

    __next_pointer            __node_;

public:
    typedef forward_iterator_tag                           iterator_category;
    typedef typename _NodeTypes::__node_value_type         value_type;
    typedef typename _NodeTypes::difference_type           difference_type;
    typedef value_type&                                    reference;
    typedef typename _NodeTypes::__node_value_type_pointer pointer;

    _LIBCPP_INLINE_VISIBILITY __hash_iterator() _NOEXCEPT : __node_(nullptr) {
    }

    _LIBCPP_INLINE_VISIBILITY
    reference operator*() const {
        return __node_->__upcast()->__get_value();
    }

    _LIBCPP_INLINE_VISIBILITY
    pointer operator->() const {
        return pointer_traits<pointer>::pointer_to(__node_->__upcast()->__get_value());
    }

    _LIBCPP_INLINE_VISIBILITY
    __hash_iterator& operator++() {
        __node_ = __node_->__next_;
        return *this;
    }

    _LIBCPP_INLINE_VISIBILITY
    __hash_iterator operator++(int)
    {
        __hash_iterator __t(*this);
        ++(*this);
        return __t;
    }

    friend _LIBCPP_INLINE_VISIBILITY
    bool operator==(const __hash_iterator& __x, const __hash_iterator& __y)
    {
        return __x.__node_ == __y.__node_;
    }
    friend _LIBCPP_INLINE_VISIBILITY
    bool operator!=(const __hash_iterator& __x, const __hash_iterator& __y)
        {return !(__x == __y);}

private:
    _LIBCPP_INLINE_VISIBILITY
    explicit __hash_iterator(__next_pointer __node) _NOEXCEPT
        : __node_(__node)
        {
        }

    template <class, class, class, class> friend class __hash_table;
    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_iterator;
    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
};

template <class _NodePtr>
class _LIBCPP_TEMPLATE_VIS __hash_const_iterator
{
    static_assert(!is_const<typename pointer_traits<_NodePtr>::element_type>::value, "");
    typedef __hash_node_types<_NodePtr> _NodeTypes;
    typedef _NodePtr                            __node_pointer;
    typedef typename _NodeTypes::__next_pointer __next_pointer;

    __next_pointer __node_;

public:
    typedef __hash_iterator<_NodePtr> __non_const_iterator;

    typedef forward_iterator_tag                                 iterator_category;
    typedef typename _NodeTypes::__node_value_type               value_type;
    typedef typename _NodeTypes::difference_type                 difference_type;
    typedef const value_type&                                    reference;
    typedef typename _NodeTypes::__const_node_value_type_pointer pointer;


    _LIBCPP_INLINE_VISIBILITY __hash_const_iterator() _NOEXCEPT : __node_(nullptr) {
    }

    _LIBCPP_INLINE_VISIBILITY
    __hash_const_iterator(const __non_const_iterator& __x) _NOEXCEPT
        : __node_(__x.__node_)
    {
    }

    _LIBCPP_INLINE_VISIBILITY
    reference operator*() const {
        return __node_->__upcast()->__get_value();
    }
    _LIBCPP_INLINE_VISIBILITY
    pointer operator->() const {
        return pointer_traits<pointer>::pointer_to(__node_->__upcast()->__get_value());
    }

    _LIBCPP_INLINE_VISIBILITY
    __hash_const_iterator& operator++() {
        __node_ = __node_->__next_;
        return *this;
    }

    _LIBCPP_INLINE_VISIBILITY
    __hash_const_iterator operator++(int)
    {
        __hash_const_iterator __t(*this);
        ++(*this);
        return __t;
    }

    friend _LIBCPP_INLINE_VISIBILITY
    bool operator==(const __hash_const_iterator& __x, const __hash_const_iterator& __y)
    {
        return __x.__node_ == __y.__node_;
    }
    friend _LIBCPP_INLINE_VISIBILITY
    bool operator!=(const __hash_const_iterator& __x, const __hash_const_iterator& __y)
        {return !(__x == __y);}

private:
    _LIBCPP_INLINE_VISIBILITY
    explicit __hash_const_iterator(__next_pointer __node) _NOEXCEPT
        : __node_(__node)
        {
        }

    template <class, class, class, class> friend class __hash_table;
    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
};

template <class _NodePtr>
class _LIBCPP_TEMPLATE_VIS __hash_local_iterator
{
    typedef __hash_node_types<_NodePtr> _NodeTypes;
    typedef _NodePtr                            __node_pointer;
    typedef typename _NodeTypes::__next_pointer __next_pointer;

    __next_pointer         __node_;
    size_t                 __bucket_;
    size_t                 __bucket_count_;

public:
    typedef forward_iterator_tag                                iterator_category;
    typedef typename _NodeTypes::__node_value_type              value_type;
    typedef typename _NodeTypes::difference_type                difference_type;
    typedef value_type&                                         reference;
    typedef typename _NodeTypes::__node_value_type_pointer      pointer;

    _LIBCPP_INLINE_VISIBILITY __hash_local_iterator() _NOEXCEPT : __node_(nullptr) {
    }

    _LIBCPP_INLINE_VISIBILITY
    reference operator*() const {
        return __node_->__upcast()->__get_value();
    }

    _LIBCPP_INLINE_VISIBILITY
    pointer operator->() const {
        return pointer_traits<pointer>::pointer_to(__node_->__upcast()->__get_value());
    }

    _LIBCPP_INLINE_VISIBILITY
    __hash_local_iterator& operator++() {
        __node_ = __node_->__next_;
        if (__node_ != nullptr && std::__constrain_hash(__node_->__hash(), __bucket_count_) != __bucket_)
            __node_ = nullptr;
        return *this;
    }

    _LIBCPP_INLINE_VISIBILITY
    __hash_local_iterator operator++(int)
    {
        __hash_local_iterator __t(*this);
        ++(*this);
        return __t;
    }

    friend _LIBCPP_INLINE_VISIBILITY
    bool operator==(const __hash_local_iterator& __x, const __hash_local_iterator& __y)
    {
        return __x.__node_ == __y.__node_;
    }
    friend _LIBCPP_INLINE_VISIBILITY
    bool operator!=(const __hash_local_iterator& __x, const __hash_local_iterator& __y)
        {return !(__x == __y);}

private:
    _LIBCPP_INLINE_VISIBILITY
    explicit __hash_local_iterator(__next_pointer __node, size_t __bucket,
                                   size_t __bucket_count) _NOEXCEPT
        : __node_(__node),
          __bucket_(__bucket),
          __bucket_count_(__bucket_count)
        {
            if (__node_ != nullptr)
                __node_ = __node_->__next_;
        }

    template <class, class, class, class> friend class __hash_table;
    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_iterator;
};

template <class _ConstNodePtr>
class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator
{
    typedef __hash_node_types<_ConstNodePtr> _NodeTypes;
    typedef _ConstNodePtr                       __node_pointer;
    typedef typename _NodeTypes::__next_pointer __next_pointer;

    __next_pointer         __node_;
    size_t                 __bucket_;
    size_t                 __bucket_count_;

    typedef pointer_traits<__node_pointer>          __pointer_traits;
    typedef typename __pointer_traits::element_type __node;
    typedef __remove_const_t<__node>                  __non_const_node;
    typedef __rebind_pointer_t<__node_pointer, __non_const_node>
        __non_const_node_pointer;
public:
    typedef __hash_local_iterator<__non_const_node_pointer>
                                                    __non_const_iterator;

    typedef forward_iterator_tag                                 iterator_category;
    typedef typename _NodeTypes::__node_value_type               value_type;
    typedef typename _NodeTypes::difference_type                 difference_type;
    typedef const value_type&                                    reference;
    typedef typename _NodeTypes::__const_node_value_type_pointer pointer;


    _LIBCPP_INLINE_VISIBILITY __hash_const_local_iterator() _NOEXCEPT : __node_(nullptr) {
    }

    _LIBCPP_INLINE_VISIBILITY
    __hash_const_local_iterator(const __non_const_iterator& __x) _NOEXCEPT
        : __node_(__x.__node_),
          __bucket_(__x.__bucket_),
          __bucket_count_(__x.__bucket_count_)
    {
    }

    _LIBCPP_INLINE_VISIBILITY
    reference operator*() const {
        return __node_->__upcast()->__get_value();
    }

    _LIBCPP_INLINE_VISIBILITY
    pointer operator->() const {
        return pointer_traits<pointer>::pointer_to(__node_->__upcast()->__get_value());
    }

    _LIBCPP_INLINE_VISIBILITY
    __hash_const_local_iterator& operator++() {
        __node_ = __node_->__next_;
        if (__node_ != nullptr && std::__constrain_hash(__node_->__hash(), __bucket_count_) != __bucket_)
            __node_ = nullptr;
        return *this;
    }

    _LIBCPP_INLINE_VISIBILITY
    __hash_const_local_iterator operator++(int)
    {
        __hash_const_local_iterator __t(*this);
        ++(*this);
        return __t;
    }

    friend _LIBCPP_INLINE_VISIBILITY
    bool operator==(const __hash_const_local_iterator& __x, const __hash_const_local_iterator& __y)
    {
        return __x.__node_ == __y.__node_;
    }
    friend _LIBCPP_INLINE_VISIBILITY
    bool operator!=(const __hash_const_local_iterator& __x, const __hash_const_local_iterator& __y)
        {return !(__x == __y);}

private:
    _LIBCPP_INLINE_VISIBILITY
    explicit __hash_const_local_iterator(__next_pointer __node_ptr, size_t __bucket,
                                         size_t __bucket_count) _NOEXCEPT
        : __node_(__node_ptr),
          __bucket_(__bucket),
          __bucket_count_(__bucket_count)
        {
            if (__node_ != nullptr)
                __node_ = __node_->__next_;
        }

    template <class, class, class, class> friend class __hash_table;
    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
};

template <class _Alloc>
class __bucket_list_deallocator
{
    typedef _Alloc                                          allocator_type;
    typedef allocator_traits<allocator_type>                __alloc_traits;
    typedef typename __alloc_traits::size_type              size_type;

    __compressed_pair<size_type, allocator_type> __data_;
public:
    typedef typename __alloc_traits::pointer pointer;

    _LIBCPP_INLINE_VISIBILITY
    __bucket_list_deallocator()
        _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
        : __data_(0, __default_init_tag()) {}

    _LIBCPP_INLINE_VISIBILITY
    __bucket_list_deallocator(const allocator_type& __a, size_type __size)
        _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
        : __data_(__size, __a) {}

    _LIBCPP_INLINE_VISIBILITY
    __bucket_list_deallocator(__bucket_list_deallocator&& __x)
        _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
        : __data_(_VSTD::move(__x.__data_))
    {
        __x.size() = 0;
    }

    _LIBCPP_INLINE_VISIBILITY
    size_type& size() _NOEXCEPT {return __data_.first();}
    _LIBCPP_INLINE_VISIBILITY
    size_type  size() const _NOEXCEPT {return __data_.first();}

    _LIBCPP_INLINE_VISIBILITY
    allocator_type& __alloc() _NOEXCEPT {return __data_.second();}
    _LIBCPP_INLINE_VISIBILITY
    const allocator_type& __alloc() const _NOEXCEPT {return __data_.second();}

    _LIBCPP_INLINE_VISIBILITY
    void operator()(pointer __p) _NOEXCEPT
    {
        __alloc_traits::deallocate(__alloc(), __p, size());
    }
};

template <class _Alloc> class __hash_map_node_destructor;

template <class _Alloc>
class __hash_node_destructor
{
    typedef _Alloc                                          allocator_type;
    typedef allocator_traits<allocator_type>                __alloc_traits;

public:
    typedef typename __alloc_traits::pointer                pointer;
private:
    typedef __hash_node_types<pointer> _NodeTypes;

    allocator_type& __na_;

public:
    bool __value_constructed;

    _LIBCPP_HIDE_FROM_ABI __hash_node_destructor(__hash_node_destructor const&) = default;
    _LIBCPP_HIDE_FROM_ABI __hash_node_destructor& operator=(const __hash_node_destructor&) = delete;


    _LIBCPP_INLINE_VISIBILITY
    explicit __hash_node_destructor(allocator_type& __na,
                                    bool __constructed = false) _NOEXCEPT
        : __na_(__na),
          __value_constructed(__constructed)
        {}

    _LIBCPP_INLINE_VISIBILITY
    void operator()(pointer __p) _NOEXCEPT
    {
        if (__value_constructed) {
            __alloc_traits::destroy(__na_, _NodeTypes::__get_ptr(__p->__get_value()));
            std::__destroy_at(std::addressof(*__p));
        }
        if (__p)
            __alloc_traits::deallocate(__na_, __p, 1);
    }

    template <class> friend class __hash_map_node_destructor;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 712 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
template <class _NodeType, class _Alloc>
struct __generic_container_node_destructor;

template <class _Tp, class _VoidPtr, class _Alloc>
struct __generic_container_node_destructor<__hash_node<_Tp, _VoidPtr>, _Alloc>
    : __hash_node_destructor<_Alloc>
{
    using __hash_node_destructor<_Alloc>::__hash_node_destructor;
};
#endif
# 722 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3

template <class _Key, class _Hash, class _Equal>
struct __enforce_unordered_container_requirements {
#ifndef _LIBCPP_CXX03_LANG
    static_assert(__check_hash_requirements<_Key, _Hash>::value,
    "the specified hash does not meet the Hash requirements");
    static_assert(is_copy_constructible<_Equal>::value,
    "the specified comparator is required to be copy constructible");
#endif
# 731 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
    typedef int type;
};

template <class _Key, class _Hash, class _Equal>
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_DIAGNOSE_WARNING(!__invokable<_Equal const&, _Key const&, _Key const&>::value,
    "the specified comparator type does not provide a viable const call operator")
    _LIBCPP_DIAGNOSE_WARNING(!__invokable<_Hash const&, _Key const&>::value,
    "the specified hash functor does not provide a viable const call operator")
#endif
# 741 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
typename __enforce_unordered_container_requirements<_Key, _Hash, _Equal>::type
__diagnose_unordered_container_requirements(int);

// This dummy overload is used so that the compiler won't emit a spurious
// "no matching function for call to __diagnose_unordered_xxx" diagnostic
// when the overload above causes a hard error.
template <class _Key, class _Hash, class _Equal>
int __diagnose_unordered_container_requirements(void*);

template <class _Tp, class _Hash, class _Equal, class _Alloc>
class __hash_table
{
public:
    typedef _Tp    value_type;
    typedef _Hash  hasher;
    typedef _Equal key_equal;
    typedef _Alloc allocator_type;

private:
    typedef allocator_traits<allocator_type> __alloc_traits;
    typedef typename
      __make_hash_node_types<value_type, typename __alloc_traits::void_pointer>::type
                                                                     _NodeTypes;
public:

    typedef typename _NodeTypes::__node_value_type           __node_value_type;
    typedef typename _NodeTypes::__container_value_type      __container_value_type;
    typedef typename _NodeTypes::key_type                    key_type;
    typedef value_type&                              reference;
    typedef const value_type&                        const_reference;
    typedef typename __alloc_traits::pointer         pointer;
    typedef typename __alloc_traits::const_pointer   const_pointer;
#ifndef _LIBCPP_ABI_FIX_UNORDERED_CONTAINER_SIZE_TYPE
    typedef typename __alloc_traits::size_type       size_type;
#else
# 776 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
    typedef typename _NodeTypes::size_type           size_type;
#endif
# 778 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
    typedef typename _NodeTypes::difference_type     difference_type;
public:
    // Create __node

    typedef typename _NodeTypes::__node_type __node;
    typedef __rebind_alloc<__alloc_traits, __node>   __node_allocator;
    typedef allocator_traits<__node_allocator>       __node_traits;
    typedef typename _NodeTypes::__void_pointer      __void_pointer;
    typedef typename _NodeTypes::__node_pointer      __node_pointer;
    typedef typename _NodeTypes::__node_pointer      __node_const_pointer;
    typedef typename _NodeTypes::__node_base_type    __first_node;
    typedef typename _NodeTypes::__node_base_pointer __node_base_pointer;
    typedef typename _NodeTypes::__next_pointer      __next_pointer;

private:
    // check for sane allocator pointer rebinding semantics. Rebinding the
    // allocator for a new pointer type should be exactly the same as rebinding
    // the pointer using 'pointer_traits'.
    static_assert((is_same<__node_pointer, typename __node_traits::pointer>::value),
                  "Allocator does not rebind pointers in a sane manner.");
    typedef __rebind_alloc<__node_traits, __first_node> __node_base_allocator;
    typedef allocator_traits<__node_base_allocator> __node_base_traits;
    static_assert((is_same<__node_base_pointer, typename __node_base_traits::pointer>::value),
                 "Allocator does not rebind pointers in a sane manner.");

private:

    typedef __rebind_alloc<__node_traits, __next_pointer>  __pointer_allocator;
    typedef __bucket_list_deallocator<__pointer_allocator> __bucket_list_deleter;
    typedef unique_ptr<__next_pointer[], __bucket_list_deleter> __bucket_list;
    typedef allocator_traits<__pointer_allocator>          __pointer_alloc_traits;
    typedef typename __bucket_list_deleter::pointer       __node_pointer_pointer;

    // --- Member data begin ---
    __bucket_list                                         __bucket_list_;
    __compressed_pair<__first_node, __node_allocator>     __p1_;
    __compressed_pair<size_type, hasher>                  __p2_;
    __compressed_pair<float, key_equal>                   __p3_;
    // --- Member data end ---

    _LIBCPP_INLINE_VISIBILITY
    size_type& size() _NOEXCEPT {return __p2_.first();}
public:
    _LIBCPP_INLINE_VISIBILITY
    size_type  size() const _NOEXCEPT {return __p2_.first();}

    _LIBCPP_INLINE_VISIBILITY
    hasher& hash_function() _NOEXCEPT {return __p2_.second();}
    _LIBCPP_INLINE_VISIBILITY
    const hasher& hash_function() const _NOEXCEPT {return __p2_.second();}

    _LIBCPP_INLINE_VISIBILITY
    float& max_load_factor() _NOEXCEPT {return __p3_.first();}
    _LIBCPP_INLINE_VISIBILITY
    float  max_load_factor() const _NOEXCEPT {return __p3_.first();}

    _LIBCPP_INLINE_VISIBILITY
    key_equal& key_eq() _NOEXCEPT {return __p3_.second();}
    _LIBCPP_INLINE_VISIBILITY
    const key_equal& key_eq() const _NOEXCEPT {return __p3_.second();}

    _LIBCPP_INLINE_VISIBILITY
    __node_allocator& __node_alloc() _NOEXCEPT {return __p1_.second();}
    _LIBCPP_INLINE_VISIBILITY
    const __node_allocator& __node_alloc() const _NOEXCEPT
        {return __p1_.second();}

public:
    typedef __hash_iterator<__node_pointer>                   iterator;
    typedef __hash_const_iterator<__node_pointer>             const_iterator;
    typedef __hash_local_iterator<__node_pointer>             local_iterator;
    typedef __hash_const_local_iterator<__node_pointer>       const_local_iterator;

    _LIBCPP_INLINE_VISIBILITY
    __hash_table()
        _NOEXCEPT_(
            is_nothrow_default_constructible<__bucket_list>::value &&
            is_nothrow_default_constructible<__first_node>::value &&
            is_nothrow_default_constructible<__node_allocator>::value &&
            is_nothrow_default_constructible<hasher>::value &&
            is_nothrow_default_constructible<key_equal>::value);
    _LIBCPP_INLINE_VISIBILITY
    __hash_table(const hasher& __hf, const key_equal& __eql);
    _LIBCPP_HIDE_FROM_ABI __hash_table(const hasher& __hf, const key_equal& __eql,
                 const allocator_type& __a);
    _LIBCPP_HIDE_FROM_ABI explicit __hash_table(const allocator_type& __a);
    _LIBCPP_HIDE_FROM_ABI __hash_table(const __hash_table& __u);
    _LIBCPP_HIDE_FROM_ABI __hash_table(const __hash_table& __u, const allocator_type& __a);
    _LIBCPP_HIDE_FROM_ABI __hash_table(__hash_table&& __u)
        _NOEXCEPT_(
            is_nothrow_move_constructible<__bucket_list>::value &&
            is_nothrow_move_constructible<__first_node>::value &&
            is_nothrow_move_constructible<__node_allocator>::value &&
            is_nothrow_move_constructible<hasher>::value &&
            is_nothrow_move_constructible<key_equal>::value);
    _LIBCPP_HIDE_FROM_ABI __hash_table(__hash_table&& __u, const allocator_type& __a);
    _LIBCPP_HIDE_FROM_ABI ~__hash_table();

    _LIBCPP_HIDE_FROM_ABI __hash_table& operator=(const __hash_table& __u);
    _LIBCPP_INLINE_VISIBILITY
    __hash_table& operator=(__hash_table&& __u)
        _NOEXCEPT_(
            __node_traits::propagate_on_container_move_assignment::value &&
            is_nothrow_move_assignable<__node_allocator>::value &&
            is_nothrow_move_assignable<hasher>::value &&
            is_nothrow_move_assignable<key_equal>::value);
    template <class _InputIterator>
    _LIBCPP_HIDE_FROM_ABI void __assign_unique(_InputIterator __first, _InputIterator __last);
    template <class _InputIterator>
    _LIBCPP_HIDE_FROM_ABI void __assign_multi(_InputIterator __first, _InputIterator __last);

    _LIBCPP_INLINE_VISIBILITY
    size_type max_size() const _NOEXCEPT
    {
        return _VSTD::min<size_type>(
            __node_traits::max_size(__node_alloc()),
            numeric_limits<difference_type >::max()
        );
    }

private:
    _LIBCPP_INLINE_VISIBILITY
    __next_pointer __node_insert_multi_prepare(size_t __cp_hash,
                                               value_type& __cp_val);
    _LIBCPP_INLINE_VISIBILITY
    void __node_insert_multi_perform(__node_pointer __cp,
                                     __next_pointer __pn) _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY
    __next_pointer __node_insert_unique_prepare(size_t __nd_hash,
                                                value_type& __nd_val);
    _LIBCPP_INLINE_VISIBILITY
    void __node_insert_unique_perform(__node_pointer __ptr) _NOEXCEPT;

public:
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> __node_insert_unique(__node_pointer __nd);
    _LIBCPP_INLINE_VISIBILITY
    iterator             __node_insert_multi(__node_pointer __nd);
    _LIBCPP_INLINE_VISIBILITY
    iterator             __node_insert_multi(const_iterator __p,
                                             __node_pointer __nd);

    template <class _Key, class ..._Args>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> __emplace_unique_key_args(_Key const& __k, _Args&&... __args);

    template <class... _Args>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> __emplace_unique_impl(_Args&&... __args);

    template <class _Pp>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> __emplace_unique(_Pp&& __x) {
      return __emplace_unique_extract_key(_VSTD::forward<_Pp>(__x),
                                          __can_extract_key<_Pp, key_type>());
    }

    template <class _First, class _Second,
              __enable_if_t<__can_extract_map_key<_First, key_type, __container_value_type>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool>
    __emplace_unique(_First&& __f, _Second&& __s) {
        return __emplace_unique_key_args(__f, _VSTD::forward<_First>(__f),
                                              _VSTD::forward<_Second>(__s));
    }

    template <class... _Args>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> __emplace_unique(_Args&&... __args) {
      return __emplace_unique_impl(_VSTD::forward<_Args>(__args)...);
    }

    template <class _Pp>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool>
    __emplace_unique_extract_key(_Pp&& __x, __extract_key_fail_tag) {
      return __emplace_unique_impl(_VSTD::forward<_Pp>(__x));
    }
    template <class _Pp>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool>
    __emplace_unique_extract_key(_Pp&& __x, __extract_key_self_tag) {
      return __emplace_unique_key_args(__x, _VSTD::forward<_Pp>(__x));
    }
    template <class _Pp>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool>
    __emplace_unique_extract_key(_Pp&& __x, __extract_key_first_tag) {
      return __emplace_unique_key_args(__x.first, _VSTD::forward<_Pp>(__x));
    }

    template <class... _Args>
    _LIBCPP_INLINE_VISIBILITY
    iterator __emplace_multi(_Args&&... __args);
    template <class... _Args>
    _LIBCPP_INLINE_VISIBILITY
    iterator __emplace_hint_multi(const_iterator __p, _Args&&... __args);


    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool>
    __insert_unique(__container_value_type&& __x) {
      return __emplace_unique_key_args(_NodeTypes::__get_key(__x), _VSTD::move(__x));
    }

    template <class _Pp, class = __enable_if_t<!__is_same_uncvref<_Pp, __container_value_type>::value> >
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> __insert_unique(_Pp&& __x) {
      return __emplace_unique(_VSTD::forward<_Pp>(__x));
    }

    template <class _Pp>
    _LIBCPP_INLINE_VISIBILITY
    iterator __insert_multi(_Pp&& __x) {
      return __emplace_multi(_VSTD::forward<_Pp>(__x));
    }

    template <class _Pp>
    _LIBCPP_INLINE_VISIBILITY
    iterator __insert_multi(const_iterator __p, _Pp&& __x) {
        return __emplace_hint_multi(__p, _VSTD::forward<_Pp>(__x));
    }

    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> __insert_unique(const __container_value_type& __x) {
        return __emplace_unique_key_args(_NodeTypes::__get_key(__x), __x);
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1008 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
    template <class _NodeHandle, class _InsertReturnType>
    _LIBCPP_INLINE_VISIBILITY
    _InsertReturnType __node_handle_insert_unique(_NodeHandle&& __nh);
    template <class _NodeHandle>
    _LIBCPP_INLINE_VISIBILITY
    iterator __node_handle_insert_unique(const_iterator __hint,
                                         _NodeHandle&& __nh);
    template <class _Table>
    _LIBCPP_INLINE_VISIBILITY
    void __node_handle_merge_unique(_Table& __source);

    template <class _NodeHandle>
    _LIBCPP_INLINE_VISIBILITY
    iterator __node_handle_insert_multi(_NodeHandle&& __nh);
    template <class _NodeHandle>
    _LIBCPP_INLINE_VISIBILITY
    iterator __node_handle_insert_multi(const_iterator __hint, _NodeHandle&& __nh);
    template <class _Table>
    _LIBCPP_INLINE_VISIBILITY
    void __node_handle_merge_multi(_Table& __source);

    template <class _NodeHandle>
    _LIBCPP_INLINE_VISIBILITY
    _NodeHandle __node_handle_extract(key_type const& __key);
    template <class _NodeHandle>
    _LIBCPP_INLINE_VISIBILITY
    _NodeHandle __node_handle_extract(const_iterator __it);
#endif
# 1036 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3

    _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY void __rehash_unique(size_type __n) { __rehash<true>(__n); }
    _LIBCPP_INLINE_VISIBILITY void __rehash_multi(size_type __n) { __rehash<false>(__n); }
    _LIBCPP_INLINE_VISIBILITY void __reserve_unique(size_type __n)
    {
        __rehash_unique(static_cast<size_type>(std::ceil(__n / max_load_factor())));
    }
    _LIBCPP_INLINE_VISIBILITY void __reserve_multi(size_type __n)
    {
        __rehash_multi(static_cast<size_type>(std::ceil(__n / max_load_factor())));
    }

    _LIBCPP_INLINE_VISIBILITY
    size_type bucket_count() const _NOEXCEPT
    {
        return __bucket_list_.get_deleter().size();
    }

    _LIBCPP_INLINE_VISIBILITY
    iterator       begin() _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY
    iterator       end() _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY
    const_iterator begin() const _NOEXCEPT;
    _LIBCPP_INLINE_VISIBILITY
    const_iterator end() const _NOEXCEPT;

    template <class _Key>
        _LIBCPP_INLINE_VISIBILITY
        size_type bucket(const _Key& __k) const
        {
            _LIBCPP_ASSERT_UNCATEGORIZED(bucket_count() > 0,
                "unordered container::bucket(key) called when bucket_count() == 0");
            return std::__constrain_hash(hash_function()(__k), bucket_count());
        }

    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI iterator       find(const _Key& __x);
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI const_iterator find(const _Key& __x) const;

    typedef __hash_node_destructor<__node_allocator> _Dp;
    typedef unique_ptr<__node, _Dp> __node_holder;

    _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __p);
    _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __first, const_iterator __last);
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI size_type __erase_unique(const _Key& __k);
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI size_type __erase_multi(const _Key& __k);
    _LIBCPP_HIDE_FROM_ABI __node_holder remove(const_iterator __p) _NOEXCEPT;

    template <class _Key>
        _LIBCPP_INLINE_VISIBILITY
        size_type __count_unique(const _Key& __k) const;
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI size_type __count_multi(const _Key& __k) const;

    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI pair<iterator, iterator>
        __equal_range_unique(const _Key& __k);
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI pair<const_iterator, const_iterator>
        __equal_range_unique(const _Key& __k) const;

    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI pair<iterator, iterator>
        __equal_range_multi(const _Key& __k);
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI pair<const_iterator, const_iterator>
        __equal_range_multi(const _Key& __k) const;

    _LIBCPP_HIDE_FROM_ABI void swap(__hash_table& __u)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 11
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1111 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
        _NOEXCEPT_(
            __is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value
            && (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value
                  || __is_nothrow_swappable<__pointer_allocator>::value)
            && (!__node_traits::propagate_on_container_swap::value
                  || __is_nothrow_swappable<__node_allocator>::value)
            );
#else
# 1119 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
     _NOEXCEPT_(__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value);
#endif
# 1121 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3

    _LIBCPP_INLINE_VISIBILITY
    size_type max_bucket_count() const _NOEXCEPT
        {return max_size(); }
    _LIBCPP_HIDE_FROM_ABI size_type bucket_size(size_type __n) const;
    _LIBCPP_INLINE_VISIBILITY float load_factor() const _NOEXCEPT
    {
        size_type __bc = bucket_count();
        return __bc != 0 ? (float)size() / __bc : 0.f;
    }
    _LIBCPP_INLINE_VISIBILITY void max_load_factor(float __mlf) _NOEXCEPT
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__mlf > 0,
            "unordered container::max_load_factor(lf) called with lf <= 0");
        max_load_factor() = _VSTD::max(__mlf, load_factor());
    }

    _LIBCPP_INLINE_VISIBILITY
    local_iterator
    begin(size_type __n)
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n < bucket_count(),
            "unordered container::begin(n) called with n >= bucket_count()");
        return local_iterator(__bucket_list_[__n], __n, bucket_count());
    }

    _LIBCPP_INLINE_VISIBILITY
    local_iterator
    end(size_type __n)
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n < bucket_count(),
            "unordered container::end(n) called with n >= bucket_count()");
        return local_iterator(nullptr, __n, bucket_count());
    }

    _LIBCPP_INLINE_VISIBILITY
    const_local_iterator
    cbegin(size_type __n) const
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n < bucket_count(),
            "unordered container::cbegin(n) called with n >= bucket_count()");
        return const_local_iterator(__bucket_list_[__n], __n, bucket_count());
    }

    _LIBCPP_INLINE_VISIBILITY
    const_local_iterator
    cend(size_type __n) const
    {
        _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n < bucket_count(),
            "unordered container::cend(n) called with n >= bucket_count()");
        return const_local_iterator(nullptr, __n, bucket_count());
    }

private:
    template <bool _UniqueKeys>
    _LIBCPP_HIDE_FROM_ABI void __rehash(size_type __n);
    template <bool _UniqueKeys>
    _LIBCPP_HIDE_FROM_ABI void __do_rehash(size_type __n);

    template <class ..._Args>
    _LIBCPP_HIDE_FROM_ABI __node_holder __construct_node(_Args&& ...__args);

    template <class _First, class ..._Rest>
    _LIBCPP_HIDE_FROM_ABI __node_holder __construct_node_hash(size_t __hash, _First&& __f, _Rest&&... __rest);


    _LIBCPP_INLINE_VISIBILITY
    void __copy_assign_alloc(const __hash_table& __u)
        {__copy_assign_alloc(__u, integral_constant<bool,
             __node_traits::propagate_on_container_copy_assignment::value>());}
    _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const __hash_table& __u, true_type);
    _LIBCPP_INLINE_VISIBILITY
        void __copy_assign_alloc(const __hash_table&, false_type) {}

    _LIBCPP_HIDE_FROM_ABI void __move_assign(__hash_table& __u, false_type);
    _LIBCPP_HIDE_FROM_ABI void __move_assign(__hash_table& __u, true_type)
        _NOEXCEPT_(
            is_nothrow_move_assignable<__node_allocator>::value &&
            is_nothrow_move_assignable<hasher>::value &&
            is_nothrow_move_assignable<key_equal>::value);
    _LIBCPP_INLINE_VISIBILITY
    void __move_assign_alloc(__hash_table& __u)
        _NOEXCEPT_(
            !__node_traits::propagate_on_container_move_assignment::value ||
            (is_nothrow_move_assignable<__pointer_allocator>::value &&
             is_nothrow_move_assignable<__node_allocator>::value))
        {__move_assign_alloc(__u, integral_constant<bool,
             __node_traits::propagate_on_container_move_assignment::value>());}
    _LIBCPP_INLINE_VISIBILITY
    void __move_assign_alloc(__hash_table& __u, true_type)
        _NOEXCEPT_(
            is_nothrow_move_assignable<__pointer_allocator>::value &&
            is_nothrow_move_assignable<__node_allocator>::value)
    {
        __bucket_list_.get_deleter().__alloc() =
                _VSTD::move(__u.__bucket_list_.get_deleter().__alloc());
        __node_alloc() = _VSTD::move(__u.__node_alloc());
    }
    _LIBCPP_INLINE_VISIBILITY
        void __move_assign_alloc(__hash_table&, false_type) _NOEXCEPT {}

    _LIBCPP_HIDE_FROM_ABI void __deallocate_node(__next_pointer __np) _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI __next_pointer __detach() _NOEXCEPT;

    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
};

template <class _Tp, class _Hash, class _Equal, class _Alloc>
inline
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table()
    _NOEXCEPT_(
        is_nothrow_default_constructible<__bucket_list>::value &&
        is_nothrow_default_constructible<__first_node>::value &&
        is_nothrow_default_constructible<__node_allocator>::value &&
        is_nothrow_default_constructible<hasher>::value &&
        is_nothrow_default_constructible<key_equal>::value)
    : __p2_(0, __default_init_tag()),
      __p3_(1.0f, __default_init_tag())
{
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
inline
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const hasher& __hf,
                                                       const key_equal& __eql)
    : __bucket_list_(nullptr, __bucket_list_deleter()),
      __p1_(),
      __p2_(0, __hf),
      __p3_(1.0f, __eql)
{
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const hasher& __hf,
                                                       const key_equal& __eql,
                                                       const allocator_type& __a)
    : __bucket_list_(nullptr, __bucket_list_deleter(__pointer_allocator(__a), 0)),
      __p1_(__default_init_tag(), __node_allocator(__a)),
      __p2_(0, __hf),
      __p3_(1.0f, __eql)
{
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const allocator_type& __a)
    : __bucket_list_(nullptr, __bucket_list_deleter(__pointer_allocator(__a), 0)),
      __p1_(__default_init_tag(), __node_allocator(__a)),
      __p2_(0, __default_init_tag()),
      __p3_(1.0f, __default_init_tag())
{
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const __hash_table& __u)
    : __bucket_list_(nullptr,
          __bucket_list_deleter(allocator_traits<__pointer_allocator>::
              select_on_container_copy_construction(
                  __u.__bucket_list_.get_deleter().__alloc()), 0)),
      __p1_(__default_init_tag(), allocator_traits<__node_allocator>::
          select_on_container_copy_construction(__u.__node_alloc())),
      __p2_(0, __u.hash_function()),
      __p3_(__u.__p3_)
{
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const __hash_table& __u,
                                                       const allocator_type& __a)
    : __bucket_list_(nullptr, __bucket_list_deleter(__pointer_allocator(__a), 0)),
      __p1_(__default_init_tag(), __node_allocator(__a)),
      __p2_(0, __u.hash_function()),
      __p3_(__u.__p3_)
{
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u)
        _NOEXCEPT_(
            is_nothrow_move_constructible<__bucket_list>::value &&
            is_nothrow_move_constructible<__first_node>::value &&
            is_nothrow_move_constructible<__node_allocator>::value &&
            is_nothrow_move_constructible<hasher>::value &&
            is_nothrow_move_constructible<key_equal>::value)
    : __bucket_list_(_VSTD::move(__u.__bucket_list_)),
      __p1_(_VSTD::move(__u.__p1_)),
      __p2_(_VSTD::move(__u.__p2_)),
      __p3_(_VSTD::move(__u.__p3_))
{
    if (size() > 0)
    {
        __bucket_list_[std::__constrain_hash(__p1_.first().__next_->__hash(), bucket_count())] =
            __p1_.first().__ptr();
        __u.__p1_.first().__next_ = nullptr;
        __u.size() = 0;
    }
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u,
                                                       const allocator_type& __a)
    : __bucket_list_(nullptr, __bucket_list_deleter(__pointer_allocator(__a), 0)),
      __p1_(__default_init_tag(), __node_allocator(__a)),
      __p2_(0, _VSTD::move(__u.hash_function())),
      __p3_(_VSTD::move(__u.__p3_))
{
    if (__a == allocator_type(__u.__node_alloc()))
    {
        __bucket_list_.reset(__u.__bucket_list_.release());
        __bucket_list_.get_deleter().size() = __u.__bucket_list_.get_deleter().size();
        __u.__bucket_list_.get_deleter().size() = 0;
        if (__u.size() > 0)
        {
            __p1_.first().__next_ = __u.__p1_.first().__next_;
            __u.__p1_.first().__next_ = nullptr;
            __bucket_list_[std::__constrain_hash(__p1_.first().__next_->__hash(), bucket_count())] =
                __p1_.first().__ptr();
            size() = __u.size();
            __u.size() = 0;
        }
    }
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::~__hash_table()
{
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_CXX03_LANG)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1348 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
    static_assert((is_copy_constructible<key_equal>::value),
                 "Predicate must be copy-constructible.");
    static_assert((is_copy_constructible<hasher>::value),
                 "Hasher must be copy-constructible.");
#endif
# 1353 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3

    __deallocate_node(__p1_.first().__next_);
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
void
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__copy_assign_alloc(
        const __hash_table& __u, true_type)
{
    if (__node_alloc() != __u.__node_alloc())
    {
        clear();
        __bucket_list_.reset();
        __bucket_list_.get_deleter().size() = 0;
    }
    __bucket_list_.get_deleter().__alloc() = __u.__bucket_list_.get_deleter().__alloc();
    __node_alloc() = __u.__node_alloc();
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
__hash_table<_Tp, _Hash, _Equal, _Alloc>&
__hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(const __hash_table& __u)
{
    if (this != _VSTD::addressof(__u))
    {
        __copy_assign_alloc(__u);
        hash_function() = __u.hash_function();
        key_eq() = __u.key_eq();
        max_load_factor() = __u.max_load_factor();
        __assign_multi(__u.begin(), __u.end());
    }
    return *this;
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
void
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__deallocate_node(__next_pointer __np)
    _NOEXCEPT
{
    __node_allocator& __na = __node_alloc();
    while (__np != nullptr)
    {
        __next_pointer __next = __np->__next_;
        __node_pointer __real_np = __np->__upcast();
        __node_traits::destroy(__na, _NodeTypes::__get_ptr(__real_np->__get_value()));
        std::__destroy_at(std::addressof(*__real_np));
        __node_traits::deallocate(__na, __real_np, 1);
        __np = __next;
    }
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__next_pointer
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__detach() _NOEXCEPT
{
    size_type __bc = bucket_count();
    for (size_type __i = 0; __i < __bc; ++__i)
        __bucket_list_[__i] = nullptr;
    size() = 0;
    __next_pointer __cache = __p1_.first().__next_;
    __p1_.first().__next_ = nullptr;
    return __cache;
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
void
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(
        __hash_table& __u, true_type)
    _NOEXCEPT_(
        is_nothrow_move_assignable<__node_allocator>::value &&
        is_nothrow_move_assignable<hasher>::value &&
        is_nothrow_move_assignable<key_equal>::value)
{
    clear();
    __bucket_list_.reset(__u.__bucket_list_.release());
    __bucket_list_.get_deleter().size() = __u.__bucket_list_.get_deleter().size();
    __u.__bucket_list_.get_deleter().size() = 0;
    __move_assign_alloc(__u);
    size() = __u.size();
    hash_function() = _VSTD::move(__u.hash_function());
    max_load_factor() = __u.max_load_factor();
    key_eq() = _VSTD::move(__u.key_eq());
    __p1_.first().__next_ = __u.__p1_.first().__next_;
    if (size() > 0)
    {
        __bucket_list_[std::__constrain_hash(__p1_.first().__next_->__hash(), bucket_count())] =
            __p1_.first().__ptr();
        __u.__p1_.first().__next_ = nullptr;
        __u.size() = 0;
    }
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
void
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(
        __hash_table& __u, false_type)
{
    if (__node_alloc() == __u.__node_alloc())
        __move_assign(__u, true_type());
    else
    {
        hash_function() = _VSTD::move(__u.hash_function());
        key_eq() = _VSTD::move(__u.key_eq());
        max_load_factor() = __u.max_load_factor();
        if (bucket_count() != 0)
        {
            __next_pointer __cache = __detach();
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
            try
            {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1464 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
                const_iterator __i = __u.begin();
                while (__cache != nullptr && __u.size() != 0)
                {
                    __cache->__upcast()->__get_value() =
                        _VSTD::move(__u.remove(__i++)->__get_value());
                    __next_pointer __next = __cache->__next_;
                    __node_insert_multi(__cache->__upcast());
                    __cache = __next;
                }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
            }
            catch (...)
            {
                __deallocate_node(__cache);
                throw;
            }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1481 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
            __deallocate_node(__cache);
        }
        const_iterator __i = __u.begin();
        while (__u.size() != 0)
        {
            __node_holder __h = __construct_node(_NodeTypes::__move(__u.remove(__i++)->__get_value()));
            __node_insert_multi(__h.get());
            __h.release();
        }
    }
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
inline
__hash_table<_Tp, _Hash, _Equal, _Alloc>&
__hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(__hash_table&& __u)
    _NOEXCEPT_(
        __node_traits::propagate_on_container_move_assignment::value &&
        is_nothrow_move_assignable<__node_allocator>::value &&
        is_nothrow_move_assignable<hasher>::value &&
        is_nothrow_move_assignable<key_equal>::value)
{
    __move_assign(__u, integral_constant<bool,
                  __node_traits::propagate_on_container_move_assignment::value>());
    return *this;
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _InputIterator>
void
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_unique(_InputIterator __first,
                                                          _InputIterator __last)
{
    typedef iterator_traits<_InputIterator> _ITraits;
    typedef typename _ITraits::value_type _ItValueType;
    static_assert((is_same<_ItValueType, __container_value_type>::value),
                  "__assign_unique may only be called with the containers value type");

    if (bucket_count() != 0)
    {
        __next_pointer __cache = __detach();
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1526 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
            for (; __cache != nullptr && __first != __last; ++__first)
            {
                __cache->__upcast()->__get_value() = *__first;
                __next_pointer __next = __cache->__next_;
                __node_insert_unique(__cache->__upcast());
                __cache = __next;
            }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __deallocate_node(__cache);
            throw;
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1541 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
        __deallocate_node(__cache);
    }
    for (; __first != __last; ++__first)
        __insert_unique(*__first);
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _InputIterator>
void
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_multi(_InputIterator __first,
                                                         _InputIterator __last)
{
    typedef iterator_traits<_InputIterator> _ITraits;
    typedef typename _ITraits::value_type _ItValueType;
    static_assert((is_same<_ItValueType, __container_value_type>::value ||
                  is_same<_ItValueType, __node_value_type>::value),
                  "__assign_multi may only be called with the containers value type"
                  " or the nodes value type");
    if (bucket_count() != 0)
    {
        __next_pointer __cache = __detach();
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        try
        {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1566 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
            for (; __cache != nullptr && __first != __last; ++__first)
            {
                __cache->__upcast()->__get_value() = *__first;
                __next_pointer __next = __cache->__next_;
                __node_insert_multi(__cache->__upcast());
                __cache = __next;
            }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
        }
        catch (...)
        {
            __deallocate_node(__cache);
            throw;
        }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 1581 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
        __deallocate_node(__cache);
    }
    for (; __first != __last; ++__first)
        __insert_multi(_NodeTypes::__get_value(*__first));
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
inline
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::begin() _NOEXCEPT
{
    return iterator(__p1_.first().__next_);
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
inline
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::end() _NOEXCEPT
{
    return iterator(nullptr);
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
inline
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::begin() const _NOEXCEPT
{
    return const_iterator(__p1_.first().__next_);
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
inline
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::end() const _NOEXCEPT
{
    return const_iterator(nullptr);
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
void
__hash_table<_Tp, _Hash, _Equal, _Alloc>::clear() _NOEXCEPT
{
    if (size() > 0)
    {
        __deallocate_node(__p1_.first().__next_);
        __p1_.first().__next_ = nullptr;
        size_type __bc = bucket_count();
        for (size_type __i = 0; __i < __bc; ++__i)
            __bucket_list_[__i] = nullptr;
        size() = 0;
    }
}


// Prepare the container for an insertion of the value __value with the hash
// __hash. This does a lookup into the container to see if __value is already
// present, and performs a rehash if necessary. Returns a pointer to the
// existing element if it exists, otherwise nullptr.
//
// Note that this function does forward exceptions if key_eq() throws, and never
// mutates __value or actually inserts into the map.
template <class _Tp, class _Hash, class _Equal, class _Alloc>
_LIBCPP_INLINE_VISIBILITY
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__next_pointer
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique_prepare(
    size_t __hash, value_type& __value)
{
    size_type __bc = bucket_count();

    if (__bc != 0)
    {
        size_t __chash = std::__constrain_hash(__hash, __bc);
        __next_pointer __ndptr = __bucket_list_[__chash];
        if (__ndptr != nullptr)
        {
            for (__ndptr = __ndptr->__next_; __ndptr != nullptr &&
                    (__ndptr->__hash() == __hash ||
                     std::__constrain_hash(__ndptr->__hash(), __bc) == __chash);
                                                     __ndptr = __ndptr->__next_)
            {
                if ((__ndptr->__hash() == __hash) &&
                    key_eq()(__ndptr->__upcast()->__get_value(), __value))
                    return __ndptr;
            }
        }
    }
    if (size()+1 > __bc * max_load_factor() || __bc == 0)
    {
        __rehash_unique(_VSTD::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
                                     size_type(std::ceil(float(size() + 1) / max_load_factor()))));
    }
    return nullptr;
}

// Insert the node __nd into the container by pushing it into the right bucket,
// and updating size(). Assumes that __nd->__hash is up-to-date, and that
// rehashing has already occurred and that no element with the same key exists
// in the map.
template <class _Tp, class _Hash, class _Equal, class _Alloc>
_LIBCPP_INLINE_VISIBILITY
void
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique_perform(
    __node_pointer __nd) _NOEXCEPT
{
    size_type __bc = bucket_count();
    size_t __chash = std::__constrain_hash(__nd->__hash(), __bc);
    // insert_after __bucket_list_[__chash], or __first_node if bucket is null
    __next_pointer __pn = __bucket_list_[__chash];
    if (__pn == nullptr)
    {
        __pn =__p1_.first().__ptr();
        __nd->__next_ = __pn->__next_;
        __pn->__next_ = __nd->__ptr();
        // fix up __bucket_list_
        __bucket_list_[__chash] = __pn;
        if (__nd->__next_ != nullptr)
            __bucket_list_[std::__constrain_hash(__nd->__next_->__hash(), __bc)] = __nd->__ptr();
    }
    else
    {
        __nd->__next_ = __pn->__next_;
        __pn->__next_ = __nd->__ptr();
    }
    ++size();
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique(__node_pointer __nd)
{
    __nd->__hash_ = hash_function()(__nd->__get_value());
    __next_pointer __existing_node =
        __node_insert_unique_prepare(__nd->__hash(), __nd->__get_value());

    // Insert the node, unless it already exists in the container.
    bool __inserted = false;
    if (__existing_node == nullptr)
    {
        __node_insert_unique_perform(__nd);
        __existing_node = __nd->__ptr();
        __inserted = true;
    }
    return pair<iterator, bool>(iterator(__existing_node), __inserted);
}

// Prepare the container for an insertion of the value __cp_val with the hash
// __cp_hash. This does a lookup into the container to see if __cp_value is
// already present, and performs a rehash if necessary. Returns a pointer to the
// last occurrence of __cp_val in the map.
//
// Note that this function does forward exceptions if key_eq() throws, and never
// mutates __value or actually inserts into the map.
template <class _Tp, class _Hash, class _Equal, class _Alloc>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__next_pointer
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi_prepare(
    size_t __cp_hash, value_type& __cp_val)
{
    size_type __bc = bucket_count();
    if (size()+1 > __bc * max_load_factor() || __bc == 0)
    {
        __rehash_multi(_VSTD::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
                       size_type(std::ceil(float(size() + 1) / max_load_factor()))));
        __bc = bucket_count();
    }
    size_t __chash = std::__constrain_hash(__cp_hash, __bc);
    __next_pointer __pn = __bucket_list_[__chash];
    if (__pn != nullptr)
    {
        for (bool __found = false; __pn->__next_ != nullptr &&
                                   std::__constrain_hash(__pn->__next_->__hash(), __bc) == __chash;
                                                           __pn = __pn->__next_)
        {
            //      __found    key_eq()     action
            //      false       false       loop
            //      true        true        loop
            //      false       true        set __found to true
            //      true        false       break
            if (__found != (__pn->__next_->__hash() == __cp_hash &&
                            key_eq()(__pn->__next_->__upcast()->__get_value(), __cp_val)))
            {
                if (!__found)
                    __found = true;
                else
                    break;
            }
        }
    }
    return __pn;
}

// Insert the node __cp into the container after __pn (which is the last node in
// the bucket that compares equal to __cp). Rehashing, and checking for
// uniqueness has already been performed (in __node_insert_multi_prepare), so
// all we need to do is update the bucket and size(). Assumes that __cp->__hash
// is up-to-date.
template <class _Tp, class _Hash, class _Equal, class _Alloc>
void
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi_perform(
    __node_pointer __cp, __next_pointer __pn) _NOEXCEPT
{
    size_type __bc = bucket_count();
    size_t __chash = std::__constrain_hash(__cp->__hash_, __bc);
    if (__pn == nullptr)
    {
        __pn =__p1_.first().__ptr();
        __cp->__next_ = __pn->__next_;
        __pn->__next_ = __cp->__ptr();
        // fix up __bucket_list_
        __bucket_list_[__chash] = __pn;
        if (__cp->__next_ != nullptr)
            __bucket_list_[std::__constrain_hash(__cp->__next_->__hash(), __bc)]
                = __cp->__ptr();
    }
    else
    {
        __cp->__next_ = __pn->__next_;
        __pn->__next_ = __cp->__ptr();
        if (__cp->__next_ != nullptr)
        {
            size_t __nhash = std::__constrain_hash(__cp->__next_->__hash(), __bc);
            if (__nhash != __chash)
                __bucket_list_[__nhash] = __cp->__ptr();
        }
    }
    ++size();
}


template <class _Tp, class _Hash, class _Equal, class _Alloc>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi(__node_pointer __cp)
{
    __cp->__hash_ = hash_function()(__cp->__get_value());
    __next_pointer __pn = __node_insert_multi_prepare(__cp->__hash(), __cp->__get_value());
    __node_insert_multi_perform(__cp, __pn);

    return iterator(__cp->__ptr());
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi(
        const_iterator __p, __node_pointer __cp)
{
    if (__p != end() && key_eq()(*__p, __cp->__get_value()))
    {
        __next_pointer __np = __p.__node_;
        __cp->__hash_ = __np->__hash();
        size_type __bc = bucket_count();
        if (size()+1 > __bc * max_load_factor() || __bc == 0)
        {
            __rehash_multi(_VSTD::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
                           size_type(std::ceil(float(size() + 1) / max_load_factor()))));
            __bc = bucket_count();
        }
        size_t __chash = std::__constrain_hash(__cp->__hash_, __bc);
        __next_pointer __pp = __bucket_list_[__chash];
        while (__pp->__next_ != __np)
            __pp = __pp->__next_;
        __cp->__next_ = __np;
        __pp->__next_ = static_cast<__next_pointer>(__cp);
        ++size();
        return iterator(static_cast<__next_pointer>(__cp));
    }
    return __node_insert_multi(__cp);
}



template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _Key, class ..._Args>
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const& __k, _Args&&... __args)
{

    size_t __hash = hash_function()(__k);
    size_type __bc = bucket_count();
    bool __inserted = false;
    __next_pointer __nd;
    size_t __chash;
    if (__bc != 0)
    {
        __chash = std::__constrain_hash(__hash, __bc);
        __nd = __bucket_list_[__chash];
        if (__nd != nullptr)
        {
            for (__nd = __nd->__next_; __nd != nullptr &&
                (__nd->__hash() == __hash || std::__constrain_hash(__nd->__hash(), __bc) == __chash);
                                                           __nd = __nd->__next_)
            {
                if ((__nd->__hash() == __hash) &&
                    key_eq()(__nd->__upcast()->__get_value(), __k))
                    goto __done;
            }
        }
    }
    {
        __node_holder __h = __construct_node_hash(__hash, _VSTD::forward<_Args>(__args)...);
        if (size()+1 > __bc * max_load_factor() || __bc == 0)
        {
            __rehash_unique(_VSTD::max<size_type>(2 * __bc + !std::__is_hash_power2(__bc),
                           size_type(std::ceil(float(size() + 1) / max_load_factor()))));
            __bc = bucket_count();
            __chash = std::__constrain_hash(__hash, __bc);
        }
        // insert_after __bucket_list_[__chash], or __first_node if bucket is null
        __next_pointer __pn = __bucket_list_[__chash];
        if (__pn == nullptr)
        {
            __pn = __p1_.first().__ptr();
            __h->__next_ = __pn->__next_;
            __pn->__next_ = __h.get()->__ptr();
            // fix up __bucket_list_
            __bucket_list_[__chash] = __pn;
            if (__h->__next_ != nullptr)
                __bucket_list_[std::__constrain_hash(__h->__next_->__hash(), __bc)]
                    = __h.get()->__ptr();
        }
        else
        {
            __h->__next_ = __pn->__next_;
            __pn->__next_ = static_cast<__next_pointer>(__h.get());
        }
        __nd = static_cast<__next_pointer>(__h.release());
        // increment size
        ++size();
        __inserted = true;
    }
__done:
    return pair<iterator, bool>(iterator(__nd), __inserted);
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class... _Args>
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_impl(_Args&&... __args)
{
    __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
    pair<iterator, bool> __r = __node_insert_unique(__h.get());
    if (__r.second)
        __h.release();
    return __r;
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class... _Args>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_multi(_Args&&... __args)
{
    __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
    iterator __r = __node_insert_multi(__h.get());
    __h.release();
    return __r;
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class... _Args>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_hint_multi(
        const_iterator __p, _Args&&... __args)
{
    __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
    iterator __r = __node_insert_multi(__p, __h.get());
    __h.release();
    return __r;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1949 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _NodeHandle, class _InsertReturnType>
_LIBCPP_INLINE_VISIBILITY
_InsertReturnType
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_unique(
    _NodeHandle&& __nh)
{
    if (__nh.empty())
        return _InsertReturnType{end(), false, _NodeHandle()};
    pair<iterator, bool> __result = __node_insert_unique(__nh.__ptr_);
    if (__result.second)
        __nh.__release_ptr();
    return _InsertReturnType{__result.first, __result.second, _VSTD::move(__nh)};
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _NodeHandle>
_LIBCPP_INLINE_VISIBILITY
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_unique(
    const_iterator, _NodeHandle&& __nh)
{
    if (__nh.empty())
        return end();
    pair<iterator, bool> __result = __node_insert_unique(__nh.__ptr_);
    if (__result.second)
        __nh.__release_ptr();
    return __result.first;
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _NodeHandle>
_LIBCPP_INLINE_VISIBILITY
_NodeHandle
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_extract(
    key_type const& __key)
{
    iterator __i = find(__key);
    if (__i == end())
        return _NodeHandle();
    return __node_handle_extract<_NodeHandle>(__i);
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _NodeHandle>
_LIBCPP_INLINE_VISIBILITY
_NodeHandle
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_extract(
    const_iterator __p)
{
    allocator_type __alloc(__node_alloc());
    return _NodeHandle(remove(__p).release(), __alloc);
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _Table>
_LIBCPP_INLINE_VISIBILITY
void
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_merge_unique(
    _Table& __source)
{
    static_assert(is_same<__node, typename _Table::__node>::value, "");

    for (typename _Table::iterator __it = __source.begin();
         __it != __source.end();)
    {
        __node_pointer __src_ptr = __it.__node_->__upcast();
        size_t __hash = hash_function()(__src_ptr->__get_value());
        __next_pointer __existing_node =
            __node_insert_unique_prepare(__hash, __src_ptr->__get_value());
        auto __prev_iter = __it++;
        if (__existing_node == nullptr)
        {
            (void)__source.remove(__prev_iter).release();
            __src_ptr->__hash_ = __hash;
            __node_insert_unique_perform(__src_ptr);
        }
    }
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _NodeHandle>
_LIBCPP_INLINE_VISIBILITY
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_multi(
    _NodeHandle&& __nh)
{
    if (__nh.empty())
        return end();
    iterator __result = __node_insert_multi(__nh.__ptr_);
    __nh.__release_ptr();
    return __result;
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _NodeHandle>
_LIBCPP_INLINE_VISIBILITY
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_multi(
    const_iterator __hint, _NodeHandle&& __nh)
{
    if (__nh.empty())
        return end();
    iterator __result = __node_insert_multi(__hint, __nh.__ptr_);
    __nh.__release_ptr();
    return __result;
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _Table>
_LIBCPP_INLINE_VISIBILITY
void
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_merge_multi(
    _Table& __source)
{
    static_assert(is_same<typename _Table::__node, __node>::value, "");

    for (typename _Table::iterator __it = __source.begin();
         __it != __source.end();)
    {
        __node_pointer __src_ptr = __it.__node_->__upcast();
        size_t __src_hash = hash_function()(__src_ptr->__get_value());
        __next_pointer __pn =
            __node_insert_multi_prepare(__src_hash, __src_ptr->__get_value());
        (void)__source.remove(__it++).release();
        __src_ptr->__hash_ = __src_hash;
        __node_insert_multi_perform(__src_ptr, __pn);
    }
}
#endif // _LIBCPP_STD_VER >= 17
# 2079 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <bool _UniqueKeys>
void
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__rehash(size_type __n)
_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
{
    if (__n == 1)
        __n = 2;
    else if (__n & (__n - 1))
        __n = std::__next_prime(__n);
    size_type __bc = bucket_count();
    if (__n > __bc)
        __do_rehash<_UniqueKeys>(__n);
    else if (__n < __bc)
    {
        __n = _VSTD::max<size_type>
              (
                  __n,
                  std::__is_hash_power2(__bc) ? std::__next_hash_pow2(size_t(std::ceil(float(size()) / max_load_factor()))) :
                                           std::__next_prime(size_t(std::ceil(float(size()) / max_load_factor())))
              );
        if (__n < __bc)
            __do_rehash<_UniqueKeys>(__n);
    }
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <bool _UniqueKeys>
void
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__do_rehash(size_type __nbc)
{
    __pointer_allocator& __npa = __bucket_list_.get_deleter().__alloc();
    __bucket_list_.reset(__nbc > 0 ?
                      __pointer_alloc_traits::allocate(__npa, __nbc) : nullptr);
    __bucket_list_.get_deleter().size() = __nbc;
    if (__nbc > 0)
    {
        for (size_type __i = 0; __i < __nbc; ++__i)
            __bucket_list_[__i] = nullptr;
        __next_pointer __pp = __p1_.first().__ptr();
        __next_pointer __cp = __pp->__next_;
        if (__cp != nullptr)
        {
            size_type __chash = std::__constrain_hash(__cp->__hash(), __nbc);
            __bucket_list_[__chash] = __pp;
            size_type __phash = __chash;
            for (__pp = __cp, void(), __cp = __cp->__next_; __cp != nullptr;
                                                           __cp = __pp->__next_)
            {
                __chash = std::__constrain_hash(__cp->__hash(), __nbc);
                if (__chash == __phash)
                    __pp = __cp;
                else
                {
                    if (__bucket_list_[__chash] == nullptr)
                    {
                        __bucket_list_[__chash] = __pp;
                        __pp = __cp;
                        __phash = __chash;
                    }
                    else
                    {
                        __next_pointer __np = __cp;
                        if _LIBCPP_CONSTEXPR_SINCE_CXX17 (!_UniqueKeys)
                        {
                            for (; __np->__next_ != nullptr &&
                                   key_eq()(__cp->__upcast()->__get_value(),
                                            __np->__next_->__upcast()->__get_value());
                                                               __np = __np->__next_)
                                ;
                        }
                        __pp->__next_ = __np->__next_;
                        __np->__next_ = __bucket_list_[__chash]->__next_;
                        __bucket_list_[__chash]->__next_ = __cp;

                    }
                }
            }
        }
    }
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _Key>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::find(const _Key& __k)
{
    size_t __hash = hash_function()(__k);
    size_type __bc = bucket_count();
    if (__bc != 0)
    {
        size_t __chash = std::__constrain_hash(__hash, __bc);
        __next_pointer __nd = __bucket_list_[__chash];
        if (__nd != nullptr)
        {
            for (__nd = __nd->__next_; __nd != nullptr &&
                (__nd->__hash() == __hash
                  || std::__constrain_hash(__nd->__hash(), __bc) == __chash);
                                                           __nd = __nd->__next_)
            {
                if ((__nd->__hash() == __hash)
                    && key_eq()(__nd->__upcast()->__get_value(), __k))
                    return iterator(__nd);
            }
        }
    }
    return end();
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _Key>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::find(const _Key& __k) const
{
    size_t __hash = hash_function()(__k);
    size_type __bc = bucket_count();
    if (__bc != 0)
    {
        size_t __chash = std::__constrain_hash(__hash, __bc);
        __next_pointer __nd = __bucket_list_[__chash];
        if (__nd != nullptr)
        {
            for (__nd = __nd->__next_; __nd != nullptr &&
                (__hash == __nd->__hash()
                    || std::__constrain_hash(__nd->__hash(), __bc) == __chash);
                                                           __nd = __nd->__next_)
            {
                if ((__nd->__hash() == __hash)
                    && key_eq()(__nd->__upcast()->__get_value(), __k))
                    return const_iterator(__nd);
            }
        }

    }
    return end();
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class ..._Args>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(_Args&& ...__args)
{
    static_assert(!__is_hash_value_type<_Args...>::value,
                  "Construct cannot be called with a hash value type");
    __node_allocator& __na = __node_alloc();
    __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));

    // Begin the lifetime of the node itself. Note that this doesn't begin the lifetime of the value
    // held inside the node, since we need to use the allocator's construct() method for that.
    //
    // We don't use the allocator's construct() method to construct the node itself since the
    // Cpp17FooInsertable named requirements don't require the allocator's construct() method
    // to work on anything other than the value_type.
    std::__construct_at(std::addressof(*__h), /* next = */nullptr, /* hash = */0);

    // Now construct the value_type using the allocator's construct() method.
    __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__get_value()), _VSTD::forward<_Args>(__args)...);
    __h.get_deleter().__value_constructed = true;

    __h->__hash_ = hash_function()(__h->__get_value());
    return __h;
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _First, class ..._Rest>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node_hash(
    size_t __hash, _First&& __f, _Rest&& ...__rest)
{
    static_assert(!__is_hash_value_type<_First, _Rest...>::value,
                  "Construct cannot be called with a hash value type");
    __node_allocator& __na = __node_alloc();
    __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
    std::__construct_at(std::addressof(*__h), /* next = */nullptr, /* hash = */__hash);
    __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__get_value()),
                             _VSTD::forward<_First>(__f),
                             _VSTD::forward<_Rest>(__rest)...);
    __h.get_deleter().__value_constructed = true;
    return __h;
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::erase(const_iterator __p)
{
    __next_pointer __np = __p.__node_;
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__p != end(),
        "unordered container::erase(iterator) called with a non-dereferenceable iterator");
    iterator __r(__np);
    ++__r;
    remove(__p);
    return __r;
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
__hash_table<_Tp, _Hash, _Equal, _Alloc>::erase(const_iterator __first,
                                                const_iterator __last)
{
    for (const_iterator __p = __first; __first != __last; __p = __first)
    {
        ++__first;
        erase(__p);
    }
    __next_pointer __np = __last.__node_;
    return iterator (__np);
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _Key>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::size_type
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__erase_unique(const _Key& __k)
{
    iterator __i = find(__k);
    if (__i == end())
        return 0;
    erase(__i);
    return 1;
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _Key>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::size_type
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__erase_multi(const _Key& __k)
{
    size_type __r = 0;
    iterator __i = find(__k);
    if (__i != end())
    {
        iterator __e = end();
        do
        {
            erase(__i++);
            ++__r;
        } while (__i != __e && key_eq()(*__i, __k));
    }
    return __r;
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
__hash_table<_Tp, _Hash, _Equal, _Alloc>::remove(const_iterator __p) _NOEXCEPT
{
    // current node
    __next_pointer __cn = __p.__node_;
    size_type __bc = bucket_count();
    size_t __chash = std::__constrain_hash(__cn->__hash(), __bc);
    // find previous node
    __next_pointer __pn = __bucket_list_[__chash];
    for (; __pn->__next_ != __cn; __pn = __pn->__next_)
        ;
    // Fix up __bucket_list_
        // if __pn is not in same bucket (before begin is not in same bucket) &&
        //    if __cn->__next_ is not in same bucket (nullptr is not in same bucket)
    if (__pn == __p1_.first().__ptr()
            || std::__constrain_hash(__pn->__hash(), __bc) != __chash)
    {
        if (__cn->__next_ == nullptr
            || std::__constrain_hash(__cn->__next_->__hash(), __bc) != __chash)
            __bucket_list_[__chash] = nullptr;
    }
        // if __cn->__next_ is not in same bucket (nullptr is in same bucket)
    if (__cn->__next_ != nullptr)
    {
        size_t __nhash = std::__constrain_hash(__cn->__next_->__hash(), __bc);
        if (__nhash != __chash)
            __bucket_list_[__nhash] = __pn;
    }
    // remove __cn
    __pn->__next_ = __cn->__next_;
    __cn->__next_ = nullptr;
    --size();
    return __node_holder(__cn->__upcast(), _Dp(__node_alloc(), true));
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _Key>
inline
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::size_type
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__count_unique(const _Key& __k) const
{
    return static_cast<size_type>(find(__k) != end());
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _Key>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::size_type
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__count_multi(const _Key& __k) const
{
    size_type __r = 0;
    const_iterator __i = find(__k);
    if (__i != end())
    {
        const_iterator __e = end();
        do
        {
            ++__i;
            ++__r;
        } while (__i != __e && key_eq()(*__i, __k));
    }
    return __r;
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _Key>
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator,
     typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__equal_range_unique(
        const _Key& __k)
{
    iterator __i = find(__k);
    iterator __j = __i;
    if (__i != end())
        ++__j;
    return pair<iterator, iterator>(__i, __j);
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _Key>
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator,
     typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__equal_range_unique(
        const _Key& __k) const
{
    const_iterator __i = find(__k);
    const_iterator __j = __i;
    if (__i != end())
        ++__j;
    return pair<const_iterator, const_iterator>(__i, __j);
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _Key>
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator,
     typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__equal_range_multi(
        const _Key& __k)
{
    iterator __i = find(__k);
    iterator __j = __i;
    if (__i != end())
    {
        iterator __e = end();
        do
        {
            ++__j;
        } while (__j != __e && key_eq()(*__j, __k));
    }
    return pair<iterator, iterator>(__i, __j);
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _Key>
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator,
     typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::const_iterator>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__equal_range_multi(
        const _Key& __k) const
{
    const_iterator __i = find(__k);
    const_iterator __j = __i;
    if (__i != end())
    {
        const_iterator __e = end();
        do
        {
            ++__j;
        } while (__j != __e && key_eq()(*__j, __k));
    }
    return pair<const_iterator, const_iterator>(__i, __j);
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
void
__hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 11
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2455 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
    _NOEXCEPT_(
        __is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value
        && (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value
              || __is_nothrow_swappable<__pointer_allocator>::value)
        && (!__node_traits::propagate_on_container_swap::value
              || __is_nothrow_swappable<__node_allocator>::value)
            )
#else
# 2463 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
  _NOEXCEPT_(__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value)
#endif
# 2465 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
{
    _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__node_traits::propagate_on_container_swap::value ||
                                        this->__node_alloc() == __u.__node_alloc(),
                                        "unordered container::swap: Either propagate_on_container_swap "
                                        "must be true or the allocators must compare equal");
    {
    __node_pointer_pointer __npp = __bucket_list_.release();
    __bucket_list_.reset(__u.__bucket_list_.release());
    __u.__bucket_list_.reset(__npp);
    }
    _VSTD::swap(__bucket_list_.get_deleter().size(), __u.__bucket_list_.get_deleter().size());
    _VSTD::__swap_allocator(__bucket_list_.get_deleter().__alloc(),
             __u.__bucket_list_.get_deleter().__alloc());
    _VSTD::__swap_allocator(__node_alloc(), __u.__node_alloc());
    _VSTD::swap(__p1_.first().__next_, __u.__p1_.first().__next_);
    __p2_.swap(__u.__p2_);
    __p3_.swap(__u.__p3_);
    if (size() > 0)
        __bucket_list_[std::__constrain_hash(__p1_.first().__next_->__hash(), bucket_count())] =
            __p1_.first().__ptr();
    if (__u.size() > 0)
        __u.__bucket_list_[std::__constrain_hash(__u.__p1_.first().__next_->__hash(), __u.bucket_count())] =
            __u.__p1_.first().__ptr();
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::size_type
__hash_table<_Tp, _Hash, _Equal, _Alloc>::bucket_size(size_type __n) const
{
    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n < bucket_count(),
        "unordered container::bucket_size(n) called with n >= bucket_count()");
    __next_pointer __np = __bucket_list_[__n];
    size_type __bc = bucket_count();
    size_type __r = 0;
    if (__np != nullptr)
    {
        for (__np = __np->__next_; __np != nullptr &&
                                   std::__constrain_hash(__np->__hash(), __bc) == __n;
                                                         __np = __np->__next_, (void) ++__r)
            ;
    }
    return __r;
}

template <class _Tp, class _Hash, class _Equal, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(__hash_table<_Tp, _Hash, _Equal, _Alloc>& __x,
     __hash_table<_Tp, _Hash, _Equal, _Alloc>& __y)
    _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
    __x.swap(__y);
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___HASH_TABLE
# 2524 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__hash_table" 3
#endif /* __hash_table expanded by -frewrite-includes */
# 593 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 593 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 594 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/erase_if_container.h>
#endif /* expanded by -frewrite-includes */
# 594 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 595 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 595 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 596 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ranges_iterator_traits.h expanded by -frewrite-includes */
#include <__iterator/ranges_iterator_traits.h>
#else /* ranges_iterator_traits.h expanded by -frewrite-includes */
# 596 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___ITERATOR_RANGES_ITERATOR_TRAITS_H
#define _LIBCPP___ITERATOR_RANGES_ITERATOR_TRAITS_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__fwd/pair.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/add_const.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_const.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3

template <ranges::input_range _Range>
using __range_key_type = __remove_const_t<typename ranges::range_value_t<_Range>::first_type>;

template <ranges::input_range _Range>
using __range_mapped_type = typename ranges::range_value_t<_Range>::second_type;

template <ranges::input_range _Range>
using __range_to_alloc_type =
    pair<add_const_t<typename ranges::range_value_t<_Range>::first_type>,
         typename ranges::range_value_t<_Range>::second_type>;

#endif
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___ITERATOR_RANGES_ITERATOR_TRAITS_H
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__iterator/ranges_iterator_traits.h" 3
#endif /* ranges_iterator_traits.h expanded by -frewrite-includes */
# 597 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 597 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 598 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator.h>
#endif /* expanded by -frewrite-includes */
# 598 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 599 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory_resource/polymorphic_allocator.h>
#endif /* expanded by -frewrite-includes */
# 599 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 600 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __node_handle expanded by -frewrite-includes */
#include <__node_handle>
#else /* __node_handle expanded by -frewrite-includes */
# 600 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___NODE_HANDLE
#define _LIBCPP___NODE_HANDLE

/*

template<unspecified>
class node-handle {
public:
  using value_type     = see below;     // not present for map containers
  using key_type       = see below;     // not present for set containers
  using mapped_type    = see below;     // not present for set containers
  using allocator_type = see below;

private:
  using container_node_type = unspecified;                  // exposition only
  using ator_traits = allocator_traits<allocator_type>;     // exposition only

  typename ator_traits::template
    rebind_traits<container_node_type>::pointer ptr_;       // exposition only
  optional<allocator_type> alloc_;                          // exposition only

public:
  // [container.node.cons], constructors, copy, and assignment
  constexpr node-handle() noexcept : ptr_(), alloc_() {}
  node-handle(node-handle&&) noexcept;
  node-handle& operator=(node-handle&&);

  // [container.node.dtor], destructor
  ~node-handle();

  // [container.node.observers], observers
  value_type& value() const;            // not present for map containers
  key_type& key() const;                // not present for set containers
  mapped_type& mapped() const;          // not present for set containers

  allocator_type get_allocator() const;
  explicit operator bool() const noexcept;
  [[nodiscard]] bool empty() const noexcept; // nodiscard since C++20

  // [container.node.modifiers], modifiers
  void swap(node-handle&)
    noexcept(ator_traits::propagate_on_container_swap::value ||
             ator_traits::is_always_equal::value);

  friend void swap(node-handle& x, node-handle& y) noexcept(noexcept(x.swap(y))) {
    x.swap(y);
  }
};

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 63 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3
#if 0 /* expanded by -frewrite-includes */
#include <optional>
#endif /* expanded by -frewrite-includes */
# 65 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3
# 66 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3
#endif
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3

// Specialized in __tree & __hash_table for their _NodeType.
template <class _NodeType, class _Alloc>
struct __generic_container_node_destructor;

template <class _NodeType, class _Alloc,
          template <class, class> class _MapOrSetSpecifics>
class _LIBCPP_TEMPLATE_VIS __basic_node_handle
    : public _MapOrSetSpecifics<
          _NodeType,
          __basic_node_handle<_NodeType, _Alloc, _MapOrSetSpecifics>>
{
    template <class _Tp, class _Compare, class _Allocator>
        friend class __tree;
    template <class _Tp, class _Hash, class _Equal, class _Allocator>
        friend class __hash_table;
    friend struct _MapOrSetSpecifics<
        _NodeType, __basic_node_handle<_NodeType, _Alloc, _MapOrSetSpecifics>>;

    typedef allocator_traits<_Alloc> __alloc_traits;
    typedef __rebind_pointer_t<typename __alloc_traits::void_pointer,
                                      _NodeType>
        __node_pointer_type;

public:
    typedef _Alloc allocator_type;

private:
    __node_pointer_type __ptr_ = nullptr;
    optional<allocator_type> __alloc_;

    _LIBCPP_INLINE_VISIBILITY
    void __release_ptr()
    {
        __ptr_ = nullptr;
        __alloc_ = _VSTD::nullopt;
    }

    _LIBCPP_INLINE_VISIBILITY
    void __destroy_node_pointer()
    {
        if (__ptr_ != nullptr)
        {
            typedef typename __allocator_traits_rebind<
                allocator_type, _NodeType>::type __node_alloc_type;
            __node_alloc_type __alloc(*__alloc_);
            __generic_container_node_destructor<_NodeType, __node_alloc_type>(
                __alloc, true)(__ptr_);
            __ptr_ = nullptr;
        }
    }

    _LIBCPP_INLINE_VISIBILITY
    __basic_node_handle(__node_pointer_type __ptr,
                        allocator_type const& __alloc)
            : __ptr_(__ptr), __alloc_(__alloc)
    {
    }

public:
    _LIBCPP_INLINE_VISIBILITY
    __basic_node_handle() = default;

    _LIBCPP_INLINE_VISIBILITY
    __basic_node_handle(__basic_node_handle&& __other) noexcept
            : __ptr_(__other.__ptr_),
              __alloc_(_VSTD::move(__other.__alloc_))
    {
        __other.__ptr_ = nullptr;
        __other.__alloc_ = _VSTD::nullopt;
    }

    _LIBCPP_INLINE_VISIBILITY
    __basic_node_handle& operator=(__basic_node_handle&& __other)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(
            __alloc_ == _VSTD::nullopt ||
            __alloc_traits::propagate_on_container_move_assignment::value ||
            __alloc_ == __other.__alloc_,
            "node_type with incompatible allocator passed to "
            "node_type::operator=(node_type&&)");

        __destroy_node_pointer();
        __ptr_ = __other.__ptr_;

        if (__alloc_traits::propagate_on_container_move_assignment::value ||
            __alloc_ == _VSTD::nullopt)
            __alloc_ = _VSTD::move(__other.__alloc_);

        __other.__ptr_ = nullptr;
        __other.__alloc_ = _VSTD::nullopt;

        return *this;
    }

    _LIBCPP_INLINE_VISIBILITY
    allocator_type get_allocator() const { return *__alloc_; }

    _LIBCPP_INLINE_VISIBILITY
    explicit operator bool() const { return __ptr_ != nullptr; }

    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
    bool empty() const { return __ptr_ == nullptr; }

    _LIBCPP_INLINE_VISIBILITY
    void swap(__basic_node_handle& __other) noexcept(
        __alloc_traits::propagate_on_container_swap::value ||
        __alloc_traits::is_always_equal::value)
    {
        using _VSTD::swap;
        swap(__ptr_, __other.__ptr_);
        if (__alloc_traits::propagate_on_container_swap::value ||
            __alloc_ == _VSTD::nullopt || __other.__alloc_ == _VSTD::nullopt)
            swap(__alloc_, __other.__alloc_);
    }

    _LIBCPP_INLINE_VISIBILITY
    friend void swap(__basic_node_handle& __a, __basic_node_handle& __b)
        noexcept(noexcept(__a.swap(__b))) { __a.swap(__b); }

    _LIBCPP_INLINE_VISIBILITY
    ~__basic_node_handle()
    {
        __destroy_node_pointer();
    }
};

template <class _NodeType, class _Derived>
struct __set_node_handle_specifics
{
    typedef typename _NodeType::__node_value_type value_type;

    _LIBCPP_INLINE_VISIBILITY
    value_type& value() const
    {
        return static_cast<_Derived const*>(this)->__ptr_->__get_value();
    }
};

template <class _NodeType, class _Derived>
struct __map_node_handle_specifics
{
    typedef typename _NodeType::__node_value_type::key_type key_type;
    typedef typename _NodeType::__node_value_type::mapped_type mapped_type;

    _LIBCPP_INLINE_VISIBILITY
    key_type& key() const
    {
        return static_cast<_Derived const*>(this)->
            __ptr_->__get_value().__ref().first;
    }

    _LIBCPP_INLINE_VISIBILITY
    mapped_type& mapped() const
    {
        return static_cast<_Derived const*>(this)->
            __ptr_->__get_value().__ref().second;
    }
};

template <class _NodeType, class _Alloc>
using __set_node_handle =
    __basic_node_handle< _NodeType, _Alloc, __set_node_handle_specifics>;

template <class _NodeType, class _Alloc>
using __map_node_handle =
    __basic_node_handle< _NodeType, _Alloc, __map_node_handle_specifics>;

template <class _Iterator, class _NodeType>
struct _LIBCPP_TEMPLATE_VIS __insert_return_type
{
    _Iterator position;
    bool inserted;
    _NodeType node;
};

#endif // _LIBCPP_STD_VER >= 17
# 254 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif  // _LIBCPP___NODE_HANDLE
# 260 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__node_handle" 3
#endif /* __node_handle expanded by -frewrite-includes */
# 601 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 601 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 602 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/container_compatible_range.h>
#endif /* expanded by -frewrite-includes */
# 602 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 603 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/from_range.h>
#endif /* expanded by -frewrite-includes */
# 603 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 604 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_allocator.h>
#endif /* expanded by -frewrite-includes */
# 604 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 605 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/type_identity.h>
#endif /* expanded by -frewrite-includes */
# 605 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 606 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 606 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 607 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 607 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 608 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 608 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 609 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 609 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 610 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

// standard-mandated includes

// [iterator.range]
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/access.h>
#endif /* expanded by -frewrite-includes */
# 614 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 615 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/data.h>
#endif /* expanded by -frewrite-includes */
# 615 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 616 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/empty.h>
#endif /* expanded by -frewrite-includes */
# 616 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 617 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_access.h>
#endif /* expanded by -frewrite-includes */
# 617 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 618 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/size.h>
#endif /* expanded by -frewrite-includes */
# 618 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 619 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

// [unord.map.syn]
#if 0 /* expanded by -frewrite-includes */
#include <compare>
#endif /* expanded by -frewrite-includes */
# 621 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 622 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 622 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 623 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 625 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 626 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#endif
# 627 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Key, class _Cp, class _Hash, class _Pred,
          bool = is_empty<_Hash>::value && !__libcpp_is_final<_Hash>::value>
class __unordered_map_hasher
    : private _Hash
{
public:
    _LIBCPP_INLINE_VISIBILITY
    __unordered_map_hasher()
        _NOEXCEPT_(is_nothrow_default_constructible<_Hash>::value)
        : _Hash() {}
    _LIBCPP_INLINE_VISIBILITY
    __unordered_map_hasher(const _Hash& __h)
        _NOEXCEPT_(is_nothrow_copy_constructible<_Hash>::value)
        : _Hash(__h) {}
    _LIBCPP_INLINE_VISIBILITY
    const _Hash& hash_function() const _NOEXCEPT {return *this;}
    _LIBCPP_INLINE_VISIBILITY
    size_t operator()(const _Cp& __x) const
        {return static_cast<const _Hash&>(*this)(__x.__get_value().first);}
    _LIBCPP_INLINE_VISIBILITY
    size_t operator()(const _Key& __x) const
        {return static_cast<const _Hash&>(*this)(__x);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 653 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <typename _K2>
    _LIBCPP_INLINE_VISIBILITY
    size_t operator()(const _K2& __x) const
        {return static_cast<const _Hash&>(*this)(__x);}
#endif
# 658 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    _LIBCPP_INLINE_VISIBILITY
    void swap(__unordered_map_hasher& __y)
        _NOEXCEPT_(__is_nothrow_swappable<_Hash>::value)
    {
        using _VSTD::swap;
        swap(static_cast<_Hash&>(*this), static_cast<_Hash&>(__y));
    }
};

template <class _Key, class _Cp, class _Hash, class _Pred>
class __unordered_map_hasher<_Key, _Cp, _Hash, _Pred, false>
{
    _Hash __hash_;
public:
    _LIBCPP_INLINE_VISIBILITY
    __unordered_map_hasher()
        _NOEXCEPT_(is_nothrow_default_constructible<_Hash>::value)
        : __hash_() {}
    _LIBCPP_INLINE_VISIBILITY
    __unordered_map_hasher(const _Hash& __h)
        _NOEXCEPT_(is_nothrow_copy_constructible<_Hash>::value)
        : __hash_(__h) {}
    _LIBCPP_INLINE_VISIBILITY
    const _Hash& hash_function() const _NOEXCEPT {return __hash_;}
    _LIBCPP_INLINE_VISIBILITY
    size_t operator()(const _Cp& __x) const
        {return __hash_(__x.__get_value().first);}
    _LIBCPP_INLINE_VISIBILITY
    size_t operator()(const _Key& __x) const
        {return __hash_(__x);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 689 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <typename _K2>
    _LIBCPP_INLINE_VISIBILITY
    size_t operator()(const _K2& __x) const
        {return __hash_(__x);}
#endif
# 694 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    _LIBCPP_INLINE_VISIBILITY
    void swap(__unordered_map_hasher& __y)
        _NOEXCEPT_(__is_nothrow_swappable<_Hash>::value)
    {
        using _VSTD::swap;
        swap(__hash_, __y.__hash_);
    }
};

template <class _Key, class _Cp, class _Hash, class _Pred, bool __b>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(__unordered_map_hasher<_Key, _Cp, _Hash, _Pred, __b>& __x,
     __unordered_map_hasher<_Key, _Cp, _Hash, _Pred, __b>& __y)
    _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
    __x.swap(__y);
}

template <class _Key, class _Cp, class _Pred, class _Hash,
          bool = is_empty<_Pred>::value && !__libcpp_is_final<_Pred>::value>
class __unordered_map_equal
    : private _Pred
{
public:
    _LIBCPP_INLINE_VISIBILITY
    __unordered_map_equal()
        _NOEXCEPT_(is_nothrow_default_constructible<_Pred>::value)
        : _Pred() {}
    _LIBCPP_INLINE_VISIBILITY
    __unordered_map_equal(const _Pred& __p)
        _NOEXCEPT_(is_nothrow_copy_constructible<_Pred>::value)
        : _Pred(__p) {}
    _LIBCPP_INLINE_VISIBILITY
    const _Pred& key_eq() const _NOEXCEPT {return *this;}
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Cp& __x, const _Cp& __y) const
        {return static_cast<const _Pred&>(*this)(__x.__get_value().first, __y.__get_value().first);}
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Cp& __x, const _Key& __y) const
        {return static_cast<const _Pred&>(*this)(__x.__get_value().first, __y);}
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Key& __x, const _Cp& __y) const
        {return static_cast<const _Pred&>(*this)(__x, __y.__get_value().first);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 739 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <typename _K2>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Cp& __x, const _K2& __y) const
        {return static_cast<const _Pred&>(*this)(__x.__get_value().first, __y);}
    template <typename _K2>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _K2& __x, const _Cp& __y) const
        {return static_cast<const _Pred&>(*this)(__x, __y.__get_value().first);}
    template <typename _K2>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Key& __x, const _K2& __y) const
        {return static_cast<const _Pred&>(*this)(__x, __y);}
    template <typename _K2>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _K2& __x, const _Key& __y) const
        {return static_cast<const _Pred&>(*this)(__x, __y);}
#endif
# 756 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    _LIBCPP_INLINE_VISIBILITY
    void swap(__unordered_map_equal& __y)
        _NOEXCEPT_(__is_nothrow_swappable<_Pred>::value)
    {
        using _VSTD::swap;
        swap(static_cast<_Pred&>(*this), static_cast<_Pred&>(__y));
    }
};

template <class _Key, class _Cp, class _Pred, class _Hash>
class __unordered_map_equal<_Key, _Cp, _Pred, _Hash, false>
{
    _Pred __pred_;
public:
    _LIBCPP_INLINE_VISIBILITY
    __unordered_map_equal()
        _NOEXCEPT_(is_nothrow_default_constructible<_Pred>::value)
        : __pred_() {}
    _LIBCPP_INLINE_VISIBILITY
    __unordered_map_equal(const _Pred& __p)
        _NOEXCEPT_(is_nothrow_copy_constructible<_Pred>::value)
        : __pred_(__p) {}
    _LIBCPP_INLINE_VISIBILITY
    const _Pred& key_eq() const _NOEXCEPT {return __pred_;}
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Cp& __x, const _Cp& __y) const
        {return __pred_(__x.__get_value().first, __y.__get_value().first);}
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Cp& __x, const _Key& __y) const
        {return __pred_(__x.__get_value().first, __y);}
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Key& __x, const _Cp& __y) const
        {return __pred_(__x, __y.__get_value().first);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 790 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <typename _K2>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Cp& __x, const _K2& __y) const
        {return __pred_(__x.__get_value().first, __y);}
    template <typename _K2>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _K2& __x, const _Cp& __y) const
        {return __pred_(__x, __y.__get_value().first);}
    template <typename _K2>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Key& __x, const _K2& __y) const
        {return __pred_(__x, __y);}
    template <typename _K2>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _K2& __x, const _Key& __y) const
        {return __pred_(__x, __y);}
#endif
# 807 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    _LIBCPP_INLINE_VISIBILITY
    void swap(__unordered_map_equal& __y)
        _NOEXCEPT_(__is_nothrow_swappable<_Pred>::value)
    {
        using _VSTD::swap;
        swap(__pred_, __y.__pred_);
    }
};

template <class _Key, class _Cp, class _Pred, class _Hash, bool __b>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(__unordered_map_equal<_Key, _Cp, _Pred, _Hash, __b>& __x,
     __unordered_map_equal<_Key, _Cp, _Pred, _Hash, __b>& __y)
    _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
    __x.swap(__y);
}

template <class _Alloc>
class __hash_map_node_destructor
{
    typedef _Alloc                              allocator_type;
    typedef allocator_traits<allocator_type>    __alloc_traits;

public:

    typedef typename __alloc_traits::pointer       pointer;
private:

    allocator_type& __na_;

    __hash_map_node_destructor& operator=(const __hash_map_node_destructor&);

public:
    bool __first_constructed;
    bool __second_constructed;

    _LIBCPP_INLINE_VISIBILITY
    explicit __hash_map_node_destructor(allocator_type& __na) _NOEXCEPT
        : __na_(__na),
          __first_constructed(false),
          __second_constructed(false)
        {}

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    __hash_map_node_destructor(__hash_node_destructor<allocator_type>&& __x)
        _NOEXCEPT
        : __na_(__x.__na_),
          __first_constructed(__x.__value_constructed),
          __second_constructed(__x.__value_constructed)
        {
            __x.__value_constructed = false;
        }
#else  // _LIBCPP_CXX03_LANG
# 863 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    _LIBCPP_INLINE_VISIBILITY
    __hash_map_node_destructor(const __hash_node_destructor<allocator_type>& __x)
        : __na_(__x.__na_),
          __first_constructed(__x.__value_constructed),
          __second_constructed(__x.__value_constructed)
        {
            const_cast<bool&>(__x.__value_constructed) = false;
        }
#endif // _LIBCPP_CXX03_LANG
# 872 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_INLINE_VISIBILITY
    void operator()(pointer __p) _NOEXCEPT
    {
        if (__second_constructed)
            __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__get_value().__get_value().second));
        if (__first_constructed)
            __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__get_value().__get_value().first));
        if (__p)
            __alloc_traits::deallocate(__na_, __p, 1);
    }
};

#ifndef _LIBCPP_CXX03_LANG
template <class _Key, class _Tp>
struct _LIBCPP_STANDALONE_DEBUG __hash_value_type
{
    typedef _Key                                     key_type;
    typedef _Tp                                      mapped_type;
    typedef pair<const key_type, mapped_type>        value_type;
    typedef pair<key_type&, mapped_type&>            __nc_ref_pair_type;
    typedef pair<key_type&&, mapped_type&&>          __nc_rref_pair_type;

private:
    value_type __cc_;

public:
    _LIBCPP_INLINE_VISIBILITY
    value_type& __get_value()
    {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 903 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
        return *_VSTD::launder(_VSTD::addressof(__cc_));
#else
# 905 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
        return __cc_;
#endif
# 907 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    }

    _LIBCPP_INLINE_VISIBILITY
    const value_type& __get_value() const
    {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 913 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
        return *_VSTD::launder(_VSTD::addressof(__cc_));
#else
# 915 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
        return __cc_;
#endif
# 917 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    }

    _LIBCPP_INLINE_VISIBILITY
    __nc_ref_pair_type __ref()
    {
        value_type& __v = __get_value();
        return __nc_ref_pair_type(const_cast<key_type&>(__v.first), __v.second);
    }

    _LIBCPP_INLINE_VISIBILITY
    __nc_rref_pair_type __move()
    {
        value_type& __v = __get_value();
        return __nc_rref_pair_type(
            _VSTD::move(const_cast<key_type&>(__v.first)),
            _VSTD::move(__v.second));
    }

    _LIBCPP_INLINE_VISIBILITY
    __hash_value_type& operator=(const __hash_value_type& __v)
    {
        __ref() = __v.__get_value();
        return *this;
    }

    _LIBCPP_INLINE_VISIBILITY
    __hash_value_type& operator=(__hash_value_type&& __v)
    {
        __ref() = __v.__move();
        return *this;
    }

    template <class _ValueTp,
              class = __enable_if_t<__is_same_uncvref<_ValueTp, value_type>::value>
             >
    _LIBCPP_INLINE_VISIBILITY
    __hash_value_type& operator=(_ValueTp&& __v)
    {
        __ref() = _VSTD::forward<_ValueTp>(__v);
        return *this;
    }

private:
    __hash_value_type(const __hash_value_type& __v) = delete;
    __hash_value_type(__hash_value_type&& __v) = delete;
    template <class ..._Args>
    explicit __hash_value_type(_Args&& ...__args) = delete;

    ~__hash_value_type() = delete;
};

#else
# 969 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template <class _Key, class _Tp>
struct __hash_value_type
{
    typedef _Key                                     key_type;
    typedef _Tp                                      mapped_type;
    typedef pair<const key_type, mapped_type>        value_type;

private:
    value_type __cc_;

public:
    _LIBCPP_INLINE_VISIBILITY
    value_type& __get_value() { return __cc_; }
    _LIBCPP_INLINE_VISIBILITY
    const value_type& __get_value() const { return __cc_; }

private:
   ~__hash_value_type();
};

#endif
# 991 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template <class _HashIterator>
class _LIBCPP_TEMPLATE_VIS __hash_map_iterator
{
    _HashIterator __i_;

    typedef  __hash_node_types_from_iterator<_HashIterator> _NodeTypes;

public:
    typedef forward_iterator_tag                                 iterator_category;
    typedef typename _NodeTypes::__map_value_type                value_type;
    typedef typename _NodeTypes::difference_type                 difference_type;
    typedef value_type&                                          reference;
    typedef typename _NodeTypes::__map_value_type_pointer       pointer;

    _LIBCPP_INLINE_VISIBILITY
    __hash_map_iterator() _NOEXCEPT {}

    _LIBCPP_INLINE_VISIBILITY
    __hash_map_iterator(_HashIterator __i) _NOEXCEPT : __i_(__i) {}

    _LIBCPP_INLINE_VISIBILITY
    reference operator*() const {return __i_->__get_value();}
    _LIBCPP_INLINE_VISIBILITY
    pointer operator->() const {return pointer_traits<pointer>::pointer_to(__i_->__get_value());}

    _LIBCPP_INLINE_VISIBILITY
    __hash_map_iterator& operator++() {++__i_; return *this;}
    _LIBCPP_INLINE_VISIBILITY
    __hash_map_iterator operator++(int)
    {
        __hash_map_iterator __t(*this);
        ++(*this);
        return __t;
    }

    friend _LIBCPP_INLINE_VISIBILITY
        bool operator==(const __hash_map_iterator& __x, const __hash_map_iterator& __y)
        {return __x.__i_ == __y.__i_;}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1031 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    friend _LIBCPP_INLINE_VISIBILITY
        bool operator!=(const __hash_map_iterator& __x, const __hash_map_iterator& __y)
        {return __x.__i_ != __y.__i_;}
#endif
# 1035 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
};

template <class _HashIterator>
class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator
{
    _HashIterator __i_;

    typedef  __hash_node_types_from_iterator<_HashIterator> _NodeTypes;

public:
    typedef forward_iterator_tag                                 iterator_category;
    typedef typename _NodeTypes::__map_value_type                value_type;
    typedef typename _NodeTypes::difference_type                 difference_type;
    typedef const value_type&                                    reference;
    typedef typename _NodeTypes::__const_map_value_type_pointer  pointer;

    _LIBCPP_INLINE_VISIBILITY
    __hash_map_const_iterator() _NOEXCEPT {}

    _LIBCPP_INLINE_VISIBILITY
    __hash_map_const_iterator(_HashIterator __i) _NOEXCEPT : __i_(__i) {}
    _LIBCPP_INLINE_VISIBILITY
    __hash_map_const_iterator(
            __hash_map_iterator<typename _HashIterator::__non_const_iterator> __i)
                 _NOEXCEPT
                : __i_(__i.__i_) {}

    _LIBCPP_INLINE_VISIBILITY
    reference operator*() const {return __i_->__get_value();}
    _LIBCPP_INLINE_VISIBILITY
    pointer operator->() const {return pointer_traits<pointer>::pointer_to(__i_->__get_value());}

    _LIBCPP_INLINE_VISIBILITY
    __hash_map_const_iterator& operator++() {++__i_; return *this;}
    _LIBCPP_INLINE_VISIBILITY
    __hash_map_const_iterator operator++(int)
    {
        __hash_map_const_iterator __t(*this);
        ++(*this);
        return __t;
    }

    friend _LIBCPP_INLINE_VISIBILITY
        bool operator==(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y)
        {return __x.__i_ == __y.__i_;}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1087 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    friend _LIBCPP_INLINE_VISIBILITY
        bool operator!=(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y)
        {return __x.__i_ != __y.__i_;}
#endif
# 1091 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
};

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
class unordered_multimap;

template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
          class _Alloc = allocator<pair<const _Key, _Tp> > >
class _LIBCPP_TEMPLATE_VIS unordered_map
{
public:
    // types
    typedef _Key                                           key_type;
    typedef _Tp                                            mapped_type;
    typedef __type_identity_t<_Hash>                       hasher;
    typedef __type_identity_t<_Pred>                       key_equal;
    typedef __type_identity_t<_Alloc>                      allocator_type;
    typedef pair<const key_type, mapped_type>              value_type;
    typedef value_type&                                    reference;
    typedef const value_type&                              const_reference;
    static_assert((is_same<value_type, typename allocator_type::value_type>::value),
                  "Allocator::value_type must be same type as value_type");

private:
    typedef __hash_value_type<key_type, mapped_type>                          __value_type;
    typedef __unordered_map_hasher<key_type, __value_type, hasher, key_equal> __hasher;
    typedef __unordered_map_equal<key_type, __value_type, key_equal, hasher>  __key_equal;
    typedef __rebind_alloc<allocator_traits<allocator_type>, __value_type>    __allocator_type;

    typedef __hash_table<__value_type, __hasher,
                         __key_equal,  __allocator_type>   __table;

    __table __table_;

    typedef typename __table::_NodeTypes                   _NodeTypes;
    typedef typename __table::__node_pointer               __node_pointer;
    typedef typename __table::__node_const_pointer         __node_const_pointer;
    typedef typename __table::__node_traits                __node_traits;
    typedef typename __table::__node_allocator             __node_allocator;
    typedef typename __table::__node                       __node;
    typedef __hash_map_node_destructor<__node_allocator>   _Dp;
    typedef unique_ptr<__node, _Dp>                         __node_holder;
    typedef allocator_traits<allocator_type>               __alloc_traits;

    static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
                  "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
                  "original allocator");

    static_assert((is_same<typename __table::__container_value_type, value_type>::value), "");
    static_assert((is_same<typename __table::__node_value_type, __value_type>::value), "");
public:
    typedef typename __alloc_traits::pointer         pointer;
    typedef typename __alloc_traits::const_pointer   const_pointer;
    typedef typename __table::size_type              size_type;
    typedef typename __table::difference_type        difference_type;

    typedef __hash_map_iterator<typename __table::iterator>       iterator;
    typedef __hash_map_const_iterator<typename __table::const_iterator> const_iterator;
    typedef __hash_map_iterator<typename __table::local_iterator> local_iterator;
    typedef __hash_map_const_iterator<typename __table::const_local_iterator> const_local_iterator;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1157 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    typedef __map_node_handle<__node, allocator_type> node_type;
    typedef __insert_return_type<iterator, node_type> insert_return_type;
#endif
# 1160 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    template <class _Key2, class _Tp2, class _Hash2, class _Pred2, class _Alloc2>
        friend class _LIBCPP_TEMPLATE_VIS unordered_map;
    template <class _Key2, class _Tp2, class _Hash2, class _Pred2, class _Alloc2>
        friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;

    _LIBCPP_INLINE_VISIBILITY
    unordered_map()
        _NOEXCEPT_(is_nothrow_default_constructible<__table>::value)
    {
    }
    explicit _LIBCPP_HIDE_FROM_ABI unordered_map(size_type __n, const hasher& __hf = hasher(),
                           const key_equal& __eql = key_equal());
    _LIBCPP_HIDE_FROM_ABI unordered_map(size_type __n, const hasher& __hf,
                  const key_equal& __eql,
                  const allocator_type& __a);
    template <class _InputIterator>
    _LIBCPP_HIDE_FROM_ABI unordered_map(_InputIterator __first, _InputIterator __last);
    template <class _InputIterator>
    _LIBCPP_HIDE_FROM_ABI unordered_map(_InputIterator __first, _InputIterator __last,
                      size_type __n, const hasher& __hf = hasher(),
                      const key_equal& __eql = key_equal());
    template <class _InputIterator>
    _LIBCPP_HIDE_FROM_ABI unordered_map(_InputIterator __first, _InputIterator __last,
                      size_type __n, const hasher& __hf,
                      const key_equal& __eql,
                      const allocator_type& __a);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1189 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    unordered_map(from_range_t, _Range&& __range, size_type __n = /*implementation-defined*/0,
                  const hasher& __hf = hasher(), const key_equal& __eql = key_equal(),
                  const allocator_type& __a = allocator_type())
        : __table_(__hf, __eql, typename __table::allocator_type(__a)) {
      if (__n > 0) {
        __table_.__rehash_unique(__n);
      }
      insert_range(std::forward<_Range>(__range));
    }
#endif
# 1201 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_INLINE_VISIBILITY
    explicit unordered_map(const allocator_type& __a);
    _LIBCPP_HIDE_FROM_ABI unordered_map(const unordered_map& __u);
    _LIBCPP_HIDE_FROM_ABI unordered_map(const unordered_map& __u, const allocator_type& __a);
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    unordered_map(unordered_map&& __u)
        _NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
    _LIBCPP_HIDE_FROM_ABI unordered_map(unordered_map&& __u, const allocator_type& __a);
    _LIBCPP_HIDE_FROM_ABI unordered_map(initializer_list<value_type> __il);
    _LIBCPP_HIDE_FROM_ABI unordered_map(initializer_list<value_type> __il, size_type __n,
                  const hasher& __hf = hasher(), const key_equal& __eql = key_equal());
    _LIBCPP_HIDE_FROM_ABI unordered_map(initializer_list<value_type> __il, size_type __n,
                  const hasher& __hf, const key_equal& __eql,
                  const allocator_type& __a);
#endif // _LIBCPP_CXX03_LANG
# 1218 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1219 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    _LIBCPP_INLINE_VISIBILITY
    unordered_map(size_type __n, const allocator_type& __a)
      : unordered_map(__n, hasher(), key_equal(), __a) {}
    _LIBCPP_INLINE_VISIBILITY
    unordered_map(size_type __n, const hasher& __hf, const allocator_type& __a)
      : unordered_map(__n, __hf, key_equal(), __a) {}
    template <class _InputIterator>
    _LIBCPP_INLINE_VISIBILITY
      unordered_map(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a)
      : unordered_map(__first, __last, __n, hasher(), key_equal(), __a) {}
    template <class _InputIterator>
    _LIBCPP_INLINE_VISIBILITY
      unordered_map(_InputIterator __first, _InputIterator __last, size_type __n, const hasher& __hf,
        const allocator_type& __a)
      : unordered_map(__first, __last, __n, __hf, key_equal(), __a) {}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1236 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    unordered_map(from_range_t, _Range&& __range, size_type __n, const allocator_type& __a)
        : unordered_map(from_range, std::forward<_Range>(__range), __n, hasher(), key_equal(), __a) {}

    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    unordered_map(from_range_t, _Range&& __range, size_type __n, const hasher& __hf, const allocator_type& __a)
        : unordered_map(from_range, std::forward<_Range>(__range), __n, __hf, key_equal(), __a) {}
#endif
# 1246 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_INLINE_VISIBILITY
    unordered_map(initializer_list<value_type> __il, size_type __n, const allocator_type& __a)
      : unordered_map(__il, __n, hasher(), key_equal(), __a) {}
    _LIBCPP_INLINE_VISIBILITY
    unordered_map(initializer_list<value_type> __il, size_type __n, const hasher& __hf,
      const allocator_type& __a)
      : unordered_map(__il, __n, __hf, key_equal(), __a) {}
#endif
# 1255 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    _LIBCPP_INLINE_VISIBILITY
    ~unordered_map() {
        static_assert(sizeof(std::__diagnose_unordered_container_requirements<_Key, _Hash, _Pred>(0)), "");
    }

    _LIBCPP_INLINE_VISIBILITY
    unordered_map& operator=(const unordered_map& __u)
    {
#ifndef _LIBCPP_CXX03_LANG
        __table_ = __u.__table_;
#else
# 1266 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
        if (this != _VSTD::addressof(__u)) {
            __table_.clear();
            __table_.hash_function() = __u.__table_.hash_function();
            __table_.key_eq() = __u.__table_.key_eq();
            __table_.max_load_factor() = __u.__table_.max_load_factor();
            __table_.__copy_assign_alloc(__u.__table_);
            insert(__u.begin(), __u.end());
        }
#endif
# 1275 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
        return *this;
    }
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    unordered_map& operator=(unordered_map&& __u)
        _NOEXCEPT_(is_nothrow_move_assignable<__table>::value);
    _LIBCPP_INLINE_VISIBILITY
    unordered_map& operator=(initializer_list<value_type> __il);
#endif // _LIBCPP_CXX03_LANG
# 1284 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_INLINE_VISIBILITY
    allocator_type get_allocator() const _NOEXCEPT
        {return allocator_type(__table_.__node_alloc());}

    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
    bool      empty() const _NOEXCEPT {return __table_.size() == 0;}
    _LIBCPP_INLINE_VISIBILITY
    size_type size() const _NOEXCEPT  {return __table_.size();}
    _LIBCPP_INLINE_VISIBILITY
    size_type max_size() const _NOEXCEPT {return __table_.max_size();}

    _LIBCPP_INLINE_VISIBILITY
    iterator       begin() _NOEXCEPT        {return __table_.begin();}
    _LIBCPP_INLINE_VISIBILITY
    iterator       end() _NOEXCEPT          {return __table_.end();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator begin()  const _NOEXCEPT {return __table_.begin();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator end()    const _NOEXCEPT {return __table_.end();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator cbegin() const _NOEXCEPT {return __table_.begin();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator cend()   const _NOEXCEPT {return __table_.end();}

    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> insert(const value_type& __x)
        {return __table_.__insert_unique(__x);}

    _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator, const value_type& __x) {
        return insert(__x).first;
    }

    template <class _InputIterator>
        _LIBCPP_INLINE_VISIBILITY
        void insert(_InputIterator __first, _InputIterator __last);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1322 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    void insert_range(_Range&& __range) {
      for (auto&& __element : __range) {
        __table_.__insert_unique(std::forward<decltype(__element)>(__element));
      }
    }
#endif
# 1330 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    void insert(initializer_list<value_type> __il)
        {insert(__il.begin(), __il.end());}

    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> insert(value_type&& __x)
        {return __table_.__insert_unique(_VSTD::move(__x));}

    _LIBCPP_HIDE_FROM_ABI iterator insert(const_iterator, value_type&& __x) {
        return __table_.__insert_unique(_VSTD::move(__x)).first;
    }

    template <class _Pp,
              class = __enable_if_t<is_constructible<value_type, _Pp>::value> >
        _LIBCPP_INLINE_VISIBILITY
        pair<iterator, bool> insert(_Pp&& __x)
            {return __table_.__insert_unique(_VSTD::forward<_Pp>(__x));}

    template <class _Pp,
              class = __enable_if_t<is_constructible<value_type, _Pp>::value> >
        _LIBCPP_INLINE_VISIBILITY
        iterator insert(const_iterator, _Pp&& __x)
        {
            return insert(_VSTD::forward<_Pp>(__x)).first;
        }

    template <class... _Args>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> emplace(_Args&&... __args) {
        return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...);
    }

    template <class... _Args>
    _LIBCPP_INLINE_VISIBILITY
    iterator emplace_hint(const_iterator, _Args&&... __args) {
        return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...).first;
    }

#endif // _LIBCPP_CXX03_LANG
# 1371 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1373 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <class... _Args>
        _LIBCPP_INLINE_VISIBILITY
        pair<iterator, bool> try_emplace(const key_type& __k, _Args&&... __args)
    {
        return __table_.__emplace_unique_key_args(__k, piecewise_construct,
            _VSTD::forward_as_tuple(__k),
            _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...));
    }

    template <class... _Args>
        _LIBCPP_INLINE_VISIBILITY
        pair<iterator, bool> try_emplace(key_type&& __k, _Args&&... __args)
    {
        return __table_.__emplace_unique_key_args(__k, piecewise_construct,
            _VSTD::forward_as_tuple(_VSTD::move(__k)),
            _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...));
    }

    template <class... _Args>
        _LIBCPP_INLINE_VISIBILITY
        iterator try_emplace(const_iterator, const key_type& __k, _Args&&... __args)
    {
        return try_emplace(__k, _VSTD::forward<_Args>(__args)...).first;
    }

    template <class... _Args>
        _LIBCPP_INLINE_VISIBILITY
        iterator try_emplace(const_iterator, key_type&& __k, _Args&&... __args)
    {
        return try_emplace(_VSTD::move(__k), _VSTD::forward<_Args>(__args)...).first;
    }

    template <class _Vp>
        _LIBCPP_INLINE_VISIBILITY
        pair<iterator, bool> insert_or_assign(const key_type& __k, _Vp&& __v)
    {
        pair<iterator, bool> __res = __table_.__emplace_unique_key_args(__k,
            __k, _VSTD::forward<_Vp>(__v));
        if (!__res.second) {
            __res.first->second = _VSTD::forward<_Vp>(__v);
        }
        return __res;
    }

    template <class _Vp>
        _LIBCPP_INLINE_VISIBILITY
        pair<iterator, bool> insert_or_assign(key_type&& __k, _Vp&& __v)
    {
        pair<iterator, bool> __res = __table_.__emplace_unique_key_args(__k,
            _VSTD::move(__k), _VSTD::forward<_Vp>(__v));
        if (!__res.second) {
            __res.first->second = _VSTD::forward<_Vp>(__v);
        }
        return __res;
    }

    template <class _Vp>
        _LIBCPP_INLINE_VISIBILITY
        iterator insert_or_assign(const_iterator, const key_type& __k, _Vp&& __v)
     {
          return insert_or_assign(__k, _VSTD::forward<_Vp>(__v)).first;
     }

    template <class _Vp>
        _LIBCPP_INLINE_VISIBILITY
        iterator insert_or_assign(const_iterator, key_type&& __k, _Vp&& __v)
     {
        return insert_or_assign(_VSTD::move(__k), _VSTD::forward<_Vp>(__v)).first;
     }
#endif // _LIBCPP_STD_VER >= 17
# 1443 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_INLINE_VISIBILITY
    iterator erase(const_iterator __p) {return __table_.erase(__p.__i_);}
    _LIBCPP_INLINE_VISIBILITY
    iterator erase(iterator __p)       {return __table_.erase(__p.__i_);}
    _LIBCPP_INLINE_VISIBILITY
    size_type erase(const key_type& __k) {return __table_.__erase_unique(__k);}
    _LIBCPP_INLINE_VISIBILITY
    iterator erase(const_iterator __first, const_iterator __last)
        {return __table_.erase(__first.__i_, __last.__i_);}
    _LIBCPP_INLINE_VISIBILITY
        void clear() _NOEXCEPT {__table_.clear();}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1457 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    _LIBCPP_INLINE_VISIBILITY
    insert_return_type insert(node_type&& __nh)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__nh.empty() || __nh.get_allocator() == get_allocator(),
            "node_type with incompatible allocator passed to unordered_map::insert()");
        return __table_.template __node_handle_insert_unique<
            node_type, insert_return_type>(_VSTD::move(__nh));
    }
    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __hint, node_type&& __nh)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__nh.empty() || __nh.get_allocator() == get_allocator(),
            "node_type with incompatible allocator passed to unordered_map::insert()");
        return __table_.template __node_handle_insert_unique<node_type>(
            __hint.__i_, _VSTD::move(__nh));
    }
    _LIBCPP_INLINE_VISIBILITY
    node_type extract(key_type const& __key)
    {
        return __table_.template __node_handle_extract<node_type>(__key);
    }
    _LIBCPP_INLINE_VISIBILITY
    node_type extract(const_iterator __it)
    {
        return __table_.template __node_handle_extract<node_type>(
            __it.__i_);
    }

    template <class _H2, class _P2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(unordered_map<key_type, mapped_type, _H2, _P2, allocator_type>& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        return __table_.__node_handle_merge_unique(__source.__table_);
    }
    template <class _H2, class _P2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(unordered_map<key_type, mapped_type, _H2, _P2, allocator_type>&& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        return __table_.__node_handle_merge_unique(__source.__table_);
    }
    template <class _H2, class _P2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(unordered_multimap<key_type, mapped_type, _H2, _P2, allocator_type>& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        return __table_.__node_handle_merge_unique(__source.__table_);
    }
    template <class _H2, class _P2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(unordered_multimap<key_type, mapped_type, _H2, _P2, allocator_type>&& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        return __table_.__node_handle_merge_unique(__source.__table_);
    }
#endif
# 1518 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_INLINE_VISIBILITY
    void swap(unordered_map& __u)
        _NOEXCEPT_(__is_nothrow_swappable<__table>::value)
        { __table_.swap(__u.__table_);}

    _LIBCPP_INLINE_VISIBILITY
    hasher hash_function() const
        {return __table_.hash_function().hash_function();}
    _LIBCPP_INLINE_VISIBILITY
    key_equal key_eq() const
        {return __table_.key_eq().key_eq();}

    _LIBCPP_INLINE_VISIBILITY
    iterator       find(const key_type& __k)       {return __table_.find(__k);}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator find(const key_type& __k) const {return __table_.find(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1536 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
    _LIBCPP_INLINE_VISIBILITY
    iterator       find(const _K2& __k)            {return __table_.find(__k);}
    template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
    _LIBCPP_INLINE_VISIBILITY
    const_iterator find(const _K2& __k) const      {return __table_.find(__k);}
#endif // _LIBCPP_STD_VER >= 20
# 1543 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_INLINE_VISIBILITY
    size_type count(const key_type& __k) const {return __table_.__count_unique(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1547 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
    _LIBCPP_INLINE_VISIBILITY
    size_type count(const _K2& __k) const      {return __table_.__count_unique(__k);}
#endif // _LIBCPP_STD_VER >= 20
# 1551 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1553 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    _LIBCPP_INLINE_VISIBILITY
    bool contains(const key_type& __k) const {return find(__k) != end();}

    template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
    _LIBCPP_INLINE_VISIBILITY
    bool contains(const _K2& __k) const      {return find(__k) != end();}
#endif // _LIBCPP_STD_VER >= 20
# 1560 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, iterator>             equal_range(const key_type& __k)
        {return __table_.__equal_range_unique(__k);}
    _LIBCPP_INLINE_VISIBILITY
    pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
        {return __table_.__equal_range_unique(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1568 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, iterator>             equal_range(const _K2& __k)
        {return __table_.__equal_range_unique(__k);}
    template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
    _LIBCPP_INLINE_VISIBILITY
    pair<const_iterator, const_iterator> equal_range(const _K2& __k) const
        {return __table_.__equal_range_unique(__k);}
#endif // _LIBCPP_STD_VER >= 20
# 1577 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_HIDE_FROM_ABI mapped_type& operator[](const key_type& __k);
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI mapped_type& operator[](key_type&& __k);
#endif
# 1582 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_HIDE_FROM_ABI mapped_type&       at(const key_type& __k);
    _LIBCPP_HIDE_FROM_ABI const mapped_type& at(const key_type& __k) const;

    _LIBCPP_INLINE_VISIBILITY
    size_type bucket_count() const _NOEXCEPT {return __table_.bucket_count();}
    _LIBCPP_INLINE_VISIBILITY
    size_type max_bucket_count() const _NOEXCEPT {return __table_.max_bucket_count();}

    _LIBCPP_INLINE_VISIBILITY
    size_type bucket_size(size_type __n) const
        {return __table_.bucket_size(__n);}
    _LIBCPP_INLINE_VISIBILITY
    size_type bucket(const key_type& __k) const {return __table_.bucket(__k);}

    _LIBCPP_INLINE_VISIBILITY
    local_iterator       begin(size_type __n)        {return __table_.begin(__n);}
    _LIBCPP_INLINE_VISIBILITY
    local_iterator       end(size_type __n)          {return __table_.end(__n);}
    _LIBCPP_INLINE_VISIBILITY
    const_local_iterator begin(size_type __n) const  {return __table_.cbegin(__n);}
    _LIBCPP_INLINE_VISIBILITY
    const_local_iterator end(size_type __n) const    {return __table_.cend(__n);}
    _LIBCPP_INLINE_VISIBILITY
    const_local_iterator cbegin(size_type __n) const {return __table_.cbegin(__n);}
    _LIBCPP_INLINE_VISIBILITY
    const_local_iterator cend(size_type __n) const   {return __table_.cend(__n);}

    _LIBCPP_INLINE_VISIBILITY
    float load_factor() const _NOEXCEPT {return __table_.load_factor();}
    _LIBCPP_INLINE_VISIBILITY
    float max_load_factor() const _NOEXCEPT {return __table_.max_load_factor();}
    _LIBCPP_INLINE_VISIBILITY
    void max_load_factor(float __mlf) {__table_.max_load_factor(__mlf);}
    _LIBCPP_INLINE_VISIBILITY
    void rehash(size_type __n) {__table_.__rehash_unique(__n);}
    _LIBCPP_INLINE_VISIBILITY
    void reserve(size_type __n) {__table_.__reserve_unique(__n);}

private:

#ifdef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI __node_holder __construct_node_with_key(const key_type& __k);
#endif
# 1626 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1629 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
template<class _InputIterator,
         class _Hash = hash<__iter_key_type<_InputIterator>>,
         class _Pred = equal_to<__iter_key_type<_InputIterator>>,
         class _Allocator = allocator<__iter_to_alloc_type<_InputIterator>>,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
         class = enable_if_t<!__is_allocator<_Hash>::value>,
         class = enable_if_t<!is_integral<_Hash>::value>,
         class = enable_if_t<!__is_allocator<_Pred>::value>,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_map(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type = 0,
              _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
  -> unordered_map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Hash, _Pred, _Allocator>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1643 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
template <ranges::input_range _Range,
          class _Hash = hash<__range_key_type<_Range>>,
          class _Pred = equal_to<__range_key_type<_Range>>,
          class _Allocator = allocator<__range_to_alloc_type<_Range>>,
          class = enable_if_t<!__is_allocator<_Hash>::value>,
          class = enable_if_t<!is_integral<_Hash>::value>,
          class = enable_if_t<!__is_allocator<_Pred>::value>,
          class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_map(from_range_t, _Range&&, typename allocator_traits<_Allocator>::size_type = 0,
              _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
  -> unordered_map<__range_key_type<_Range>, __range_mapped_type<_Range>, _Hash, _Pred, _Allocator>; // C++23
#endif
# 1655 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template<class _Key, class _Tp, class _Hash = hash<remove_const_t<_Key>>,
         class _Pred = equal_to<remove_const_t<_Key>>,
         class _Allocator = allocator<pair<const _Key, _Tp>>,
         class = enable_if_t<!__is_allocator<_Hash>::value>,
         class = enable_if_t<!is_integral<_Hash>::value>,
         class = enable_if_t<!__is_allocator<_Pred>::value>,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_map(initializer_list<pair<_Key, _Tp>>, typename allocator_traits<_Allocator>::size_type = 0,
              _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
  -> unordered_map<remove_const_t<_Key>, _Tp, _Hash, _Pred, _Allocator>;

template<class _InputIterator, class _Allocator,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_map(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type, _Allocator)
  -> unordered_map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>,
                   hash<__iter_key_type<_InputIterator>>, equal_to<__iter_key_type<_InputIterator>>, _Allocator>;

template<class _InputIterator, class _Allocator,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_map(_InputIterator, _InputIterator, _Allocator)
  -> unordered_map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>,
                   hash<__iter_key_type<_InputIterator>>, equal_to<__iter_key_type<_InputIterator>>, _Allocator>;

template<class _InputIterator, class _Hash, class _Allocator,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
         class = enable_if_t<!__is_allocator<_Hash>::value>,
         class = enable_if_t<!is_integral<_Hash>::value>,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_map(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type, _Hash, _Allocator)
  -> unordered_map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>,
                   _Hash, equal_to<__iter_key_type<_InputIterator>>, _Allocator>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1691 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template <ranges::input_range _Range, class _Allocator,
          class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_map(from_range_t, _Range&&, typename allocator_traits<_Allocator>::size_type, _Allocator)
  -> unordered_map<__range_key_type<_Range>, __range_mapped_type<_Range>, hash<__range_key_type<_Range>>,
                   equal_to<__range_key_type<_Range>>, _Allocator>;

template <ranges::input_range _Range, class _Allocator,
          class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_map(from_range_t, _Range&&, _Allocator)
  -> unordered_map<__range_key_type<_Range>, __range_mapped_type<_Range>, hash<__range_key_type<_Range>>,
                   equal_to<__range_key_type<_Range>>, _Allocator>;

template <ranges::input_range _Range, class _Hash, class _Allocator,
          class = enable_if_t<!__is_allocator<_Hash>::value>,
          class = enable_if_t<!is_integral<_Hash>::value>,
          class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_map(from_range_t, _Range&&, typename allocator_traits<_Allocator>::size_type, _Hash, _Allocator)
  -> unordered_map<__range_key_type<_Range>, __range_mapped_type<_Range>, _Hash,
                   equal_to<__range_key_type<_Range>>, _Allocator>;

#endif
# 1713 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template<class _Key, class _Tp, class _Allocator,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_map(initializer_list<pair<_Key, _Tp>>, typename allocator_traits<_Allocator>::size_type, _Allocator)
  -> unordered_map<remove_const_t<_Key>, _Tp,
                   hash<remove_const_t<_Key>>,
                   equal_to<remove_const_t<_Key>>, _Allocator>;

template<class _Key, class _Tp, class _Allocator,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_map(initializer_list<pair<_Key, _Tp>>, _Allocator)
  -> unordered_map<remove_const_t<_Key>, _Tp,
                   hash<remove_const_t<_Key>>,
                   equal_to<remove_const_t<_Key>>, _Allocator>;

template<class _Key, class _Tp, class _Hash, class _Allocator,
         class = enable_if_t<!__is_allocator<_Hash>::value>,
         class = enable_if_t<!is_integral<_Hash>::value>,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_map(initializer_list<pair<_Key, _Tp>>, typename allocator_traits<_Allocator>::size_type, _Hash, _Allocator)
  -> unordered_map<remove_const_t<_Key>, _Tp, _Hash,
                   equal_to<remove_const_t<_Key>>, _Allocator>;
#endif
# 1736 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
        size_type __n, const hasher& __hf, const key_equal& __eql)
    : __table_(__hf, __eql)
{
    __table_.__rehash_unique(__n);
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
        size_type __n, const hasher& __hf, const key_equal& __eql,
        const allocator_type& __a)
    : __table_(__hf, __eql, typename __table::allocator_type(__a))
{
    __table_.__rehash_unique(__n);
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
        const allocator_type& __a)
    : __table_(typename __table::allocator_type(__a))
{
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
        _InputIterator __first, _InputIterator __last)
{
    insert(__first, __last);
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
        _InputIterator __first, _InputIterator __last, size_type __n,
        const hasher& __hf, const key_equal& __eql)
    : __table_(__hf, __eql)
{
    __table_.__rehash_unique(__n);
    insert(__first, __last);
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
        _InputIterator __first, _InputIterator __last, size_type __n,
        const hasher& __hf, const key_equal& __eql, const allocator_type& __a)
    : __table_(__hf, __eql, typename __table::allocator_type(__a))
{
    __table_.__rehash_unique(__n);
    insert(__first, __last);
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
        const unordered_map& __u)
    : __table_(__u.__table_)
{
    __table_.__rehash_unique(__u.bucket_count());
    insert(__u.begin(), __u.end());
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
        const unordered_map& __u, const allocator_type& __a)
    : __table_(__u.__table_, typename __table::allocator_type(__a))
{
    __table_.__rehash_unique(__u.bucket_count());
    insert(__u.begin(), __u.end());
}

#ifndef _LIBCPP_CXX03_LANG

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
        unordered_map&& __u)
    _NOEXCEPT_(is_nothrow_move_constructible<__table>::value)
    : __table_(_VSTD::move(__u.__table_))
{
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
        unordered_map&& __u, const allocator_type& __a)
    : __table_(_VSTD::move(__u.__table_), typename __table::allocator_type(__a))
{
    if (__a != __u.get_allocator())
    {
        iterator __i = __u.begin();
        while (__u.size() != 0) {
            __table_.__emplace_unique(
                __u.__table_.remove((__i++).__i_)->__get_value().__move());
        }
    }
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
        initializer_list<value_type> __il)
{
    insert(__il.begin(), __il.end());
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
        initializer_list<value_type> __il, size_type __n, const hasher& __hf,
        const key_equal& __eql)
    : __table_(__hf, __eql)
{
    __table_.__rehash_unique(__n);
    insert(__il.begin(), __il.end());
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
        initializer_list<value_type> __il, size_type __n, const hasher& __hf,
        const key_equal& __eql, const allocator_type& __a)
    : __table_(__hf, __eql, typename __table::allocator_type(__a))
{
    __table_.__rehash_unique(__n);
    insert(__il.begin(), __il.end());
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_map&& __u)
    _NOEXCEPT_(is_nothrow_move_assignable<__table>::value)
{
    __table_ = _VSTD::move(__u.__table_);
    return *this;
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(
        initializer_list<value_type> __il)
{
    __table_.__assign_unique(__il.begin(), __il.end());
    return *this;
}

#endif // _LIBCPP_CXX03_LANG
# 1884 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
inline
void
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
                                                       _InputIterator __last)
{
    for (; __first != __last; ++__first)
        __table_.__insert_unique(*__first);
}

#ifndef _LIBCPP_CXX03_LANG

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
_Tp&
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type& __k)
{
    return __table_.__emplace_unique_key_args(__k,
        piecewise_construct, _VSTD::forward_as_tuple(__k),
                             _VSTD::forward_as_tuple()).first->__get_value().second;
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
_Tp&
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](key_type&& __k)
{
    return __table_.__emplace_unique_key_args(__k,
        piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__k)),
                             _VSTD::forward_as_tuple()).first->__get_value().second;
}
#else // _LIBCPP_CXX03_LANG
# 1916 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
typename unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__node_holder
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node_with_key(const key_type& __k)
{
    __node_allocator& __na = __table_.__node_alloc();
    __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
    __node_traits::construct(__na, _VSTD::addressof(__h->__get_value().__get_value().first), __k);
    __h.get_deleter().__first_constructed = true;
    __node_traits::construct(__na, _VSTD::addressof(__h->__get_value().__get_value().second));
    __h.get_deleter().__second_constructed = true;
    return __h;
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
_Tp&
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type& __k)
{
    iterator __i = find(__k);
    if (__i != end())
        return __i->second;
    __node_holder __h = __construct_node_with_key(__k);
    pair<iterator, bool> __r = __table_.__node_insert_unique(__h.get());
    __h.release();
    return __r.first->second;
}

#endif // _LIBCPP_CXX03_LANG
# 1944 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
_Tp&
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::at(const key_type& __k)
{
    iterator __i = find(__k);
    if (__i == end())
        __throw_out_of_range("unordered_map::at: key not found");
    return __i->second;
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
const _Tp&
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::at(const key_type& __k) const
{
    const_iterator __i = find(__k);
    if (__i == end())
        __throw_out_of_range("unordered_map::at: key not found");
    return __i->second;
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
     unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
    _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
    __x.swap(__y);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1976 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc,
          class _Predicate>
inline _LIBCPP_INLINE_VISIBILITY
    typename unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type
    erase_if(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __c,
             _Predicate __pred) {
  return _VSTD::__libcpp_erase_if_container(__c, __pred);
}
#endif
# 1985 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
_LIBCPP_HIDE_FROM_ABI bool
operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
           const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
{
    if (__x.size() != __y.size())
        return false;
    typedef typename unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::const_iterator
                                                                 const_iterator;
    for (const_iterator __i = __x.begin(), __ex = __x.end(), __ey = __y.end();
            __i != __ex; ++__i)
    {
        const_iterator __j = __y.find(__i->first);
        if (__j == __ey || !(*__i == *__j))
            return false;
    }
    return true;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2006 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
           const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
{
    return !(__x == __y);
}

#endif
# 2017 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
          class _Alloc = allocator<pair<const _Key, _Tp> > >
class _LIBCPP_TEMPLATE_VIS unordered_multimap
{
public:
    // types
    typedef _Key                                           key_type;
    typedef _Tp                                            mapped_type;
    typedef __type_identity_t<_Hash>                       hasher;
    typedef __type_identity_t<_Pred>                       key_equal;
    typedef __type_identity_t<_Alloc>                      allocator_type;
    typedef pair<const key_type, mapped_type>              value_type;
    typedef value_type&                                    reference;
    typedef const value_type&                              const_reference;
    static_assert((is_same<value_type, typename allocator_type::value_type>::value),
                  "Allocator::value_type must be same type as value_type");

private:
    typedef __hash_value_type<key_type, mapped_type>                          __value_type;
    typedef __unordered_map_hasher<key_type, __value_type, hasher, key_equal> __hasher;
    typedef __unordered_map_equal<key_type, __value_type, key_equal, hasher>  __key_equal;
    typedef __rebind_alloc<allocator_traits<allocator_type>, __value_type>    __allocator_type;

    typedef __hash_table<__value_type, __hasher,
                         __key_equal,  __allocator_type>   __table;

    __table __table_;

    typedef typename __table::_NodeTypes                   _NodeTypes;
    typedef typename __table::__node_traits                __node_traits;
    typedef typename __table::__node_allocator             __node_allocator;
    typedef typename __table::__node                       __node;
    typedef __hash_map_node_destructor<__node_allocator>   _Dp;
    typedef unique_ptr<__node, _Dp>                         __node_holder;
    typedef allocator_traits<allocator_type>               __alloc_traits;
    static_assert((is_same<typename __node_traits::size_type,
                          typename __alloc_traits::size_type>::value),
                 "Allocator uses different size_type for different types");

    static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
                  "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
                  "original allocator");

  public:
    typedef typename __alloc_traits::pointer         pointer;
    typedef typename __alloc_traits::const_pointer   const_pointer;
    typedef typename __table::size_type              size_type;
    typedef typename __table::difference_type        difference_type;

    typedef __hash_map_iterator<typename __table::iterator>       iterator;
    typedef __hash_map_const_iterator<typename __table::const_iterator> const_iterator;
    typedef __hash_map_iterator<typename __table::local_iterator> local_iterator;
    typedef __hash_map_const_iterator<typename __table::const_local_iterator> const_local_iterator;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2073 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    typedef __map_node_handle<__node, allocator_type> node_type;
#endif
# 2075 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    template <class _Key2, class _Tp2, class _Hash2, class _Pred2, class _Alloc2>
        friend class _LIBCPP_TEMPLATE_VIS unordered_map;
    template <class _Key2, class _Tp2, class _Hash2, class _Pred2, class _Alloc2>
        friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;

    _LIBCPP_INLINE_VISIBILITY
    unordered_multimap()
        _NOEXCEPT_(is_nothrow_default_constructible<__table>::value)
    {
    }
    explicit _LIBCPP_HIDE_FROM_ABI unordered_multimap(size_type __n, const hasher& __hf = hasher(),
                                const key_equal& __eql = key_equal());
    _LIBCPP_HIDE_FROM_ABI unordered_multimap(size_type __n, const hasher& __hf,
                                const key_equal& __eql,
                                const allocator_type& __a);
    template <class _InputIterator>
    _LIBCPP_HIDE_FROM_ABI unordered_multimap(_InputIterator __first, _InputIterator __last);
    template <class _InputIterator>
    _LIBCPP_HIDE_FROM_ABI unordered_multimap(_InputIterator __first, _InputIterator __last,
                      size_type __n, const hasher& __hf = hasher(),
                      const key_equal& __eql = key_equal());
    template <class _InputIterator>
    _LIBCPP_HIDE_FROM_ABI unordered_multimap(_InputIterator __first, _InputIterator __last,
                      size_type __n, const hasher& __hf,
                      const key_equal& __eql,
                      const allocator_type& __a);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    unordered_multimap(from_range_t, _Range&& __range, size_type __n = /*implementation-defined*/0,
                       const hasher& __hf = hasher(), const key_equal& __eql = key_equal(),
                       const allocator_type& __a = allocator_type())
        : __table_(__hf, __eql, typename __table::allocator_type(__a)) {
      if (__n > 0) {
        __table_.__rehash_multi(__n);
      }
      insert_range(std::forward<_Range>(__range));
    }
#endif
# 2116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_INLINE_VISIBILITY
    explicit unordered_multimap(const allocator_type& __a);
    _LIBCPP_HIDE_FROM_ABI unordered_multimap(const unordered_multimap& __u);
    _LIBCPP_HIDE_FROM_ABI unordered_multimap(const unordered_multimap& __u, const allocator_type& __a);
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    unordered_multimap(unordered_multimap&& __u)
        _NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
    _LIBCPP_HIDE_FROM_ABI unordered_multimap(unordered_multimap&& __u, const allocator_type& __a);
    _LIBCPP_HIDE_FROM_ABI unordered_multimap(initializer_list<value_type> __il);
    _LIBCPP_HIDE_FROM_ABI unordered_multimap(initializer_list<value_type> __il, size_type __n,
                       const hasher& __hf = hasher(),
                       const key_equal& __eql = key_equal());
    _LIBCPP_HIDE_FROM_ABI unordered_multimap(initializer_list<value_type> __il, size_type __n,
                       const hasher& __hf, const key_equal& __eql,
                       const allocator_type& __a);
#endif // _LIBCPP_CXX03_LANG
# 2134 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    _LIBCPP_INLINE_VISIBILITY
    unordered_multimap(size_type __n, const allocator_type& __a)
      : unordered_multimap(__n, hasher(), key_equal(), __a) {}
    _LIBCPP_INLINE_VISIBILITY
    unordered_multimap(size_type __n, const hasher& __hf, const allocator_type& __a)
      : unordered_multimap(__n, __hf, key_equal(), __a) {}
    template <class _InputIterator>
    _LIBCPP_INLINE_VISIBILITY
      unordered_multimap(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a)
      : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a) {}
    template <class _InputIterator>
    _LIBCPP_INLINE_VISIBILITY
      unordered_multimap(_InputIterator __first, _InputIterator __last, size_type __n, const hasher& __hf,
        const allocator_type& __a)
      : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a) {}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2152 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    unordered_multimap(from_range_t, _Range&& __range, size_type __n, const allocator_type& __a)
        : unordered_multimap(from_range, std::forward<_Range>(__range), __n, hasher(), key_equal(), __a) {}

    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    unordered_multimap(from_range_t, _Range&& __range, size_type __n, const hasher& __hf, const allocator_type& __a)
        : unordered_multimap(from_range, std::forward<_Range>(__range), __n, __hf, key_equal(), __a) {}
#endif
# 2162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_INLINE_VISIBILITY
    unordered_multimap(initializer_list<value_type> __il, size_type __n, const allocator_type& __a)
      : unordered_multimap(__il, __n, hasher(), key_equal(), __a) {}
    _LIBCPP_INLINE_VISIBILITY
    unordered_multimap(initializer_list<value_type> __il, size_type __n, const hasher& __hf,
      const allocator_type& __a)
      : unordered_multimap(__il, __n, __hf, key_equal(), __a) {}
#endif
# 2171 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    _LIBCPP_INLINE_VISIBILITY
    ~unordered_multimap() {
        static_assert(sizeof(std::__diagnose_unordered_container_requirements<_Key, _Hash, _Pred>(0)), "");
    }

    _LIBCPP_INLINE_VISIBILITY
    unordered_multimap& operator=(const unordered_multimap& __u)
    {
#ifndef _LIBCPP_CXX03_LANG
        __table_ = __u.__table_;
#else
# 2182 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
        if (this != _VSTD::addressof(__u)) {
            __table_.clear();
            __table_.hash_function() = __u.__table_.hash_function();
            __table_.key_eq() = __u.__table_.key_eq();
            __table_.max_load_factor() = __u.__table_.max_load_factor();
            __table_.__copy_assign_alloc(__u.__table_);
            insert(__u.begin(), __u.end());
        }
#endif
# 2191 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
        return *this;
    }
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    unordered_multimap& operator=(unordered_multimap&& __u)
        _NOEXCEPT_(is_nothrow_move_assignable<__table>::value);
    _LIBCPP_INLINE_VISIBILITY
    unordered_multimap& operator=(initializer_list<value_type> __il);
#endif // _LIBCPP_CXX03_LANG
# 2200 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_INLINE_VISIBILITY
    allocator_type get_allocator() const _NOEXCEPT
        {return allocator_type(__table_.__node_alloc());}

    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
    bool      empty() const _NOEXCEPT {return __table_.size() == 0;}
    _LIBCPP_INLINE_VISIBILITY
    size_type size() const _NOEXCEPT  {return __table_.size();}
    _LIBCPP_INLINE_VISIBILITY
    size_type max_size() const _NOEXCEPT {return __table_.max_size();}

    _LIBCPP_INLINE_VISIBILITY
    iterator       begin() _NOEXCEPT        {return __table_.begin();}
    _LIBCPP_INLINE_VISIBILITY
    iterator       end() _NOEXCEPT          {return __table_.end();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator begin()  const _NOEXCEPT {return __table_.begin();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator end()    const _NOEXCEPT {return __table_.end();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator cbegin() const _NOEXCEPT {return __table_.begin();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator cend()   const _NOEXCEPT {return __table_.end();}

    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}

    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __p, const value_type& __x)
        {return __table_.__insert_multi(__p.__i_, __x);}

    template <class _InputIterator>
    _LIBCPP_INLINE_VISIBILITY
    void insert(_InputIterator __first, _InputIterator __last);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2237 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    void insert_range(_Range&& __range) {
      for (auto&& __element : __range) {
        __table_.__insert_multi(std::forward<decltype(__element)>(__element));
      }
    }
#endif
# 2245 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    void insert(initializer_list<value_type> __il)
        {insert(__il.begin(), __il.end());}
    _LIBCPP_INLINE_VISIBILITY
    iterator insert(value_type&& __x) {return __table_.__insert_multi(_VSTD::move(__x));}

    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __p, value_type&& __x)
        {return __table_.__insert_multi(__p.__i_, _VSTD::move(__x));}

    template <class _Pp,
              class = __enable_if_t<is_constructible<value_type, _Pp>::value> >
    _LIBCPP_INLINE_VISIBILITY
    iterator insert(_Pp&& __x)
        {return __table_.__insert_multi(_VSTD::forward<_Pp>(__x));}

    template <class _Pp,
              class = __enable_if_t<is_constructible<value_type, _Pp>::value> >
    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __p, _Pp&& __x)
        {return __table_.__insert_multi(__p.__i_, _VSTD::forward<_Pp>(__x));}

    template <class... _Args>
    _LIBCPP_HIDE_FROM_ABI iterator emplace(_Args&&... __args) {
        return __table_.__emplace_multi(_VSTD::forward<_Args>(__args)...);
    }

    template <class... _Args>
    _LIBCPP_HIDE_FROM_ABI iterator emplace_hint(const_iterator __p, _Args&&... __args) {
        return __table_.__emplace_hint_multi(__p.__i_, _VSTD::forward<_Args>(__args)...);
    }
#endif // _LIBCPP_CXX03_LANG
# 2279 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3


    _LIBCPP_INLINE_VISIBILITY
    iterator erase(const_iterator __p) {return __table_.erase(__p.__i_);}
    _LIBCPP_INLINE_VISIBILITY
    iterator erase(iterator __p)       {return __table_.erase(__p.__i_);}
    _LIBCPP_INLINE_VISIBILITY
    size_type erase(const key_type& __k) {return __table_.__erase_multi(__k);}
    _LIBCPP_INLINE_VISIBILITY
    iterator erase(const_iterator __first, const_iterator __last)
        {return __table_.erase(__first.__i_, __last.__i_);}
    _LIBCPP_INLINE_VISIBILITY
    void clear() _NOEXCEPT {__table_.clear();}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2294 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    _LIBCPP_INLINE_VISIBILITY
    iterator insert(node_type&& __nh)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__nh.empty() || __nh.get_allocator() == get_allocator(),
            "node_type with incompatible allocator passed to unordered_multimap::insert()");
        return __table_.template __node_handle_insert_multi<node_type>(
            _VSTD::move(__nh));
    }
    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __hint, node_type&& __nh)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__nh.empty() || __nh.get_allocator() == get_allocator(),
            "node_type with incompatible allocator passed to unordered_multimap::insert()");
        return __table_.template __node_handle_insert_multi<node_type>(
            __hint.__i_, _VSTD::move(__nh));
    }
    _LIBCPP_INLINE_VISIBILITY
    node_type extract(key_type const& __key)
    {
        return __table_.template __node_handle_extract<node_type>(__key);
    }
    _LIBCPP_INLINE_VISIBILITY
    node_type extract(const_iterator __it)
    {
        return __table_.template __node_handle_extract<node_type>(
            __it.__i_);
    }

    template <class _H2, class _P2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(unordered_multimap<key_type, mapped_type, _H2, _P2, allocator_type>& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        return __table_.__node_handle_merge_multi(__source.__table_);
    }
    template <class _H2, class _P2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(unordered_multimap<key_type, mapped_type, _H2, _P2, allocator_type>&& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        return __table_.__node_handle_merge_multi(__source.__table_);
    }
    template <class _H2, class _P2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(unordered_map<key_type, mapped_type, _H2, _P2, allocator_type>& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        return __table_.__node_handle_merge_multi(__source.__table_);
    }
    template <class _H2, class _P2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(unordered_map<key_type, mapped_type, _H2, _P2, allocator_type>&& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        return __table_.__node_handle_merge_multi(__source.__table_);
    }
#endif
# 2355 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_INLINE_VISIBILITY
    void swap(unordered_multimap& __u)
        _NOEXCEPT_(__is_nothrow_swappable<__table>::value)
        {__table_.swap(__u.__table_);}

    _LIBCPP_INLINE_VISIBILITY
    hasher hash_function() const
        {return __table_.hash_function().hash_function();}
    _LIBCPP_INLINE_VISIBILITY
    key_equal key_eq() const
        {return __table_.key_eq().key_eq();}

    _LIBCPP_INLINE_VISIBILITY
    iterator       find(const key_type& __k)       {return __table_.find(__k);}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator find(const key_type& __k) const {return __table_.find(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2373 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
    _LIBCPP_INLINE_VISIBILITY
    iterator       find(const _K2& __k)            {return __table_.find(__k);}
    template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
    _LIBCPP_INLINE_VISIBILITY
    const_iterator find(const _K2& __k) const      {return __table_.find(__k);}
#endif // _LIBCPP_STD_VER >= 20
# 2380 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_INLINE_VISIBILITY
    size_type count(const key_type& __k) const {return __table_.__count_multi(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2384 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
    _LIBCPP_INLINE_VISIBILITY
    size_type count(const _K2& __k) const      {return __table_.__count_multi(__k);}
#endif // _LIBCPP_STD_VER >= 20
# 2388 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2390 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    _LIBCPP_INLINE_VISIBILITY
    bool contains(const key_type& __k) const {return find(__k) != end();}

    template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
    _LIBCPP_INLINE_VISIBILITY
    bool contains(const _K2& __k) const      {return find(__k) != end();}
#endif // _LIBCPP_STD_VER >= 20
# 2397 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, iterator>             equal_range(const key_type& __k)
        {return __table_.__equal_range_multi(__k);}
    _LIBCPP_INLINE_VISIBILITY
    pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
        {return __table_.__equal_range_multi(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2405 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
    template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, iterator>             equal_range(const _K2& __k)
        {return __table_.__equal_range_multi(__k);}
    template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
    _LIBCPP_INLINE_VISIBILITY
    pair<const_iterator, const_iterator> equal_range(const _K2& __k) const
        {return __table_.__equal_range_multi(__k);}
#endif // _LIBCPP_STD_VER >= 20
# 2414 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

    _LIBCPP_INLINE_VISIBILITY
    size_type bucket_count() const _NOEXCEPT {return __table_.bucket_count();}
    _LIBCPP_INLINE_VISIBILITY
    size_type max_bucket_count() const _NOEXCEPT
        {return __table_.max_bucket_count();}

    _LIBCPP_INLINE_VISIBILITY
    size_type bucket_size(size_type __n) const
        {return __table_.bucket_size(__n);}
    _LIBCPP_INLINE_VISIBILITY
    size_type bucket(const key_type& __k) const {return __table_.bucket(__k);}

    _LIBCPP_INLINE_VISIBILITY
    local_iterator       begin(size_type __n)        {return __table_.begin(__n);}
    _LIBCPP_INLINE_VISIBILITY
    local_iterator       end(size_type __n)          {return __table_.end(__n);}
    _LIBCPP_INLINE_VISIBILITY
    const_local_iterator begin(size_type __n) const  {return __table_.cbegin(__n);}
    _LIBCPP_INLINE_VISIBILITY
    const_local_iterator end(size_type __n) const    {return __table_.cend(__n);}
    _LIBCPP_INLINE_VISIBILITY
    const_local_iterator cbegin(size_type __n) const {return __table_.cbegin(__n);}
    _LIBCPP_INLINE_VISIBILITY
    const_local_iterator cend(size_type __n) const   {return __table_.cend(__n);}

    _LIBCPP_INLINE_VISIBILITY
    float load_factor() const _NOEXCEPT {return __table_.load_factor();}
    _LIBCPP_INLINE_VISIBILITY
    float max_load_factor() const _NOEXCEPT {return __table_.max_load_factor();}
    _LIBCPP_INLINE_VISIBILITY
    void max_load_factor(float __mlf) {__table_.max_load_factor(__mlf);}
    _LIBCPP_INLINE_VISIBILITY
    void rehash(size_type __n) {__table_.__rehash_multi(__n);}
    _LIBCPP_INLINE_VISIBILITY
    void reserve(size_type __n) {__table_.__reserve_multi(__n);}
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2453 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
template<class _InputIterator,
         class _Hash = hash<__iter_key_type<_InputIterator>>,
         class _Pred = equal_to<__iter_key_type<_InputIterator>>,
         class _Allocator = allocator<__iter_to_alloc_type<_InputIterator>>,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
         class = enable_if_t<!__is_allocator<_Hash>::value>,
         class = enable_if_t<!is_integral<_Hash>::value>,
         class = enable_if_t<!__is_allocator<_Pred>::value>,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_multimap(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type = 0,
                   _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
  -> unordered_multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Hash, _Pred, _Allocator>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2467 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
template <ranges::input_range _Range,
          class _Hash = hash<__range_key_type<_Range>>,
          class _Pred = equal_to<__range_key_type<_Range>>,
          class _Allocator = allocator<__range_to_alloc_type<_Range>>,
          class = enable_if_t<!__is_allocator<_Hash>::value>,
          class = enable_if_t<!is_integral<_Hash>::value>,
          class = enable_if_t<!__is_allocator<_Pred>::value>,
          class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_multimap(from_range_t, _Range&&, typename allocator_traits<_Allocator>::size_type = 0,
              _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
  -> unordered_multimap<__range_key_type<_Range>, __range_mapped_type<_Range>, _Hash, _Pred, _Allocator>;
#endif
# 2479 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template<class _Key, class _Tp, class _Hash = hash<remove_const_t<_Key>>,
         class _Pred = equal_to<remove_const_t<_Key>>,
         class _Allocator = allocator<pair<const _Key, _Tp>>,
         class = enable_if_t<!__is_allocator<_Hash>::value>,
         class = enable_if_t<!is_integral<_Hash>::value>,
         class = enable_if_t<!__is_allocator<_Pred>::value>,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_multimap(initializer_list<pair<_Key, _Tp>>, typename allocator_traits<_Allocator>::size_type = 0,
                   _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
  -> unordered_multimap<remove_const_t<_Key>, _Tp, _Hash, _Pred, _Allocator>;

template<class _InputIterator, class _Allocator,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_multimap(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type, _Allocator)
  -> unordered_multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>,
                        hash<__iter_key_type<_InputIterator>>, equal_to<__iter_key_type<_InputIterator>>, _Allocator>;

template<class _InputIterator, class _Allocator,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_multimap(_InputIterator, _InputIterator, _Allocator)
  -> unordered_multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>,
                        hash<__iter_key_type<_InputIterator>>, equal_to<__iter_key_type<_InputIterator>>, _Allocator>;

template<class _InputIterator, class _Hash, class _Allocator,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
         class = enable_if_t<!__is_allocator<_Hash>::value>,
         class = enable_if_t<!is_integral<_Hash>::value>,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_multimap(_InputIterator, _InputIterator, typename allocator_traits<_Allocator>::size_type, _Hash, _Allocator)
  -> unordered_multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>,
                        _Hash, equal_to<__iter_key_type<_InputIterator>>, _Allocator>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2515 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template <ranges::input_range _Range, class _Allocator,
          class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_multimap(from_range_t, _Range&&, typename allocator_traits<_Allocator>::size_type, _Allocator)
  -> unordered_multimap<__range_key_type<_Range>, __range_mapped_type<_Range>, hash<__range_key_type<_Range>>,
                   equal_to<__range_key_type<_Range>>, _Allocator>;

template <ranges::input_range _Range, class _Allocator,
          class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_multimap(from_range_t, _Range&&, _Allocator)
  -> unordered_multimap<__range_key_type<_Range>, __range_mapped_type<_Range>, hash<__range_key_type<_Range>>,
                   equal_to<__range_key_type<_Range>>, _Allocator>;

template <ranges::input_range _Range, class _Hash, class _Allocator,
          class = enable_if_t<!__is_allocator<_Hash>::value>,
          class = enable_if_t<!is_integral<_Hash>::value>,
          class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_multimap(from_range_t, _Range&&, typename allocator_traits<_Allocator>::size_type, _Hash, _Allocator)
  -> unordered_multimap<__range_key_type<_Range>, __range_mapped_type<_Range>, _Hash,
                   equal_to<__range_key_type<_Range>>, _Allocator>;

#endif
# 2537 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template<class _Key, class _Tp, class _Allocator,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_multimap(initializer_list<pair<_Key, _Tp>>, typename allocator_traits<_Allocator>::size_type, _Allocator)
  -> unordered_multimap<remove_const_t<_Key>, _Tp,
                        hash<remove_const_t<_Key>>,
                        equal_to<remove_const_t<_Key>>, _Allocator>;

template<class _Key, class _Tp, class _Allocator,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_multimap(initializer_list<pair<_Key, _Tp>>, _Allocator)
  -> unordered_multimap<remove_const_t<_Key>, _Tp,
                        hash<remove_const_t<_Key>>,
                        equal_to<remove_const_t<_Key>>, _Allocator>;

template<class _Key, class _Tp, class _Hash, class _Allocator,
         class = enable_if_t<!__is_allocator<_Hash>::value>,
         class = enable_if_t<!is_integral<_Hash>::value>,
         class = enable_if_t<__is_allocator<_Allocator>::value>>
unordered_multimap(initializer_list<pair<_Key, _Tp>>, typename allocator_traits<_Allocator>::size_type, _Hash, _Allocator)
  -> unordered_multimap<remove_const_t<_Key>, _Tp, _Hash,
                        equal_to<remove_const_t<_Key>>, _Allocator>;
#endif
# 2560 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
        size_type __n, const hasher& __hf, const key_equal& __eql)
    : __table_(__hf, __eql)
{
    __table_.__rehash_multi(__n);
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
        size_type __n, const hasher& __hf, const key_equal& __eql,
        const allocator_type& __a)
    : __table_(__hf, __eql, typename __table::allocator_type(__a))
{
    __table_.__rehash_multi(__n);
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
        _InputIterator __first, _InputIterator __last)
{
    insert(__first, __last);
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
        _InputIterator __first, _InputIterator __last, size_type __n,
        const hasher& __hf, const key_equal& __eql)
    : __table_(__hf, __eql)
{
    __table_.__rehash_multi(__n);
    insert(__first, __last);
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
        _InputIterator __first, _InputIterator __last, size_type __n,
        const hasher& __hf, const key_equal& __eql, const allocator_type& __a)
    : __table_(__hf, __eql, typename __table::allocator_type(__a))
{
    __table_.__rehash_multi(__n);
    insert(__first, __last);
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
        const allocator_type& __a)
    : __table_(typename __table::allocator_type(__a))
{
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
        const unordered_multimap& __u)
    : __table_(__u.__table_)
{
    __table_.__rehash_multi(__u.bucket_count());
    insert(__u.begin(), __u.end());
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
        const unordered_multimap& __u, const allocator_type& __a)
    : __table_(__u.__table_, typename __table::allocator_type(__a))
{
    __table_.__rehash_multi(__u.bucket_count());
    insert(__u.begin(), __u.end());
}

#ifndef _LIBCPP_CXX03_LANG

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
        unordered_multimap&& __u)
    _NOEXCEPT_(is_nothrow_move_constructible<__table>::value)
    : __table_(_VSTD::move(__u.__table_))
{
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
        unordered_multimap&& __u, const allocator_type& __a)
    : __table_(_VSTD::move(__u.__table_), typename __table::allocator_type(__a))
{
    if (__a != __u.get_allocator())
    {
        iterator __i = __u.begin();
        while (__u.size() != 0)
        {
            __table_.__insert_multi(
                __u.__table_.remove((__i++).__i_)->__get_value().__move());
        }
    }
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
        initializer_list<value_type> __il)
{
    insert(__il.begin(), __il.end());
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
        initializer_list<value_type> __il, size_type __n, const hasher& __hf,
        const key_equal& __eql)
    : __table_(__hf, __eql)
{
    __table_.__rehash_multi(__n);
    insert(__il.begin(), __il.end());
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
        initializer_list<value_type> __il, size_type __n, const hasher& __hf,
        const key_equal& __eql, const allocator_type& __a)
    : __table_(__hf, __eql, typename __table::allocator_type(__a))
{
    __table_.__rehash_multi(__n);
    insert(__il.begin(), __il.end());
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_multimap&& __u)
    _NOEXCEPT_(is_nothrow_move_assignable<__table>::value)
{
    __table_ = _VSTD::move(__u.__table_);
    return *this;
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(
        initializer_list<value_type> __il)
{
    __table_.__assign_multi(__il.begin(), __il.end());
    return *this;
}

#endif // _LIBCPP_CXX03_LANG
# 2709 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3



template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
inline
void
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
                                                            _InputIterator __last)
{
    for (; __first != __last; ++__first)
        __table_.__insert_multi(*__first);
}

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
     unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
    _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
    __x.swap(__y);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2734 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc,
          class _Predicate>
inline _LIBCPP_INLINE_VISIBILITY
    typename unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type
    erase_if(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __c,
             _Predicate __pred) {
  return _VSTD::__libcpp_erase_if_container(__c, __pred);
}
#endif
# 2743 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
_LIBCPP_HIDE_FROM_ABI bool
operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
           const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
{
    if (__x.size() != __y.size())
        return false;
    typedef typename unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::const_iterator
                                                                 const_iterator;
    typedef pair<const_iterator, const_iterator> _EqRng;
    for (const_iterator __i = __x.begin(), __ex = __x.end(); __i != __ex;)
    {
        _EqRng __xeq = __x.equal_range(__i->first);
        _EqRng __yeq = __y.equal_range(__i->first);
        if (_VSTD::distance(__xeq.first, __xeq.second) !=
            _VSTD::distance(__yeq.first, __yeq.second) ||
                  !_VSTD::is_permutation(__xeq.first, __xeq.second, __yeq.first))
            return false;
        __i = __xeq.second;
    }
    return true;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2768 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
           const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
{
    return !(__x == __y);
}

#endif
# 2779 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

_LIBCPP_END_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2783 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
_LIBCPP_BEGIN_NAMESPACE_STD
namespace pmr {
template <class _KeyT, class _ValueT, class _HashT = std::hash<_KeyT>, class _PredT = std::equal_to<_KeyT>>
using unordered_map _LIBCPP_AVAILABILITY_PMR =
    std::unordered_map<_KeyT, _ValueT, _HashT, _PredT, polymorphic_allocator<std::pair<const _KeyT, _ValueT>>>;

template <class _KeyT, class _ValueT, class _HashT = std::hash<_KeyT>, class _PredT = std::equal_to<_KeyT>>
using unordered_multimap _LIBCPP_AVAILABILITY_PMR =
    std::unordered_multimap<_KeyT, _ValueT, _HashT, _PredT, polymorphic_allocator<std::pair<const _KeyT, _ValueT>>>;
} // namespace pmr
_LIBCPP_END_NAMESPACE_STD
#endif
# 2795 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2797 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#  include <algorithm>
#endif /* expanded by -frewrite-includes */
# 2797 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 2798 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#  include <bit>
#endif /* expanded by -frewrite-includes */
# 2798 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 2799 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 2799 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 2800 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 2800 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 2801 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iterator>
#endif /* expanded by -frewrite-includes */
# 2801 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 2802 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 2802 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
# 2803 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#endif
# 2804 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3

#endif // _LIBCPP_UNORDERED_MAP
# 2806 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/unordered_map" 3
#endif /* unordered_map expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <vector>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 2 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Key,
          class _Value,
          class _Hash,
          class _BinaryPredicate,
          bool /*useArray*/>
class _BMSkipTable;

// General case for BM data searching; use a map
template <class _Key,
          class _Value,
          class _Hash,
          class _BinaryPredicate>
class _BMSkipTable<_Key, _Value, _Hash, _BinaryPredicate, false> {
private:
  using value_type = _Value;
  using key_type = _Key;

  const value_type __default_value_;
  unordered_map<_Key, _Value, _Hash, _BinaryPredicate> __table_;

public:
  _LIBCPP_HIDE_FROM_ABI
  explicit _BMSkipTable(size_t __sz, value_type __default_value, _Hash __hash, _BinaryPredicate __pred)
      : __default_value_(__default_value),
        __table_(__sz, __hash, __pred) {}

  _LIBCPP_HIDE_FROM_ABI void insert(const key_type& __key, value_type __val) {
    __table_[__key] = __val;
  }

  _LIBCPP_HIDE_FROM_ABI value_type operator[](const key_type& __key) const {
    auto __it = __table_.find(__key);
    return __it == __table_.end() ? __default_value_ : __it->second;
  }
};

// Special case small numeric values; use an array
template <class _Key,
          class _Value,
          class _Hash,
          class _BinaryPredicate>
class _BMSkipTable<_Key, _Value, _Hash, _BinaryPredicate, true> {
private:
  using value_type = _Value;
  using key_type = _Key;

  using unsigned_key_type = make_unsigned_t<key_type>;
  std::array<value_type, 256> __table_;
  static_assert(numeric_limits<unsigned_key_type>::max() < 256);

public:
  _LIBCPP_HIDE_FROM_ABI explicit _BMSkipTable(size_t, value_type __default_value, _Hash, _BinaryPredicate) {
    std::fill_n(__table_.data(), __table_.size(), __default_value);
  }

  _LIBCPP_HIDE_FROM_ABI void insert(key_type __key, value_type __val) {
    __table_[static_cast<unsigned_key_type>(__key)] = __val;
  }

  _LIBCPP_HIDE_FROM_ABI value_type operator[](key_type __key) const {
    return __table_[static_cast<unsigned_key_type>(__key)];
  }
};

template <class _RandomAccessIterator1,
          class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
          class _BinaryPredicate = equal_to<>>
class _LIBCPP_TEMPLATE_VIS boyer_moore_searcher {
private:
  using difference_type = typename std::iterator_traits<_RandomAccessIterator1>::difference_type;
  using value_type = typename std::iterator_traits<_RandomAccessIterator1>::value_type;
  using __skip_table_type = _BMSkipTable<value_type,
                                         difference_type,
                                         _Hash,
                                         _BinaryPredicate,
                                         is_integral_v<value_type>
                                      && sizeof(value_type) == 1
                                      && is_same_v<_Hash, hash<value_type>>
                                      && is_same_v<_BinaryPredicate, equal_to<>>>;

public:
  _LIBCPP_HIDE_FROM_ABI
  boyer_moore_searcher(_RandomAccessIterator1 __first,
                       _RandomAccessIterator1 __last,
                       _Hash __hash = _Hash(),
                       _BinaryPredicate __pred = _BinaryPredicate())
    : __first_(__first),
      __last_(__last),
      __pred_(__pred),
      __pattern_length_(__last - __first),
      __skip_table_(std::make_shared<__skip_table_type>(__pattern_length_, -1, __hash, __pred_)),
      __suffix_(std::__allocate_shared_unbounded_array<difference_type[]>(
          allocator<difference_type>(), __pattern_length_ + 1)) {
    difference_type __i = 0;
    while (__first != __last) {
      __skip_table_->insert(*__first, __i);
      ++__first;
      ++__i;
    }
    __build_suffix_table(__first_, __last_, __pred_);
  }

  template <class _RandomAccessIterator2>
  _LIBCPP_HIDE_FROM_ABI pair<_RandomAccessIterator2, _RandomAccessIterator2>
  operator()(_RandomAccessIterator2 __first, _RandomAccessIterator2 __last) const {
    static_assert(__is_same_uncvref<typename iterator_traits<_RandomAccessIterator1>::value_type,
                                    typename iterator_traits<_RandomAccessIterator2>::value_type>::value,
                  "Corpus and Pattern iterators must point to the same type");
    if (__first == __last)
      return std::make_pair(__last, __last);
    if (__first_ == __last_)
      return std::make_pair(__first, __first);

    if (__pattern_length_ > (__last - __first))
      return std::make_pair(__last, __last);
    return __search(__first, __last);
  }

private:
  _RandomAccessIterator1 __first_;
  _RandomAccessIterator1 __last_;
  _BinaryPredicate __pred_;
  difference_type __pattern_length_;
  shared_ptr<__skip_table_type> __skip_table_;
  shared_ptr<difference_type[]> __suffix_;

  template <class _RandomAccessIterator2>
  _LIBCPP_HIDE_FROM_ABI pair<_RandomAccessIterator2, _RandomAccessIterator2>
  __search(_RandomAccessIterator2 __f, _RandomAccessIterator2 __l) const {
    _RandomAccessIterator2 __current = __f;
    const _RandomAccessIterator2 __last = __l - __pattern_length_;
    const __skip_table_type& __skip_table = *__skip_table_;

    while (__current <= __last) {
      difference_type __j = __pattern_length_;
      while (__pred_(__first_[__j - 1], __current[__j - 1])) {
        --__j;
        if (__j == 0)
          return std::make_pair(__current, __current + __pattern_length_);
      }

      difference_type __k = __skip_table[__current[__j - 1]];
      difference_type __m = __j - __k - 1;
      if (__k < __j && __m > __suffix_[__j])
        __current += __m;
      else
        __current += __suffix_[__j];
    }
    return std::make_pair(__l, __l);
  }

  template <class _Iterator, class _Container>
  _LIBCPP_HIDE_FROM_ABI void
  __compute_bm_prefix(_Iterator __first, _Iterator __last, _BinaryPredicate __pred, _Container& __prefix) {
    const size_t __count = __last - __first;

    __prefix[0] = 0;
    size_t __k = 0;

    for (size_t __i = 1; __i != __count; ++__i) {
      while (__k > 0 && !__pred(__first[__k], __first[__i]))
        __k = __prefix[__k - 1];

      if (__pred(__first[__k], __first[__i]))
        ++__k;
      __prefix[__i] = __k;
    }
  }

  _LIBCPP_HIDE_FROM_ABI void
  __build_suffix_table(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _BinaryPredicate __pred) {
    const size_t __count = __last - __first;

    if (__count == 0)
      return;

    vector<difference_type> __scratch(__count);

    __compute_bm_prefix(__first, __last, __pred, __scratch);
    for (size_t __i = 0; __i <= __count; ++__i)
      __suffix_[__i] = __count - __scratch[__count - 1];

    using _ReverseIter = reverse_iterator<_RandomAccessIterator1>;
    __compute_bm_prefix(_ReverseIter(__last), _ReverseIter(__first), __pred, __scratch);

    for (size_t __i = 0; __i != __count; ++__i) {
      const size_t __j = __count - __scratch[__i];
      const difference_type __k = __i - __scratch[__i] + 1;

      if (__suffix_[__j] > __k)
        __suffix_[__j] = __k;
    }
  }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(boyer_moore_searcher);

template <class _RandomAccessIterator1,
          class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
          class _BinaryPredicate = equal_to<>>
class _LIBCPP_TEMPLATE_VIS boyer_moore_horspool_searcher {
private:
  using difference_type = typename iterator_traits<_RandomAccessIterator1>::difference_type;
  using value_type = typename iterator_traits<_RandomAccessIterator1>::value_type;
  using __skip_table_type = _BMSkipTable<value_type,
                                         difference_type,
                                         _Hash,
                                         _BinaryPredicate,
                                         is_integral_v<value_type>
                                      && sizeof(value_type) == 1
                                      && is_same_v<_Hash, hash<value_type>>
                                      && is_same_v<_BinaryPredicate, equal_to<>>>;
public:
  _LIBCPP_HIDE_FROM_ABI
  boyer_moore_horspool_searcher(_RandomAccessIterator1 __first,
                                _RandomAccessIterator1 __last,
                                _Hash __hash = _Hash(),
                                _BinaryPredicate __pred = _BinaryPredicate())
    : __first_(__first),
      __last_(__last),
      __pred_(__pred),
      __pattern_length_(__last - __first),
      __skip_table_(std::make_shared<__skip_table_type>(__pattern_length_, __pattern_length_, __hash, __pred_)) {
    if (__first == __last)
      return;
    --__last;
    difference_type __i = 0;
    while (__first != __last) {
      __skip_table_->insert(*__first, __pattern_length_ - 1 - __i);
      ++__first;
      ++__i;
    }
  }

  template <class _RandomAccessIterator2>
  _LIBCPP_HIDE_FROM_ABI pair<_RandomAccessIterator2, _RandomAccessIterator2>
  operator()(_RandomAccessIterator2 __first, _RandomAccessIterator2 __last) const {
    static_assert(__is_same_uncvref<typename std::iterator_traits<_RandomAccessIterator1>::value_type,
                                    typename std::iterator_traits<_RandomAccessIterator2>::value_type>::value,
                  "Corpus and Pattern iterators must point to the same type");
    if (__first == __last)
      return std::make_pair(__last, __last);
    if (__first_ == __last_)
      return std::make_pair(__first, __first);

    if (__pattern_length_ > __last - __first)
      return std::make_pair(__last, __last);

    return __search(__first, __last);
  }

private:
  _RandomAccessIterator1 __first_;
  _RandomAccessIterator1 __last_;
  _BinaryPredicate __pred_;
  difference_type __pattern_length_;
  shared_ptr<__skip_table_type> __skip_table_;

  template <class _RandomAccessIterator2>
  _LIBCPP_HIDE_FROM_ABI pair<_RandomAccessIterator2, _RandomAccessIterator2>
  __search(_RandomAccessIterator2 __f, _RandomAccessIterator2 __l) const {
    _RandomAccessIterator2 __current = __f;
    const _RandomAccessIterator2 __last = __l - __pattern_length_;
    const __skip_table_type& __skip_table = *__skip_table_;

    while (__current <= __last) {
      difference_type __j = __pattern_length_;
      while (__pred_(__first_[__j - 1], __current[__j - 1])) {
        --__j;
        if (__j == 0)
          return std::make_pair(__current, __current + __pattern_length_);
      }
      __current += __skip_table[__current[__pattern_length_ - 1]];
    }
    return std::make_pair(__l, __l);
  }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(boyer_moore_horspool_searcher);

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP_STD_VER >= 17
# 319 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3

#endif // _LIBCPP___FUNCTIONAL_BOYER_MOORE_SEARCHER_H
# 321 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/boyer_moore_searcher.h" 3
#endif /* boyer_moore_searcher.h expanded by -frewrite-includes */
# 527 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/compose.h>
#endif /* expanded by -frewrite-includes */
# 527 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 528 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* default_searcher.h expanded by -frewrite-includes */
#include <__functional/default_searcher.h>
#else /* default_searcher.h expanded by -frewrite-includes */
# 528 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_DEFAULT_SEARCHER_H
#define _LIBCPP___FUNCTIONAL_DEFAULT_SEARCHER_H

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/search.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3
#endif
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3

// default searcher
template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
class _LIBCPP_TEMPLATE_VIS default_searcher {
public:
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    default_searcher(_ForwardIterator __f, _ForwardIterator __l,
                       _BinaryPredicate __p = _BinaryPredicate())
        : __first_(__f), __last_(__l), __pred_(__p) {}

    template <typename _ForwardIterator2>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    pair<_ForwardIterator2, _ForwardIterator2>
    operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const
    {
        auto __proj = __identity();
        return std::__search_impl(__f, __l, __first_, __last_, __pred_, __proj, __proj);
    }

private:
    _ForwardIterator __first_;
    _ForwardIterator __last_;
    _BinaryPredicate __pred_;
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(default_searcher);

#endif // _LIBCPP_STD_VER >= 17
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_DEFAULT_SEARCHER_H
# 58 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/default_searcher.h" 3
#endif /* default_searcher.h expanded by -frewrite-includes */
# 529 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* function.h expanded by -frewrite-includes */
#include <__functional/function.h>
#else /* function.h expanded by -frewrite-includes */
# 529 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_FUNCTION_H
#define _LIBCPP___FUNCTIONAL_FUNCTION_H

#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__exception/exception.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/binary_function.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_destructor.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* builtin_new_allocator.h expanded by -frewrite-includes */
#include <__memory/builtin_new_allocator.h>
#else /* builtin_new_allocator.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/builtin_new_allocator.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_BUILTIN_NEW_ALLOCATOR_H
#define _LIBCPP___MEMORY_BUILTIN_NEW_ALLOCATOR_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/builtin_new_allocator.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/builtin_new_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/unique_ptr.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/builtin_new_allocator.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/builtin_new_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cstddef>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/builtin_new_allocator.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/builtin_new_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/builtin_new_allocator.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/builtin_new_allocator.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/builtin_new_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/builtin_new_allocator.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/builtin_new_allocator.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// __builtin_new_allocator -- A non-templated helper for allocating and
// deallocating memory using __builtin_operator_new and
// __builtin_operator_delete. It should be used in preference to
// `std::allocator<T>` to avoid additional instantiations.
struct __builtin_new_allocator {
  struct __builtin_new_deleter {
    typedef void* pointer_type;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __builtin_new_deleter(size_t __size, size_t __align)
        : __size_(__size), __align_(__align) {}

    _LIBCPP_HIDE_FROM_ABI void operator()(void* __p) const _NOEXCEPT {
        _VSTD::__libcpp_deallocate(__p, __size_, __align_);
    }

   private:
    size_t __size_;
    size_t __align_;
  };

  typedef unique_ptr<void, __builtin_new_deleter> __holder_t;

  _LIBCPP_HIDE_FROM_ABI static __holder_t __allocate_bytes(size_t __s, size_t __align) {
      return __holder_t(_VSTD::__libcpp_allocate(__s, __align),
                     __builtin_new_deleter(__s, __align));
  }

  _LIBCPP_HIDE_FROM_ABI static void __deallocate_bytes(void* __p, size_t __s,
                                 size_t __align) _NOEXCEPT {
      _VSTD::__libcpp_deallocate(__p, __s, __align);
  }

  template <class _Tp>
  _LIBCPP_NODEBUG _LIBCPP_ALWAYS_INLINE
  _LIBCPP_HIDE_FROM_ABI static __holder_t __allocate_type(size_t __n) {
      return __allocate_bytes(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
  }

  template <class _Tp>
  _LIBCPP_NODEBUG _LIBCPP_ALWAYS_INLINE
  _LIBCPP_HIDE_FROM_ABI static void __deallocate_type(void* __p, size_t __n) _NOEXCEPT {
      __deallocate_bytes(__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
  }
};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_BUILTIN_NEW_ALLOCATOR_H
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__memory/builtin_new_allocator.h" 3
#endif /* builtin_new_allocator.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/compressed_pair.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/unique_ptr.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/aligned_storage.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/decay.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_core_convertible.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_scalar.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_trivially_destructible.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_void.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* strip_signature.h expanded by -frewrite-includes */
#include <__type_traits/strip_signature.h>
#else /* strip_signature.h expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/strip_signature.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TYPE_TRAITS_STRIP_SIGNATURE_H
#define _LIBCPP___TYPE_TRAITS_STRIP_SIGNATURE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/strip_signature.h" 3
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/strip_signature.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/strip_signature.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/strip_signature.h" 3
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/strip_signature.h" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/strip_signature.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Fp>
struct __strip_signature;

#if 0 /* disabled by -frewrite-includes */
#  if defined(__cpp_static_call_operator) && __cpp_static_call_operator >= 202207L
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/strip_signature.h" 3

template <class _Rp, class... _Args>
struct __strip_signature<_Rp (*)(_Args...)> {
  using type = _Rp(_Args...);
};

template <class _Rp, class... _Args>
struct __strip_signature<_Rp (*)(_Args...) noexcept> {
  using type = _Rp(_Args...);
};

#  endif // defined(__cpp_static_call_operator) && __cpp_static_call_operator >= 202207L
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/strip_signature.h" 3

// clang-format off
template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...)> { using type = _Rp(_Ap...); };
template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...) const> { using type = _Rp(_Ap...); };
template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...) volatile> { using type = _Rp(_Ap...); };
template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...) const volatile> { using type = _Rp(_Ap...); };

template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...) &> { using type = _Rp(_Ap...); };
template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...) const &> { using type = _Rp(_Ap...); };
template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...) volatile &> { using type = _Rp(_Ap...); };
template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...) const volatile &> { using type = _Rp(_Ap...); };

template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...) noexcept> { using type = _Rp(_Ap...); };
template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...) const noexcept> { using type = _Rp(_Ap...); };
template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...) volatile noexcept> { using type = _Rp(_Ap...); };
template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...) const volatile noexcept> { using type = _Rp(_Ap...); };

template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...) & noexcept> { using type = _Rp(_Ap...); };
template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...) const & noexcept> { using type = _Rp(_Ap...); };
template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...) volatile & noexcept> { using type = _Rp(_Ap...); };
template<class _Rp, class _Gp, class ..._Ap>
struct __strip_signature<_Rp (_Gp::*) (_Ap...) const volatile & noexcept> { using type = _Rp(_Ap...); };
// clang-format on

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER >= 17
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/strip_signature.h" 3

#endif // _LIBCPP___TYPE_TRAITS_STRIP_SIGNATURE_H
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__type_traits/strip_signature.h" 3
#endif /* strip_signature.h expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/piecewise_construct.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__verbose_abort>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#endif
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

#ifndef _LIBCPP_CXX03_LANG

_LIBCPP_BEGIN_NAMESPACE_STD

// bad_function_call

_LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wweak-vtables")
class _LIBCPP_EXPORTED_FROM_ABI bad_function_call
    : public exception
{
public:
    _LIBCPP_HIDE_FROM_ABI bad_function_call() _NOEXCEPT = default;
    _LIBCPP_HIDE_FROM_ABI bad_function_call(const bad_function_call&) _NOEXCEPT = default;
    _LIBCPP_HIDE_FROM_ABI bad_function_call& operator=(const bad_function_call&) _NOEXCEPT = default;
// Note that when a key function is not used, every translation unit that uses
// bad_function_call will end up containing a weak definition of the vtable and
// typeinfo.
#ifdef _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
    ~bad_function_call() _NOEXCEPT override;
#else
# 69 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~bad_function_call() _NOEXCEPT override {}
#endif
# 71 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

#ifdef _LIBCPP_ABI_BAD_FUNCTION_CALL_GOOD_WHAT_MESSAGE
    const char* what() const _NOEXCEPT override;
#endif
# 75 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
};
_LIBCPP_DIAGNOSTIC_POP

_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_bad_function_call()
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    throw bad_function_call();
#else
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
    _LIBCPP_VERBOSE_ABORT("bad_function_call was thrown in -fno-exceptions mode");
#endif
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
}

template<class _Fp> class _LIBCPP_TEMPLATE_VIS function; // undefined

namespace __function
{

template<class _Rp>
struct __maybe_derive_from_unary_function
{
};

template<class _Rp, class _A1>
struct __maybe_derive_from_unary_function<_Rp(_A1)>
    : public __unary_function<_A1, _Rp>
{
};

template<class _Rp>
struct __maybe_derive_from_binary_function
{
};

template<class _Rp, class _A1, class _A2>
struct __maybe_derive_from_binary_function<_Rp(_A1, _A2)>
    : public __binary_function<_A1, _A2, _Rp>
{
};

template <class _Fp>
_LIBCPP_INLINE_VISIBILITY
bool __not_null(_Fp const&) { return true; }

template <class _Fp>
_LIBCPP_INLINE_VISIBILITY
bool __not_null(_Fp* __ptr) { return __ptr; }

template <class _Ret, class _Class>
_LIBCPP_INLINE_VISIBILITY
bool __not_null(_Ret _Class::*__ptr) { return __ptr; }

template <class _Fp>
_LIBCPP_INLINE_VISIBILITY
bool __not_null(function<_Fp> const& __f) { return !!__f; }

#ifdef _LIBCPP_HAS_EXTENSION_BLOCKS
template <class _Rp, class ..._Args>
_LIBCPP_INLINE_VISIBILITY
bool __not_null(_Rp (^__p)(_Args...)) { return __p; }
#endif
# 136 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

} // namespace __function

namespace __function {

// __alloc_func holds a functor and an allocator.

template <class _Fp, class _Ap, class _FB> class __alloc_func;
template <class _Fp, class _FB>
class __default_alloc_func;

template <class _Fp, class _Ap, class _Rp, class... _ArgTypes>
class __alloc_func<_Fp, _Ap, _Rp(_ArgTypes...)>
{
    __compressed_pair<_Fp, _Ap> __f_;

  public:
    typedef _LIBCPP_NODEBUG _Fp _Target;
    typedef _LIBCPP_NODEBUG _Ap _Alloc;

    _LIBCPP_INLINE_VISIBILITY
    const _Target& __target() const { return __f_.first(); }

    // WIN32 APIs may define __allocator, so use __get_allocator instead.
    _LIBCPP_INLINE_VISIBILITY
    const _Alloc& __get_allocator() const { return __f_.second(); }

    _LIBCPP_INLINE_VISIBILITY
    explicit __alloc_func(_Target&& __f)
        : __f_(piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__f)),
               _VSTD::forward_as_tuple())
    {
    }

    _LIBCPP_INLINE_VISIBILITY
    explicit __alloc_func(const _Target& __f, const _Alloc& __a)
        : __f_(piecewise_construct, _VSTD::forward_as_tuple(__f),
               _VSTD::forward_as_tuple(__a))
    {
    }

    _LIBCPP_INLINE_VISIBILITY
    explicit __alloc_func(const _Target& __f, _Alloc&& __a)
        : __f_(piecewise_construct, _VSTD::forward_as_tuple(__f),
               _VSTD::forward_as_tuple(_VSTD::move(__a)))
    {
    }

    _LIBCPP_INLINE_VISIBILITY
    explicit __alloc_func(_Target&& __f, _Alloc&& __a)
        : __f_(piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__f)),
               _VSTD::forward_as_tuple(_VSTD::move(__a)))
    {
    }

    _LIBCPP_INLINE_VISIBILITY
    _Rp operator()(_ArgTypes&&... __arg)
    {
        typedef __invoke_void_return_wrapper<_Rp> _Invoker;
        return _Invoker::__call(__f_.first(),
                                _VSTD::forward<_ArgTypes>(__arg)...);
    }

    _LIBCPP_INLINE_VISIBILITY
    __alloc_func* __clone() const
    {
        typedef allocator_traits<_Alloc> __alloc_traits;
        typedef __rebind_alloc<__alloc_traits, __alloc_func> _AA;
        _AA __a(__f_.second());
        typedef __allocator_destructor<_AA> _Dp;
        unique_ptr<__alloc_func, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
        ::new ((void*)__hold.get()) __alloc_func(__f_.first(), _Alloc(__a));
        return __hold.release();
    }

    _LIBCPP_INLINE_VISIBILITY
    void destroy() _NOEXCEPT { __f_.~__compressed_pair<_Target, _Alloc>(); }

    _LIBCPP_HIDE_FROM_ABI static void __destroy_and_delete(__alloc_func* __f) {
      typedef allocator_traits<_Alloc> __alloc_traits;
      typedef __rebind_alloc<__alloc_traits, __alloc_func> _FunAlloc;
      _FunAlloc __a(__f->__get_allocator());
      __f->destroy();
      __a.deallocate(__f, 1);
    }
};

template <class _Fp, class _Rp, class... _ArgTypes>
class __default_alloc_func<_Fp, _Rp(_ArgTypes...)> {
  _Fp __f_;

public:
  typedef _LIBCPP_NODEBUG _Fp _Target;

  _LIBCPP_INLINE_VISIBILITY
  const _Target& __target() const { return __f_; }

  _LIBCPP_INLINE_VISIBILITY
  explicit __default_alloc_func(_Target&& __f) : __f_(_VSTD::move(__f)) {}

  _LIBCPP_INLINE_VISIBILITY
  explicit __default_alloc_func(const _Target& __f) : __f_(__f) {}

  _LIBCPP_INLINE_VISIBILITY
  _Rp operator()(_ArgTypes&&... __arg) {
    typedef __invoke_void_return_wrapper<_Rp> _Invoker;
    return _Invoker::__call(__f_, _VSTD::forward<_ArgTypes>(__arg)...);
  }

  _LIBCPP_INLINE_VISIBILITY
  __default_alloc_func* __clone() const {
      __builtin_new_allocator::__holder_t __hold =
        __builtin_new_allocator::__allocate_type<__default_alloc_func>(1);
    __default_alloc_func* __res =
        ::new ((void*)__hold.get()) __default_alloc_func(__f_);
    (void)__hold.release();
    return __res;
  }

  _LIBCPP_INLINE_VISIBILITY
  void destroy() _NOEXCEPT { __f_.~_Target(); }

  _LIBCPP_HIDE_FROM_ABI static void __destroy_and_delete(__default_alloc_func* __f) {
    __f->destroy();
      __builtin_new_allocator::__deallocate_type<__default_alloc_func>(__f, 1);
  }
};

// __base provides an abstract interface for copyable functors.

template<class _Fp> class _LIBCPP_TEMPLATE_VIS __base;

template<class _Rp, class ..._ArgTypes>
class __base<_Rp(_ArgTypes...)>
{
    __base(const __base&);
    __base& operator=(const __base&);
public:
    _LIBCPP_INLINE_VISIBILITY __base() {}
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual ~__base() {}
    virtual __base* __clone() const = 0;
    virtual void __clone(__base*) const = 0;
    virtual void destroy() _NOEXCEPT = 0;
    virtual void destroy_deallocate() _NOEXCEPT = 0;
    virtual _Rp operator()(_ArgTypes&& ...) = 0;
#ifndef _LIBCPP_HAS_NO_RTTI
    virtual const void* target(const type_info&) const _NOEXCEPT = 0;
    virtual const std::type_info& target_type() const _NOEXCEPT = 0;
#endif // _LIBCPP_HAS_NO_RTTI
# 285 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
};

// __func implements __base for a given functor type.

template<class _FD, class _Alloc, class _FB> class __func;

template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
class __func<_Fp, _Alloc, _Rp(_ArgTypes...)>
    : public  __base<_Rp(_ArgTypes...)>
{
    __alloc_func<_Fp, _Alloc, _Rp(_ArgTypes...)> __f_;
public:
    _LIBCPP_INLINE_VISIBILITY
    explicit __func(_Fp&& __f)
        : __f_(_VSTD::move(__f)) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit __func(const _Fp& __f, const _Alloc& __a)
        : __f_(__f, __a) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit __func(const _Fp& __f, _Alloc&& __a)
        : __f_(__f, _VSTD::move(__a)) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit __func(_Fp&& __f, _Alloc&& __a)
        : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}

    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual __base<_Rp(_ArgTypes...)>* __clone() const;
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void __clone(__base<_Rp(_ArgTypes...)>*) const;
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void destroy() _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void destroy_deallocate() _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual _Rp operator()(_ArgTypes&&... __arg);
#ifndef _LIBCPP_HAS_NO_RTTI
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual const void* target(const type_info&) const _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual const std::type_info& target_type() const _NOEXCEPT;
#endif // _LIBCPP_HAS_NO_RTTI
# 322 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
};

template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
__base<_Rp(_ArgTypes...)>*
__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::__clone() const
{
    typedef allocator_traits<_Alloc> __alloc_traits;
    typedef __rebind_alloc<__alloc_traits, __func> _Ap;
    _Ap __a(__f_.__get_allocator());
    typedef __allocator_destructor<_Ap> _Dp;
    unique_ptr<__func, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
    ::new ((void*)__hold.get()) __func(__f_.__target(), _Alloc(__a));
    return __hold.release();
}

template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
void
__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::__clone(__base<_Rp(_ArgTypes...)>* __p) const
{
    ::new ((void*)__p) __func(__f_.__target(), __f_.__get_allocator());
}

template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
void
__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::destroy() _NOEXCEPT
{
    __f_.destroy();
}

template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
void
__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::destroy_deallocate() _NOEXCEPT
{
    typedef allocator_traits<_Alloc> __alloc_traits;
    typedef __rebind_alloc<__alloc_traits, __func> _Ap;
    _Ap __a(__f_.__get_allocator());
    __f_.destroy();
    __a.deallocate(this, 1);
}

template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
_Rp
__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::operator()(_ArgTypes&& ... __arg)
{
    return __f_(_VSTD::forward<_ArgTypes>(__arg)...);
}

#ifndef _LIBCPP_HAS_NO_RTTI

template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
const void*
__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target(const type_info& __ti) const _NOEXCEPT
{
    if (__ti == typeid(_Fp))
        return _VSTD::addressof(__f_.__target());
    return nullptr;
}

template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
const std::type_info&
__func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target_type() const _NOEXCEPT
{
    return typeid(_Fp);
}

#endif // _LIBCPP_HAS_NO_RTTI
# 388 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

// __value_func creates a value-type from a __func.

template <class _Fp> class __value_func;

template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
{
    _LIBCPP_SUPPRESS_DEPRECATED_PUSH
    typename aligned_storage<3 * sizeof(void*)>::type __buf_;
    _LIBCPP_SUPPRESS_DEPRECATED_POP

    typedef __base<_Rp(_ArgTypes...)> __func;
    __func* __f_;

    _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI static __func* __as_base(void* __p)
    {
        return reinterpret_cast<__func*>(__p);
    }

  public:
    _LIBCPP_INLINE_VISIBILITY
    __value_func() _NOEXCEPT : __f_(nullptr) {}

    template <class _Fp, class _Alloc>
    _LIBCPP_INLINE_VISIBILITY __value_func(_Fp&& __f, const _Alloc& __a)
        : __f_(nullptr)
    {
        typedef allocator_traits<_Alloc> __alloc_traits;
        typedef __function::__func<_Fp, _Alloc, _Rp(_ArgTypes...)> _Fun;
        typedef __rebind_alloc<__alloc_traits, _Fun> _FunAlloc;

        if (__function::__not_null(__f))
        {
            _FunAlloc __af(__a);
            if (sizeof(_Fun) <= sizeof(__buf_) &&
                is_nothrow_copy_constructible<_Fp>::value &&
                is_nothrow_copy_constructible<_FunAlloc>::value)
            {
                __f_ =
                    ::new ((void*)&__buf_) _Fun(_VSTD::move(__f), _Alloc(__af));
            }
            else
            {
                typedef __allocator_destructor<_FunAlloc> _Dp;
                unique_ptr<__func, _Dp> __hold(__af.allocate(1), _Dp(__af, 1));
                ::new ((void*)__hold.get()) _Fun(_VSTD::move(__f), _Alloc(__a));
                __f_ = __hold.release();
            }
        }
    }

    template <class _Fp, __enable_if_t<!is_same<__decay_t<_Fp>, __value_func>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY explicit __value_func(_Fp&& __f)
        : __value_func(_VSTD::forward<_Fp>(__f), allocator<_Fp>()) {}

    _LIBCPP_INLINE_VISIBILITY
    __value_func(const __value_func& __f)
    {
        if (__f.__f_ == nullptr)
            __f_ = nullptr;
        else if ((void*)__f.__f_ == &__f.__buf_)
        {
            __f_ = __as_base(&__buf_);
            __f.__f_->__clone(__f_);
        }
        else
            __f_ = __f.__f_->__clone();
    }

    _LIBCPP_INLINE_VISIBILITY
    __value_func(__value_func&& __f) _NOEXCEPT
    {
        if (__f.__f_ == nullptr)
            __f_ = nullptr;
        else if ((void*)__f.__f_ == &__f.__buf_)
        {
            __f_ = __as_base(&__buf_);
            __f.__f_->__clone(__f_);
        }
        else
        {
            __f_ = __f.__f_;
            __f.__f_ = nullptr;
        }
    }

    _LIBCPP_INLINE_VISIBILITY
    ~__value_func()
    {
        if ((void*)__f_ == &__buf_)
            __f_->destroy();
        else if (__f_)
            __f_->destroy_deallocate();
    }

    _LIBCPP_INLINE_VISIBILITY
    __value_func& operator=(__value_func&& __f)
    {
        *this = nullptr;
        if (__f.__f_ == nullptr)
            __f_ = nullptr;
        else if ((void*)__f.__f_ == &__f.__buf_)
        {
            __f_ = __as_base(&__buf_);
            __f.__f_->__clone(__f_);
        }
        else
        {
            __f_ = __f.__f_;
            __f.__f_ = nullptr;
        }
        return *this;
    }

    _LIBCPP_INLINE_VISIBILITY
    __value_func& operator=(nullptr_t)
    {
        __func* __f = __f_;
        __f_ = nullptr;
        if ((void*)__f == &__buf_)
            __f->destroy();
        else if (__f)
            __f->destroy_deallocate();
        return *this;
    }

    _LIBCPP_INLINE_VISIBILITY
    _Rp operator()(_ArgTypes&&... __args) const
    {
        if (__f_ == nullptr)
            __throw_bad_function_call();
        return (*__f_)(_VSTD::forward<_ArgTypes>(__args)...);
    }

    _LIBCPP_INLINE_VISIBILITY
    void swap(__value_func& __f) _NOEXCEPT
    {
        if (&__f == this)
            return;
        if ((void*)__f_ == &__buf_ && (void*)__f.__f_ == &__f.__buf_)
        {
            _LIBCPP_SUPPRESS_DEPRECATED_PUSH
            typename aligned_storage<sizeof(__buf_)>::type __tempbuf;
            _LIBCPP_SUPPRESS_DEPRECATED_POP
            __func* __t = __as_base(&__tempbuf);
            __f_->__clone(__t);
            __f_->destroy();
            __f_ = nullptr;
            __f.__f_->__clone(__as_base(&__buf_));
            __f.__f_->destroy();
            __f.__f_ = nullptr;
            __f_ = __as_base(&__buf_);
            __t->__clone(__as_base(&__f.__buf_));
            __t->destroy();
            __f.__f_ = __as_base(&__f.__buf_);
        }
        else if ((void*)__f_ == &__buf_)
        {
            __f_->__clone(__as_base(&__f.__buf_));
            __f_->destroy();
            __f_ = __f.__f_;
            __f.__f_ = __as_base(&__f.__buf_);
        }
        else if ((void*)__f.__f_ == &__f.__buf_)
        {
            __f.__f_->__clone(__as_base(&__buf_));
            __f.__f_->destroy();
            __f.__f_ = __f_;
            __f_ = __as_base(&__buf_);
        }
        else
            _VSTD::swap(__f_, __f.__f_);
    }

    _LIBCPP_INLINE_VISIBILITY
    explicit operator bool() const _NOEXCEPT { return __f_ != nullptr; }

#ifndef _LIBCPP_HAS_NO_RTTI
    _LIBCPP_INLINE_VISIBILITY
    const std::type_info& target_type() const _NOEXCEPT
    {
        if (__f_ == nullptr)
            return typeid(void);
        return __f_->target_type();
    }

    template <typename _Tp>
    _LIBCPP_INLINE_VISIBILITY const _Tp* target() const _NOEXCEPT
    {
        if (__f_ == nullptr)
            return nullptr;
        return (const _Tp*)__f_->target(typeid(_Tp));
    }
#endif // _LIBCPP_HAS_NO_RTTI
# 582 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
};

// Storage for a functor object, to be used with __policy to manage copy and
// destruction.
union __policy_storage
{
    mutable char __small[sizeof(void*) * 2];
    void* __large;
};

// True if _Fun can safely be held in __policy_storage.__small.
template <typename _Fun>
struct __use_small_storage
    : public integral_constant<
          bool, sizeof(_Fun) <= sizeof(__policy_storage) &&
                    _LIBCPP_ALIGNOF(_Fun) <= _LIBCPP_ALIGNOF(__policy_storage) &&
                    is_trivially_copy_constructible<_Fun>::value &&
                    is_trivially_destructible<_Fun>::value> {};

// Policy contains information about how to copy, destroy, and move the
// underlying functor. You can think of it as a vtable of sorts.
struct __policy
{
    // Used to copy or destroy __large values. null for trivial objects.
    void* (*const __clone)(const void*);
    void (*const __destroy)(void*);

    // True if this is the null policy (no value).
    const bool __is_null;

    // The target type. May be null if RTTI is disabled.
    const std::type_info* const __type_info;

    // Returns a pointer to a static policy object suitable for the functor
    // type.
    template <typename _Fun>
    _LIBCPP_INLINE_VISIBILITY static const __policy* __create()
    {
        return __choose_policy<_Fun>(__use_small_storage<_Fun>());
    }

    _LIBCPP_INLINE_VISIBILITY
    static const __policy* __create_empty()
    {
        static const _LIBCPP_CONSTEXPR __policy __policy = {nullptr, nullptr,
                                                            true,
#ifndef _LIBCPP_HAS_NO_RTTI
                                                            &typeid(void)
#else
# 631 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
                                                            nullptr
#endif
# 633 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
        };
        return &__policy;
    }

  private:
    template <typename _Fun>
    _LIBCPP_HIDE_FROM_ABI static void* __large_clone(const void* __s)
    {
        const _Fun* __f = static_cast<const _Fun*>(__s);
        return __f->__clone();
    }

    template <typename _Fun>
    _LIBCPP_HIDE_FROM_ABI static void __large_destroy(void* __s) {
      _Fun::__destroy_and_delete(static_cast<_Fun*>(__s));
    }

    template <typename _Fun>
    _LIBCPP_INLINE_VISIBILITY static const __policy*
    __choose_policy(/* is_small = */ false_type) {
      static const _LIBCPP_CONSTEXPR __policy __policy = {
          &__large_clone<_Fun>, &__large_destroy<_Fun>, false,
#ifndef _LIBCPP_HAS_NO_RTTI
          &typeid(typename _Fun::_Target)
#else
# 658 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
          nullptr
#endif
# 660 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
      };
        return &__policy;
    }

    template <typename _Fun>
    _LIBCPP_INLINE_VISIBILITY static const __policy*
        __choose_policy(/* is_small = */ true_type)
    {
        static const _LIBCPP_CONSTEXPR __policy __policy = {
            nullptr, nullptr, false,
#ifndef _LIBCPP_HAS_NO_RTTI
            &typeid(typename _Fun::_Target)
#else
# 673 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
            nullptr
#endif
# 675 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
        };
        return &__policy;
    }
};

// Used to choose between perfect forwarding or pass-by-value. Pass-by-value is
// faster for types that can be passed in registers.
template <typename _Tp>
using __fast_forward = __conditional_t<is_scalar<_Tp>::value, _Tp, _Tp&&>;

// __policy_invoker calls an instance of __alloc_func held in __policy_storage.

template <class _Fp> struct __policy_invoker;

template <class _Rp, class... _ArgTypes>
struct __policy_invoker<_Rp(_ArgTypes...)>
{
    typedef _Rp (*__Call)(const __policy_storage*,
                          __fast_forward<_ArgTypes>...);

    __Call __call_;

    // Creates an invoker that throws bad_function_call.
    _LIBCPP_INLINE_VISIBILITY
    __policy_invoker() : __call_(&__call_empty) {}

    // Creates an invoker that calls the given instance of __func.
    template <typename _Fun>
    _LIBCPP_INLINE_VISIBILITY static __policy_invoker __create()
    {
        return __policy_invoker(&__call_impl<_Fun>);
    }

  private:
    _LIBCPP_INLINE_VISIBILITY
    explicit __policy_invoker(__Call __c) : __call_(__c) {}

    _LIBCPP_HIDE_FROM_ABI static _Rp __call_empty(const __policy_storage*,
                            __fast_forward<_ArgTypes>...)
    {
        __throw_bad_function_call();
    }

    template <typename _Fun>
    _LIBCPP_HIDE_FROM_ABI static _Rp __call_impl(const __policy_storage* __buf,
                           __fast_forward<_ArgTypes>... __args)
    {
        _Fun* __f = reinterpret_cast<_Fun*>(__use_small_storage<_Fun>::value
                                                ? &__buf->__small
                                                : __buf->__large);
        return (*__f)(_VSTD::forward<_ArgTypes>(__args)...);
    }
};

// __policy_func uses a __policy and __policy_invoker to create a type-erased,
// copyable functor.

template <class _Fp> class __policy_func;

template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
{
    // Inline storage for small objects.
    __policy_storage __buf_;

    // Calls the value stored in __buf_. This could technically be part of
    // policy, but storing it here eliminates a level of indirection inside
    // operator().
    typedef __function::__policy_invoker<_Rp(_ArgTypes...)> __invoker;
    __invoker __invoker_;

    // The policy that describes how to move / copy / destroy __buf_. Never
    // null, even if the function is empty.
    const __policy* __policy_;

  public:
    _LIBCPP_INLINE_VISIBILITY
    __policy_func() : __policy_(__policy::__create_empty()) {}

    template <class _Fp, class _Alloc>
    _LIBCPP_INLINE_VISIBILITY __policy_func(_Fp&& __f, const _Alloc& __a)
        : __policy_(__policy::__create_empty())
    {
        typedef __alloc_func<_Fp, _Alloc, _Rp(_ArgTypes...)> _Fun;
        typedef allocator_traits<_Alloc> __alloc_traits;
        typedef __rebind_alloc<__alloc_traits, _Fun> _FunAlloc;

        if (__function::__not_null(__f))
        {
            __invoker_ = __invoker::template __create<_Fun>();
            __policy_ = __policy::__create<_Fun>();

            _FunAlloc __af(__a);
            if (__use_small_storage<_Fun>())
            {
                ::new ((void*)&__buf_.__small)
                    _Fun(_VSTD::move(__f), _Alloc(__af));
            }
            else
            {
                typedef __allocator_destructor<_FunAlloc> _Dp;
                unique_ptr<_Fun, _Dp> __hold(__af.allocate(1), _Dp(__af, 1));
                ::new ((void*)__hold.get())
                    _Fun(_VSTD::move(__f), _Alloc(__af));
                __buf_.__large = __hold.release();
            }
        }
    }

    template <class _Fp, __enable_if_t<!is_same<__decay_t<_Fp>, __policy_func>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY explicit __policy_func(_Fp&& __f)
        : __policy_(__policy::__create_empty()) {
      typedef __default_alloc_func<_Fp, _Rp(_ArgTypes...)> _Fun;

      if (__function::__not_null(__f)) {
        __invoker_ = __invoker::template __create<_Fun>();
        __policy_ = __policy::__create<_Fun>();
        if (__use_small_storage<_Fun>()) {
          ::new ((void*)&__buf_.__small) _Fun(_VSTD::move(__f));
        } else {
          __builtin_new_allocator::__holder_t __hold =
              __builtin_new_allocator::__allocate_type<_Fun>(1);
          __buf_.__large = ::new ((void*)__hold.get()) _Fun(_VSTD::move(__f));
          (void)__hold.release();
        }
      }
    }

    _LIBCPP_INLINE_VISIBILITY
    __policy_func(const __policy_func& __f)
        : __buf_(__f.__buf_), __invoker_(__f.__invoker_),
          __policy_(__f.__policy_)
    {
        if (__policy_->__clone)
            __buf_.__large = __policy_->__clone(__f.__buf_.__large);
    }

    _LIBCPP_INLINE_VISIBILITY
    __policy_func(__policy_func&& __f)
        : __buf_(__f.__buf_), __invoker_(__f.__invoker_),
          __policy_(__f.__policy_)
    {
        if (__policy_->__destroy)
        {
            __f.__policy_ = __policy::__create_empty();
            __f.__invoker_ = __invoker();
        }
    }

    _LIBCPP_INLINE_VISIBILITY
    ~__policy_func()
    {
        if (__policy_->__destroy)
            __policy_->__destroy(__buf_.__large);
    }

    _LIBCPP_INLINE_VISIBILITY
    __policy_func& operator=(__policy_func&& __f)
    {
        *this = nullptr;
        __buf_ = __f.__buf_;
        __invoker_ = __f.__invoker_;
        __policy_ = __f.__policy_;
        __f.__policy_ = __policy::__create_empty();
        __f.__invoker_ = __invoker();
        return *this;
    }

    _LIBCPP_INLINE_VISIBILITY
    __policy_func& operator=(nullptr_t)
    {
        const __policy* __p = __policy_;
        __policy_ = __policy::__create_empty();
        __invoker_ = __invoker();
        if (__p->__destroy)
            __p->__destroy(__buf_.__large);
        return *this;
    }

    _LIBCPP_INLINE_VISIBILITY
    _Rp operator()(_ArgTypes&&... __args) const
    {
        return __invoker_.__call_(_VSTD::addressof(__buf_),
                                  _VSTD::forward<_ArgTypes>(__args)...);
    }

    _LIBCPP_INLINE_VISIBILITY
    void swap(__policy_func& __f)
    {
        _VSTD::swap(__invoker_, __f.__invoker_);
        _VSTD::swap(__policy_, __f.__policy_);
        _VSTD::swap(__buf_, __f.__buf_);
    }

    _LIBCPP_INLINE_VISIBILITY
    explicit operator bool() const _NOEXCEPT
    {
        return !__policy_->__is_null;
    }

#ifndef _LIBCPP_HAS_NO_RTTI
    _LIBCPP_INLINE_VISIBILITY
    const std::type_info& target_type() const _NOEXCEPT
    {
        return *__policy_->__type_info;
    }

    template <typename _Tp>
    _LIBCPP_INLINE_VISIBILITY const _Tp* target() const _NOEXCEPT
    {
        if (__policy_->__is_null || typeid(_Tp) != *__policy_->__type_info)
            return nullptr;
        if (__policy_->__clone) // Out of line storage.
            return reinterpret_cast<const _Tp*>(__buf_.__large);
        else
            return reinterpret_cast<const _Tp*>(&__buf_.__small);
    }
#endif // _LIBCPP_HAS_NO_RTTI
# 892 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
};

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_HAS_BLOCKS_RUNTIME)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 895 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

extern "C" void *_Block_copy(const void *);
extern "C" void _Block_release(const void *);

template<class _Rp1, class ..._ArgTypes1, class _Alloc, class _Rp, class ..._ArgTypes>
class __func<_Rp1(^)(_ArgTypes1...), _Alloc, _Rp(_ArgTypes...)>
    : public  __base<_Rp(_ArgTypes...)>
{
    typedef _Rp1(^__block_type)(_ArgTypes1...);
    __block_type __f_;

public:
    _LIBCPP_INLINE_VISIBILITY
    explicit __func(__block_type const& __f)
#ifdef _LIBCPP_HAS_OBJC_ARC
        : __f_(__f)
#else
# 912 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
        : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr))
#endif
# 914 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
    { }

    // [TODO] add && to save on a retain

    _LIBCPP_INLINE_VISIBILITY
    explicit __func(__block_type __f, const _Alloc& /* unused */)
#ifdef _LIBCPP_HAS_OBJC_ARC
        : __f_(__f)
#else
# 923 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
        : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr))
#endif
# 925 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
    { }

    virtual __base<_Rp(_ArgTypes...)>* __clone() const {
        _LIBCPP_ASSERT_INTERNAL(false,
            "Block pointers are just pointers, so they should always fit into "
            "std::function's small buffer optimization. This function should "
            "never be invoked.");
        return nullptr;
    }

    virtual void __clone(__base<_Rp(_ArgTypes...)>* __p) const {
        ::new ((void*)__p) __func(__f_);
    }

    virtual void destroy() _NOEXCEPT {
#ifndef _LIBCPP_HAS_OBJC_ARC
        if (__f_)
            _Block_release(__f_);
#endif
# 944 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
        __f_ = 0;
    }

    virtual void destroy_deallocate() _NOEXCEPT {
        _LIBCPP_ASSERT_INTERNAL(false,
            "Block pointers are just pointers, so they should always fit into "
            "std::function's small buffer optimization. This function should "
            "never be invoked.");
    }

    virtual _Rp operator()(_ArgTypes&& ... __arg) {
        return _VSTD::__invoke(__f_, _VSTD::forward<_ArgTypes>(__arg)...);
    }

#ifndef _LIBCPP_HAS_NO_RTTI
    virtual const void* target(type_info const& __ti) const _NOEXCEPT {
        if (__ti == typeid(__func::__block_type))
            return &__f_;
        return (const void*)nullptr;
    }

    virtual const std::type_info& target_type() const _NOEXCEPT {
        return typeid(__func::__block_type);
    }
#endif // _LIBCPP_HAS_NO_RTTI
# 969 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
};

#endif // _LIBCPP_HAS_EXTENSION_BLOCKS
# 972 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

} // namespace __function

template<class _Rp, class ..._ArgTypes>
class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
    : public __function::__maybe_derive_from_unary_function<_Rp(_ArgTypes...)>,
      public __function::__maybe_derive_from_binary_function<_Rp(_ArgTypes...)>
{
#ifndef _LIBCPP_ABI_OPTIMIZED_FUNCTION
    typedef __function::__value_func<_Rp(_ArgTypes...)> __func;
#else
# 983 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
    typedef __function::__policy_func<_Rp(_ArgTypes...)> __func;
#endif
# 985 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

    __func __f_;

    template <class _Fp, bool = _And<
        _IsNotSame<__remove_cvref_t<_Fp>, function>,
        __invokable<_Fp, _ArgTypes...>
    >::value>
    struct __callable;
    template <class _Fp>
        struct __callable<_Fp, true>
        {
            static const bool value = is_void<_Rp>::value ||
                __is_core_convertible<typename __invoke_of<_Fp, _ArgTypes...>::type,
                                      _Rp>::value;
        };
    template <class _Fp>
        struct __callable<_Fp, false>
        {
            static const bool value = false;
        };

  template <class _Fp>
  using _EnableIfLValueCallable = __enable_if_t<__callable<_Fp&>::value>;
public:
    typedef _Rp result_type;

    // construct/copy/destroy:
    _LIBCPP_INLINE_VISIBILITY
    function() _NOEXCEPT { }
    _LIBCPP_INLINE_VISIBILITY
    _LIBCPP_HIDE_FROM_ABI function(nullptr_t) _NOEXCEPT {}
    _LIBCPP_HIDE_FROM_ABI function(const function&);
    _LIBCPP_HIDE_FROM_ABI function(function&&) _NOEXCEPT;
    template<class _Fp, class = _EnableIfLValueCallable<_Fp>>
    _LIBCPP_HIDE_FROM_ABI function(_Fp);

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1022 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
    template<class _Alloc>
      _LIBCPP_INLINE_VISIBILITY
      function(allocator_arg_t, const _Alloc&) _NOEXCEPT {}
    template<class _Alloc>
      _LIBCPP_INLINE_VISIBILITY
      function(allocator_arg_t, const _Alloc&, nullptr_t) _NOEXCEPT {}
    template<class _Alloc>
    _LIBCPP_HIDE_FROM_ABI function(allocator_arg_t, const _Alloc&, const function&);
    template<class _Alloc>
    _LIBCPP_HIDE_FROM_ABI function(allocator_arg_t, const _Alloc&, function&&);
    template<class _Fp, class _Alloc, class = _EnableIfLValueCallable<_Fp>>
    _LIBCPP_HIDE_FROM_ABI function(allocator_arg_t, const _Alloc& __a, _Fp __f);
#endif
# 1035 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

    _LIBCPP_HIDE_FROM_ABI function& operator=(const function&);
    _LIBCPP_HIDE_FROM_ABI function& operator=(function&&) _NOEXCEPT;
    _LIBCPP_HIDE_FROM_ABI function& operator=(nullptr_t) _NOEXCEPT;
    template<class _Fp, class = _EnableIfLValueCallable<__decay_t<_Fp>>>
    _LIBCPP_HIDE_FROM_ABI function& operator=(_Fp&&);

    _LIBCPP_HIDE_FROM_ABI ~function();

    // function modifiers:
    _LIBCPP_HIDE_FROM_ABI void swap(function&) _NOEXCEPT;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1048 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
    template<class _Fp, class _Alloc>
      _LIBCPP_INLINE_VISIBILITY
      void assign(_Fp&& __f, const _Alloc& __a)
        {function(allocator_arg, __a, _VSTD::forward<_Fp>(__f)).swap(*this);}
#endif
# 1053 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

    // function capacity:
    _LIBCPP_INLINE_VISIBILITY
    explicit operator bool() const _NOEXCEPT {
      return static_cast<bool>(__f_);
    }

    // deleted overloads close possible hole in the type system
    template<class _R2, class... _ArgTypes2>
      bool operator==(const function<_R2(_ArgTypes2...)>&) const = delete;
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1064 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
    template<class _R2, class... _ArgTypes2>
      bool operator!=(const function<_R2(_ArgTypes2...)>&) const = delete;
#endif
# 1067 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
public:
    // function invocation:
    _LIBCPP_HIDE_FROM_ABI _Rp operator()(_ArgTypes...) const;

#ifndef _LIBCPP_HAS_NO_RTTI
    // function target access:
    _LIBCPP_HIDE_FROM_ABI const std::type_info& target_type() const _NOEXCEPT;
    template <typename _Tp>
    _LIBCPP_HIDE_FROM_ABI _Tp* target() _NOEXCEPT;
    template <typename _Tp>
    _LIBCPP_HIDE_FROM_ABI const _Tp* target() const _NOEXCEPT;
#endif // _LIBCPP_HAS_NO_RTTI
# 1079 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1082 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
template<class _Rp, class ..._Ap>
function(_Rp(*)(_Ap...)) -> function<_Rp(_Ap...)>;

template<class _Fp, class _Stripped = typename __strip_signature<decltype(&_Fp::operator())>::type>
function(_Fp) -> function<_Stripped>;
#endif // _LIBCPP_STD_VER >= 17
# 1088 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

template<class _Rp, class ..._ArgTypes>
function<_Rp(_ArgTypes...)>::function(const function& __f) : __f_(__f.__f_) {}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1093 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
template<class _Rp, class ..._ArgTypes>
template <class _Alloc>
function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&,
                                     const function& __f) : __f_(__f.__f_) {}
#endif
# 1098 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

template <class _Rp, class... _ArgTypes>
function<_Rp(_ArgTypes...)>::function(function&& __f) _NOEXCEPT
    : __f_(_VSTD::move(__f.__f_)) {}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1104 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
template<class _Rp, class ..._ArgTypes>
template <class _Alloc>
function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&,
                                      function&& __f)
    : __f_(_VSTD::move(__f.__f_)) {}
#endif
# 1110 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

template <class _Rp, class... _ArgTypes>
template <class _Fp, class>
function<_Rp(_ArgTypes...)>::function(_Fp __f) : __f_(_VSTD::move(__f)) {}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1116 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
template <class _Rp, class... _ArgTypes>
template <class _Fp, class _Alloc, class>
function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc& __a,
                                      _Fp __f)
    : __f_(_VSTD::move(__f), __a) {}
#endif
# 1122 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

template<class _Rp, class ..._ArgTypes>
function<_Rp(_ArgTypes...)>&
function<_Rp(_ArgTypes...)>::operator=(const function& __f)
{
    function(__f).swap(*this);
    return *this;
}

template<class _Rp, class ..._ArgTypes>
function<_Rp(_ArgTypes...)>&
function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT
{
    __f_ = _VSTD::move(__f.__f_);
    return *this;
}

template<class _Rp, class ..._ArgTypes>
function<_Rp(_ArgTypes...)>&
function<_Rp(_ArgTypes...)>::operator=(nullptr_t) _NOEXCEPT
{
    __f_ = nullptr;
    return *this;
}

template<class _Rp, class ..._ArgTypes>
template <class _Fp, class>
function<_Rp(_ArgTypes...)>&
function<_Rp(_ArgTypes...)>::operator=(_Fp&& __f)
{
    function(_VSTD::forward<_Fp>(__f)).swap(*this);
    return *this;
}

template<class _Rp, class ..._ArgTypes>
function<_Rp(_ArgTypes...)>::~function() {}

template<class _Rp, class ..._ArgTypes>
void
function<_Rp(_ArgTypes...)>::swap(function& __f) _NOEXCEPT
{
    __f_.swap(__f.__f_);
}

template<class _Rp, class ..._ArgTypes>
_Rp
function<_Rp(_ArgTypes...)>::operator()(_ArgTypes... __arg) const
{
    return __f_(_VSTD::forward<_ArgTypes>(__arg)...);
}

#ifndef _LIBCPP_HAS_NO_RTTI

template<class _Rp, class ..._ArgTypes>
const std::type_info&
function<_Rp(_ArgTypes...)>::target_type() const _NOEXCEPT
{
    return __f_.target_type();
}

template<class _Rp, class ..._ArgTypes>
template <typename _Tp>
_Tp*
function<_Rp(_ArgTypes...)>::target() _NOEXCEPT
{
    return (_Tp*)(__f_.template target<_Tp>());
}

template<class _Rp, class ..._ArgTypes>
template <typename _Tp>
const _Tp*
function<_Rp(_ArgTypes...)>::target() const _NOEXCEPT
{
    return __f_.template target<_Tp>();
}

#endif // _LIBCPP_HAS_NO_RTTI
# 1199 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

template <class _Rp, class... _ArgTypes>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NOEXCEPT {return !__f;}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1206 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

template <class _Rp, class... _ArgTypes>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NOEXCEPT {return !__f;}

template <class _Rp, class... _ArgTypes>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NOEXCEPT {return (bool)__f;}

template <class _Rp, class... _ArgTypes>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NOEXCEPT {return (bool)__f;}

#endif // _LIBCPP_STD_VER <= 17
# 1223 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

template <class _Rp, class... _ArgTypes>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(function<_Rp(_ArgTypes...)>& __x, function<_Rp(_ArgTypes...)>& __y) _NOEXCEPT
{return __x.swap(__y);}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_CXX03_LANG
# 1233 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3

#endif // _LIBCPP___FUNCTIONAL_FUNCTION_H
# 1235 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/function.h" 3
#endif /* function.h expanded by -frewrite-includes */
# 530 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/hash.h>
#endif /* expanded by -frewrite-includes */
# 530 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 531 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/identity.h>
#endif /* expanded by -frewrite-includes */
# 531 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 532 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 532 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 533 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* mem_fn.h expanded by -frewrite-includes */
#include <__functional/mem_fn.h> // TODO: deprecate
#else /* mem_fn.h expanded by -frewrite-includes */
# 533 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fn.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_MEM_FN_H
#define _LIBCPP___FUNCTIONAL_MEM_FN_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fn.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fn.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/binary_function.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fn.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fn.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fn.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fn.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/weak_result_type.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fn.h" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fn.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fn.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fn.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fn.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fn.h" 3
#endif
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fn.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp>
class __mem_fn : public __weak_result_type<_Tp>
{
public:
    // types
    typedef _Tp type;
private:
    type __f_;

public:
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
    __mem_fn(type __f) _NOEXCEPT : __f_(__f) {}

    // invoke
    template <class... _ArgTypes>
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20

    typename __invoke_return<type, _ArgTypes...>::type
    operator() (_ArgTypes&&... __args) const {
        return std::__invoke(__f_, std::forward<_ArgTypes>(__args)...);
    }
};

template<class _Rp, class _Tp>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
__mem_fn<_Rp _Tp::*>
mem_fn(_Rp _Tp::* __pm) _NOEXCEPT
{
    return __mem_fn<_Rp _Tp::*>(__pm);
}

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_MEM_FN_H
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fn.h" 3
#endif /* mem_fn.h expanded by -frewrite-includes */
# 534 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* mem_fun_ref.h expanded by -frewrite-includes */
#include <__functional/mem_fun_ref.h>
#else /* mem_fun_ref.h expanded by -frewrite-includes */
# 534 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fun_ref.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_MEM_FUN_REF_H
#define _LIBCPP___FUNCTIONAL_MEM_FUN_REF_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fun_ref.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fun_ref.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/binary_function.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fun_ref.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fun_ref.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fun_ref.h" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fun_ref.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fun_ref.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fun_ref.h" 3
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fun_ref.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fun_ref.h" 3

template<class _Sp, class _Tp>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_t
    : public __unary_function<_Tp*, _Sp>
{
    _Sp (_Tp::*__p_)();
public:
    _LIBCPP_INLINE_VISIBILITY explicit mem_fun_t(_Sp (_Tp::*__p)())
        : __p_(__p) {}
    _LIBCPP_INLINE_VISIBILITY _Sp operator()(_Tp* __p) const
        {return (__p->*__p_)();}
};

template<class _Sp, class _Tp, class _Ap>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_t
    : public __binary_function<_Tp*, _Ap, _Sp>
{
    _Sp (_Tp::*__p_)(_Ap);
public:
    _LIBCPP_INLINE_VISIBILITY explicit mem_fun1_t(_Sp (_Tp::*__p)(_Ap))
        : __p_(__p) {}
    _LIBCPP_INLINE_VISIBILITY _Sp operator()(_Tp* __p, _Ap __x) const
        {return (__p->*__p_)(__x);}
};

template<class _Sp, class _Tp>
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
mem_fun_t<_Sp,_Tp>
mem_fun(_Sp (_Tp::*__f)())
    {return mem_fun_t<_Sp,_Tp>(__f);}

template<class _Sp, class _Tp, class _Ap>
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
mem_fun1_t<_Sp,_Tp,_Ap>
mem_fun(_Sp (_Tp::*__f)(_Ap))
    {return mem_fun1_t<_Sp,_Tp,_Ap>(__f);}

template<class _Sp, class _Tp>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_ref_t
    : public __unary_function<_Tp, _Sp>
{
    _Sp (_Tp::*__p_)();
public:
    _LIBCPP_INLINE_VISIBILITY explicit mem_fun_ref_t(_Sp (_Tp::*__p)())
        : __p_(__p) {}
    _LIBCPP_INLINE_VISIBILITY _Sp operator()(_Tp& __p) const
        {return (__p.*__p_)();}
};

template<class _Sp, class _Tp, class _Ap>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_ref_t
    : public __binary_function<_Tp, _Ap, _Sp>
{
    _Sp (_Tp::*__p_)(_Ap);
public:
    _LIBCPP_INLINE_VISIBILITY explicit mem_fun1_ref_t(_Sp (_Tp::*__p)(_Ap))
        : __p_(__p) {}
    _LIBCPP_INLINE_VISIBILITY _Sp operator()(_Tp& __p, _Ap __x) const
        {return (__p.*__p_)(__x);}
};

template<class _Sp, class _Tp>
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
mem_fun_ref_t<_Sp,_Tp>
mem_fun_ref(_Sp (_Tp::*__f)())
    {return mem_fun_ref_t<_Sp,_Tp>(__f);}

template<class _Sp, class _Tp, class _Ap>
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
mem_fun1_ref_t<_Sp,_Tp,_Ap>
mem_fun_ref(_Sp (_Tp::*__f)(_Ap))
    {return mem_fun1_ref_t<_Sp,_Tp,_Ap>(__f);}

template <class _Sp, class _Tp>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_t
    : public __unary_function<const _Tp*, _Sp>
{
    _Sp (_Tp::*__p_)() const;
public:
    _LIBCPP_INLINE_VISIBILITY explicit const_mem_fun_t(_Sp (_Tp::*__p)() const)
        : __p_(__p) {}
    _LIBCPP_INLINE_VISIBILITY _Sp operator()(const _Tp* __p) const
        {return (__p->*__p_)();}
};

template <class _Sp, class _Tp, class _Ap>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_t
    : public __binary_function<const _Tp*, _Ap, _Sp>
{
    _Sp (_Tp::*__p_)(_Ap) const;
public:
    _LIBCPP_INLINE_VISIBILITY explicit const_mem_fun1_t(_Sp (_Tp::*__p)(_Ap) const)
        : __p_(__p) {}
    _LIBCPP_INLINE_VISIBILITY _Sp operator()(const _Tp* __p, _Ap __x) const
        {return (__p->*__p_)(__x);}
};

template <class _Sp, class _Tp>
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
const_mem_fun_t<_Sp,_Tp>
mem_fun(_Sp (_Tp::*__f)() const)
    {return const_mem_fun_t<_Sp,_Tp>(__f);}

template <class _Sp, class _Tp, class _Ap>
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
const_mem_fun1_t<_Sp,_Tp,_Ap>
mem_fun(_Sp (_Tp::*__f)(_Ap) const)
    {return const_mem_fun1_t<_Sp,_Tp,_Ap>(__f);}

template <class _Sp, class _Tp>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_ref_t
    : public __unary_function<_Tp, _Sp>
{
    _Sp (_Tp::*__p_)() const;
public:
    _LIBCPP_INLINE_VISIBILITY explicit const_mem_fun_ref_t(_Sp (_Tp::*__p)() const)
        : __p_(__p) {}
    _LIBCPP_INLINE_VISIBILITY _Sp operator()(const _Tp& __p) const
        {return (__p.*__p_)();}
};

template <class _Sp, class _Tp, class _Ap>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_ref_t
    : public __binary_function<_Tp, _Ap, _Sp>
{
    _Sp (_Tp::*__p_)(_Ap) const;
public:
    _LIBCPP_INLINE_VISIBILITY explicit const_mem_fun1_ref_t(_Sp (_Tp::*__p)(_Ap) const)
        : __p_(__p) {}
    _LIBCPP_INLINE_VISIBILITY _Sp operator()(const _Tp& __p, _Ap __x) const
        {return (__p.*__p_)(__x);}
};

template <class _Sp, class _Tp>
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
const_mem_fun_ref_t<_Sp,_Tp>
mem_fun_ref(_Sp (_Tp::*__f)() const)
    {return const_mem_fun_ref_t<_Sp,_Tp>(__f);}

template <class _Sp, class _Tp, class _Ap>
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
const_mem_fun1_ref_t<_Sp,_Tp,_Ap>
mem_fun_ref(_Sp (_Tp::*__f)(_Ap) const)
    {return const_mem_fun1_ref_t<_Sp,_Tp,_Ap>(__f);}

#endif // _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
# 170 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fun_ref.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_MEM_FUN_REF_H
# 174 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/mem_fun_ref.h" 3
#endif /* mem_fun_ref.h expanded by -frewrite-includes */
# 535 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/not_fn.h>
#endif /* expanded by -frewrite-includes */
# 535 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 536 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 536 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 537 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pointer_to_binary_function.h expanded by -frewrite-includes */
#include <__functional/pointer_to_binary_function.h>
#else /* pointer_to_binary_function.h expanded by -frewrite-includes */
# 537 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_binary_function.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_POINTER_TO_BINARY_FUNCTION_H
#define _LIBCPP___FUNCTIONAL_POINTER_TO_BINARY_FUNCTION_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_binary_function.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_binary_function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/binary_function.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_binary_function.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_binary_function.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_binary_function.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_binary_function.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_binary_function.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_binary_function.h" 3

template <class _Arg1, class _Arg2, class _Result>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_binary_function
    : public __binary_function<_Arg1, _Arg2, _Result>
{
    _Result (*__f_)(_Arg1, _Arg2);
public:
    _LIBCPP_INLINE_VISIBILITY explicit pointer_to_binary_function(_Result (*__f)(_Arg1, _Arg2))
        : __f_(__f) {}
    _LIBCPP_INLINE_VISIBILITY _Result operator()(_Arg1 __x, _Arg2 __y) const
        {return __f_(__x, __y);}
};

template <class _Arg1, class _Arg2, class _Result>
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
pointer_to_binary_function<_Arg1,_Arg2,_Result>
ptr_fun(_Result (*__f)(_Arg1,_Arg2))
    {return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__f);}

#endif
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_binary_function.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_POINTER_TO_BINARY_FUNCTION_H
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_binary_function.h" 3
#endif /* pointer_to_binary_function.h expanded by -frewrite-includes */
# 538 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 2 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* pointer_to_unary_function.h expanded by -frewrite-includes */
#include <__functional/pointer_to_unary_function.h>
#else /* pointer_to_unary_function.h expanded by -frewrite-includes */
# 538 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_unary_function.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_POINTER_TO_UNARY_FUNCTION_H
#define _LIBCPP___FUNCTIONAL_POINTER_TO_UNARY_FUNCTION_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_unary_function.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_unary_function.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_unary_function.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_unary_function.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_unary_function.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_unary_function.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_unary_function.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_unary_function.h" 3

template <class _Arg, class _Result>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_unary_function
    : public __unary_function<_Arg, _Result>
{
    _Result (*__f_)(_Arg);
public:
    _LIBCPP_INLINE_VISIBILITY explicit pointer_to_unary_function(_Result (*__f)(_Arg))
        : __f_(__f) {}
    _LIBCPP_INLINE_VISIBILITY _Result operator()(_Arg __x) const
        {return __f_(__x);}
};

template <class _Arg, class _Result>
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
pointer_to_unary_function<_Arg,_Result>
ptr_fun(_Result (*__f)(_Arg))
    {return pointer_to_unary_function<_Arg,_Result>(__f);}

#endif // _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_unary_function.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_POINTER_TO_UNARY_FUNCTION_H
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/pointer_to_unary_function.h" 3
#endif /* pointer_to_unary_function.h expanded by -frewrite-includes */
# 539 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/ranges_operations.h>
#endif /* expanded by -frewrite-includes */
# 539 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 540 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/reference_wrapper.h>
#endif /* expanded by -frewrite-includes */
# 540 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 541 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 541 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 542 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* unary_negate.h expanded by -frewrite-includes */
#include <__functional/unary_negate.h>
#else /* unary_negate.h expanded by -frewrite-includes */
# 542 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_negate.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___FUNCTIONAL_UNARY_NEGATE_H
#define _LIBCPP___FUNCTIONAL_UNARY_NEGATE_H

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_negate.h" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_negate.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/unary_function.h>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_negate.h" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_negate.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_negate.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_negate.h" 3
#endif
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_negate.h" 3

_LIBCPP_BEGIN_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_negate.h" 3

template <class _Predicate>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 unary_negate
    : public __unary_function<typename _Predicate::argument_type, bool>
{
    _Predicate __pred_;
public:
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    explicit unary_negate(const _Predicate& __pred)
        : __pred_(__pred) {}
    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
    bool operator()(const typename _Predicate::argument_type& __x) const
        {return !__pred_(__x);}
};

template <class _Predicate>
_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
unary_negate<_Predicate>
not1(const _Predicate& __pred) {return unary_negate<_Predicate>(__pred);}

#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS)
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_negate.h" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___FUNCTIONAL_UNARY_NEGATE_H
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__functional/unary_negate.h" 3
#endif /* unary_negate.h expanded by -frewrite-includes */
# 543 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/unwrap_ref.h>
#endif /* expanded by -frewrite-includes */
# 543 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 544 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 544 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 545 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <memory> // TODO: find out why removing this breaks the modules build
#endif /* expanded by -frewrite-includes */
# 545 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 546 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 546 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 547 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 547 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 548 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 550 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 551 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#endif
# 552 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 554 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <atomic>
#endif /* expanded by -frewrite-includes */
# 554 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 555 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 555 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 556 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 556 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 557 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <exception>
#endif /* expanded by -frewrite-includes */
# 557 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 558 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <tuple>
#endif /* expanded by -frewrite-includes */
# 558 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 559 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 559 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 560 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#if 0 /* expanded by -frewrite-includes */
#  include <utility>
#endif /* expanded by -frewrite-includes */
# 560 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
# 561 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#endif
# 562 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3

#endif // _LIBCPP_FUNCTIONAL
# 564 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/functional" 3
#endif /* functional expanded by -frewrite-includes */
# 105 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <memory>
#endif /* expanded by -frewrite-includes */
# 105 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
# 106 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
#if 0 /* expanded by -frewrite-includes */
#include <ostream>  // NOLINT
#endif /* expanded by -frewrite-includes */
# 106 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
# 107 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
#if 0 /* expanded by -frewrite-includes */
#include <sstream>
#endif /* expanded by -frewrite-includes */
# 107 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
# 108 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
#if 0 /* expanded by -frewrite-includes */
#include <string>
#endif /* expanded by -frewrite-includes */
# 108 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
# 109 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 109 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
# 110 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 110 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
# 111 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
#if 0 /* expanded by -frewrite-includes */
#include <utility>
#endif /* expanded by -frewrite-includes */
# 111 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
# 112 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
#if 0 /* expanded by -frewrite-includes */
#include <vector>
#endif /* expanded by -frewrite-includes */
# 112 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
# 113 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-internal.h expanded by -frewrite-includes */
#include "gtest/internal/gtest-internal.h"
#else /* gtest-internal.h expanded by -frewrite-includes */
# 114 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h" 1
// Copyright 2005, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// The Google C++ Testing and Mocking Framework (Google Test)
//
// This header file declares functions and macros used internally by
// Google Test.  They are subject to change without notice.

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_

#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-port.h"
#endif /* expanded by -frewrite-includes */
# 42 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 43 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_LINUX
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 45 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#if 0 /* expanded by -frewrite-includes */
#include <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 45 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 46 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#if 0 /* expanded by -frewrite-includes */
#include <sys/types.h>
#endif /* expanded by -frewrite-includes */
# 46 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 47 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#if 0 /* expanded by -frewrite-includes */
#include <sys/wait.h>
#endif /* expanded by -frewrite-includes */
# 47 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 48 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#if 0 /* expanded by -frewrite-includes */
#include <unistd.h>
#endif /* expanded by -frewrite-includes */
# 48 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 49 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#endif  // GTEST_OS_LINUX
# 50 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_EXCEPTIONS
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 52 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#if 0 /* expanded by -frewrite-includes */
#include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 52 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 53 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#endif
# 54 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

#if 0 /* expanded by -frewrite-includes */
#include <ctype.h>
#endif /* expanded by -frewrite-includes */
# 55 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 56 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* float.h expanded by -frewrite-includes */
#include <float.h>
#else /* float.h expanded by -frewrite-includes */
# 56 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/float.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_FLOAT_H
#define _LIBCPP_FLOAT_H

/*
    float.h synopsis

Macros:

    FLT_ROUNDS
    FLT_EVAL_METHOD     // C99
    FLT_RADIX

    FLT_MANT_DIG
    DBL_MANT_DIG
    LDBL_MANT_DIG

    FLT_HAS_SUBNORM     // C11
    DBL_HAS_SUBNORM     // C11
    LDBL_HAS_SUBNORM    // C11

    DECIMAL_DIG         // C99
    FLT_DECIMAL_DIG     // C11
    DBL_DECIMAL_DIG     // C11
    LDBL_DECIMAL_DIG    // C11

    FLT_DIG
    DBL_DIG
    LDBL_DIG

    FLT_MIN_EXP
    DBL_MIN_EXP
    LDBL_MIN_EXP

    FLT_MIN_10_EXP
    DBL_MIN_10_EXP
    LDBL_MIN_10_EXP

    FLT_MAX_EXP
    DBL_MAX_EXP
    LDBL_MAX_EXP

    FLT_MAX_10_EXP
    DBL_MAX_10_EXP
    LDBL_MAX_10_EXP

    FLT_MAX
    DBL_MAX
    LDBL_MAX

    FLT_EPSILON
    DBL_EPSILON
    LDBL_EPSILON

    FLT_MIN
    DBL_MIN
    LDBL_MIN

    FLT_TRUE_MIN        // C11
    DBL_TRUE_MIN        // C11
    LDBL_TRUE_MIN       // C11

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 73 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/float.h" 3
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/float.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/float.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 77 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/float.h" 3
#endif
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/float.h" 3

#if 0 /* disabled by -frewrite-includes */
#if __has_include_next(<float.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/float.h" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* float.h expanded by -frewrite-includes */
#  include_next <float.h>
#else /* float.h expanded by -frewrite-includes */
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/float.h" 3
# 1 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 1 3
/*===---- float.h - Characteristics of floating point types ----------------===
 *
 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 * See https://llvm.org/LICENSE.txt for license information.
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 *
 *===-----------------------------------------------------------------------===
 */

#ifndef __CLANG_FLOAT_H
#define __CLANG_FLOAT_H

/* If we're on MinGW, fall back to the system's float.h, which might have
 * additional definitions provided for Windows.
 * For more details see http://msdn.microsoft.com/en-us/library/y0ybw9fy.aspx
 *
 * Also fall back on Darwin and AIX to allow additional definitions and
 * implementation-defined values.
 */
#if 0 /* disabled by -frewrite-includes */
#if (defined(__APPLE__) || defined(__MINGW32__) || defined(_MSC_VER) ||        \
     defined(_AIX)) &&                                                         \
    __STDC_HOSTED__ && __has_include_next(<float.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3

/* Prior to Apple's 10.7 SDK, float.h SDK header used to apply an extra level
 * of #include_next<float.h> to keep Metrowerks compilers happy. Avoid this
 * extra indirection.
 */
#ifdef __APPLE__
#define _FLOAT_H_
#endif
# 31 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3

#if 0 /* expanded by -frewrite-includes */
#  include_next <float.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3
# 33 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3

/* Undefine anything that we'll be redefining below. */
#  undef FLT_EVAL_METHOD
#  undef FLT_ROUNDS
#  undef FLT_RADIX
#  undef FLT_MANT_DIG
#  undef DBL_MANT_DIG
#  undef LDBL_MANT_DIG
#if 0 /* disabled by -frewrite-includes */
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) ||              \
    !defined(__STRICT_ANSI__) ||                                               \
    (defined(__cplusplus) && __cplusplus >= 201103L) ||                        \
    (__STDC_HOSTED__ && defined(_AIX) && defined(_ALL_SOURCE))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3
#    undef DECIMAL_DIG
#  endif
# 47 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3
#  undef FLT_DIG
#  undef DBL_DIG
#  undef LDBL_DIG
#  undef FLT_MIN_EXP
#  undef DBL_MIN_EXP
#  undef LDBL_MIN_EXP
#  undef FLT_MIN_10_EXP
#  undef DBL_MIN_10_EXP
#  undef LDBL_MIN_10_EXP
#  undef FLT_MAX_EXP
#  undef DBL_MAX_EXP
#  undef LDBL_MAX_EXP
#  undef FLT_MAX_10_EXP
#  undef DBL_MAX_10_EXP
#  undef LDBL_MAX_10_EXP
#  undef FLT_MAX
#  undef DBL_MAX
#  undef LDBL_MAX
#  undef FLT_EPSILON
#  undef DBL_EPSILON
#  undef LDBL_EPSILON
#  undef FLT_MIN
#  undef DBL_MIN
#  undef LDBL_MIN
#if 0 /* disabled by -frewrite-includes */
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) ||              \
    !defined(__STRICT_ANSI__) ||                                               \
    (defined(__cplusplus) && __cplusplus >= 201703L) ||                        \
    (__STDC_HOSTED__ && defined(_AIX) && defined(_ALL_SOURCE))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 75 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3
#    undef FLT_TRUE_MIN
#    undef DBL_TRUE_MIN
#    undef LDBL_TRUE_MIN
#    undef FLT_DECIMAL_DIG
#    undef DBL_DECIMAL_DIG
#    undef LDBL_DECIMAL_DIG
#    undef FLT_HAS_SUBNORM
#    undef DBL_HAS_SUBNORM
#    undef LDBL_HAS_SUBNORM
#  endif
# 85 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3
#endif
# 86 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3

/* Characteristics of floating point types, C99 5.2.4.2.2 */

#if 0 /* disabled by -frewrite-includes */
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) ||              \
    (defined(__cplusplus) && __cplusplus >= 201103L)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 91 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
#endif
# 93 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3
#define FLT_ROUNDS (__builtin_flt_rounds())
#define FLT_RADIX __FLT_RADIX__

#define FLT_MANT_DIG __FLT_MANT_DIG__
#define DBL_MANT_DIG __DBL_MANT_DIG__
#define LDBL_MANT_DIG __LDBL_MANT_DIG__

#if 0 /* disabled by -frewrite-includes */
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) ||              \
    !defined(__STRICT_ANSI__) ||                                               \
    (defined(__cplusplus) && __cplusplus >= 201103L) ||                        \
    (__STDC_HOSTED__ && defined(_AIX) && defined(_ALL_SOURCE))
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 104 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3
#  define DECIMAL_DIG __DECIMAL_DIG__
#endif
# 106 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3

#define FLT_DIG __FLT_DIG__
#define DBL_DIG __DBL_DIG__
#define LDBL_DIG __LDBL_DIG__

#define FLT_MIN_EXP __FLT_MIN_EXP__
#define DBL_MIN_EXP __DBL_MIN_EXP__
#define LDBL_MIN_EXP __LDBL_MIN_EXP__

#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__
#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__
#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__

#define FLT_MAX_EXP __FLT_MAX_EXP__
#define DBL_MAX_EXP __DBL_MAX_EXP__
#define LDBL_MAX_EXP __LDBL_MAX_EXP__

#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__
#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__
#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__

#define FLT_MAX __FLT_MAX__
#define DBL_MAX __DBL_MAX__
#define LDBL_MAX __LDBL_MAX__

#define FLT_EPSILON __FLT_EPSILON__
#define DBL_EPSILON __DBL_EPSILON__
#define LDBL_EPSILON __LDBL_EPSILON__

#define FLT_MIN __FLT_MIN__
#define DBL_MIN __DBL_MIN__
#define LDBL_MIN __LDBL_MIN__

#if 0 /* disabled by -frewrite-includes */
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) ||              \
    !defined(__STRICT_ANSI__) ||                                               \
    (defined(__cplusplus) && __cplusplus >= 201703L) ||                        \
    (__STDC_HOSTED__ && defined(_AIX) && defined(_ALL_SOURCE))
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 143 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3
#  define FLT_TRUE_MIN __FLT_DENORM_MIN__
#  define DBL_TRUE_MIN __DBL_DENORM_MIN__
#  define LDBL_TRUE_MIN __LDBL_DENORM_MIN__
#  define FLT_DECIMAL_DIG __FLT_DECIMAL_DIG__
#  define DBL_DECIMAL_DIG __DBL_DECIMAL_DIG__
#  define LDBL_DECIMAL_DIG __LDBL_DECIMAL_DIG__
#  define FLT_HAS_SUBNORM __FLT_HAS_DENORM__
#  define DBL_HAS_SUBNORM __DBL_HAS_DENORM__
#  define LDBL_HAS_SUBNORM __LDBL_HAS_DENORM__
#endif
# 153 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3

#ifdef __STDC_WANT_IEC_60559_TYPES_EXT__
#  define FLT16_MANT_DIG    __FLT16_MANT_DIG__
#  define FLT16_DECIMAL_DIG __FLT16_DECIMAL_DIG__
#  define FLT16_DIG         __FLT16_DIG__
#  define FLT16_MIN_EXP     __FLT16_MIN_EXP__
#  define FLT16_MIN_10_EXP  __FLT16_MIN_10_EXP__
#  define FLT16_MAX_EXP     __FLT16_MAX_EXP__
#  define FLT16_MAX_10_EXP  __FLT16_MAX_10_EXP__
#  define FLT16_MAX         __FLT16_MAX__
#  define FLT16_EPSILON     __FLT16_EPSILON__
#  define FLT16_MIN         __FLT16_MIN__
#  define FLT16_TRUE_MIN    __FLT16_TRUE_MIN__
#endif /* __STDC_WANT_IEC_60559_TYPES_EXT__ */
# 167 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3

#endif /* __CLANG_FLOAT_H */
# 169 "../../prebuilt/third_party/clang/custom/lib/clang/18/include/float.h" 3
#endif /* float.h expanded by -frewrite-includes */
# 81 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/float.h" 2 3
#endif
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/float.h" 3

#ifdef __cplusplus

#ifndef FLT_EVAL_METHOD
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
#endif
# 88 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/float.h" 3

#ifndef DECIMAL_DIG
#define DECIMAL_DIG __DECIMAL_DIG__
#endif
# 92 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/float.h" 3

#endif // __cplusplus
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/float.h" 3

#endif // _LIBCPP_FLOAT_H
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/float.h" 3
#endif /* float.h expanded by -frewrite-includes */
# 57 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <string.h>
#endif /* expanded by -frewrite-includes */
# 57 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 58 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 59 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 60 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#if 0 /* expanded by -frewrite-includes */
#include <functional>
#endif /* expanded by -frewrite-includes */
# 60 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 61 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* iomanip expanded by -frewrite-includes */
#include <iomanip>
#else /* iomanip expanded by -frewrite-includes */
# 61 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_IOMANIP
#define _LIBCPP_IOMANIP

/*
    iomanip synopsis

namespace std {

// types T1, T2, ... are unspecified implementation types
T1 resetiosflags(ios_base::fmtflags mask);
T2 setiosflags (ios_base::fmtflags mask);
T3 setbase(int base);
template<charT> T4 setfill(charT c);
T5 setprecision(int n);
T6 setw(int n);
template <class moneyT> T7 get_money(moneyT& mon, bool intl = false);
template <class charT, class moneyT> T8 put_money(const moneyT& mon, bool intl = false);
template <class charT> T9 get_time(struct tm* tmb, const charT* fmt);
template <class charT> T10 put_time(const struct tm* tmb, const charT* fmt);

template <class charT>
  T11 quoted(const charT* s, charT delim=charT('"'), charT escape=charT('\\')); // C++14

template <class charT, class traits, class Allocator>
  T12 quoted(const basic_string<charT, traits, Allocator>& s,
             charT delim=charT('"'), charT escape=charT('\\')); // C++14

template <class charT, class traits, class Allocator>
  T13 quoted(basic_string<charT, traits, Allocator>& s,
             charT delim=charT('"'), charT escape=charT('\\')); // C++14

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
#if 0 /* expanded by -frewrite-includes */
#include <istream>
#endif /* expanded by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
#endif
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3

_LIBCPP_BEGIN_NAMESPACE_STD

// resetiosflags

class __iom_t1
{
    ios_base::fmtflags __mask_;
public:
    _LIBCPP_INLINE_VISIBILITY
    explicit __iom_t1(ios_base::fmtflags __m) : __mask_(__m) {}

    template <class _CharT, class _Traits>
    friend
    _LIBCPP_INLINE_VISIBILITY
    basic_istream<_CharT, _Traits>&
    operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t1& __x)
    {
        __is.unsetf(__x.__mask_);
        return __is;
    }

    template <class _CharT, class _Traits>
    friend
    _LIBCPP_INLINE_VISIBILITY
    basic_ostream<_CharT, _Traits>&
    operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t1& __x)
    {
        __os.unsetf(__x.__mask_);
        return __os;
    }
};

inline _LIBCPP_INLINE_VISIBILITY
__iom_t1
resetiosflags(ios_base::fmtflags __mask)
{
    return __iom_t1(__mask);
}

// setiosflags

class __iom_t2
{
    ios_base::fmtflags __mask_;
public:
    _LIBCPP_INLINE_VISIBILITY
    explicit __iom_t2(ios_base::fmtflags __m) : __mask_(__m) {}

    template <class _CharT, class _Traits>
    friend
    _LIBCPP_INLINE_VISIBILITY
    basic_istream<_CharT, _Traits>&
    operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t2& __x)
    {
        __is.setf(__x.__mask_);
        return __is;
    }

    template <class _CharT, class _Traits>
    friend
    _LIBCPP_INLINE_VISIBILITY
    basic_ostream<_CharT, _Traits>&
    operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t2& __x)
    {
        __os.setf(__x.__mask_);
        return __os;
    }
};

inline _LIBCPP_INLINE_VISIBILITY
__iom_t2
setiosflags(ios_base::fmtflags __mask)
{
    return __iom_t2(__mask);
}

// setbase

class __iom_t3
{
    int __base_;
public:
    _LIBCPP_INLINE_VISIBILITY
    explicit __iom_t3(int __b) : __base_(__b) {}

    template <class _CharT, class _Traits>
    friend
    _LIBCPP_INLINE_VISIBILITY
    basic_istream<_CharT, _Traits>&
    operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t3& __x)
    {
        __is.setf(__x.__base_ == 8  ? ios_base::oct :
                  __x.__base_ == 10 ? ios_base::dec :
                  __x.__base_ == 16 ? ios_base::hex :
                  ios_base::fmtflags(0), ios_base::basefield);
        return __is;
    }

    template <class _CharT, class _Traits>
    friend
    _LIBCPP_INLINE_VISIBILITY
    basic_ostream<_CharT, _Traits>&
    operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t3& __x)
    {
        __os.setf(__x.__base_ == 8  ? ios_base::oct :
                  __x.__base_ == 10 ? ios_base::dec :
                  __x.__base_ == 16 ? ios_base::hex :
                  ios_base::fmtflags(0), ios_base::basefield);
        return __os;
    }
};

inline _LIBCPP_INLINE_VISIBILITY
__iom_t3
setbase(int __base)
{
    return __iom_t3(__base);
}

// setfill

template<class _CharT>
class __iom_t4
{
    _CharT __fill_;
public:
    _LIBCPP_INLINE_VISIBILITY
    explicit __iom_t4(_CharT __c) : __fill_(__c) {}

    template <class _Traits>
    friend
    _LIBCPP_INLINE_VISIBILITY
    basic_ostream<_CharT, _Traits>&
    operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t4& __x)
    {
        __os.fill(__x.__fill_);
        return __os;
    }
};

template<class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
__iom_t4<_CharT>
setfill(_CharT __c)
{
    return __iom_t4<_CharT>(__c);
}

// setprecision

class __iom_t5
{
    int __n_;
public:
    _LIBCPP_INLINE_VISIBILITY
    explicit __iom_t5(int __n) : __n_(__n) {}

    template <class _CharT, class _Traits>
    friend
    _LIBCPP_INLINE_VISIBILITY
    basic_istream<_CharT, _Traits>&
    operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t5& __x)
    {
        __is.precision(__x.__n_);
        return __is;
    }

    template <class _CharT, class _Traits>
    friend
    _LIBCPP_INLINE_VISIBILITY
    basic_ostream<_CharT, _Traits>&
    operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t5& __x)
    {
        __os.precision(__x.__n_);
        return __os;
    }
};

inline _LIBCPP_INLINE_VISIBILITY
__iom_t5
setprecision(int __n)
{
    return __iom_t5(__n);
}

// setw

class __iom_t6
{
    int __n_;
public:
    _LIBCPP_INLINE_VISIBILITY
    explicit __iom_t6(int __n) : __n_(__n) {}

    template <class _CharT, class _Traits>
    friend
    _LIBCPP_INLINE_VISIBILITY
    basic_istream<_CharT, _Traits>&
    operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t6& __x)
    {
        __is.width(__x.__n_);
        return __is;
    }

    template <class _CharT, class _Traits>
    friend
    _LIBCPP_INLINE_VISIBILITY
    basic_ostream<_CharT, _Traits>&
    operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t6& __x)
    {
        __os.width(__x.__n_);
        return __os;
    }
};

inline _LIBCPP_INLINE_VISIBILITY
__iom_t6
setw(int __n)
{
    return __iom_t6(__n);
}

// get_money

template <class _MoneyT> class __iom_t7;

template <class _CharT, class _Traits, class _MoneyT>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_MoneyT>& __x);

template <class _MoneyT>
class __iom_t7
{
    _MoneyT& __mon_;
    bool __intl_;
public:
    _LIBCPP_INLINE_VISIBILITY
    __iom_t7(_MoneyT& __mon, bool __intl)
        : __mon_(__mon), __intl_(__intl) {}

    template <class _CharT, class _Traits, class _Mp>
    friend
    basic_istream<_CharT, _Traits>&
    operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_Mp>& __x);
};

template <class _CharT, class _Traits, class _MoneyT>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_MoneyT>& __x)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 308 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
        typename basic_istream<_CharT, _Traits>::sentry __s(__is);
        if (__s)
        {
            typedef istreambuf_iterator<_CharT, _Traits> _Ip;
            typedef money_get<_CharT, _Ip> _Fp;
            ios_base::iostate __err = ios_base::goodbit;
            const _Fp& __mf = std::use_facet<_Fp>(__is.getloc());
            __mf.get(_Ip(__is), _Ip(), __x.__intl_, __is, __err, __x.__mon_);
            __is.setstate(__err);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        __is.__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 325 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
    return __is;
}

template <class _MoneyT>
inline _LIBCPP_INLINE_VISIBILITY
__iom_t7<_MoneyT>
get_money(_MoneyT& __mon, bool __intl = false)
{
    return __iom_t7<_MoneyT>(__mon, __intl);
}

// put_money

template <class _MoneyT> class __iom_t8;

template <class _CharT, class _Traits, class _MoneyT>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x);

template <class _MoneyT>
class __iom_t8
{
    const _MoneyT& __mon_;
    bool __intl_;
public:
    _LIBCPP_INLINE_VISIBILITY
    __iom_t8(const _MoneyT& __mon, bool __intl)
        : __mon_(__mon), __intl_(__intl) {}

    template <class _CharT, class _Traits, class _Mp>
    friend
    basic_ostream<_CharT, _Traits>&
    operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_Mp>& __x);
};

template <class _CharT, class _Traits, class _MoneyT>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 368 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
        typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
        if (__s)
        {
            typedef ostreambuf_iterator<_CharT, _Traits> _Op;
            typedef money_put<_CharT, _Op> _Fp;
            const _Fp& __mf = std::use_facet<_Fp>(__os.getloc());
            if (__mf.put(_Op(__os), __x.__intl_, __os, __os.fill(), __x.__mon_).failed())
                __os.setstate(ios_base::badbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        __os.__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 384 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
    return __os;
}

template <class _MoneyT>
inline _LIBCPP_INLINE_VISIBILITY
__iom_t8<_MoneyT>
put_money(const _MoneyT& __mon, bool __intl = false)
{
    return __iom_t8<_MoneyT>(__mon, __intl);
}

// get_time

template <class _CharT> class __iom_t9;

template <class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t9<_CharT>& __x);

template <class _CharT>
class __iom_t9
{
    tm* __tm_;
    const _CharT* __fmt_;
public:
    _LIBCPP_INLINE_VISIBILITY
    __iom_t9(tm* __tm, const _CharT* __fmt)
        : __tm_(__tm), __fmt_(__fmt) {}

    template <class _Cp, class _Traits>
    friend
    basic_istream<_Cp, _Traits>&
    operator>>(basic_istream<_Cp, _Traits>& __is, const __iom_t9<_Cp>& __x);
};

template <class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t9<_CharT>& __x)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 427 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
        typename basic_istream<_CharT, _Traits>::sentry __s(__is);
        if (__s)
        {
            typedef istreambuf_iterator<_CharT, _Traits> _Ip;
            typedef time_get<_CharT, _Ip> _Fp;
            ios_base::iostate __err = ios_base::goodbit;
            const _Fp& __tf = std::use_facet<_Fp>(__is.getloc());
            __tf.get(_Ip(__is), _Ip(), __is, __err, __x.__tm_,
                     __x.__fmt_, __x.__fmt_ + _Traits::length(__x.__fmt_));
            __is.setstate(__err);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        __is.__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 445 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
    return __is;
}

template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
__iom_t9<_CharT>
get_time(tm* __tm, const _CharT* __fmt)
{
    return __iom_t9<_CharT>(__tm, __fmt);
}

// put_time

template <class _CharT> class __iom_t10;

template <class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x);

template <class _CharT>
class __iom_t10
{
    const tm* __tm_;
    const _CharT* __fmt_;
public:
    _LIBCPP_INLINE_VISIBILITY
    __iom_t10(const tm* __tm, const _CharT* __fmt)
        : __tm_(__tm), __fmt_(__fmt) {}

    template <class _Cp, class _Traits>
    friend
    basic_ostream<_Cp, _Traits>&
    operator<<(basic_ostream<_Cp, _Traits>& __os, const __iom_t10<_Cp>& __x);
};

template <class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x)
{
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    try
    {
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 488 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
        typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
        if (__s)
        {
            typedef ostreambuf_iterator<_CharT, _Traits> _Op;
            typedef time_put<_CharT, _Op> _Fp;
            const _Fp& __tf = std::use_facet<_Fp>(__os.getloc());
            if (__tf.put(_Op(__os), __os, __os.fill(), __x.__tm_,
                         __x.__fmt_, __x.__fmt_ + _Traits::length(__x.__fmt_)).failed())
                __os.setstate(ios_base::badbit);
        }
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
    }
    catch (...)
    {
        __os.__set_badbit_and_consider_rethrow();
    }
#endif // _LIBCPP_HAS_NO_EXCEPTIONS
# 505 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
    return __os;
}

template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
__iom_t10<_CharT>
put_time(const tm* __tm, const _CharT* __fmt)
{
    return __iom_t10<_CharT>(__tm, __fmt);
}

template <class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
__quoted_output(basic_ostream<_CharT, _Traits>& __os,
                const _CharT *__first, const _CharT *__last, _CharT __delim, _CharT __escape)
{
    basic_string<_CharT, _Traits> __str;
    __str.push_back(__delim);
    for (; __first != __last; ++__first) {
        if (_Traits::eq(*__first, __escape) || _Traits::eq(*__first, __delim))
            __str.push_back(__escape);
        __str.push_back(*__first);
    }
    __str.push_back(__delim);
    return _VSTD::__put_character_sequence(__os, __str.data(), __str.size());
}

template <class _CharT, class _Traits, class _String>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
__quoted_input(basic_istream<_CharT, _Traits>& __is, _String& __string, _CharT __delim, _CharT __escape)
{
    __string.clear();
    _CharT __c;
    __is >> __c;
    if (__is.fail())
        return __is;

    if (!_Traits::eq(__c, __delim)) {
        // no delimiter, read the whole string
        __is.unget();
        __is >> __string;
        return __is;
    }

    __save_flags<_CharT, _Traits> __sf(__is);
    std::noskipws(__is);
    while (true) {
        __is >> __c;
        if (__is.fail())
            break;
        if (_Traits::eq(__c, __escape)) {
            __is >> __c;
            if (__is.fail())
                break;
        } else if (_Traits::eq(__c, __delim))
            break;
        __string.push_back(__c);
    }
    return __is;
}

template <class _CharT, class _Traits>
struct _LIBCPP_HIDDEN __quoted_output_proxy
{
    const _CharT *__first_;
    const _CharT *__last_;
    _CharT __delim_;
    _CharT __escape_;

    _LIBCPP_HIDE_FROM_ABI
    explicit __quoted_output_proxy(const _CharT *__f, const _CharT *__l, _CharT __d, _CharT __e)
        : __first_(__f), __last_(__l), __delim_(__d), __escape_(__e) {}

    template<class _T2, __enable_if_t<_IsSame<_Traits, void>::value || _IsSame<_Traits, _T2>::value>* = nullptr>
    friend _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _T2>&
    operator<<(basic_ostream<_CharT, _T2>& __os, const __quoted_output_proxy& __p) {
        return std::__quoted_output(__os, __p.__first_, __p.__last_, __p.__delim_, __p.__escape_);
    }
};

template <class _CharT, class _Traits, class _Allocator>
struct _LIBCPP_HIDDEN __quoted_proxy
{
    basic_string<_CharT, _Traits, _Allocator>& __string_;
    _CharT __delim_;
    _CharT __escape_;

    _LIBCPP_HIDE_FROM_ABI
    explicit __quoted_proxy(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __d, _CharT __e)
        : __string_(__s), __delim_(__d), __escape_(__e) {}

    friend _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
    operator<<(basic_ostream<_CharT, _Traits>& __os, const __quoted_proxy& __p) {
        return std::__quoted_output(__os, __p.__string_.data(), __p.__string_.data() + __p.__string_.size(), __p.__delim_, __p.__escape_);
    }

    friend _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
    operator>>(basic_istream<_CharT, _Traits>& __is, const __quoted_proxy& __p) {
        return std::__quoted_input(__is, __p.__string_, __p.__delim_, __p.__escape_);
    }
};

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI
__quoted_output_proxy<_CharT, _Traits>
__quoted(const basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
    return __quoted_output_proxy<_CharT, _Traits>(__s.data(), __s.data() + __s.size(), __delim, __escape);
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI
__quoted_proxy<_CharT, _Traits, _Allocator>
__quoted(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
    return __quoted_proxy<_CharT, _Traits, _Allocator>(__s, __delim, __escape);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 624 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3

template <class _CharT>
_LIBCPP_HIDE_FROM_ABI
auto quoted(const _CharT *__s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
    const _CharT *__end = __s;
    while (*__end) ++__end;
    return __quoted_output_proxy<_CharT, void>(__s, __end, __delim, __escape);
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI
auto quoted(const basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
    return __quoted_output_proxy<_CharT, _Traits>(__s.data(), __s.data() + __s.size(), __delim, __escape);
}

template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI
auto quoted(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
    return __quoted_proxy<_CharT, _Traits, _Allocator>(__s, __delim, __escape);
}

template <class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI
auto quoted(basic_string_view<_CharT, _Traits> __sv, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
    return __quoted_output_proxy<_CharT, _Traits>(__sv.data(), __sv.data() + __sv.size(), __delim, __escape);
}

#endif // _LIBCPP_STD_VER >= 14
# 656 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_IOMANIP
# 660 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/iomanip" 3
#endif /* iomanip expanded by -frewrite-includes */
# 62 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 62 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 63 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* map expanded by -frewrite-includes */
#include <map>
#else /* map expanded by -frewrite-includes */
# 63 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_MAP
#define _LIBCPP_MAP

/*

    map synopsis

namespace std
{

template <class Key, class T, class Compare = less<Key>,
          class Allocator = allocator<pair<const Key, T>>>
class map
{
public:
    // types:
    typedef Key                                      key_type;
    typedef T                                        mapped_type;
    typedef pair<const key_type, mapped_type>        value_type;
    typedef Compare                                  key_compare;
    typedef Allocator                                allocator_type;
    typedef typename allocator_type::reference       reference;
    typedef typename allocator_type::const_reference const_reference;
    typedef typename allocator_type::pointer         pointer;
    typedef typename allocator_type::const_pointer   const_pointer;
    typedef typename allocator_type::size_type       size_type;
    typedef typename allocator_type::difference_type difference_type;

    typedef implementation-defined                   iterator;
    typedef implementation-defined                   const_iterator;
    typedef std::reverse_iterator<iterator>          reverse_iterator;
    typedef std::reverse_iterator<const_iterator>    const_reverse_iterator;
    typedef unspecified                              node_type;              // C++17
    typedef INSERT_RETURN_TYPE<iterator, node_type>  insert_return_type;     // C++17

    class value_compare
    {
        friend class map;
    protected:
        key_compare comp;

        value_compare(key_compare c);
    public:
        typedef bool result_type;  // deprecated in C++17, removed in C++20
        typedef value_type first_argument_type;  // deprecated in C++17, removed in C++20
        typedef value_type second_argument_type;  // deprecated in C++17, removed in C++20
        bool operator()(const value_type& x, const value_type& y) const;
    };

    // construct/copy/destroy:
    map()
        noexcept(
            is_nothrow_default_constructible<allocator_type>::value &&
            is_nothrow_default_constructible<key_compare>::value &&
            is_nothrow_copy_constructible<key_compare>::value);
    explicit map(const key_compare& comp);
    map(const key_compare& comp, const allocator_type& a);
    template <class InputIterator>
        map(InputIterator first, InputIterator last,
            const key_compare& comp = key_compare());
    template <class InputIterator>
        map(InputIterator first, InputIterator last,
            const key_compare& comp, const allocator_type& a);
    template<container-compatible-range<value_type> R>
      map(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator()); // C++23
    map(const map& m);
    map(map&& m)
        noexcept(
            is_nothrow_move_constructible<allocator_type>::value &&
            is_nothrow_move_constructible<key_compare>::value);
    explicit map(const allocator_type& a);
    map(const map& m, const allocator_type& a);
    map(map&& m, const allocator_type& a);
    map(initializer_list<value_type> il, const key_compare& comp = key_compare());
    map(initializer_list<value_type> il, const key_compare& comp, const allocator_type& a);
    template <class InputIterator>
        map(InputIterator first, InputIterator last, const allocator_type& a)
            : map(first, last, Compare(), a) {}  // C++14
    template<container-compatible-range<value_type> R>
      map(from_range_t, R&& rg, const Allocator& a))
        : map(from_range, std::forward<R>(rg), Compare(), a) { } // C++23
    map(initializer_list<value_type> il, const allocator_type& a)
        : map(il, Compare(), a) {}  // C++14
   ~map();

    map& operator=(const map& m);
    map& operator=(map&& m)
        noexcept(
            allocator_type::propagate_on_container_move_assignment::value &&
            is_nothrow_move_assignable<allocator_type>::value &&
            is_nothrow_move_assignable<key_compare>::value);
    map& operator=(initializer_list<value_type> il);

    // iterators:
          iterator begin() noexcept;
    const_iterator begin() const noexcept;
          iterator end() noexcept;
    const_iterator end()   const noexcept;

          reverse_iterator rbegin() noexcept;
    const_reverse_iterator rbegin() const noexcept;
          reverse_iterator rend() noexcept;
    const_reverse_iterator rend()   const noexcept;

    const_iterator         cbegin()  const noexcept;
    const_iterator         cend()    const noexcept;
    const_reverse_iterator crbegin() const noexcept;
    const_reverse_iterator crend()   const noexcept;

    // capacity:
    bool      empty()    const noexcept;
    size_type size()     const noexcept;
    size_type max_size() const noexcept;

    // element access:
    mapped_type& operator[](const key_type& k);
    mapped_type& operator[](key_type&& k);

          mapped_type& at(const key_type& k);
    const mapped_type& at(const key_type& k) const;

    // modifiers:
    template <class... Args>
        pair<iterator, bool> emplace(Args&&... args);
    template <class... Args>
        iterator emplace_hint(const_iterator position, Args&&... args);
    pair<iterator, bool> insert(const value_type& v);
    pair<iterator, bool> insert(      value_type&& v);                                // C++17
    template <class P>
        pair<iterator, bool> insert(P&& p);
    iterator insert(const_iterator position, const value_type& v);
    iterator insert(const_iterator position,       value_type&& v);                   // C++17
    template <class P>
        iterator insert(const_iterator position, P&& p);
    template <class InputIterator>
        void insert(InputIterator first, InputIterator last);
    template<container-compatible-range<value_type> R>
      void insert_range(R&& rg);                                                      // C++23
    void insert(initializer_list<value_type> il);

    node_type extract(const_iterator position);                                       // C++17
    node_type extract(const key_type& x);                                             // C++17
    insert_return_type insert(node_type&& nh);                                        // C++17
    iterator insert(const_iterator hint, node_type&& nh);                             // C++17

    template <class... Args>
        pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);          // C++17
    template <class... Args>
        pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);               // C++17
    template <class... Args>
        iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args); // C++17
    template <class... Args>
        iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args);      // C++17
    template <class M>
        pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);            // C++17
    template <class M>
        pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);                 // C++17
    template <class M>
        iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj);   // C++17
    template <class M>
        iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);        // C++17

    iterator  erase(const_iterator position);
    iterator  erase(iterator position); // C++14
    size_type erase(const key_type& k);
    iterator  erase(const_iterator first, const_iterator last);
    void clear() noexcept;

    template<class C2>
      void merge(map<Key, T, C2, Allocator>& source);         // C++17
    template<class C2>
      void merge(map<Key, T, C2, Allocator>&& source);        // C++17
    template<class C2>
      void merge(multimap<Key, T, C2, Allocator>& source);    // C++17
    template<class C2>
      void merge(multimap<Key, T, C2, Allocator>&& source);   // C++17

    void swap(map& m)
        noexcept(allocator_traits<allocator_type>::is_always_equal::value &&
            is_nothrow_swappable<key_compare>::value); // C++17

    // observers:
    allocator_type get_allocator() const noexcept;
    key_compare    key_comp()      const;
    value_compare  value_comp()    const;

    // map operations:
          iterator find(const key_type& k);
    const_iterator find(const key_type& k) const;
    template<typename K>
        iterator find(const K& x);              // C++14
    template<typename K>
        const_iterator find(const K& x) const;  // C++14

    template<typename K>
      size_type count(const K& x) const;        // C++14
    size_type      count(const key_type& k) const;

    bool           contains(const key_type& x) const;  // C++20
    template<class K> bool contains(const K& x) const; // C++20

          iterator lower_bound(const key_type& k);
    const_iterator lower_bound(const key_type& k) const;
    template<typename K>
        iterator lower_bound(const K& x);              // C++14
    template<typename K>
        const_iterator lower_bound(const K& x) const;  // C++14

          iterator upper_bound(const key_type& k);
    const_iterator upper_bound(const key_type& k) const;
    template<typename K>
        iterator upper_bound(const K& x);              // C++14
    template<typename K>
        const_iterator upper_bound(const K& x) const;  // C++14

    pair<iterator,iterator>             equal_range(const key_type& k);
    pair<const_iterator,const_iterator> equal_range(const key_type& k) const;
    template<typename K>
        pair<iterator,iterator>             equal_range(const K& x);        // C++14
    template<typename K>
        pair<const_iterator,const_iterator> equal_range(const K& x) const;  // C++14
};

template <class InputIterator,
      class Compare = less<iter_key_t<InputIterator>>,
      class Allocator = allocator<iter_to_alloc_t<InputIterator>>>
map(InputIterator, InputIterator, Compare = Compare(), Allocator = Allocator())
  -> map<iter_key_t<InputIterator>, iter_val_t<InputIterator>, Compare, Allocator>; // C++17

template<ranges::input_range R, class Compare = less<range-key-type<R>,
         class Allocator = allocator<range-to-alloc-type<R>>>
  map(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
    -> map<range-key-type<R>, range-mapped-type<R>, Compare, Allocator>; // C++23

template<class Key, class T, class Compare = less<Key>,
    class Allocator = allocator<pair<const Key, T>>>
map(initializer_list<pair<const Key, T>>, Compare = Compare(), Allocator = Allocator())
  -> map<Key, T, Compare, Allocator>; // C++17

template <class InputIterator, class Allocator>
map(InputIterator, InputIterator, Allocator)
  -> map<iter_key_t<InputIterator>, iter_val_t<InputIterator>, less<iter_key_t<InputIterator>>,
    Allocator>; // C++17

template<ranges::input_range R, class Allocator>
  map(from_range_t, R&&, Allocator)
    -> map<range-key-type<R>, range-mapped-type<R>, less<range-key-type<R>>, Allocator>; // C++23

template<class Key, class T, class Allocator>
map(initializer_list<pair<const Key, T>>, Allocator) -> map<Key, T, less<Key>, Allocator>; // C++17

template <class Key, class T, class Compare, class Allocator>
bool
operator==(const map<Key, T, Compare, Allocator>& x,
           const map<Key, T, Compare, Allocator>& y);

template <class Key, class T, class Compare, class Allocator>
bool
operator< (const map<Key, T, Compare, Allocator>& x,
           const map<Key, T, Compare, Allocator>& y);      // removed in C++20

template <class Key, class T, class Compare, class Allocator>
bool
operator!=(const map<Key, T, Compare, Allocator>& x,
           const map<Key, T, Compare, Allocator>& y);      // removed in C++20

template <class Key, class T, class Compare, class Allocator>
bool
operator> (const map<Key, T, Compare, Allocator>& x,
           const map<Key, T, Compare, Allocator>& y);      // removed in C++20

template <class Key, class T, class Compare, class Allocator>
bool
operator>=(const map<Key, T, Compare, Allocator>& x,
           const map<Key, T, Compare, Allocator>& y);      // removed in C++20

template <class Key, class T, class Compare, class Allocator>
bool
operator<=(const map<Key, T, Compare, Allocator>& x,
           const map<Key, T, Compare, Allocator>& y);      // removed in C++20

template<class Key, class T, class Compare, class Allocator>
  synth-three-way-result<pair<const Key, T>>
    operator<=>(const map<Key, T, Compare, Allocator>& x,
                const map<Key, T, Compare, Allocator>& y); // since C++20

// specialized algorithms:
template <class Key, class T, class Compare, class Allocator>
void
swap(map<Key, T, Compare, Allocator>& x, map<Key, T, Compare, Allocator>& y)
    noexcept(noexcept(x.swap(y)));

template <class Key, class T, class Compare, class Allocator, class Predicate>
typename map<Key, T, Compare, Allocator>::size_type
erase_if(map<Key, T, Compare, Allocator>& c, Predicate pred);  // C++20


template <class Key, class T, class Compare = less<Key>,
          class Allocator = allocator<pair<const Key, T>>>
class multimap
{
public:
    // types:
    typedef Key                                      key_type;
    typedef T                                        mapped_type;
    typedef pair<const key_type,mapped_type>         value_type;
    typedef Compare                                  key_compare;
    typedef Allocator                                allocator_type;
    typedef typename allocator_type::reference       reference;
    typedef typename allocator_type::const_reference const_reference;
    typedef typename allocator_type::size_type       size_type;
    typedef typename allocator_type::difference_type difference_type;
    typedef typename allocator_type::pointer         pointer;
    typedef typename allocator_type::const_pointer   const_pointer;

    typedef implementation-defined                   iterator;
    typedef implementation-defined                   const_iterator;
    typedef std::reverse_iterator<iterator>          reverse_iterator;
    typedef std::reverse_iterator<const_iterator>    const_reverse_iterator;
    typedef unspecified                              node_type;              // C++17

    class value_compare
    {
        friend class multimap;
    protected:
        key_compare comp;
        value_compare(key_compare c);
    public:
        typedef bool result_type;  // deprecated in C++17, removed in C++20
        typedef value_type first_argument_type;  // deprecated in C++17, removed in C++20
        typedef value_type second_argument_type;  // deprecated in C++17, removed in C++20
        bool operator()(const value_type& x, const value_type& y) const;
    };

    // construct/copy/destroy:
    multimap()
        noexcept(
            is_nothrow_default_constructible<allocator_type>::value &&
            is_nothrow_default_constructible<key_compare>::value &&
            is_nothrow_copy_constructible<key_compare>::value);
    explicit multimap(const key_compare& comp);
    multimap(const key_compare& comp, const allocator_type& a);
    template <class InputIterator>
        multimap(InputIterator first, InputIterator last, const key_compare& comp);
    template <class InputIterator>
        multimap(InputIterator first, InputIterator last, const key_compare& comp,
                 const allocator_type& a);
    template<container-compatible-range<value_type> R>
      multimap(from_range_t, R&& rg,
               const Compare& comp = Compare(), const Allocator& = Allocator()); // C++23
    multimap(const multimap& m);
    multimap(multimap&& m)
        noexcept(
            is_nothrow_move_constructible<allocator_type>::value &&
            is_nothrow_move_constructible<key_compare>::value);
    explicit multimap(const allocator_type& a);
    multimap(const multimap& m, const allocator_type& a);
    multimap(multimap&& m, const allocator_type& a);
    multimap(initializer_list<value_type> il, const key_compare& comp = key_compare());
    multimap(initializer_list<value_type> il, const key_compare& comp,
             const allocator_type& a);
    template <class InputIterator>
        multimap(InputIterator first, InputIterator last, const allocator_type& a)
            : multimap(first, last, Compare(), a) {} // C++14
    template<container-compatible-range<value_type> R>
      multimap(from_range_t, R&& rg, const Allocator& a))
        : multimap(from_range, std::forward<R>(rg), Compare(), a) { } // C++23
    multimap(initializer_list<value_type> il, const allocator_type& a)
        : multimap(il, Compare(), a) {} // C++14
    ~multimap();

    multimap& operator=(const multimap& m);
    multimap& operator=(multimap&& m)
        noexcept(
            allocator_type::propagate_on_container_move_assignment::value &&
            is_nothrow_move_assignable<allocator_type>::value &&
            is_nothrow_move_assignable<key_compare>::value);
    multimap& operator=(initializer_list<value_type> il);

    // iterators:
          iterator begin() noexcept;
    const_iterator begin() const noexcept;
          iterator end() noexcept;
    const_iterator end()   const noexcept;

          reverse_iterator rbegin() noexcept;
    const_reverse_iterator rbegin() const noexcept;
          reverse_iterator rend() noexcept;
    const_reverse_iterator rend()   const noexcept;

    const_iterator         cbegin()  const noexcept;
    const_iterator         cend()    const noexcept;
    const_reverse_iterator crbegin() const noexcept;
    const_reverse_iterator crend()   const noexcept;

    // capacity:
    bool      empty()    const noexcept;
    size_type size()     const noexcept;
    size_type max_size() const noexcept;

    // modifiers:
    template <class... Args>
        iterator emplace(Args&&... args);
    template <class... Args>
        iterator emplace_hint(const_iterator position, Args&&... args);
    iterator insert(const value_type& v);
    iterator insert(      value_type&& v);                                            // C++17
    template <class P>
        iterator insert(P&& p);
    iterator insert(const_iterator position, const value_type& v);
    iterator insert(const_iterator position,       value_type&& v);                   // C++17
    template <class P>
        iterator insert(const_iterator position, P&& p);
    template <class InputIterator>
        void insert(InputIterator first, InputIterator last);
    template<container-compatible-range<value_type> R>
      void insert_range(R&& rg);                                                      // C++23
    void insert(initializer_list<value_type> il);

    node_type extract(const_iterator position);                                       // C++17
    node_type extract(const key_type& x);                                             // C++17
    iterator insert(node_type&& nh);                                                  // C++17
    iterator insert(const_iterator hint, node_type&& nh);                             // C++17

    iterator  erase(const_iterator position);
    iterator  erase(iterator position); // C++14
    size_type erase(const key_type& k);
    iterator  erase(const_iterator first, const_iterator last);
    void clear() noexcept;

    template<class C2>
      void merge(multimap<Key, T, C2, Allocator>& source);    // C++17
    template<class C2>
      void merge(multimap<Key, T, C2, Allocator>&& source);   // C++17
    template<class C2>
      void merge(map<Key, T, C2, Allocator>& source);         // C++17
    template<class C2>
      void merge(map<Key, T, C2, Allocator>&& source);        // C++17

    void swap(multimap& m)
        noexcept(allocator_traits<allocator_type>::is_always_equal::value &&
            is_nothrow_swappable<key_compare>::value); // C++17

    // observers:
    allocator_type get_allocator() const noexcept;
    key_compare    key_comp()      const;
    value_compare  value_comp()    const;

    // map operations:
          iterator find(const key_type& k);
    const_iterator find(const key_type& k) const;
    template<typename K>
        iterator find(const K& x);              // C++14
    template<typename K>
        const_iterator find(const K& x) const;  // C++14

    template<typename K>
      size_type count(const K& x) const;        // C++14
    size_type      count(const key_type& k) const;

    bool           contains(const key_type& x) const;  // C++20
    template<class K> bool contains(const K& x) const; // C++20

          iterator lower_bound(const key_type& k);
    const_iterator lower_bound(const key_type& k) const;
    template<typename K>
        iterator lower_bound(const K& x);              // C++14
    template<typename K>
        const_iterator lower_bound(const K& x) const;  // C++14

          iterator upper_bound(const key_type& k);
    const_iterator upper_bound(const key_type& k) const;
    template<typename K>
        iterator upper_bound(const K& x);              // C++14
    template<typename K>
        const_iterator upper_bound(const K& x) const;  // C++14

    pair<iterator,iterator>             equal_range(const key_type& k);
    pair<const_iterator,const_iterator> equal_range(const key_type& k) const;
    template<typename K>
        pair<iterator,iterator>             equal_range(const K& x);        // C++14
    template<typename K>
        pair<const_iterator,const_iterator> equal_range(const K& x) const;  // C++14
};

template <class InputIterator,
      class Compare = less<iter_key_t<InputIterator>>,
      class Allocator = allocator<iter_to_alloc_t<InputIterator>>>
multimap(InputIterator, InputIterator, Compare = Compare(), Allocator = Allocator())
  -> multimap<iter_key_t<InputIterator>, iter_val_t<InputIterator>, Compare, Allocator>; // C++17

template<ranges::input_range R, class Compare = less<range-key-type<R>>,
          class Allocator = allocator<range-to-alloc-type<R>>>
  multimap(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
    -> multimap<range-key-type<R>, range-mapped-type<R>, Compare, Allocator>; // C++23

template<class Key, class T, class Compare = less<Key>,
    class Allocator = allocator<pair<const Key, T>>>
multimap(initializer_list<pair<const Key, T>>, Compare = Compare(), Allocator = Allocator())
  -> multimap<Key, T, Compare, Allocator>; // C++17

template <class InputIterator, class Allocator>
multimap(InputIterator, InputIterator, Allocator)
  -> multimap<iter_key_t<InputIterator>, iter_val_t<InputIterator>,
    less<iter_key_t<InputIterator>>, Allocator>; // C++17

template<ranges::input_range R, class Allocator>
  multimap(from_range_t, R&&, Allocator)
    -> multimap<range-key-type<R>, range-mapped-type<R>, less<range-key-type<R>>, Allocator>; // C++23

template<class Key, class T, class Allocator>
multimap(initializer_list<pair<const Key, T>>, Allocator)
  -> multimap<Key, T, less<Key>, Allocator>; // C++17

template <class Key, class T, class Compare, class Allocator>
bool
operator==(const multimap<Key, T, Compare, Allocator>& x,
           const multimap<Key, T, Compare, Allocator>& y);

template <class Key, class T, class Compare, class Allocator>
bool
operator< (const multimap<Key, T, Compare, Allocator>& x,
           const multimap<Key, T, Compare, Allocator>& y);      // removed in C++20

template <class Key, class T, class Compare, class Allocator>
bool
operator!=(const multimap<Key, T, Compare, Allocator>& x,
           const multimap<Key, T, Compare, Allocator>& y);      // removed in C++20

template <class Key, class T, class Compare, class Allocator>
bool
operator> (const multimap<Key, T, Compare, Allocator>& x,
           const multimap<Key, T, Compare, Allocator>& y);      // removed in C++20

template <class Key, class T, class Compare, class Allocator>
bool
operator>=(const multimap<Key, T, Compare, Allocator>& x,
           const multimap<Key, T, Compare, Allocator>& y);      // removed in C++20

template <class Key, class T, class Compare, class Allocator>
bool
operator<=(const multimap<Key, T, Compare, Allocator>& x,
           const multimap<Key, T, Compare, Allocator>& y);      // removed in C++20

template<class Key, class T, class Compare, class Allocator>
  synth-three-way-result<pair<const Key, T>>
    operator<=>(const multimap<Key, T, Compare, Allocator>& x,
                const multimap<Key, T, Compare, Allocator>& y); // since c++20

// specialized algorithms:
template <class Key, class T, class Compare, class Allocator>
void
swap(multimap<Key, T, Compare, Allocator>& x,
     multimap<Key, T, Compare, Allocator>& y)
    noexcept(noexcept(x.swap(y)));

template <class Key, class T, class Compare, class Allocator, class Predicate>
typename multimap<Key, T, Compare, Allocator>::size_type
erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);  // C++20

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/equal.h>
#endif /* expanded by -frewrite-includes */
# 574 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 575 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/lexicographical_compare.h>
#endif /* expanded by -frewrite-includes */
# 575 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 576 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/lexicographical_compare_three_way.h>
#endif /* expanded by -frewrite-includes */
# 576 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 577 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 577 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 578 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 578 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 579 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 579 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 580 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/binary_function.h>
#endif /* expanded by -frewrite-includes */
# 580 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 581 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/is_transparent.h>
#endif /* expanded by -frewrite-includes */
# 581 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 582 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 582 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 583 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/erase_if_container.h>
#endif /* expanded by -frewrite-includes */
# 583 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 584 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 584 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 585 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/ranges_iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 585 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 586 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 586 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 587 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 587 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 588 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator.h>
#endif /* expanded by -frewrite-includes */
# 588 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 589 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory_resource/polymorphic_allocator.h>
#endif /* expanded by -frewrite-includes */
# 589 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 590 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__node_handle>
#endif /* expanded by -frewrite-includes */
# 590 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 591 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 591 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 592 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/container_compatible_range.h>
#endif /* expanded by -frewrite-includes */
# 592 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 593 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/from_range.h>
#endif /* expanded by -frewrite-includes */
# 593 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 594 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __tree expanded by -frewrite-includes */
#include <__tree>
#else /* __tree expanded by -frewrite-includes */
# 594 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___TREE
#define _LIBCPP___TREE

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/min.h>
#endif /* expanded by -frewrite-includes */
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert>
#endif /* expanded by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/invoke.h>
#endif /* expanded by -frewrite-includes */
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/distance.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/next.h>
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/addressof.h>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator_traits.h>
#endif /* expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/compressed_pair.h>
#endif /* expanded by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/pointer_traits.h>
#endif /* expanded by -frewrite-includes */
# 23 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/swap_allocator.h>
#endif /* expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/unique_ptr.h>
#endif /* expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/can_extract_key.h>
#endif /* expanded by -frewrite-includes */
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/conditional.h>
#endif /* expanded by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_const.h>
#endif /* expanded by -frewrite-includes */
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_copy_constructible.h>
#endif /* expanded by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_default_constructible.h>
#endif /* expanded by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_assignable.h>
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_nothrow_move_constructible.h>
#endif /* expanded by -frewrite-includes */
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_pointer.h>
#endif /* expanded by -frewrite-includes */
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_same.h>
#endif /* expanded by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_swappable.h>
#endif /* expanded by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_const_ref.h>
#endif /* expanded by -frewrite-includes */
# 37 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/remove_cvref.h>
#endif /* expanded by -frewrite-includes */
# 38 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/move.h>
#endif /* expanded by -frewrite-includes */
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/pair.h>
#endif /* expanded by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <limits>
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#include <stdexcept>
#endif /* expanded by -frewrite-includes */
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 45 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#endif
# 49 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3

_LIBCPP_PUSH_MACROS
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __undef_macros expanded by -frewrite-includes */
#include <__undef_macros>
#else /* __undef_macros expanded by -frewrite-includes */
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifdef min
#  undef min
#endif
# 13 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef max
#  undef max
#endif
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef refresh
#  undef refresh
#endif
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef move
#  undef move
#endif
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3

#ifdef erase
#  undef erase
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__undef_macros" 3
#endif /* __undef_macros expanded by -frewrite-includes */
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 2 3


_LIBCPP_BEGIN_NAMESPACE_STD

template <class, class, class, class> class _LIBCPP_TEMPLATE_VIS map;
template <class, class, class, class> class _LIBCPP_TEMPLATE_VIS multimap;
template <class, class, class> class _LIBCPP_TEMPLATE_VIS set;
template <class, class, class> class _LIBCPP_TEMPLATE_VIS multiset;

template <class _Tp, class _Compare, class _Allocator> class __tree;
template <class _Tp, class _NodePtr, class _DiffType>
    class _LIBCPP_TEMPLATE_VIS __tree_iterator;
template <class _Tp, class _ConstNodePtr, class _DiffType>
    class _LIBCPP_TEMPLATE_VIS __tree_const_iterator;

template <class _Pointer> class __tree_end_node;
template <class _VoidPtr> class __tree_node_base;
template <class _Tp, class _VoidPtr> class __tree_node;

template <class _Key, class _Value>
struct __value_type;

template <class _Allocator> class __map_node_destructor;
template <class _TreeIterator> class _LIBCPP_TEMPLATE_VIS __map_iterator;
template <class _TreeIterator> class _LIBCPP_TEMPLATE_VIS __map_const_iterator;

/*

_NodePtr algorithms

The algorithms taking _NodePtr are red black tree algorithms.  Those
algorithms taking a parameter named __root should assume that __root
points to a proper red black tree (unless otherwise specified).

Each algorithm herein assumes that __root->__parent_ points to a non-null
structure which has a member __left_ which points back to __root.  No other
member is read or written to at __root->__parent_.

__root->__parent_ will be referred to below (in comments only) as end_node.
end_node->__left_ is an externably accessible lvalue for __root, and can be
changed by node insertion and removal (without explicit reference to end_node).

All nodes (with the exception of end_node), even the node referred to as
__root, have a non-null __parent_ field.

*/

// Returns:  true if __x is a left child of its parent, else false
// Precondition:  __x != nullptr.
template <class _NodePtr>
inline _LIBCPP_INLINE_VISIBILITY
bool
__tree_is_left_child(_NodePtr __x) _NOEXCEPT
{
    return __x == __x->__parent_->__left_;
}

// Determines if the subtree rooted at __x is a proper red black subtree.  If
//    __x is a proper subtree, returns the black height (null counts as 1).  If
//    __x is an improper subtree, returns 0.
template <class _NodePtr>
unsigned
__tree_sub_invariant(_NodePtr __x)
{
    if (__x == nullptr)
        return 1;
    // parent consistency checked by caller
    // check __x->__left_ consistency
    if (__x->__left_ != nullptr && __x->__left_->__parent_ != __x)
        return 0;
    // check __x->__right_ consistency
    if (__x->__right_ != nullptr && __x->__right_->__parent_ != __x)
        return 0;
    // check __x->__left_ != __x->__right_ unless both are nullptr
    if (__x->__left_ == __x->__right_ && __x->__left_ != nullptr)
        return 0;
    // If this is red, neither child can be red
    if (!__x->__is_black_)
    {
        if (__x->__left_ && !__x->__left_->__is_black_)
            return 0;
        if (__x->__right_ && !__x->__right_->__is_black_)
            return 0;
    }
    unsigned __h = _VSTD::__tree_sub_invariant(__x->__left_);
    if (__h == 0)
        return 0;  // invalid left subtree
    if (__h != _VSTD::__tree_sub_invariant(__x->__right_))
        return 0;  // invalid or different height right subtree
    return __h + __x->__is_black_;  // return black height of this node
}

// Determines if the red black tree rooted at __root is a proper red black tree.
//    __root == nullptr is a proper tree.  Returns true is __root is a proper
//    red black tree, else returns false.
template <class _NodePtr>
_LIBCPP_HIDE_FROM_ABI bool
__tree_invariant(_NodePtr __root)
{
    if (__root == nullptr)
        return true;
    // check __x->__parent_ consistency
    if (__root->__parent_ == nullptr)
        return false;
    if (!_VSTD::__tree_is_left_child(__root))
        return false;
    // root must be black
    if (!__root->__is_black_)
        return false;
    // do normal node checks
    return _VSTD::__tree_sub_invariant(__root) != 0;
}

// Returns:  pointer to the left-most node under __x.
template <class _NodePtr>
inline _LIBCPP_INLINE_VISIBILITY
_NodePtr
__tree_min(_NodePtr __x) _NOEXCEPT
{
    _LIBCPP_ASSERT_INTERNAL(__x != nullptr, "Root node shouldn't be null");
    while (__x->__left_ != nullptr)
        __x = __x->__left_;
    return __x;
}

// Returns:  pointer to the right-most node under __x.
template <class _NodePtr>
inline _LIBCPP_INLINE_VISIBILITY
_NodePtr
__tree_max(_NodePtr __x) _NOEXCEPT
{
    _LIBCPP_ASSERT_INTERNAL(__x != nullptr, "Root node shouldn't be null");
    while (__x->__right_ != nullptr)
        __x = __x->__right_;
    return __x;
}

// Returns:  pointer to the next in-order node after __x.
template <class _NodePtr>
_LIBCPP_HIDE_FROM_ABI _NodePtr
__tree_next(_NodePtr __x) _NOEXCEPT
{
    _LIBCPP_ASSERT_INTERNAL(__x != nullptr, "node shouldn't be null");
    if (__x->__right_ != nullptr)
        return _VSTD::__tree_min(__x->__right_);
    while (!_VSTD::__tree_is_left_child(__x))
        __x = __x->__parent_unsafe();
    return __x->__parent_unsafe();
}

template <class _EndNodePtr, class _NodePtr>
inline _LIBCPP_INLINE_VISIBILITY
_EndNodePtr
__tree_next_iter(_NodePtr __x) _NOEXCEPT
{
    _LIBCPP_ASSERT_INTERNAL(__x != nullptr, "node shouldn't be null");
    if (__x->__right_ != nullptr)
        return static_cast<_EndNodePtr>(_VSTD::__tree_min(__x->__right_));
    while (!_VSTD::__tree_is_left_child(__x))
        __x = __x->__parent_unsafe();
    return static_cast<_EndNodePtr>(__x->__parent_);
}

// Returns:  pointer to the previous in-order node before __x.
// Note: __x may be the end node.
template <class _NodePtr, class _EndNodePtr>
inline _LIBCPP_INLINE_VISIBILITY
_NodePtr
__tree_prev_iter(_EndNodePtr __x) _NOEXCEPT
{
    _LIBCPP_ASSERT_INTERNAL(__x != nullptr, "node shouldn't be null");
    if (__x->__left_ != nullptr)
        return _VSTD::__tree_max(__x->__left_);
    _NodePtr __xx = static_cast<_NodePtr>(__x);
    while (_VSTD::__tree_is_left_child(__xx))
        __xx = __xx->__parent_unsafe();
    return __xx->__parent_unsafe();
}

// Returns:  pointer to a node which has no children
template <class _NodePtr>
_LIBCPP_HIDE_FROM_ABI _NodePtr
__tree_leaf(_NodePtr __x) _NOEXCEPT
{
    _LIBCPP_ASSERT_INTERNAL(__x != nullptr, "node shouldn't be null");
    while (true)
    {
        if (__x->__left_ != nullptr)
        {
            __x = __x->__left_;
            continue;
        }
        if (__x->__right_ != nullptr)
        {
            __x = __x->__right_;
            continue;
        }
        break;
    }
    return __x;
}

// Effects:  Makes __x->__right_ the subtree root with __x as its left child
//           while preserving in-order order.
template <class _NodePtr>
_LIBCPP_HIDE_FROM_ABI void
__tree_left_rotate(_NodePtr __x) _NOEXCEPT
{
    _LIBCPP_ASSERT_INTERNAL(__x != nullptr, "node shouldn't be null");
    _LIBCPP_ASSERT_INTERNAL(__x->__right_ != nullptr, "node should have a right child");
    _NodePtr __y = __x->__right_;
    __x->__right_ = __y->__left_;
    if (__x->__right_ != nullptr)
        __x->__right_->__set_parent(__x);
    __y->__parent_ = __x->__parent_;
    if (_VSTD::__tree_is_left_child(__x))
        __x->__parent_->__left_ = __y;
    else
        __x->__parent_unsafe()->__right_ = __y;
    __y->__left_ = __x;
    __x->__set_parent(__y);
}

// Effects:  Makes __x->__left_ the subtree root with __x as its right child
//           while preserving in-order order.
template <class _NodePtr>
_LIBCPP_HIDE_FROM_ABI void
__tree_right_rotate(_NodePtr __x) _NOEXCEPT
{
    _LIBCPP_ASSERT_INTERNAL(__x != nullptr, "node shouldn't be null");
    _LIBCPP_ASSERT_INTERNAL(__x->__left_ != nullptr, "node should have a left child");
    _NodePtr __y = __x->__left_;
    __x->__left_ = __y->__right_;
    if (__x->__left_ != nullptr)
        __x->__left_->__set_parent(__x);
    __y->__parent_ = __x->__parent_;
    if (_VSTD::__tree_is_left_child(__x))
        __x->__parent_->__left_ = __y;
    else
        __x->__parent_unsafe()->__right_ = __y;
    __y->__right_ = __x;
    __x->__set_parent(__y);
}

// Effects:  Rebalances __root after attaching __x to a leaf.
// Precondition:  __x has no children.
//                __x == __root or == a direct or indirect child of __root.
//                If __x were to be unlinked from __root (setting __root to
//                  nullptr if __root == __x), __tree_invariant(__root) == true.
// Postcondition: __tree_invariant(end_node->__left_) == true.  end_node->__left_
//                may be different than the value passed in as __root.
template <class _NodePtr>
_LIBCPP_HIDE_FROM_ABI void
__tree_balance_after_insert(_NodePtr __root, _NodePtr __x) _NOEXCEPT
{
    _LIBCPP_ASSERT_INTERNAL(__root != nullptr, "Root of the tree shouldn't be null");
    _LIBCPP_ASSERT_INTERNAL(__x != nullptr, "Can't attach null node to a leaf");
    __x->__is_black_ = __x == __root;
    while (__x != __root && !__x->__parent_unsafe()->__is_black_)
    {
        // __x->__parent_ != __root because __x->__parent_->__is_black == false
        if (_VSTD::__tree_is_left_child(__x->__parent_unsafe()))
        {
            _NodePtr __y = __x->__parent_unsafe()->__parent_unsafe()->__right_;
            if (__y != nullptr && !__y->__is_black_)
            {
                __x = __x->__parent_unsafe();
                __x->__is_black_ = true;
                __x = __x->__parent_unsafe();
                __x->__is_black_ = __x == __root;
                __y->__is_black_ = true;
            }
            else
            {
                if (!_VSTD::__tree_is_left_child(__x))
                {
                    __x = __x->__parent_unsafe();
                    _VSTD::__tree_left_rotate(__x);
                }
                __x = __x->__parent_unsafe();
                __x->__is_black_ = true;
                __x = __x->__parent_unsafe();
                __x->__is_black_ = false;
                _VSTD::__tree_right_rotate(__x);
                break;
            }
        }
        else
        {
            _NodePtr __y = __x->__parent_unsafe()->__parent_->__left_;
            if (__y != nullptr && !__y->__is_black_)
            {
                __x = __x->__parent_unsafe();
                __x->__is_black_ = true;
                __x = __x->__parent_unsafe();
                __x->__is_black_ = __x == __root;
                __y->__is_black_ = true;
            }
            else
            {
                if (_VSTD::__tree_is_left_child(__x))
                {
                    __x = __x->__parent_unsafe();
                    _VSTD::__tree_right_rotate(__x);
                }
                __x = __x->__parent_unsafe();
                __x->__is_black_ = true;
                __x = __x->__parent_unsafe();
                __x->__is_black_ = false;
                _VSTD::__tree_left_rotate(__x);
                break;
            }
        }
    }
}

// Precondition:  __z == __root or == a direct or indirect child of __root.
// Effects:  unlinks __z from the tree rooted at __root, rebalancing as needed.
// Postcondition: __tree_invariant(end_node->__left_) == true && end_node->__left_
//                nor any of its children refer to __z.  end_node->__left_
//                may be different than the value passed in as __root.
template <class _NodePtr>
_LIBCPP_HIDE_FROM_ABI void
__tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
{
    _LIBCPP_ASSERT_INTERNAL(__root != nullptr, "Root node should not be null");
    _LIBCPP_ASSERT_INTERNAL(__z != nullptr, "The node to remove should not be null");
    _LIBCPP_ASSERT_INTERNAL(std::__tree_invariant(__root), "The tree invariants should hold");
    // __z will be removed from the tree.  Client still needs to destruct/deallocate it
    // __y is either __z, or if __z has two children, __tree_next(__z).
    // __y will have at most one child.
    // __y will be the initial hole in the tree (make the hole at a leaf)
    _NodePtr __y = (__z->__left_ == nullptr || __z->__right_ == nullptr) ?
                    __z : _VSTD::__tree_next(__z);
    // __x is __y's possibly null single child
    _NodePtr __x = __y->__left_ != nullptr ? __y->__left_ : __y->__right_;
    // __w is __x's possibly null uncle (will become __x's sibling)
    _NodePtr __w = nullptr;
    // link __x to __y's parent, and find __w
    if (__x != nullptr)
        __x->__parent_ = __y->__parent_;
    if (_VSTD::__tree_is_left_child(__y))
    {
        __y->__parent_->__left_ = __x;
        if (__y != __root)
            __w = __y->__parent_unsafe()->__right_;
        else
            __root = __x;  // __w == nullptr
    }
    else
    {
        __y->__parent_unsafe()->__right_ = __x;
        // __y can't be root if it is a right child
        __w = __y->__parent_->__left_;
    }
    bool __removed_black = __y->__is_black_;
    // If we didn't remove __z, do so now by splicing in __y for __z,
    //    but copy __z's color.  This does not impact __x or __w.
    if (__y != __z)
    {
        // __z->__left_ != nulptr but __z->__right_ might == __x == nullptr
        __y->__parent_ = __z->__parent_;
        if (_VSTD::__tree_is_left_child(__z))
            __y->__parent_->__left_ = __y;
        else
            __y->__parent_unsafe()->__right_ = __y;
        __y->__left_ = __z->__left_;
        __y->__left_->__set_parent(__y);
        __y->__right_ = __z->__right_;
        if (__y->__right_ != nullptr)
            __y->__right_->__set_parent(__y);
        __y->__is_black_ = __z->__is_black_;
        if (__root == __z)
            __root = __y;
    }
    // There is no need to rebalance if we removed a red, or if we removed
    //     the last node.
    if (__removed_black && __root != nullptr)
    {
        // Rebalance:
        // __x has an implicit black color (transferred from the removed __y)
        //    associated with it, no matter what its color is.
        // If __x is __root (in which case it can't be null), it is supposed
        //    to be black anyway, and if it is doubly black, then the double
        //    can just be ignored.
        // If __x is red (in which case it can't be null), then it can absorb
        //    the implicit black just by setting its color to black.
        // Since __y was black and only had one child (which __x points to), __x
        //   is either red with no children, else null, otherwise __y would have
        //   different black heights under left and right pointers.
        // if (__x == __root || __x != nullptr && !__x->__is_black_)
        if (__x != nullptr)
            __x->__is_black_ = true;
        else
        {
            //  Else __x isn't root, and is "doubly black", even though it may
            //     be null.  __w can not be null here, else the parent would
            //     see a black height >= 2 on the __x side and a black height
            //     of 1 on the __w side (__w must be a non-null black or a red
            //     with a non-null black child).
            while (true)
            {
                if (!_VSTD::__tree_is_left_child(__w))  // if x is left child
                {
                    if (!__w->__is_black_)
                    {
                        __w->__is_black_ = true;
                        __w->__parent_unsafe()->__is_black_ = false;
                        _VSTD::__tree_left_rotate(__w->__parent_unsafe());
                        // __x is still valid
                        // reset __root only if necessary
                        if (__root == __w->__left_)
                            __root = __w;
                        // reset sibling, and it still can't be null
                        __w = __w->__left_->__right_;
                    }
                    // __w->__is_black_ is now true, __w may have null children
                    if ((__w->__left_  == nullptr || __w->__left_->__is_black_) &&
                        (__w->__right_ == nullptr || __w->__right_->__is_black_))
                    {
                        __w->__is_black_ = false;
                        __x = __w->__parent_unsafe();
                        // __x can no longer be null
                        if (__x == __root || !__x->__is_black_)
                        {
                            __x->__is_black_ = true;
                            break;
                        }
                        // reset sibling, and it still can't be null
                        __w = _VSTD::__tree_is_left_child(__x) ?
                                    __x->__parent_unsafe()->__right_ :
                                    __x->__parent_->__left_;
                        // continue;
                    }
                    else  // __w has a red child
                    {
                        if (__w->__right_ == nullptr || __w->__right_->__is_black_)
                        {
                            // __w left child is non-null and red
                            __w->__left_->__is_black_ = true;
                            __w->__is_black_ = false;
                            _VSTD::__tree_right_rotate(__w);
                            // __w is known not to be root, so root hasn't changed
                            // reset sibling, and it still can't be null
                            __w = __w->__parent_unsafe();
                        }
                        // __w has a right red child, left child may be null
                        __w->__is_black_ = __w->__parent_unsafe()->__is_black_;
                        __w->__parent_unsafe()->__is_black_ = true;
                        __w->__right_->__is_black_ = true;
                        _VSTD::__tree_left_rotate(__w->__parent_unsafe());
                        break;
                    }
                }
                else
                {
                    if (!__w->__is_black_)
                    {
                        __w->__is_black_ = true;
                        __w->__parent_unsafe()->__is_black_ = false;
                        _VSTD::__tree_right_rotate(__w->__parent_unsafe());
                        // __x is still valid
                        // reset __root only if necessary
                        if (__root == __w->__right_)
                            __root = __w;
                        // reset sibling, and it still can't be null
                        __w = __w->__right_->__left_;
                    }
                    // __w->__is_black_ is now true, __w may have null children
                    if ((__w->__left_  == nullptr || __w->__left_->__is_black_) &&
                        (__w->__right_ == nullptr || __w->__right_->__is_black_))
                    {
                        __w->__is_black_ = false;
                        __x = __w->__parent_unsafe();
                        // __x can no longer be null
                        if (!__x->__is_black_ || __x == __root)
                        {
                            __x->__is_black_ = true;
                            break;
                        }
                        // reset sibling, and it still can't be null
                        __w = _VSTD::__tree_is_left_child(__x) ?
                                    __x->__parent_unsafe()->__right_ :
                                    __x->__parent_->__left_;
                        // continue;
                    }
                    else  // __w has a red child
                    {
                        if (__w->__left_ == nullptr || __w->__left_->__is_black_)
                        {
                            // __w right child is non-null and red
                            __w->__right_->__is_black_ = true;
                            __w->__is_black_ = false;
                            _VSTD::__tree_left_rotate(__w);
                            // __w is known not to be root, so root hasn't changed
                            // reset sibling, and it still can't be null
                            __w = __w->__parent_unsafe();
                        }
                        // __w has a left red child, right child may be null
                        __w->__is_black_ = __w->__parent_unsafe()->__is_black_;
                        __w->__parent_unsafe()->__is_black_ = true;
                        __w->__left_->__is_black_ = true;
                        _VSTD::__tree_right_rotate(__w->__parent_unsafe());
                        break;
                    }
                }
            }
        }
    }
}

// node traits


template <class _Tp>
struct __is_tree_value_type_imp : false_type {};

template <class _Key, class _Value>
struct __is_tree_value_type_imp<__value_type<_Key, _Value> > : true_type {};

template <class ..._Args>
struct __is_tree_value_type : false_type {};

template <class _One>
struct __is_tree_value_type<_One> : __is_tree_value_type_imp<__remove_cvref_t<_One> > {};

template <class _Tp>
struct __tree_key_value_types {
  typedef _Tp key_type;
  typedef _Tp __node_value_type;
  typedef _Tp __container_value_type;
  static const bool __is_map = false;

  _LIBCPP_INLINE_VISIBILITY
  static key_type const& __get_key(_Tp const& __v) {
    return __v;
  }
  _LIBCPP_INLINE_VISIBILITY
  static __container_value_type const& __get_value(__node_value_type const& __v) {
    return __v;
  }
  _LIBCPP_INLINE_VISIBILITY
  static __container_value_type* __get_ptr(__node_value_type& __n) {
    return _VSTD::addressof(__n);
  }
  _LIBCPP_INLINE_VISIBILITY
  static __container_value_type&& __move(__node_value_type& __v) {
    return _VSTD::move(__v);
  }
};

template <class _Key, class _Tp>
struct __tree_key_value_types<__value_type<_Key, _Tp> > {
  typedef _Key                                         key_type;
  typedef _Tp                                          mapped_type;
  typedef __value_type<_Key, _Tp>                      __node_value_type;
  typedef pair<const _Key, _Tp>                        __container_value_type;
  typedef __container_value_type                       __map_value_type;
  static const bool __is_map = true;

  _LIBCPP_INLINE_VISIBILITY
  static key_type const&
  __get_key(__node_value_type const& __t) {
    return __t.__get_value().first;
  }

  template <class _Up, __enable_if_t<__is_same_uncvref<_Up, __container_value_type>::value, int> = 0>
  _LIBCPP_INLINE_VISIBILITY
  static key_type const&
  __get_key(_Up& __t) {
    return __t.first;
  }

  _LIBCPP_INLINE_VISIBILITY
  static __container_value_type const&
  __get_value(__node_value_type const& __t) {
    return __t.__get_value();
  }

  template <class _Up>
  _LIBCPP_INLINE_VISIBILITY
  static __enable_if_t<__is_same_uncvref<_Up, __container_value_type>::value, __container_value_type const&>
  __get_value(_Up& __t) {
    return __t;
  }

  _LIBCPP_INLINE_VISIBILITY
  static __container_value_type* __get_ptr(__node_value_type& __n) {
    return _VSTD::addressof(__n.__get_value());
  }

  _LIBCPP_INLINE_VISIBILITY
  static pair<key_type&&, mapped_type&&> __move(__node_value_type& __v) {
    return __v.__move();
  }
};

template <class _VoidPtr>
struct __tree_node_base_types {
  typedef _VoidPtr                                               __void_pointer;

  typedef __tree_node_base<__void_pointer>                      __node_base_type;
  typedef __rebind_pointer_t<_VoidPtr, __node_base_type>
                                                             __node_base_pointer;

  typedef __tree_end_node<__node_base_pointer>                  __end_node_type;
  typedef __rebind_pointer_t<_VoidPtr, __end_node_type>
                                                             __end_node_pointer;
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 661 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
  typedef __end_node_pointer __parent_pointer;
#else
# 663 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
  typedef __conditional_t< is_pointer<__end_node_pointer>::value, __end_node_pointer, __node_base_pointer>
      __parent_pointer;
#endif
# 666 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3

private:
  static_assert((is_same<typename pointer_traits<_VoidPtr>::element_type, void>::value),
                  "_VoidPtr does not point to unqualified void type");
};

template <class _Tp, class _AllocPtr, class _KVTypes = __tree_key_value_types<_Tp>,
         bool = _KVTypes::__is_map>
struct __tree_map_pointer_types {};

template <class _Tp, class _AllocPtr, class _KVTypes>
struct __tree_map_pointer_types<_Tp, _AllocPtr, _KVTypes, true> {
  typedef typename _KVTypes::__map_value_type   _Mv;
  typedef __rebind_pointer_t<_AllocPtr, _Mv>
                                                       __map_value_type_pointer;
  typedef __rebind_pointer_t<_AllocPtr, const _Mv>
                                                 __const_map_value_type_pointer;
};

template <class _NodePtr, class _NodeT = typename pointer_traits<_NodePtr>::element_type>
struct __tree_node_types;

template <class _NodePtr, class _Tp, class _VoidPtr>
struct __tree_node_types<_NodePtr, __tree_node<_Tp, _VoidPtr> >
    : public __tree_node_base_types<_VoidPtr>,
             __tree_key_value_types<_Tp>,
             __tree_map_pointer_types<_Tp, _VoidPtr>
{
  typedef __tree_node_base_types<_VoidPtr> __base;
  typedef __tree_key_value_types<_Tp>      __key_base;
  typedef __tree_map_pointer_types<_Tp, _VoidPtr> __map_pointer_base;
public:

  typedef typename pointer_traits<_NodePtr>::element_type       __node_type;
  typedef _NodePtr                                              __node_pointer;

  typedef _Tp                                                 __node_value_type;
  typedef __rebind_pointer_t<_VoidPtr, __node_value_type>
                                                      __node_value_type_pointer;
  typedef __rebind_pointer_t<_VoidPtr, const __node_value_type>
                                                __const_node_value_type_pointer;
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 708 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
  typedef typename __base::__end_node_pointer __iter_pointer;
#else
# 710 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
  typedef __conditional_t< is_pointer<__node_pointer>::value, typename __base::__end_node_pointer, __node_pointer>
      __iter_pointer;
#endif
# 713 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
private:
    static_assert(!is_const<__node_type>::value,
                "_NodePtr should never be a pointer to const");
    static_assert((is_same<__rebind_pointer_t<_VoidPtr, __node_type>,
                          _NodePtr>::value), "_VoidPtr does not rebind to _NodePtr.");
};

template <class _ValueTp, class _VoidPtr>
struct __make_tree_node_types {
  typedef __rebind_pointer_t<_VoidPtr, __tree_node<_ValueTp, _VoidPtr> >
                                                                        _NodePtr;
  typedef __tree_node_types<_NodePtr> type;
};

// node

template <class _Pointer>
class __tree_end_node
{
public:
    typedef _Pointer pointer;
    pointer __left_;

    _LIBCPP_INLINE_VISIBILITY
    __tree_end_node() _NOEXCEPT : __left_() {}
};

template <class _VoidPtr>
class _LIBCPP_STANDALONE_DEBUG __tree_node_base
    : public __tree_node_base_types<_VoidPtr>::__end_node_type
{
    typedef __tree_node_base_types<_VoidPtr> _NodeBaseTypes;

public:
    typedef typename _NodeBaseTypes::__node_base_pointer pointer;
    typedef typename _NodeBaseTypes::__parent_pointer __parent_pointer;

    pointer          __right_;
    __parent_pointer __parent_;
    bool __is_black_;

    _LIBCPP_INLINE_VISIBILITY
    pointer __parent_unsafe() const { return static_cast<pointer>(__parent_);}

    _LIBCPP_INLINE_VISIBILITY
    void __set_parent(pointer __p) {
        __parent_ = static_cast<__parent_pointer>(__p);
    }

private:
  ~__tree_node_base() = delete;
  __tree_node_base(__tree_node_base const&) = delete;
  __tree_node_base& operator=(__tree_node_base const&) = delete;
};

template <class _Tp, class _VoidPtr>
class _LIBCPP_STANDALONE_DEBUG __tree_node
    : public __tree_node_base<_VoidPtr>
{
public:
    typedef _Tp __node_value_type;

    __node_value_type __value_;

    _LIBCPP_HIDE_FROM_ABI _Tp& __get_value() { return __value_; }

private:
  ~__tree_node() = delete;
  __tree_node(__tree_node const&) = delete;
  __tree_node& operator=(__tree_node const&) = delete;
};


template <class _Allocator>
class __tree_node_destructor
{
    typedef _Allocator                                      allocator_type;
    typedef allocator_traits<allocator_type>                __alloc_traits;

public:
    typedef typename __alloc_traits::pointer                pointer;
private:
    typedef __tree_node_types<pointer> _NodeTypes;
    allocator_type& __na_;


public:
    bool __value_constructed;


    _LIBCPP_HIDE_FROM_ABI __tree_node_destructor(const __tree_node_destructor &) = default;
    __tree_node_destructor& operator=(const __tree_node_destructor&) = delete;

    _LIBCPP_INLINE_VISIBILITY
    explicit __tree_node_destructor(allocator_type& __na, bool __val = false) _NOEXCEPT
        : __na_(__na),
          __value_constructed(__val)
        {}

    _LIBCPP_INLINE_VISIBILITY
    void operator()(pointer __p) _NOEXCEPT
    {
        if (__value_constructed)
            __alloc_traits::destroy(__na_, _NodeTypes::__get_ptr(__p->__value_));
        if (__p)
            __alloc_traits::deallocate(__na_, __p, 1);
    }

    template <class> friend class __map_node_destructor;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 825 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
template <class _NodeType, class _Alloc>
struct __generic_container_node_destructor;
template <class _Tp, class _VoidPtr, class _Alloc>
struct __generic_container_node_destructor<__tree_node<_Tp, _VoidPtr>, _Alloc>
    : __tree_node_destructor<_Alloc>
{
    using __tree_node_destructor<_Alloc>::__tree_node_destructor;
};
#endif
# 834 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3

template <class _Tp, class _NodePtr, class _DiffType>
class _LIBCPP_TEMPLATE_VIS __tree_iterator
{
    typedef __tree_node_types<_NodePtr>                     _NodeTypes;
    typedef _NodePtr                                        __node_pointer;
    typedef typename _NodeTypes::__node_base_pointer        __node_base_pointer;
    typedef typename _NodeTypes::__end_node_pointer         __end_node_pointer;
    typedef typename _NodeTypes::__iter_pointer             __iter_pointer;
    typedef pointer_traits<__node_pointer> __pointer_traits;

    __iter_pointer __ptr_;

public:
    typedef bidirectional_iterator_tag                     iterator_category;
    typedef _Tp                                            value_type;
    typedef _DiffType                                      difference_type;
    typedef value_type&                                    reference;
    typedef typename _NodeTypes::__node_value_type_pointer pointer;

    _LIBCPP_INLINE_VISIBILITY __tree_iterator() _NOEXCEPT
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 856 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
    : __ptr_(nullptr)
#endif
# 858 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
    {}

    _LIBCPP_INLINE_VISIBILITY reference operator*() const
        {return __get_np()->__value_;}
    _LIBCPP_INLINE_VISIBILITY pointer operator->() const
        {return pointer_traits<pointer>::pointer_to(__get_np()->__value_);}

    _LIBCPP_INLINE_VISIBILITY
    __tree_iterator& operator++() {
      __ptr_ = static_cast<__iter_pointer>(
          _VSTD::__tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_)));
      return *this;
    }
    _LIBCPP_INLINE_VISIBILITY
    __tree_iterator operator++(int)
        {__tree_iterator __t(*this); ++(*this); return __t;}

    _LIBCPP_INLINE_VISIBILITY
    __tree_iterator& operator--() {
      __ptr_ = static_cast<__iter_pointer>(_VSTD::__tree_prev_iter<__node_base_pointer>(
          static_cast<__end_node_pointer>(__ptr_)));
      return *this;
    }
    _LIBCPP_INLINE_VISIBILITY
    __tree_iterator operator--(int)
        {__tree_iterator __t(*this); --(*this); return __t;}

    friend _LIBCPP_INLINE_VISIBILITY
        bool operator==(const __tree_iterator& __x, const __tree_iterator& __y)
        {return __x.__ptr_ == __y.__ptr_;}
    friend _LIBCPP_INLINE_VISIBILITY
        bool operator!=(const __tree_iterator& __x, const __tree_iterator& __y)
        {return !(__x == __y);}

private:
    _LIBCPP_INLINE_VISIBILITY
    explicit __tree_iterator(__node_pointer __p) _NOEXCEPT : __ptr_(__p) {}
    _LIBCPP_INLINE_VISIBILITY
    explicit __tree_iterator(__end_node_pointer __p) _NOEXCEPT : __ptr_(__p) {}
    _LIBCPP_INLINE_VISIBILITY
    __node_pointer __get_np() const { return static_cast<__node_pointer>(__ptr_); }
    template <class, class, class> friend class __tree;
    template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS __tree_const_iterator;
    template <class> friend class _LIBCPP_TEMPLATE_VIS __map_iterator;
    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
    template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS set;
    template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS multiset;
};

template <class _Tp, class _NodePtr, class _DiffType>
class _LIBCPP_TEMPLATE_VIS __tree_const_iterator
{
    typedef __tree_node_types<_NodePtr>                     _NodeTypes;
    typedef typename _NodeTypes::__node_pointer             __node_pointer;
    typedef typename _NodeTypes::__node_base_pointer        __node_base_pointer;
    typedef typename _NodeTypes::__end_node_pointer         __end_node_pointer;
    typedef typename _NodeTypes::__iter_pointer             __iter_pointer;
    typedef pointer_traits<__node_pointer> __pointer_traits;

    __iter_pointer __ptr_;

public:
    typedef bidirectional_iterator_tag                           iterator_category;
    typedef _Tp                                                  value_type;
    typedef _DiffType                                            difference_type;
    typedef const value_type&                                    reference;
    typedef typename _NodeTypes::__const_node_value_type_pointer pointer;

    _LIBCPP_INLINE_VISIBILITY __tree_const_iterator() _NOEXCEPT
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 929 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
    : __ptr_(nullptr)
#endif
# 931 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
    {}

private:
    typedef __tree_iterator<value_type, __node_pointer, difference_type>
                                                           __non_const_iterator;
public:
    _LIBCPP_INLINE_VISIBILITY
    __tree_const_iterator(__non_const_iterator __p) _NOEXCEPT
        : __ptr_(__p.__ptr_) {}

    _LIBCPP_INLINE_VISIBILITY reference operator*() const
        {return __get_np()->__value_;}
    _LIBCPP_INLINE_VISIBILITY pointer operator->() const
        {return pointer_traits<pointer>::pointer_to(__get_np()->__value_);}

    _LIBCPP_INLINE_VISIBILITY
    __tree_const_iterator& operator++() {
      __ptr_ = static_cast<__iter_pointer>(
          _VSTD::__tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_)));
      return *this;
    }

    _LIBCPP_INLINE_VISIBILITY
    __tree_const_iterator operator++(int)
        {__tree_const_iterator __t(*this); ++(*this); return __t;}

    _LIBCPP_INLINE_VISIBILITY
    __tree_const_iterator& operator--() {
      __ptr_ = static_cast<__iter_pointer>(_VSTD::__tree_prev_iter<__node_base_pointer>(
          static_cast<__end_node_pointer>(__ptr_)));
      return *this;
    }

    _LIBCPP_INLINE_VISIBILITY
    __tree_const_iterator operator--(int)
        {__tree_const_iterator __t(*this); --(*this); return __t;}

    friend _LIBCPP_INLINE_VISIBILITY
        bool operator==(const __tree_const_iterator& __x, const __tree_const_iterator& __y)
        {return __x.__ptr_ == __y.__ptr_;}
    friend _LIBCPP_INLINE_VISIBILITY
        bool operator!=(const __tree_const_iterator& __x, const __tree_const_iterator& __y)
        {return !(__x == __y);}

private:
    _LIBCPP_INLINE_VISIBILITY
    explicit __tree_const_iterator(__node_pointer __p) _NOEXCEPT
        : __ptr_(__p) {}
    _LIBCPP_INLINE_VISIBILITY
    explicit __tree_const_iterator(__end_node_pointer __p) _NOEXCEPT
        : __ptr_(__p) {}
    _LIBCPP_INLINE_VISIBILITY
    __node_pointer __get_np() const { return static_cast<__node_pointer>(__ptr_); }

    template <class, class, class> friend class __tree;
    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
    template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS set;
    template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS multiset;
    template <class> friend class _LIBCPP_TEMPLATE_VIS __map_const_iterator;

};

template<class _Tp, class _Compare>
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_DIAGNOSE_WARNING(!__invokable<_Compare const&, _Tp const&, _Tp const&>::value,
        "the specified comparator type does not provide a viable const call operator")
#endif
# 999 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
int __diagnose_non_const_comparator();

template <class _Tp, class _Compare, class _Allocator>
class __tree
{
public:
    typedef _Tp                                      value_type;
    typedef _Compare                                 value_compare;
    typedef _Allocator                               allocator_type;

private:
    typedef allocator_traits<allocator_type>         __alloc_traits;
    typedef typename __make_tree_node_types<value_type,
        typename __alloc_traits::void_pointer>::type
                                                    _NodeTypes;
    typedef typename _NodeTypes::key_type           key_type;
public:
    typedef typename _NodeTypes::__node_value_type      __node_value_type;
    typedef typename _NodeTypes::__container_value_type __container_value_type;

    typedef typename __alloc_traits::pointer         pointer;
    typedef typename __alloc_traits::const_pointer   const_pointer;
    typedef typename __alloc_traits::size_type       size_type;
    typedef typename __alloc_traits::difference_type difference_type;

public:
    typedef typename _NodeTypes::__void_pointer        __void_pointer;

    typedef typename _NodeTypes::__node_type           __node;
    typedef typename _NodeTypes::__node_pointer        __node_pointer;

    typedef typename _NodeTypes::__node_base_type      __node_base;
    typedef typename _NodeTypes::__node_base_pointer   __node_base_pointer;

    typedef typename _NodeTypes::__end_node_type       __end_node_t;
    typedef typename _NodeTypes::__end_node_pointer    __end_node_ptr;

    typedef typename _NodeTypes::__parent_pointer      __parent_pointer;
    typedef typename _NodeTypes::__iter_pointer        __iter_pointer;

    typedef __rebind_alloc<__alloc_traits, __node> __node_allocator;
    typedef allocator_traits<__node_allocator>         __node_traits;

private:
    // check for sane allocator pointer rebinding semantics. Rebinding the
    // allocator for a new pointer type should be exactly the same as rebinding
    // the pointer using 'pointer_traits'.
    static_assert((is_same<__node_pointer, typename __node_traits::pointer>::value),
                  "Allocator does not rebind pointers in a sane manner.");
    typedef __rebind_alloc<__node_traits, __node_base> __node_base_allocator;
    typedef allocator_traits<__node_base_allocator> __node_base_traits;
    static_assert((is_same<__node_base_pointer, typename __node_base_traits::pointer>::value),
                 "Allocator does not rebind pointers in a sane manner.");

private:
    __iter_pointer                                     __begin_node_;
    __compressed_pair<__end_node_t, __node_allocator>  __pair1_;
    __compressed_pair<size_type, value_compare>        __pair3_;

public:
    _LIBCPP_INLINE_VISIBILITY
    __iter_pointer __end_node() _NOEXCEPT
    {
        return static_cast<__iter_pointer>(
                pointer_traits<__end_node_ptr>::pointer_to(__pair1_.first())
        );
    }
    _LIBCPP_INLINE_VISIBILITY
    __iter_pointer __end_node() const _NOEXCEPT
    {
        return static_cast<__iter_pointer>(
            pointer_traits<__end_node_ptr>::pointer_to(
                const_cast<__end_node_t&>(__pair1_.first())
            )
        );
    }
    _LIBCPP_INLINE_VISIBILITY
          __node_allocator& __node_alloc() _NOEXCEPT {return __pair1_.second();}
private:
    _LIBCPP_INLINE_VISIBILITY
    const __node_allocator& __node_alloc() const _NOEXCEPT
        {return __pair1_.second();}
    _LIBCPP_INLINE_VISIBILITY
          __iter_pointer& __begin_node() _NOEXCEPT {return __begin_node_;}
    _LIBCPP_INLINE_VISIBILITY
    const __iter_pointer& __begin_node() const _NOEXCEPT {return __begin_node_;}
public:
    _LIBCPP_INLINE_VISIBILITY
    allocator_type __alloc() const _NOEXCEPT
        {return allocator_type(__node_alloc());}
private:
    _LIBCPP_INLINE_VISIBILITY
          size_type& size() _NOEXCEPT {return __pair3_.first();}
public:
    _LIBCPP_INLINE_VISIBILITY
    const size_type& size() const _NOEXCEPT {return __pair3_.first();}
    _LIBCPP_INLINE_VISIBILITY
          value_compare& value_comp() _NOEXCEPT {return __pair3_.second();}
    _LIBCPP_INLINE_VISIBILITY
    const value_compare& value_comp() const _NOEXCEPT
        {return __pair3_.second();}
public:

    _LIBCPP_INLINE_VISIBILITY
    __node_pointer __root() const _NOEXCEPT
        {return static_cast<__node_pointer>(__end_node()->__left_);}

    _LIBCPP_HIDE_FROM_ABI __node_base_pointer* __root_ptr() const _NOEXCEPT {
        return _VSTD::addressof(__end_node()->__left_);
    }

    typedef __tree_iterator<value_type, __node_pointer, difference_type>             iterator;
    typedef __tree_const_iterator<value_type, __node_pointer, difference_type> const_iterator;

    _LIBCPP_HIDE_FROM_ABI explicit __tree(const value_compare& __comp)
        _NOEXCEPT_(
            is_nothrow_default_constructible<__node_allocator>::value &&
            is_nothrow_copy_constructible<value_compare>::value);
    _LIBCPP_HIDE_FROM_ABI explicit __tree(const allocator_type& __a);
    _LIBCPP_HIDE_FROM_ABI __tree(const value_compare& __comp, const allocator_type& __a);
    _LIBCPP_HIDE_FROM_ABI __tree(const __tree& __t);
    _LIBCPP_HIDE_FROM_ABI __tree& operator=(const __tree& __t);
    template <class _ForwardIterator>
    _LIBCPP_HIDE_FROM_ABI void __assign_unique(_ForwardIterator __first, _ForwardIterator __last);
    template <class _InputIterator>
    _LIBCPP_HIDE_FROM_ABI void __assign_multi(_InputIterator __first, _InputIterator __last);
    _LIBCPP_HIDE_FROM_ABI __tree(__tree&& __t)
        _NOEXCEPT_(
            is_nothrow_move_constructible<__node_allocator>::value &&
            is_nothrow_move_constructible<value_compare>::value);
    _LIBCPP_HIDE_FROM_ABI __tree(__tree&& __t, const allocator_type& __a);
    _LIBCPP_HIDE_FROM_ABI __tree& operator=(__tree&& __t)
        _NOEXCEPT_(
            __node_traits::propagate_on_container_move_assignment::value &&
            is_nothrow_move_assignable<value_compare>::value &&
            is_nothrow_move_assignable<__node_allocator>::value);
    _LIBCPP_HIDE_FROM_ABI ~__tree();

    _LIBCPP_INLINE_VISIBILITY
          iterator begin()  _NOEXCEPT {return       iterator(__begin_node());}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator begin() const _NOEXCEPT {return const_iterator(__begin_node());}
    _LIBCPP_INLINE_VISIBILITY
          iterator end() _NOEXCEPT {return       iterator(__end_node());}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator end() const _NOEXCEPT {return const_iterator(__end_node());}

    _LIBCPP_INLINE_VISIBILITY
    size_type max_size() const _NOEXCEPT
        {return _VSTD::min<size_type>(
                __node_traits::max_size(__node_alloc()),
                numeric_limits<difference_type >::max());}

    _LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT;

    _LIBCPP_HIDE_FROM_ABI void swap(__tree& __t)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 11
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1156 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
        _NOEXCEPT_(
            __is_nothrow_swappable<value_compare>::value
            && (!__node_traits::propagate_on_container_swap::value ||
                 __is_nothrow_swappable<__node_allocator>::value)
            );
#else
# 1162 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
        _NOEXCEPT_(__is_nothrow_swappable<value_compare>::value);
#endif
# 1164 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3

    template <class _Key, class ..._Args>
    _LIBCPP_HIDE_FROM_ABI pair<iterator, bool>
    __emplace_unique_key_args(_Key const&, _Args&&... __args);
    template <class _Key, class ..._Args>
    _LIBCPP_HIDE_FROM_ABI pair<iterator, bool>
    __emplace_hint_unique_key_args(const_iterator, _Key const&, _Args&&...);

    template <class... _Args>
    _LIBCPP_HIDE_FROM_ABI pair<iterator, bool> __emplace_unique_impl(_Args&&... __args);

    template <class... _Args>
    _LIBCPP_HIDE_FROM_ABI iterator __emplace_hint_unique_impl(const_iterator __p, _Args&&... __args);

    template <class... _Args>
    _LIBCPP_HIDE_FROM_ABI iterator __emplace_multi(_Args&&... __args);

    template <class... _Args>
    _LIBCPP_HIDE_FROM_ABI iterator __emplace_hint_multi(const_iterator __p, _Args&&... __args);

    template <class _Pp>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> __emplace_unique(_Pp&& __x) {
        return __emplace_unique_extract_key(_VSTD::forward<_Pp>(__x),
                                            __can_extract_key<_Pp, key_type>());
    }

    template <class _First, class _Second,
              __enable_if_t<__can_extract_map_key<_First, key_type, __container_value_type>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool>
    __emplace_unique(_First&& __f, _Second&& __s) {
        return __emplace_unique_key_args(__f, _VSTD::forward<_First>(__f),
                                              _VSTD::forward<_Second>(__s));
    }

    template <class... _Args>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> __emplace_unique(_Args&&... __args) {
        return __emplace_unique_impl(_VSTD::forward<_Args>(__args)...);
    }

    template <class _Pp>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool>
    __emplace_unique_extract_key(_Pp&& __x, __extract_key_fail_tag) {
      return __emplace_unique_impl(_VSTD::forward<_Pp>(__x));
    }

    template <class _Pp>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool>
    __emplace_unique_extract_key(_Pp&& __x, __extract_key_self_tag) {
      return __emplace_unique_key_args(__x, _VSTD::forward<_Pp>(__x));
    }

    template <class _Pp>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool>
    __emplace_unique_extract_key(_Pp&& __x, __extract_key_first_tag) {
      return __emplace_unique_key_args(__x.first, _VSTD::forward<_Pp>(__x));
    }

    template <class _Pp>
    _LIBCPP_INLINE_VISIBILITY
    iterator __emplace_hint_unique(const_iterator __p, _Pp&& __x) {
        return __emplace_hint_unique_extract_key(__p, _VSTD::forward<_Pp>(__x),
                                            __can_extract_key<_Pp, key_type>());
    }

    template <class _First, class _Second,
              __enable_if_t<__can_extract_map_key<_First, key_type, __container_value_type>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    iterator
    __emplace_hint_unique(const_iterator __p, _First&& __f, _Second&& __s) {
        return __emplace_hint_unique_key_args(__p, __f,
                                              _VSTD::forward<_First>(__f),
                                              _VSTD::forward<_Second>(__s)).first;
    }

    template <class... _Args>
    _LIBCPP_INLINE_VISIBILITY
    iterator __emplace_hint_unique(const_iterator __p, _Args&&... __args) {
        return __emplace_hint_unique_impl(__p, _VSTD::forward<_Args>(__args)...);
    }

    template <class _Pp>
    _LIBCPP_INLINE_VISIBILITY
    iterator
    __emplace_hint_unique_extract_key(const_iterator __p, _Pp&& __x, __extract_key_fail_tag) {
      return __emplace_hint_unique_impl(__p, _VSTD::forward<_Pp>(__x));
    }

    template <class _Pp>
    _LIBCPP_INLINE_VISIBILITY
    iterator
    __emplace_hint_unique_extract_key(const_iterator __p, _Pp&& __x, __extract_key_self_tag) {
      return __emplace_hint_unique_key_args(__p, __x, _VSTD::forward<_Pp>(__x)).first;
    }

    template <class _Pp>
    _LIBCPP_INLINE_VISIBILITY
    iterator
    __emplace_hint_unique_extract_key(const_iterator __p, _Pp&& __x, __extract_key_first_tag) {
      return __emplace_hint_unique_key_args(__p, __x.first, _VSTD::forward<_Pp>(__x)).first;
    }

    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> __insert_unique(const __container_value_type& __v) {
        return __emplace_unique_key_args(_NodeTypes::__get_key(__v), __v);
    }

    _LIBCPP_INLINE_VISIBILITY
    iterator __insert_unique(const_iterator __p, const __container_value_type& __v) {
        return __emplace_hint_unique_key_args(__p, _NodeTypes::__get_key(__v), __v).first;
    }

    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> __insert_unique(__container_value_type&& __v) {
        return __emplace_unique_key_args(_NodeTypes::__get_key(__v), _VSTD::move(__v));
    }

    _LIBCPP_INLINE_VISIBILITY
    iterator __insert_unique(const_iterator __p, __container_value_type&& __v) {
        return __emplace_hint_unique_key_args(__p, _NodeTypes::__get_key(__v), _VSTD::move(__v)).first;
    }

    template <class _Vp,
              class = __enable_if_t<!is_same<__remove_const_ref_t<_Vp>, __container_value_type>::value> >
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> __insert_unique(_Vp&& __v) {
        return __emplace_unique(_VSTD::forward<_Vp>(__v));
    }

    template <class _Vp,
              class = __enable_if_t<!is_same<__remove_const_ref_t<_Vp>, __container_value_type>::value> >
    _LIBCPP_INLINE_VISIBILITY
    iterator __insert_unique(const_iterator __p, _Vp&& __v) {
        return __emplace_hint_unique(__p, _VSTD::forward<_Vp>(__v));
    }

    _LIBCPP_INLINE_VISIBILITY
    iterator __insert_multi(__container_value_type&& __v) {
        return __emplace_multi(_VSTD::move(__v));
    }

    _LIBCPP_INLINE_VISIBILITY
    iterator __insert_multi(const_iterator __p, __container_value_type&& __v) {
        return __emplace_hint_multi(__p, _VSTD::move(__v));
    }

    template <class _Vp>
    _LIBCPP_INLINE_VISIBILITY
    iterator __insert_multi(_Vp&& __v) {
        return __emplace_multi(_VSTD::forward<_Vp>(__v));
    }

    template <class _Vp>
    _LIBCPP_INLINE_VISIBILITY
    iterator __insert_multi(const_iterator __p, _Vp&& __v) {
        return __emplace_hint_multi(__p, _VSTD::forward<_Vp>(__v));
    }

    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> __node_assign_unique(const __container_value_type& __v, __node_pointer __dest);

    _LIBCPP_INLINE_VISIBILITY
    iterator __node_insert_multi(__node_pointer __nd);
    _LIBCPP_INLINE_VISIBILITY
    iterator __node_insert_multi(const_iterator __p, __node_pointer __nd);


    _LIBCPP_INLINE_VISIBILITY iterator
    __remove_node_pointer(__node_pointer) _NOEXCEPT;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1340 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
    template <class _NodeHandle, class _InsertReturnType>
    _LIBCPP_INLINE_VISIBILITY
    _InsertReturnType __node_handle_insert_unique(_NodeHandle&&);
    template <class _NodeHandle>
    _LIBCPP_INLINE_VISIBILITY
    iterator __node_handle_insert_unique(const_iterator, _NodeHandle&&);
    template <class _Tree>
    _LIBCPP_INLINE_VISIBILITY
    void __node_handle_merge_unique(_Tree& __source);

    template <class _NodeHandle>
    _LIBCPP_INLINE_VISIBILITY
    iterator __node_handle_insert_multi(_NodeHandle&&);
    template <class _NodeHandle>
    _LIBCPP_INLINE_VISIBILITY
    iterator __node_handle_insert_multi(const_iterator, _NodeHandle&&);
    template <class _Tree>
    _LIBCPP_INLINE_VISIBILITY
    void __node_handle_merge_multi(_Tree& __source);


    template <class _NodeHandle>
    _LIBCPP_INLINE_VISIBILITY
    _NodeHandle __node_handle_extract(key_type const&);
    template <class _NodeHandle>
    _LIBCPP_INLINE_VISIBILITY
    _NodeHandle __node_handle_extract(const_iterator);
#endif
# 1368 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3

    _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __p);
    _LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __f, const_iterator __l);
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI size_type __erase_unique(const _Key& __k);
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI size_type __erase_multi(const _Key& __k);

    _LIBCPP_HIDE_FROM_ABI void __insert_node_at(__parent_pointer     __parent,
                          __node_base_pointer& __child,
                          __node_base_pointer __new_node) _NOEXCEPT;

    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI iterator find(const _Key& __v);
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI const_iterator find(const _Key& __v) const;

    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI size_type __count_unique(const _Key& __k) const;
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI size_type __count_multi(const _Key& __k) const;

    template <class _Key>
        _LIBCPP_INLINE_VISIBILITY
        iterator lower_bound(const _Key& __v)
            {return __lower_bound(__v, __root(), __end_node());}
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI iterator __lower_bound(const _Key& __v,
                               __node_pointer __root,
                               __iter_pointer __result);
    template <class _Key>
        _LIBCPP_INLINE_VISIBILITY
        const_iterator lower_bound(const _Key& __v) const
            {return __lower_bound(__v, __root(), __end_node());}
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI const_iterator __lower_bound(const _Key& __v,
                                     __node_pointer __root,
                                     __iter_pointer __result) const;
    template <class _Key>
        _LIBCPP_INLINE_VISIBILITY
        iterator upper_bound(const _Key& __v)
            {return __upper_bound(__v, __root(), __end_node());}
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI iterator __upper_bound(const _Key& __v,
                               __node_pointer __root,
                               __iter_pointer __result);
    template <class _Key>
        _LIBCPP_INLINE_VISIBILITY
        const_iterator upper_bound(const _Key& __v) const
            {return __upper_bound(__v, __root(), __end_node());}
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI const_iterator __upper_bound(const _Key& __v,
                                     __node_pointer __root,
                                     __iter_pointer __result) const;
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI pair<iterator, iterator>
        __equal_range_unique(const _Key& __k);
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI pair<const_iterator, const_iterator>
        __equal_range_unique(const _Key& __k) const;

    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI pair<iterator, iterator>
        __equal_range_multi(const _Key& __k);
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI pair<const_iterator, const_iterator>
        __equal_range_multi(const _Key& __k) const;

    typedef __tree_node_destructor<__node_allocator> _Dp;
    typedef unique_ptr<__node, _Dp> __node_holder;

    _LIBCPP_HIDE_FROM_ABI __node_holder remove(const_iterator __p) _NOEXCEPT;
private:
    _LIBCPP_HIDE_FROM_ABI __node_base_pointer& __find_leaf_low(__parent_pointer& __parent, const key_type& __v);
    _LIBCPP_HIDE_FROM_ABI __node_base_pointer& __find_leaf_high(__parent_pointer& __parent, const key_type& __v);
    _LIBCPP_HIDE_FROM_ABI __node_base_pointer&
    __find_leaf(const_iterator __hint, __parent_pointer& __parent, const key_type& __v);
    // FIXME: Make this function const qualified. Unfortunately doing so
    // breaks existing code which uses non-const callable comparators.
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI __node_base_pointer& __find_equal(__parent_pointer& __parent, const _Key& __v);
    template <class _Key>
    _LIBCPP_INLINE_VISIBILITY __node_base_pointer&
    __find_equal(__parent_pointer& __parent, const _Key& __v) const {
      return const_cast<__tree*>(this)->__find_equal(__parent, __v);
    }
    template <class _Key>
    _LIBCPP_HIDE_FROM_ABI __node_base_pointer&
        __find_equal(const_iterator __hint, __parent_pointer& __parent,
                     __node_base_pointer& __dummy,
                     const _Key& __v);

    template <class ..._Args>
    _LIBCPP_HIDE_FROM_ABI __node_holder __construct_node(_Args&& ...__args);

    // TODO: Make this _LIBCPP_HIDE_FROM_ABI
    _LIBCPP_HIDDEN void destroy(__node_pointer __nd) _NOEXCEPT;

    _LIBCPP_INLINE_VISIBILITY
    void __copy_assign_alloc(const __tree& __t)
        {__copy_assign_alloc(__t, integral_constant<bool,
             __node_traits::propagate_on_container_copy_assignment::value>());}

    _LIBCPP_INLINE_VISIBILITY
    void __copy_assign_alloc(const __tree& __t, true_type)
        {
        if (__node_alloc() != __t.__node_alloc())
            clear();
        __node_alloc() = __t.__node_alloc();
        }
    _LIBCPP_INLINE_VISIBILITY
    void __copy_assign_alloc(const __tree&, false_type) {}

    _LIBCPP_HIDE_FROM_ABI void __move_assign(__tree& __t, false_type);
    _LIBCPP_HIDE_FROM_ABI void __move_assign(__tree& __t, true_type)
        _NOEXCEPT_(is_nothrow_move_assignable<value_compare>::value &&
                   is_nothrow_move_assignable<__node_allocator>::value);

    _LIBCPP_INLINE_VISIBILITY
    void __move_assign_alloc(__tree& __t)
        _NOEXCEPT_(
            !__node_traits::propagate_on_container_move_assignment::value ||
            is_nothrow_move_assignable<__node_allocator>::value)
        {__move_assign_alloc(__t, integral_constant<bool,
             __node_traits::propagate_on_container_move_assignment::value>());}

    _LIBCPP_INLINE_VISIBILITY
    void __move_assign_alloc(__tree& __t, true_type)
        _NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value)
        {__node_alloc() = _VSTD::move(__t.__node_alloc());}
    _LIBCPP_INLINE_VISIBILITY
    void __move_assign_alloc(__tree&, false_type) _NOEXCEPT {}

    struct _DetachedTreeCache {
      _LIBCPP_INLINE_VISIBILITY
      explicit _DetachedTreeCache(__tree *__t) _NOEXCEPT : __t_(__t),
        __cache_root_(__detach_from_tree(__t)) {
          __advance();
        }

      _LIBCPP_INLINE_VISIBILITY
      __node_pointer __get() const _NOEXCEPT {
        return __cache_elem_;
      }

      _LIBCPP_INLINE_VISIBILITY
      void __advance() _NOEXCEPT {
        __cache_elem_ = __cache_root_;
        if (__cache_root_) {
          __cache_root_ = __detach_next(__cache_root_);
        }
      }

      _LIBCPP_INLINE_VISIBILITY
      ~_DetachedTreeCache() {
        __t_->destroy(__cache_elem_);
        if (__cache_root_) {
          while (__cache_root_->__parent_ != nullptr)
            __cache_root_ = static_cast<__node_pointer>(__cache_root_->__parent_);
          __t_->destroy(__cache_root_);
        }
      }

       _DetachedTreeCache(_DetachedTreeCache const&) = delete;
       _DetachedTreeCache& operator=(_DetachedTreeCache const&) = delete;

    private:
      _LIBCPP_INLINE_VISIBILITY
      static __node_pointer __detach_from_tree(__tree *__t) _NOEXCEPT;
      _LIBCPP_INLINE_VISIBILITY
      static __node_pointer __detach_next(__node_pointer) _NOEXCEPT;

      __tree *__t_;
      __node_pointer __cache_root_;
      __node_pointer __cache_elem_;
    };


    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
};

template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::__tree(const value_compare& __comp)
        _NOEXCEPT_(
            is_nothrow_default_constructible<__node_allocator>::value &&
            is_nothrow_copy_constructible<value_compare>::value)
    : __pair3_(0, __comp)
{
    __begin_node() = __end_node();
}

template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::__tree(const allocator_type& __a)
    : __begin_node_(__iter_pointer()),
      __pair1_(__default_init_tag(), __node_allocator(__a)),
      __pair3_(0, __default_init_tag())
{
    __begin_node() = __end_node();
}

template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::__tree(const value_compare& __comp,
                                           const allocator_type& __a)
    : __begin_node_(__iter_pointer()),
      __pair1_(__default_init_tag(), __node_allocator(__a)),
      __pair3_(0, __comp)
{
    __begin_node() = __end_node();
}

// Precondition:  size() != 0
template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::__node_pointer
__tree<_Tp, _Compare, _Allocator>::_DetachedTreeCache::__detach_from_tree(__tree *__t) _NOEXCEPT
{
    __node_pointer __cache = static_cast<__node_pointer>(__t->__begin_node());
    __t->__begin_node() = __t->__end_node();
    __t->__end_node()->__left_->__parent_ = nullptr;
    __t->__end_node()->__left_ = nullptr;
    __t->size() = 0;
    // __cache->__left_ == nullptr
    if (__cache->__right_ != nullptr)
        __cache = static_cast<__node_pointer>(__cache->__right_);
    // __cache->__left_ == nullptr
    // __cache->__right_ == nullptr
    return __cache;
}

// Precondition:  __cache != nullptr
//    __cache->left_ == nullptr
//    __cache->right_ == nullptr
//    This is no longer a red-black tree
template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::__node_pointer
__tree<_Tp, _Compare, _Allocator>::_DetachedTreeCache::__detach_next(__node_pointer __cache) _NOEXCEPT
{
    if (__cache->__parent_ == nullptr)
        return nullptr;
    if (_VSTD::__tree_is_left_child(static_cast<__node_base_pointer>(__cache)))
    {
        __cache->__parent_->__left_ = nullptr;
        __cache = static_cast<__node_pointer>(__cache->__parent_);
        if (__cache->__right_ == nullptr)
            return __cache;
        return static_cast<__node_pointer>(_VSTD::__tree_leaf(__cache->__right_));
    }
    // __cache is right child
    __cache->__parent_unsafe()->__right_ = nullptr;
    __cache = static_cast<__node_pointer>(__cache->__parent_);
    if (__cache->__left_ == nullptr)
        return __cache;
    return static_cast<__node_pointer>(_VSTD::__tree_leaf(__cache->__left_));
}

template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>&
__tree<_Tp, _Compare, _Allocator>::operator=(const __tree& __t)
{
    if (this != _VSTD::addressof(__t))
    {
        value_comp() = __t.value_comp();
        __copy_assign_alloc(__t);
        __assign_multi(__t.begin(), __t.end());
    }
    return *this;
}

template <class _Tp, class _Compare, class _Allocator>
template <class _ForwardIterator>
void
__tree<_Tp, _Compare, _Allocator>::__assign_unique(_ForwardIterator __first, _ForwardIterator __last)
{
    typedef iterator_traits<_ForwardIterator> _ITraits;
    typedef typename _ITraits::value_type _ItValueType;
    static_assert((is_same<_ItValueType, __container_value_type>::value),
                  "__assign_unique may only be called with the containers value type");
    static_assert(__has_forward_iterator_category<_ForwardIterator>::value,
                  "__assign_unique requires a forward iterator");
    if (size() != 0)
    {
        _DetachedTreeCache __cache(this);
          for (; __cache.__get() != nullptr && __first != __last; ++__first) {
              if (__node_assign_unique(*__first, __cache.__get()).second)
                  __cache.__advance();
            }
    }
    for (; __first != __last; ++__first)
        __insert_unique(*__first);
}

template <class _Tp, class _Compare, class _Allocator>
template <class _InputIterator>
void
__tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _InputIterator __last)
{
    typedef iterator_traits<_InputIterator> _ITraits;
    typedef typename _ITraits::value_type _ItValueType;
    static_assert((is_same<_ItValueType, __container_value_type>::value ||
                  is_same<_ItValueType, __node_value_type>::value),
                  "__assign_multi may only be called with the containers value type"
                  " or the nodes value type");
    if (size() != 0)
    {
        _DetachedTreeCache __cache(this);
        for (; __cache.__get() && __first != __last; ++__first) {
            __cache.__get()->__value_ = *__first;
            __node_insert_multi(__cache.__get());
            __cache.__advance();
        }
    }
    for (; __first != __last; ++__first)
        __insert_multi(_NodeTypes::__get_value(*__first));
}

template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::__tree(const __tree& __t)
    : __begin_node_(__iter_pointer()),
      __pair1_(__default_init_tag(), __node_traits::select_on_container_copy_construction(__t.__node_alloc())),
      __pair3_(0, __t.value_comp())
{
    __begin_node() = __end_node();
}

template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t)
    _NOEXCEPT_(
        is_nothrow_move_constructible<__node_allocator>::value &&
        is_nothrow_move_constructible<value_compare>::value)
    : __begin_node_(_VSTD::move(__t.__begin_node_)),
      __pair1_(_VSTD::move(__t.__pair1_)),
      __pair3_(_VSTD::move(__t.__pair3_))
{
    if (size() == 0)
        __begin_node() = __end_node();
    else
    {
        __end_node()->__left_->__parent_ = static_cast<__parent_pointer>(__end_node());
        __t.__begin_node() = __t.__end_node();
        __t.__end_node()->__left_ = nullptr;
        __t.size() = 0;
    }
}

template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t, const allocator_type& __a)
    : __pair1_(__default_init_tag(), __node_allocator(__a)),
      __pair3_(0, _VSTD::move(__t.value_comp()))
{
    if (__a == __t.__alloc())
    {
        if (__t.size() == 0)
            __begin_node() = __end_node();
        else
        {
            __begin_node() = __t.__begin_node();
            __end_node()->__left_ = __t.__end_node()->__left_;
            __end_node()->__left_->__parent_ = static_cast<__parent_pointer>(__end_node());
            size() = __t.size();
            __t.__begin_node() = __t.__end_node();
            __t.__end_node()->__left_ = nullptr;
            __t.size() = 0;
        }
    }
    else
    {
        __begin_node() = __end_node();
    }
}

template <class _Tp, class _Compare, class _Allocator>
void
__tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, true_type)
    _NOEXCEPT_(is_nothrow_move_assignable<value_compare>::value &&
               is_nothrow_move_assignable<__node_allocator>::value)
{
    destroy(static_cast<__node_pointer>(__end_node()->__left_));
    __begin_node_ = __t.__begin_node_;
    __pair1_.first() = __t.__pair1_.first();
    __move_assign_alloc(__t);
    __pair3_ = _VSTD::move(__t.__pair3_);
    if (size() == 0)
        __begin_node() = __end_node();
    else
    {
        __end_node()->__left_->__parent_ = static_cast<__parent_pointer>(__end_node());
        __t.__begin_node() = __t.__end_node();
        __t.__end_node()->__left_ = nullptr;
        __t.size() = 0;
    }
}

template <class _Tp, class _Compare, class _Allocator>
void
__tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type)
{
    if (__node_alloc() == __t.__node_alloc())
        __move_assign(__t, true_type());
    else
    {
        value_comp() = _VSTD::move(__t.value_comp());
        const_iterator __e = end();
        if (size() != 0)
        {
            _DetachedTreeCache __cache(this);
            while (__cache.__get() != nullptr && __t.size() != 0) {
              __cache.__get()->__value_ = _VSTD::move(__t.remove(__t.begin())->__value_);
              __node_insert_multi(__cache.__get());
              __cache.__advance();
            }
        }
        while (__t.size() != 0)
            __insert_multi(__e, _NodeTypes::__move(__t.remove(__t.begin())->__value_));
    }
}

template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>&
__tree<_Tp, _Compare, _Allocator>::operator=(__tree&& __t)
    _NOEXCEPT_(
        __node_traits::propagate_on_container_move_assignment::value &&
        is_nothrow_move_assignable<value_compare>::value &&
        is_nothrow_move_assignable<__node_allocator>::value)

{
    __move_assign(__t, integral_constant<bool,
                  __node_traits::propagate_on_container_move_assignment::value>());
    return *this;
}

template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::~__tree()
{
    static_assert((is_copy_constructible<value_compare>::value),
                 "Comparator must be copy-constructible.");
  destroy(__root());
}

template <class _Tp, class _Compare, class _Allocator>
void
__tree<_Tp, _Compare, _Allocator>::destroy(__node_pointer __nd) _NOEXCEPT
{
    if (__nd != nullptr)
    {
        destroy(static_cast<__node_pointer>(__nd->__left_));
        destroy(static_cast<__node_pointer>(__nd->__right_));
        __node_allocator& __na = __node_alloc();
        __node_traits::destroy(__na, _NodeTypes::__get_ptr(__nd->__value_));
        __node_traits::deallocate(__na, __nd, 1);
    }
}

template <class _Tp, class _Compare, class _Allocator>
void
__tree<_Tp, _Compare, _Allocator>::swap(__tree& __t)
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 11
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1824 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
        _NOEXCEPT_(
            __is_nothrow_swappable<value_compare>::value
            && (!__node_traits::propagate_on_container_swap::value ||
                 __is_nothrow_swappable<__node_allocator>::value)
            )
#else
# 1830 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
        _NOEXCEPT_(__is_nothrow_swappable<value_compare>::value)
#endif
# 1832 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
{
    using _VSTD::swap;
    swap(__begin_node_, __t.__begin_node_);
    swap(__pair1_.first(), __t.__pair1_.first());
    _VSTD::__swap_allocator(__node_alloc(), __t.__node_alloc());
    __pair3_.swap(__t.__pair3_);
    if (size() == 0)
        __begin_node() = __end_node();
    else
        __end_node()->__left_->__parent_ = static_cast<__parent_pointer>(__end_node());
    if (__t.size() == 0)
        __t.__begin_node() = __t.__end_node();
    else
        __t.__end_node()->__left_->__parent_ = static_cast<__parent_pointer>(__t.__end_node());
}

template <class _Tp, class _Compare, class _Allocator>
void
__tree<_Tp, _Compare, _Allocator>::clear() _NOEXCEPT
{
    destroy(__root());
    size() = 0;
    __begin_node() = __end_node();
    __end_node()->__left_ = nullptr;
}

// Find lower_bound place to insert
// Set __parent to parent of null leaf
// Return reference to null leaf
template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer&
__tree<_Tp, _Compare, _Allocator>::__find_leaf_low(__parent_pointer& __parent,
                                                   const key_type& __v)
{
    __node_pointer __nd = __root();
    if (__nd != nullptr)
    {
        while (true)
        {
            if (value_comp()(__nd->__value_, __v))
            {
                if (__nd->__right_ != nullptr)
                    __nd = static_cast<__node_pointer>(__nd->__right_);
                else
                {
                    __parent = static_cast<__parent_pointer>(__nd);
                    return __nd->__right_;
                }
            }
            else
            {
                if (__nd->__left_ != nullptr)
                    __nd = static_cast<__node_pointer>(__nd->__left_);
                else
                {
                    __parent = static_cast<__parent_pointer>(__nd);
                    return __parent->__left_;
                }
            }
        }
    }
    __parent = static_cast<__parent_pointer>(__end_node());
    return __parent->__left_;
}

// Find upper_bound place to insert
// Set __parent to parent of null leaf
// Return reference to null leaf
template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer&
__tree<_Tp, _Compare, _Allocator>::__find_leaf_high(__parent_pointer& __parent,
                                                    const key_type& __v)
{
    __node_pointer __nd = __root();
    if (__nd != nullptr)
    {
        while (true)
        {
            if (value_comp()(__v, __nd->__value_))
            {
                if (__nd->__left_ != nullptr)
                    __nd = static_cast<__node_pointer>(__nd->__left_);
                else
                {
                    __parent = static_cast<__parent_pointer>(__nd);
                    return __parent->__left_;
                }
            }
            else
            {
                if (__nd->__right_ != nullptr)
                    __nd = static_cast<__node_pointer>(__nd->__right_);
                else
                {
                    __parent = static_cast<__parent_pointer>(__nd);
                    return __nd->__right_;
                }
            }
        }
    }
    __parent = static_cast<__parent_pointer>(__end_node());
    return __parent->__left_;
}

// Find leaf place to insert closest to __hint
// First check prior to __hint.
// Next check after __hint.
// Next do O(log N) search.
// Set __parent to parent of null leaf
// Return reference to null leaf
template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer&
__tree<_Tp, _Compare, _Allocator>::__find_leaf(const_iterator __hint,
                                               __parent_pointer& __parent,
                                               const key_type& __v)
{
    if (__hint == end() || !value_comp()(*__hint, __v))  // check before
    {
        // __v <= *__hint
        const_iterator __prior = __hint;
        if (__prior == begin() || !value_comp()(__v, *--__prior))
        {
            // *prev(__hint) <= __v <= *__hint
            if (__hint.__ptr_->__left_ == nullptr)
            {
                __parent = static_cast<__parent_pointer>(__hint.__ptr_);
                return __parent->__left_;
            }
            else
            {
                __parent = static_cast<__parent_pointer>(__prior.__ptr_);
                return static_cast<__node_base_pointer>(__prior.__ptr_)->__right_;
            }
        }
        // __v < *prev(__hint)
        return __find_leaf_high(__parent, __v);
    }
    // else __v > *__hint
    return __find_leaf_low(__parent, __v);
}

// Find place to insert if __v doesn't exist
// Set __parent to parent of null leaf
// Return reference to null leaf
// If __v exists, set parent to node of __v and return reference to node of __v
template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer&
__tree<_Tp, _Compare, _Allocator>::__find_equal(__parent_pointer& __parent,
                                                const _Key& __v)
{
    __node_pointer __nd = __root();
    __node_base_pointer* __nd_ptr = __root_ptr();
    if (__nd != nullptr)
    {
        while (true)
        {
            if (value_comp()(__v, __nd->__value_))
            {
                if (__nd->__left_ != nullptr) {
                    __nd_ptr = _VSTD::addressof(__nd->__left_);
                    __nd = static_cast<__node_pointer>(__nd->__left_);
                } else {
                    __parent = static_cast<__parent_pointer>(__nd);
                    return __parent->__left_;
                }
            }
            else if (value_comp()(__nd->__value_, __v))
            {
                if (__nd->__right_ != nullptr) {
                    __nd_ptr = _VSTD::addressof(__nd->__right_);
                    __nd = static_cast<__node_pointer>(__nd->__right_);
                } else {
                    __parent = static_cast<__parent_pointer>(__nd);
                    return __nd->__right_;
                }
            }
            else
            {
                __parent = static_cast<__parent_pointer>(__nd);
                return *__nd_ptr;
            }
        }
    }
    __parent = static_cast<__parent_pointer>(__end_node());
    return __parent->__left_;
}

// Find place to insert if __v doesn't exist
// First check prior to __hint.
// Next check after __hint.
// Next do O(log N) search.
// Set __parent to parent of null leaf
// Return reference to null leaf
// If __v exists, set parent to node of __v and return reference to node of __v
template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer&
__tree<_Tp, _Compare, _Allocator>::__find_equal(const_iterator __hint,
                                                __parent_pointer& __parent,
                                                __node_base_pointer& __dummy,
                                                const _Key& __v)
{
    if (__hint == end() || value_comp()(__v, *__hint))  // check before
    {
        // __v < *__hint
        const_iterator __prior = __hint;
        if (__prior == begin() || value_comp()(*--__prior, __v))
        {
            // *prev(__hint) < __v < *__hint
            if (__hint.__ptr_->__left_ == nullptr)
            {
                __parent = static_cast<__parent_pointer>(__hint.__ptr_);
                return __parent->__left_;
            }
            else
            {
                __parent = static_cast<__parent_pointer>(__prior.__ptr_);
                return static_cast<__node_base_pointer>(__prior.__ptr_)->__right_;
            }
        }
        // __v <= *prev(__hint)
        return __find_equal(__parent, __v);
    }
    else if (value_comp()(*__hint, __v))  // check after
    {
        // *__hint < __v
        const_iterator __next = _VSTD::next(__hint);
        if (__next == end() || value_comp()(__v, *__next))
        {
            // *__hint < __v < *_VSTD::next(__hint)
            if (__hint.__get_np()->__right_ == nullptr)
            {
                __parent = static_cast<__parent_pointer>(__hint.__ptr_);
                return static_cast<__node_base_pointer>(__hint.__ptr_)->__right_;
            }
            else
            {
                __parent = static_cast<__parent_pointer>(__next.__ptr_);
                return __parent->__left_;
            }
        }
        // *next(__hint) <= __v
        return __find_equal(__parent, __v);
    }
    // else __v == *__hint
    __parent = static_cast<__parent_pointer>(__hint.__ptr_);
    __dummy = static_cast<__node_base_pointer>(__hint.__ptr_);
    return __dummy;
}

template <class _Tp, class _Compare, class _Allocator>
void __tree<_Tp, _Compare, _Allocator>::__insert_node_at(
    __parent_pointer __parent, __node_base_pointer& __child,
    __node_base_pointer __new_node) _NOEXCEPT
{
    __new_node->__left_   = nullptr;
    __new_node->__right_  = nullptr;
    __new_node->__parent_ = __parent;
    // __new_node->__is_black_ is initialized in __tree_balance_after_insert
    __child = __new_node;
    if (__begin_node()->__left_ != nullptr)
        __begin_node() = static_cast<__iter_pointer>(__begin_node()->__left_);
    _VSTD::__tree_balance_after_insert(__end_node()->__left_, __child);
    ++size();
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key, class... _Args>
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
__tree<_Tp, _Compare, _Allocator>::__emplace_unique_key_args(_Key const& __k, _Args&&... __args)
{
    __parent_pointer __parent;
    __node_base_pointer& __child = __find_equal(__parent, __k);
    __node_pointer __r = static_cast<__node_pointer>(__child);
    bool __inserted = false;
    if (__child == nullptr)
    {
        __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
        __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
        __r = __h.release();
        __inserted = true;
    }
    return pair<iterator, bool>(iterator(__r), __inserted);
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key, class... _Args>
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
__tree<_Tp, _Compare, _Allocator>::__emplace_hint_unique_key_args(
    const_iterator __p, _Key const& __k, _Args&&... __args)
{
    __parent_pointer __parent;
    __node_base_pointer __dummy;
    __node_base_pointer& __child = __find_equal(__p, __parent, __dummy, __k);
    __node_pointer __r = static_cast<__node_pointer>(__child);
    bool __inserted = false;
    if (__child == nullptr)
    {
        __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
        __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
        __r = __h.release();
        __inserted = true;
    }
    return pair<iterator, bool>(iterator(__r), __inserted);
}

template <class _Tp, class _Compare, class _Allocator>
template <class ..._Args>
typename __tree<_Tp, _Compare, _Allocator>::__node_holder
__tree<_Tp, _Compare, _Allocator>::__construct_node(_Args&& ...__args)
{
    static_assert(!__is_tree_value_type<_Args...>::value,
                  "Cannot construct from __value_type");
    __node_allocator& __na = __node_alloc();
    __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
    __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), _VSTD::forward<_Args>(__args)...);
    __h.get_deleter().__value_constructed = true;
    return __h;
}


template <class _Tp, class _Compare, class _Allocator>
template <class... _Args>
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
__tree<_Tp, _Compare, _Allocator>::__emplace_unique_impl(_Args&&... __args)
{
    __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
    __parent_pointer __parent;
    __node_base_pointer& __child = __find_equal(__parent, __h->__value_);
    __node_pointer __r = static_cast<__node_pointer>(__child);
    bool __inserted = false;
    if (__child == nullptr)
    {
        __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
        __r = __h.release();
        __inserted = true;
    }
    return pair<iterator, bool>(iterator(__r), __inserted);
}

template <class _Tp, class _Compare, class _Allocator>
template <class... _Args>
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::__emplace_hint_unique_impl(const_iterator __p, _Args&&... __args)
{
    __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
    __parent_pointer __parent;
    __node_base_pointer __dummy;
    __node_base_pointer& __child = __find_equal(__p, __parent, __dummy, __h->__value_);
    __node_pointer __r = static_cast<__node_pointer>(__child);
    if (__child == nullptr)
    {
        __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
        __r = __h.release();
    }
    return iterator(__r);
}

template <class _Tp, class _Compare, class _Allocator>
template <class... _Args>
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::__emplace_multi(_Args&&... __args)
{
    __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
    __parent_pointer __parent;
    __node_base_pointer& __child = __find_leaf_high(__parent, _NodeTypes::__get_key(__h->__value_));
    __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
    return iterator(static_cast<__node_pointer>(__h.release()));
}

template <class _Tp, class _Compare, class _Allocator>
template <class... _Args>
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::__emplace_hint_multi(const_iterator __p,
                                                        _Args&&... __args)
{
    __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
    __parent_pointer __parent;
    __node_base_pointer& __child = __find_leaf(__p, __parent, _NodeTypes::__get_key(__h->__value_));
    __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
    return iterator(static_cast<__node_pointer>(__h.release()));
}

template <class _Tp, class _Compare, class _Allocator>
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
__tree<_Tp, _Compare, _Allocator>::__node_assign_unique(const __container_value_type& __v, __node_pointer __nd)
{
    __parent_pointer __parent;
    __node_base_pointer& __child = __find_equal(__parent, _NodeTypes::__get_key(__v));
    __node_pointer __r = static_cast<__node_pointer>(__child);
    bool __inserted = false;
    if (__child == nullptr)
    {
        __nd->__value_ = __v;
        __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__nd));
        __r = __nd;
        __inserted = true;
    }
    return pair<iterator, bool>(iterator(__r), __inserted);
}


template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::__node_insert_multi(__node_pointer __nd)
{
    __parent_pointer __parent;
    __node_base_pointer& __child = __find_leaf_high(__parent, _NodeTypes::__get_key(__nd->__value_));
    __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__nd));
    return iterator(__nd);
}

template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::__node_insert_multi(const_iterator __p,
                                                       __node_pointer __nd)
{
    __parent_pointer __parent;
    __node_base_pointer& __child = __find_leaf(__p, __parent, _NodeTypes::__get_key(__nd->__value_));
    __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__nd));
    return iterator(__nd);
}

template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::__remove_node_pointer(__node_pointer __ptr) _NOEXCEPT
{
    iterator __r(__ptr);
    ++__r;
    if (__begin_node() == __ptr)
        __begin_node() = __r.__ptr_;
    --size();
    _VSTD::__tree_remove(__end_node()->__left_,
                         static_cast<__node_base_pointer>(__ptr));
    return __r;
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2271 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
template <class _Tp, class _Compare, class _Allocator>
template <class _NodeHandle, class _InsertReturnType>
_LIBCPP_INLINE_VISIBILITY
_InsertReturnType
__tree<_Tp, _Compare, _Allocator>::__node_handle_insert_unique(
    _NodeHandle&& __nh)
{
    if (__nh.empty())
        return _InsertReturnType{end(), false, _NodeHandle()};

    __node_pointer __ptr = __nh.__ptr_;
    __parent_pointer __parent;
    __node_base_pointer& __child = __find_equal(__parent,
                                                __ptr->__value_);
    if (__child != nullptr)
        return _InsertReturnType{
            iterator(static_cast<__node_pointer>(__child)),
            false, _VSTD::move(__nh)};

    __insert_node_at(__parent, __child,
                     static_cast<__node_base_pointer>(__ptr));
    __nh.__release_ptr();
    return _InsertReturnType{iterator(__ptr), true, _NodeHandle()};
}

template <class _Tp, class _Compare, class _Allocator>
template <class _NodeHandle>
_LIBCPP_INLINE_VISIBILITY
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::__node_handle_insert_unique(
    const_iterator __hint, _NodeHandle&& __nh)
{
    if (__nh.empty())
        return end();

    __node_pointer __ptr = __nh.__ptr_;
    __parent_pointer __parent;
    __node_base_pointer __dummy;
    __node_base_pointer& __child = __find_equal(__hint, __parent, __dummy,
                                                __ptr->__value_);
    __node_pointer __r = static_cast<__node_pointer>(__child);
    if (__child == nullptr)
    {
        __insert_node_at(__parent, __child,
                         static_cast<__node_base_pointer>(__ptr));
        __r = __ptr;
        __nh.__release_ptr();
    }
    return iterator(__r);
}

template <class _Tp, class _Compare, class _Allocator>
template <class _NodeHandle>
_LIBCPP_INLINE_VISIBILITY
_NodeHandle
__tree<_Tp, _Compare, _Allocator>::__node_handle_extract(key_type const& __key)
{
    iterator __it = find(__key);
    if (__it == end())
        return _NodeHandle();
    return __node_handle_extract<_NodeHandle>(__it);
}

template <class _Tp, class _Compare, class _Allocator>
template <class _NodeHandle>
_LIBCPP_INLINE_VISIBILITY
_NodeHandle
__tree<_Tp, _Compare, _Allocator>::__node_handle_extract(const_iterator __p)
{
    __node_pointer __np = __p.__get_np();
    __remove_node_pointer(__np);
    return _NodeHandle(__np, __alloc());
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Tree>
_LIBCPP_INLINE_VISIBILITY
void
__tree<_Tp, _Compare, _Allocator>::__node_handle_merge_unique(_Tree& __source)
{
    static_assert(is_same<typename _Tree::__node_pointer, __node_pointer>::value, "");

    for (typename _Tree::iterator __i = __source.begin();
         __i != __source.end();)
    {
        __node_pointer __src_ptr = __i.__get_np();
        __parent_pointer __parent;
        __node_base_pointer& __child =
            __find_equal(__parent, _NodeTypes::__get_key(__src_ptr->__value_));
        ++__i;
        if (__child != nullptr)
            continue;
        __source.__remove_node_pointer(__src_ptr);
        __insert_node_at(__parent, __child,
                         static_cast<__node_base_pointer>(__src_ptr));
    }
}

template <class _Tp, class _Compare, class _Allocator>
template <class _NodeHandle>
_LIBCPP_INLINE_VISIBILITY
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::__node_handle_insert_multi(_NodeHandle&& __nh)
{
    if (__nh.empty())
        return end();
    __node_pointer __ptr = __nh.__ptr_;
    __parent_pointer __parent;
    __node_base_pointer& __child = __find_leaf_high(
        __parent, _NodeTypes::__get_key(__ptr->__value_));
    __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__ptr));
    __nh.__release_ptr();
    return iterator(__ptr);
}

template <class _Tp, class _Compare, class _Allocator>
template <class _NodeHandle>
_LIBCPP_INLINE_VISIBILITY
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::__node_handle_insert_multi(
    const_iterator __hint, _NodeHandle&& __nh)
{
    if (__nh.empty())
        return end();

    __node_pointer __ptr = __nh.__ptr_;
    __parent_pointer __parent;
    __node_base_pointer& __child = __find_leaf(__hint, __parent,
                                               _NodeTypes::__get_key(__ptr->__value_));
    __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__ptr));
    __nh.__release_ptr();
    return iterator(__ptr);
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Tree>
_LIBCPP_INLINE_VISIBILITY
void
__tree<_Tp, _Compare, _Allocator>::__node_handle_merge_multi(_Tree& __source)
{
    static_assert(is_same<typename _Tree::__node_pointer, __node_pointer>::value, "");

    for (typename _Tree::iterator __i = __source.begin();
         __i != __source.end();)
    {
        __node_pointer __src_ptr = __i.__get_np();
        __parent_pointer __parent;
        __node_base_pointer& __child = __find_leaf_high(
            __parent, _NodeTypes::__get_key(__src_ptr->__value_));
        ++__i;
        __source.__remove_node_pointer(__src_ptr);
        __insert_node_at(__parent, __child,
                         static_cast<__node_base_pointer>(__src_ptr));
    }
}

#endif // _LIBCPP_STD_VER >= 17
# 2428 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3

template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::erase(const_iterator __p)
{
    __node_pointer __np = __p.__get_np();
    iterator __r = __remove_node_pointer(__np);
    __node_allocator& __na = __node_alloc();
    __node_traits::destroy(__na, _NodeTypes::__get_ptr(
        const_cast<__node_value_type&>(*__p)));
    __node_traits::deallocate(__na, __np, 1);
    return __r;
}

template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::erase(const_iterator __f, const_iterator __l)
{
    while (__f != __l)
        __f = erase(__f);
    return iterator(__l.__ptr_);
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::size_type
__tree<_Tp, _Compare, _Allocator>::__erase_unique(const _Key& __k)
{
    iterator __i = find(__k);
    if (__i == end())
        return 0;
    erase(__i);
    return 1;
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::size_type
__tree<_Tp, _Compare, _Allocator>::__erase_multi(const _Key& __k)
{
    pair<iterator, iterator> __p = __equal_range_multi(__k);
    size_type __r = 0;
    for (; __p.first != __p.second; ++__r)
        __p.first = erase(__p.first);
    return __r;
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::find(const _Key& __v)
{
    iterator __p = __lower_bound(__v, __root(), __end_node());
    if (__p != end() && !value_comp()(__v, *__p))
        return __p;
    return end();
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::const_iterator
__tree<_Tp, _Compare, _Allocator>::find(const _Key& __v) const
{
    const_iterator __p = __lower_bound(__v, __root(), __end_node());
    if (__p != end() && !value_comp()(__v, *__p))
        return __p;
    return end();
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::size_type
__tree<_Tp, _Compare, _Allocator>::__count_unique(const _Key& __k) const
{
    __node_pointer __rt = __root();
    while (__rt != nullptr)
    {
        if (value_comp()(__k, __rt->__value_))
        {
            __rt = static_cast<__node_pointer>(__rt->__left_);
        }
        else if (value_comp()(__rt->__value_, __k))
            __rt = static_cast<__node_pointer>(__rt->__right_);
        else
            return 1;
    }
    return 0;
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::size_type
__tree<_Tp, _Compare, _Allocator>::__count_multi(const _Key& __k) const
{
    __iter_pointer __result = __end_node();
    __node_pointer __rt = __root();
    while (__rt != nullptr)
    {
        if (value_comp()(__k, __rt->__value_))
        {
            __result = static_cast<__iter_pointer>(__rt);
            __rt = static_cast<__node_pointer>(__rt->__left_);
        }
        else if (value_comp()(__rt->__value_, __k))
            __rt = static_cast<__node_pointer>(__rt->__right_);
        else
            return _VSTD::distance(
                __lower_bound(__k, static_cast<__node_pointer>(__rt->__left_), static_cast<__iter_pointer>(__rt)),
                __upper_bound(__k, static_cast<__node_pointer>(__rt->__right_), __result)
            );
    }
    return 0;
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::__lower_bound(const _Key& __v,
                                                 __node_pointer __root,
                                                 __iter_pointer __result)
{
    while (__root != nullptr)
    {
        if (!value_comp()(__root->__value_, __v))
        {
            __result = static_cast<__iter_pointer>(__root);
            __root = static_cast<__node_pointer>(__root->__left_);
        }
        else
            __root = static_cast<__node_pointer>(__root->__right_);
    }
    return iterator(__result);
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::const_iterator
__tree<_Tp, _Compare, _Allocator>::__lower_bound(const _Key& __v,
                                                 __node_pointer __root,
                                                 __iter_pointer __result) const
{
    while (__root != nullptr)
    {
        if (!value_comp()(__root->__value_, __v))
        {
            __result = static_cast<__iter_pointer>(__root);
            __root = static_cast<__node_pointer>(__root->__left_);
        }
        else
            __root = static_cast<__node_pointer>(__root->__right_);
    }
    return const_iterator(__result);
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::iterator
__tree<_Tp, _Compare, _Allocator>::__upper_bound(const _Key& __v,
                                                 __node_pointer __root,
                                                 __iter_pointer __result)
{
    while (__root != nullptr)
    {
        if (value_comp()(__v, __root->__value_))
        {
            __result = static_cast<__iter_pointer>(__root);
            __root = static_cast<__node_pointer>(__root->__left_);
        }
        else
            __root = static_cast<__node_pointer>(__root->__right_);
    }
    return iterator(__result);
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::const_iterator
__tree<_Tp, _Compare, _Allocator>::__upper_bound(const _Key& __v,
                                                 __node_pointer __root,
                                                 __iter_pointer __result) const
{
    while (__root != nullptr)
    {
        if (value_comp()(__v, __root->__value_))
        {
            __result = static_cast<__iter_pointer>(__root);
            __root = static_cast<__node_pointer>(__root->__left_);
        }
        else
            __root = static_cast<__node_pointer>(__root->__right_);
    }
    return const_iterator(__result);
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator,
     typename __tree<_Tp, _Compare, _Allocator>::iterator>
__tree<_Tp, _Compare, _Allocator>::__equal_range_unique(const _Key& __k)
{
    typedef pair<iterator, iterator> _Pp;
    __iter_pointer __result = __end_node();
    __node_pointer __rt = __root();
    while (__rt != nullptr)
    {
        if (value_comp()(__k, __rt->__value_))
        {
            __result = static_cast<__iter_pointer>(__rt);
            __rt = static_cast<__node_pointer>(__rt->__left_);
        }
        else if (value_comp()(__rt->__value_, __k))
            __rt = static_cast<__node_pointer>(__rt->__right_);
        else
            return _Pp(iterator(__rt),
                      iterator(
                          __rt->__right_ != nullptr ?
                              static_cast<__iter_pointer>(_VSTD::__tree_min(__rt->__right_))
                            : __result));
    }
    return _Pp(iterator(__result), iterator(__result));
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
pair<typename __tree<_Tp, _Compare, _Allocator>::const_iterator,
     typename __tree<_Tp, _Compare, _Allocator>::const_iterator>
__tree<_Tp, _Compare, _Allocator>::__equal_range_unique(const _Key& __k) const
{
    typedef pair<const_iterator, const_iterator> _Pp;
    __iter_pointer __result = __end_node();
    __node_pointer __rt = __root();
    while (__rt != nullptr)
    {
        if (value_comp()(__k, __rt->__value_))
        {
            __result = static_cast<__iter_pointer>(__rt);
            __rt = static_cast<__node_pointer>(__rt->__left_);
        }
        else if (value_comp()(__rt->__value_, __k))
            __rt = static_cast<__node_pointer>(__rt->__right_);
        else
            return _Pp(const_iterator(__rt),
                      const_iterator(
                          __rt->__right_ != nullptr ?
                              static_cast<__iter_pointer>(_VSTD::__tree_min(__rt->__right_))
                            : __result));
    }
    return _Pp(const_iterator(__result), const_iterator(__result));
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator,
     typename __tree<_Tp, _Compare, _Allocator>::iterator>
__tree<_Tp, _Compare, _Allocator>::__equal_range_multi(const _Key& __k)
{
    typedef pair<iterator, iterator> _Pp;
    __iter_pointer __result = __end_node();
    __node_pointer __rt = __root();
    while (__rt != nullptr)
    {
        if (value_comp()(__k, __rt->__value_))
        {
            __result = static_cast<__iter_pointer>(__rt);
            __rt = static_cast<__node_pointer>(__rt->__left_);
        }
        else if (value_comp()(__rt->__value_, __k))
            __rt = static_cast<__node_pointer>(__rt->__right_);
        else
            return _Pp(__lower_bound(__k, static_cast<__node_pointer>(__rt->__left_), static_cast<__iter_pointer>(__rt)),
                      __upper_bound(__k, static_cast<__node_pointer>(__rt->__right_), __result));
    }
    return _Pp(iterator(__result), iterator(__result));
}

template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
pair<typename __tree<_Tp, _Compare, _Allocator>::const_iterator,
     typename __tree<_Tp, _Compare, _Allocator>::const_iterator>
__tree<_Tp, _Compare, _Allocator>::__equal_range_multi(const _Key& __k) const
{
    typedef pair<const_iterator, const_iterator> _Pp;
    __iter_pointer __result = __end_node();
    __node_pointer __rt = __root();
    while (__rt != nullptr)
    {
        if (value_comp()(__k, __rt->__value_))
        {
            __result = static_cast<__iter_pointer>(__rt);
            __rt = static_cast<__node_pointer>(__rt->__left_);
        }
        else if (value_comp()(__rt->__value_, __k))
            __rt = static_cast<__node_pointer>(__rt->__right_);
        else
            return _Pp(__lower_bound(__k, static_cast<__node_pointer>(__rt->__left_), static_cast<__iter_pointer>(__rt)),
                      __upper_bound(__k, static_cast<__node_pointer>(__rt->__right_), __result));
    }
    return _Pp(const_iterator(__result), const_iterator(__result));
}

template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::__node_holder
__tree<_Tp, _Compare, _Allocator>::remove(const_iterator __p) _NOEXCEPT
{
    __node_pointer __np = __p.__get_np();
    if (__begin_node() == __p.__ptr_)
    {
        if (__np->__right_ != nullptr)
            __begin_node() = static_cast<__iter_pointer>(__np->__right_);
        else
            __begin_node() = static_cast<__iter_pointer>(__np->__parent_);
    }
    --size();
    _VSTD::__tree_remove(__end_node()->__left_,
                         static_cast<__node_base_pointer>(__np));
    return __node_holder(__np, _Dp(__node_alloc(), true));
}

template <class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(__tree<_Tp, _Compare, _Allocator>& __x,
     __tree<_Tp, _Compare, _Allocator>& __y)
    _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
    __x.swap(__y);
}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___TREE
# 2761 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__tree" 3
#endif /* __tree expanded by -frewrite-includes */
# 595 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_allocator.h>
#endif /* expanded by -frewrite-includes */
# 595 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 596 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 596 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 597 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/piecewise_construct.h>
#endif /* expanded by -frewrite-includes */
# 597 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 598 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/swap.h>
#endif /* expanded by -frewrite-includes */
# 598 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 599 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 599 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 600 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 600 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 601 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

// standard-mandated includes

// [iterator.range]
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/access.h>
#endif /* expanded by -frewrite-includes */
# 605 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 606 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/data.h>
#endif /* expanded by -frewrite-includes */
# 606 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 607 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/empty.h>
#endif /* expanded by -frewrite-includes */
# 607 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 608 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_access.h>
#endif /* expanded by -frewrite-includes */
# 608 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 609 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/size.h>
#endif /* expanded by -frewrite-includes */
# 609 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 610 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

// [associative.map.syn]
#if 0 /* expanded by -frewrite-includes */
#include <compare>
#endif /* expanded by -frewrite-includes */
# 612 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 613 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 613 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 614 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 616 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 617 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#endif
# 618 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Key, class _CP, class _Compare,
          bool = is_empty<_Compare>::value && !__libcpp_is_final<_Compare>::value>
class __map_value_compare
    : private _Compare
{
public:
    _LIBCPP_INLINE_VISIBILITY
    __map_value_compare()
        _NOEXCEPT_(is_nothrow_default_constructible<_Compare>::value)
        : _Compare() {}
    _LIBCPP_INLINE_VISIBILITY
    __map_value_compare(_Compare __c)
        _NOEXCEPT_(is_nothrow_copy_constructible<_Compare>::value)
        : _Compare(__c) {}
    _LIBCPP_INLINE_VISIBILITY
    const _Compare& key_comp() const _NOEXCEPT {return *this;}
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _CP& __x, const _CP& __y) const
        {return static_cast<const _Compare&>(*this)(__x.__get_value().first, __y.__get_value().first);}
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _CP& __x, const _Key& __y) const
        {return static_cast<const _Compare&>(*this)(__x.__get_value().first, __y);}
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Key& __x, const _CP& __y) const
        {return static_cast<const _Compare&>(*this)(__x, __y.__get_value().first);}
    _LIBCPP_HIDE_FROM_ABI void swap(__map_value_compare& __y)
        _NOEXCEPT_(__is_nothrow_swappable<_Compare>::value)
    {
      using _VSTD::swap;
      swap(static_cast<_Compare&>(*this), static_cast<_Compare&>(__y));
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 654 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <typename _K2>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _K2& __x, const _CP& __y) const
        {return static_cast<const _Compare&>(*this)(__x, __y.__get_value().first);}

    template <typename _K2>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _CP& __x, const _K2& __y) const
        {return static_cast<const _Compare&>(*this)(__x.__get_value().first, __y);}
#endif
# 664 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
};

template <class _Key, class _CP, class _Compare>
class __map_value_compare<_Key, _CP, _Compare, false>
{
    _Compare __comp_;

public:
    _LIBCPP_INLINE_VISIBILITY
    __map_value_compare()
        _NOEXCEPT_(is_nothrow_default_constructible<_Compare>::value)
        : __comp_() {}
    _LIBCPP_INLINE_VISIBILITY
    __map_value_compare(_Compare __c)
        _NOEXCEPT_(is_nothrow_copy_constructible<_Compare>::value)
        : __comp_(__c) {}
    _LIBCPP_INLINE_VISIBILITY
    const _Compare& key_comp() const _NOEXCEPT {return __comp_;}

    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _CP& __x, const _CP& __y) const
        {return __comp_(__x.__get_value().first, __y.__get_value().first);}
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _CP& __x, const _Key& __y) const
        {return __comp_(__x.__get_value().first, __y);}
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _Key& __x, const _CP& __y) const
        {return __comp_(__x, __y.__get_value().first);}
    void swap(__map_value_compare& __y)
        _NOEXCEPT_(__is_nothrow_swappable<_Compare>::value)
    {
        using _VSTD::swap;
        swap(__comp_, __y.__comp_);
    }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 700 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <typename _K2>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _K2& __x, const _CP& __y) const
        {return __comp_(__x, __y.__get_value().first);}

    template <typename _K2>
    _LIBCPP_INLINE_VISIBILITY
    bool operator()(const _CP& __x, const _K2& __y) const
        {return __comp_(__x.__get_value().first, __y);}
#endif
# 710 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
};

template <class _Key, class _CP, class _Compare, bool __b>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(__map_value_compare<_Key, _CP, _Compare, __b>& __x,
     __map_value_compare<_Key, _CP, _Compare, __b>& __y)
    _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
    __x.swap(__y);
}

template <class _Allocator>
class __map_node_destructor
{
    typedef _Allocator                          allocator_type;
    typedef allocator_traits<allocator_type>    __alloc_traits;

public:
    typedef typename __alloc_traits::pointer    pointer;

private:
    allocator_type& __na_;

    __map_node_destructor& operator=(const __map_node_destructor&);

public:
    bool __first_constructed;
    bool __second_constructed;

    _LIBCPP_INLINE_VISIBILITY
    explicit __map_node_destructor(allocator_type& __na) _NOEXCEPT
        : __na_(__na),
          __first_constructed(false),
          __second_constructed(false)
        {}

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    __map_node_destructor(__tree_node_destructor<allocator_type>&& __x) _NOEXCEPT
        : __na_(__x.__na_),
          __first_constructed(__x.__value_constructed),
          __second_constructed(__x.__value_constructed)
        {
            __x.__value_constructed = false;
        }
#endif // _LIBCPP_CXX03_LANG
# 757 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    void operator()(pointer __p) _NOEXCEPT
    {
        if (__second_constructed)
            __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.__get_value().second));
        if (__first_constructed)
            __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.__get_value().first));
        if (__p)
            __alloc_traits::deallocate(__na_, __p, 1);
    }
};

template <class _Key, class _Tp, class _Compare, class _Allocator>
    class map;
template <class _Key, class _Tp, class _Compare, class _Allocator>
    class multimap;
template <class _TreeIterator> class __map_const_iterator;

#ifndef _LIBCPP_CXX03_LANG

template <class _Key, class _Tp>
struct _LIBCPP_STANDALONE_DEBUG __value_type
{
    typedef _Key                                     key_type;
    typedef _Tp                                      mapped_type;
    typedef pair<const key_type, mapped_type>        value_type;
    typedef pair<key_type&, mapped_type&>            __nc_ref_pair_type;
    typedef pair<key_type&&, mapped_type&&>          __nc_rref_pair_type;

private:
    value_type __cc_;

public:
    _LIBCPP_INLINE_VISIBILITY
    value_type& __get_value()
    {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 795 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
        return *_VSTD::launder(_VSTD::addressof(__cc_));
#else
# 797 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
        return __cc_;
#endif
# 799 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    }

    _LIBCPP_INLINE_VISIBILITY
    const value_type& __get_value() const
    {
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 805 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
        return *_VSTD::launder(_VSTD::addressof(__cc_));
#else
# 807 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
        return __cc_;
#endif
# 809 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    }

    _LIBCPP_INLINE_VISIBILITY
    __nc_ref_pair_type __ref()
    {
        value_type& __v = __get_value();
        return __nc_ref_pair_type(const_cast<key_type&>(__v.first), __v.second);
    }

    _LIBCPP_INLINE_VISIBILITY
    __nc_rref_pair_type __move()
    {
        value_type& __v = __get_value();
        return __nc_rref_pair_type(
            _VSTD::move(const_cast<key_type&>(__v.first)),
            _VSTD::move(__v.second));
    }

    _LIBCPP_INLINE_VISIBILITY
    __value_type& operator=(const __value_type& __v)
    {
        __ref() = __v.__get_value();
        return *this;
    }

    _LIBCPP_INLINE_VISIBILITY
    __value_type& operator=(__value_type&& __v)
    {
        __ref() = __v.__move();
        return *this;
    }

    template <class _ValueTp,
              class = __enable_if_t<__is_same_uncvref<_ValueTp, value_type>::value>
             >
    _LIBCPP_INLINE_VISIBILITY
    __value_type& operator=(_ValueTp&& __v)
    {
        __ref() = _VSTD::forward<_ValueTp>(__v);
        return *this;
    }

private:
    __value_type() = delete;
    ~__value_type() = delete;
    __value_type(const __value_type&) = delete;
    __value_type(__value_type&&) = delete;
};

#else
# 859 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

template <class _Key, class _Tp>
struct __value_type
{
    typedef _Key                                     key_type;
    typedef _Tp                                      mapped_type;
    typedef pair<const key_type, mapped_type>        value_type;

private:
    value_type __cc_;

public:
    _LIBCPP_INLINE_VISIBILITY
    value_type& __get_value() { return __cc_; }
    _LIBCPP_INLINE_VISIBILITY
    const value_type& __get_value() const { return __cc_; }

private:
   __value_type();
   __value_type(__value_type const&);
   __value_type& operator=(__value_type const&);
   ~__value_type();
};

#endif // _LIBCPP_CXX03_LANG
# 884 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

template <class _Tp>
struct __extract_key_value_types;

template <class _Key, class _Tp>
struct __extract_key_value_types<__value_type<_Key, _Tp> >
{
  typedef _Key const __key_type;
  typedef _Tp        __mapped_type;
};

template <class _TreeIterator>
class _LIBCPP_TEMPLATE_VIS __map_iterator
{
    typedef typename _TreeIterator::_NodeTypes                   _NodeTypes;
    typedef typename _TreeIterator::__pointer_traits             __pointer_traits;

    _TreeIterator __i_;

public:
    typedef bidirectional_iterator_tag                           iterator_category;
    typedef typename _NodeTypes::__map_value_type                value_type;
    typedef typename _TreeIterator::difference_type              difference_type;
    typedef value_type&                                          reference;
    typedef typename _NodeTypes::__map_value_type_pointer        pointer;

    _LIBCPP_INLINE_VISIBILITY
    __map_iterator() _NOEXCEPT {}

    _LIBCPP_INLINE_VISIBILITY
    __map_iterator(_TreeIterator __i) _NOEXCEPT : __i_(__i) {}

    _LIBCPP_INLINE_VISIBILITY
    reference operator*() const {return __i_->__get_value();}
    _LIBCPP_INLINE_VISIBILITY
    pointer operator->() const {return pointer_traits<pointer>::pointer_to(__i_->__get_value());}

    _LIBCPP_INLINE_VISIBILITY
    __map_iterator& operator++() {++__i_; return *this;}
    _LIBCPP_INLINE_VISIBILITY
    __map_iterator operator++(int)
    {
        __map_iterator __t(*this);
        ++(*this);
        return __t;
    }

    _LIBCPP_INLINE_VISIBILITY
    __map_iterator& operator--() {--__i_; return *this;}
    _LIBCPP_INLINE_VISIBILITY
    __map_iterator operator--(int)
    {
        __map_iterator __t(*this);
        --(*this);
        return __t;
    }

    friend _LIBCPP_INLINE_VISIBILITY
    bool operator==(const __map_iterator& __x, const __map_iterator& __y)
        {return __x.__i_ == __y.__i_;}
    friend
    _LIBCPP_INLINE_VISIBILITY
    bool operator!=(const __map_iterator& __x, const __map_iterator& __y)
        {return __x.__i_ != __y.__i_;}

    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
    template <class> friend class _LIBCPP_TEMPLATE_VIS __map_const_iterator;
};

template <class _TreeIterator>
class _LIBCPP_TEMPLATE_VIS __map_const_iterator
{
    typedef typename _TreeIterator::_NodeTypes                   _NodeTypes;
    typedef typename _TreeIterator::__pointer_traits             __pointer_traits;

    _TreeIterator __i_;

public:
    typedef bidirectional_iterator_tag                           iterator_category;
    typedef typename _NodeTypes::__map_value_type                value_type;
    typedef typename _TreeIterator::difference_type              difference_type;
    typedef const value_type&                                    reference;
    typedef typename _NodeTypes::__const_map_value_type_pointer  pointer;

    _LIBCPP_INLINE_VISIBILITY
    __map_const_iterator() _NOEXCEPT {}

    _LIBCPP_INLINE_VISIBILITY
    __map_const_iterator(_TreeIterator __i) _NOEXCEPT : __i_(__i) {}
    _LIBCPP_INLINE_VISIBILITY
    __map_const_iterator(__map_iterator<
        typename _TreeIterator::__non_const_iterator> __i) _NOEXCEPT
        : __i_(__i.__i_) {}

    _LIBCPP_INLINE_VISIBILITY
    reference operator*() const {return __i_->__get_value();}
    _LIBCPP_INLINE_VISIBILITY
    pointer operator->() const {return pointer_traits<pointer>::pointer_to(__i_->__get_value());}

    _LIBCPP_INLINE_VISIBILITY
    __map_const_iterator& operator++() {++__i_; return *this;}
    _LIBCPP_INLINE_VISIBILITY
    __map_const_iterator operator++(int)
    {
        __map_const_iterator __t(*this);
        ++(*this);
        return __t;
    }

    _LIBCPP_INLINE_VISIBILITY
    __map_const_iterator& operator--() {--__i_; return *this;}
    _LIBCPP_INLINE_VISIBILITY
    __map_const_iterator operator--(int)
    {
        __map_const_iterator __t(*this);
        --(*this);
        return __t;
    }

    friend _LIBCPP_INLINE_VISIBILITY
    bool operator==(const __map_const_iterator& __x, const __map_const_iterator& __y)
        {return __x.__i_ == __y.__i_;}
    friend _LIBCPP_INLINE_VISIBILITY
    bool operator!=(const __map_const_iterator& __x, const __map_const_iterator& __y)
        {return __x.__i_ != __y.__i_;}

    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
    template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS __tree_const_iterator;
};

template <class _Key, class _Tp, class _Compare = less<_Key>,
          class _Allocator = allocator<pair<const _Key, _Tp> > >
class _LIBCPP_TEMPLATE_VIS map
{
public:
    // types:
    typedef _Key                                     key_type;
    typedef _Tp                                      mapped_type;
    typedef pair<const key_type, mapped_type>        value_type;
    typedef __type_identity_t<_Compare>              key_compare;
    typedef __type_identity_t<_Allocator>            allocator_type;
    typedef value_type&                              reference;
    typedef const value_type&                        const_reference;

    static_assert((is_same<typename allocator_type::value_type, value_type>::value),
                  "Allocator::value_type must be same type as value_type");

    class _LIBCPP_TEMPLATE_VIS value_compare
        : public __binary_function<value_type, value_type, bool>
    {
        friend class map;
    protected:
        key_compare comp;

        _LIBCPP_INLINE_VISIBILITY value_compare(key_compare __c) : comp(__c) {}
    public:
        _LIBCPP_INLINE_VISIBILITY
        bool operator()(const value_type& __x, const value_type& __y) const
            {return comp(__x.first, __y.first);}
    };

private:

    typedef _VSTD::__value_type<key_type, mapped_type>             __value_type;
    typedef __map_value_compare<key_type, __value_type, key_compare> __vc;
    typedef __rebind_alloc<allocator_traits<allocator_type>, __value_type> __allocator_type;
    typedef __tree<__value_type, __vc, __allocator_type>   __base;
    typedef typename __base::__node_traits                 __node_traits;
    typedef allocator_traits<allocator_type>               __alloc_traits;

    static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
                  "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
                  "original allocator");

    __base __tree_;

public:
    typedef typename __alloc_traits::pointer               pointer;
    typedef typename __alloc_traits::const_pointer         const_pointer;
    typedef typename __alloc_traits::size_type             size_type;
    typedef typename __alloc_traits::difference_type       difference_type;
    typedef __map_iterator<typename __base::iterator>             iterator;
    typedef __map_const_iterator<typename __base::const_iterator> const_iterator;
    typedef _VSTD::reverse_iterator<iterator>               reverse_iterator;
    typedef _VSTD::reverse_iterator<const_iterator>         const_reverse_iterator;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1073 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    typedef __map_node_handle<typename __base::__node, allocator_type> node_type;
    typedef __insert_return_type<iterator, node_type> insert_return_type;
#endif
# 1076 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
        friend class _LIBCPP_TEMPLATE_VIS map;
    template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
        friend class _LIBCPP_TEMPLATE_VIS multimap;

    _LIBCPP_INLINE_VISIBILITY
    map()
        _NOEXCEPT_(
            is_nothrow_default_constructible<allocator_type>::value &&
            is_nothrow_default_constructible<key_compare>::value &&
            is_nothrow_copy_constructible<key_compare>::value)
        : __tree_(__vc(key_compare())) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit map(const key_compare& __comp)
        _NOEXCEPT_(
            is_nothrow_default_constructible<allocator_type>::value &&
            is_nothrow_copy_constructible<key_compare>::value)
        : __tree_(__vc(__comp)) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit map(const key_compare& __comp, const allocator_type& __a)
        : __tree_(__vc(__comp), typename __base::allocator_type(__a)) {}

    template <class _InputIterator>
    _LIBCPP_INLINE_VISIBILITY
        map(_InputIterator __f, _InputIterator __l,
            const key_compare& __comp = key_compare())
        : __tree_(__vc(__comp))
        {
            insert(__f, __l);
        }

    template <class _InputIterator>
    _LIBCPP_INLINE_VISIBILITY
        map(_InputIterator __f, _InputIterator __l,
            const key_compare& __comp, const allocator_type& __a)
        : __tree_(__vc(__comp), typename __base::allocator_type(__a))
        {
            insert(__f, __l);
        }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1120 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    map(from_range_t, _Range&& __range, const key_compare& __comp = key_compare(),
        const allocator_type& __a = allocator_type())
      : __tree_(__vc(__comp), typename __base::allocator_type(__a)) {
      insert_range(std::forward<_Range>(__range));
    }
#endif
# 1128 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1130 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <class _InputIterator>
    _LIBCPP_INLINE_VISIBILITY
    map(_InputIterator __f, _InputIterator __l, const allocator_type& __a)
        : map(__f, __l, key_compare(), __a) {}
#endif
# 1135 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1137 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    map(from_range_t, _Range&& __range, const allocator_type& __a)
      : map(from_range, std::forward<_Range>(__range), key_compare(), __a) {}
#endif
# 1142 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    map(const map& __m)
        : __tree_(__m.__tree_)
        {
            insert(__m.begin(), __m.end());
        }

    _LIBCPP_INLINE_VISIBILITY
    map& operator=(const map& __m)
        {
#ifndef _LIBCPP_CXX03_LANG
            __tree_ = __m.__tree_;
#else
# 1156 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
            if (this != _VSTD::addressof(__m)) {
                __tree_.clear();
                __tree_.value_comp() = __m.__tree_.value_comp();
                __tree_.__copy_assign_alloc(__m.__tree_);
                insert(__m.begin(), __m.end());
            }
#endif
# 1163 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
            return *this;
        }

#ifndef _LIBCPP_CXX03_LANG

    _LIBCPP_INLINE_VISIBILITY
    map(map&& __m)
        _NOEXCEPT_(is_nothrow_move_constructible<__base>::value)
        : __tree_(_VSTD::move(__m.__tree_))
        {
        }

    _LIBCPP_HIDE_FROM_ABI map(map&& __m, const allocator_type& __a);

    _LIBCPP_INLINE_VISIBILITY
    map& operator=(map&& __m)
        _NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
        {
            __tree_ = _VSTD::move(__m.__tree_);
            return *this;
        }

    _LIBCPP_INLINE_VISIBILITY
    map(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
        : __tree_(__vc(__comp))
        {
            insert(__il.begin(), __il.end());
        }

    _LIBCPP_INLINE_VISIBILITY
    map(initializer_list<value_type> __il, const key_compare& __comp, const allocator_type& __a)
        : __tree_(__vc(__comp), typename __base::allocator_type(__a))
        {
            insert(__il.begin(), __il.end());
        }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1200 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    _LIBCPP_INLINE_VISIBILITY
    map(initializer_list<value_type> __il, const allocator_type& __a)
        : map(__il, key_compare(), __a) {}
#endif
# 1204 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    map& operator=(initializer_list<value_type> __il)
        {
            __tree_.__assign_unique(__il.begin(), __il.end());
            return *this;
        }

#endif // _LIBCPP_CXX03_LANG
# 1213 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    explicit map(const allocator_type& __a)
        : __tree_(typename __base::allocator_type(__a))
        {
        }

    _LIBCPP_INLINE_VISIBILITY
    map(const map& __m, const allocator_type& __a)
        : __tree_(__m.__tree_.value_comp(), typename __base::allocator_type(__a))
        {
            insert(__m.begin(), __m.end());
        }

    _LIBCPP_INLINE_VISIBILITY
    ~map() {
        static_assert(sizeof(__diagnose_non_const_comparator<_Key, _Compare>()), "");
    }

    _LIBCPP_INLINE_VISIBILITY
          iterator begin() _NOEXCEPT {return __tree_.begin();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator begin() const _NOEXCEPT {return __tree_.begin();}
    _LIBCPP_INLINE_VISIBILITY
          iterator end() _NOEXCEPT {return __tree_.end();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator end() const _NOEXCEPT {return __tree_.end();}

    _LIBCPP_INLINE_VISIBILITY
          reverse_iterator rbegin() _NOEXCEPT {return reverse_iterator(end());}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator rbegin() const _NOEXCEPT
        {return const_reverse_iterator(end());}
    _LIBCPP_INLINE_VISIBILITY
          reverse_iterator rend() _NOEXCEPT
            {return       reverse_iterator(begin());}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator rend() const _NOEXCEPT
        {return const_reverse_iterator(begin());}

    _LIBCPP_INLINE_VISIBILITY
    const_iterator cbegin() const _NOEXCEPT {return begin();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator cend() const _NOEXCEPT {return end();}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator crend() const _NOEXCEPT {return rend();}

    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
    bool      empty() const _NOEXCEPT {return __tree_.size() == 0;}
    _LIBCPP_INLINE_VISIBILITY
    size_type size() const _NOEXCEPT {return __tree_.size();}
    _LIBCPP_INLINE_VISIBILITY
    size_type max_size() const _NOEXCEPT {return __tree_.max_size();}

    _LIBCPP_HIDE_FROM_ABI mapped_type& operator[](const key_type& __k);
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI mapped_type& operator[](key_type&& __k);
#endif
# 1273 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_HIDE_FROM_ABI mapped_type& at(const key_type& __k);
    _LIBCPP_HIDE_FROM_ABI const mapped_type& at(const key_type& __k) const;

    _LIBCPP_INLINE_VISIBILITY
    allocator_type get_allocator() const _NOEXCEPT {return allocator_type(__tree_.__alloc());}
    _LIBCPP_INLINE_VISIBILITY
    key_compare    key_comp()      const {return __tree_.value_comp().key_comp();}
    _LIBCPP_INLINE_VISIBILITY
    value_compare  value_comp()    const {return value_compare(__tree_.value_comp().key_comp());}

#ifndef _LIBCPP_CXX03_LANG
    template <class ..._Args>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool> emplace(_Args&& ...__args) {
        return __tree_.__emplace_unique(_VSTD::forward<_Args>(__args)...);
    }

    template <class ..._Args>
    _LIBCPP_INLINE_VISIBILITY
    iterator emplace_hint(const_iterator __p, _Args&& ...__args) {
        return __tree_.__emplace_hint_unique(__p.__i_, _VSTD::forward<_Args>(__args)...);
    }

    template <class _Pp,
              class = __enable_if_t<is_constructible<value_type, _Pp>::value> >
        _LIBCPP_INLINE_VISIBILITY
        pair<iterator, bool> insert(_Pp&& __p)
            {return __tree_.__insert_unique(_VSTD::forward<_Pp>(__p));}

    template <class _Pp,
              class = __enable_if_t<is_constructible<value_type, _Pp>::value> >
        _LIBCPP_INLINE_VISIBILITY
        iterator insert(const_iterator __pos, _Pp&& __p)
            {return __tree_.__insert_unique(__pos.__i_, _VSTD::forward<_Pp>(__p));}

#endif // _LIBCPP_CXX03_LANG
# 1310 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool>
        insert(const value_type& __v) {return __tree_.__insert_unique(__v);}

    _LIBCPP_INLINE_VISIBILITY
    iterator
        insert(const_iterator __p, const value_type& __v)
            {return __tree_.__insert_unique(__p.__i_, __v);}

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator, bool>
    insert(value_type&& __v) {return __tree_.__insert_unique(_VSTD::move(__v));}

    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __p,  value_type&& __v)
    {return __tree_.__insert_unique(__p.__i_, _VSTD::move(__v));}

    _LIBCPP_INLINE_VISIBILITY
    void insert(initializer_list<value_type> __il)
        {insert(__il.begin(), __il.end());}
#endif
# 1333 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    template <class _InputIterator>
        _LIBCPP_INLINE_VISIBILITY
        void insert(_InputIterator __f, _InputIterator __l)
        {
            for (const_iterator __e = cend(); __f != __l; ++__f)
                insert(__e.__i_, *__f);
        }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1343 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    void insert_range(_Range&& __range) {
      const_iterator __end = cend();
      for (auto&& __element : __range) {
        insert(__end.__i_, std::forward<decltype(__element)>(__element));
      }
    }
#endif
# 1352 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1354 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    template <class... _Args>
        _LIBCPP_INLINE_VISIBILITY
        pair<iterator, bool> try_emplace(const key_type& __k, _Args&&... __args)
    {
        return __tree_.__emplace_unique_key_args(__k,
            _VSTD::piecewise_construct,
            _VSTD::forward_as_tuple(__k),
            _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...));
    }

    template <class... _Args>
        _LIBCPP_INLINE_VISIBILITY
        pair<iterator, bool> try_emplace(key_type&& __k, _Args&&... __args)
    {
        return __tree_.__emplace_unique_key_args(__k,
            _VSTD::piecewise_construct,
            _VSTD::forward_as_tuple(_VSTD::move(__k)),
            _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...));
    }

    template <class... _Args>
        _LIBCPP_INLINE_VISIBILITY
        iterator try_emplace(const_iterator __h, const key_type& __k, _Args&&... __args)
    {
        return __tree_.__emplace_hint_unique_key_args(__h.__i_, __k,
            _VSTD::piecewise_construct,
            _VSTD::forward_as_tuple(__k),
            _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)).first;
    }

    template <class... _Args>
        _LIBCPP_INLINE_VISIBILITY
        iterator try_emplace(const_iterator __h, key_type&& __k, _Args&&... __args)
    {
        return __tree_.__emplace_hint_unique_key_args(__h.__i_, __k,
            _VSTD::piecewise_construct,
            _VSTD::forward_as_tuple(_VSTD::move(__k)),
            _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)).first;
    }

    template <class _Vp>
        _LIBCPP_INLINE_VISIBILITY
        pair<iterator, bool> insert_or_assign(const key_type& __k, _Vp&& __v)
    {
        iterator __p = lower_bound(__k);
        if ( __p != end() && !key_comp()(__k, __p->first))
        {
            __p->second = _VSTD::forward<_Vp>(__v);
            return _VSTD::make_pair(__p, false);
        }
        return _VSTD::make_pair(emplace_hint(__p, __k, _VSTD::forward<_Vp>(__v)), true);
    }

    template <class _Vp>
        _LIBCPP_INLINE_VISIBILITY
        pair<iterator, bool> insert_or_assign(key_type&& __k, _Vp&& __v)
    {
        iterator __p = lower_bound(__k);
        if ( __p != end() && !key_comp()(__k, __p->first))
        {
            __p->second = _VSTD::forward<_Vp>(__v);
            return _VSTD::make_pair(__p, false);
        }
        return _VSTD::make_pair(emplace_hint(__p, _VSTD::move(__k), _VSTD::forward<_Vp>(__v)), true);
    }

    template <class _Vp>
    _LIBCPP_INLINE_VISIBILITY iterator insert_or_assign(const_iterator __h,
                                                        const key_type& __k,
                                                        _Vp&& __v) {
      auto [__r, __inserted] = __tree_.__emplace_hint_unique_key_args(
          __h.__i_, __k, __k, _VSTD::forward<_Vp>(__v));

      if (!__inserted)
        __r->__get_value().second = _VSTD::forward<_Vp>(__v);

      return __r;
    }

    template <class _Vp>
    _LIBCPP_INLINE_VISIBILITY iterator insert_or_assign(const_iterator __h,
                                                        key_type&& __k,
                                                        _Vp&& __v) {
      auto [__r, __inserted] = __tree_.__emplace_hint_unique_key_args(
          __h.__i_, __k, _VSTD::move(__k), _VSTD::forward<_Vp>(__v));

      if (!__inserted)
        __r->__get_value().second = _VSTD::forward<_Vp>(__v);

      return __r;
    }

#endif // _LIBCPP_STD_VER >= 17
# 1448 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);}
    _LIBCPP_INLINE_VISIBILITY
    iterator erase(iterator __p)       {return __tree_.erase(__p.__i_);}
    _LIBCPP_INLINE_VISIBILITY
    size_type erase(const key_type& __k)
        {return __tree_.__erase_unique(__k);}
    _LIBCPP_INLINE_VISIBILITY
    iterator  erase(const_iterator __f, const_iterator __l)
        {return __tree_.erase(__f.__i_, __l.__i_);}
    _LIBCPP_INLINE_VISIBILITY
    void clear() _NOEXCEPT {__tree_.clear();}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1463 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    _LIBCPP_INLINE_VISIBILITY
    insert_return_type insert(node_type&& __nh)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__nh.empty() || __nh.get_allocator() == get_allocator(),
            "node_type with incompatible allocator passed to map::insert()");
        return __tree_.template __node_handle_insert_unique<
            node_type, insert_return_type>(_VSTD::move(__nh));
    }
    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __hint, node_type&& __nh)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__nh.empty() || __nh.get_allocator() == get_allocator(),
            "node_type with incompatible allocator passed to map::insert()");
        return __tree_.template __node_handle_insert_unique<node_type>(
            __hint.__i_, _VSTD::move(__nh));
    }
    _LIBCPP_INLINE_VISIBILITY
    node_type extract(key_type const& __key)
    {
        return __tree_.template __node_handle_extract<node_type>(__key);
    }
    _LIBCPP_INLINE_VISIBILITY
    node_type extract(const_iterator __it)
    {
        return __tree_.template __node_handle_extract<node_type>(__it.__i_);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(map<key_type, mapped_type, _Compare2, allocator_type>& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        __tree_.__node_handle_merge_unique(__source.__tree_);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(map<key_type, mapped_type, _Compare2, allocator_type>&& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        __tree_.__node_handle_merge_unique(__source.__tree_);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        __tree_.__node_handle_merge_unique(__source.__tree_);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>&& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        __tree_.__node_handle_merge_unique(__source.__tree_);
    }
#endif
# 1522 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    void swap(map& __m)
        _NOEXCEPT_(__is_nothrow_swappable<__base>::value)
        {__tree_.swap(__m.__tree_);}

    _LIBCPP_INLINE_VISIBILITY
    iterator find(const key_type& __k)             {return __tree_.find(__k);}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator find(const key_type& __k) const {return __tree_.find(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1533 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    iterator
    find(const _K2& __k)                           {return __tree_.find(__k);}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    const_iterator
    find(const _K2& __k) const                     {return __tree_.find(__k);}
#endif
# 1542 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    size_type      count(const key_type& __k) const
        {return __tree_.__count_unique(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1547 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    size_type
    count(const _K2& __k) const {return __tree_.__count_multi(__k);}
#endif
# 1552 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1554 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    _LIBCPP_INLINE_VISIBILITY
    bool contains(const key_type& __k) const {return find(__k) != end();}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    bool
    contains(const _K2& __k) const { return find(__k) != end(); }
#endif // _LIBCPP_STD_VER >= 20
# 1561 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    iterator lower_bound(const key_type& __k)
        {return __tree_.lower_bound(__k);}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator lower_bound(const key_type& __k) const
        {return __tree_.lower_bound(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1569 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
     iterator
    lower_bound(const _K2& __k)       {return __tree_.lower_bound(__k);}

    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
     const_iterator
    lower_bound(const _K2& __k) const {return __tree_.lower_bound(__k);}
#endif
# 1579 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    iterator upper_bound(const key_type& __k)
        {return __tree_.upper_bound(__k);}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator upper_bound(const key_type& __k) const
        {return __tree_.upper_bound(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1587 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
     iterator
    upper_bound(const _K2& __k)       {return __tree_.upper_bound(__k);}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
     const_iterator
    upper_bound(const _K2& __k) const {return __tree_.upper_bound(__k);}
#endif
# 1596 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    pair<iterator,iterator> equal_range(const key_type& __k)
        {return __tree_.__equal_range_unique(__k);}
    _LIBCPP_INLINE_VISIBILITY
    pair<const_iterator,const_iterator> equal_range(const key_type& __k) const
        {return __tree_.__equal_range_unique(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1604 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
     pair<iterator,iterator>
    equal_range(const _K2& __k)       {return __tree_.__equal_range_multi(__k);}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
     pair<const_iterator,const_iterator>
    equal_range(const _K2& __k) const {return __tree_.__equal_range_multi(__k);}
#endif
# 1613 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

private:
    typedef typename __base::__node                    __node;
    typedef typename __base::__node_allocator          __node_allocator;
    typedef typename __base::__node_pointer            __node_pointer;
    typedef typename __base::__node_base_pointer       __node_base_pointer;
    typedef typename __base::__parent_pointer          __parent_pointer;

    typedef __map_node_destructor<__node_allocator> _Dp;
    typedef unique_ptr<__node, _Dp> __node_holder;

#ifdef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI __node_holder __construct_node_with_key(const key_type& __k);
#endif
# 1627 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1630 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
template<class _InputIterator, class _Compare = less<__iter_key_type<_InputIterator>>,
         class _Allocator = allocator<__iter_to_alloc_type<_InputIterator>>,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value, void>,
         class = enable_if_t<!__is_allocator<_Compare>::value, void>,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>>
map(_InputIterator, _InputIterator, _Compare = _Compare(), _Allocator = _Allocator())
  -> map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Compare, _Allocator>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1639 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
template <ranges::input_range _Range, class _Compare = less<__range_key_type<_Range>>,
          class _Allocator = allocator<__range_to_alloc_type<_Range>>,
          class = enable_if_t<!__is_allocator<_Compare>::value, void>,
          class = enable_if_t<__is_allocator<_Allocator>::value, void>>
map(from_range_t, _Range&&, _Compare = _Compare(), _Allocator = _Allocator())
  -> map<__range_key_type<_Range>, __range_mapped_type<_Range>, _Compare, _Allocator>;
#endif
# 1646 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

template<class _Key, class _Tp, class _Compare = less<remove_const_t<_Key>>,
         class _Allocator = allocator<pair<const _Key, _Tp>>,
         class = enable_if_t<!__is_allocator<_Compare>::value, void>,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>>
map(initializer_list<pair<_Key, _Tp>>, _Compare = _Compare(), _Allocator = _Allocator())
  -> map<remove_const_t<_Key>, _Tp, _Compare, _Allocator>;

template<class _InputIterator, class _Allocator,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value, void>,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>>
map(_InputIterator, _InputIterator, _Allocator)
  -> map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>,
         less<__iter_key_type<_InputIterator>>, _Allocator>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1662 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
template <ranges::input_range _Range, class _Allocator,
          class = enable_if_t<__is_allocator<_Allocator>::value, void>>
map(from_range_t, _Range&&, _Allocator)
  -> map<__range_key_type<_Range>, __range_mapped_type<_Range>, less<__range_key_type<_Range>>, _Allocator>;
#endif
# 1667 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

template<class _Key, class _Tp, class _Allocator,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>>
map(initializer_list<pair<_Key, _Tp>>, _Allocator)
  -> map<remove_const_t<_Key>, _Tp, less<remove_const_t<_Key>>, _Allocator>;
#endif
# 1673 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

#ifndef _LIBCPP_CXX03_LANG
template <class _Key, class _Tp, class _Compare, class _Allocator>
map<_Key, _Tp, _Compare, _Allocator>::map(map&& __m, const allocator_type& __a)
    : __tree_(_VSTD::move(__m.__tree_), typename __base::allocator_type(__a))
{
    if (__a != __m.get_allocator())
    {
        const_iterator __e = cend();
        while (!__m.empty())
            __tree_.__insert_unique(__e.__i_,
                    __m.__tree_.remove(__m.begin().__i_)->__value_.__move());
    }
}

template <class _Key, class _Tp, class _Compare, class _Allocator>
_Tp&
map<_Key, _Tp, _Compare, _Allocator>::operator[](const key_type& __k)
{
    return __tree_.__emplace_unique_key_args(__k,
        _VSTD::piecewise_construct,
        _VSTD::forward_as_tuple(__k),
        _VSTD::forward_as_tuple()).first->__get_value().second;
}

template <class _Key, class _Tp, class _Compare, class _Allocator>
_Tp&
map<_Key, _Tp, _Compare, _Allocator>::operator[](key_type&& __k)
{
    return __tree_.__emplace_unique_key_args(__k,
        _VSTD::piecewise_construct,
        _VSTD::forward_as_tuple(_VSTD::move(__k)),
        _VSTD::forward_as_tuple()).first->__get_value().second;
}

#else // _LIBCPP_CXX03_LANG
# 1709 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

template <class _Key, class _Tp, class _Compare, class _Allocator>
typename map<_Key, _Tp, _Compare, _Allocator>::__node_holder
map<_Key, _Tp, _Compare, _Allocator>::__construct_node_with_key(const key_type& __k)
{
    __node_allocator& __na = __tree_.__node_alloc();
    __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
    __node_traits::construct(__na, _VSTD::addressof(__h->__value_.__get_value().first), __k);
    __h.get_deleter().__first_constructed = true;
    __node_traits::construct(__na, _VSTD::addressof(__h->__value_.__get_value().second));
    __h.get_deleter().__second_constructed = true;
    return __h;
}

template <class _Key, class _Tp, class _Compare, class _Allocator>
_Tp&
map<_Key, _Tp, _Compare, _Allocator>::operator[](const key_type& __k)
{
    __parent_pointer __parent;
    __node_base_pointer& __child = __tree_.__find_equal(__parent, __k);
    __node_pointer __r = static_cast<__node_pointer>(__child);
    if (__child == nullptr)
    {
        __node_holder __h = __construct_node_with_key(__k);
        __tree_.__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
        __r = __h.release();
    }
    return __r->__value_.__get_value().second;
}

#endif // _LIBCPP_CXX03_LANG
# 1740 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

template <class _Key, class _Tp, class _Compare, class _Allocator>
_Tp&
map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k)
{
    __parent_pointer __parent;
    __node_base_pointer& __child = __tree_.__find_equal(__parent, __k);
    if (__child == nullptr)
        __throw_out_of_range("map::at:  key not found");
    return static_cast<__node_pointer>(__child)->__value_.__get_value().second;
}

template <class _Key, class _Tp, class _Compare, class _Allocator>
const _Tp&
map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k) const
{
    __parent_pointer __parent;
    __node_base_pointer __child = __tree_.__find_equal(__parent, __k);
    if (__child == nullptr)
        __throw_out_of_range("map::at:  key not found");
    return static_cast<__node_pointer>(__child)->__value_.__get_value().second;
}


template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const map<_Key, _Tp, _Compare, _Allocator>& __x,
           const map<_Key, _Tp, _Compare, _Allocator>& __y)
{
    return __x.size() == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin());
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1774 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator< (const map<_Key, _Tp, _Compare, _Allocator>& __x,
           const map<_Key, _Tp, _Compare, _Allocator>& __y)
{
    return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
}

template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const map<_Key, _Tp, _Compare, _Allocator>& __x,
           const map<_Key, _Tp, _Compare, _Allocator>& __y)
{
    return !(__x == __y);
}

template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator> (const map<_Key, _Tp, _Compare, _Allocator>& __x,
           const map<_Key, _Tp, _Compare, _Allocator>& __y)
{
    return __y < __x;
}

template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator>=(const map<_Key, _Tp, _Compare, _Allocator>& __x,
           const map<_Key, _Tp, _Compare, _Allocator>& __y)
{
    return !(__x < __y);
}

template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<=(const map<_Key, _Tp, _Compare, _Allocator>& __x,
           const map<_Key, _Tp, _Compare, _Allocator>& __y)
{
    return !(__y < __x);
}

#else // #if _LIBCPP_STD_VER <= 17
# 1821 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

template <class _Key, class _Tp, class _Compare, class _Allocator>
_LIBCPP_HIDE_FROM_ABI __synth_three_way_result<pair<const _Key, _Tp>>
operator<=>(const map<_Key, _Tp, _Compare, _Allocator>& __x, const map<_Key, _Tp, _Compare, _Allocator>& __y) {
    return std::lexicographical_compare_three_way(
        __x.begin(),
        __x.end(),
        __y.begin(),
        __y.end(),
        std::__synth_three_way<pair<const _Key, _Tp>, pair<const _Key, _Tp>>);
}

#endif // #if _LIBCPP_STD_VER <= 17
# 1834 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(map<_Key, _Tp, _Compare, _Allocator>& __x,
     map<_Key, _Tp, _Compare, _Allocator>& __y)
    _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
    __x.swap(__y);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1846 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
template <class _Key, class _Tp, class _Compare, class _Allocator,
          class _Predicate>
inline _LIBCPP_INLINE_VISIBILITY
    typename map<_Key, _Tp, _Compare, _Allocator>::size_type
    erase_if(map<_Key, _Tp, _Compare, _Allocator>& __c, _Predicate __pred) {
  return _VSTD::__libcpp_erase_if_container(__c, __pred);
}
#endif
# 1854 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3


template <class _Key, class _Tp, class _Compare = less<_Key>,
          class _Allocator = allocator<pair<const _Key, _Tp> > >
class _LIBCPP_TEMPLATE_VIS multimap
{
public:
    // types:
    typedef _Key                                     key_type;
    typedef _Tp                                      mapped_type;
    typedef pair<const key_type, mapped_type>        value_type;
    typedef __type_identity_t<_Compare>              key_compare;
    typedef __type_identity_t<_Allocator>            allocator_type;
    typedef value_type&                              reference;
    typedef const value_type&                        const_reference;

    static_assert((is_same<typename allocator_type::value_type, value_type>::value),
                  "Allocator::value_type must be same type as value_type");

    class _LIBCPP_TEMPLATE_VIS value_compare
        : public __binary_function<value_type, value_type, bool>
    {
        friend class multimap;
    protected:
        key_compare comp;

        _LIBCPP_INLINE_VISIBILITY
        value_compare(key_compare __c) : comp(__c) {}
    public:
        _LIBCPP_INLINE_VISIBILITY
        bool operator()(const value_type& __x, const value_type& __y) const
            {return comp(__x.first, __y.first);}
    };

private:

    typedef _VSTD::__value_type<key_type, mapped_type>             __value_type;
    typedef __map_value_compare<key_type, __value_type, key_compare> __vc;
    typedef __rebind_alloc<allocator_traits<allocator_type>, __value_type> __allocator_type;
    typedef __tree<__value_type, __vc, __allocator_type>            __base;
    typedef typename __base::__node_traits                          __node_traits;
    typedef allocator_traits<allocator_type>                        __alloc_traits;

    static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
                  "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
                  "original allocator");

    __base __tree_;

public:
    typedef typename __alloc_traits::pointer               pointer;
    typedef typename __alloc_traits::const_pointer         const_pointer;
    typedef typename __alloc_traits::size_type             size_type;
    typedef typename __alloc_traits::difference_type       difference_type;
    typedef __map_iterator<typename __base::iterator>      iterator;
    typedef __map_const_iterator<typename __base::const_iterator> const_iterator;
    typedef _VSTD::reverse_iterator<iterator>               reverse_iterator;
    typedef _VSTD::reverse_iterator<const_iterator>         const_reverse_iterator;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1914 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    typedef __map_node_handle<typename __base::__node, allocator_type> node_type;
#endif
# 1916 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
        friend class _LIBCPP_TEMPLATE_VIS map;
    template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
        friend class _LIBCPP_TEMPLATE_VIS multimap;

    _LIBCPP_INLINE_VISIBILITY
    multimap()
        _NOEXCEPT_(
            is_nothrow_default_constructible<allocator_type>::value &&
            is_nothrow_default_constructible<key_compare>::value &&
            is_nothrow_copy_constructible<key_compare>::value)
        : __tree_(__vc(key_compare())) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit multimap(const key_compare& __comp)
        _NOEXCEPT_(
            is_nothrow_default_constructible<allocator_type>::value &&
            is_nothrow_copy_constructible<key_compare>::value)
        : __tree_(__vc(__comp)) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit multimap(const key_compare& __comp, const allocator_type& __a)
        : __tree_(__vc(__comp), typename __base::allocator_type(__a)) {}

    template <class _InputIterator>
        _LIBCPP_INLINE_VISIBILITY
        multimap(_InputIterator __f, _InputIterator __l,
            const key_compare& __comp = key_compare())
        : __tree_(__vc(__comp))
        {
            insert(__f, __l);
        }

    template <class _InputIterator>
        _LIBCPP_INLINE_VISIBILITY
        multimap(_InputIterator __f, _InputIterator __l,
            const key_compare& __comp, const allocator_type& __a)
        : __tree_(__vc(__comp), typename __base::allocator_type(__a))
        {
            insert(__f, __l);
        }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1960 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    multimap(from_range_t, _Range&& __range, const key_compare& __comp = key_compare(),
        const allocator_type& __a = allocator_type())
      : __tree_(__vc(__comp), typename __base::allocator_type(__a)) {
      insert_range(std::forward<_Range>(__range));
    }
#endif
# 1968 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1970 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <class _InputIterator>
    _LIBCPP_INLINE_VISIBILITY
    multimap(_InputIterator __f, _InputIterator __l, const allocator_type& __a)
        : multimap(__f, __l, key_compare(), __a) {}
#endif
# 1975 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1977 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    multimap(from_range_t, _Range&& __range, const allocator_type& __a)
      : multimap(from_range, std::forward<_Range>(__range), key_compare(), __a) {}
#endif
# 1982 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    multimap(const multimap& __m)
        : __tree_(__m.__tree_.value_comp(),
          __alloc_traits::select_on_container_copy_construction(__m.__tree_.__alloc()))
        {
            insert(__m.begin(), __m.end());
        }

    _LIBCPP_INLINE_VISIBILITY
    multimap& operator=(const multimap& __m)
        {
#ifndef _LIBCPP_CXX03_LANG
            __tree_ = __m.__tree_;
#else
# 1997 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
            if (this != _VSTD::addressof(__m)) {
                __tree_.clear();
                __tree_.value_comp() = __m.__tree_.value_comp();
                __tree_.__copy_assign_alloc(__m.__tree_);
                insert(__m.begin(), __m.end());
            }
#endif
# 2004 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
            return *this;
        }

#ifndef _LIBCPP_CXX03_LANG

    _LIBCPP_INLINE_VISIBILITY
    multimap(multimap&& __m)
        _NOEXCEPT_(is_nothrow_move_constructible<__base>::value)
        : __tree_(_VSTD::move(__m.__tree_))
        {
        }

    _LIBCPP_HIDE_FROM_ABI multimap(multimap&& __m, const allocator_type& __a);

    _LIBCPP_INLINE_VISIBILITY
    multimap& operator=(multimap&& __m)
        _NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
        {
            __tree_ = _VSTD::move(__m.__tree_);
            return *this;
        }

    _LIBCPP_INLINE_VISIBILITY
    multimap(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
        : __tree_(__vc(__comp))
        {
            insert(__il.begin(), __il.end());
        }

    _LIBCPP_INLINE_VISIBILITY
    multimap(initializer_list<value_type> __il, const key_compare& __comp, const allocator_type& __a)
        : __tree_(__vc(__comp), typename __base::allocator_type(__a))
        {
            insert(__il.begin(), __il.end());
        }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2041 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    _LIBCPP_INLINE_VISIBILITY
    multimap(initializer_list<value_type> __il, const allocator_type& __a)
        : multimap(__il, key_compare(), __a) {}
#endif
# 2045 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    multimap& operator=(initializer_list<value_type> __il)
        {
            __tree_.__assign_multi(__il.begin(), __il.end());
            return *this;
        }

#endif // _LIBCPP_CXX03_LANG
# 2054 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    explicit multimap(const allocator_type& __a)
        : __tree_(typename __base::allocator_type(__a))
        {
        }

    _LIBCPP_INLINE_VISIBILITY
    multimap(const multimap& __m, const allocator_type& __a)
        : __tree_(__m.__tree_.value_comp(), typename __base::allocator_type(__a))
        {
            insert(__m.begin(), __m.end());
        }

    _LIBCPP_INLINE_VISIBILITY
    ~multimap() {
        static_assert(sizeof(__diagnose_non_const_comparator<_Key, _Compare>()), "");
    }

    _LIBCPP_INLINE_VISIBILITY
          iterator begin() _NOEXCEPT {return __tree_.begin();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator begin() const _NOEXCEPT {return __tree_.begin();}
    _LIBCPP_INLINE_VISIBILITY
          iterator end() _NOEXCEPT {return __tree_.end();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator end() const _NOEXCEPT {return __tree_.end();}

    _LIBCPP_INLINE_VISIBILITY
          reverse_iterator rbegin() _NOEXCEPT {return reverse_iterator(end());}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator rbegin() const _NOEXCEPT
        {return const_reverse_iterator(end());}
    _LIBCPP_INLINE_VISIBILITY
          reverse_iterator rend() _NOEXCEPT {return reverse_iterator(begin());}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator rend() const _NOEXCEPT
        {return const_reverse_iterator(begin());}

    _LIBCPP_INLINE_VISIBILITY
    const_iterator cbegin()  const _NOEXCEPT {return begin();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator cend() const _NOEXCEPT {return end();}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator crend() const _NOEXCEPT {return rend();}

    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
    bool empty() const _NOEXCEPT {return __tree_.size() == 0;}
    _LIBCPP_INLINE_VISIBILITY
    size_type size() const _NOEXCEPT {return __tree_.size();}
    _LIBCPP_INLINE_VISIBILITY
    size_type max_size() const _NOEXCEPT {return __tree_.max_size();}

    _LIBCPP_INLINE_VISIBILITY
    allocator_type get_allocator() const _NOEXCEPT {return allocator_type(__tree_.__alloc());}
    _LIBCPP_INLINE_VISIBILITY
    key_compare    key_comp() const {return __tree_.value_comp().key_comp();}
    _LIBCPP_INLINE_VISIBILITY
    value_compare  value_comp() const
        {return value_compare(__tree_.value_comp().key_comp());}

#ifndef _LIBCPP_CXX03_LANG

    template <class ..._Args>
    _LIBCPP_INLINE_VISIBILITY
    iterator emplace(_Args&& ...__args) {
        return __tree_.__emplace_multi(_VSTD::forward<_Args>(__args)...);
    }

    template <class ..._Args>
    _LIBCPP_INLINE_VISIBILITY
    iterator emplace_hint(const_iterator __p, _Args&& ...__args) {
        return __tree_.__emplace_hint_multi(__p.__i_, _VSTD::forward<_Args>(__args)...);
    }

    template <class _Pp,
              class = __enable_if_t<is_constructible<value_type, _Pp>::value>>
        _LIBCPP_INLINE_VISIBILITY
        iterator insert(_Pp&& __p)
            {return __tree_.__insert_multi(_VSTD::forward<_Pp>(__p));}

    template <class _Pp,
              class = __enable_if_t<is_constructible<value_type, _Pp>::value>>
        _LIBCPP_INLINE_VISIBILITY
        iterator insert(const_iterator __pos, _Pp&& __p)
            {return __tree_.__insert_multi(__pos.__i_, _VSTD::forward<_Pp>(__p));}

    _LIBCPP_INLINE_VISIBILITY
    iterator insert(value_type&& __v)
        {return __tree_.__insert_multi(_VSTD::move(__v));}

    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __p, value_type&& __v)
        {return __tree_.__insert_multi(__p.__i_, _VSTD::move(__v));}


    _LIBCPP_INLINE_VISIBILITY
    void insert(initializer_list<value_type> __il)
        {insert(__il.begin(), __il.end());}

#endif // _LIBCPP_CXX03_LANG
# 2157 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const value_type& __v) {return __tree_.__insert_multi(__v);}

    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __p, const value_type& __v)
            {return __tree_.__insert_multi(__p.__i_, __v);}

    template <class _InputIterator>
        _LIBCPP_INLINE_VISIBILITY
        void insert(_InputIterator __f, _InputIterator __l)
        {
            for (const_iterator __e = cend(); __f != __l; ++__f)
                __tree_.__insert_multi(__e.__i_, *__f);
        }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2174 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    void insert_range(_Range&& __range) {
      const_iterator __end = cend();
      for (auto&& __element : __range) {
        __tree_.__insert_multi(__end.__i_, std::forward<decltype(__element)>(__element));
      }
    }
#endif
# 2183 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);}
    _LIBCPP_INLINE_VISIBILITY
    iterator erase(iterator __p)       {return __tree_.erase(__p.__i_);}
    _LIBCPP_INLINE_VISIBILITY
    size_type erase(const key_type& __k) {return __tree_.__erase_multi(__k);}
    _LIBCPP_INLINE_VISIBILITY
    iterator  erase(const_iterator __f, const_iterator __l)
        {return __tree_.erase(__f.__i_, __l.__i_);}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2195 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    _LIBCPP_INLINE_VISIBILITY
    iterator insert(node_type&& __nh)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__nh.empty() || __nh.get_allocator() == get_allocator(),
            "node_type with incompatible allocator passed to multimap::insert()");
        return __tree_.template __node_handle_insert_multi<node_type>(
            _VSTD::move(__nh));
    }
    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __hint, node_type&& __nh)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__nh.empty() || __nh.get_allocator() == get_allocator(),
            "node_type with incompatible allocator passed to multimap::insert()");
        return __tree_.template __node_handle_insert_multi<node_type>(
            __hint.__i_, _VSTD::move(__nh));
    }
    _LIBCPP_INLINE_VISIBILITY
    node_type extract(key_type const& __key)
    {
        return __tree_.template __node_handle_extract<node_type>(__key);
    }
    _LIBCPP_INLINE_VISIBILITY
    node_type extract(const_iterator __it)
    {
        return __tree_.template __node_handle_extract<node_type>(
            __it.__i_);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        return __tree_.__node_handle_merge_multi(__source.__tree_);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>&& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        return __tree_.__node_handle_merge_multi(__source.__tree_);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(map<key_type, mapped_type, _Compare2, allocator_type>& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        return __tree_.__node_handle_merge_multi(__source.__tree_);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(map<key_type, mapped_type, _Compare2, allocator_type>&& __source)
    {
        _LIBCPP_ASSERT_COMPATIBLE_ALLOCATOR(__source.get_allocator() == get_allocator(),
                                            "merging container with incompatible allocator");
        return __tree_.__node_handle_merge_multi(__source.__tree_);
    }
#endif
# 2255 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    void clear() _NOEXCEPT {__tree_.clear();}

    _LIBCPP_INLINE_VISIBILITY
    void swap(multimap& __m)
        _NOEXCEPT_(__is_nothrow_swappable<__base>::value)
        {__tree_.swap(__m.__tree_);}

    _LIBCPP_INLINE_VISIBILITY
    iterator find(const key_type& __k)             {return __tree_.find(__k);}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator find(const key_type& __k) const {return __tree_.find(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2269 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    iterator
    find(const _K2& __k)                           {return __tree_.find(__k);}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    const_iterator
    find(const _K2& __k) const                     {return __tree_.find(__k);}
#endif
# 2278 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    size_type      count(const key_type& __k) const
        {return __tree_.__count_multi(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2283 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    size_type
    count(const _K2& __k) const {return __tree_.__count_multi(__k);}
#endif
# 2288 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2290 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    _LIBCPP_INLINE_VISIBILITY
    bool contains(const key_type& __k) const {return find(__k) != end();}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    bool
    contains(const _K2& __k) const { return find(__k) != end(); }
#endif // _LIBCPP_STD_VER >= 20
# 2297 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    iterator lower_bound(const key_type& __k)
        {return __tree_.lower_bound(__k);}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator lower_bound(const key_type& __k) const
            {return __tree_.lower_bound(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2305 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    iterator
    lower_bound(const _K2& __k)       {return __tree_.lower_bound(__k);}

    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    const_iterator
    lower_bound(const _K2& __k) const {return __tree_.lower_bound(__k);}
#endif
# 2315 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    iterator upper_bound(const key_type& __k)
            {return __tree_.upper_bound(__k);}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator upper_bound(const key_type& __k) const
            {return __tree_.upper_bound(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2323 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    iterator
    upper_bound(const _K2& __k)       {return __tree_.upper_bound(__k);}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    const_iterator
    upper_bound(const _K2& __k) const {return __tree_.upper_bound(__k);}
#endif
# 2332 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

    _LIBCPP_INLINE_VISIBILITY
    pair<iterator,iterator>             equal_range(const key_type& __k)
            {return __tree_.__equal_range_multi(__k);}
    _LIBCPP_INLINE_VISIBILITY
    pair<const_iterator,const_iterator> equal_range(const key_type& __k) const
            {return __tree_.__equal_range_multi(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2340 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator,iterator>
    equal_range(const _K2& __k)       {return __tree_.__equal_range_multi(__k);}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    pair<const_iterator,const_iterator>
    equal_range(const _K2& __k) const {return __tree_.__equal_range_multi(__k);}
#endif
# 2349 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

private:
    typedef typename __base::__node                    __node;
    typedef typename __base::__node_allocator          __node_allocator;
    typedef typename __base::__node_pointer            __node_pointer;

    typedef __map_node_destructor<__node_allocator> _Dp;
    typedef unique_ptr<__node, _Dp> __node_holder;
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2360 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
template<class _InputIterator, class _Compare = less<__iter_key_type<_InputIterator>>,
         class _Allocator = allocator<__iter_to_alloc_type<_InputIterator>>,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value, void>,
         class = enable_if_t<!__is_allocator<_Compare>::value, void>,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>>
multimap(_InputIterator, _InputIterator, _Compare = _Compare(), _Allocator = _Allocator())
  -> multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Compare, _Allocator>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2369 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
template <ranges::input_range _Range, class _Compare = less<__range_key_type<_Range>>,
          class _Allocator = allocator<__range_to_alloc_type<_Range>>,
          class = enable_if_t<!__is_allocator<_Compare>::value, void>,
          class = enable_if_t<__is_allocator<_Allocator>::value, void>>
multimap(from_range_t, _Range&&, _Compare = _Compare(), _Allocator = _Allocator())
  -> multimap<__range_key_type<_Range>, __range_mapped_type<_Range>, _Compare, _Allocator>;
#endif
# 2376 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

template<class _Key, class _Tp, class _Compare = less<remove_const_t<_Key>>,
         class _Allocator = allocator<pair<const _Key, _Tp>>,
         class = enable_if_t<!__is_allocator<_Compare>::value, void>,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>>
multimap(initializer_list<pair<_Key, _Tp>>, _Compare = _Compare(), _Allocator = _Allocator())
  -> multimap<remove_const_t<_Key>, _Tp, _Compare, _Allocator>;

template<class _InputIterator, class _Allocator,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value, void>,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>>
multimap(_InputIterator, _InputIterator, _Allocator)
  -> multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>,
         less<__iter_key_type<_InputIterator>>, _Allocator>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2392 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
template <ranges::input_range _Range, class _Allocator,
          class = enable_if_t<__is_allocator<_Allocator>::value, void>>
multimap(from_range_t, _Range&&, _Allocator)
  -> multimap<__range_key_type<_Range>, __range_mapped_type<_Range>, less<__range_key_type<_Range>>, _Allocator>;
#endif
# 2397 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

template<class _Key, class _Tp, class _Allocator,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>>
multimap(initializer_list<pair<_Key, _Tp>>, _Allocator)
  -> multimap<remove_const_t<_Key>, _Tp, less<remove_const_t<_Key>>, _Allocator>;
#endif
# 2403 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

#ifndef _LIBCPP_CXX03_LANG
template <class _Key, class _Tp, class _Compare, class _Allocator>
multimap<_Key, _Tp, _Compare, _Allocator>::multimap(multimap&& __m, const allocator_type& __a)
    : __tree_(_VSTD::move(__m.__tree_), typename __base::allocator_type(__a))
{
    if (__a != __m.get_allocator())
    {
        const_iterator __e = cend();
        while (!__m.empty())
            __tree_.__insert_multi(__e.__i_,
                    _VSTD::move(__m.__tree_.remove(__m.begin().__i_)->__value_.__move()));
    }
}
#endif
# 2418 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
           const multimap<_Key, _Tp, _Compare, _Allocator>& __y)
{
    return __x.size() == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin());
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2429 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator< (const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
           const multimap<_Key, _Tp, _Compare, _Allocator>& __y)
{
    return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
}

template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
           const multimap<_Key, _Tp, _Compare, _Allocator>& __y)
{
    return !(__x == __y);
}

template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator> (const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
           const multimap<_Key, _Tp, _Compare, _Allocator>& __y)
{
    return __y < __x;
}

template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator>=(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
           const multimap<_Key, _Tp, _Compare, _Allocator>& __y)
{
    return !(__x < __y);
}

template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<=(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
           const multimap<_Key, _Tp, _Compare, _Allocator>& __y)
{
    return !(__y < __x);
}

#else // #if _LIBCPP_STD_VER <= 17
# 2476 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

template <class _Key, class _Tp, class _Compare, class _Allocator>
_LIBCPP_HIDE_FROM_ABI __synth_three_way_result<pair<const _Key, _Tp>>
operator<=>(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
            const multimap<_Key, _Tp, _Compare, _Allocator>& __y) {
    return std::lexicographical_compare_three_way(
        __x.begin(),
        __x.end(),
        __y.begin(),
        __y.end(),
        std::__synth_three_way<pair<const _Key, _Tp>, pair<const _Key, _Tp>>);
}

#endif // #if _LIBCPP_STD_VER <= 17
# 2490 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

template <class _Key, class _Tp, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(multimap<_Key, _Tp, _Compare, _Allocator>& __x,
     multimap<_Key, _Tp, _Compare, _Allocator>& __y)
    _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
    __x.swap(__y);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2502 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
template <class _Key, class _Tp, class _Compare, class _Allocator,
          class _Predicate>
inline _LIBCPP_INLINE_VISIBILITY
    typename multimap<_Key, _Tp, _Compare, _Allocator>::size_type
    erase_if(multimap<_Key, _Tp, _Compare, _Allocator>& __c,
             _Predicate __pred) {
  return _VSTD::__libcpp_erase_if_container(__c, __pred);
}
#endif
# 2511 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

_LIBCPP_END_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2515 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
_LIBCPP_BEGIN_NAMESPACE_STD
namespace pmr {
template <class _KeyT, class _ValueT, class _CompareT = std::less<_KeyT>>
using map _LIBCPP_AVAILABILITY_PMR = std::map<_KeyT, _ValueT, _CompareT, polymorphic_allocator<std::pair<const _KeyT, _ValueT>>>;

template <class _KeyT, class _ValueT, class _CompareT = std::less<_KeyT>>
using multimap _LIBCPP_AVAILABILITY_PMR = std::multimap<_KeyT, _ValueT, _CompareT, polymorphic_allocator<std::pair<const _KeyT, _ValueT>>>;
} // namespace pmr
_LIBCPP_END_NAMESPACE_STD
#endif
# 2525 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 2527 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 2527 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 2528 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 2528 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 2529 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#  include <functional>
#endif /* expanded by -frewrite-includes */
# 2529 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 2530 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iterator>
#endif /* expanded by -frewrite-includes */
# 2530 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 2531 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 2531 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 2532 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#if 0 /* expanded by -frewrite-includes */
#  include <utility>
#endif /* expanded by -frewrite-includes */
# 2532 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
# 2533 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#endif
# 2534 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3

#endif // _LIBCPP_MAP
# 2536 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/map" 3
#endif /* map expanded by -frewrite-includes */
# 64 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* set expanded by -frewrite-includes */
#include <set>
#else /* set expanded by -frewrite-includes */
# 64 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_SET
#define _LIBCPP_SET

/*

    set synopsis

namespace std
{

template <class Key, class Compare = less<Key>,
          class Allocator = allocator<Key>>
class set
{
public:
    // types:
    typedef Key                                      key_type;
    typedef key_type                                 value_type;
    typedef Compare                                  key_compare;
    typedef key_compare                              value_compare;
    typedef Allocator                                allocator_type;
    typedef typename allocator_type::reference       reference;
    typedef typename allocator_type::const_reference const_reference;
    typedef typename allocator_type::size_type       size_type;
    typedef typename allocator_type::difference_type difference_type;
    typedef typename allocator_type::pointer         pointer;
    typedef typename allocator_type::const_pointer   const_pointer;

    typedef implementation-defined                   iterator;
    typedef implementation-defined                   const_iterator;
    typedef std::reverse_iterator<iterator>          reverse_iterator;
    typedef std::reverse_iterator<const_iterator>    const_reverse_iterator;
    typedef unspecified                              node_type;               // C++17
    typedef INSERT_RETURN_TYPE<iterator, node_type>  insert_return_type;      // C++17

    // construct/copy/destroy:
    set()
        noexcept(
            is_nothrow_default_constructible<allocator_type>::value &&
            is_nothrow_default_constructible<key_compare>::value &&
            is_nothrow_copy_constructible<key_compare>::value);
    explicit set(const value_compare& comp);
    set(const value_compare& comp, const allocator_type& a);
    template <class InputIterator>
        set(InputIterator first, InputIterator last,
            const value_compare& comp = value_compare());
    template <class InputIterator>
        set(InputIterator first, InputIterator last, const value_compare& comp,
            const allocator_type& a);
    template<container-compatible-range<value_type> R>
      set(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator()); // C++23
    set(const set& s);
    set(set&& s)
        noexcept(
            is_nothrow_move_constructible<allocator_type>::value &&
            is_nothrow_move_constructible<key_compare>::value);
    explicit set(const allocator_type& a);
    set(const set& s, const allocator_type& a);
    set(set&& s, const allocator_type& a);
    set(initializer_list<value_type> il, const value_compare& comp = value_compare());
    set(initializer_list<value_type> il, const value_compare& comp,
        const allocator_type& a);
    template <class InputIterator>
        set(InputIterator first, InputIterator last, const allocator_type& a)
            : set(first, last, Compare(), a) {}  // C++14
    template<container-compatible-range<value_type> R>
      set(from_range_t, R&& rg, const Allocator& a))
        : set(from_range, std::forward<R>(rg), Compare(), a) { } // C++23
    set(initializer_list<value_type> il, const allocator_type& a)
        : set(il, Compare(), a) {}  // C++14
    ~set();

    set& operator=(const set& s);
    set& operator=(set&& s)
        noexcept(
            allocator_type::propagate_on_container_move_assignment::value &&
            is_nothrow_move_assignable<allocator_type>::value &&
            is_nothrow_move_assignable<key_compare>::value);
    set& operator=(initializer_list<value_type> il);

    // iterators:
          iterator begin() noexcept;
    const_iterator begin() const noexcept;
          iterator end() noexcept;
    const_iterator end()   const noexcept;

          reverse_iterator rbegin() noexcept;
    const_reverse_iterator rbegin() const noexcept;
          reverse_iterator rend() noexcept;
    const_reverse_iterator rend()   const noexcept;

    const_iterator         cbegin()  const noexcept;
    const_iterator         cend()    const noexcept;
    const_reverse_iterator crbegin() const noexcept;
    const_reverse_iterator crend()   const noexcept;

    // capacity:
    bool      empty()    const noexcept;
    size_type size()     const noexcept;
    size_type max_size() const noexcept;

    // modifiers:
    template <class... Args>
        pair<iterator, bool> emplace(Args&&... args);
    template <class... Args>
        iterator emplace_hint(const_iterator position, Args&&... args);
    pair<iterator,bool> insert(const value_type& v);
    pair<iterator,bool> insert(value_type&& v);
    iterator insert(const_iterator position, const value_type& v);
    iterator insert(const_iterator position, value_type&& v);
    template <class InputIterator>
        void insert(InputIterator first, InputIterator last);
    template<container-compatible-range<value_type> R>
      void insert_range(R&& rg);                                                      // C++23
    void insert(initializer_list<value_type> il);

    node_type extract(const_iterator position);                                       // C++17
    node_type extract(const key_type& x);                                             // C++17
    insert_return_type insert(node_type&& nh);                                        // C++17
    iterator insert(const_iterator hint, node_type&& nh);                             // C++17

    iterator  erase(const_iterator position);
    iterator  erase(iterator position);  // C++14
    size_type erase(const key_type& k);
    iterator  erase(const_iterator first, const_iterator last);
    void clear() noexcept;

    template<class C2>
      void merge(set<Key, C2, Allocator>& source);         // C++17
    template<class C2>
      void merge(set<Key, C2, Allocator>&& source);        // C++17
    template<class C2>
      void merge(multiset<Key, C2, Allocator>& source);    // C++17
    template<class C2>
      void merge(multiset<Key, C2, Allocator>&& source);   // C++17

    void swap(set& s)
        noexcept(
            __is_nothrow_swappable<key_compare>::value &&
            (!allocator_type::propagate_on_container_swap::value ||
             __is_nothrow_swappable<allocator_type>::value));

    // observers:
    allocator_type get_allocator() const noexcept;
    key_compare    key_comp()      const;
    value_compare  value_comp()    const;

    // set operations:
          iterator find(const key_type& k);
    const_iterator find(const key_type& k) const;
    template<typename K>
        iterator find(const K& x);
    template<typename K>
        const_iterator find(const K& x) const;  // C++14

    template<typename K>
        size_type count(const K& x) const;        // C++14
    size_type      count(const key_type& k) const;

    bool           contains(const key_type& x) const;  // C++20
    template<class K> bool contains(const K& x) const; // C++20

          iterator lower_bound(const key_type& k);
    const_iterator lower_bound(const key_type& k) const;
    template<typename K>
        iterator lower_bound(const K& x);              // C++14
    template<typename K>
        const_iterator lower_bound(const K& x) const;  // C++14

          iterator upper_bound(const key_type& k);
    const_iterator upper_bound(const key_type& k) const;
    template<typename K>
        iterator upper_bound(const K& x);              // C++14
    template<typename K>
        const_iterator upper_bound(const K& x) const;  // C++14
    pair<iterator,iterator>             equal_range(const key_type& k);
    pair<const_iterator,const_iterator> equal_range(const key_type& k) const;
    template<typename K>
        pair<iterator,iterator>             equal_range(const K& x);        // C++14
    template<typename K>
        pair<const_iterator,const_iterator> equal_range(const K& x) const;  // C++14
};

template <class InputIterator,
      class Compare = less<typename iterator_traits<InputIterator>::value_type>,
      class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
set(InputIterator, InputIterator,
    Compare = Compare(), Allocator = Allocator())
  -> set<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>; // C++17

template<ranges::input_range R, class Compare = less<ranges::range_value_t<R>>,
         class Allocator = allocator<ranges::range_value_t<R>>>
  set(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
    -> set<ranges::range_value_t<R>, Compare, Allocator>; // C++23

template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
set(initializer_list<Key>, Compare = Compare(), Allocator = Allocator())
  -> set<Key, Compare, Allocator>; // C++17

template<class InputIterator, class Allocator>
set(InputIterator, InputIterator, Allocator)
  -> set<typename iterator_traits<InputIterator>::value_type,
          less<typename iterator_traits<InputIterator>::value_type>, Allocator>; // C++17

template<ranges::input_range R, class Allocator>
  set(from_range_t, R&&, Allocator)
    -> set<ranges::range_value_t<R>, less<ranges::range_value_t<R>>, Allocator>; // C++23

template<class Key, class Allocator>
set(initializer_list<Key>, Allocator) -> set<Key, less<Key>, Allocator>; // C++17

template <class Key, class Compare, class Allocator>
bool
operator==(const set<Key, Compare, Allocator>& x,
           const set<Key, Compare, Allocator>& y);

template <class Key, class Compare, class Allocator>
bool
operator< (const set<Key, Compare, Allocator>& x,
           const set<Key, Compare, Allocator>& y);                                // removed in C++20

template <class Key, class Compare, class Allocator>
bool
operator!=(const set<Key, Compare, Allocator>& x,
           const set<Key, Compare, Allocator>& y);                                // removed in C++20

template <class Key, class Compare, class Allocator>
bool
operator> (const set<Key, Compare, Allocator>& x,
           const set<Key, Compare, Allocator>& y);                                // removed in C++20

template <class Key, class Compare, class Allocator>
bool
operator>=(const set<Key, Compare, Allocator>& x,
           const set<Key, Compare, Allocator>& y);                                // removed in C++20

template <class Key, class Compare, class Allocator>
bool
operator<=(const set<Key, Compare, Allocator>& x,
           const set<Key, Compare, Allocator>& y);                                // removed in C++20

template<class Key, class Compare, class Allocator>
  synth-three-way-result<Key> operator<=>(const set<Key, Compare, Allocator>& x,
                                          const set<Key, Compare, Allocator>& y); // since C++20

// specialized algorithms:
template <class Key, class Compare, class Allocator>
void
swap(set<Key, Compare, Allocator>& x, set<Key, Compare, Allocator>& y)
    noexcept(noexcept(x.swap(y)));

template <class Key, class Compare, class Allocator, class Predicate>
typename set<Key, Compare, Allocator>::size_type
erase_if(set<Key, Compare, Allocator>& c, Predicate pred);  // C++20

template <class Key, class Compare = less<Key>,
          class Allocator = allocator<Key>>
class multiset
{
public:
    // types:
    typedef Key                                      key_type;
    typedef key_type                                 value_type;
    typedef Compare                                  key_compare;
    typedef key_compare                              value_compare;
    typedef Allocator                                allocator_type;
    typedef typename allocator_type::reference       reference;
    typedef typename allocator_type::const_reference const_reference;
    typedef typename allocator_type::size_type       size_type;
    typedef typename allocator_type::difference_type difference_type;
    typedef typename allocator_type::pointer         pointer;
    typedef typename allocator_type::const_pointer   const_pointer;

    typedef implementation-defined                   iterator;
    typedef implementation-defined                   const_iterator;
    typedef std::reverse_iterator<iterator>          reverse_iterator;
    typedef std::reverse_iterator<const_iterator>    const_reverse_iterator;
    typedef unspecified                              node_type;               // C++17

    // construct/copy/destroy:
    multiset()
        noexcept(
            is_nothrow_default_constructible<allocator_type>::value &&
            is_nothrow_default_constructible<key_compare>::value &&
            is_nothrow_copy_constructible<key_compare>::value);
    explicit multiset(const value_compare& comp);
    multiset(const value_compare& comp, const allocator_type& a);
    template <class InputIterator>
        multiset(InputIterator first, InputIterator last,
                 const value_compare& comp = value_compare());
    template <class InputIterator>
        multiset(InputIterator first, InputIterator last,
                 const value_compare& comp, const allocator_type& a);
    template<container-compatible-range<value_type> R>
      multiset(from_range_t, R&& rg,
               const Compare& comp = Compare(), const Allocator& = Allocator()); // C++23
    multiset(const multiset& s);
    multiset(multiset&& s)
        noexcept(
            is_nothrow_move_constructible<allocator_type>::value &&
            is_nothrow_move_constructible<key_compare>::value);
    explicit multiset(const allocator_type& a);
    multiset(const multiset& s, const allocator_type& a);
    multiset(multiset&& s, const allocator_type& a);
    multiset(initializer_list<value_type> il, const value_compare& comp = value_compare());
    multiset(initializer_list<value_type> il, const value_compare& comp,
             const allocator_type& a);
    template <class InputIterator>
        multiset(InputIterator first, InputIterator last, const allocator_type& a)
            : set(first, last, Compare(), a) {}  // C++14
    template<container-compatible-range<value_type> R>
      multiset(from_range_t, R&& rg, const Allocator& a))
        : multiset(from_range, std::forward<R>(rg), Compare(), a) { } // C++23
    multiset(initializer_list<value_type> il, const allocator_type& a)
        : set(il, Compare(), a) {}  // C++14
    ~multiset();

    multiset& operator=(const multiset& s);
    multiset& operator=(multiset&& s)
        noexcept(
            allocator_type::propagate_on_container_move_assignment::value &&
            is_nothrow_move_assignable<allocator_type>::value &&
            is_nothrow_move_assignable<key_compare>::value);
    multiset& operator=(initializer_list<value_type> il);

    // iterators:
          iterator begin() noexcept;
    const_iterator begin() const noexcept;
          iterator end() noexcept;
    const_iterator end()   const noexcept;

          reverse_iterator rbegin() noexcept;
    const_reverse_iterator rbegin() const noexcept;
          reverse_iterator rend() noexcept;
    const_reverse_iterator rend()   const noexcept;

    const_iterator         cbegin()  const noexcept;
    const_iterator         cend()    const noexcept;
    const_reverse_iterator crbegin() const noexcept;
    const_reverse_iterator crend()   const noexcept;

    // capacity:
    bool      empty()    const noexcept;
    size_type size()     const noexcept;
    size_type max_size() const noexcept;

    // modifiers:
    template <class... Args>
        iterator emplace(Args&&... args);
    template <class... Args>
        iterator emplace_hint(const_iterator position, Args&&... args);
    iterator insert(const value_type& v);
    iterator insert(value_type&& v);
    iterator insert(const_iterator position, const value_type& v);
    iterator insert(const_iterator position, value_type&& v);
    template <class InputIterator>
        void insert(InputIterator first, InputIterator last);
    template<container-compatible-range<value_type> R>
      void insert_range(R&& rg);                                                      // C++23
    void insert(initializer_list<value_type> il);

    node_type extract(const_iterator position);                                       // C++17
    node_type extract(const key_type& x);                                             // C++17
    iterator insert(node_type&& nh);                                                  // C++17
    iterator insert(const_iterator hint, node_type&& nh);                             // C++17

    iterator  erase(const_iterator position);
    iterator  erase(iterator position);  // C++14
    size_type erase(const key_type& k);
    iterator  erase(const_iterator first, const_iterator last);
    void clear() noexcept;

    template<class C2>
      void merge(multiset<Key, C2, Allocator>& source);    // C++17
    template<class C2>
      void merge(multiset<Key, C2, Allocator>&& source);   // C++17
    template<class C2>
      void merge(set<Key, C2, Allocator>& source);         // C++17
    template<class C2>
      void merge(set<Key, C2, Allocator>&& source);        // C++17

    void swap(multiset& s)
        noexcept(
            __is_nothrow_swappable<key_compare>::value &&
            (!allocator_type::propagate_on_container_swap::value ||
             __is_nothrow_swappable<allocator_type>::value));

    // observers:
    allocator_type get_allocator() const noexcept;
    key_compare    key_comp()      const;
    value_compare  value_comp()    const;

    // set operations:
          iterator find(const key_type& k);
    const_iterator find(const key_type& k) const;
    template<typename K>
        iterator find(const K& x);
    template<typename K>
        const_iterator find(const K& x) const;  // C++14

    template<typename K>
        size_type count(const K& x) const;      // C++14
    size_type      count(const key_type& k) const;

    bool           contains(const key_type& x) const;  // C++20
    template<class K> bool contains(const K& x) const; // C++20

          iterator lower_bound(const key_type& k);
    const_iterator lower_bound(const key_type& k) const;
    template<typename K>
        iterator lower_bound(const K& x);              // C++14
    template<typename K>
        const_iterator lower_bound(const K& x) const;  // C++14

          iterator upper_bound(const key_type& k);
    const_iterator upper_bound(const key_type& k) const;
    template<typename K>
        iterator upper_bound(const K& x);              // C++14
    template<typename K>
        const_iterator upper_bound(const K& x) const;  // C++14

    pair<iterator,iterator>             equal_range(const key_type& k);
    pair<const_iterator,const_iterator> equal_range(const key_type& k) const;
    template<typename K>
        pair<iterator,iterator>             equal_range(const K& x);        // C++14
    template<typename K>
        pair<const_iterator,const_iterator> equal_range(const K& x) const;  // C++14
};

template <class InputIterator,
      class Compare = less<typename iterator_traits<InputIterator>::value_type>,
      class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
multiset(InputIterator, InputIterator,
    Compare = Compare(), Allocator = Allocator())
  -> multiset<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>; // C++17

template<ranges::input_range R, class Compare = less<ranges::range_value_t<R>>,
          class Allocator = allocator<ranges::range_value_t<R>>>
  multiset(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
    -> multiset<ranges::range_value_t<R>, Compare, Allocator>;

template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
multiset(initializer_list<Key>, Compare = Compare(), Allocator = Allocator())
  -> multiset<Key, Compare, Allocator>; // C++17

template<class InputIterator, class Allocator>
multiset(InputIterator, InputIterator, Allocator)
  -> multiset<typename iterator_traits<InputIterator>::value_type,
          less<typename iterator_traits<InputIterator>::value_type>, Allocator>; // C++17

template<ranges::input_range R, class Allocator>
  multiset(from_range_t, R&&, Allocator)
    -> multiset<ranges::range_value_t<R>, less<ranges::range_value_t<R>>, Allocator>;

template<class Key, class Allocator>
multiset(initializer_list<Key>, Allocator) -> multiset<Key, less<Key>, Allocator>; // C++17

template <class Key, class Compare, class Allocator>
bool
operator==(const multiset<Key, Compare, Allocator>& x,
           const multiset<Key, Compare, Allocator>& y);

template <class Key, class Compare, class Allocator>
bool
operator< (const multiset<Key, Compare, Allocator>& x,
           const multiset<Key, Compare, Allocator>& y);                                // removed in C++20

template <class Key, class Compare, class Allocator>
bool
operator!=(const multiset<Key, Compare, Allocator>& x,
           const multiset<Key, Compare, Allocator>& y);                                // removed in C++20

template <class Key, class Compare, class Allocator>
bool
operator> (const multiset<Key, Compare, Allocator>& x,
           const multiset<Key, Compare, Allocator>& y);                                // removed in C++20

template <class Key, class Compare, class Allocator>
bool
operator>=(const multiset<Key, Compare, Allocator>& x,
           const multiset<Key, Compare, Allocator>& y);                                // removed in C++20

template <class Key, class Compare, class Allocator>
bool
operator<=(const multiset<Key, Compare, Allocator>& x,
           const multiset<Key, Compare, Allocator>& y);                                // removed in C++20

template<class Key, class Compare, class Allocator>
  synth-three-way-result<Key> operator<=>(const multiset<Key, Compare, Allocator>& x,
                                          const multiset<Key, Compare, Allocator>& y); // since C++20

// specialized algorithms:
template <class Key, class Compare, class Allocator>
void
swap(multiset<Key, Compare, Allocator>& x, multiset<Key, Compare, Allocator>& y)
    noexcept(noexcept(x.swap(y)));

template <class Key, class Compare, class Allocator, class Predicate>
typename multiset<Key, Compare, Allocator>::size_type
erase_if(multiset<Key, Compare, Allocator>& c, Predicate pred);  // C++20

}  // std

*/

#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/equal.h>
#endif /* expanded by -frewrite-includes */
# 515 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 516 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/lexicographical_compare.h>
#endif /* expanded by -frewrite-includes */
# 516 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 517 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__algorithm/lexicographical_compare_three_way.h>
#endif /* expanded by -frewrite-includes */
# 517 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 518 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 518 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 519 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__availability>
#endif /* expanded by -frewrite-includes */
# 519 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 520 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 520 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 521 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/is_transparent.h>
#endif /* expanded by -frewrite-includes */
# 521 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 522 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__functional/operations.h>
#endif /* expanded by -frewrite-includes */
# 522 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 523 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/erase_if_container.h>
#endif /* expanded by -frewrite-includes */
# 523 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 524 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 524 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 525 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/ranges_iterator_traits.h>
#endif /* expanded by -frewrite-includes */
# 525 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 526 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_iterator.h>
#endif /* expanded by -frewrite-includes */
# 526 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 527 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory/allocator.h>
#endif /* expanded by -frewrite-includes */
# 527 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 528 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__memory_resource/polymorphic_allocator.h>
#endif /* expanded by -frewrite-includes */
# 528 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 529 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__node_handle>
#endif /* expanded by -frewrite-includes */
# 529 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 530 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/concepts.h>
#endif /* expanded by -frewrite-includes */
# 530 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 531 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/container_compatible_range.h>
#endif /* expanded by -frewrite-includes */
# 531 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 532 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__ranges/from_range.h>
#endif /* expanded by -frewrite-includes */
# 532 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 533 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__tree>
#endif /* expanded by -frewrite-includes */
# 533 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 534 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__type_traits/is_allocator.h>
#endif /* expanded by -frewrite-includes */
# 534 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 535 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__utility/forward.h>
#endif /* expanded by -frewrite-includes */
# 535 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 536 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <version>
#endif /* expanded by -frewrite-includes */
# 536 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 537 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

// standard-mandated includes

// [iterator.range]
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/access.h>
#endif /* expanded by -frewrite-includes */
# 541 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 542 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/data.h>
#endif /* expanded by -frewrite-includes */
# 542 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 543 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/empty.h>
#endif /* expanded by -frewrite-includes */
# 543 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 544 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/reverse_access.h>
#endif /* expanded by -frewrite-includes */
# 544 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 545 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <__iterator/size.h>
#endif /* expanded by -frewrite-includes */
# 545 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 546 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

// [associative.set.syn]
#if 0 /* expanded by -frewrite-includes */
#include <compare>
#endif /* expanded by -frewrite-includes */
# 548 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 549 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 549 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 550 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 552 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 553 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#endif
# 554 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Key, class _Compare, class _Allocator>
class multiset;

template <class _Key, class _Compare = less<_Key>,
          class _Allocator = allocator<_Key> >
class _LIBCPP_TEMPLATE_VIS set
{
public:
    // types:
    typedef _Key                                     key_type;
    typedef key_type                                 value_type;
    typedef __type_identity_t<_Compare>              key_compare;
    typedef key_compare                              value_compare;
    typedef __type_identity_t<_Allocator>            allocator_type;
    typedef value_type&                              reference;
    typedef const value_type&                        const_reference;

    static_assert((is_same<typename allocator_type::value_type, value_type>::value),
                  "Allocator::value_type must be same type as value_type");

private:
    typedef __tree<value_type, value_compare, allocator_type> __base;
    typedef allocator_traits<allocator_type>                  __alloc_traits;

    static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
                  "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
                  "original allocator");

    __base __tree_;

public:
    typedef typename __base::pointer               pointer;
    typedef typename __base::const_pointer         const_pointer;
    typedef typename __base::size_type             size_type;
    typedef typename __base::difference_type       difference_type;
    typedef typename __base::const_iterator        iterator;
    typedef typename __base::const_iterator        const_iterator;
    typedef _VSTD::reverse_iterator<iterator>       reverse_iterator;
    typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 598 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    typedef __set_node_handle<typename __base::__node, allocator_type> node_type;
    typedef __insert_return_type<iterator, node_type> insert_return_type;
#endif
# 601 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    template <class _Key2, class _Compare2, class _Alloc2>
        friend class _LIBCPP_TEMPLATE_VIS set;
    template <class _Key2, class _Compare2, class _Alloc2>
        friend class _LIBCPP_TEMPLATE_VIS multiset;

    _LIBCPP_INLINE_VISIBILITY
    set()
        _NOEXCEPT_(
            is_nothrow_default_constructible<allocator_type>::value &&
            is_nothrow_default_constructible<key_compare>::value &&
            is_nothrow_copy_constructible<key_compare>::value)
        : __tree_(value_compare()) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit set(const value_compare& __comp)
        _NOEXCEPT_(
            is_nothrow_default_constructible<allocator_type>::value &&
            is_nothrow_copy_constructible<key_compare>::value)
        : __tree_(__comp) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit set(const value_compare& __comp, const allocator_type& __a)
        : __tree_(__comp, __a) {}
    template <class _InputIterator>
        _LIBCPP_INLINE_VISIBILITY
        set(_InputIterator __f, _InputIterator __l,
            const value_compare& __comp = value_compare())
        : __tree_(__comp)
        {
            insert(__f, __l);
        }

    template <class _InputIterator>
        _LIBCPP_INLINE_VISIBILITY
        set(_InputIterator __f, _InputIterator __l, const value_compare& __comp,
            const allocator_type& __a)
        : __tree_(__comp, __a)
        {
            insert(__f, __l);
        }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 644 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    set(from_range_t, _Range&& __range, const key_compare& __comp = key_compare(),
        const allocator_type& __a = allocator_type())
      : __tree_(__comp, __a) {
      insert_range(std::forward<_Range>(__range));
    }
#endif
# 652 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 654 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
        template <class _InputIterator>
        _LIBCPP_INLINE_VISIBILITY
        set(_InputIterator __f, _InputIterator __l, const allocator_type& __a)
            : set(__f, __l, key_compare(), __a) {}
#endif
# 659 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 661 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    set(from_range_t, _Range&& __range, const allocator_type& __a)
      : set(from_range, std::forward<_Range>(__range), key_compare(), __a) {}
#endif
# 666 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    set(const set& __s)
        : __tree_(__s.__tree_)
        {
            insert(__s.begin(), __s.end());
        }

    _LIBCPP_INLINE_VISIBILITY
    set& operator=(const set& __s)
        {
            __tree_ = __s.__tree_;
            return *this;
        }

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    set(set&& __s)
        _NOEXCEPT_(is_nothrow_move_constructible<__base>::value)
        : __tree_(_VSTD::move(__s.__tree_)) {}
#endif // _LIBCPP_CXX03_LANG
# 687 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    explicit set(const allocator_type& __a)
        : __tree_(__a) {}

    _LIBCPP_INLINE_VISIBILITY
    set(const set& __s, const allocator_type& __a)
        : __tree_(__s.__tree_.value_comp(), __a)
        {
            insert(__s.begin(), __s.end());
        }

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_HIDE_FROM_ABI set(set&& __s, const allocator_type& __a);

    _LIBCPP_INLINE_VISIBILITY
    set(initializer_list<value_type> __il, const value_compare& __comp = value_compare())
        : __tree_(__comp)
        {
            insert(__il.begin(), __il.end());
        }

    _LIBCPP_INLINE_VISIBILITY
    set(initializer_list<value_type> __il, const value_compare& __comp,
        const allocator_type& __a)
        : __tree_(__comp, __a)
        {
            insert(__il.begin(), __il.end());
        }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 718 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    _LIBCPP_INLINE_VISIBILITY
    set(initializer_list<value_type> __il, const allocator_type& __a)
        : set(__il, key_compare(), __a) {}
#endif
# 722 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    set& operator=(initializer_list<value_type> __il)
        {
            __tree_.__assign_unique(__il.begin(), __il.end());
            return *this;
        }

    _LIBCPP_INLINE_VISIBILITY
    set& operator=(set&& __s)
        _NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
        {
            __tree_ = _VSTD::move(__s.__tree_);
            return *this;
        }
#endif // _LIBCPP_CXX03_LANG
# 738 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    ~set() {
        static_assert(sizeof(__diagnose_non_const_comparator<_Key, _Compare>()), "");
    }

    _LIBCPP_INLINE_VISIBILITY
          iterator begin() _NOEXCEPT       {return __tree_.begin();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator begin() const _NOEXCEPT {return __tree_.begin();}
    _LIBCPP_INLINE_VISIBILITY
          iterator end() _NOEXCEPT         {return __tree_.end();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator end()   const _NOEXCEPT {return __tree_.end();}

    _LIBCPP_INLINE_VISIBILITY
          reverse_iterator rbegin() _NOEXCEPT
            {return reverse_iterator(end());}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator rbegin() const _NOEXCEPT
        {return const_reverse_iterator(end());}
    _LIBCPP_INLINE_VISIBILITY
          reverse_iterator rend() _NOEXCEPT
            {return reverse_iterator(begin());}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator rend() const _NOEXCEPT
        {return const_reverse_iterator(begin());}

    _LIBCPP_INLINE_VISIBILITY
    const_iterator cbegin()  const _NOEXCEPT {return begin();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator cend() const _NOEXCEPT {return end();}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator crend() const _NOEXCEPT {return rend();}

    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
    bool empty() const _NOEXCEPT {return __tree_.size() == 0;}
    _LIBCPP_INLINE_VISIBILITY
    size_type size() const _NOEXCEPT {return __tree_.size();}
    _LIBCPP_INLINE_VISIBILITY
    size_type max_size() const _NOEXCEPT {return __tree_.max_size();}

    // modifiers:
#ifndef _LIBCPP_CXX03_LANG
    template <class... _Args>
        _LIBCPP_INLINE_VISIBILITY
        pair<iterator, bool> emplace(_Args&&... __args)
            {return __tree_.__emplace_unique(_VSTD::forward<_Args>(__args)...);}
    template <class... _Args>
        _LIBCPP_INLINE_VISIBILITY
        iterator emplace_hint(const_iterator __p, _Args&&... __args)
            {return __tree_.__emplace_hint_unique(__p, _VSTD::forward<_Args>(__args)...);}
#endif // _LIBCPP_CXX03_LANG
# 793 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    pair<iterator,bool> insert(const value_type& __v)
        {return __tree_.__insert_unique(__v);}
    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __p, const value_type& __v)
        {return __tree_.__insert_unique(__p, __v);}

    template <class _InputIterator>
        _LIBCPP_INLINE_VISIBILITY
        void insert(_InputIterator __f, _InputIterator __l)
        {
            for (const_iterator __e = cend(); __f != __l; ++__f)
                __tree_.__insert_unique(__e, *__f);
        }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 810 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    void insert_range(_Range&& __range) {
      const_iterator __end = cend();
      for (auto&& __element : __range) {
        __tree_.__insert_unique(__end, std::forward<decltype(__element)>(__element));
      }
    }
#endif
# 819 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator,bool> insert(value_type&& __v)
        {return __tree_.__insert_unique(_VSTD::move(__v));}

    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __p, value_type&& __v)
        {return __tree_.__insert_unique(__p, _VSTD::move(__v));}

    _LIBCPP_INLINE_VISIBILITY
    void insert(initializer_list<value_type> __il)
        {insert(__il.begin(), __il.end());}
#endif // _LIBCPP_CXX03_LANG
# 833 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    iterator  erase(const_iterator __p) {return __tree_.erase(__p);}
    _LIBCPP_INLINE_VISIBILITY
    size_type erase(const key_type& __k)
        {return __tree_.__erase_unique(__k);}
    _LIBCPP_INLINE_VISIBILITY
    iterator  erase(const_iterator __f, const_iterator __l)
        {return __tree_.erase(__f, __l);}
    _LIBCPP_INLINE_VISIBILITY
    void clear() _NOEXCEPT {__tree_.clear();}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 846 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    _LIBCPP_INLINE_VISIBILITY
    insert_return_type insert(node_type&& __nh)
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__nh.empty() || __nh.get_allocator() == get_allocator(),
            "node_type with incompatible allocator passed to set::insert()");
        return __tree_.template __node_handle_insert_unique<
            node_type, insert_return_type>(_VSTD::move(__nh));
    }
    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __hint, node_type&& __nh)
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__nh.empty() || __nh.get_allocator() == get_allocator(),
            "node_type with incompatible allocator passed to set::insert()");
        return __tree_.template __node_handle_insert_unique<node_type>(
            __hint, _VSTD::move(__nh));
    }
    _LIBCPP_INLINE_VISIBILITY
    node_type extract(key_type const& __key)
    {
        return __tree_.template __node_handle_extract<node_type>(__key);
    }
    _LIBCPP_INLINE_VISIBILITY
    node_type extract(const_iterator __it)
    {
        return __tree_.template __node_handle_extract<node_type>(__it);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(set<key_type, _Compare2, allocator_type>& __source)
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__source.get_allocator() == get_allocator(),
                       "merging container with incompatible allocator");
        __tree_.__node_handle_merge_unique(__source.__tree_);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(set<key_type, _Compare2, allocator_type>&& __source)
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__source.get_allocator() == get_allocator(),
                       "merging container with incompatible allocator");
        __tree_.__node_handle_merge_unique(__source.__tree_);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(multiset<key_type, _Compare2, allocator_type>& __source)
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__source.get_allocator() == get_allocator(),
                       "merging container with incompatible allocator");
        __tree_.__node_handle_merge_unique(__source.__tree_);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(multiset<key_type, _Compare2, allocator_type>&& __source)
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__source.get_allocator() == get_allocator(),
                       "merging container with incompatible allocator");
        __tree_.__node_handle_merge_unique(__source.__tree_);
    }
#endif
# 905 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    void swap(set& __s) _NOEXCEPT_(__is_nothrow_swappable<__base>::value)
        {__tree_.swap(__s.__tree_);}

    _LIBCPP_INLINE_VISIBILITY
    allocator_type get_allocator() const _NOEXCEPT {return __tree_.__alloc();}
    _LIBCPP_INLINE_VISIBILITY
    key_compare    key_comp()      const {return __tree_.value_comp();}
    _LIBCPP_INLINE_VISIBILITY
    value_compare  value_comp()    const {return __tree_.value_comp();}

    // set operations:
    _LIBCPP_INLINE_VISIBILITY
    iterator find(const key_type& __k)             {return __tree_.find(__k);}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator find(const key_type& __k) const {return __tree_.find(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 923 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    iterator
    find(const _K2& __k)                           {return __tree_.find(__k);}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    const_iterator
    find(const _K2& __k) const                     {return __tree_.find(__k);}
#endif
# 932 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    size_type      count(const key_type& __k) const
        {return __tree_.__count_unique(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 937 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    size_type
    count(const _K2& __k) const                    {return __tree_.__count_multi(__k);}
#endif
# 942 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 944 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    _LIBCPP_INLINE_VISIBILITY
    bool contains(const key_type& __k) const {return find(__k) != end();}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    bool
    contains(const _K2& __k) const { return find(__k) != end(); }
#endif // _LIBCPP_STD_VER >= 20
# 951 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    iterator lower_bound(const key_type& __k)
        {return __tree_.lower_bound(__k);}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator lower_bound(const key_type& __k) const
        {return __tree_.lower_bound(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 959 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    iterator
    lower_bound(const _K2& __k)       {return __tree_.lower_bound(__k);}

    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    const_iterator
    lower_bound(const _K2& __k) const {return __tree_.lower_bound(__k);}
#endif
# 969 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    iterator upper_bound(const key_type& __k)
        {return __tree_.upper_bound(__k);}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator upper_bound(const key_type& __k) const
        {return __tree_.upper_bound(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 977 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    iterator
    upper_bound(const _K2& __k)       {return __tree_.upper_bound(__k);}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    const_iterator
    upper_bound(const _K2& __k) const {return __tree_.upper_bound(__k);}
#endif
# 986 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    pair<iterator,iterator> equal_range(const key_type& __k)
        {return __tree_.__equal_range_unique(__k);}
    _LIBCPP_INLINE_VISIBILITY
    pair<const_iterator,const_iterator> equal_range(const key_type& __k) const
        {return __tree_.__equal_range_unique(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 994 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator,iterator>
    equal_range(const _K2& __k)       {return __tree_.__equal_range_multi(__k);}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    pair<const_iterator,const_iterator>
    equal_range(const _K2& __k) const {return __tree_.__equal_range_multi(__k);}
#endif
# 1003 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1006 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
template<class _InputIterator,
         class _Compare = less<__iter_value_type<_InputIterator>>,
         class _Allocator = allocator<__iter_value_type<_InputIterator>>,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value, void>,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>,
         class = enable_if_t<!__is_allocator<_Compare>::value, void>>
set(_InputIterator, _InputIterator, _Compare = _Compare(), _Allocator = _Allocator())
  -> set<__iter_value_type<_InputIterator>, _Compare, _Allocator>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1016 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
template <ranges::input_range _Range, class _Compare = less<ranges::range_value_t<_Range>>,
          class _Allocator = allocator<ranges::range_value_t<_Range>>,
          class = enable_if_t<__is_allocator<_Allocator>::value, void>,
          class = enable_if_t<!__is_allocator<_Compare>::value, void>>
set(from_range_t, _Range&&, _Compare = _Compare(), _Allocator = _Allocator())
  -> set<ranges::range_value_t<_Range>, _Compare, _Allocator>;
#endif
# 1023 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

template<class _Key, class _Compare = less<_Key>,
         class _Allocator = allocator<_Key>,
         class = enable_if_t<!__is_allocator<_Compare>::value, void>,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>>
set(initializer_list<_Key>, _Compare = _Compare(), _Allocator = _Allocator())
  -> set<_Key, _Compare, _Allocator>;

template<class _InputIterator, class _Allocator,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value, void>,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>>
set(_InputIterator, _InputIterator, _Allocator)
  -> set<__iter_value_type<_InputIterator>,
         less<__iter_value_type<_InputIterator>>, _Allocator>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1039 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
template <ranges::input_range _Range, class _Allocator,
          class = enable_if_t<__is_allocator<_Allocator>::value, void>>
set(from_range_t, _Range&&, _Allocator)
  -> set<ranges::range_value_t<_Range>, less<ranges::range_value_t<_Range>>, _Allocator>;
#endif
# 1044 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

template<class _Key, class _Allocator,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>>
set(initializer_list<_Key>, _Allocator)
  -> set<_Key, less<_Key>, _Allocator>;
#endif
# 1050 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

#ifndef _LIBCPP_CXX03_LANG

template <class _Key, class _Compare, class _Allocator>
set<_Key, _Compare, _Allocator>::set(set&& __s, const allocator_type& __a)
    : __tree_(_VSTD::move(__s.__tree_), __a)
{
    if (__a != __s.get_allocator())
    {
        const_iterator __e = cend();
        while (!__s.empty())
            insert(__e, _VSTD::move(__s.__tree_.remove(__s.begin())->__value_));
    }
}

#endif // _LIBCPP_CXX03_LANG
# 1066 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

template <class _Key, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const set<_Key, _Compare, _Allocator>& __x,
           const set<_Key, _Compare, _Allocator>& __y)
{
    return __x.size() == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin());
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1077 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

template <class _Key, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator< (const set<_Key, _Compare, _Allocator>& __x,
           const set<_Key, _Compare, _Allocator>& __y)
{
    return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
}

template <class _Key, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const set<_Key, _Compare, _Allocator>& __x,
           const set<_Key, _Compare, _Allocator>& __y)
{
    return !(__x == __y);
}

template <class _Key, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator> (const set<_Key, _Compare, _Allocator>& __x,
           const set<_Key, _Compare, _Allocator>& __y)
{
    return __y < __x;
}

template <class _Key, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator>=(const set<_Key, _Compare, _Allocator>& __x,
           const set<_Key, _Compare, _Allocator>& __y)
{
    return !(__x < __y);
}

template <class _Key, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<=(const set<_Key, _Compare, _Allocator>& __x,
           const set<_Key, _Compare, _Allocator>& __y)
{
    return !(__y < __x);
}

#else // _LIBCPP_STD_VER <= 17
# 1124 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

template <class _Key, class _Allocator>
_LIBCPP_HIDE_FROM_ABI __synth_three_way_result<_Key>
operator<=>(const set<_Key, _Allocator>& __x, const set<_Key, _Allocator>& __y) {
    return std::lexicographical_compare_three_way(
        __x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way<_Key, _Key>);
}

#endif // _LIBCPP_STD_VER <= 17
# 1133 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

// specialized algorithms:
template <class _Key, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(set<_Key, _Compare, _Allocator>& __x,
     set<_Key, _Compare, _Allocator>& __y)
    _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
    __x.swap(__y);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1146 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
template <class _Key, class _Compare, class _Allocator, class _Predicate>
inline _LIBCPP_INLINE_VISIBILITY
    typename set<_Key, _Compare, _Allocator>::size_type
    erase_if(set<_Key, _Compare, _Allocator>& __c, _Predicate __pred) {
  return _VSTD::__libcpp_erase_if_container(__c, __pred);
}
#endif
# 1153 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

template <class _Key, class _Compare = less<_Key>,
          class _Allocator = allocator<_Key> >
class _LIBCPP_TEMPLATE_VIS multiset
{
public:
    // types:
    typedef _Key                                     key_type;
    typedef key_type                                 value_type;
    typedef __type_identity_t<_Compare>              key_compare;
    typedef key_compare                              value_compare;
    typedef __type_identity_t<_Allocator>            allocator_type;
    typedef value_type&                              reference;
    typedef const value_type&                        const_reference;

    static_assert((is_same<typename allocator_type::value_type, value_type>::value),
                  "Allocator::value_type must be same type as value_type");

private:
    typedef __tree<value_type, value_compare, allocator_type> __base;
    typedef allocator_traits<allocator_type>                  __alloc_traits;

    static_assert(is_same<allocator_type, __rebind_alloc<__alloc_traits, value_type> >::value,
                  "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
                  "original allocator");

    __base __tree_;

public:
    typedef typename __base::pointer               pointer;
    typedef typename __base::const_pointer         const_pointer;
    typedef typename __base::size_type             size_type;
    typedef typename __base::difference_type       difference_type;
    typedef typename __base::const_iterator        iterator;
    typedef typename __base::const_iterator        const_iterator;
    typedef _VSTD::reverse_iterator<iterator>       reverse_iterator;
    typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1192 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    typedef __set_node_handle<typename __base::__node, allocator_type> node_type;
#endif
# 1194 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    template <class _Key2, class _Compare2, class _Alloc2>
        friend class _LIBCPP_TEMPLATE_VIS set;
    template <class _Key2, class _Compare2, class _Alloc2>
        friend class _LIBCPP_TEMPLATE_VIS multiset;

    // construct/copy/destroy:
    _LIBCPP_INLINE_VISIBILITY
    multiset()
        _NOEXCEPT_(
            is_nothrow_default_constructible<allocator_type>::value &&
            is_nothrow_default_constructible<key_compare>::value &&
            is_nothrow_copy_constructible<key_compare>::value)
        : __tree_(value_compare()) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit multiset(const value_compare& __comp)
        _NOEXCEPT_(
            is_nothrow_default_constructible<allocator_type>::value &&
            is_nothrow_copy_constructible<key_compare>::value)
        : __tree_(__comp) {}

    _LIBCPP_INLINE_VISIBILITY
    explicit multiset(const value_compare& __comp, const allocator_type& __a)
        : __tree_(__comp, __a) {}
    template <class _InputIterator>
        _LIBCPP_INLINE_VISIBILITY
        multiset(_InputIterator __f, _InputIterator __l,
                 const value_compare& __comp = value_compare())
        : __tree_(__comp)
        {
            insert(__f, __l);
        }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1229 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
        template <class _InputIterator>
        _LIBCPP_INLINE_VISIBILITY
        multiset(_InputIterator __f, _InputIterator __l, const allocator_type& __a)
            : multiset(__f, __l, key_compare(), __a) {}
#endif
# 1234 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    template <class _InputIterator>
        _LIBCPP_INLINE_VISIBILITY
        multiset(_InputIterator __f, _InputIterator __l,
                 const value_compare& __comp, const allocator_type& __a)
        : __tree_(__comp, __a)
        {
            insert(__f, __l);
        }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1245 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    multiset(from_range_t, _Range&& __range, const key_compare& __comp = key_compare(),
        const allocator_type& __a = allocator_type())
      : __tree_(__comp, __a) {
      insert_range(std::forward<_Range>(__range));
    }

    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    multiset(from_range_t, _Range&& __range, const allocator_type& __a)
      : multiset(from_range, std::forward<_Range>(__range), key_compare(), __a) {}
#endif
# 1258 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    multiset(const multiset& __s)
        : __tree_(__s.__tree_.value_comp(),
          __alloc_traits::select_on_container_copy_construction(__s.__tree_.__alloc()))
        {
            insert(__s.begin(), __s.end());
        }

    _LIBCPP_INLINE_VISIBILITY
    multiset& operator=(const multiset& __s)
        {
            __tree_ = __s.__tree_;
            return *this;
        }

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    multiset(multiset&& __s)
        _NOEXCEPT_(is_nothrow_move_constructible<__base>::value)
        : __tree_(_VSTD::move(__s.__tree_)) {}

    _LIBCPP_HIDE_FROM_ABI multiset(multiset&& __s, const allocator_type& __a);
#endif // _LIBCPP_CXX03_LANG
# 1282 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    _LIBCPP_INLINE_VISIBILITY
    explicit multiset(const allocator_type& __a)
        : __tree_(__a) {}
    _LIBCPP_INLINE_VISIBILITY
    multiset(const multiset& __s, const allocator_type& __a)
        : __tree_(__s.__tree_.value_comp(), __a)
        {
            insert(__s.begin(), __s.end());
        }

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    multiset(initializer_list<value_type> __il, const value_compare& __comp = value_compare())
        : __tree_(__comp)
        {
            insert(__il.begin(), __il.end());
        }

    _LIBCPP_INLINE_VISIBILITY
    multiset(initializer_list<value_type> __il, const value_compare& __comp,
        const allocator_type& __a)
        : __tree_(__comp, __a)
        {
            insert(__il.begin(), __il.end());
        }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1309 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    _LIBCPP_INLINE_VISIBILITY
    multiset(initializer_list<value_type> __il, const allocator_type& __a)
        : multiset(__il, key_compare(), __a) {}
#endif
# 1313 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    multiset& operator=(initializer_list<value_type> __il)
        {
            __tree_.__assign_multi(__il.begin(), __il.end());
            return *this;
        }

    _LIBCPP_INLINE_VISIBILITY
    multiset& operator=(multiset&& __s)
        _NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
        {
            __tree_ = _VSTD::move(__s.__tree_);
            return *this;
        }
#endif // _LIBCPP_CXX03_LANG
# 1329 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    ~multiset() {
        static_assert(sizeof(__diagnose_non_const_comparator<_Key, _Compare>()), "");
    }

    _LIBCPP_INLINE_VISIBILITY
          iterator begin() _NOEXCEPT       {return __tree_.begin();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator begin() const _NOEXCEPT {return __tree_.begin();}
    _LIBCPP_INLINE_VISIBILITY
          iterator end() _NOEXCEPT         {return __tree_.end();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator end()   const _NOEXCEPT {return __tree_.end();}

    _LIBCPP_INLINE_VISIBILITY
          reverse_iterator rbegin() _NOEXCEPT
            {return reverse_iterator(end());}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator rbegin() const _NOEXCEPT
        {return const_reverse_iterator(end());}
    _LIBCPP_INLINE_VISIBILITY
          reverse_iterator rend() _NOEXCEPT
            {return       reverse_iterator(begin());}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator rend() const _NOEXCEPT
        {return const_reverse_iterator(begin());}

    _LIBCPP_INLINE_VISIBILITY
    const_iterator cbegin()  const _NOEXCEPT {return begin();}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator cend() const _NOEXCEPT {return end();}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();}
    _LIBCPP_INLINE_VISIBILITY
    const_reverse_iterator crend() const _NOEXCEPT {return rend();}

    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
    bool empty() const _NOEXCEPT {return __tree_.size() == 0;}
    _LIBCPP_INLINE_VISIBILITY
    size_type size() const _NOEXCEPT {return __tree_.size();}
    _LIBCPP_INLINE_VISIBILITY
    size_type max_size() const _NOEXCEPT {return __tree_.max_size();}

    // modifiers:
#ifndef _LIBCPP_CXX03_LANG
    template <class... _Args>
        _LIBCPP_INLINE_VISIBILITY
        iterator emplace(_Args&&... __args)
            {return __tree_.__emplace_multi(_VSTD::forward<_Args>(__args)...);}
    template <class... _Args>
        _LIBCPP_INLINE_VISIBILITY
        iterator emplace_hint(const_iterator __p, _Args&&... __args)
            {return __tree_.__emplace_hint_multi(__p, _VSTD::forward<_Args>(__args)...);}
#endif // _LIBCPP_CXX03_LANG
# 1384 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const value_type& __v)
        {return __tree_.__insert_multi(__v);}
    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __p, const value_type& __v)
        {return __tree_.__insert_multi(__p, __v);}

    template <class _InputIterator>
        _LIBCPP_INLINE_VISIBILITY
        void insert(_InputIterator __f, _InputIterator __l)
        {
            for (const_iterator __e = cend(); __f != __l; ++__f)
                __tree_.__insert_multi(__e, *__f);
        }

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1401 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    template <_ContainerCompatibleRange<value_type> _Range>
    _LIBCPP_HIDE_FROM_ABI
    void insert_range(_Range&& __range) {
      const_iterator __end = cend();
      for (auto&& __element : __range) {
        __tree_.__insert_multi(__end, std::forward<decltype(__element)>(__element));
      }
    }
#endif
# 1410 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    iterator insert(value_type&& __v)
        {return __tree_.__insert_multi(_VSTD::move(__v));}

    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __p, value_type&& __v)
        {return __tree_.__insert_multi(__p, _VSTD::move(__v));}

    _LIBCPP_INLINE_VISIBILITY
    void insert(initializer_list<value_type> __il)
        {insert(__il.begin(), __il.end());}
#endif // _LIBCPP_CXX03_LANG
# 1424 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    iterator  erase(const_iterator __p) {return __tree_.erase(__p);}
    _LIBCPP_INLINE_VISIBILITY
    size_type erase(const key_type& __k) {return __tree_.__erase_multi(__k);}
    _LIBCPP_INLINE_VISIBILITY
    iterator  erase(const_iterator __f, const_iterator __l)
        {return __tree_.erase(__f, __l);}
    _LIBCPP_INLINE_VISIBILITY
    void clear() _NOEXCEPT {__tree_.clear();}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1436 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    _LIBCPP_INLINE_VISIBILITY
    iterator insert(node_type&& __nh)
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__nh.empty() || __nh.get_allocator() == get_allocator(),
            "node_type with incompatible allocator passed to multiset::insert()");
        return __tree_.template __node_handle_insert_multi<node_type>(
            _VSTD::move(__nh));
    }
    _LIBCPP_INLINE_VISIBILITY
    iterator insert(const_iterator __hint, node_type&& __nh)
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__nh.empty() || __nh.get_allocator() == get_allocator(),
            "node_type with incompatible allocator passed to multiset::insert()");
        return __tree_.template __node_handle_insert_multi<node_type>(
            __hint, _VSTD::move(__nh));
    }
    _LIBCPP_INLINE_VISIBILITY
    node_type extract(key_type const& __key)
    {
        return __tree_.template __node_handle_extract<node_type>(__key);
    }
    _LIBCPP_INLINE_VISIBILITY
    node_type extract(const_iterator __it)
    {
        return __tree_.template __node_handle_extract<node_type>(__it);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(multiset<key_type, _Compare2, allocator_type>& __source)
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__source.get_allocator() == get_allocator(),
                       "merging container with incompatible allocator");
        __tree_.__node_handle_merge_multi(__source.__tree_);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(multiset<key_type, _Compare2, allocator_type>&& __source)
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__source.get_allocator() == get_allocator(),
                       "merging container with incompatible allocator");
        __tree_.__node_handle_merge_multi(__source.__tree_);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(set<key_type, _Compare2, allocator_type>& __source)
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__source.get_allocator() == get_allocator(),
                       "merging container with incompatible allocator");
        __tree_.__node_handle_merge_multi(__source.__tree_);
    }
    template <class _Compare2>
    _LIBCPP_INLINE_VISIBILITY
    void merge(set<key_type, _Compare2, allocator_type>&& __source)
    {
        _LIBCPP_ASSERT_UNCATEGORIZED(__source.get_allocator() == get_allocator(),
                       "merging container with incompatible allocator");
        __tree_.__node_handle_merge_multi(__source.__tree_);
    }
#endif
# 1495 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    void swap(multiset& __s)
        _NOEXCEPT_(__is_nothrow_swappable<__base>::value)
        {__tree_.swap(__s.__tree_);}

    _LIBCPP_INLINE_VISIBILITY
    allocator_type get_allocator() const _NOEXCEPT {return __tree_.__alloc();}
    _LIBCPP_INLINE_VISIBILITY
    key_compare    key_comp()      const {return __tree_.value_comp();}
    _LIBCPP_INLINE_VISIBILITY
    value_compare  value_comp()    const {return __tree_.value_comp();}

    // set operations:
    _LIBCPP_INLINE_VISIBILITY
    iterator find(const key_type& __k)             {return __tree_.find(__k);}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator find(const key_type& __k) const {return __tree_.find(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1514 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    iterator
    find(const _K2& __k)                           {return __tree_.find(__k);}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    const_iterator
    find(const _K2& __k) const                     {return __tree_.find(__k);}
#endif
# 1523 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    size_type      count(const key_type& __k) const
        {return __tree_.__count_multi(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1528 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    size_type
    count(const _K2& __k) const            {return __tree_.__count_multi(__k);}
#endif
# 1533 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1535 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    _LIBCPP_INLINE_VISIBILITY
    bool contains(const key_type& __k) const {return find(__k) != end();}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
     bool
    contains(const _K2& __k) const { return find(__k) != end(); }
#endif // _LIBCPP_STD_VER >= 20
# 1542 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    iterator lower_bound(const key_type& __k)
        {return __tree_.lower_bound(__k);}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator lower_bound(const key_type& __k) const
            {return __tree_.lower_bound(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1550 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    iterator
    lower_bound(const _K2& __k)       {return __tree_.lower_bound(__k);}

    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    const_iterator
    lower_bound(const _K2& __k) const {return __tree_.lower_bound(__k);}
#endif
# 1560 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    iterator upper_bound(const key_type& __k)
            {return __tree_.upper_bound(__k);}
    _LIBCPP_INLINE_VISIBILITY
    const_iterator upper_bound(const key_type& __k) const
            {return __tree_.upper_bound(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1568 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    iterator
    upper_bound(const _K2& __k)       {return __tree_.upper_bound(__k);}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    const_iterator
    upper_bound(const _K2& __k) const {return __tree_.upper_bound(__k);}
#endif
# 1577 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

    _LIBCPP_INLINE_VISIBILITY
    pair<iterator,iterator>             equal_range(const key_type& __k)
            {return __tree_.__equal_range_multi(__k);}
    _LIBCPP_INLINE_VISIBILITY
    pair<const_iterator,const_iterator> equal_range(const key_type& __k) const
            {return __tree_.__equal_range_multi(__k);}
#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 14
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1585 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    pair<iterator,iterator>
    equal_range(const _K2& __k)       {return __tree_.__equal_range_multi(__k);}
    template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value, int> = 0>
    _LIBCPP_INLINE_VISIBILITY
    pair<const_iterator,const_iterator>
    equal_range(const _K2& __k) const {return __tree_.__equal_range_multi(__k);}
#endif
# 1594 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
};

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1597 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
template<class _InputIterator,
         class _Compare = less<__iter_value_type<_InputIterator>>,
         class _Allocator = allocator<__iter_value_type<_InputIterator>>,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value, void>,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>,
         class = enable_if_t<!__is_allocator<_Compare>::value, void>>
multiset(_InputIterator, _InputIterator, _Compare = _Compare(), _Allocator = _Allocator())
  -> multiset<__iter_value_type<_InputIterator>, _Compare, _Allocator>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1607 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
template <ranges::input_range _Range, class _Compare = less<ranges::range_value_t<_Range>>,
          class _Allocator = allocator<ranges::range_value_t<_Range>>,
          class = enable_if_t<__is_allocator<_Allocator>::value, void>,
          class = enable_if_t<!__is_allocator<_Compare>::value, void>>
multiset(from_range_t, _Range&&, _Compare = _Compare(), _Allocator = _Allocator())
  -> multiset<ranges::range_value_t<_Range>, _Compare, _Allocator>;
#endif
# 1614 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

template<class _Key, class _Compare = less<_Key>,
         class _Allocator = allocator<_Key>,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>,
         class = enable_if_t<!__is_allocator<_Compare>::value, void>>
multiset(initializer_list<_Key>, _Compare = _Compare(), _Allocator = _Allocator())
  -> multiset<_Key, _Compare, _Allocator>;

template<class _InputIterator, class _Allocator,
         class = enable_if_t<__has_input_iterator_category<_InputIterator>::value, void>,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>>
multiset(_InputIterator, _InputIterator, _Allocator)
  -> multiset<__iter_value_type<_InputIterator>,
         less<__iter_value_type<_InputIterator>>, _Allocator>;

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 23
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1630 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
template <ranges::input_range _Range, class _Allocator,
          class = enable_if_t<__is_allocator<_Allocator>::value, void>>
multiset(from_range_t, _Range&&, _Allocator)
  -> multiset<ranges::range_value_t<_Range>, less<ranges::range_value_t<_Range>>, _Allocator>;
#endif
# 1635 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

template<class _Key, class _Allocator,
         class = enable_if_t<__is_allocator<_Allocator>::value, void>>
multiset(initializer_list<_Key>, _Allocator)
  -> multiset<_Key, less<_Key>, _Allocator>;
#endif
# 1641 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

#ifndef _LIBCPP_CXX03_LANG

template <class _Key, class _Compare, class _Allocator>
multiset<_Key, _Compare, _Allocator>::multiset(multiset&& __s, const allocator_type& __a)
    : __tree_(_VSTD::move(__s.__tree_), __a)
{
    if (__a != __s.get_allocator())
    {
        const_iterator __e = cend();
        while (!__s.empty())
            insert(__e, _VSTD::move(__s.__tree_.remove(__s.begin())->__value_));
    }
}

#endif // _LIBCPP_CXX03_LANG
# 1657 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

template <class _Key, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const multiset<_Key, _Compare, _Allocator>& __x,
           const multiset<_Key, _Compare, _Allocator>& __y)
{
    return __x.size() == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin());
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER <= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1668 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

template <class _Key, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator< (const multiset<_Key, _Compare, _Allocator>& __x,
           const multiset<_Key, _Compare, _Allocator>& __y)
{
    return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
}

template <class _Key, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const multiset<_Key, _Compare, _Allocator>& __x,
           const multiset<_Key, _Compare, _Allocator>& __y)
{
    return !(__x == __y);
}

template <class _Key, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator> (const multiset<_Key, _Compare, _Allocator>& __x,
           const multiset<_Key, _Compare, _Allocator>& __y)
{
    return __y < __x;
}

template <class _Key, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator>=(const multiset<_Key, _Compare, _Allocator>& __x,
           const multiset<_Key, _Compare, _Allocator>& __y)
{
    return !(__x < __y);
}

template <class _Key, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<=(const multiset<_Key, _Compare, _Allocator>& __x,
           const multiset<_Key, _Compare, _Allocator>& __y)
{
    return !(__y < __x);
}

#else // _LIBCPP_STD_VER <= 17
# 1715 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

template <class _Key, class _Allocator>
_LIBCPP_HIDE_FROM_ABI __synth_three_way_result<_Key>
operator<=>(const multiset<_Key, _Allocator>& __x, const multiset<_Key, _Allocator>& __y) {
    return std::lexicographical_compare_three_way(
        __x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way<_Key, _Key>);
}

#endif // _LIBCPP_STD_VER <= 17
# 1724 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

template <class _Key, class _Compare, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
void
swap(multiset<_Key, _Compare, _Allocator>& __x,
     multiset<_Key, _Compare, _Allocator>& __y)
    _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
    __x.swap(__y);
}

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1736 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
template <class _Key, class _Compare, class _Allocator, class _Predicate>
inline _LIBCPP_INLINE_VISIBILITY
    typename multiset<_Key, _Compare, _Allocator>::size_type
    erase_if(multiset<_Key, _Compare, _Allocator>& __c, _Predicate __pred) {
  return _VSTD::__libcpp_erase_if_container(__c, __pred);
}
#endif
# 1743 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

_LIBCPP_END_NAMESPACE_STD

#if 0 /* disabled by -frewrite-includes */
#if _LIBCPP_STD_VER >= 17
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1747 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
_LIBCPP_BEGIN_NAMESPACE_STD
namespace pmr {
template <class _KeyT, class _CompareT = std::less<_KeyT>>
using set _LIBCPP_AVAILABILITY_PMR = std::set<_KeyT, _CompareT, polymorphic_allocator<_KeyT>>;

template <class _KeyT, class _CompareT = std::less<_KeyT>>
using multiset _LIBCPP_AVAILABILITY_PMR = std::multiset<_KeyT, _CompareT, polymorphic_allocator<_KeyT>>;
} // namespace pmr
_LIBCPP_END_NAMESPACE_STD
#endif
# 1757 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1759 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#  include <concepts>
#endif /* expanded by -frewrite-includes */
# 1759 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 1760 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#  include <cstdlib>
#endif /* expanded by -frewrite-includes */
# 1760 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 1761 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#  include <functional>
#endif /* expanded by -frewrite-includes */
# 1761 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 1762 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#  include <iterator>
#endif /* expanded by -frewrite-includes */
# 1762 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 1763 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#if 0 /* expanded by -frewrite-includes */
#  include <type_traits>
#endif /* expanded by -frewrite-includes */
# 1763 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
# 1764 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#endif
# 1765 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3

#endif // _LIBCPP_SET
# 1767 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/set" 3
#endif /* set expanded by -frewrite-includes */
# 65 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <string>
#endif /* expanded by -frewrite-includes */
# 65 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 66 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 66 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 67 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#if 0 /* expanded by -frewrite-includes */
#include <vector>
#endif /* expanded by -frewrite-includes */
# 67 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 68 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

#if 0 /* expanded by -frewrite-includes */
#include "gtest/gtest-message.h"
#endif /* expanded by -frewrite-includes */
# 69 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 70 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-filepath.h expanded by -frewrite-includes */
#include "gtest/internal/gtest-filepath.h"
#else /* gtest-filepath.h expanded by -frewrite-includes */
# 70 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-filepath.h" 1
// Copyright 2008, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// Google Test filepath utilities
//
// This header file declares classes and functions used internally by
// Google Test.  They are subject to change without notice.
//
// This file is #included in gtest/internal/gtest-internal.h.
// Do not include this header file separately!

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_

#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-string.h expanded by -frewrite-includes */
#include "gtest/internal/gtest-string.h"
#else /* gtest-string.h expanded by -frewrite-includes */
# 45 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-filepath.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h" 1
// Copyright 2005, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// The Google C++ Testing and Mocking Framework (Google Test)
//
// This header file declares the String class and functions used internally by
// Google Test.  They are subject to change without notice. They should not used
// by code external to Google Test.
//
// This header file is #included by gtest-internal.h.
// It should not be #included by other files.

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_

#ifdef __BORLANDC__
// string.h is not guaranteed to provide strcpy on C++ Builder.
#if 0 /* expanded by -frewrite-includes */
#include <mem.h>
#endif /* expanded by -frewrite-includes */
# 48 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h"
# 49 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h"
#endif
# 50 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h"

#if 0 /* expanded by -frewrite-includes */
#include <string.h>
#endif /* expanded by -frewrite-includes */
# 51 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h"
# 52 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h"

#if 0 /* expanded by -frewrite-includes */
#include <cstdint>
#endif /* expanded by -frewrite-includes */
# 53 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h"
# 54 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h"
#if 0 /* expanded by -frewrite-includes */
#include <string>
#endif /* expanded by -frewrite-includes */
# 54 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h"
# 55 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h"

#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-port.h"
#endif /* expanded by -frewrite-includes */
# 56 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h"
# 57 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h"

namespace testing {
namespace internal {

// String - an abstract class holding static string utilities.
class GTEST_API_ String {
 public:
  // Static utility methods

  // Clones a 0-terminated C string, allocating memory using new.  The
  // caller is responsible for deleting the return value using
  // delete[].  Returns the cloned string, or NULL if the input is
  // NULL.
  //
  // This is different from strdup() in string.h, which allocates
  // memory using malloc().
  static const char* CloneCString(const char* c_str);

#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_WINDOWS_MOBILE
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 76 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h"
  // Windows CE does not have the 'ANSI' versions of Win32 APIs. To be
  // able to pass strings to Win32 APIs on CE we need to convert them
  // to 'Unicode', UTF-16.

  // Creates a UTF-16 wide string from the given ANSI string, allocating
  // memory using new. The caller is responsible for deleting the return
  // value using delete[]. Returns the wide string, or NULL if the
  // input is NULL.
  //
  // The wide string is created using the ANSI codepage (CP_ACP) to
  // match the behaviour of the ANSI versions of Win32 calls and the
  // C runtime.
  static LPCWSTR AnsiToUtf16(const char* c_str);

  // Creates an ANSI string from the given wide string, allocating
  // memory using new. The caller is responsible for deleting the return
  // value using delete[]. Returns the ANSI string, or NULL if the
  // input is NULL.
  //
  // The returned string is created using the ANSI codepage (CP_ACP) to
  // match the behaviour of the ANSI versions of Win32 calls and the
  // C runtime.
  static const char* Utf16ToAnsi(LPCWSTR utf16_str);
#endif
# 100 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h"

  // Compares two C strings.  Returns true if and only if they have the same
  // content.
  //
  // Unlike strcmp(), this function can handle NULL argument(s).  A
  // NULL C string is considered different to any non-NULL C string,
  // including the empty string.
  static bool CStringEquals(const char* lhs, const char* rhs);

  // Converts a wide C string to a String using the UTF-8 encoding.
  // NULL will be converted to "(null)".  If an error occurred during
  // the conversion, "(failed to convert from wide string)" is
  // returned.
  static std::string ShowWideCString(const wchar_t* wide_c_str);

  // Compares two wide C strings.  Returns true if and only if they have the
  // same content.
  //
  // Unlike wcscmp(), this function can handle NULL argument(s).  A
  // NULL C string is considered different to any non-NULL C string,
  // including the empty string.
  static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs);

  // Compares two C strings, ignoring case.  Returns true if and only if
  // they have the same content.
  //
  // Unlike strcasecmp(), this function can handle NULL argument(s).
  // A NULL C string is considered different to any non-NULL C string,
  // including the empty string.
  static bool CaseInsensitiveCStringEquals(const char* lhs, const char* rhs);

  // Compares two wide C strings, ignoring case.  Returns true if and only if
  // they have the same content.
  //
  // Unlike wcscasecmp(), this function can handle NULL argument(s).
  // A NULL C string is considered different to any non-NULL wide C string,
  // including the empty string.
  // NB: The implementations on different platforms slightly differ.
  // On windows, this method uses _wcsicmp which compares according to LC_CTYPE
  // environment variable. On GNU platform this method uses wcscasecmp
  // which compares according to LC_CTYPE category of the current locale.
  // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the
  // current locale.
  static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs,
                                               const wchar_t* rhs);

  // Returns true if and only if the given string ends with the given suffix,
  // ignoring case. Any string is considered to end with an empty suffix.
  static bool EndsWithCaseInsensitive(const std::string& str,
                                      const std::string& suffix);

  // Formats an int value as "%02d".
  static std::string FormatIntWidth2(int value);  // "%02d" for width == 2

  // Formats an int value to given width with leading zeros.
  static std::string FormatIntWidthN(int value, int width);

  // Formats an int value as "%X".
  static std::string FormatHexInt(int value);

  // Formats an int value as "%X".
  static std::string FormatHexUInt32(uint32_t value);

  // Formats a byte as "%02X".
  static std::string FormatByte(unsigned char value);

 private:
  String();  // Not meant to be instantiated.
};           // class String

// Gets the content of the stringstream's buffer as an std::string.  Each '\0'
// character in the buffer is replaced with "\\0".
GTEST_API_ std::string StringStreamToString(::std::stringstream* stream);

}  // namespace internal
}  // namespace testing

#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
# 178 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h"
#endif /* gtest-string.h expanded by -frewrite-includes */
# 46 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-filepath.h" 2

GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
/* class A needs to have dll-interface to be used by clients of class B */)

namespace testing {
namespace internal {

// FilePath - a class for file and directory pathname manipulation which
// handles platform-specific conventions (like the pathname separator).
// Used for helper functions for naming files in a directory for xml output.
// Except for Set methods, all methods are const or static, which provides an
// "immutable value object" -- useful for peace of mind.
// A FilePath with a value ending in a path separator ("like/this/") represents
// a directory, otherwise it is assumed to represent a file. In either case,
// it may or may not represent an actual file or directory in the file system.
// Names are NOT checked for syntax correctness -- no checking for illegal
// characters, malformed paths, etc.

class GTEST_API_ FilePath {
 public:
  FilePath() : pathname_("") {}
  FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) {}

  explicit FilePath(const std::string& pathname) : pathname_(pathname) {
    Normalize();
  }

  FilePath& operator=(const FilePath& rhs) {
    Set(rhs);
    return *this;
  }

  void Set(const FilePath& rhs) { pathname_ = rhs.pathname_; }

  const std::string& string() const { return pathname_; }
  const char* c_str() const { return pathname_.c_str(); }

  // Returns the current working directory, or "" if unsuccessful.
  static FilePath GetCurrentDir();

  // Given directory = "dir", base_name = "test", number = 0,
  // extension = "xml", returns "dir/test.xml". If number is greater
  // than zero (e.g., 12), returns "dir/test_12.xml".
  // On Windows platform, uses \ as the separator rather than /.
  static FilePath MakeFileName(const FilePath& directory,
                               const FilePath& base_name, int number,
                               const char* extension);

  // Given directory = "dir", relative_path = "test.xml",
  // returns "dir/test.xml".
  // On Windows, uses \ as the separator rather than /.
  static FilePath ConcatPaths(const FilePath& directory,
                              const FilePath& relative_path);

  // Returns a pathname for a file that does not currently exist. The pathname
  // will be directory/base_name.extension or
  // directory/base_name_<number>.extension if directory/base_name.extension
  // already exists. The number will be incremented until a pathname is found
  // that does not already exist.
  // Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'.
  // There could be a race condition if two or more processes are calling this
  // function at the same time -- they could both pick the same filename.
  static FilePath GenerateUniqueFileName(const FilePath& directory,
                                         const FilePath& base_name,
                                         const char* extension);

  // Returns true if and only if the path is "".
  bool IsEmpty() const { return pathname_.empty(); }

  // If input name has a trailing separator character, removes it and returns
  // the name, otherwise return the name string unmodified.
  // On Windows platform, uses \ as the separator, other platforms use /.
  FilePath RemoveTrailingPathSeparator() const;

  // Returns a copy of the FilePath with the directory part removed.
  // Example: FilePath("path/to/file").RemoveDirectoryName() returns
  // FilePath("file"). If there is no directory part ("just_a_file"), it returns
  // the FilePath unmodified. If there is no file part ("just_a_dir/") it
  // returns an empty FilePath ("").
  // On Windows platform, '\' is the path separator, otherwise it is '/'.
  FilePath RemoveDirectoryName() const;

  // RemoveFileName returns the directory path with the filename removed.
  // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/".
  // If the FilePath is "a_file" or "/a_file", RemoveFileName returns
  // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does
  // not have a file, like "just/a/dir/", it returns the FilePath unmodified.
  // On Windows platform, '\' is the path separator, otherwise it is '/'.
  FilePath RemoveFileName() const;

  // Returns a copy of the FilePath with the case-insensitive extension removed.
  // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns
  // FilePath("dir/file"). If a case-insensitive extension is not
  // found, returns a copy of the original FilePath.
  FilePath RemoveExtension(const char* extension) const;

  // Creates directories so that path exists. Returns true if successful or if
  // the directories already exist; returns false if unable to create
  // directories for any reason. Will also return false if the FilePath does
  // not represent a directory (that is, it doesn't end with a path separator).
  bool CreateDirectoriesRecursively() const;

  // Create the directory so that path exists. Returns true if successful or
  // if the directory already exists; returns false if unable to create the
  // directory for any reason, including if the parent directory does not
  // exist. Not named "CreateDirectory" because that's a macro on Windows.
  bool CreateFolder() const;

  // Returns true if FilePath describes something in the file-system,
  // either a file, directory, or whatever, and that something exists.
  bool FileOrDirectoryExists() const;

  // Returns true if pathname describes a directory in the file-system
  // that exists.
  bool DirectoryExists() const;

  // Returns true if FilePath ends with a path separator, which indicates that
  // it is intended to represent a directory. Returns false otherwise.
  // This does NOT check that a directory (or file) actually exists.
  bool IsDirectory() const;

  // Returns true if pathname describes a root directory. (Windows has one
  // root directory per disk drive.)
  bool IsRootDirectory() const;

  // Returns true if pathname describes an absolute path.
  bool IsAbsolutePath() const;

 private:
  // Replaces multiple consecutive separators with a single separator.
  // For example, "bar///foo" becomes "bar/foo". Does not eliminate other
  // redundancies that might be in a pathname involving "." or "..".
  //
  // A pathname with multiple consecutive separators may occur either through
  // user error or as a result of some scripts or APIs that generate a pathname
  // with a trailing separator. On other platforms the same API or script
  // may NOT generate a pathname with a trailing "/". Then elsewhere that
  // pathname may have another "/" and pathname components added to it,
  // without checking for the separator already being there.
  // The script language and operating system may allow paths like "foo//bar"
  // but some of the functions in FilePath will not handle that correctly. In
  // particular, RemoveTrailingPathSeparator() only removes one separator, and
  // it is called in CreateDirectoriesRecursively() assuming that it will change
  // a pathname from directory syntax (trailing separator) to filename syntax.
  //
  // On Windows this method also replaces the alternate path separator '/' with
  // the primary path separator '\\', so that for example "bar\\/\\foo" becomes
  // "bar\\foo".

  void Normalize();

  // Returns a pointer to the last occurrence of a valid path separator in
  // the FilePath. On Windows, for example, both '/' and '\' are valid path
  // separators. Returns NULL if no path separator was found.
  const char* FindLastPathSeparator() const;

  std::string pathname_;
};  // class FilePath

}  // namespace internal
}  // namespace testing

GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251

#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
# 211 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-filepath.h"
#endif /* gtest-filepath.h expanded by -frewrite-includes */
# 71 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-string.h"
#endif /* expanded by -frewrite-includes */
# 71 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 72 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-type-util.h expanded by -frewrite-includes */
#include "gtest/internal/gtest-type-util.h"
#else /* gtest-type-util.h expanded by -frewrite-includes */
# 72 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h" 1
// Copyright 2008 Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// Type utilities needed for implementing typed and type-parameterized
// tests.

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_

#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-port.h"
#endif /* expanded by -frewrite-includes */
# 40 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
# 41 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"

// #ifdef __GNUC__ is too general here.  It is possible to use gcc without using
// libstdc++ (which is where cxxabi.h comes from).
#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_CXXABI_H_
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 45 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cxxabi.h expanded by -frewrite-includes */
#include <cxxabi.h>
#else /* cxxabi.h expanded by -frewrite-includes */
# 45 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef __CXXABI_H
#define __CXXABI_H

/*
 * This header provides the interface to the C++ ABI as defined at:
 *       https://itanium-cxx-abi.github.io/cxx-abi/
 */

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stddef.h expanded by -frewrite-includes */
#include <stddef.h>
#else /* stddef.h expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#if 0 /* disabled by -frewrite-includes */
#if defined(__need_ptrdiff_t) || defined(__need_size_t) || \
    defined(__need_wchar_t) || defined(__need_NULL) || defined(__need_wint_t)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 12 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 15 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#endif
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* expanded by -frewrite-includes */
#include_next <stddef.h>
#endif /* expanded by -frewrite-includes */
# 17 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if 0
#elif !defined(_LIBCPP_STDDEF_H)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#define _LIBCPP_STDDEF_H

/*
    stddef.h synopsis

Macros:

    offsetof(type,member-designator)
    NULL

Types:

    ptrdiff_t
    size_t
    max_align_t // C++11
    nullptr_t

*/

#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 39 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
# 40 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 42 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 43 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#endif
# 44 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#if 0 /* disabled by -frewrite-includes */
#  if __has_include_next(<stddef.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#if 0 /* expanded by -frewrite-includes */
#    include_next <stddef.h>
#endif /* expanded by -frewrite-includes */
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
# 47 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#  endif
# 48 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#ifdef __cplusplus
    typedef decltype(nullptr) nullptr_t;
#endif
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3

#endif // _LIBCPP_STDDEF_H
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/stddef.h" 3
#endif /* stddef.h expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <stdint.h>
#endif /* expanded by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* __cxxabi_config.h expanded by -frewrite-includes */
#include <__cxxabi_config.h>
#else /* __cxxabi_config.h expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 1 3
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef ____CXXABI_CONFIG_H
#define ____CXXABI_CONFIG_H

#if 0 /* disabled by -frewrite-includes */
#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) &&                 \
    !defined(__ARM_DWARF_EH__) && !defined(__SEH__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 14 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#define _LIBCXXABI_ARM_EHABI
#endif
# 16 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(__has_attribute)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 18 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#define __has_attribute(_attribute_) 0
#endif
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 22 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#  define _LIBCXXABI_COMPILER_CLANG
#  ifndef __apple_build_version__
#    define _LIBCXXABI_CLANG_VER (__clang_major__ * 100 + __clang_minor__)
#  endif
# 26 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__GNUC__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 27 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#  define _LIBCXXABI_COMPILER_GCC
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_MSC_VER)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#  define _LIBCXXABI_COMPILER_MSVC
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__IBMCPP__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#  define _LIBCXXABI_COMPILER_IBM
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_WIN32)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 35 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
 
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS) || (defined(__MINGW32__) && !defined(_LIBCXXABI_BUILDING_LIBRARY))
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 36 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
  #define _LIBCXXABI_HIDDEN
  #define _LIBCXXABI_DATA_VIS
  #define _LIBCXXABI_FUNC_VIS
  #define _LIBCXXABI_TYPE_VIS
 
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_LIBCXXABI_BUILDING_LIBRARY)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 41 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
  #define _LIBCXXABI_HIDDEN
  #define _LIBCXXABI_DATA_VIS __declspec(dllexport)
  #define _LIBCXXABI_FUNC_VIS __declspec(dllexport)
  #define _LIBCXXABI_TYPE_VIS __declspec(dllexport)
 #else
# 46 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
  #define _LIBCXXABI_HIDDEN
  #define _LIBCXXABI_DATA_VIS __declspec(dllimport)
  #define _LIBCXXABI_FUNC_VIS __declspec(dllimport)
  #define _LIBCXXABI_TYPE_VIS __declspec(dllimport)
 #endif
# 51 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#else
# 52 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
 
#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 53 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
  #define _LIBCXXABI_HIDDEN __attribute__((__visibility__("hidden")))
  #define _LIBCXXABI_DATA_VIS __attribute__((__visibility__("default")))
  #define _LIBCXXABI_FUNC_VIS __attribute__((__visibility__("default")))
  
#if 0 /* disabled by -frewrite-includes */
#if __has_attribute(__type_visibility__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 57 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
   #define _LIBCXXABI_TYPE_VIS __attribute__((__type_visibility__("default")))
  #else
# 59 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
   #define _LIBCXXABI_TYPE_VIS __attribute__((__visibility__("default")))
  #endif
# 61 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
 #else
# 62 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
  #define _LIBCXXABI_HIDDEN
  #define _LIBCXXABI_DATA_VIS
  #define _LIBCXXABI_FUNC_VIS
  #define _LIBCXXABI_TYPE_VIS
 #endif
# 67 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#endif
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCXXABI_COMPILER_MSVC)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 70 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#define _LIBCXXABI_WEAK
#else
# 72 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#define _LIBCXXABI_WEAK __attribute__((__weak__))
#endif
# 74 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(__clang__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 76 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#define _LIBCXXABI_COMPILER_CLANG
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__GNUC__)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 78 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#define _LIBCXXABI_COMPILER_GCC
#endif
# 80 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3

#if 0 /* disabled by -frewrite-includes */
#if __has_attribute(__no_sanitize__) && defined(_LIBCXXABI_COMPILER_CLANG)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 82 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#define _LIBCXXABI_NO_CFI __attribute__((__no_sanitize__("cfi")))
#else
# 84 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#define _LIBCXXABI_NO_CFI
#endif
# 86 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3

// wasm32 follows the arm32 ABI convention of using 32-bit guard.
#if 0 /* disabled by -frewrite-includes */
#if defined(__arm__) || defined(__wasm32__) || defined(__ARM64_ARCH_8_32__)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 89 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#  define _LIBCXXABI_GUARD_ABI_ARM
#endif
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCXXABI_COMPILER_CLANG)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 93 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#if 0 /* disabled by -frewrite-includes */
#  if !__has_feature(cxx_exceptions)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 94 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#    define _LIBCXXABI_NO_EXCEPTIONS
#  endif
# 96 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(_LIBCXXABI_COMPILER_GCC) && !defined(__EXCEPTIONS)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 97 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#  define _LIBCXXABI_NO_EXCEPTIONS
#endif
# 99 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3

#if 0 /* disabled by -frewrite-includes */
#if defined(_WIN32)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 101 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#define _LIBCXXABI_DTOR_FUNC __thiscall
#else
# 103 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#define _LIBCXXABI_DTOR_FUNC
#endif
# 105 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3

#endif // ____CXXABI_CONFIG_H
# 107 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/__cxxabi_config.h" 3
#endif /* __cxxabi_config.h expanded by -frewrite-includes */
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 2 3

#define _LIBCPPABI_VERSION 15000
#define _LIBCXXABI_NORETURN  __attribute__((noreturn))
#define _LIBCXXABI_ALWAYS_COLD __attribute__((cold))

#ifdef __cplusplus

namespace std {
#if 0 /* disabled by -frewrite-includes */
#if defined(_WIN32)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 30 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3
class _LIBCXXABI_TYPE_VIS type_info; // forward declaration
#else
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3
class type_info; // forward declaration
#endif
# 34 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3
}


// runtime routines use C calling conventions, but are in __cxxabiv1 namespace
namespace __cxxabiv1 {
extern "C"  {

// 2.4.2 Allocating the Exception Object
extern _LIBCXXABI_FUNC_VIS void *
__cxa_allocate_exception(size_t thrown_size) throw();
extern _LIBCXXABI_FUNC_VIS void
__cxa_free_exception(void *thrown_exception) throw();

// 2.4.3 Throwing the Exception Object
extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void
__cxa_throw(void *thrown_exception, std::type_info *tinfo,
#ifdef __USING_WASM_EXCEPTIONS__
            // In Wasm, a destructor returns its argument
            void *(_LIBCXXABI_DTOR_FUNC *dest)(void *));
#else
# 54 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3
            void (_LIBCXXABI_DTOR_FUNC *dest)(void *));
#endif
# 56 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3

// 2.5.3 Exception Handlers
extern _LIBCXXABI_FUNC_VIS void *
__cxa_get_exception_ptr(void *exceptionObject) throw();
extern _LIBCXXABI_FUNC_VIS void *
__cxa_begin_catch(void *exceptionObject) throw();
extern _LIBCXXABI_FUNC_VIS void __cxa_end_catch();
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCXXABI_ARM_EHABI)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 64 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3
extern _LIBCXXABI_FUNC_VIS bool
__cxa_begin_cleanup(void *exceptionObject) throw();
extern _LIBCXXABI_FUNC_VIS void __cxa_end_cleanup();
#endif
# 68 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3
extern _LIBCXXABI_FUNC_VIS std::type_info *__cxa_current_exception_type();

// 2.5.4 Rethrowing Exceptions
extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_rethrow();

// 2.6 Auxiliary Runtime APIs
extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_cast(void);
extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_typeid(void);
extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void
__cxa_throw_bad_array_new_length(void);

// 3.2.6 Pure Virtual Function API
extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_pure_virtual(void);

// 3.2.7 Deleted Virtual Function API
extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_deleted_virtual(void);

// 3.3.2 One-time Construction API
#if 0 /* disabled by -frewrite-includes */
#if defined(_LIBCXXABI_GUARD_ABI_ARM)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 87 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3
extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD int __cxa_guard_acquire(uint32_t *);
extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD void __cxa_guard_release(uint32_t *);
extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD void __cxa_guard_abort(uint32_t *);
#else
# 91 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3
extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD int __cxa_guard_acquire(uint64_t *);
extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD void __cxa_guard_release(uint64_t *);
extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_ALWAYS_COLD void __cxa_guard_abort(uint64_t *);
#endif
# 95 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3

// 3.3.3 Array Construction and Destruction API
extern _LIBCXXABI_FUNC_VIS void *
__cxa_vec_new(size_t element_count, size_t element_size, size_t padding_size,
              void (*constructor)(void *), void (*destructor)(void *));

extern _LIBCXXABI_FUNC_VIS void *
__cxa_vec_new2(size_t element_count, size_t element_size, size_t padding_size,
               void (*constructor)(void *), void (*destructor)(void *),
               void *(*alloc)(size_t), void (*dealloc)(void *));

extern _LIBCXXABI_FUNC_VIS void *
__cxa_vec_new3(size_t element_count, size_t element_size, size_t padding_size,
               void (*constructor)(void *), void (*destructor)(void *),
               void *(*alloc)(size_t), void (*dealloc)(void *, size_t));

extern _LIBCXXABI_FUNC_VIS void
__cxa_vec_ctor(void *array_address, size_t element_count, size_t element_size,
               void (*constructor)(void *), void (*destructor)(void *));

extern _LIBCXXABI_FUNC_VIS void __cxa_vec_dtor(void *array_address,
                                               size_t element_count,
                                               size_t element_size,
                                               void (*destructor)(void *));

extern _LIBCXXABI_FUNC_VIS void __cxa_vec_cleanup(void *array_address,
                                                  size_t element_count,
                                                  size_t element_size,
                                                  void (*destructor)(void *));

extern _LIBCXXABI_FUNC_VIS void __cxa_vec_delete(void *array_address,
                                                 size_t element_size,
                                                 size_t padding_size,
                                                 void (*destructor)(void *));

extern _LIBCXXABI_FUNC_VIS void
__cxa_vec_delete2(void *array_address, size_t element_size, size_t padding_size,
                  void (*destructor)(void *), void (*dealloc)(void *));

extern _LIBCXXABI_FUNC_VIS void
__cxa_vec_delete3(void *__array_address, size_t element_size,
                  size_t padding_size, void (*destructor)(void *),
                  void (*dealloc)(void *, size_t));

extern _LIBCXXABI_FUNC_VIS void
__cxa_vec_cctor(void *dest_array, void *src_array, size_t element_count,
                size_t element_size, void (*constructor)(void *, void *),
                void (*destructor)(void *));

// 3.3.5.3 Runtime API
// These functions are part of the C++ ABI, but they are not defined in libc++abi:
//    int __cxa_atexit(void (*)(void *), void *, void *);
//    void __cxa_finalize(void *);

// 3.4 Demangler API
extern _LIBCXXABI_FUNC_VIS char *__cxa_demangle(const char *mangled_name,
                                                char *output_buffer,
                                                size_t *length, int *status);

// Apple additions to support C++ 0x exception_ptr class
// These are primitives to wrap a smart pointer around an exception object
extern _LIBCXXABI_FUNC_VIS void *__cxa_current_primary_exception() throw();
extern _LIBCXXABI_FUNC_VIS void
__cxa_rethrow_primary_exception(void *primary_exception);
extern _LIBCXXABI_FUNC_VIS void
__cxa_increment_exception_refcount(void *primary_exception) throw();
extern _LIBCXXABI_FUNC_VIS void
__cxa_decrement_exception_refcount(void *primary_exception) throw();

// Apple extension to support std::uncaught_exception()
extern _LIBCXXABI_FUNC_VIS bool __cxa_uncaught_exception() throw();
extern _LIBCXXABI_FUNC_VIS unsigned int __cxa_uncaught_exceptions() throw();

#if 0 /* disabled by -frewrite-includes */
#if defined(__linux__) || defined(__Fuchsia__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 169 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3
// Linux and Fuchsia TLS support. Not yet an official part of the Itanium ABI.
// https://sourceware.org/glibc/wiki/Destructor%20support%20for%20thread_local%20variables
extern _LIBCXXABI_FUNC_VIS int __cxa_thread_atexit(void (*)(void *), void *,
                                                   void *) throw();
#endif
# 174 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3

} // extern "C"
} // namespace __cxxabiv1

namespace abi = __cxxabiv1;

#endif // __cplusplus
# 181 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3

#endif // __CXXABI_H
# 183 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cxxabi.h" 3
#endif /* cxxabi.h expanded by -frewrite-includes */
# 46 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h" 2
#if 0 /* disabled by -frewrite-includes */
#if 0
#elif defined(__HP_aCC)
#endif
#endif /* disabled by -frewrite-includes */
#elif 0 /* evaluated by -frewrite-includes */
# 47 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
#if 0 /* expanded by -frewrite-includes */
#include <acxx_demangle.h>
#endif /* expanded by -frewrite-includes */
# 47 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
# 48 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
#endif  // GTEST_HASH_CXXABI_H_
# 49 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"

namespace testing {
namespace internal {

// Canonicalizes a given name with respect to the Standard C++ Library.
// This handles removing the inline namespace within `std` that is
// used by various standard libraries (e.g., `std::__1`).  Names outside
// of namespace std are returned unmodified.
inline std::string CanonicalizeForStdLibVersioning(std::string s) {
  static const char prefix[] = "std::__";
  if (s.compare(0, strlen(prefix), prefix) == 0) {
    std::string::size_type end = s.find("::", strlen(prefix));
    if (end != s.npos) {
      // Erase everything between the initial `std` and the second `::`.
      s.erase(strlen("std"), end - strlen("std"));
    }
  }
  return s;
}

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_RTTI
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 70 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
// GetTypeName(const std::type_info&) returns a human-readable name of type T.
inline std::string GetTypeName(const std::type_info& type) {
  const char* const name = type.name();
#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_CXXABI_H_ || defined(__HP_aCC)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 74 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
  int status = 0;
  // gcc's implementation of typeid(T).name() mangles the type name,
  // so we have to demangle it.
#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_CXXABI_H_
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 78 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
  using abi::__cxa_demangle;
#endif  // GTEST_HAS_CXXABI_H_
# 80 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
  char* const readable_name = __cxa_demangle(name, nullptr, nullptr, &status);
  const std::string name_str(status == 0 ? readable_name : name);
  free(readable_name);
  return CanonicalizeForStdLibVersioning(name_str);
#else
# 85 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
  return name;
#endif  // GTEST_HAS_CXXABI_H_ || __HP_aCC
# 87 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
}
#endif  // GTEST_HAS_RTTI
# 89 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"

// GetTypeName<T>() returns a human-readable name of type T if and only if
// RTTI is enabled, otherwise it returns a dummy type name.
// NB: This function is also used in Google Mock, so don't move it inside of
// the typed-test-only section below.
template <typename T>
std::string GetTypeName() {
#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_RTTI
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 97 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
  return GetTypeName(typeid(T));
#else
# 99 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
  return "<type>";
#endif  // GTEST_HAS_RTTI
# 101 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
}

// A unique type indicating an empty node
struct None {};

#define GTEST_TEMPLATE_ \
  template <typename T> \
  class

// The template "selector" struct TemplateSel<Tmpl> is used to
// represent Tmpl, which must be a class template with one type
// parameter, as a type.  TemplateSel<Tmpl>::Bind<T>::type is defined
// as the type Tmpl<T>.  This allows us to actually instantiate the
// template "selected" by TemplateSel<Tmpl>.
//
// This trick is necessary for simulating typedef for class templates,
// which C++ doesn't support directly.
template <GTEST_TEMPLATE_ Tmpl>
struct TemplateSel {
  template <typename T>
  struct Bind {
    typedef Tmpl<T> type;
  };
};

#define GTEST_BIND_(TmplSel, T) TmplSel::template Bind<T>::type

template <GTEST_TEMPLATE_ Head_, GTEST_TEMPLATE_... Tail_>
struct Templates {
  using Head = TemplateSel<Head_>;
  using Tail = Templates<Tail_...>;
};

template <GTEST_TEMPLATE_ Head_>
struct Templates<Head_> {
  using Head = TemplateSel<Head_>;
  using Tail = None;
};

// Tuple-like type lists
template <typename Head_, typename... Tail_>
struct Types {
  using Head = Head_;
  using Tail = Types<Tail_...>;
};

template <typename Head_>
struct Types<Head_> {
  using Head = Head_;
  using Tail = None;
};

// Helper metafunctions to tell apart a single type from types
// generated by ::testing::Types
template <typename... Ts>
struct ProxyTypeList {
  using type = Types<Ts...>;
};

template <typename>
struct is_proxy_type_list : std::false_type {};

template <typename... Ts>
struct is_proxy_type_list<ProxyTypeList<Ts...>> : std::true_type {};

// Generator which conditionally creates type lists.
// It recognizes if a requested type list should be created
// and prevents creating a new type list nested within another one.
template <typename T>
struct GenerateTypeList {
 private:
  using proxy = typename std::conditional<is_proxy_type_list<T>::value, T,
                                          ProxyTypeList<T>>::type;

 public:
  using type = typename proxy::type;
};

}  // namespace internal

template <typename... Ts>
using Types = internal::ProxyTypeList<Ts...>;

}  // namespace testing

#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
# 187 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-type-util.h"
#endif /* gtest-type-util.h expanded by -frewrite-includes */
# 73 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h" 2

// Due to C++ preprocessor weirdness, we need double indirection to
// concatenate two tokens when one of them is __LINE__.  Writing
//
//   foo ## __LINE__
//
// will result in the token foo__LINE__, instead of foo followed by
// the current line number.  For more details, see
// http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6
#define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar)
#define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo##bar

// Stringifies its argument.
// Work around a bug in visual studio which doesn't accept code like this:
//
//   #define GTEST_STRINGIFY_(name) #name
//   #define MACRO(a, b, c) ... GTEST_STRINGIFY_(a) ...
//   MACRO(, x, y)
//
// Complaining about the argument to GTEST_STRINGIFY_ being empty.
// This is allowed by the spec.
#define GTEST_STRINGIFY_HELPER_(name, ...) #name
#define GTEST_STRINGIFY_(...) GTEST_STRINGIFY_HELPER_(__VA_ARGS__, )

namespace proto2 {
class MessageLite;
}

namespace testing {

// Forward declarations.

class AssertionResult;  // Result of an assertion.
class Message;          // Represents a failure message.
class Test;             // Represents a test.
class TestInfo;         // Information about a test.
class TestPartResult;   // Result of a test part.
class UnitTest;         // A collection of test suites.

template <typename T>
::std::string PrintToString(const T& value);

namespace internal {

struct TraceInfo;    // Information about a trace point.
class TestInfoImpl;  // Opaque implementation of TestInfo
class UnitTestImpl;  // Opaque implementation of UnitTest

// The text used in failure messages to indicate the start of the
// stack trace.
GTEST_API_ extern const char kStackTraceMarker[];

// An IgnoredValue object can be implicitly constructed from ANY value.
class IgnoredValue {
  struct Sink {};

 public:
  // This constructor template allows any value to be implicitly
  // converted to IgnoredValue.  The object has no data member and
  // doesn't try to remember anything about the argument.  We
  // deliberately omit the 'explicit' keyword in order to allow the
  // conversion to be implicit.
  // Disable the conversion if T already has a magical conversion operator.
  // Otherwise we get ambiguity.
  template <typename T,
            typename std::enable_if<!std::is_convertible<T, Sink>::value,
                                    int>::type = 0>
  IgnoredValue(const T& /* ignored */) {}  // NOLINT(runtime/explicit)
};

// Appends the user-supplied message to the Google-Test-generated message.
GTEST_API_ std::string AppendUserMessage(const std::string& gtest_msg,
                                         const Message& user_msg);

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_EXCEPTIONS
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 148 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

GTEST_DISABLE_MSC_WARNINGS_PUSH_(
    4275 /* an exported class was derived from a class that was not exported */)

// This exception is thrown by (and only by) a failed Google Test
// assertion when GTEST_FLAG(throw_on_failure) is true (if exceptions
// are enabled).  We derive it from std::runtime_error, which is for
// errors presumably detectable only at run time.  Since
// std::runtime_error inherits from std::exception, many testing
// frameworks know how to extract and print the message inside it.
class GTEST_API_ GoogleTestFailureException : public ::std::runtime_error {
 public:
  explicit GoogleTestFailureException(const TestPartResult& failure);
};

GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4275

#endif  // GTEST_HAS_EXCEPTIONS
# 166 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

namespace edit_distance {
// Returns the optimal edits to go from 'left' to 'right'.
// All edits cost the same, with replace having lower priority than
// add/remove.
// Simple implementation of the Wagner-Fischer algorithm.
// See http://en.wikipedia.org/wiki/Wagner-Fischer_algorithm
enum EditType { kMatch, kAdd, kRemove, kReplace };
GTEST_API_ std::vector<EditType> CalculateOptimalEdits(
    const std::vector<size_t>& left, const std::vector<size_t>& right);

// Same as above, but the input is represented as strings.
GTEST_API_ std::vector<EditType> CalculateOptimalEdits(
    const std::vector<std::string>& left,
    const std::vector<std::string>& right);

// Create a diff of the input strings in Unified diff format.
GTEST_API_ std::string CreateUnifiedDiff(const std::vector<std::string>& left,
                                         const std::vector<std::string>& right,
                                         size_t context = 2);

}  // namespace edit_distance

// Constructs and returns the message for an equality assertion
// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure.
//
// The first four parameters are the expressions used in the assertion
// and their values, as strings.  For example, for ASSERT_EQ(foo, bar)
// where foo is 5 and bar is 6, we have:
//
//   expected_expression: "foo"
//   actual_expression:   "bar"
//   expected_value:      "5"
//   actual_value:        "6"
//
// The ignoring_case parameter is true if and only if the assertion is a
// *_STRCASEEQ*.  When it's true, the string " (ignoring case)" will
// be inserted into the message.
GTEST_API_ AssertionResult EqFailure(const char* expected_expression,
                                     const char* actual_expression,
                                     const std::string& expected_value,
                                     const std::string& actual_value,
                                     bool ignoring_case);

// Constructs a failure message for Boolean assertions such as EXPECT_TRUE.
GTEST_API_ std::string GetBoolAssertionFailureMessage(
    const AssertionResult& assertion_result, const char* expression_text,
    const char* actual_predicate_value, const char* expected_predicate_value);

// This template class represents an IEEE floating-point number
// (either single-precision or double-precision, depending on the
// template parameters).
//
// The purpose of this class is to do more sophisticated number
// comparison.  (Due to round-off error, etc, it's very unlikely that
// two floating-points will be equal exactly.  Hence a naive
// comparison by the == operation often doesn't work.)
//
// Format of IEEE floating-point:
//
//   The most-significant bit being the leftmost, an IEEE
//   floating-point looks like
//
//     sign_bit exponent_bits fraction_bits
//
//   Here, sign_bit is a single bit that designates the sign of the
//   number.
//
//   For float, there are 8 exponent bits and 23 fraction bits.
//
//   For double, there are 11 exponent bits and 52 fraction bits.
//
//   More details can be found at
//   http://en.wikipedia.org/wiki/IEEE_floating-point_standard.
//
// Template parameter:
//
//   RawType: the raw floating-point type (either float or double)
template <typename RawType>
class FloatingPoint {
 public:
  // Defines the unsigned integer type that has the same size as the
  // floating point number.
  typedef typename TypeWithSize<sizeof(RawType)>::UInt Bits;

  // Constants.

  // # of bits in a number.
  static const size_t kBitCount = 8 * sizeof(RawType);

  // # of fraction bits in a number.
  static const size_t kFractionBitCount =
      std::numeric_limits<RawType>::digits - 1;

  // # of exponent bits in a number.
  static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount;

  // The mask for the sign bit.
  static const Bits kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1);

  // The mask for the fraction bits.
  static const Bits kFractionBitMask = ~static_cast<Bits>(0) >>
                                       (kExponentBitCount + 1);

  // The mask for the exponent bits.
  static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask);

  // How many ULP's (Units in the Last Place) we want to tolerate when
  // comparing two numbers.  The larger the value, the more error we
  // allow.  A 0 value means that two numbers must be exactly the same
  // to be considered equal.
  //
  // The maximum error of a single floating-point operation is 0.5
  // units in the last place.  On Intel CPU's, all floating-point
  // calculations are done with 80-bit precision, while double has 64
  // bits.  Therefore, 4 should be enough for ordinary use.
  //
  // See the following article for more details on ULP:
  // http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
  static const uint32_t kMaxUlps = 4;

  // Constructs a FloatingPoint from a raw floating-point number.
  //
  // On an Intel CPU, passing a non-normalized NAN (Not a Number)
  // around may change its bits, although the new value is guaranteed
  // to be also a NAN.  Therefore, don't expect this constructor to
  // preserve the bits in x when x is a NAN.
  explicit FloatingPoint(const RawType& x) { u_.value_ = x; }

  // Static methods

  // Reinterprets a bit pattern as a floating-point number.
  //
  // This function is needed to test the AlmostEquals() method.
  static RawType ReinterpretBits(const Bits bits) {
    FloatingPoint fp(0);
    fp.u_.bits_ = bits;
    return fp.u_.value_;
  }

  // Returns the floating-point number that represent positive infinity.
  static RawType Infinity() { return ReinterpretBits(kExponentBitMask); }

  // Returns the maximum representable finite floating-point number.
  static RawType Max();

  // Non-static methods

  // Returns the bits that represents this number.
  const Bits& bits() const { return u_.bits_; }

  // Returns the exponent bits of this number.
  Bits exponent_bits() const { return kExponentBitMask & u_.bits_; }

  // Returns the fraction bits of this number.
  Bits fraction_bits() const { return kFractionBitMask & u_.bits_; }

  // Returns the sign bit of this number.
  Bits sign_bit() const { return kSignBitMask & u_.bits_; }

  // Returns true if and only if this is NAN (not a number).
  bool is_nan() const {
    // It's a NAN if the exponent bits are all ones and the fraction
    // bits are not entirely zeros.
    return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0);
  }

  // Returns true if and only if this number is at most kMaxUlps ULP's away
  // from rhs.  In particular, this function:
  //
  //   - returns false if either number is (or both are) NAN.
  //   - treats really large numbers as almost equal to infinity.
  //   - thinks +0.0 and -0.0 are 0 DLP's apart.
  bool AlmostEquals(const FloatingPoint& rhs) const {
    // The IEEE standard says that any comparison operation involving
    // a NAN must return false.
    if (is_nan() || rhs.is_nan()) return false;

    return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_) <=
           kMaxUlps;
  }

 private:
  // The data type used to store the actual floating-point number.
  union FloatingPointUnion {
    RawType value_;  // The raw floating-point number.
    Bits bits_;      // The bits that represent the number.
  };

  // Converts an integer from the sign-and-magnitude representation to
  // the biased representation.  More precisely, let N be 2 to the
  // power of (kBitCount - 1), an integer x is represented by the
  // unsigned number x + N.
  //
  // For instance,
  //
  //   -N + 1 (the most negative number representable using
  //          sign-and-magnitude) is represented by 1;
  //   0      is represented by N; and
  //   N - 1  (the biggest number representable using
  //          sign-and-magnitude) is represented by 2N - 1.
  //
  // Read http://en.wikipedia.org/wiki/Signed_number_representations
  // for more details on signed number representations.
  static Bits SignAndMagnitudeToBiased(const Bits& sam) {
    if (kSignBitMask & sam) {
      // sam represents a negative number.
      return ~sam + 1;
    } else {
      // sam represents a positive number.
      return kSignBitMask | sam;
    }
  }

  // Given two numbers in the sign-and-magnitude representation,
  // returns the distance between them as an unsigned number.
  static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits& sam1,
                                                     const Bits& sam2) {
    const Bits biased1 = SignAndMagnitudeToBiased(sam1);
    const Bits biased2 = SignAndMagnitudeToBiased(sam2);
    return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1);
  }

  FloatingPointUnion u_;
};

// We cannot use std::numeric_limits<T>::max() as it clashes with the max()
// macro defined by <windows.h>.
template <>
inline float FloatingPoint<float>::Max() {
  return FLT_MAX;
}
template <>
inline double FloatingPoint<double>::Max() {
  return DBL_MAX;
}

// Typedefs the instances of the FloatingPoint template class that we
// care to use.
typedef FloatingPoint<float> Float;
typedef FloatingPoint<double> Double;

// In order to catch the mistake of putting tests that use different
// test fixture classes in the same test suite, we need to assign
// unique IDs to fixture classes and compare them.  The TypeId type is
// used to hold such IDs.  The user should treat TypeId as an opaque
// type: the only operation allowed on TypeId values is to compare
// them for equality using the == operator.
typedef const void* TypeId;

template <typename T>
class TypeIdHelper {
 public:
  // dummy_ must not have a const type.  Otherwise an overly eager
  // compiler (e.g. MSVC 7.1 & 8.0) may try to merge
  // TypeIdHelper<T>::dummy_ for different Ts as an "optimization".
  static bool dummy_;
};

template <typename T>
bool TypeIdHelper<T>::dummy_ = false;

// GetTypeId<T>() returns the ID of type T.  Different values will be
// returned for different types.  Calling the function twice with the
// same type argument is guaranteed to return the same ID.
template <typename T>
TypeId GetTypeId() {
  // The compiler is required to allocate a different
  // TypeIdHelper<T>::dummy_ variable for each T used to instantiate
  // the template.  Therefore, the address of dummy_ is guaranteed to
  // be unique.
  return &(TypeIdHelper<T>::dummy_);
}

// Returns the type ID of ::testing::Test.  Always call this instead
// of GetTypeId< ::testing::Test>() to get the type ID of
// ::testing::Test, as the latter may give the wrong result due to a
// suspected linker bug when compiling Google Test as a Mac OS X
// framework.
GTEST_API_ TypeId GetTestTypeId();

// Defines the abstract factory interface that creates instances
// of a Test object.
class TestFactoryBase {
 public:
  virtual ~TestFactoryBase() {}

  // Creates a test instance to run. The instance is both created and destroyed
  // within TestInfoImpl::Run()
  virtual Test* CreateTest() = 0;

 protected:
  TestFactoryBase() {}

 private:
  TestFactoryBase(const TestFactoryBase&) = delete;
  TestFactoryBase& operator=(const TestFactoryBase&) = delete;
};

// This class provides implementation of TestFactoryBase interface.
// It is used in TEST and TEST_F macros.
template <class TestClass>
class TestFactoryImpl : public TestFactoryBase {
 public:
  Test* CreateTest() override { return new TestClass; }
};

#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_WINDOWS
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 474 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

// Predicate-formatters for implementing the HRESULT checking macros
// {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}
// We pass a long instead of HRESULT to avoid causing an
// include dependency for the HRESULT type.
GTEST_API_ AssertionResult IsHRESULTSuccess(const char* expr,
                                            long hr);  // NOLINT
GTEST_API_ AssertionResult IsHRESULTFailure(const char* expr,
                                            long hr);  // NOLINT

#endif  // GTEST_OS_WINDOWS
# 485 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

// Types of SetUpTestSuite() and TearDownTestSuite() functions.
using SetUpTestSuiteFunc = void (*)();
using TearDownTestSuiteFunc = void (*)();

struct CodeLocation {
  CodeLocation(const std::string& a_file, int a_line)
      : file(a_file), line(a_line) {}

  std::string file;
  int line;
};

//  Helper to identify which setup function for TestCase / TestSuite to call.
//  Only one function is allowed, either TestCase or TestSute but not both.

// Utility functions to help SuiteApiResolver
using SetUpTearDownSuiteFuncType = void (*)();

inline SetUpTearDownSuiteFuncType GetNotDefaultOrNull(
    SetUpTearDownSuiteFuncType a, SetUpTearDownSuiteFuncType def) {
  return a == def ? nullptr : a;
}

template <typename T>
//  Note that SuiteApiResolver inherits from T because
//  SetUpTestSuite()/TearDownTestSuite() could be protected. This way
//  SuiteApiResolver can access them.
struct SuiteApiResolver : T {
  // testing::Test is only forward declared at this point. So we make it a
  // dependent class for the compiler to be OK with it.
  using Test =
      typename std::conditional<sizeof(T) != 0, ::testing::Test, void>::type;

  static SetUpTearDownSuiteFuncType GetSetUpCaseOrSuite(const char* filename,
                                                        int line_num) {
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
    SetUpTearDownSuiteFuncType test_case_fp =
        GetNotDefaultOrNull(&T::SetUpTestCase, &Test::SetUpTestCase);
    SetUpTearDownSuiteFuncType test_suite_fp =
        GetNotDefaultOrNull(&T::SetUpTestSuite, &Test::SetUpTestSuite);

    GTEST_CHECK_(!test_case_fp || !test_suite_fp)
        << "Test can not provide both SetUpTestSuite and SetUpTestCase, please "
           "make sure there is only one present at "
        << filename << ":" << line_num;

    return test_case_fp != nullptr ? test_case_fp : test_suite_fp;
#else
# 534 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
    (void)(filename);
    (void)(line_num);
    return &T::SetUpTestSuite;
#endif
# 538 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
  }

  static SetUpTearDownSuiteFuncType GetTearDownCaseOrSuite(const char* filename,
                                                           int line_num) {
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
    SetUpTearDownSuiteFuncType test_case_fp =
        GetNotDefaultOrNull(&T::TearDownTestCase, &Test::TearDownTestCase);
    SetUpTearDownSuiteFuncType test_suite_fp =
        GetNotDefaultOrNull(&T::TearDownTestSuite, &Test::TearDownTestSuite);

    GTEST_CHECK_(!test_case_fp || !test_suite_fp)
        << "Test can not provide both TearDownTestSuite and TearDownTestCase,"
           " please make sure there is only one present at"
        << filename << ":" << line_num;

    return test_case_fp != nullptr ? test_case_fp : test_suite_fp;
#else
# 555 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
    (void)(filename);
    (void)(line_num);
    return &T::TearDownTestSuite;
#endif
# 559 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
  }
};

// Creates a new TestInfo object and registers it with Google Test;
// returns the created object.
//
// Arguments:
//
//   test_suite_name:  name of the test suite
//   name:             name of the test
//   type_param:       the name of the test's type parameter, or NULL if
//                     this is not a typed or a type-parameterized test.
//   value_param:      text representation of the test's value parameter,
//                     or NULL if this is not a type-parameterized test.
//   code_location:    code location where the test is defined
//   fixture_class_id: ID of the test fixture class
//   set_up_tc:        pointer to the function that sets up the test suite
//   tear_down_tc:     pointer to the function that tears down the test suite
//   factory:          pointer to the factory that creates a test object.
//                     The newly created TestInfo instance will assume
//                     ownership of the factory object.
GTEST_API_ TestInfo* MakeAndRegisterTestInfo(
    const char* test_suite_name, const char* name, const char* type_param,
    const char* value_param, CodeLocation code_location,
    TypeId fixture_class_id, SetUpTestSuiteFunc set_up_tc,
    TearDownTestSuiteFunc tear_down_tc, TestFactoryBase* factory);

// If *pstr starts with the given prefix, modifies *pstr to be right
// past the prefix and returns true; otherwise leaves *pstr unchanged
// and returns false.  None of pstr, *pstr, and prefix can be NULL.
GTEST_API_ bool SkipPrefix(const char* prefix, const char** pstr);

GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
/* class A needs to have dll-interface to be used by clients of class B */)

// State of the definition of a type-parameterized test suite.
class GTEST_API_ TypedTestSuitePState {
 public:
  TypedTestSuitePState() : registered_(false) {}

  // Adds the given test name to defined_test_names_ and return true
  // if the test suite hasn't been registered; otherwise aborts the
  // program.
  bool AddTestName(const char* file, int line, const char* case_name,
                   const char* test_name) {
    if (registered_) {
      fprintf(stderr,
              "%s Test %s must be defined before "
              "REGISTER_TYPED_TEST_SUITE_P(%s, ...).\n",
              FormatFileLocation(file, line).c_str(), test_name, case_name);
      fflush(stderr);
      posix::Abort();
    }
    registered_tests_.insert(
        ::std::make_pair(test_name, CodeLocation(file, line)));
    return true;
  }

  bool TestExists(const std::string& test_name) const {
    return registered_tests_.count(test_name) > 0;
  }

  const CodeLocation& GetCodeLocation(const std::string& test_name) const {
    RegisteredTestsMap::const_iterator it = registered_tests_.find(test_name);
    GTEST_CHECK_(it != registered_tests_.end());
    return it->second;
  }

  // Verifies that registered_tests match the test names in
  // defined_test_names_; returns registered_tests if successful, or
  // aborts the program otherwise.
  const char* VerifyRegisteredTestNames(const char* test_suite_name,
                                        const char* file, int line,
                                        const char* registered_tests);

 private:
  typedef ::std::map<std::string, CodeLocation, std::less<>> RegisteredTestsMap;

  bool registered_;
  RegisteredTestsMap registered_tests_;
};

//  Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
using TypedTestCasePState = TypedTestSuitePState;
#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 645 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251

// Skips to the first non-space char after the first comma in 'str';
// returns NULL if no comma is found in 'str'.
inline const char* SkipComma(const char* str) {
  const char* comma = strchr(str, ',');
  if (comma == nullptr) {
    return nullptr;
  }
  while (IsSpace(*(++comma))) {
  }
  return comma;
}

// Returns the prefix of 'str' before the first comma in it; returns
// the entire string if it contains no comma.
inline std::string GetPrefixUntilComma(const char* str) {
  const char* comma = strchr(str, ',');
  return comma == nullptr ? str : std::string(str, comma);
}

// Splits a given string on a given delimiter, populating a given
// vector with the fields.
void SplitString(const ::std::string& str, char delimiter,
                 ::std::vector<::std::string>* dest);

// The default argument to the template below for the case when the user does
// not provide a name generator.
struct DefaultNameGenerator {
  template <typename T>
  static std::string GetName(int i) {
    return StreamableToString(i);
  }
};

template <typename Provided = DefaultNameGenerator>
struct NameGeneratorSelector {
  typedef Provided type;
};

template <typename NameGenerator>
void GenerateNamesRecursively(internal::None, std::vector<std::string>*, int) {}

template <typename NameGenerator, typename Types>
void GenerateNamesRecursively(Types, std::vector<std::string>* result, int i) {
  result->push_back(NameGenerator::template GetName<typename Types::Head>(i));
  GenerateNamesRecursively<NameGenerator>(typename Types::Tail(), result,
                                          i + 1);
}

template <typename NameGenerator, typename Types>
std::vector<std::string> GenerateNames() {
  std::vector<std::string> result;
  GenerateNamesRecursively<NameGenerator>(Types(), &result, 0);
  return result;
}

// TypeParameterizedTest<Fixture, TestSel, Types>::Register()
// registers a list of type-parameterized tests with Google Test.  The
// return value is insignificant - we just need to return something
// such that we can call this function in a namespace scope.
//
// Implementation note: The GTEST_TEMPLATE_ macro declares a template
// template parameter.  It's defined in gtest-type-util.h.
template <GTEST_TEMPLATE_ Fixture, class TestSel, typename Types>
class TypeParameterizedTest {
 public:
  // 'index' is the index of the test in the type list 'Types'
  // specified in INSTANTIATE_TYPED_TEST_SUITE_P(Prefix, TestSuite,
  // Types).  Valid values for 'index' are [0, N - 1] where N is the
  // length of Types.
  static bool Register(const char* prefix, const CodeLocation& code_location,
                       const char* case_name, const char* test_names, int index,
                       const std::vector<std::string>& type_names =
                           GenerateNames<DefaultNameGenerator, Types>()) {
    typedef typename Types::Head Type;
    typedef Fixture<Type> FixtureClass;
    typedef typename GTEST_BIND_(TestSel, Type) TestClass;

    // First, registers the first type-parameterized test in the type
    // list.
    MakeAndRegisterTestInfo(
        (std::string(prefix) + (prefix[0] == '\0' ? "" : "/") + case_name +
         "/" + type_names[static_cast<size_t>(index)])
            .c_str(),
        StripTrailingSpaces(GetPrefixUntilComma(test_names)).c_str(),
        GetTypeName<Type>().c_str(),
        nullptr,  // No value parameter.
        code_location, GetTypeId<FixtureClass>(),
        SuiteApiResolver<TestClass>::GetSetUpCaseOrSuite(
            code_location.file.c_str(), code_location.line),
        SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(
            code_location.file.c_str(), code_location.line),
        new TestFactoryImpl<TestClass>);

    // Next, recurses (at compile time) with the tail of the type list.
    return TypeParameterizedTest<Fixture, TestSel,
                                 typename Types::Tail>::Register(prefix,
                                                                 code_location,
                                                                 case_name,
                                                                 test_names,
                                                                 index + 1,
                                                                 type_names);
  }
};

// The base case for the compile time recursion.
template <GTEST_TEMPLATE_ Fixture, class TestSel>
class TypeParameterizedTest<Fixture, TestSel, internal::None> {
 public:
  static bool Register(const char* /*prefix*/, const CodeLocation&,
                       const char* /*case_name*/, const char* /*test_names*/,
                       int /*index*/,
                       const std::vector<std::string>& =
                           std::vector<std::string>() /*type_names*/) {
    return true;
  }
};

GTEST_API_ void RegisterTypeParameterizedTestSuite(const char* test_suite_name,
                                                   CodeLocation code_location);
GTEST_API_ void RegisterTypeParameterizedTestSuiteInstantiation(
    const char* case_name);

// TypeParameterizedTestSuite<Fixture, Tests, Types>::Register()
// registers *all combinations* of 'Tests' and 'Types' with Google
// Test.  The return value is insignificant - we just need to return
// something such that we can call this function in a namespace scope.
template <GTEST_TEMPLATE_ Fixture, typename Tests, typename Types>
class TypeParameterizedTestSuite {
 public:
  static bool Register(const char* prefix, CodeLocation code_location,
                       const TypedTestSuitePState* state, const char* case_name,
                       const char* test_names,
                       const std::vector<std::string>& type_names =
                           GenerateNames<DefaultNameGenerator, Types>()) {
    RegisterTypeParameterizedTestSuiteInstantiation(case_name);
    std::string test_name =
        StripTrailingSpaces(GetPrefixUntilComma(test_names));
    if (!state->TestExists(test_name)) {
      fprintf(stderr, "Failed to get code location for test %s.%s at %s.",
              case_name, test_name.c_str(),
              FormatFileLocation(code_location.file.c_str(), code_location.line)
                  .c_str());
      fflush(stderr);
      posix::Abort();
    }
    const CodeLocation& test_location = state->GetCodeLocation(test_name);

    typedef typename Tests::Head Head;

    // First, register the first test in 'Test' for each type in 'Types'.
    TypeParameterizedTest<Fixture, Head, Types>::Register(
        prefix, test_location, case_name, test_names, 0, type_names);

    // Next, recurses (at compile time) with the tail of the test list.
    return TypeParameterizedTestSuite<Fixture, typename Tests::Tail,
                                      Types>::Register(prefix, code_location,
                                                       state, case_name,
                                                       SkipComma(test_names),
                                                       type_names);
  }
};

// The base case for the compile time recursion.
template <GTEST_TEMPLATE_ Fixture, typename Types>
class TypeParameterizedTestSuite<Fixture, internal::None, Types> {
 public:
  static bool Register(const char* /*prefix*/, const CodeLocation&,
                       const TypedTestSuitePState* /*state*/,
                       const char* /*case_name*/, const char* /*test_names*/,
                       const std::vector<std::string>& =
                           std::vector<std::string>() /*type_names*/) {
    return true;
  }
};

// Returns the current OS stack trace as an std::string.
//
// The maximum number of stack frames to be included is specified by
// the gtest_stack_trace_depth flag.  The skip_count parameter
// specifies the number of top frames to be skipped, which doesn't
// count against the number of frames to be included.
//
// For example, if Foo() calls Bar(), which in turn calls
// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
GTEST_API_ std::string GetCurrentOsStackTraceExceptTop(int skip_count);

// Helpers for suppressing warnings on unreachable code or constant
// condition.

// Always returns true.
GTEST_API_ bool AlwaysTrue();

// Always returns false.
inline bool AlwaysFalse() { return !AlwaysTrue(); }

// Helper for suppressing false warning from Clang on a const char*
// variable declared in a conditional expression always being NULL in
// the else branch.
struct GTEST_API_ ConstCharPtr {
  ConstCharPtr(const char* str) : value(str) {}
  operator bool() const { return true; }
  const char* value;
};

// Helper for declaring std::string within 'if' statement
// in pre C++17 build environment.
struct TrueWithString {
  TrueWithString() = default;
  explicit TrueWithString(const char* str) : value(str) {}
  explicit TrueWithString(const std::string& str) : value(str) {}
  explicit operator bool() const { return true; }
  std::string value;
};

// A simple Linear Congruential Generator for generating random
// numbers with a uniform distribution.  Unlike rand() and srand(), it
// doesn't use global state (and therefore can't interfere with user
// code).  Unlike rand_r(), it's portable.  An LCG isn't very random,
// but it's good enough for our purposes.
class GTEST_API_ Random {
 public:
  static const uint32_t kMaxRange = 1u << 31;

  explicit Random(uint32_t seed) : state_(seed) {}

  void Reseed(uint32_t seed) { state_ = seed; }

  // Generates a random number from [0, range).  Crashes if 'range' is
  // 0 or greater than kMaxRange.
  uint32_t Generate(uint32_t range);

 private:
  uint32_t state_;
  Random(const Random&) = delete;
  Random& operator=(const Random&) = delete;
};

// Turns const U&, U&, const U, and U all into U.
#define GTEST_REMOVE_REFERENCE_AND_CONST_(T) \
  typename std::remove_const<typename std::remove_reference<T>::type>::type

// HasDebugStringAndShortDebugString<T>::value is a compile-time bool constant
// that's true if and only if T has methods DebugString() and ShortDebugString()
// that return std::string.
template <typename T>
class HasDebugStringAndShortDebugString {
 private:
  template <typename C>
  static auto CheckDebugString(C*) -> typename std::is_same<
      std::string, decltype(std::declval<const C>().DebugString())>::type;
  template <typename>
  static std::false_type CheckDebugString(...);

  template <typename C>
  static auto CheckShortDebugString(C*) -> typename std::is_same<
      std::string, decltype(std::declval<const C>().ShortDebugString())>::type;
  template <typename>
  static std::false_type CheckShortDebugString(...);

  using HasDebugStringType = decltype(CheckDebugString<T>(nullptr));
  using HasShortDebugStringType = decltype(CheckShortDebugString<T>(nullptr));

 public:
  static constexpr bool value =
      HasDebugStringType::value && HasShortDebugStringType::value;
};

template <typename T>
constexpr bool HasDebugStringAndShortDebugString<T>::value;

// When the compiler sees expression IsContainerTest<C>(0), if C is an
// STL-style container class, the first overload of IsContainerTest
// will be viable (since both C::iterator* and C::const_iterator* are
// valid types and NULL can be implicitly converted to them).  It will
// be picked over the second overload as 'int' is a perfect match for
// the type of argument 0.  If C::iterator or C::const_iterator is not
// a valid type, the first overload is not viable, and the second
// overload will be picked.  Therefore, we can determine whether C is
// a container class by checking the type of IsContainerTest<C>(0).
// The value of the expression is insignificant.
//
// In C++11 mode we check the existence of a const_iterator and that an
// iterator is properly implemented for the container.
//
// For pre-C++11 that we look for both C::iterator and C::const_iterator.
// The reason is that C++ injects the name of a class as a member of the
// class itself (e.g. you can refer to class iterator as either
// 'iterator' or 'iterator::iterator').  If we look for C::iterator
// only, for example, we would mistakenly think that a class named
// iterator is an STL container.
//
// Also note that the simpler approach of overloading
// IsContainerTest(typename C::const_iterator*) and
// IsContainerTest(...) doesn't work with Visual Age C++ and Sun C++.
typedef int IsContainer;
template <class C,
          class Iterator = decltype(::std::declval<const C&>().begin()),
          class = decltype(::std::declval<const C&>().end()),
          class = decltype(++::std::declval<Iterator&>()),
          class = decltype(*::std::declval<Iterator>()),
          class = typename C::const_iterator>
IsContainer IsContainerTest(int /* dummy */) {
  return 0;
}

typedef char IsNotContainer;
template <class C>
IsNotContainer IsContainerTest(long /* dummy */) {
  return '\0';
}

// Trait to detect whether a type T is a hash table.
// The heuristic used is that the type contains an inner type `hasher` and does
// not contain an inner type `reverse_iterator`.
// If the container is iterable in reverse, then order might actually matter.
template <typename T>
struct IsHashTable {
 private:
  template <typename U>
  static char test(typename U::hasher*, typename U::reverse_iterator*);
  template <typename U>
  static int test(typename U::hasher*, ...);
  template <typename U>
  static char test(...);

 public:
  static const bool value = sizeof(test<T>(nullptr, nullptr)) == sizeof(int);
};

template <typename T>
const bool IsHashTable<T>::value;

template <typename C,
          bool = sizeof(IsContainerTest<C>(0)) == sizeof(IsContainer)>
struct IsRecursiveContainerImpl;

template <typename C>
struct IsRecursiveContainerImpl<C, false> : public std::false_type {};

// Since the IsRecursiveContainerImpl depends on the IsContainerTest we need to
// obey the same inconsistencies as the IsContainerTest, namely check if
// something is a container is relying on only const_iterator in C++11 and
// is relying on both const_iterator and iterator otherwise
template <typename C>
struct IsRecursiveContainerImpl<C, true> {
  using value_type = decltype(*std::declval<typename C::const_iterator>());
  using type =
      std::is_same<typename std::remove_const<
                       typename std::remove_reference<value_type>::type>::type,
                   C>;
};

// IsRecursiveContainer<Type> is a unary compile-time predicate that
// evaluates whether C is a recursive container type. A recursive container
// type is a container type whose value_type is equal to the container type
// itself. An example for a recursive container type is
// boost::filesystem::path, whose iterator has a value_type that is equal to
// boost::filesystem::path.
template <typename C>
struct IsRecursiveContainer : public IsRecursiveContainerImpl<C>::type {};

// Utilities for native arrays.

// ArrayEq() compares two k-dimensional native arrays using the
// elements' operator==, where k can be any integer >= 0.  When k is
// 0, ArrayEq() degenerates into comparing a single pair of values.

template <typename T, typename U>
bool ArrayEq(const T* lhs, size_t size, const U* rhs);

// This generic version is used when k is 0.
template <typename T, typename U>
inline bool ArrayEq(const T& lhs, const U& rhs) {
  return lhs == rhs;
}

// This overload is used when k >= 1.
template <typename T, typename U, size_t N>
inline bool ArrayEq(const T (&lhs)[N], const U (&rhs)[N]) {
  return internal::ArrayEq(lhs, N, rhs);
}

// This helper reduces code bloat.  If we instead put its logic inside
// the previous ArrayEq() function, arrays with different sizes would
// lead to different copies of the template code.
template <typename T, typename U>
bool ArrayEq(const T* lhs, size_t size, const U* rhs) {
  for (size_t i = 0; i != size; i++) {
    if (!internal::ArrayEq(lhs[i], rhs[i])) return false;
  }
  return true;
}

// Finds the first element in the iterator range [begin, end) that
// equals elem.  Element may be a native array type itself.
template <typename Iter, typename Element>
Iter ArrayAwareFind(Iter begin, Iter end, const Element& elem) {
  for (Iter it = begin; it != end; ++it) {
    if (internal::ArrayEq(*it, elem)) return it;
  }
  return end;
}

// CopyArray() copies a k-dimensional native array using the elements'
// operator=, where k can be any integer >= 0.  When k is 0,
// CopyArray() degenerates into copying a single value.

template <typename T, typename U>
void CopyArray(const T* from, size_t size, U* to);

// This generic version is used when k is 0.
template <typename T, typename U>
inline void CopyArray(const T& from, U* to) {
  *to = from;
}

// This overload is used when k >= 1.
template <typename T, typename U, size_t N>
inline void CopyArray(const T (&from)[N], U (*to)[N]) {
  internal::CopyArray(from, N, *to);
}

// This helper reduces code bloat.  If we instead put its logic inside
// the previous CopyArray() function, arrays with different sizes
// would lead to different copies of the template code.
template <typename T, typename U>
void CopyArray(const T* from, size_t size, U* to) {
  for (size_t i = 0; i != size; i++) {
    internal::CopyArray(from[i], to + i);
  }
}

// The relation between an NativeArray object (see below) and the
// native array it represents.
// We use 2 different structs to allow non-copyable types to be used, as long
// as RelationToSourceReference() is passed.
struct RelationToSourceReference {};
struct RelationToSourceCopy {};

// Adapts a native array to a read-only STL-style container.  Instead
// of the complete STL container concept, this adaptor only implements
// members useful for Google Mock's container matchers.  New members
// should be added as needed.  To simplify the implementation, we only
// support Element being a raw type (i.e. having no top-level const or
// reference modifier).  It's the client's responsibility to satisfy
// this requirement.  Element can be an array type itself (hence
// multi-dimensional arrays are supported).
template <typename Element>
class NativeArray {
 public:
  // STL-style container typedefs.
  typedef Element value_type;
  typedef Element* iterator;
  typedef const Element* const_iterator;

  // Constructs from a native array. References the source.
  NativeArray(const Element* array, size_t count, RelationToSourceReference) {
    InitRef(array, count);
  }

  // Constructs from a native array. Copies the source.
  NativeArray(const Element* array, size_t count, RelationToSourceCopy) {
    InitCopy(array, count);
  }

  // Copy constructor.
  NativeArray(const NativeArray& rhs) {
    (this->*rhs.clone_)(rhs.array_, rhs.size_);
  }

  ~NativeArray() {
    if (clone_ != &NativeArray::InitRef) delete[] array_;
  }

  // STL-style container methods.
  size_t size() const { return size_; }
  const_iterator begin() const { return array_; }
  const_iterator end() const { return array_ + size_; }
  bool operator==(const NativeArray& rhs) const {
    return size() == rhs.size() && ArrayEq(begin(), size(), rhs.begin());
  }

 private:
  static_assert(!std::is_const<Element>::value, "Type must not be const");
  static_assert(!std::is_reference<Element>::value,
                "Type must not be a reference");

  // Initializes this object with a copy of the input.
  void InitCopy(const Element* array, size_t a_size) {
    Element* const copy = new Element[a_size];
    CopyArray(array, a_size, copy);
    array_ = copy;
    size_ = a_size;
    clone_ = &NativeArray::InitCopy;
  }

  // Initializes this object with a reference of the input.
  void InitRef(const Element* array, size_t a_size) {
    array_ = array;
    size_ = a_size;
    clone_ = &NativeArray::InitRef;
  }

  const Element* array_;
  size_t size_;
  void (NativeArray::*clone_)(const Element*, size_t);
};

// Backport of std::index_sequence.
template <size_t... Is>
struct IndexSequence {
  using type = IndexSequence;
};

// Double the IndexSequence, and one if plus_one is true.
template <bool plus_one, typename T, size_t sizeofT>
struct DoubleSequence;
template <size_t... I, size_t sizeofT>
struct DoubleSequence<true, IndexSequence<I...>, sizeofT> {
  using type = IndexSequence<I..., (sizeofT + I)..., 2 * sizeofT>;
};
template <size_t... I, size_t sizeofT>
struct DoubleSequence<false, IndexSequence<I...>, sizeofT> {
  using type = IndexSequence<I..., (sizeofT + I)...>;
};

// Backport of std::make_index_sequence.
// It uses O(ln(N)) instantiation depth.
template <size_t N>
struct MakeIndexSequenceImpl
    : DoubleSequence<N % 2 == 1, typename MakeIndexSequenceImpl<N / 2>::type,
                     N / 2>::type {};

template <>
struct MakeIndexSequenceImpl<0> : IndexSequence<> {};

template <size_t N>
using MakeIndexSequence = typename MakeIndexSequenceImpl<N>::type;

template <typename... T>
using IndexSequenceFor = typename MakeIndexSequence<sizeof...(T)>::type;

template <size_t>
struct Ignore {
  Ignore(...);  // NOLINT
};

template <typename>
struct ElemFromListImpl;
template <size_t... I>
struct ElemFromListImpl<IndexSequence<I...>> {
  // We make Ignore a template to solve a problem with MSVC.
  // A non-template Ignore would work fine with `decltype(Ignore(I))...`, but
  // MSVC doesn't understand how to deal with that pack expansion.
  // Use `0 * I` to have a single instantiation of Ignore.
  template <typename R>
  static R Apply(Ignore<0 * I>..., R (*)(), ...);
};

template <size_t N, typename... T>
struct ElemFromList {
  using type =
      decltype(ElemFromListImpl<typename MakeIndexSequence<N>::type>::Apply(
          static_cast<T (*)()>(nullptr)...));
};

struct FlatTupleConstructTag {};

template <typename... T>
class FlatTuple;

template <typename Derived, size_t I>
struct FlatTupleElemBase;

template <typename... T, size_t I>
struct FlatTupleElemBase<FlatTuple<T...>, I> {
  using value_type = typename ElemFromList<I, T...>::type;
  FlatTupleElemBase() = default;
  template <typename Arg>
  explicit FlatTupleElemBase(FlatTupleConstructTag, Arg&& t)
      : value(std::forward<Arg>(t)) {}
  value_type value;
};

template <typename Derived, typename Idx>
struct FlatTupleBase;

template <size_t... Idx, typename... T>
struct FlatTupleBase<FlatTuple<T...>, IndexSequence<Idx...>>
    : FlatTupleElemBase<FlatTuple<T...>, Idx>... {
  using Indices = IndexSequence<Idx...>;
  FlatTupleBase() = default;
  template <typename... Args>
  explicit FlatTupleBase(FlatTupleConstructTag, Args&&... args)
      : FlatTupleElemBase<FlatTuple<T...>, Idx>(FlatTupleConstructTag{},
                                                std::forward<Args>(args))... {}

  template <size_t I>
  const typename ElemFromList<I, T...>::type& Get() const {
    return FlatTupleElemBase<FlatTuple<T...>, I>::value;
  }

  template <size_t I>
  typename ElemFromList<I, T...>::type& Get() {
    return FlatTupleElemBase<FlatTuple<T...>, I>::value;
  }

  template <typename F>
  auto Apply(F&& f) -> decltype(std::forward<F>(f)(this->Get<Idx>()...)) {
    return std::forward<F>(f)(Get<Idx>()...);
  }

  template <typename F>
  auto Apply(F&& f) const -> decltype(std::forward<F>(f)(this->Get<Idx>()...)) {
    return std::forward<F>(f)(Get<Idx>()...);
  }
};

// Analog to std::tuple but with different tradeoffs.
// This class minimizes the template instantiation depth, thus allowing more
// elements than std::tuple would. std::tuple has been seen to require an
// instantiation depth of more than 10x the number of elements in some
// implementations.
// FlatTuple and ElemFromList are not recursive and have a fixed depth
// regardless of T...
// MakeIndexSequence, on the other hand, it is recursive but with an
// instantiation depth of O(ln(N)).
template <typename... T>
class FlatTuple
    : private FlatTupleBase<FlatTuple<T...>,
                            typename MakeIndexSequence<sizeof...(T)>::type> {
  using Indices = typename FlatTupleBase<
      FlatTuple<T...>, typename MakeIndexSequence<sizeof...(T)>::type>::Indices;

 public:
  FlatTuple() = default;
  template <typename... Args>
  explicit FlatTuple(FlatTupleConstructTag tag, Args&&... args)
      : FlatTuple::FlatTupleBase(tag, std::forward<Args>(args)...) {}

  using FlatTuple::FlatTupleBase::Apply;
  using FlatTuple::FlatTupleBase::Get;
};

// Utility functions to be called with static_assert to induce deprecation
// warnings.
GTEST_INTERNAL_DEPRECATED(
    "INSTANTIATE_TEST_CASE_P is deprecated, please use "
    "INSTANTIATE_TEST_SUITE_P")
constexpr bool InstantiateTestCase_P_IsDeprecated() { return true; }

GTEST_INTERNAL_DEPRECATED(
    "TYPED_TEST_CASE_P is deprecated, please use "
    "TYPED_TEST_SUITE_P")
constexpr bool TypedTestCase_P_IsDeprecated() { return true; }

GTEST_INTERNAL_DEPRECATED(
    "TYPED_TEST_CASE is deprecated, please use "
    "TYPED_TEST_SUITE")
constexpr bool TypedTestCaseIsDeprecated() { return true; }

GTEST_INTERNAL_DEPRECATED(
    "REGISTER_TYPED_TEST_CASE_P is deprecated, please use "
    "REGISTER_TYPED_TEST_SUITE_P")
constexpr bool RegisterTypedTestCase_P_IsDeprecated() { return true; }

GTEST_INTERNAL_DEPRECATED(
    "INSTANTIATE_TYPED_TEST_CASE_P is deprecated, please use "
    "INSTANTIATE_TYPED_TEST_SUITE_P")
constexpr bool InstantiateTypedTestCase_P_IsDeprecated() { return true; }

}  // namespace internal
}  // namespace testing

namespace std {
// Some standard library implementations use `struct tuple_size` and some use
// `class tuple_size`. Clang warns about the mismatch.
// https://reviews.llvm.org/D55466
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmismatched-tags"
#endif
# 1331 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
template <typename... Ts>
struct tuple_size<testing::internal::FlatTuple<Ts...>>
    : std::integral_constant<size_t, sizeof...(Ts)> {};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
# 1337 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
}  // namespace std

#define GTEST_MESSAGE_AT_(file, line, message, result_type)             \
  ::testing::internal::AssertHelper(result_type, file, line, message) = \
      ::testing::Message()

#define GTEST_MESSAGE_(message, result_type) \
  GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)

#define GTEST_FATAL_FAILURE_(message) \
  return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)

#define GTEST_NONFATAL_FAILURE_(message) \
  GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)

#define GTEST_SUCCESS_(message) \
  GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess)

#define GTEST_SKIP_(message) \
  return GTEST_MESSAGE_(message, ::testing::TestPartResult::kSkip)

// Suppress MSVC warning 4072 (unreachable code) for the code following
// statement if it returns or throws (or doesn't return or throw in some
// situations).
// NOTE: The "else" is important to keep this expansion to prevent a top-level
// "else" from attaching to our "if".
#define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \
  if (::testing::internal::AlwaysTrue()) {                        \
    statement;                                                    \
  } else                     /* NOLINT */                         \
    static_assert(true, "")  // User must have a semicolon after expansion.

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_EXCEPTIONS
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1370 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

namespace testing {
namespace internal {

class NeverThrown {
 public:
  const char* what() const noexcept {
    return "this exception should never be thrown";
  }
};

}  // namespace internal
}  // namespace testing

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_RTTI
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1385 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

#define GTEST_EXCEPTION_TYPE_(e) ::testing::internal::GetTypeName(typeid(e))

#else  // GTEST_HAS_RTTI
# 1389 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

#define GTEST_EXCEPTION_TYPE_(e) \
  std::string { "an std::exception-derived error" }

#endif  // GTEST_HAS_RTTI
# 1394 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

#define GTEST_TEST_THROW_CATCH_STD_EXCEPTION_(statement, expected_exception)   \
  catch (typename std::conditional<                                            \
         std::is_same<typename std::remove_cv<typename std::remove_reference<  \
                          expected_exception>::type>::type,                    \
                      std::exception>::value,                                  \
         const ::testing::internal::NeverThrown&, const std::exception&>::type \
             e) {                                                              \
    gtest_msg.value = "Expected: " #statement                                  \
                      " throws an exception of type " #expected_exception      \
                      ".\n  Actual: it throws ";                               \
    gtest_msg.value += GTEST_EXCEPTION_TYPE_(e);                               \
    gtest_msg.value += " with description \"";                                 \
    gtest_msg.value += e.what();                                               \
    gtest_msg.value += "\".";                                                  \
    goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__);                \
  }

#else  // GTEST_HAS_EXCEPTIONS
# 1413 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

#define GTEST_TEST_THROW_CATCH_STD_EXCEPTION_(statement, expected_exception)

#endif  // GTEST_HAS_EXCEPTIONS
# 1417 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

#define GTEST_TEST_THROW_(statement, expected_exception, fail)              \
  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                             \
  if (::testing::internal::TrueWithString gtest_msg{}) {                    \
    bool gtest_caught_expected = false;                                     \
    try {                                                                   \
      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement);            \
    } catch (expected_exception const&) {                                   \
      gtest_caught_expected = true;                                         \
    }                                                                       \
    GTEST_TEST_THROW_CATCH_STD_EXCEPTION_(statement, expected_exception)    \
    catch (...) {                                                           \
      gtest_msg.value = "Expected: " #statement                             \
                        " throws an exception of type " #expected_exception \
                        ".\n  Actual: it throws a different type.";         \
      goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__);           \
    }                                                                       \
    if (!gtest_caught_expected) {                                           \
      gtest_msg.value = "Expected: " #statement                             \
                        " throws an exception of type " #expected_exception \
                        ".\n  Actual: it throws nothing.";                  \
      goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__);           \
    }                                                                       \
  } else /*NOLINT*/                                                         \
    GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__)                   \
        : fail(gtest_msg.value.c_str())

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_EXCEPTIONS
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1445 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

#define GTEST_TEST_NO_THROW_CATCH_STD_EXCEPTION_()                \
  catch (std::exception const& e) {                               \
    gtest_msg.value = "it throws ";                               \
    gtest_msg.value += GTEST_EXCEPTION_TYPE_(e);                  \
    gtest_msg.value += " with description \"";                    \
    gtest_msg.value += e.what();                                  \
    gtest_msg.value += "\".";                                     \
    goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
  }

#else  // GTEST_HAS_EXCEPTIONS
# 1457 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

#define GTEST_TEST_NO_THROW_CATCH_STD_EXCEPTION_()

#endif  // GTEST_HAS_EXCEPTIONS
# 1461 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"

#define GTEST_TEST_NO_THROW_(statement, fail)                            \
  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                          \
  if (::testing::internal::TrueWithString gtest_msg{}) {                 \
    try {                                                                \
      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement);         \
    }                                                                    \
    GTEST_TEST_NO_THROW_CATCH_STD_EXCEPTION_()                           \
    catch (...) {                                                        \
      gtest_msg.value = "it throws.";                                    \
      goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__);      \
    }                                                                    \
  } else                                                                 \
    GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__)              \
        : fail(("Expected: " #statement " doesn't throw an exception.\n" \
                "  Actual: " +                                           \
                gtest_msg.value)                                         \
                   .c_str())

#define GTEST_TEST_ANY_THROW_(statement, fail)                       \
  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                      \
  if (::testing::internal::AlwaysTrue()) {                           \
    bool gtest_caught_any = false;                                   \
    try {                                                            \
      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement);     \
    } catch (...) {                                                  \
      gtest_caught_any = true;                                       \
    }                                                                \
    if (!gtest_caught_any) {                                         \
      goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \
    }                                                                \
  } else                                                             \
    GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__)         \
        : fail("Expected: " #statement                               \
               " throws an exception.\n"                             \
               "  Actual: it doesn't.")

// Implements Boolean test assertions such as EXPECT_TRUE. expression can be
// either a boolean expression or an AssertionResult. text is a textual
// representation of expression as it was passed into the EXPECT_TRUE.
#define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \
  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                       \
  if (const ::testing::AssertionResult gtest_ar_ =                    \
          ::testing::AssertionResult(expression))                     \
    ;                                                                 \
  else                                                                \
    fail(::testing::internal::GetBoolAssertionFailureMessage(         \
             gtest_ar_, text, #actual, #expected)                     \
             .c_str())

#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail)                          \
  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                                \
  if (::testing::internal::AlwaysTrue()) {                                     \
    ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement);                 \
    if (gtest_fatal_failure_checker.has_new_fatal_failure()) {                 \
      goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__);            \
    }                                                                          \
  } else                                                                       \
    GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__)                    \
        : fail("Expected: " #statement                                         \
               " doesn't generate new fatal "                                  \
               "failures in the current thread.\n"                             \
               "  Actual: it does.")

// Expands to the name of the class that implements the given test.
#define GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
  test_suite_name##_##test_name##_Test

// Helper macro for defining tests.
#define GTEST_TEST_(test_suite_name, test_name, parent_class, parent_id)       \
  static_assert(sizeof(GTEST_STRINGIFY_(test_suite_name)) > 1,                 \
                "test_suite_name must not be empty");                          \
  static_assert(sizeof(GTEST_STRINGIFY_(test_name)) > 1,                       \
                "test_name must not be empty");                                \
  class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)                     \
      : public parent_class {                                                  \
   public:                                                                     \
    GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() = default;            \
    ~GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() override = default;  \
    GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)                         \
    (const GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) &) = delete;     \
    GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) & operator=(            \
        const GTEST_TEST_CLASS_NAME_(test_suite_name,                          \
                                     test_name) &) = delete; /* NOLINT */      \
    GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)                         \
    (GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) &&) noexcept = delete; \
    GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) & operator=(            \
        GTEST_TEST_CLASS_NAME_(test_suite_name,                                \
                               test_name) &&) noexcept = delete; /* NOLINT */  \
                                                                               \
   private:                                                                    \
    void TestBody() override;                                                  \
    static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;      \
  };                                                                           \
                                                                               \
  ::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_suite_name,           \
                                                    test_name)::test_info_ =   \
      ::testing::internal::MakeAndRegisterTestInfo(                            \
          #test_suite_name, #test_name, nullptr, nullptr,                      \
          ::testing::internal::CodeLocation(__FILE__, __LINE__), (parent_id),  \
          ::testing::internal::SuiteApiResolver<                               \
              parent_class>::GetSetUpCaseOrSuite(__FILE__, __LINE__),          \
          ::testing::internal::SuiteApiResolver<                               \
              parent_class>::GetTearDownCaseOrSuite(__FILE__, __LINE__),       \
          new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_(     \
              test_suite_name, test_name)>);                                   \
  void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody()

#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
# 1571 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h"
#endif /* gtest-internal.h expanded by -frewrite-includes */
# 115 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-port.h"
#endif /* expanded by -frewrite-includes */
# 115 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
# 116 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

namespace testing {

// Definitions in the internal* namespaces are subject to change without notice.
// DO NOT USE THEM IN USER CODE!
namespace internal {

template <typename T>
void UniversalPrint(const T& value, ::std::ostream* os);

// Used to print an STL-style container when the user doesn't define
// a PrintTo() for it.
struct ContainerPrinter {
  template <typename T,
            typename = typename std::enable_if<
                (sizeof(IsContainerTest<T>(0)) == sizeof(IsContainer)) &&
                !IsRecursiveContainer<T>::value>::type>
  static void PrintValue(const T& container, std::ostream* os) {
    const size_t kMaxCount = 32;  // The maximum number of elements to print.
    *os << '{';
    size_t count = 0;
    for (auto&& elem : container) {
      if (count > 0) {
        *os << ',';
        if (count == kMaxCount) {  // Enough has been printed.
          *os << " ...";
          break;
        }
      }
      *os << ' ';
      // We cannot call PrintTo(elem, os) here as PrintTo() doesn't
      // handle `elem` being a native array.
      internal::UniversalPrint(elem, os);
      ++count;
    }

    if (count > 0) {
      *os << ' ';
    }
    *os << '}';
  }
};

// Used to print a pointer that is neither a char pointer nor a member
// pointer, when the user doesn't define PrintTo() for it.  (A member
// variable pointer or member function pointer doesn't really point to
// a location in the address space.  Their representation is
// implementation-defined.  Therefore they will be printed as raw
// bytes.)
struct FunctionPointerPrinter {
  template <typename T, typename = typename std::enable_if<
                            std::is_function<T>::value>::type>
  static void PrintValue(T* p, ::std::ostream* os) {
    if (p == nullptr) {
      *os << "NULL";
    } else {
      // T is a function type, so '*os << p' doesn't do what we want
      // (it just prints p as bool).  We want to print p as a const
      // void*.
      *os << reinterpret_cast<const void*>(p);
    }
  }
};

struct PointerPrinter {
  template <typename T>
  static void PrintValue(T* p, ::std::ostream* os) {
    if (p == nullptr) {
      *os << "NULL";
    } else {
      // T is not a function type.  We just call << to print p,
      // relying on ADL to pick up user-defined << for their pointer
      // types, if any.
      *os << p;
    }
  }
};

namespace internal_stream_operator_without_lexical_name_lookup {

// The presence of an operator<< here will terminate lexical scope lookup
// straight away (even though it cannot be a match because of its argument
// types). Thus, the two operator<< calls in StreamPrinter will find only ADL
// candidates.
struct LookupBlocker {};
void operator<<(LookupBlocker, LookupBlocker);

struct StreamPrinter {
  template <typename T,
            // Don't accept member pointers here. We'd print them via implicit
            // conversion to bool, which isn't useful.
            typename = typename std::enable_if<
                !std::is_member_pointer<T>::value>::type,
            // Only accept types for which we can find a streaming operator via
            // ADL (possibly involving implicit conversions).
            typename = decltype(std::declval<std::ostream&>()
                                << std::declval<const T&>())>
  static void PrintValue(const T& value, ::std::ostream* os) {
    // Call streaming operator found by ADL, possibly with implicit conversions
    // of the arguments.
    *os << value;
  }
};

}  // namespace internal_stream_operator_without_lexical_name_lookup

struct ProtobufPrinter {
  // We print a protobuf using its ShortDebugString() when the string
  // doesn't exceed this many characters; otherwise we print it using
  // DebugString() for better readability.
  static const size_t kProtobufOneLinerMaxLength = 50;

  template <typename T,
            typename = typename std::enable_if<
                internal::HasDebugStringAndShortDebugString<T>::value>::type>
  static void PrintValue(const T& value, ::std::ostream* os) {
    std::string pretty_str = value.ShortDebugString();
    if (pretty_str.length() > kProtobufOneLinerMaxLength) {
      pretty_str = "\n" + value.DebugString();
    }
    *os << ("<" + pretty_str + ">");
  }
};

struct ConvertibleToIntegerPrinter {
  // Since T has no << operator or PrintTo() but can be implicitly
  // converted to BiggestInt, we print it as a BiggestInt.
  //
  // Most likely T is an enum type (either named or unnamed), in which
  // case printing it as an integer is the desired behavior.  In case
  // T is not an enum, printing it as an integer is the best we can do
  // given that it has no user-defined printer.
  static void PrintValue(internal::BiggestInt value, ::std::ostream* os) {
    *os << value;
  }
};

struct ConvertibleToStringViewPrinter {
#if 0 /* disabled by -frewrite-includes */
#if GTEST_INTERNAL_HAS_STRING_VIEW
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 255 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
  static void PrintValue(internal::StringView value, ::std::ostream* os) {
    internal::UniversalPrint(value, os);
  }
#endif
# 259 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
};

// Prints the given number of bytes in the given object to the given
// ostream.
GTEST_API_ void PrintBytesInObjectTo(const unsigned char* obj_bytes,
                                     size_t count, ::std::ostream* os);
struct RawBytesPrinter {
  // SFINAE on `sizeof` to make sure we have a complete type.
  template <typename T, size_t = sizeof(T)>
  static void PrintValue(const T& value, ::std::ostream* os) {
    PrintBytesInObjectTo(
        static_cast<const unsigned char*>(
            // Load bearing cast to void* to support iOS
            reinterpret_cast<const void*>(std::addressof(value))),
        sizeof(value), os);
  }
};

struct FallbackPrinter {
  template <typename T>
  static void PrintValue(const T&, ::std::ostream* os) {
    *os << "(incomplete type)";
  }
};

// Try every printer in order and return the first one that works.
template <typename T, typename E, typename Printer, typename... Printers>
struct FindFirstPrinter : FindFirstPrinter<T, E, Printers...> {};

template <typename T, typename Printer, typename... Printers>
struct FindFirstPrinter<
    T, decltype(Printer::PrintValue(std::declval<const T&>(), nullptr)),
    Printer, Printers...> {
  using type = Printer;
};

// Select the best printer in the following order:
//  - Print containers (they have begin/end/etc).
//  - Print function pointers.
//  - Print object pointers.
//  - Use the stream operator, if available.
//  - Print protocol buffers.
//  - Print types convertible to BiggestInt.
//  - Print types convertible to StringView, if available.
//  - Fallback to printing the raw bytes of the object.
template <typename T>
void PrintWithFallback(const T& value, ::std::ostream* os) {
  using Printer = typename FindFirstPrinter<
      T, void, ContainerPrinter, FunctionPointerPrinter, PointerPrinter,
      internal_stream_operator_without_lexical_name_lookup::StreamPrinter,
      ProtobufPrinter, ConvertibleToIntegerPrinter,
      ConvertibleToStringViewPrinter, RawBytesPrinter, FallbackPrinter>::type;
  Printer::PrintValue(value, os);
}

// FormatForComparison<ToPrint, OtherOperand>::Format(value) formats a
// value of type ToPrint that is an operand of a comparison assertion
// (e.g. ASSERT_EQ).  OtherOperand is the type of the other operand in
// the comparison, and is used to help determine the best way to
// format the value.  In particular, when the value is a C string
// (char pointer) and the other operand is an STL string object, we
// want to format the C string as a string, since we know it is
// compared by value with the string object.  If the value is a char
// pointer but the other operand is not an STL string object, we don't
// know whether the pointer is supposed to point to a NUL-terminated
// string, and thus want to print it as a pointer to be safe.
//
// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.

// The default case.
template <typename ToPrint, typename OtherOperand>
class FormatForComparison {
 public:
  static ::std::string Format(const ToPrint& value) {
    return ::testing::PrintToString(value);
  }
};

// Array.
template <typename ToPrint, size_t N, typename OtherOperand>
class FormatForComparison<ToPrint[N], OtherOperand> {
 public:
  static ::std::string Format(const ToPrint* value) {
    return FormatForComparison<const ToPrint*, OtherOperand>::Format(value);
  }
};

// By default, print C string as pointers to be safe, as we don't know
// whether they actually point to a NUL-terminated string.

#define GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(CharType)                \
  template <typename OtherOperand>                                      \
  class FormatForComparison<CharType*, OtherOperand> {                  \
   public:                                                              \
    static ::std::string Format(CharType* value) {                      \
      return ::testing::PrintToString(static_cast<const void*>(value)); \
    }                                                                   \
  }

GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char);
GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const char);
GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(wchar_t);
GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const wchar_t);
#ifdef __cpp_lib_char8_t
GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char8_t);
GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const char8_t);
#endif
# 366 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char16_t);
GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const char16_t);
GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char32_t);
GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const char32_t);

#undef GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_

// If a C string is compared with an STL string object, we know it's meant
// to point to a NUL-terminated string, and thus can print it as a string.

#define GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(CharType, OtherStringType) \
  template <>                                                            \
  class FormatForComparison<CharType*, OtherStringType> {                \
   public:                                                               \
    static ::std::string Format(CharType* value) {                       \
      return ::testing::PrintToString(value);                            \
    }                                                                    \
  }

GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::std::string);
GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::std::string);
#ifdef __cpp_lib_char8_t
GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char8_t, ::std::u8string);
GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char8_t, ::std::u8string);
#endif
# 391 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char16_t, ::std::u16string);
GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char16_t, ::std::u16string);
GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char32_t, ::std::u32string);
GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char32_t, ::std::u32string);

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_STD_WSTRING
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 397 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::std::wstring);
GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::std::wstring);
#endif
# 400 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

#undef GTEST_IMPL_FORMAT_C_STRING_AS_STRING_

// Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc)
// operand to be used in a failure message.  The type (but not value)
// of the other operand may affect the format.  This allows us to
// print a char* as a raw pointer when it is compared against another
// char* or void*, and print it as a C string when it is compared
// against an std::string object, for example.
//
// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
template <typename T1, typename T2>
std::string FormatForComparisonFailureMessage(const T1& value,
                                              const T2& /* other_operand */) {
  return FormatForComparison<T1, T2>::Format(value);
}

// UniversalPrinter<T>::Print(value, ostream_ptr) prints the given
// value to the given ostream.  The caller must ensure that
// 'ostream_ptr' is not NULL, or the behavior is undefined.
//
// We define UniversalPrinter as a class template (as opposed to a
// function template), as we need to partially specialize it for
// reference types, which cannot be done with function templates.
template <typename T>
class UniversalPrinter;

// Prints the given value using the << operator if it has one;
// otherwise prints the bytes in it.  This is what
// UniversalPrinter<T>::Print() does when PrintTo() is not specialized
// or overloaded for type T.
//
// A user can override this behavior for a class type Foo by defining
// an overload of PrintTo() in the namespace where Foo is defined.  We
// give the user this option as sometimes defining a << operator for
// Foo is not desirable (e.g. the coding style may prevent doing it,
// or there is already a << operator but it doesn't do what the user
// wants).
template <typename T>
void PrintTo(const T& value, ::std::ostream* os) {
  internal::PrintWithFallback(value, os);
}

// The following list of PrintTo() overloads tells
// UniversalPrinter<T>::Print() how to print standard types (built-in
// types, strings, plain arrays, and pointers).

// Overloads for various char types.
GTEST_API_ void PrintTo(unsigned char c, ::std::ostream* os);
GTEST_API_ void PrintTo(signed char c, ::std::ostream* os);
inline void PrintTo(char c, ::std::ostream* os) {
  // When printing a plain char, we always treat it as unsigned.  This
  // way, the output won't be affected by whether the compiler thinks
  // char is signed or not.
  PrintTo(static_cast<unsigned char>(c), os);
}

// Overloads for other simple built-in types.
inline void PrintTo(bool x, ::std::ostream* os) {
  *os << (x ? "true" : "false");
}

// Overload for wchar_t type.
// Prints a wchar_t as a symbol if it is printable or as its internal
// code otherwise and also as its decimal code (except for L'\0').
// The L'\0' char is printed as "L'\\0'". The decimal code is printed
// as signed integer when wchar_t is implemented by the compiler
// as a signed type and is printed as an unsigned integer when wchar_t
// is implemented as an unsigned type.
GTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os);

GTEST_API_ void PrintTo(char32_t c, ::std::ostream* os);
inline void PrintTo(char16_t c, ::std::ostream* os) {
  PrintTo(ImplicitCast_<char32_t>(c), os);
}
#ifdef __cpp_char8_t
inline void PrintTo(char8_t c, ::std::ostream* os) {
  PrintTo(ImplicitCast_<char32_t>(c), os);
}
#endif
# 480 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

// gcc/clang __{u,}int128_t
#if 0 /* disabled by -frewrite-includes */
#if defined(__SIZEOF_INT128__)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 483 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
GTEST_API_ void PrintTo(__uint128_t v, ::std::ostream* os);
GTEST_API_ void PrintTo(__int128_t v, ::std::ostream* os);
#endif  // __SIZEOF_INT128__
# 486 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

// Overloads for C strings.
GTEST_API_ void PrintTo(const char* s, ::std::ostream* os);
inline void PrintTo(char* s, ::std::ostream* os) {
  PrintTo(ImplicitCast_<const char*>(s), os);
}

// signed/unsigned char is often used for representing binary data, so
// we print pointers to it as void* to be safe.
inline void PrintTo(const signed char* s, ::std::ostream* os) {
  PrintTo(ImplicitCast_<const void*>(s), os);
}
inline void PrintTo(signed char* s, ::std::ostream* os) {
  PrintTo(ImplicitCast_<const void*>(s), os);
}
inline void PrintTo(const unsigned char* s, ::std::ostream* os) {
  PrintTo(ImplicitCast_<const void*>(s), os);
}
inline void PrintTo(unsigned char* s, ::std::ostream* os) {
  PrintTo(ImplicitCast_<const void*>(s), os);
}
#ifdef __cpp_char8_t
// Overloads for u8 strings.
GTEST_API_ void PrintTo(const char8_t* s, ::std::ostream* os);
inline void PrintTo(char8_t* s, ::std::ostream* os) {
  PrintTo(ImplicitCast_<const char8_t*>(s), os);
}
#endif
# 514 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
// Overloads for u16 strings.
GTEST_API_ void PrintTo(const char16_t* s, ::std::ostream* os);
inline void PrintTo(char16_t* s, ::std::ostream* os) {
  PrintTo(ImplicitCast_<const char16_t*>(s), os);
}
// Overloads for u32 strings.
GTEST_API_ void PrintTo(const char32_t* s, ::std::ostream* os);
inline void PrintTo(char32_t* s, ::std::ostream* os) {
  PrintTo(ImplicitCast_<const char32_t*>(s), os);
}

// MSVC can be configured to define wchar_t as a typedef of unsigned
// short.  It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native
// type.  When wchar_t is a typedef, defining an overload for const
// wchar_t* would cause unsigned short* be printed as a wide string,
// possibly causing invalid memory accesses.
#if 0 /* disabled by -frewrite-includes */
#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 531 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
// Overloads for wide C strings
GTEST_API_ void PrintTo(const wchar_t* s, ::std::ostream* os);
inline void PrintTo(wchar_t* s, ::std::ostream* os) {
  PrintTo(ImplicitCast_<const wchar_t*>(s), os);
}
#endif
# 537 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

// Overload for C arrays.  Multi-dimensional arrays are printed
// properly.

// Prints the given number of elements in an array, without printing
// the curly braces.
template <typename T>
void PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) {
  UniversalPrint(a[0], os);
  for (size_t i = 1; i != count; i++) {
    *os << ", ";
    UniversalPrint(a[i], os);
  }
}

// Overloads for ::std::string.
GTEST_API_ void PrintStringTo(const ::std::string& s, ::std::ostream* os);
inline void PrintTo(const ::std::string& s, ::std::ostream* os) {
  PrintStringTo(s, os);
}

// Overloads for ::std::u8string
#ifdef __cpp_lib_char8_t
GTEST_API_ void PrintU8StringTo(const ::std::u8string& s, ::std::ostream* os);
inline void PrintTo(const ::std::u8string& s, ::std::ostream* os) {
  PrintU8StringTo(s, os);
}
#endif
# 565 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

// Overloads for ::std::u16string
GTEST_API_ void PrintU16StringTo(const ::std::u16string& s, ::std::ostream* os);
inline void PrintTo(const ::std::u16string& s, ::std::ostream* os) {
  PrintU16StringTo(s, os);
}

// Overloads for ::std::u32string
GTEST_API_ void PrintU32StringTo(const ::std::u32string& s, ::std::ostream* os);
inline void PrintTo(const ::std::u32string& s, ::std::ostream* os) {
  PrintU32StringTo(s, os);
}

// Overloads for ::std::wstring.
#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_STD_WSTRING
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 580 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
GTEST_API_ void PrintWideStringTo(const ::std::wstring& s, ::std::ostream* os);
inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) {
  PrintWideStringTo(s, os);
}
#endif  // GTEST_HAS_STD_WSTRING
# 585 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_INTERNAL_HAS_STRING_VIEW
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 587 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
// Overload for internal::StringView.
inline void PrintTo(internal::StringView sp, ::std::ostream* os) {
  PrintTo(::std::string(sp), os);
}
#endif  // GTEST_INTERNAL_HAS_STRING_VIEW
# 592 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

inline void PrintTo(std::nullptr_t, ::std::ostream* os) { *os << "(nullptr)"; }

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_RTTI
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 596 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
inline void PrintTo(const std::type_info& info, std::ostream* os) {
  *os << internal::GetTypeName(info);
}
#endif  // GTEST_HAS_RTTI
# 600 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

template <typename T>
void PrintTo(std::reference_wrapper<T> ref, ::std::ostream* os) {
  UniversalPrinter<T&>::Print(ref.get(), os);
}

inline const void* VoidifyPointer(const void* p) { return p; }
inline const void* VoidifyPointer(volatile const void* p) {
  return const_cast<const void*>(p);
}

template <typename T, typename Ptr>
void PrintSmartPointer(const Ptr& ptr, std::ostream* os, char) {
  if (ptr == nullptr) {
    *os << "(nullptr)";
  } else {
    // We can't print the value. Just print the pointer..
    *os << "(" << (VoidifyPointer)(ptr.get()) << ")";
  }
}
template <typename T, typename Ptr,
          typename = typename std::enable_if<!std::is_void<T>::value &&
                                             !std::is_array<T>::value>::type>
void PrintSmartPointer(const Ptr& ptr, std::ostream* os, int) {
  if (ptr == nullptr) {
    *os << "(nullptr)";
  } else {
    *os << "(ptr = " << (VoidifyPointer)(ptr.get()) << ", value = ";
    UniversalPrinter<T>::Print(*ptr, os);
    *os << ")";
  }
}

template <typename T, typename D>
void PrintTo(const std::unique_ptr<T, D>& ptr, std::ostream* os) {
  (PrintSmartPointer<T>)(ptr, os, 0);
}

template <typename T>
void PrintTo(const std::shared_ptr<T>& ptr, std::ostream* os) {
  (PrintSmartPointer<T>)(ptr, os, 0);
}

// Helper function for printing a tuple.  T must be instantiated with
// a tuple type.
template <typename T>
void PrintTupleTo(const T&, std::integral_constant<size_t, 0>,
                  ::std::ostream*) {}

template <typename T, size_t I>
void PrintTupleTo(const T& t, std::integral_constant<size_t, I>,
                  ::std::ostream* os) {
  PrintTupleTo(t, std::integral_constant<size_t, I - 1>(), os);
  GTEST_INTENTIONAL_CONST_COND_PUSH_()
  if (I > 1) {
    GTEST_INTENTIONAL_CONST_COND_POP_()
    *os << ", ";
  }
  UniversalPrinter<typename std::tuple_element<I - 1, T>::type>::Print(
      std::get<I - 1>(t), os);
}

template <typename... Types>
void PrintTo(const ::std::tuple<Types...>& t, ::std::ostream* os) {
  *os << "(";
  PrintTupleTo(t, std::integral_constant<size_t, sizeof...(Types)>(), os);
  *os << ")";
}

// Overload for std::pair.
template <typename T1, typename T2>
void PrintTo(const ::std::pair<T1, T2>& value, ::std::ostream* os) {
  *os << '(';
  // We cannot use UniversalPrint(value.first, os) here, as T1 may be
  // a reference type.  The same for printing value.second.
  UniversalPrinter<T1>::Print(value.first, os);
  *os << ", ";
  UniversalPrinter<T2>::Print(value.second, os);
  *os << ')';
}

// Implements printing a non-reference type T by letting the compiler
// pick the right overload of PrintTo() for T.
template <typename T>
class UniversalPrinter {
 public:
  // MSVC warns about adding const to a function type, so we want to
  // disable the warning.
  GTEST_DISABLE_MSC_WARNINGS_PUSH_(4180)

  // Note: we deliberately don't call this PrintTo(), as that name
  // conflicts with ::testing::internal::PrintTo in the body of the
  // function.
  static void Print(const T& value, ::std::ostream* os) {
    // By default, ::testing::internal::PrintTo() is used for printing
    // the value.
    //
    // Thanks to Koenig look-up, if T is a class and has its own
    // PrintTo() function defined in its namespace, that function will
    // be visible here.  Since it is more specific than the generic ones
    // in ::testing::internal, it will be picked by the compiler in the
    // following statement - exactly what we want.
    PrintTo(value, os);
  }

  GTEST_DISABLE_MSC_WARNINGS_POP_()
};

// Remove any const-qualifiers before passing a type to UniversalPrinter.
template <typename T>
class UniversalPrinter<const T> : public UniversalPrinter<T> {};

#if 0 /* disabled by -frewrite-includes */
#if GTEST_INTERNAL_HAS_ANY
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 713 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

// Printer for std::any / absl::any

template <>
class UniversalPrinter<Any> {
 public:
  static void Print(const Any& value, ::std::ostream* os) {
    if (value.has_value()) {
      *os << "value of type " << GetTypeName(value);
    } else {
      *os << "no value";
    }
  }

 private:
  static std::string GetTypeName(const Any& value) {
#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_RTTI
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 730 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
    return internal::GetTypeName(value.type());
#else
# 732 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
    static_cast<void>(value);  // possibly unused
    return "<unknown_type>";
#endif  // GTEST_HAS_RTTI
# 735 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
  }
};

#endif  // GTEST_INTERNAL_HAS_ANY
# 739 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_INTERNAL_HAS_OPTIONAL
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 741 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

// Printer for std::optional / absl::optional

template <typename T>
class UniversalPrinter<Optional<T>> {
 public:
  static void Print(const Optional<T>& value, ::std::ostream* os) {
    *os << '(';
    if (!value) {
      *os << "nullopt";
    } else {
      UniversalPrint(*value, os);
    }
    *os << ')';
  }
};

template <>
class UniversalPrinter<decltype(Nullopt())> {
 public:
  static void Print(decltype(Nullopt()), ::std::ostream* os) {
    *os << "(nullopt)";
  }
};

#endif  // GTEST_INTERNAL_HAS_OPTIONAL
# 767 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

#if 0 /* disabled by -frewrite-includes */
#if GTEST_INTERNAL_HAS_VARIANT
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 769 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

// Printer for std::variant / absl::variant

template <typename... T>
class UniversalPrinter<Variant<T...>> {
 public:
  static void Print(const Variant<T...>& value, ::std::ostream* os) {
    *os << '(';
#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_ABSL
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 778 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
    absl::visit(Visitor{os, value.index()}, value);
#else
# 780 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
    std::visit(Visitor{os, value.index()}, value);
#endif  // GTEST_HAS_ABSL
# 782 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
    *os << ')';
  }

 private:
  struct Visitor {
    template <typename U>
    void operator()(const U& u) const {
      *os << "'" << GetTypeName<U>() << "(index = " << index
          << ")' with value ";
      UniversalPrint(u, os);
    }
    ::std::ostream* os;
    std::size_t index;
  };
};

#endif  // GTEST_INTERNAL_HAS_VARIANT
# 799 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

// UniversalPrintArray(begin, len, os) prints an array of 'len'
// elements, starting at address 'begin'.
template <typename T>
void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) {
  if (len == 0) {
    *os << "{}";
  } else {
    *os << "{ ";
    const size_t kThreshold = 18;
    const size_t kChunkSize = 8;
    // If the array has more than kThreshold elements, we'll have to
    // omit some details by printing only the first and the last
    // kChunkSize elements.
    if (len <= kThreshold) {
      PrintRawArrayTo(begin, len, os);
    } else {
      PrintRawArrayTo(begin, kChunkSize, os);
      *os << ", ..., ";
      PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os);
    }
    *os << " }";
  }
}
// This overload prints a (const) char array compactly.
GTEST_API_ void UniversalPrintArray(const char* begin, size_t len,
                                    ::std::ostream* os);

#ifdef __cpp_char8_t
// This overload prints a (const) char8_t array compactly.
GTEST_API_ void UniversalPrintArray(const char8_t* begin, size_t len,
                                    ::std::ostream* os);
#endif
# 832 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

// This overload prints a (const) char16_t array compactly.
GTEST_API_ void UniversalPrintArray(const char16_t* begin, size_t len,
                                    ::std::ostream* os);

// This overload prints a (const) char32_t array compactly.
GTEST_API_ void UniversalPrintArray(const char32_t* begin, size_t len,
                                    ::std::ostream* os);

// This overload prints a (const) wchar_t array compactly.
GTEST_API_ void UniversalPrintArray(const wchar_t* begin, size_t len,
                                    ::std::ostream* os);

// Implements printing an array type T[N].
template <typename T, size_t N>
class UniversalPrinter<T[N]> {
 public:
  // Prints the given array, omitting some elements when there are too
  // many.
  static void Print(const T (&a)[N], ::std::ostream* os) {
    UniversalPrintArray(a, N, os);
  }
};

// Implements printing a reference type T&.
template <typename T>
class UniversalPrinter<T&> {
 public:
  // MSVC warns about adding const to a function type, so we want to
  // disable the warning.
  GTEST_DISABLE_MSC_WARNINGS_PUSH_(4180)

  static void Print(const T& value, ::std::ostream* os) {
    // Prints the address of the value.  We use reinterpret_cast here
    // as static_cast doesn't compile when T is a function type.
    *os << "@" << reinterpret_cast<const void*>(&value) << " ";

    // Then prints the value itself.
    UniversalPrint(value, os);
  }

  GTEST_DISABLE_MSC_WARNINGS_POP_()
};

// Prints a value tersely: for a reference type, the referenced value
// (but not the address) is printed; for a (const) char pointer, the
// NUL-terminated string (but not the pointer) is printed.

template <typename T>
class UniversalTersePrinter {
 public:
  static void Print(const T& value, ::std::ostream* os) {
    UniversalPrint(value, os);
  }
};
template <typename T>
class UniversalTersePrinter<T&> {
 public:
  static void Print(const T& value, ::std::ostream* os) {
    UniversalPrint(value, os);
  }
};
template <typename T, size_t N>
class UniversalTersePrinter<T[N]> {
 public:
  static void Print(const T (&value)[N], ::std::ostream* os) {
    UniversalPrinter<T[N]>::Print(value, os);
  }
};
template <>
class UniversalTersePrinter<const char*> {
 public:
  static void Print(const char* str, ::std::ostream* os) {
    if (str == nullptr) {
      *os << "NULL";
    } else {
      UniversalPrint(std::string(str), os);
    }
  }
};
template <>
class UniversalTersePrinter<char*> : public UniversalTersePrinter<const char*> {
};

#ifdef __cpp_char8_t
template <>
class UniversalTersePrinter<const char8_t*> {
 public:
  static void Print(const char8_t* str, ::std::ostream* os) {
    if (str == nullptr) {
      *os << "NULL";
    } else {
      UniversalPrint(::std::u8string(str), os);
    }
  }
};
template <>
class UniversalTersePrinter<char8_t*>
    : public UniversalTersePrinter<const char8_t*> {};
#endif
# 932 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

template <>
class UniversalTersePrinter<const char16_t*> {
 public:
  static void Print(const char16_t* str, ::std::ostream* os) {
    if (str == nullptr) {
      *os << "NULL";
    } else {
      UniversalPrint(::std::u16string(str), os);
    }
  }
};
template <>
class UniversalTersePrinter<char16_t*>
    : public UniversalTersePrinter<const char16_t*> {};

template <>
class UniversalTersePrinter<const char32_t*> {
 public:
  static void Print(const char32_t* str, ::std::ostream* os) {
    if (str == nullptr) {
      *os << "NULL";
    } else {
      UniversalPrint(::std::u32string(str), os);
    }
  }
};
template <>
class UniversalTersePrinter<char32_t*>
    : public UniversalTersePrinter<const char32_t*> {};

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_STD_WSTRING
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 964 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
template <>
class UniversalTersePrinter<const wchar_t*> {
 public:
  static void Print(const wchar_t* str, ::std::ostream* os) {
    if (str == nullptr) {
      *os << "NULL";
    } else {
      UniversalPrint(::std::wstring(str), os);
    }
  }
};
#endif
# 976 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"

template <>
class UniversalTersePrinter<wchar_t*> {
 public:
  static void Print(wchar_t* str, ::std::ostream* os) {
    UniversalTersePrinter<const wchar_t*>::Print(str, os);
  }
};

template <typename T>
void UniversalTersePrint(const T& value, ::std::ostream* os) {
  UniversalTersePrinter<T>::Print(value, os);
}

// Prints a value using the type inferred by the compiler.  The
// difference between this and UniversalTersePrint() is that for a
// (const) char pointer, this prints both the pointer and the
// NUL-terminated string.
template <typename T>
void UniversalPrint(const T& value, ::std::ostream* os) {
  // A workarond for the bug in VC++ 7.1 that prevents us from instantiating
  // UniversalPrinter with T directly.
  typedef T T1;
  UniversalPrinter<T1>::Print(value, os);
}

typedef ::std::vector<::std::string> Strings;

// Tersely prints the first N fields of a tuple to a string vector,
// one element for each field.
template <typename Tuple>
void TersePrintPrefixToStrings(const Tuple&, std::integral_constant<size_t, 0>,
                               Strings*) {}
template <typename Tuple, size_t I>
void TersePrintPrefixToStrings(const Tuple& t,
                               std::integral_constant<size_t, I>,
                               Strings* strings) {
  TersePrintPrefixToStrings(t, std::integral_constant<size_t, I - 1>(),
                            strings);
  ::std::stringstream ss;
  UniversalTersePrint(std::get<I - 1>(t), &ss);
  strings->push_back(ss.str());
}

// Prints the fields of a tuple tersely to a string vector, one
// element for each field.  See the comment before
// UniversalTersePrint() for how we define "tersely".
template <typename Tuple>
Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) {
  Strings result;
  TersePrintPrefixToStrings(
      value, std::integral_constant<size_t, std::tuple_size<Tuple>::value>(),
      &result);
  return result;
}

}  // namespace internal

template <typename T>
::std::string PrintToString(const T& value) {
  ::std::stringstream ss;
  internal::UniversalTersePrinter<T>::Print(value, &ss);
  return ss.str();
}

}  // namespace testing

// Include any custom printer added by the local installation.
// We must include this header at the end to make sure it can use the
// declarations from this file.
#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-printers.h expanded by -frewrite-includes */
#include "gtest/internal/custom/gtest-printers.h"
#else /* gtest-printers.h expanded by -frewrite-includes */
# 1046 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/internal/custom/gtest-printers.h" 1
// Copyright 2015, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.
//
// This file provides an injection point for custom printers in a local
// installation of gTest.
// It will be included from gtest-printers.h and the overrides in this file
// will be visible to everyone.
//
// Injection point for custom user configurations. See README for details
//
// ** Custom implementation starts here **

#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_
#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_

#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_
# 43 "../../third_party/googletest/src/googletest/include/gtest/internal/custom/gtest-printers.h"
#endif /* gtest-printers.h expanded by -frewrite-includes */
# 1047 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h" 2

#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
# 1049 "../../third_party/googletest/src/googletest/include/gtest/gtest-printers.h"
#endif /* gtest-printers.h expanded by -frewrite-includes */
# 49 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-internal.h"
#endif /* expanded by -frewrite-includes */
# 49 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
# 50 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-port.h"
#endif /* expanded by -frewrite-includes */
# 50 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
# 51 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"

// MSVC warning C5046 is new as of VS2017 version 15.8.
#if 0 /* disabled by -frewrite-includes */
#if defined(_MSC_VER) && _MSC_VER >= 1915
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 54 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
#define GTEST_MAYBE_5046_ 5046
#else
# 56 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
#define GTEST_MAYBE_5046_
#endif
# 58 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"

GTEST_DISABLE_MSC_WARNINGS_PUSH_(
    4251 GTEST_MAYBE_5046_ /* class A needs to have dll-interface to be used by
                              clients of class B */
    /* Symbol involving type with internal linkage not defined */)

namespace testing {

// To implement a matcher Foo for type T, define:
//   1. a class FooMatcherMatcher that implements the matcher interface:
//     using is_gtest_matcher = void;
//     bool MatchAndExplain(const T&, std::ostream*);
//       (MatchResultListener* can also be used instead of std::ostream*)
//     void DescribeTo(std::ostream*);
//     void DescribeNegationTo(std::ostream*);
//
//   2. a factory function that creates a Matcher<T> object from a
//      FooMatcherMatcher.

class MatchResultListener {
 public:
  // Creates a listener object with the given underlying ostream.  The
  // listener does not own the ostream, and does not dereference it
  // in the constructor or destructor.
  explicit MatchResultListener(::std::ostream* os) : stream_(os) {}
  virtual ~MatchResultListener() = 0;  // Makes this class abstract.

  // Streams x to the underlying ostream; does nothing if the ostream
  // is NULL.
  template <typename T>
  MatchResultListener& operator<<(const T& x) {
    if (stream_ != nullptr) *stream_ << x;
    return *this;
  }

  // Returns the underlying ostream.
  ::std::ostream* stream() { return stream_; }

  // Returns true if and only if the listener is interested in an explanation
  // of the match result.  A matcher's MatchAndExplain() method can use
  // this information to avoid generating the explanation when no one
  // intends to hear it.
  bool IsInterested() const { return stream_ != nullptr; }

 private:
  ::std::ostream* const stream_;

  MatchResultListener(const MatchResultListener&) = delete;
  MatchResultListener& operator=(const MatchResultListener&) = delete;
};

inline MatchResultListener::~MatchResultListener() {}

// An instance of a subclass of this knows how to describe itself as a
// matcher.
class GTEST_API_ MatcherDescriberInterface {
 public:
  virtual ~MatcherDescriberInterface() {}

  // Describes this matcher to an ostream.  The function should print
  // a verb phrase that describes the property a value matching this
  // matcher should have.  The subject of the verb phrase is the value
  // being matched.  For example, the DescribeTo() method of the Gt(7)
  // matcher prints "is greater than 7".
  virtual void DescribeTo(::std::ostream* os) const = 0;

  // Describes the negation of this matcher to an ostream.  For
  // example, if the description of this matcher is "is greater than
  // 7", the negated description could be "is not greater than 7".
  // You are not required to override this when implementing
  // MatcherInterface, but it is highly advised so that your matcher
  // can produce good error messages.
  virtual void DescribeNegationTo(::std::ostream* os) const {
    *os << "not (";
    DescribeTo(os);
    *os << ")";
  }
};

// The implementation of a matcher.
template <typename T>
class MatcherInterface : public MatcherDescriberInterface {
 public:
  // Returns true if and only if the matcher matches x; also explains the
  // match result to 'listener' if necessary (see the next paragraph), in
  // the form of a non-restrictive relative clause ("which ...",
  // "whose ...", etc) that describes x.  For example, the
  // MatchAndExplain() method of the Pointee(...) matcher should
  // generate an explanation like "which points to ...".
  //
  // Implementations of MatchAndExplain() should add an explanation of
  // the match result *if and only if* they can provide additional
  // information that's not already present (or not obvious) in the
  // print-out of x and the matcher's description.  Whether the match
  // succeeds is not a factor in deciding whether an explanation is
  // needed, as sometimes the caller needs to print a failure message
  // when the match succeeds (e.g. when the matcher is used inside
  // Not()).
  //
  // For example, a "has at least 10 elements" matcher should explain
  // what the actual element count is, regardless of the match result,
  // as it is useful information to the reader; on the other hand, an
  // "is empty" matcher probably only needs to explain what the actual
  // size is when the match fails, as it's redundant to say that the
  // size is 0 when the value is already known to be empty.
  //
  // You should override this method when defining a new matcher.
  //
  // It's the responsibility of the caller (Google Test) to guarantee
  // that 'listener' is not NULL.  This helps to simplify a matcher's
  // implementation when it doesn't care about the performance, as it
  // can talk to 'listener' without checking its validity first.
  // However, in order to implement dummy listeners efficiently,
  // listener->stream() may be NULL.
  virtual bool MatchAndExplain(T x, MatchResultListener* listener) const = 0;

  // Inherits these methods from MatcherDescriberInterface:
  //   virtual void DescribeTo(::std::ostream* os) const = 0;
  //   virtual void DescribeNegationTo(::std::ostream* os) const;
};

namespace internal {

struct AnyEq {
  template <typename A, typename B>
  bool operator()(const A& a, const B& b) const {
    return a == b;
  }
};
struct AnyNe {
  template <typename A, typename B>
  bool operator()(const A& a, const B& b) const {
    return a != b;
  }
};
struct AnyLt {
  template <typename A, typename B>
  bool operator()(const A& a, const B& b) const {
    return a < b;
  }
};
struct AnyGt {
  template <typename A, typename B>
  bool operator()(const A& a, const B& b) const {
    return a > b;
  }
};
struct AnyLe {
  template <typename A, typename B>
  bool operator()(const A& a, const B& b) const {
    return a <= b;
  }
};
struct AnyGe {
  template <typename A, typename B>
  bool operator()(const A& a, const B& b) const {
    return a >= b;
  }
};

// A match result listener that ignores the explanation.
class DummyMatchResultListener : public MatchResultListener {
 public:
  DummyMatchResultListener() : MatchResultListener(nullptr) {}

 private:
  DummyMatchResultListener(const DummyMatchResultListener&) = delete;
  DummyMatchResultListener& operator=(const DummyMatchResultListener&) = delete;
};

// A match result listener that forwards the explanation to a given
// ostream.  The difference between this and MatchResultListener is
// that the former is concrete.
class StreamMatchResultListener : public MatchResultListener {
 public:
  explicit StreamMatchResultListener(::std::ostream* os)
      : MatchResultListener(os) {}

 private:
  StreamMatchResultListener(const StreamMatchResultListener&) = delete;
  StreamMatchResultListener& operator=(const StreamMatchResultListener&) =
      delete;
};

struct SharedPayloadBase {
  std::atomic<int> ref{1};
  void Ref() { ref.fetch_add(1, std::memory_order_relaxed); }
  bool Unref() { return ref.fetch_sub(1, std::memory_order_acq_rel) == 1; }
};

template <typename T>
struct SharedPayload : SharedPayloadBase {
  explicit SharedPayload(const T& v) : value(v) {}
  explicit SharedPayload(T&& v) : value(std::move(v)) {}

  static void Destroy(SharedPayloadBase* shared) {
    delete static_cast<SharedPayload*>(shared);
  }

  T value;
};

// An internal class for implementing Matcher<T>, which will derive
// from it.  We put functionalities common to all Matcher<T>
// specializations here to avoid code duplication.
template <typename T>
class MatcherBase : private MatcherDescriberInterface {
 public:
  // Returns true if and only if the matcher matches x; also explains the
  // match result to 'listener'.
  bool MatchAndExplain(const T& x, MatchResultListener* listener) const {
    GTEST_CHECK_(vtable_ != nullptr);
    return vtable_->match_and_explain(*this, x, listener);
  }

  // Returns true if and only if this matcher matches x.
  bool Matches(const T& x) const {
    DummyMatchResultListener dummy;
    return MatchAndExplain(x, &dummy);
  }

  // Describes this matcher to an ostream.
  void DescribeTo(::std::ostream* os) const final {
    GTEST_CHECK_(vtable_ != nullptr);
    vtable_->describe(*this, os, false);
  }

  // Describes the negation of this matcher to an ostream.
  void DescribeNegationTo(::std::ostream* os) const final {
    GTEST_CHECK_(vtable_ != nullptr);
    vtable_->describe(*this, os, true);
  }

  // Explains why x matches, or doesn't match, the matcher.
  void ExplainMatchResultTo(const T& x, ::std::ostream* os) const {
    StreamMatchResultListener listener(os);
    MatchAndExplain(x, &listener);
  }

  // Returns the describer for this matcher object; retains ownership
  // of the describer, which is only guaranteed to be alive when
  // this matcher object is alive.
  const MatcherDescriberInterface* GetDescriber() const {
    if (vtable_ == nullptr) return nullptr;
    return vtable_->get_describer(*this);
  }

 protected:
  MatcherBase() : vtable_(nullptr), buffer_() {}

  // Constructs a matcher from its implementation.
  template <typename U>
  explicit MatcherBase(const MatcherInterface<U>* impl)
      : vtable_(nullptr), buffer_() {
    Init(impl);
  }

  template <typename M, typename = typename std::remove_reference<
                            M>::type::is_gtest_matcher>
  MatcherBase(M&& m) : vtable_(nullptr), buffer_() {  // NOLINT
    Init(std::forward<M>(m));
  }

  MatcherBase(const MatcherBase& other)
      : vtable_(other.vtable_), buffer_(other.buffer_) {
    if (IsShared()) buffer_.shared->Ref();
  }

  MatcherBase& operator=(const MatcherBase& other) {
    if (this == &other) return *this;
    Destroy();
    vtable_ = other.vtable_;
    buffer_ = other.buffer_;
    if (IsShared()) buffer_.shared->Ref();
    return *this;
  }

  MatcherBase(MatcherBase&& other)
      : vtable_(other.vtable_), buffer_(other.buffer_) {
    other.vtable_ = nullptr;
  }

  MatcherBase& operator=(MatcherBase&& other) {
    if (this == &other) return *this;
    Destroy();
    vtable_ = other.vtable_;
    buffer_ = other.buffer_;
    other.vtable_ = nullptr;
    return *this;
  }

  ~MatcherBase() override { Destroy(); }

 private:
  struct VTable {
    bool (*match_and_explain)(const MatcherBase&, const T&,
                              MatchResultListener*);
    void (*describe)(const MatcherBase&, std::ostream*, bool negation);
    // Returns the captured object if it implements the interface, otherwise
    // returns the MatcherBase itself.
    const MatcherDescriberInterface* (*get_describer)(const MatcherBase&);
    // Called on shared instances when the reference count reaches 0.
    void (*shared_destroy)(SharedPayloadBase*);
  };

  bool IsShared() const {
    return vtable_ != nullptr && vtable_->shared_destroy != nullptr;
  }

  // If the implementation uses a listener, call that.
  template <typename P>
  static auto MatchAndExplainImpl(const MatcherBase& m, const T& value,
                                  MatchResultListener* listener)
      -> decltype(P::Get(m).MatchAndExplain(value, listener->stream())) {
    return P::Get(m).MatchAndExplain(value, listener->stream());
  }

  template <typename P>
  static auto MatchAndExplainImpl(const MatcherBase& m, const T& value,
                                  MatchResultListener* listener)
      -> decltype(P::Get(m).MatchAndExplain(value, listener)) {
    return P::Get(m).MatchAndExplain(value, listener);
  }

  template <typename P>
  static void DescribeImpl(const MatcherBase& m, std::ostream* os,
                           bool negation) {
    if (negation) {
      P::Get(m).DescribeNegationTo(os);
    } else {
      P::Get(m).DescribeTo(os);
    }
  }

  template <typename P>
  static const MatcherDescriberInterface* GetDescriberImpl(
      const MatcherBase& m) {
    // If the impl is a MatcherDescriberInterface, then return it.
    // Otherwise use MatcherBase itself.
    // This allows us to implement the GetDescriber() function without support
    // from the impl, but some users really want to get their impl back when
    // they call GetDescriber().
    // We use std::get on a tuple as a workaround of not having `if constexpr`.
    return std::get<(
        std::is_convertible<decltype(&P::Get(m)),
                            const MatcherDescriberInterface*>::value
            ? 1
            : 0)>(std::make_tuple(&m, &P::Get(m)));
  }

  template <typename P>
  const VTable* GetVTable() {
    static constexpr VTable kVTable = {&MatchAndExplainImpl<P>,
                                       &DescribeImpl<P>, &GetDescriberImpl<P>,
                                       P::shared_destroy};
    return &kVTable;
  }

  union Buffer {
    // Add some types to give Buffer some common alignment/size use cases.
    void* ptr;
    double d;
    int64_t i;
    // And add one for the out-of-line cases.
    SharedPayloadBase* shared;
  };

  void Destroy() {
    if (IsShared() && buffer_.shared->Unref()) {
      vtable_->shared_destroy(buffer_.shared);
    }
  }

  template <typename M>
  static constexpr bool IsInlined() {
    return sizeof(M) <= sizeof(Buffer) && alignof(M) <= alignof(Buffer) &&
           std::is_trivially_copy_constructible<M>::value &&
           std::is_trivially_destructible<M>::value;
  }

  template <typename M, bool = MatcherBase::IsInlined<M>()>
  struct ValuePolicy {
    static const M& Get(const MatcherBase& m) {
      // When inlined along with Init, need to be explicit to avoid violating
      // strict aliasing rules.
      const M* ptr =
          static_cast<const M*>(static_cast<const void*>(&m.buffer_));
      return *ptr;
    }
    static void Init(MatcherBase& m, M impl) {
      ::new (static_cast<void*>(&m.buffer_)) M(impl);
    }
    static constexpr auto shared_destroy = nullptr;
  };

  template <typename M>
  struct ValuePolicy<M, false> {
    using Shared = SharedPayload<M>;
    static const M& Get(const MatcherBase& m) {
      return static_cast<Shared*>(m.buffer_.shared)->value;
    }
    template <typename Arg>
    static void Init(MatcherBase& m, Arg&& arg) {
      m.buffer_.shared = new Shared(std::forward<Arg>(arg));
    }
    static constexpr auto shared_destroy = &Shared::Destroy;
  };

  template <typename U, bool B>
  struct ValuePolicy<const MatcherInterface<U>*, B> {
    using M = const MatcherInterface<U>;
    using Shared = SharedPayload<std::unique_ptr<M>>;
    static const M& Get(const MatcherBase& m) {
      return *static_cast<Shared*>(m.buffer_.shared)->value;
    }
    static void Init(MatcherBase& m, M* impl) {
      m.buffer_.shared = new Shared(std::unique_ptr<M>(impl));
    }

    static constexpr auto shared_destroy = &Shared::Destroy;
  };

  template <typename M>
  void Init(M&& m) {
    using MM = typename std::decay<M>::type;
    using Policy = ValuePolicy<MM>;
    vtable_ = GetVTable<Policy>();
    Policy::Init(*this, std::forward<M>(m));
  }

  const VTable* vtable_;
  Buffer buffer_;
};

}  // namespace internal

// A Matcher<T> is a copyable and IMMUTABLE (except by assignment)
// object that can check whether a value of type T matches.  The
// implementation of Matcher<T> is just a std::shared_ptr to const
// MatcherInterface<T>.  Don't inherit from Matcher!
template <typename T>
class Matcher : public internal::MatcherBase<T> {
 public:
  // Constructs a null matcher.  Needed for storing Matcher objects in STL
  // containers.  A default-constructed matcher is not yet initialized.  You
  // cannot use it until a valid value has been assigned to it.
  explicit Matcher() {}  // NOLINT

  // Constructs a matcher from its implementation.
  explicit Matcher(const MatcherInterface<const T&>* impl)
      : internal::MatcherBase<T>(impl) {}

  template <typename U>
  explicit Matcher(
      const MatcherInterface<U>* impl,
      typename std::enable_if<!std::is_same<U, const U&>::value>::type* =
          nullptr)
      : internal::MatcherBase<T>(impl) {}

  template <typename M, typename = typename std::remove_reference<
                            M>::type::is_gtest_matcher>
  Matcher(M&& m) : internal::MatcherBase<T>(std::forward<M>(m)) {}  // NOLINT

  // Implicit constructor here allows people to write
  // EXPECT_CALL(foo, Bar(5)) instead of EXPECT_CALL(foo, Bar(Eq(5))) sometimes
  Matcher(T value);  // NOLINT
};

// The following two specializations allow the user to write str
// instead of Eq(str) and "foo" instead of Eq("foo") when a std::string
// matcher is expected.
template <>
class GTEST_API_ Matcher<const std::string&>
    : public internal::MatcherBase<const std::string&> {
 public:
  Matcher() {}

  explicit Matcher(const MatcherInterface<const std::string&>* impl)
      : internal::MatcherBase<const std::string&>(impl) {}

  template <typename M, typename = typename std::remove_reference<
                            M>::type::is_gtest_matcher>
  Matcher(M&& m)  // NOLINT
      : internal::MatcherBase<const std::string&>(std::forward<M>(m)) {}

  // Allows the user to write str instead of Eq(str) sometimes, where
  // str is a std::string object.
  Matcher(const std::string& s);  // NOLINT

  // Allows the user to write "foo" instead of Eq("foo") sometimes.
  Matcher(const char* s);  // NOLINT
};

template <>
class GTEST_API_ Matcher<std::string>
    : public internal::MatcherBase<std::string> {
 public:
  Matcher() {}

  explicit Matcher(const MatcherInterface<const std::string&>* impl)
      : internal::MatcherBase<std::string>(impl) {}
  explicit Matcher(const MatcherInterface<std::string>* impl)
      : internal::MatcherBase<std::string>(impl) {}

  template <typename M, typename = typename std::remove_reference<
                            M>::type::is_gtest_matcher>
  Matcher(M&& m)  // NOLINT
      : internal::MatcherBase<std::string>(std::forward<M>(m)) {}

  // Allows the user to write str instead of Eq(str) sometimes, where
  // str is a string object.
  Matcher(const std::string& s);  // NOLINT

  // Allows the user to write "foo" instead of Eq("foo") sometimes.
  Matcher(const char* s);  // NOLINT
};

#if 0 /* disabled by -frewrite-includes */
#if GTEST_INTERNAL_HAS_STRING_VIEW
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 576 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
// The following two specializations allow the user to write str
// instead of Eq(str) and "foo" instead of Eq("foo") when a absl::string_view
// matcher is expected.
template <>
class GTEST_API_ Matcher<const internal::StringView&>
    : public internal::MatcherBase<const internal::StringView&> {
 public:
  Matcher() {}

  explicit Matcher(const MatcherInterface<const internal::StringView&>* impl)
      : internal::MatcherBase<const internal::StringView&>(impl) {}

  template <typename M, typename = typename std::remove_reference<
                            M>::type::is_gtest_matcher>
  Matcher(M&& m)  // NOLINT
      : internal::MatcherBase<const internal::StringView&>(std::forward<M>(m)) {
  }

  // Allows the user to write str instead of Eq(str) sometimes, where
  // str is a std::string object.
  Matcher(const std::string& s);  // NOLINT

  // Allows the user to write "foo" instead of Eq("foo") sometimes.
  Matcher(const char* s);  // NOLINT

  // Allows the user to pass absl::string_views or std::string_views directly.
  Matcher(internal::StringView s);  // NOLINT
};

template <>
class GTEST_API_ Matcher<internal::StringView>
    : public internal::MatcherBase<internal::StringView> {
 public:
  Matcher() {}

  explicit Matcher(const MatcherInterface<const internal::StringView&>* impl)
      : internal::MatcherBase<internal::StringView>(impl) {}
  explicit Matcher(const MatcherInterface<internal::StringView>* impl)
      : internal::MatcherBase<internal::StringView>(impl) {}

  template <typename M, typename = typename std::remove_reference<
                            M>::type::is_gtest_matcher>
  Matcher(M&& m)  // NOLINT
      : internal::MatcherBase<internal::StringView>(std::forward<M>(m)) {}

  // Allows the user to write str instead of Eq(str) sometimes, where
  // str is a std::string object.
  Matcher(const std::string& s);  // NOLINT

  // Allows the user to write "foo" instead of Eq("foo") sometimes.
  Matcher(const char* s);  // NOLINT

  // Allows the user to pass absl::string_views or std::string_views directly.
  Matcher(internal::StringView s);  // NOLINT
};
#endif  // GTEST_INTERNAL_HAS_STRING_VIEW
# 632 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"

// Prints a matcher in a human-readable format.
template <typename T>
std::ostream& operator<<(std::ostream& os, const Matcher<T>& matcher) {
  matcher.DescribeTo(&os);
  return os;
}

// The PolymorphicMatcher class template makes it easy to implement a
// polymorphic matcher (i.e. a matcher that can match values of more
// than one type, e.g. Eq(n) and NotNull()).
//
// To define a polymorphic matcher, a user should provide an Impl
// class that has a DescribeTo() method and a DescribeNegationTo()
// method, and define a member function (or member function template)
//
//   bool MatchAndExplain(const Value& value,
//                        MatchResultListener* listener) const;
//
// See the definition of NotNull() for a complete example.
template <class Impl>
class PolymorphicMatcher {
 public:
  explicit PolymorphicMatcher(const Impl& an_impl) : impl_(an_impl) {}

  // Returns a mutable reference to the underlying matcher
  // implementation object.
  Impl& mutable_impl() { return impl_; }

  // Returns an immutable reference to the underlying matcher
  // implementation object.
  const Impl& impl() const { return impl_; }

  template <typename T>
  operator Matcher<T>() const {
    return Matcher<T>(new MonomorphicImpl<const T&>(impl_));
  }

 private:
  template <typename T>
  class MonomorphicImpl : public MatcherInterface<T> {
   public:
    explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {}

    void DescribeTo(::std::ostream* os) const override { impl_.DescribeTo(os); }

    void DescribeNegationTo(::std::ostream* os) const override {
      impl_.DescribeNegationTo(os);
    }

    bool MatchAndExplain(T x, MatchResultListener* listener) const override {
      return impl_.MatchAndExplain(x, listener);
    }

   private:
    const Impl impl_;
  };

  Impl impl_;
};

// Creates a matcher from its implementation.
// DEPRECATED: Especially in the generic code, prefer:
//   Matcher<T>(new MyMatcherImpl<const T&>(...));
//
// MakeMatcher may create a Matcher that accepts its argument by value, which
// leads to unnecessary copies & lack of support for non-copyable types.
template <typename T>
inline Matcher<T> MakeMatcher(const MatcherInterface<T>* impl) {
  return Matcher<T>(impl);
}

// Creates a polymorphic matcher from its implementation.  This is
// easier to use than the PolymorphicMatcher<Impl> constructor as it
// doesn't require you to explicitly write the template argument, e.g.
//
//   MakePolymorphicMatcher(foo);
// vs
//   PolymorphicMatcher<TypeOfFoo>(foo);
template <class Impl>
inline PolymorphicMatcher<Impl> MakePolymorphicMatcher(const Impl& impl) {
  return PolymorphicMatcher<Impl>(impl);
}

namespace internal {
// Implements a matcher that compares a given value with a
// pre-supplied value using one of the ==, <=, <, etc, operators.  The
// two values being compared don't have to have the same type.
//
// The matcher defined here is polymorphic (for example, Eq(5) can be
// used to match an int, a short, a double, etc).  Therefore we use
// a template type conversion operator in the implementation.
//
// The following template definition assumes that the Rhs parameter is
// a "bare" type (i.e. neither 'const T' nor 'T&').
template <typename D, typename Rhs, typename Op>
class ComparisonBase {
 public:
  explicit ComparisonBase(const Rhs& rhs) : rhs_(rhs) {}

  using is_gtest_matcher = void;

  template <typename Lhs>
  bool MatchAndExplain(const Lhs& lhs, std::ostream*) const {
    return Op()(lhs, Unwrap(rhs_));
  }
  void DescribeTo(std::ostream* os) const {
    *os << D::Desc() << " ";
    UniversalPrint(Unwrap(rhs_), os);
  }
  void DescribeNegationTo(std::ostream* os) const {
    *os << D::NegatedDesc() << " ";
    UniversalPrint(Unwrap(rhs_), os);
  }

 private:
  template <typename T>
  static const T& Unwrap(const T& v) {
    return v;
  }
  template <typename T>
  static const T& Unwrap(std::reference_wrapper<T> v) {
    return v;
  }

  Rhs rhs_;
};

template <typename Rhs>
class EqMatcher : public ComparisonBase<EqMatcher<Rhs>, Rhs, AnyEq> {
 public:
  explicit EqMatcher(const Rhs& rhs)
      : ComparisonBase<EqMatcher<Rhs>, Rhs, AnyEq>(rhs) {}
  static const char* Desc() { return "is equal to"; }
  static const char* NegatedDesc() { return "isn't equal to"; }
};
template <typename Rhs>
class NeMatcher : public ComparisonBase<NeMatcher<Rhs>, Rhs, AnyNe> {
 public:
  explicit NeMatcher(const Rhs& rhs)
      : ComparisonBase<NeMatcher<Rhs>, Rhs, AnyNe>(rhs) {}
  static const char* Desc() { return "isn't equal to"; }
  static const char* NegatedDesc() { return "is equal to"; }
};
template <typename Rhs>
class LtMatcher : public ComparisonBase<LtMatcher<Rhs>, Rhs, AnyLt> {
 public:
  explicit LtMatcher(const Rhs& rhs)
      : ComparisonBase<LtMatcher<Rhs>, Rhs, AnyLt>(rhs) {}
  static const char* Desc() { return "is <"; }
  static const char* NegatedDesc() { return "isn't <"; }
};
template <typename Rhs>
class GtMatcher : public ComparisonBase<GtMatcher<Rhs>, Rhs, AnyGt> {
 public:
  explicit GtMatcher(const Rhs& rhs)
      : ComparisonBase<GtMatcher<Rhs>, Rhs, AnyGt>(rhs) {}
  static const char* Desc() { return "is >"; }
  static const char* NegatedDesc() { return "isn't >"; }
};
template <typename Rhs>
class LeMatcher : public ComparisonBase<LeMatcher<Rhs>, Rhs, AnyLe> {
 public:
  explicit LeMatcher(const Rhs& rhs)
      : ComparisonBase<LeMatcher<Rhs>, Rhs, AnyLe>(rhs) {}
  static const char* Desc() { return "is <="; }
  static const char* NegatedDesc() { return "isn't <="; }
};
template <typename Rhs>
class GeMatcher : public ComparisonBase<GeMatcher<Rhs>, Rhs, AnyGe> {
 public:
  explicit GeMatcher(const Rhs& rhs)
      : ComparisonBase<GeMatcher<Rhs>, Rhs, AnyGe>(rhs) {}
  static const char* Desc() { return "is >="; }
  static const char* NegatedDesc() { return "isn't >="; }
};

template <typename T, typename = typename std::enable_if<
                          std::is_constructible<std::string, T>::value>::type>
using StringLike = T;

// Implements polymorphic matchers MatchesRegex(regex) and
// ContainsRegex(regex), which can be used as a Matcher<T> as long as
// T can be converted to a string.
class MatchesRegexMatcher {
 public:
  MatchesRegexMatcher(const RE* regex, bool full_match)
      : regex_(regex), full_match_(full_match) {}

#if 0 /* disabled by -frewrite-includes */
#if GTEST_INTERNAL_HAS_STRING_VIEW
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 822 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
  bool MatchAndExplain(const internal::StringView& s,
                       MatchResultListener* listener) const {
    return MatchAndExplain(std::string(s), listener);
  }
#endif  // GTEST_INTERNAL_HAS_STRING_VIEW
# 827 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"

  // Accepts pointer types, particularly:
  //   const char*
  //   char*
  //   const wchar_t*
  //   wchar_t*
  template <typename CharType>
  bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {
    return s != nullptr && MatchAndExplain(std::string(s), listener);
  }

  // Matches anything that can convert to std::string.
  //
  // This is a template, not just a plain function with const std::string&,
  // because absl::string_view has some interfering non-explicit constructors.
  template <class MatcheeStringType>
  bool MatchAndExplain(const MatcheeStringType& s,
                       MatchResultListener* /* listener */) const {
    const std::string s2(s);
    return full_match_ ? RE::FullMatch(s2, *regex_)
                       : RE::PartialMatch(s2, *regex_);
  }

  void DescribeTo(::std::ostream* os) const {
    *os << (full_match_ ? "matches" : "contains") << " regular expression ";
    UniversalPrinter<std::string>::Print(regex_->pattern(), os);
  }

  void DescribeNegationTo(::std::ostream* os) const {
    *os << "doesn't " << (full_match_ ? "match" : "contain")
        << " regular expression ";
    UniversalPrinter<std::string>::Print(regex_->pattern(), os);
  }

 private:
  const std::shared_ptr<const RE> regex_;
  const bool full_match_;
};
}  // namespace internal

// Matches a string that fully matches regular expression 'regex'.
// The matcher takes ownership of 'regex'.
inline PolymorphicMatcher<internal::MatchesRegexMatcher> MatchesRegex(
    const internal::RE* regex) {
  return MakePolymorphicMatcher(internal::MatchesRegexMatcher(regex, true));
}
template <typename T = std::string>
PolymorphicMatcher<internal::MatchesRegexMatcher> MatchesRegex(
    const internal::StringLike<T>& regex) {
  return MatchesRegex(new internal::RE(std::string(regex)));
}

// Matches a string that contains regular expression 'regex'.
// The matcher takes ownership of 'regex'.
inline PolymorphicMatcher<internal::MatchesRegexMatcher> ContainsRegex(
    const internal::RE* regex) {
  return MakePolymorphicMatcher(internal::MatchesRegexMatcher(regex, false));
}
template <typename T = std::string>
PolymorphicMatcher<internal::MatchesRegexMatcher> ContainsRegex(
    const internal::StringLike<T>& regex) {
  return ContainsRegex(new internal::RE(std::string(regex)));
}

// Creates a polymorphic matcher that matches anything equal to x.
// Note: if the parameter of Eq() were declared as const T&, Eq("foo")
// wouldn't compile.
template <typename T>
inline internal::EqMatcher<T> Eq(T x) {
  return internal::EqMatcher<T>(x);
}

// Constructs a Matcher<T> from a 'value' of type T.  The constructed
// matcher matches any value that's equal to 'value'.
template <typename T>
Matcher<T>::Matcher(T value) {
  *this = Eq(value);
}

// Creates a monomorphic matcher that matches anything with type Lhs
// and equal to rhs.  A user may need to use this instead of Eq(...)
// in order to resolve an overloading ambiguity.
//
// TypedEq<T>(x) is just a convenient short-hand for Matcher<T>(Eq(x))
// or Matcher<T>(x), but more readable than the latter.
//
// We could define similar monomorphic matchers for other comparison
// operations (e.g. TypedLt, TypedGe, and etc), but decided not to do
// it yet as those are used much less than Eq() in practice.  A user
// can always write Matcher<T>(Lt(5)) to be explicit about the type,
// for example.
template <typename Lhs, typename Rhs>
inline Matcher<Lhs> TypedEq(const Rhs& rhs) {
  return Eq(rhs);
}

// Creates a polymorphic matcher that matches anything >= x.
template <typename Rhs>
inline internal::GeMatcher<Rhs> Ge(Rhs x) {
  return internal::GeMatcher<Rhs>(x);
}

// Creates a polymorphic matcher that matches anything > x.
template <typename Rhs>
inline internal::GtMatcher<Rhs> Gt(Rhs x) {
  return internal::GtMatcher<Rhs>(x);
}

// Creates a polymorphic matcher that matches anything <= x.
template <typename Rhs>
inline internal::LeMatcher<Rhs> Le(Rhs x) {
  return internal::LeMatcher<Rhs>(x);
}

// Creates a polymorphic matcher that matches anything < x.
template <typename Rhs>
inline internal::LtMatcher<Rhs> Lt(Rhs x) {
  return internal::LtMatcher<Rhs>(x);
}

// Creates a polymorphic matcher that matches anything != x.
template <typename Rhs>
inline internal::NeMatcher<Rhs> Ne(Rhs x) {
  return internal::NeMatcher<Rhs>(x);
}
}  // namespace testing

GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251 5046

#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_MATCHERS_H_
# 957 "../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h"
#endif /* gtest-matchers.h expanded by -frewrite-includes */
# 47 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-death-test-internal.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-internal.h"
#endif /* expanded by -frewrite-includes */
# 47 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-death-test-internal.h"
# 48 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-death-test-internal.h"

GTEST_DECLARE_string_(internal_run_death_test);

namespace testing {
namespace internal {

// Names of the flags (needed for parsing Google Test flags).
const char kDeathTestStyleFlag[] = "death_test_style";
const char kDeathTestUseFork[] = "death_test_use_fork";
const char kInternalRunDeathTestFlag[] = "internal_run_death_test";

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_DEATH_TEST
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 60 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-death-test-internal.h"

GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
/* class A needs to have dll-interface to be used by clients of class B */)

// DeathTest is a class that hides much of the complexity of the
// GTEST_DEATH_TEST_ macro.  It is abstract; its static Create method
// returns a concrete class that depends on the prevailing death test
// style, as defined by the --gtest_death_test_style and/or
// --gtest_internal_run_death_test flags.

// In describing the results of death tests, these terms are used with
// the corresponding definitions:
//
// exit status:  The integer exit information in the format specified
//               by wait(2)
// exit code:    The integer code passed to exit(3), _exit(2), or
//               returned from main()
class GTEST_API_ DeathTest {
 public:
  // Create returns false if there was an error determining the
  // appropriate action to take for the current death test; for example,
  // if the gtest_death_test_style flag is set to an invalid value.
  // The LastMessage method will return a more detailed message in that
  // case.  Otherwise, the DeathTest pointer pointed to by the "test"
  // argument is set.  If the death test should be skipped, the pointer
  // is set to NULL; otherwise, it is set to the address of a new concrete
  // DeathTest object that controls the execution of the current test.
  static bool Create(const char* statement, Matcher<const std::string&> matcher,
                     const char* file, int line, DeathTest** test);
  DeathTest();
  virtual ~DeathTest() {}

  // A helper class that aborts a death test when it's deleted.
  class ReturnSentinel {
   public:
    explicit ReturnSentinel(DeathTest* test) : test_(test) {}
    ~ReturnSentinel() { test_->Abort(TEST_ENCOUNTERED_RETURN_STATEMENT); }

   private:
    DeathTest* const test_;
    ReturnSentinel(const ReturnSentinel&) = delete;
    ReturnSentinel& operator=(const ReturnSentinel&) = delete;
  } GTEST_ATTRIBUTE_UNUSED_;

  // An enumeration of possible roles that may be taken when a death
  // test is encountered.  EXECUTE means that the death test logic should
  // be executed immediately.  OVERSEE means that the program should prepare
  // the appropriate environment for a child process to execute the death
  // test, then wait for it to complete.
  enum TestRole { OVERSEE_TEST, EXECUTE_TEST };

  // An enumeration of the three reasons that a test might be aborted.
  enum AbortReason {
    TEST_ENCOUNTERED_RETURN_STATEMENT,
    TEST_THREW_EXCEPTION,
    TEST_DID_NOT_DIE
  };

  // Assumes one of the above roles.
  virtual TestRole AssumeRole() = 0;

  // Waits for the death test to finish and returns its status.
  virtual int Wait() = 0;

  // Returns true if the death test passed; that is, the test process
  // exited during the test, its exit status matches a user-supplied
  // predicate, and its stderr output matches a user-supplied regular
  // expression.
  // The user-supplied predicate may be a macro expression rather
  // than a function pointer or functor, or else Wait and Passed could
  // be combined.
  virtual bool Passed(bool exit_status_ok) = 0;

  // Signals that the death test did not die as expected.
  virtual void Abort(AbortReason reason) = 0;

  // Returns a human-readable outcome message regarding the outcome of
  // the last death test.
  static const char* LastMessage();

  static void set_last_death_test_message(const std::string& message);

 private:
  // A string containing a description of the outcome of the last death test.
  static std::string last_death_test_message_;

  DeathTest(const DeathTest&) = delete;
  DeathTest& operator=(const DeathTest&) = delete;
};

GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251

// Factory interface for death tests.  May be mocked out for testing.
class DeathTestFactory {
 public:
  virtual ~DeathTestFactory() {}
  virtual bool Create(const char* statement,
                      Matcher<const std::string&> matcher, const char* file,
                      int line, DeathTest** test) = 0;
};

// A concrete DeathTestFactory implementation for normal use.
class DefaultDeathTestFactory : public DeathTestFactory {
 public:
  bool Create(const char* statement, Matcher<const std::string&> matcher,
              const char* file, int line, DeathTest** test) override;
};

// Returns true if exit_status describes a process that was terminated
// by a signal, or exited normally with a nonzero exit code.
GTEST_API_ bool ExitedUnsuccessfully(int exit_status);

// A string passed to EXPECT_DEATH (etc.) is caught by one of these overloads
// and interpreted as a regex (rather than an Eq matcher) for legacy
// compatibility.
inline Matcher<const ::std::string&> MakeDeathTestMatcher(
    ::testing::internal::RE regex) {
  return ContainsRegex(regex.pattern());
}
inline Matcher<const ::std::string&> MakeDeathTestMatcher(const char* regex) {
  return ContainsRegex(regex);
}
inline Matcher<const ::std::string&> MakeDeathTestMatcher(
    const ::std::string& regex) {
  return ContainsRegex(regex);
}

// If a Matcher<const ::std::string&> is passed to EXPECT_DEATH (etc.), it's
// used directly.
inline Matcher<const ::std::string&> MakeDeathTestMatcher(
    Matcher<const ::std::string&> matcher) {
  return matcher;
}

// Traps C++ exceptions escaping statement and reports them as test
// failures. Note that trapping SEH exceptions is not implemented here.
#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_EXCEPTIONS
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 197 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-death-test-internal.h"
#define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test)           \
  try {                                                                      \
    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement);               \
  } catch (const ::std::exception& gtest_exception) {                        \
    fprintf(                                                                 \
        stderr,                                                              \
        "\n%s: Caught std::exception-derived exception escaping the "        \
        "death test statement. Exception message: %s\n",                     \
        ::testing::internal::FormatFileLocation(__FILE__, __LINE__).c_str(), \
        gtest_exception.what());                                             \
    fflush(stderr);                                                          \
    death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
  } catch (...) {                                                            \
    death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
  }

#else
# 214 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-death-test-internal.h"
#define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \
  GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)

#endif
# 218 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-death-test-internal.h"

// This macro is for implementing ASSERT_DEATH*, EXPECT_DEATH*,
// ASSERT_EXIT*, and EXPECT_EXIT*.
#define GTEST_DEATH_TEST_(statement, predicate, regex_or_matcher, fail)        \
  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                                \
  if (::testing::internal::AlwaysTrue()) {                                     \
    ::testing::internal::DeathTest* gtest_dt;                                  \
    if (!::testing::internal::DeathTest::Create(                               \
            #statement,                                                        \
            ::testing::internal::MakeDeathTestMatcher(regex_or_matcher),       \
            __FILE__, __LINE__, &gtest_dt)) {                                  \
      goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__);                        \
    }                                                                          \
    if (gtest_dt != nullptr) {                                                 \
      std::unique_ptr< ::testing::internal::DeathTest> gtest_dt_ptr(gtest_dt); \
      switch (gtest_dt->AssumeRole()) {                                        \
        case ::testing::internal::DeathTest::OVERSEE_TEST:                     \
          if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) {                \
            goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__);                  \
          }                                                                    \
          break;                                                               \
        case ::testing::internal::DeathTest::EXECUTE_TEST: {                   \
          ::testing::internal::DeathTest::ReturnSentinel gtest_sentinel(       \
              gtest_dt);                                                       \
          GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, gtest_dt);            \
          gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE);   \
          break;                                                               \
        }                                                                      \
      }                                                                        \
    }                                                                          \
  } else                                                                       \
    GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__)                                \
        : fail(::testing::internal::DeathTest::LastMessage())
// The symbol "fail" here expands to something into which a message
// can be streamed.

// This macro is for implementing ASSERT/EXPECT_DEBUG_DEATH when compiled in
// NDEBUG mode. In this case we need the statements to be executed and the macro
// must accept a streamed message even though the message is never printed.
// The regex object is not evaluated, but it is used to prevent "unused"
// warnings and to avoid an expression that doesn't compile in debug mode.
#define GTEST_EXECUTE_STATEMENT_(statement, regex_or_matcher)    \
  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                  \
  if (::testing::internal::AlwaysTrue()) {                       \
    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement);   \
  } else if (!::testing::internal::AlwaysTrue()) {               \
    ::testing::internal::MakeDeathTestMatcher(regex_or_matcher); \
  } else                                                         \
    ::testing::Message()

// A class representing the parsed contents of the
// --gtest_internal_run_death_test flag, as it existed when
// RUN_ALL_TESTS was called.
class InternalRunDeathTestFlag {
 public:
  InternalRunDeathTestFlag(const std::string& a_file, int a_line, int an_index,
                           int a_write_fd)
      : file_(a_file), line_(a_line), index_(an_index), write_fd_(a_write_fd) {}

  ~InternalRunDeathTestFlag() {
    if (write_fd_ >= 0) posix::Close(write_fd_);
  }

  const std::string& file() const { return file_; }
  int line() const { return line_; }
  int index() const { return index_; }
  int write_fd() const { return write_fd_; }

 private:
  std::string file_;
  int line_;
  int index_;
  int write_fd_;

  InternalRunDeathTestFlag(const InternalRunDeathTestFlag&) = delete;
  InternalRunDeathTestFlag& operator=(const InternalRunDeathTestFlag&) = delete;
};

// Returns a newly created InternalRunDeathTestFlag object with fields
// initialized from the GTEST_FLAG(internal_run_death_test) flag if
// the flag is specified; otherwise returns NULL.
InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag();

#endif  // GTEST_HAS_DEATH_TEST
# 302 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-death-test-internal.h"

}  // namespace internal
}  // namespace testing

#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
# 307 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-death-test-internal.h"
#endif /* gtest-death-test-internal.h expanded by -frewrite-includes */
# 44 "../../third_party/googletest/src/googletest/include/gtest/gtest-death-test.h" 2

// This flag controls the style of death tests.  Valid values are "threadsafe",
// meaning that the death test child process will re-execute the test binary
// from the start, running only a single death test, or "fast",
// meaning that the child process will execute the test logic immediately
// after forking.
GTEST_DECLARE_string_(death_test_style);

namespace testing {

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_DEATH_TEST
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 55 "../../third_party/googletest/src/googletest/include/gtest/gtest-death-test.h"

namespace internal {

// Returns a Boolean value indicating whether the caller is currently
// executing in the context of the death test child process.  Tools such as
// Valgrind heap checkers may need this to modify their behavior in death
// tests.  IMPORTANT: This is an internal utility.  Using it may break the
// implementation of death tests.  User code MUST NOT use it.
GTEST_API_ bool InDeathTestChild();

}  // namespace internal

// The following macros are useful for writing death tests.

// Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is
// executed:
//
//   1. It generates a warning if there is more than one active
//   thread.  This is because it's safe to fork() or clone() only
//   when there is a single thread.
//
//   2. The parent process clone()s a sub-process and runs the death
//   test in it; the sub-process exits with code 0 at the end of the
//   death test, if it hasn't exited already.
//
//   3. The parent process waits for the sub-process to terminate.
//
//   4. The parent process checks the exit code and error message of
//   the sub-process.
//
// Examples:
//
//   ASSERT_DEATH(server.SendMessage(56, "Hello"), "Invalid port number");
//   for (int i = 0; i < 5; i++) {
//     EXPECT_DEATH(server.ProcessRequest(i),
//                  "Invalid request .* in ProcessRequest()")
//                  << "Failed to die on request " << i;
//   }
//
//   ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting");
//
//   bool KilledBySIGHUP(int exit_code) {
//     return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP;
//   }
//
//   ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, "Hanging up!");
//
// The final parameter to each of these macros is a matcher applied to any data
// the sub-process wrote to stderr.  For compatibility with existing tests, a
// bare string is interpreted as a regular expression matcher.
//
// On the regular expressions used in death tests:
//
//   On POSIX-compliant systems (*nix), we use the <regex.h> library,
//   which uses the POSIX extended regex syntax.
//
//   On other platforms (e.g. Windows or Mac), we only support a simple regex
//   syntax implemented as part of Google Test.  This limited
//   implementation should be enough most of the time when writing
//   death tests; though it lacks many features you can find in PCRE
//   or POSIX extended regex syntax.  For example, we don't support
//   union ("x|y"), grouping ("(xy)"), brackets ("[xy]"), and
//   repetition count ("x{5,7}"), among others.
//
//   Below is the syntax that we do support.  We chose it to be a
//   subset of both PCRE and POSIX extended regex, so it's easy to
//   learn wherever you come from.  In the following: 'A' denotes a
//   literal character, period (.), or a single \\ escape sequence;
//   'x' and 'y' denote regular expressions; 'm' and 'n' are for
//   natural numbers.
//
//     c     matches any literal character c
//     \\d   matches any decimal digit
//     \\D   matches any character that's not a decimal digit
//     \\f   matches \f
//     \\n   matches \n
//     \\r   matches \r
//     \\s   matches any ASCII whitespace, including \n
//     \\S   matches any character that's not a whitespace
//     \\t   matches \t
//     \\v   matches \v
//     \\w   matches any letter, _, or decimal digit
//     \\W   matches any character that \\w doesn't match
//     \\c   matches any literal character c, which must be a punctuation
//     .     matches any single character except \n
//     A?    matches 0 or 1 occurrences of A
//     A*    matches 0 or many occurrences of A
//     A+    matches 1 or many occurrences of A
//     ^     matches the beginning of a string (not that of each line)
//     $     matches the end of a string (not that of each line)
//     xy    matches x followed by y
//
//   If you accidentally use PCRE or POSIX extended regex features
//   not implemented by us, you will get a run-time failure.  In that
//   case, please try to rewrite your regular expression within the
//   above syntax.
//
//   This implementation is *not* meant to be as highly tuned or robust
//   as a compiled regex library, but should perform well enough for a
//   death test, which already incurs significant overhead by launching
//   a child process.
//
// Known caveats:
//
//   A "threadsafe" style death test obtains the path to the test
//   program from argv[0] and re-executes it in the sub-process.  For
//   simplicity, the current implementation doesn't search the PATH
//   when launching the sub-process.  This means that the user must
//   invoke the test program via a path that contains at least one
//   path separator (e.g. path/to/foo_test and
//   /absolute/path/to/bar_test are fine, but foo_test is not).  This
//   is rarely a problem as people usually don't put the test binary
//   directory in PATH.
//

// Asserts that a given `statement` causes the program to exit, with an
// integer exit status that satisfies `predicate`, and emitting error output
// that matches `matcher`.
#define ASSERT_EXIT(statement, predicate, matcher) \
  GTEST_DEATH_TEST_(statement, predicate, matcher, GTEST_FATAL_FAILURE_)

// Like `ASSERT_EXIT`, but continues on to successive tests in the
// test suite, if any:
#define EXPECT_EXIT(statement, predicate, matcher) \
  GTEST_DEATH_TEST_(statement, predicate, matcher, GTEST_NONFATAL_FAILURE_)

// Asserts that a given `statement` causes the program to exit, either by
// explicitly exiting with a nonzero exit code or being killed by a
// signal, and emitting error output that matches `matcher`.
#define ASSERT_DEATH(statement, matcher) \
  ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, matcher)

// Like `ASSERT_DEATH`, but continues on to successive tests in the
// test suite, if any:
#define EXPECT_DEATH(statement, matcher) \
  EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, matcher)

// Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*:

// Tests that an exit code describes a normal exit with a given exit code.
class GTEST_API_ ExitedWithCode {
 public:
  explicit ExitedWithCode(int exit_code);
  ExitedWithCode(const ExitedWithCode&) = default;
  void operator=(const ExitedWithCode& other) = delete;
  bool operator()(int exit_status) const;

 private:
  const int exit_code_;
};

#if 0 /* disabled by -frewrite-includes */
#if !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 207 "../../third_party/googletest/src/googletest/include/gtest/gtest-death-test.h"
// Tests that an exit code describes an exit due to termination by a
// given signal.
class GTEST_API_ KilledBySignal {
 public:
  explicit KilledBySignal(int signum);
  bool operator()(int exit_status) const;

 private:
  const int signum_;
};
#endif  // !GTEST_OS_WINDOWS
# 218 "../../third_party/googletest/src/googletest/include/gtest/gtest-death-test.h"

// EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode.
// The death testing framework causes this to have interesting semantics,
// since the sideeffects of the call are only visible in opt mode, and not
// in debug mode.
//
// In practice, this can be used to test functions that utilize the
// LOG(DFATAL) macro using the following style:
//
// int DieInDebugOr12(int* sideeffect) {
//   if (sideeffect) {
//     *sideeffect = 12;
//   }
//   LOG(DFATAL) << "death";
//   return 12;
// }
//
// TEST(TestSuite, TestDieOr12WorksInDgbAndOpt) {
//   int sideeffect = 0;
//   // Only asserts in dbg.
//   EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), "death");
//
// #ifdef NDEBUG
//   // opt-mode has sideeffect visible.
//   EXPECT_EQ(12, sideeffect);
// #else
//   // dbg-mode no visible sideeffect.
//   EXPECT_EQ(0, sideeffect);
// #endif
// }
//
// This will assert that DieInDebugReturn12InOpt() crashes in debug
// mode, usually due to a DCHECK or LOG(DFATAL), but returns the
// appropriate fallback value (12 in this case) in opt mode. If you
// need to test that a function has appropriate side-effects in opt
// mode, include assertions against the side-effects.  A general
// pattern for this is:
//
// EXPECT_DEBUG_DEATH({
//   // Side-effects here will have an effect after this statement in
//   // opt mode, but none in debug mode.
//   EXPECT_EQ(12, DieInDebugOr12(&sideeffect));
// }, "death");
//
#ifdef NDEBUG

#define EXPECT_DEBUG_DEATH(statement, regex) \
  GTEST_EXECUTE_STATEMENT_(statement, regex)

#define ASSERT_DEBUG_DEATH(statement, regex) \
  GTEST_EXECUTE_STATEMENT_(statement, regex)

#else
# 271 "../../third_party/googletest/src/googletest/include/gtest/gtest-death-test.h"

#define EXPECT_DEBUG_DEATH(statement, regex) EXPECT_DEATH(statement, regex)

#define ASSERT_DEBUG_DEATH(statement, regex) ASSERT_DEATH(statement, regex)

#endif  // NDEBUG for EXPECT_DEBUG_DEATH
# 277 "../../third_party/googletest/src/googletest/include/gtest/gtest-death-test.h"
#endif  // GTEST_HAS_DEATH_TEST
# 278 "../../third_party/googletest/src/googletest/include/gtest/gtest-death-test.h"

// This macro is used for implementing macros such as
// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where
// death tests are not supported. Those macros must compile on such systems
// if and only if EXPECT_DEATH and ASSERT_DEATH compile with the same parameters
// on systems that support death tests. This allows one to write such a macro on
// a system that does not support death tests and be sure that it will compile
// on a death-test supporting system. It is exposed publicly so that systems
// that have death-tests with stricter requirements than GTEST_HAS_DEATH_TEST
// can write their own equivalent of EXPECT_DEATH_IF_SUPPORTED and
// ASSERT_DEATH_IF_SUPPORTED.
//
// Parameters:
//   statement -  A statement that a macro such as EXPECT_DEATH would test
//                for program termination. This macro has to make sure this
//                statement is compiled but not executed, to ensure that
//                EXPECT_DEATH_IF_SUPPORTED compiles with a certain
//                parameter if and only if EXPECT_DEATH compiles with it.
//   regex     -  A regex that a macro such as EXPECT_DEATH would use to test
//                the output of statement.  This parameter has to be
//                compiled but not evaluated by this macro, to ensure that
//                this macro only accepts expressions that a macro such as
//                EXPECT_DEATH would accept.
//   terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED
//                and a return statement for ASSERT_DEATH_IF_SUPPORTED.
//                This ensures that ASSERT_DEATH_IF_SUPPORTED will not
//                compile inside functions where ASSERT_DEATH doesn't
//                compile.
//
//  The branch that has an always false condition is used to ensure that
//  statement and regex are compiled (and thus syntactically correct) but
//  never executed. The unreachable code macro protects the terminator
//  statement from generating an 'unreachable code' warning in case
//  statement unconditionally returns or throws. The Message constructor at
//  the end allows the syntax of streaming additional messages into the
//  macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH.
#define GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, terminator)             \
  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                                \
  if (::testing::internal::AlwaysTrue()) {                                     \
    GTEST_LOG_(WARNING) << "Death tests are not supported on this platform.\n" \
                        << "Statement '" #statement "' cannot be verified.";   \
  } else if (::testing::internal::AlwaysFalse()) {                             \
    ::testing::internal::RE::PartialMatch(".*", (regex));                      \
    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement);                 \
    terminator;                                                                \
  } else                                                                       \
    ::testing::Message()

// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
// death tests are supported; otherwise they just issue a warning.  This is
// useful when you are combining death test assertions with normal test
// assertions in one test.
#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_DEATH_TEST
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 332 "../../third_party/googletest/src/googletest/include/gtest/gtest-death-test.h"
#define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
  EXPECT_DEATH(statement, regex)
#define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
  ASSERT_DEATH(statement, regex)
#else
# 337 "../../third_party/googletest/src/googletest/include/gtest/gtest-death-test.h"
#define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
  GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, )
#define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
  GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, return)
#endif
# 342 "../../third_party/googletest/src/googletest/include/gtest/gtest-death-test.h"

}  // namespace testing

#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
# 346 "../../third_party/googletest/src/googletest/include/gtest/gtest-death-test.h"
#endif /* gtest-death-test.h expanded by -frewrite-includes */
# 61 "../../third_party/googletest/src/googletest/include/gtest/gtest.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "gtest/gtest-matchers.h"
#endif /* expanded by -frewrite-includes */
# 61 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 62 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#if 0 /* expanded by -frewrite-includes */
#include "gtest/gtest-message.h"
#endif /* expanded by -frewrite-includes */
# 62 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 63 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-param-test.h expanded by -frewrite-includes */
#include "gtest/gtest-param-test.h"
#else /* gtest-param-test.h expanded by -frewrite-includes */
# 63 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/gtest-param-test.h" 1
// Copyright 2008, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// Macros and functions for implementing parameterized tests
// in Google C++ Testing and Mocking Framework (Google Test)

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
#define GOOGLETEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_

// Value-parameterized tests allow you to test your code with different
// parameters without writing multiple copies of the same test.
//
// Here is how you use value-parameterized tests:

#if 0 /* disabled by -frewrite-includes */
#if 0
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 46 "../../third_party/googletest/src/googletest/include/gtest/gtest-param-test.h"

// To write value-parameterized tests, first you should define a fixture
// class. It is usually derived from testing::TestWithParam<T> (see below for
// another inheritance scheme that's sometimes useful in more complicated
// class hierarchies), where the type of your parameter values.
// TestWithParam<T> is itself derived from testing::Test. T can be any
// copyable type. If it's a raw pointer, you are responsible for managing the
// lifespan of the pointed values.

class FooTest : public ::testing::TestWithParam<const char*> {
  // You can implement all the usual class fixture members here.
};

// Then, use the TEST_P macro to define as many parameterized tests
// for this fixture as you want. The _P suffix is for "parameterized"
// or "pattern", whichever you prefer to think.

TEST_P(FooTest, DoesBlah) {
  // Inside a test, access the test parameter with the GetParam() method
  // of the TestWithParam<T> class:
  EXPECT_TRUE(foo.Blah(GetParam()));
  ...
}

TEST_P(FooTest, HasBlahBlah) {
  ...
}

// Finally, you can use INSTANTIATE_TEST_SUITE_P to instantiate the test
// case with any set of parameters you want. Google Test defines a number
// of functions for generating test parameters. They return what we call
// (surprise!) parameter generators. Here is a summary of them, which
// are all in the testing namespace:
//
//
//  Range(begin, end [, step]) - Yields values {begin, begin+step,
//                               begin+step+step, ...}. The values do not
//                               include end. step defaults to 1.
//  Values(v1, v2, ..., vN)    - Yields values {v1, v2, ..., vN}.
//  ValuesIn(container)        - Yields values from a C-style array, an STL
//  ValuesIn(begin,end)          container, or an iterator range [begin, end).
//  Bool()                     - Yields sequence {false, true}.
//  Combine(g1, g2, ..., gN)   - Yields all combinations (the Cartesian product
//                               for the math savvy) of the values generated
//                               by the N generators.
//
// For more details, see comments at the definitions of these functions below
// in this file.
//
// The following statement will instantiate tests from the FooTest test suite
// each with parameter values "meeny", "miny", and "moe".

INSTANTIATE_TEST_SUITE_P(InstantiationName,
                         FooTest,
                         Values("meeny", "miny", "moe"));

// To distinguish different instances of the pattern, (yes, you
// can instantiate it more than once) the first argument to the
// INSTANTIATE_TEST_SUITE_P macro is a prefix that will be added to the
// actual test suite name. Remember to pick unique prefixes for different
// instantiations. The tests from the instantiation above will have
// these names:
//
//    * InstantiationName/FooTest.DoesBlah/0 for "meeny"
//    * InstantiationName/FooTest.DoesBlah/1 for "miny"
//    * InstantiationName/FooTest.DoesBlah/2 for "moe"
//    * InstantiationName/FooTest.HasBlahBlah/0 for "meeny"
//    * InstantiationName/FooTest.HasBlahBlah/1 for "miny"
//    * InstantiationName/FooTest.HasBlahBlah/2 for "moe"
//
// You can use these names in --gtest_filter.
//
// This statement will instantiate all tests from FooTest again, each
// with parameter values "cat" and "dog":

const char* pets[] = {"cat", "dog"};
INSTANTIATE_TEST_SUITE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));

// The tests from the instantiation above will have these names:
//
//    * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat"
//    * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog"
//    * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat"
//    * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog"
//
// Please note that INSTANTIATE_TEST_SUITE_P will instantiate all tests
// in the given test suite, whether their definitions come before or
// AFTER the INSTANTIATE_TEST_SUITE_P statement.
//
// Please also note that generator expressions (including parameters to the
// generators) are evaluated in InitGoogleTest(), after main() has started.
// This allows the user on one hand, to adjust generator parameters in order
// to dynamically determine a set of tests to run and on the other hand,
// give the user a chance to inspect the generated tests with Google Test
// reflection API before RUN_ALL_TESTS() is executed.
//
// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc
// for more examples.
//
// In the future, we plan to publish the API for defining new parameter
// generators. But for now this interface remains part of the internal
// implementation and is subject to change.
//
//
// A parameterized test fixture must be derived from testing::Test and from
// testing::WithParamInterface<T>, where T is the type of the parameter
// values. Inheriting from TestWithParam<T> satisfies that requirement because
// TestWithParam<T> inherits from both Test and WithParamInterface. In more
// complicated hierarchies, however, it is occasionally useful to inherit
// separately from Test and WithParamInterface. For example:

class BaseTest : public ::testing::Test {
  // You can inherit all the usual members for a non-parameterized test
  // fixture here.
};

class DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {
  // The usual test fixture members go here too.
};

TEST_F(BaseTest, HasFoo) {
  // This is an ordinary non-parameterized test.
}

TEST_P(DerivedTest, DoesBlah) {
  // GetParam works just the same here as if you inherit from TestWithParam.
  EXPECT_TRUE(foo.Blah(GetParam()));
}

#endif  // 0
# 176 "../../third_party/googletest/src/googletest/include/gtest/gtest-param-test.h"

#if 0 /* expanded by -frewrite-includes */
#include <iterator>
#endif /* expanded by -frewrite-includes */
# 177 "../../third_party/googletest/src/googletest/include/gtest/gtest-param-test.h"
# 178 "../../third_party/googletest/src/googletest/include/gtest/gtest-param-test.h"
#if 0 /* expanded by -frewrite-includes */
#include <utility>
#endif /* expanded by -frewrite-includes */
# 178 "../../third_party/googletest/src/googletest/include/gtest/gtest-param-test.h"
# 179 "../../third_party/googletest/src/googletest/include/gtest/gtest-param-test.h"

#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-internal.h"
#endif /* expanded by -frewrite-includes */
# 180 "../../third_party/googletest/src/googletest/include/gtest/gtest-param-test.h"
# 181 "../../third_party/googletest/src/googletest/include/gtest/gtest-param-test.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-param-util.h expanded by -frewrite-includes */
#include "gtest/internal/gtest-param-util.h"
#else /* gtest-param-util.h expanded by -frewrite-includes */
# 181 "../../third_party/googletest/src/googletest/include/gtest/gtest-param-test.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h" 1
// Copyright 2008 Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// Type and function utilities for implementing parameterized tests.

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_

#if 0 /* expanded by -frewrite-includes */
#include <ctype.h>
#endif /* expanded by -frewrite-includes */
# 39 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
# 40 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"

#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cassert expanded by -frewrite-includes */
#include <cassert>
#else /* cassert expanded by -frewrite-includes */
# 41 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
# 1 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 1 3
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

/*
    cassert synopsis

Macros:

    assert

*/

#if 0 /* expanded by -frewrite-includes */
#include <__assert> // all public C++ headers provide the assertion handler
#endif /* expanded by -frewrite-includes */
# 19 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#if 0 /* expanded by -frewrite-includes */
#include <__config>
#endif /* expanded by -frewrite-includes */
# 20 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
# 21 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3

// <assert.h> is not provided by libc++
#if 0 /* disabled by -frewrite-includes */
#if __has_include(<assert.h>)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* assert.h expanded by -frewrite-includes */
#  include <assert.h>
#else /* assert.h expanded by -frewrite-includes */
# 24 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
# 1 "gen/zircon/public/sysroot/cpp/include/assert.h" 1 3 4
#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 1 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
# 2 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

#undef assert

#ifdef NDEBUG
#define assert(x) (void)0
#else
# 8 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__), 0)))
#endif
# 10 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

#if 0 /* disabled by -frewrite-includes */
#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus) && !defined(static_assert)
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 12 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
#define static_assert _Static_assert
#endif
# 14 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

#ifdef __cplusplus
extern "C" {
#endif
# 18 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4

void __assert_fail(const char*, const char*, int, const char*);

#ifdef __cplusplus
}
#endif
# 24 "gen/zircon/public/sysroot/cpp/include/assert.h" 3 4
#endif /* assert.h expanded by -frewrite-includes */
# 25 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 2 3
#  ifdef _LIBCPP_ASSERT_H
#    error "If libc++ starts defining <assert.h>, the __has_include check should move to libc++'s <assert.h>"
#  endif
# 28 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#endif
# 29 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3

#if 0 /* disabled by -frewrite-includes */
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 31 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#if 0 /* expanded by -frewrite-includes */
#  pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 32 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#endif
# 33 "../../prebuilt/third_party/clang/custom/bin/../include/c++/v1/cassert" 3
#endif /* cassert expanded by -frewrite-includes */
# 42 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <iterator>
#endif /* expanded by -frewrite-includes */
# 42 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
# 43 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
#if 0 /* expanded by -frewrite-includes */
#include <memory>
#endif /* expanded by -frewrite-includes */
# 43 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
# 44 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
#if 0 /* expanded by -frewrite-includes */
#include <set>
#endif /* expanded by -frewrite-includes */
# 44 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
# 45 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 45 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
# 46 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 46 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
# 47 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
#if 0 /* expanded by -frewrite-includes */
#include <utility>
#endif /* expanded by -frewrite-includes */
# 47 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
# 48 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
#if 0 /* expanded by -frewrite-includes */
#include <vector>
#endif /* expanded by -frewrite-includes */
# 48 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
# 49 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"

#if 0 /* expanded by -frewrite-includes */
#include "gtest/gtest-printers.h"
#endif /* expanded by -frewrite-includes */
# 50 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
# 51 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-test-part.h expanded by -frewrite-includes */
#include "gtest/gtest-test-part.h"
#else /* gtest-test-part.h expanded by -frewrite-includes */
# 51 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/gtest-test-part.h" 1
// Copyright 2008, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
#define GOOGLETEST_INCLUDE_GTEST_GTEST_TEST_PART_H_

#if 0 /* expanded by -frewrite-includes */
#include <iosfwd>
#endif /* expanded by -frewrite-includes */
# 37 "../../third_party/googletest/src/googletest/include/gtest/gtest-test-part.h"
# 38 "../../third_party/googletest/src/googletest/include/gtest/gtest-test-part.h"
#if 0 /* expanded by -frewrite-includes */
#include <vector>
#endif /* expanded by -frewrite-includes */
# 38 "../../third_party/googletest/src/googletest/include/gtest/gtest-test-part.h"
# 39 "../../third_party/googletest/src/googletest/include/gtest/gtest-test-part.h"

#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-internal.h"
#endif /* expanded by -frewrite-includes */
# 40 "../../third_party/googletest/src/googletest/include/gtest/gtest-test-part.h"
# 41 "../../third_party/googletest/src/googletest/include/gtest/gtest-test-part.h"
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-string.h"
#endif /* expanded by -frewrite-includes */
# 41 "../../third_party/googletest/src/googletest/include/gtest/gtest-test-part.h"
# 42 "../../third_party/googletest/src/googletest/include/gtest/gtest-test-part.h"

GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
/* class A needs to have dll-interface to be used by clients of class B */)

namespace testing {

// A copyable object representing the result of a test part (i.e. an
// assertion or an explicit FAIL(), ADD_FAILURE(), or SUCCESS()).
//
// Don't inherit from TestPartResult as its destructor is not virtual.
class GTEST_API_ TestPartResult {
 public:
  // The possible outcomes of a test part (i.e. an assertion or an
  // explicit SUCCEED(), FAIL(), or ADD_FAILURE()).
  enum Type {
    kSuccess,          // Succeeded.
    kNonFatalFailure,  // Failed but the test can continue.
    kFatalFailure,     // Failed and the test should be terminated.
    kSkip              // Skipped.
  };

  // C'tor.  TestPartResult does NOT have a default constructor.
  // Always use this constructor (with parameters) to create a
  // TestPartResult object.
  TestPartResult(Type a_type, const char* a_file_name, int a_line_number,
                 const char* a_message)
      : type_(a_type),
        file_name_(a_file_name == nullptr ? "" : a_file_name),
        line_number_(a_line_number),
        summary_(ExtractSummary(a_message)),
        message_(a_message) {}

  // Gets the outcome of the test part.
  Type type() const { return type_; }

  // Gets the name of the source file where the test part took place, or
  // NULL if it's unknown.
  const char* file_name() const {
    return file_name_.empty() ? nullptr : file_name_.c_str();
  }

  // Gets the line in the source file where the test part took place,
  // or -1 if it's unknown.
  int line_number() const { return line_number_; }

  // Gets the summary of the failure message.
  const char* summary() const { return summary_.c_str(); }

  // Gets the message associated with the test part.
  const char* message() const { return message_.c_str(); }

  // Returns true if and only if the test part was skipped.
  bool skipped() const { return type_ == kSkip; }

  // Returns true if and only if the test part passed.
  bool passed() const { return type_ == kSuccess; }

  // Returns true if and only if the test part non-fatally failed.
  bool nonfatally_failed() const { return type_ == kNonFatalFailure; }

  // Returns true if and only if the test part fatally failed.
  bool fatally_failed() const { return type_ == kFatalFailure; }

  // Returns true if and only if the test part failed.
  bool failed() const { return fatally_failed() || nonfatally_failed(); }

 private:
  Type type_;

  // Gets the summary of the failure message by omitting the stack
  // trace in it.
  static std::string ExtractSummary(const char* message);

  // The name of the source file where the test part took place, or
  // "" if the source file is unknown.
  std::string file_name_;
  // The line in the source file where the test part took place, or -1
  // if the line number is unknown.
  int line_number_;
  std::string summary_;  // The test failure summary.
  std::string message_;  // The test failure message.
};

// Prints a TestPartResult object.
std::ostream& operator<<(std::ostream& os, const TestPartResult& result);

// An array of TestPartResult objects.
//
// Don't inherit from TestPartResultArray as its destructor is not
// virtual.
class GTEST_API_ TestPartResultArray {
 public:
  TestPartResultArray() {}

  // Appends the given TestPartResult to the array.
  void Append(const TestPartResult& result);

  // Returns the TestPartResult at the given index (0-based).
  const TestPartResult& GetTestPartResult(int index) const;

  // Returns the number of TestPartResult objects in the array.
  int size() const;

 private:
  std::vector<TestPartResult> array_;

  TestPartResultArray(const TestPartResultArray&) = delete;
  TestPartResultArray& operator=(const TestPartResultArray&) = delete;
};

// This interface knows how to report a test part result.
class GTEST_API_ TestPartResultReporterInterface {
 public:
  virtual ~TestPartResultReporterInterface() {}

  virtual void ReportTestPartResult(const TestPartResult& result) = 0;
};

namespace internal {

// This helper class is used by {ASSERT|EXPECT}_NO_FATAL_FAILURE to check if a
// statement generates new fatal failures. To do so it registers itself as the
// current test part result reporter. Besides checking if fatal failures were
// reported, it only delegates the reporting to the former result reporter.
// The original result reporter is restored in the destructor.
// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
class GTEST_API_ HasNewFatalFailureHelper
    : public TestPartResultReporterInterface {
 public:
  HasNewFatalFailureHelper();
  ~HasNewFatalFailureHelper() override;
  void ReportTestPartResult(const TestPartResult& result) override;
  bool has_new_fatal_failure() const { return has_new_fatal_failure_; }

 private:
  bool has_new_fatal_failure_;
  TestPartResultReporterInterface* original_reporter_;

  HasNewFatalFailureHelper(const HasNewFatalFailureHelper&) = delete;
  HasNewFatalFailureHelper& operator=(const HasNewFatalFailureHelper&) = delete;
};

}  // namespace internal

}  // namespace testing

GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251

#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
# 191 "../../third_party/googletest/src/googletest/include/gtest/gtest-test-part.h"
#endif /* gtest-test-part.h expanded by -frewrite-includes */
# 52 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-internal.h"
#endif /* expanded by -frewrite-includes */
# 52 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
# 53 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-port.h"
#endif /* expanded by -frewrite-includes */
# 53 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
# 54 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"

namespace testing {
// Input to a parameterized test name generator, describing a test parameter.
// Consists of the parameter value and the integer parameter index.
template <class ParamType>
struct TestParamInfo {
  TestParamInfo(const ParamType& a_param, size_t an_index)
      : param(a_param), index(an_index) {}
  ParamType param;
  size_t index;
};

// A builtin parameterized test name generator which returns the result of
// testing::PrintToString.
struct PrintToStringParamName {
  template <class ParamType>
  std::string operator()(const TestParamInfo<ParamType>& info) const {
    return PrintToString(info.param);
  }
};

namespace internal {

// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
// Utility Functions

// Outputs a message explaining invalid registration of different
// fixture class for the same test suite. This may happen when
// TEST_P macro is used to define two tests with the same name
// but in different namespaces.
GTEST_API_ void ReportInvalidTestSuiteType(const char* test_suite_name,
                                           CodeLocation code_location);

template <typename>
class ParamGeneratorInterface;
template <typename>
class ParamGenerator;

// Interface for iterating over elements provided by an implementation
// of ParamGeneratorInterface<T>.
template <typename T>
class ParamIteratorInterface {
 public:
  virtual ~ParamIteratorInterface() {}
  // A pointer to the base generator instance.
  // Used only for the purposes of iterator comparison
  // to make sure that two iterators belong to the same generator.
  virtual const ParamGeneratorInterface<T>* BaseGenerator() const = 0;
  // Advances iterator to point to the next element
  // provided by the generator. The caller is responsible
  // for not calling Advance() on an iterator equal to
  // BaseGenerator()->End().
  virtual void Advance() = 0;
  // Clones the iterator object. Used for implementing copy semantics
  // of ParamIterator<T>.
  virtual ParamIteratorInterface* Clone() const = 0;
  // Dereferences the current iterator and provides (read-only) access
  // to the pointed value. It is the caller's responsibility not to call
  // Current() on an iterator equal to BaseGenerator()->End().
  // Used for implementing ParamGenerator<T>::operator*().
  virtual const T* Current() const = 0;
  // Determines whether the given iterator and other point to the same
  // element in the sequence generated by the generator.
  // Used for implementing ParamGenerator<T>::operator==().
  virtual bool Equals(const ParamIteratorInterface& other) const = 0;
};

// Class iterating over elements provided by an implementation of
// ParamGeneratorInterface<T>. It wraps ParamIteratorInterface<T>
// and implements the const forward iterator concept.
template <typename T>
class ParamIterator {
 public:
  typedef T value_type;
  typedef const T& reference;
  typedef ptrdiff_t difference_type;

  // ParamIterator assumes ownership of the impl_ pointer.
  ParamIterator(const ParamIterator& other) : impl_(other.impl_->Clone()) {}
  ParamIterator& operator=(const ParamIterator& other) {
    if (this != &other) impl_.reset(other.impl_->Clone());
    return *this;
  }

  const T& operator*() const { return *impl_->Current(); }
  const T* operator->() const { return impl_->Current(); }
  // Prefix version of operator++.
  ParamIterator& operator++() {
    impl_->Advance();
    return *this;
  }
  // Postfix version of operator++.
  ParamIterator operator++(int /*unused*/) {
    ParamIteratorInterface<T>* clone = impl_->Clone();
    impl_->Advance();
    return ParamIterator(clone);
  }
  bool operator==(const ParamIterator& other) const {
    return impl_.get() == other.impl_.get() || impl_->Equals(*other.impl_);
  }
  bool operator!=(const ParamIterator& other) const {
    return !(*this == other);
  }

 private:
  friend class ParamGenerator<T>;
  explicit ParamIterator(ParamIteratorInterface<T>* impl) : impl_(impl) {}
  std::unique_ptr<ParamIteratorInterface<T>> impl_;
};

// ParamGeneratorInterface<T> is the binary interface to access generators
// defined in other translation units.
template <typename T>
class ParamGeneratorInterface {
 public:
  typedef T ParamType;

  virtual ~ParamGeneratorInterface() {}

  // Generator interface definition
  virtual ParamIteratorInterface<T>* Begin() const = 0;
  virtual ParamIteratorInterface<T>* End() const = 0;
};

// Wraps ParamGeneratorInterface<T> and provides general generator syntax
// compatible with the STL Container concept.
// This class implements copy initialization semantics and the contained
// ParamGeneratorInterface<T> instance is shared among all copies
// of the original object. This is possible because that instance is immutable.
template <typename T>
class ParamGenerator {
 public:
  typedef ParamIterator<T> iterator;

  explicit ParamGenerator(ParamGeneratorInterface<T>* impl) : impl_(impl) {}
  ParamGenerator(const ParamGenerator& other) : impl_(other.impl_) {}

  ParamGenerator& operator=(const ParamGenerator& other) {
    impl_ = other.impl_;
    return *this;
  }

  iterator begin() const { return iterator(impl_->Begin()); }
  iterator end() const { return iterator(impl_->End()); }

 private:
  std::shared_ptr<const ParamGeneratorInterface<T>> impl_;
};

// Generates values from a range of two comparable values. Can be used to
// generate sequences of user-defined types that implement operator+() and
// operator<().
// This class is used in the Range() function.
template <typename T, typename IncrementT>
class RangeGenerator : public ParamGeneratorInterface<T> {
 public:
  RangeGenerator(T begin, T end, IncrementT step)
      : begin_(begin),
        end_(end),
        step_(step),
        end_index_(CalculateEndIndex(begin, end, step)) {}
  ~RangeGenerator() override {}

  ParamIteratorInterface<T>* Begin() const override {
    return new Iterator(this, begin_, 0, step_);
  }
  ParamIteratorInterface<T>* End() const override {
    return new Iterator(this, end_, end_index_, step_);
  }

 private:
  class Iterator : public ParamIteratorInterface<T> {
   public:
    Iterator(const ParamGeneratorInterface<T>* base, T value, int index,
             IncrementT step)
        : base_(base), value_(value), index_(index), step_(step) {}
    ~Iterator() override {}

    const ParamGeneratorInterface<T>* BaseGenerator() const override {
      return base_;
    }
    void Advance() override {
      value_ = static_cast<T>(value_ + step_);
      index_++;
    }
    ParamIteratorInterface<T>* Clone() const override {
      return new Iterator(*this);
    }
    const T* Current() const override { return &value_; }
    bool Equals(const ParamIteratorInterface<T>& other) const override {
      // Having the same base generator guarantees that the other
      // iterator is of the same type and we can downcast.
      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
          << "The program attempted to compare iterators "
          << "from different generators." << std::endl;
      const int other_index =
          CheckedDowncastToActualType<const Iterator>(&other)->index_;
      return index_ == other_index;
    }

   private:
    Iterator(const Iterator& other)
        : ParamIteratorInterface<T>(),
          base_(other.base_),
          value_(other.value_),
          index_(other.index_),
          step_(other.step_) {}

    // No implementation - assignment is unsupported.
    void operator=(const Iterator& other);

    const ParamGeneratorInterface<T>* const base_;
    T value_;
    int index_;
    const IncrementT step_;
  };  // class RangeGenerator::Iterator

  static int CalculateEndIndex(const T& begin, const T& end,
                               const IncrementT& step) {
    int end_index = 0;
    for (T i = begin; i < end; i = static_cast<T>(i + step)) end_index++;
    return end_index;
  }

  // No implementation - assignment is unsupported.
  void operator=(const RangeGenerator& other);

  const T begin_;
  const T end_;
  const IncrementT step_;
  // The index for the end() iterator. All the elements in the generated
  // sequence are indexed (0-based) to aid iterator comparison.
  const int end_index_;
};  // class RangeGenerator

// Generates values from a pair of STL-style iterators. Used in the
// ValuesIn() function. The elements are copied from the source range
// since the source can be located on the stack, and the generator
// is likely to persist beyond that stack frame.
template <typename T>
class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> {
 public:
  template <typename ForwardIterator>
  ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end)
      : container_(begin, end) {}
  ~ValuesInIteratorRangeGenerator() override {}

  ParamIteratorInterface<T>* Begin() const override {
    return new Iterator(this, container_.begin());
  }
  ParamIteratorInterface<T>* End() const override {
    return new Iterator(this, container_.end());
  }

 private:
  typedef typename ::std::vector<T> ContainerType;

  class Iterator : public ParamIteratorInterface<T> {
   public:
    Iterator(const ParamGeneratorInterface<T>* base,
             typename ContainerType::const_iterator iterator)
        : base_(base), iterator_(iterator) {}
    ~Iterator() override {}

    const ParamGeneratorInterface<T>* BaseGenerator() const override {
      return base_;
    }
    void Advance() override {
      ++iterator_;
      value_.reset();
    }
    ParamIteratorInterface<T>* Clone() const override {
      return new Iterator(*this);
    }
    // We need to use cached value referenced by iterator_ because *iterator_
    // can return a temporary object (and of type other then T), so just
    // having "return &*iterator_;" doesn't work.
    // value_ is updated here and not in Advance() because Advance()
    // can advance iterator_ beyond the end of the range, and we cannot
    // detect that fact. The client code, on the other hand, is
    // responsible for not calling Current() on an out-of-range iterator.
    const T* Current() const override {
      if (value_.get() == nullptr) value_.reset(new T(*iterator_));
      return value_.get();
    }
    bool Equals(const ParamIteratorInterface<T>& other) const override {
      // Having the same base generator guarantees that the other
      // iterator is of the same type and we can downcast.
      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
          << "The program attempted to compare iterators "
          << "from different generators." << std::endl;
      return iterator_ ==
             CheckedDowncastToActualType<const Iterator>(&other)->iterator_;
    }

   private:
    Iterator(const Iterator& other)
        // The explicit constructor call suppresses a false warning
        // emitted by gcc when supplied with the -Wextra option.
        : ParamIteratorInterface<T>(),
          base_(other.base_),
          iterator_(other.iterator_) {}

    const ParamGeneratorInterface<T>* const base_;
    typename ContainerType::const_iterator iterator_;
    // A cached value of *iterator_. We keep it here to allow access by
    // pointer in the wrapping iterator's operator->().
    // value_ needs to be mutable to be accessed in Current().
    // Use of std::unique_ptr helps manage cached value's lifetime,
    // which is bound by the lifespan of the iterator itself.
    mutable std::unique_ptr<const T> value_;
  };  // class ValuesInIteratorRangeGenerator::Iterator

  // No implementation - assignment is unsupported.
  void operator=(const ValuesInIteratorRangeGenerator& other);

  const ContainerType container_;
};  // class ValuesInIteratorRangeGenerator

// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
//
// Default parameterized test name generator, returns a string containing the
// integer test parameter index.
template <class ParamType>
std::string DefaultParamName(const TestParamInfo<ParamType>& info) {
  Message name_stream;
  name_stream << info.index;
  return name_stream.GetString();
}

template <typename T = int>
void TestNotEmpty() {
  static_assert(sizeof(T) == 0, "Empty arguments are not allowed.");
}
template <typename T = int>
void TestNotEmpty(const T&) {}

// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
//
// Stores a parameter value and later creates tests parameterized with that
// value.
template <class TestClass>
class ParameterizedTestFactory : public TestFactoryBase {
 public:
  typedef typename TestClass::ParamType ParamType;
  explicit ParameterizedTestFactory(ParamType parameter)
      : parameter_(parameter) {}
  Test* CreateTest() override {
    TestClass::SetParam(&parameter_);
    return new TestClass();
  }

 private:
  const ParamType parameter_;

  ParameterizedTestFactory(const ParameterizedTestFactory&) = delete;
  ParameterizedTestFactory& operator=(const ParameterizedTestFactory&) = delete;
};

// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
//
// TestMetaFactoryBase is a base class for meta-factories that create
// test factories for passing into MakeAndRegisterTestInfo function.
template <class ParamType>
class TestMetaFactoryBase {
 public:
  virtual ~TestMetaFactoryBase() {}

  virtual TestFactoryBase* CreateTestFactory(ParamType parameter) = 0;
};

// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
//
// TestMetaFactory creates test factories for passing into
// MakeAndRegisterTestInfo function. Since MakeAndRegisterTestInfo receives
// ownership of test factory pointer, same factory object cannot be passed
// into that method twice. But ParameterizedTestSuiteInfo is going to call
// it for each Test/Parameter value combination. Thus it needs meta factory
// creator class.
template <class TestSuite>
class TestMetaFactory
    : public TestMetaFactoryBase<typename TestSuite::ParamType> {
 public:
  using ParamType = typename TestSuite::ParamType;

  TestMetaFactory() {}

  TestFactoryBase* CreateTestFactory(ParamType parameter) override {
    return new ParameterizedTestFactory<TestSuite>(parameter);
  }

 private:
  TestMetaFactory(const TestMetaFactory&) = delete;
  TestMetaFactory& operator=(const TestMetaFactory&) = delete;
};

// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
//
// ParameterizedTestSuiteInfoBase is a generic interface
// to ParameterizedTestSuiteInfo classes. ParameterizedTestSuiteInfoBase
// accumulates test information provided by TEST_P macro invocations
// and generators provided by INSTANTIATE_TEST_SUITE_P macro invocations
// and uses that information to register all resulting test instances
// in RegisterTests method. The ParameterizeTestSuiteRegistry class holds
// a collection of pointers to the ParameterizedTestSuiteInfo objects
// and calls RegisterTests() on each of them when asked.
class ParameterizedTestSuiteInfoBase {
 public:
  virtual ~ParameterizedTestSuiteInfoBase() {}

  // Base part of test suite name for display purposes.
  virtual const std::string& GetTestSuiteName() const = 0;
  // Test suite id to verify identity.
  virtual TypeId GetTestSuiteTypeId() const = 0;
  // UnitTest class invokes this method to register tests in this
  // test suite right before running them in RUN_ALL_TESTS macro.
  // This method should not be called more than once on any single
  // instance of a ParameterizedTestSuiteInfoBase derived class.
  virtual void RegisterTests() = 0;

 protected:
  ParameterizedTestSuiteInfoBase() {}

 private:
  ParameterizedTestSuiteInfoBase(const ParameterizedTestSuiteInfoBase&) =
      delete;
  ParameterizedTestSuiteInfoBase& operator=(
      const ParameterizedTestSuiteInfoBase&) = delete;
};

// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
//
// Report a the name of a test_suit as safe to ignore
// as the side effect of construction of this type.
struct GTEST_API_ MarkAsIgnored {
  explicit MarkAsIgnored(const char* test_suite);
};

GTEST_API_ void InsertSyntheticTestCase(const std::string& name,
                                        CodeLocation location, bool has_test_p);

// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
//
// ParameterizedTestSuiteInfo accumulates tests obtained from TEST_P
// macro invocations for a particular test suite and generators
// obtained from INSTANTIATE_TEST_SUITE_P macro invocations for that
// test suite. It registers tests with all values generated by all
// generators when asked.
template <class TestSuite>
class ParameterizedTestSuiteInfo : public ParameterizedTestSuiteInfoBase {
 public:
  // ParamType and GeneratorCreationFunc are private types but are required
  // for declarations of public methods AddTestPattern() and
  // AddTestSuiteInstantiation().
  using ParamType = typename TestSuite::ParamType;
  // A function that returns an instance of appropriate generator type.
  typedef ParamGenerator<ParamType>(GeneratorCreationFunc)();
  using ParamNameGeneratorFunc = std::string(const TestParamInfo<ParamType>&);

  explicit ParameterizedTestSuiteInfo(const char* name,
                                      CodeLocation code_location)
      : test_suite_name_(name), code_location_(code_location) {}

  // Test suite base name for display purposes.
  const std::string& GetTestSuiteName() const override {
    return test_suite_name_;
  }
  // Test suite id to verify identity.
  TypeId GetTestSuiteTypeId() const override { return GetTypeId<TestSuite>(); }
  // TEST_P macro uses AddTestPattern() to record information
  // about a single test in a LocalTestInfo structure.
  // test_suite_name is the base name of the test suite (without invocation
  // prefix). test_base_name is the name of an individual test without
  // parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is
  // test suite base name and DoBar is test base name.
  void AddTestPattern(const char* test_suite_name, const char* test_base_name,
                      TestMetaFactoryBase<ParamType>* meta_factory,
                      CodeLocation code_location) {
    tests_.push_back(std::shared_ptr<TestInfo>(new TestInfo(
        test_suite_name, test_base_name, meta_factory, code_location)));
  }
  // INSTANTIATE_TEST_SUITE_P macro uses AddGenerator() to record information
  // about a generator.
  int AddTestSuiteInstantiation(const std::string& instantiation_name,
                                GeneratorCreationFunc* func,
                                ParamNameGeneratorFunc* name_func,
                                const char* file, int line) {
    instantiations_.push_back(
        InstantiationInfo(instantiation_name, func, name_func, file, line));
    return 0;  // Return value used only to run this method in namespace scope.
  }
  // UnitTest class invokes this method to register tests in this test suite
  // right before running tests in RUN_ALL_TESTS macro.
  // This method should not be called more than once on any single
  // instance of a ParameterizedTestSuiteInfoBase derived class.
  // UnitTest has a guard to prevent from calling this method more than once.
  void RegisterTests() override {
    bool generated_instantiations = false;

    for (typename TestInfoContainer::iterator test_it = tests_.begin();
         test_it != tests_.end(); ++test_it) {
      std::shared_ptr<TestInfo> test_info = *test_it;
      for (typename InstantiationContainer::iterator gen_it =
               instantiations_.begin();
           gen_it != instantiations_.end(); ++gen_it) {
        const std::string& instantiation_name = gen_it->name;
        ParamGenerator<ParamType> generator((*gen_it->generator)());
        ParamNameGeneratorFunc* name_func = gen_it->name_func;
        const char* file = gen_it->file;
        int line = gen_it->line;

        std::string test_suite_name;
        if (!instantiation_name.empty())
          test_suite_name = instantiation_name + "/";
        test_suite_name += test_info->test_suite_base_name;

        size_t i = 0;
        std::set<std::string> test_param_names;
        for (typename ParamGenerator<ParamType>::iterator param_it =
                 generator.begin();
             param_it != generator.end(); ++param_it, ++i) {
          generated_instantiations = true;

          Message test_name_stream;

          std::string param_name =
              name_func(TestParamInfo<ParamType>(*param_it, i));

          GTEST_CHECK_(IsValidParamName(param_name))
              << "Parameterized test name '" << param_name
              << "' is invalid, in " << file << " line " << line << std::endl;

          GTEST_CHECK_(test_param_names.count(param_name) == 0)
              << "Duplicate parameterized test name '" << param_name << "', in "
              << file << " line " << line << std::endl;

          test_param_names.insert(param_name);

          if (!test_info->test_base_name.empty()) {
            test_name_stream << test_info->test_base_name << "/";
          }
          test_name_stream << param_name;
          MakeAndRegisterTestInfo(
              test_suite_name.c_str(), test_name_stream.GetString().c_str(),
              nullptr,  // No type parameter.
              PrintToString(*param_it).c_str(), test_info->code_location,
              GetTestSuiteTypeId(),
              SuiteApiResolver<TestSuite>::GetSetUpCaseOrSuite(file, line),
              SuiteApiResolver<TestSuite>::GetTearDownCaseOrSuite(file, line),
              test_info->test_meta_factory->CreateTestFactory(*param_it));
        }  // for param_it
      }    // for gen_it
    }      // for test_it

    if (!generated_instantiations) {
      // There are no generaotrs, or they all generate nothing ...
      InsertSyntheticTestCase(GetTestSuiteName(), code_location_,
                              !tests_.empty());
    }
  }  // RegisterTests

 private:
  // LocalTestInfo structure keeps information about a single test registered
  // with TEST_P macro.
  struct TestInfo {
    TestInfo(const char* a_test_suite_base_name, const char* a_test_base_name,
             TestMetaFactoryBase<ParamType>* a_test_meta_factory,
             CodeLocation a_code_location)
        : test_suite_base_name(a_test_suite_base_name),
          test_base_name(a_test_base_name),
          test_meta_factory(a_test_meta_factory),
          code_location(a_code_location) {}

    const std::string test_suite_base_name;
    const std::string test_base_name;
    const std::unique_ptr<TestMetaFactoryBase<ParamType>> test_meta_factory;
    const CodeLocation code_location;
  };
  using TestInfoContainer = ::std::vector<std::shared_ptr<TestInfo>>;
  // Records data received from INSTANTIATE_TEST_SUITE_P macros:
  //  <Instantiation name, Sequence generator creation function,
  //     Name generator function, Source file, Source line>
  struct InstantiationInfo {
    InstantiationInfo(const std::string& name_in,
                      GeneratorCreationFunc* generator_in,
                      ParamNameGeneratorFunc* name_func_in, const char* file_in,
                      int line_in)
        : name(name_in),
          generator(generator_in),
          name_func(name_func_in),
          file(file_in),
          line(line_in) {}

    std::string name;
    GeneratorCreationFunc* generator;
    ParamNameGeneratorFunc* name_func;
    const char* file;
    int line;
  };
  typedef ::std::vector<InstantiationInfo> InstantiationContainer;

  static bool IsValidParamName(const std::string& name) {
    // Check for empty string
    if (name.empty()) return false;

    // Check for invalid characters
    for (std::string::size_type index = 0; index < name.size(); ++index) {
      if (!IsAlNum(name[index]) && name[index] != '_') return false;
    }

    return true;
  }

  const std::string test_suite_name_;
  CodeLocation code_location_;
  TestInfoContainer tests_;
  InstantiationContainer instantiations_;

  ParameterizedTestSuiteInfo(const ParameterizedTestSuiteInfo&) = delete;
  ParameterizedTestSuiteInfo& operator=(const ParameterizedTestSuiteInfo&) =
      delete;
};  // class ParameterizedTestSuiteInfo

//  Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
template <class TestCase>
using ParameterizedTestCaseInfo = ParameterizedTestSuiteInfo<TestCase>;
#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 682 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"

// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
//
// ParameterizedTestSuiteRegistry contains a map of
// ParameterizedTestSuiteInfoBase classes accessed by test suite names. TEST_P
// and INSTANTIATE_TEST_SUITE_P macros use it to locate their corresponding
// ParameterizedTestSuiteInfo descriptors.
class ParameterizedTestSuiteRegistry {
 public:
  ParameterizedTestSuiteRegistry() {}
  ~ParameterizedTestSuiteRegistry() {
    for (auto& test_suite_info : test_suite_infos_) {
      delete test_suite_info;
    }
  }

  // Looks up or creates and returns a structure containing information about
  // tests and instantiations of a particular test suite.
  template <class TestSuite>
  ParameterizedTestSuiteInfo<TestSuite>* GetTestSuitePatternHolder(
      const char* test_suite_name, CodeLocation code_location) {
    ParameterizedTestSuiteInfo<TestSuite>* typed_test_info = nullptr;
    for (auto& test_suite_info : test_suite_infos_) {
      if (test_suite_info->GetTestSuiteName() == test_suite_name) {
        if (test_suite_info->GetTestSuiteTypeId() != GetTypeId<TestSuite>()) {
          // Complain about incorrect usage of Google Test facilities
          // and terminate the program since we cannot guaranty correct
          // test suite setup and tear-down in this case.
          ReportInvalidTestSuiteType(test_suite_name, code_location);
          posix::Abort();
        } else {
          // At this point we are sure that the object we found is of the same
          // type we are looking for, so we downcast it to that type
          // without further checks.
          typed_test_info = CheckedDowncastToActualType<
              ParameterizedTestSuiteInfo<TestSuite>>(test_suite_info);
        }
        break;
      }
    }
    if (typed_test_info == nullptr) {
      typed_test_info = new ParameterizedTestSuiteInfo<TestSuite>(
          test_suite_name, code_location);
      test_suite_infos_.push_back(typed_test_info);
    }
    return typed_test_info;
  }
  void RegisterTests() {
    for (auto& test_suite_info : test_suite_infos_) {
      test_suite_info->RegisterTests();
    }
  }
//  Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
  template <class TestCase>
  ParameterizedTestCaseInfo<TestCase>* GetTestCasePatternHolder(
      const char* test_case_name, CodeLocation code_location) {
    return GetTestSuitePatternHolder<TestCase>(test_case_name, code_location);
  }

#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 743 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"

 private:
  using TestSuiteInfoContainer = ::std::vector<ParameterizedTestSuiteInfoBase*>;

  TestSuiteInfoContainer test_suite_infos_;

  ParameterizedTestSuiteRegistry(const ParameterizedTestSuiteRegistry&) =
      delete;
  ParameterizedTestSuiteRegistry& operator=(
      const ParameterizedTestSuiteRegistry&) = delete;
};

// Keep track of what type-parameterized test suite are defined and
// where as well as which are intatiated. This allows susequently
// identifying suits that are defined but never used.
class TypeParameterizedTestSuiteRegistry {
 public:
  // Add a suite definition
  void RegisterTestSuite(const char* test_suite_name,
                         CodeLocation code_location);

  // Add an instantiation of a suit.
  void RegisterInstantiation(const char* test_suite_name);

  // For each suit repored as defined but not reported as instantiation,
  // emit a test that reports that fact (configurably, as an error).
  void CheckForInstantiations();

 private:
  struct TypeParameterizedTestSuiteInfo {
    explicit TypeParameterizedTestSuiteInfo(CodeLocation c)
        : code_location(c), instantiated(false) {}

    CodeLocation code_location;
    bool instantiated;
  };

  std::map<std::string, TypeParameterizedTestSuiteInfo> suites_;
};

}  // namespace internal

// Forward declarations of ValuesIn(), which is implemented in
// include/gtest/gtest-param-test.h.
template <class Container>
internal::ParamGenerator<typename Container::value_type> ValuesIn(
    const Container& container);

namespace internal {
// Used in the Values() function to provide polymorphic capabilities.

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4100)
#endif
# 798 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"

template <typename... Ts>
class ValueArray {
 public:
  explicit ValueArray(Ts... v) : v_(FlatTupleConstructTag{}, std::move(v)...) {}

  template <typename T>
  operator ParamGenerator<T>() const {  // NOLINT
    return ValuesIn(MakeVector<T>(MakeIndexSequence<sizeof...(Ts)>()));
  }

 private:
  template <typename T, size_t... I>
  std::vector<T> MakeVector(IndexSequence<I...>) const {
    return std::vector<T>{static_cast<T>(v_.template Get<I>())...};
  }

  FlatTuple<Ts...> v_;
};

#ifdef _MSC_VER
#pragma warning(pop)
#endif
# 821 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"

template <typename... T>
class CartesianProductGenerator
    : public ParamGeneratorInterface<::std::tuple<T...>> {
 public:
  typedef ::std::tuple<T...> ParamType;

  CartesianProductGenerator(const std::tuple<ParamGenerator<T>...>& g)
      : generators_(g) {}
  ~CartesianProductGenerator() override {}

  ParamIteratorInterface<ParamType>* Begin() const override {
    return new Iterator(this, generators_, false);
  }
  ParamIteratorInterface<ParamType>* End() const override {
    return new Iterator(this, generators_, true);
  }

 private:
  template <class I>
  class IteratorImpl;
  template <size_t... I>
  class IteratorImpl<IndexSequence<I...>>
      : public ParamIteratorInterface<ParamType> {
   public:
    IteratorImpl(const ParamGeneratorInterface<ParamType>* base,
                 const std::tuple<ParamGenerator<T>...>& generators,
                 bool is_end)
        : base_(base),
          begin_(std::get<I>(generators).begin()...),
          end_(std::get<I>(generators).end()...),
          current_(is_end ? end_ : begin_) {
      ComputeCurrentValue();
    }
    ~IteratorImpl() override {}

    const ParamGeneratorInterface<ParamType>* BaseGenerator() const override {
      return base_;
    }
    // Advance should not be called on beyond-of-range iterators
    // so no component iterators must be beyond end of range, either.
    void Advance() override {
      assert(!AtEnd());
      // Advance the last iterator.
      ++std::get<sizeof...(T) - 1>(current_);
      // if that reaches end, propagate that up.
      AdvanceIfEnd<sizeof...(T) - 1>();
      ComputeCurrentValue();
    }
    ParamIteratorInterface<ParamType>* Clone() const override {
      return new IteratorImpl(*this);
    }

    const ParamType* Current() const override { return current_value_.get(); }

    bool Equals(const ParamIteratorInterface<ParamType>& other) const override {
      // Having the same base generator guarantees that the other
      // iterator is of the same type and we can downcast.
      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
          << "The program attempted to compare iterators "
          << "from different generators." << std::endl;
      const IteratorImpl* typed_other =
          CheckedDowncastToActualType<const IteratorImpl>(&other);

      // We must report iterators equal if they both point beyond their
      // respective ranges. That can happen in a variety of fashions,
      // so we have to consult AtEnd().
      if (AtEnd() && typed_other->AtEnd()) return true;

      bool same = true;
      bool dummy[] = {
          (same = same && std::get<I>(current_) ==
                              std::get<I>(typed_other->current_))...};
      (void)dummy;
      return same;
    }

   private:
    template <size_t ThisI>
    void AdvanceIfEnd() {
      if (std::get<ThisI>(current_) != std::get<ThisI>(end_)) return;

      bool last = ThisI == 0;
      if (last) {
        // We are done. Nothing else to propagate.
        return;
      }

      constexpr size_t NextI = ThisI - (ThisI != 0);
      std::get<ThisI>(current_) = std::get<ThisI>(begin_);
      ++std::get<NextI>(current_);
      AdvanceIfEnd<NextI>();
    }

    void ComputeCurrentValue() {
      if (!AtEnd())
        current_value_ = std::make_shared<ParamType>(*std::get<I>(current_)...);
    }
    bool AtEnd() const {
      bool at_end = false;
      bool dummy[] = {
          (at_end = at_end || std::get<I>(current_) == std::get<I>(end_))...};
      (void)dummy;
      return at_end;
    }

    const ParamGeneratorInterface<ParamType>* const base_;
    std::tuple<typename ParamGenerator<T>::iterator...> begin_;
    std::tuple<typename ParamGenerator<T>::iterator...> end_;
    std::tuple<typename ParamGenerator<T>::iterator...> current_;
    std::shared_ptr<ParamType> current_value_;
  };

  using Iterator = IteratorImpl<typename MakeIndexSequence<sizeof...(T)>::type>;

  std::tuple<ParamGenerator<T>...> generators_;
};

template <class... Gen>
class CartesianProductHolder {
 public:
  CartesianProductHolder(const Gen&... g) : generators_(g...) {}
  template <typename... T>
  operator ParamGenerator<::std::tuple<T...>>() const {
    return ParamGenerator<::std::tuple<T...>>(
        new CartesianProductGenerator<T...>(generators_));
  }

 private:
  std::tuple<Gen...> generators_;
};

template <typename From, typename To>
class ParamGeneratorConverter : public ParamGeneratorInterface<To> {
 public:
  ParamGeneratorConverter(ParamGenerator<From> gen) // NOLINT
      : generator_(std::move(gen)) {}

  ParamIteratorInterface<To>* Begin() const override {
    return new Iterator(this, generator_.begin(), generator_.end());
  }
  ParamIteratorInterface<To>* End() const override {
    return new Iterator(this, generator_.end(), generator_.end());
  }

 private:
  class Iterator : public ParamIteratorInterface<To> {
   public:
    Iterator(const ParamGeneratorInterface<To>* base, ParamIterator<From> it,
             ParamIterator<From> end)
        : base_(base), it_(it), end_(end) {
      if (it_ != end_) value_ = std::make_shared<To>(static_cast<To>(*it_));
    }
    ~Iterator() override {}

    const ParamGeneratorInterface<To>* BaseGenerator() const override {
      return base_;
    }
    void Advance() override {
      ++it_;
      if (it_ != end_) value_ = std::make_shared<To>(static_cast<To>(*it_));
    }
    ParamIteratorInterface<To>* Clone() const override {
      return new Iterator(*this);
    }
    const To* Current() const override { return value_.get(); }
    bool Equals(const ParamIteratorInterface<To>& other) const override {
      // Having the same base generator guarantees that the other
      // iterator is of the same type and we can downcast.
      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
          << "The program attempted to compare iterators "
          << "from different generators." << std::endl;
      const ParamIterator<From> other_it =
          CheckedDowncastToActualType<const Iterator>(&other)->it_;
      return it_ == other_it;
    }

   private:
    Iterator(const Iterator& other) = default;

    const ParamGeneratorInterface<To>* const base_;
    ParamIterator<From> it_;
    ParamIterator<From> end_;
    std::shared_ptr<To> value_;
  };  // class ParamGeneratorConverter::Iterator

  ParamGenerator<From> generator_;
};  // class ParamGeneratorConverter

template <class Gen>
class ParamConverterGenerator {
 public:
  ParamConverterGenerator(ParamGenerator<Gen> g)  // NOLINT
      : generator_(std::move(g)) {}

  template <typename T>
  operator ParamGenerator<T>() const {  // NOLINT
    return ParamGenerator<T>(new ParamGeneratorConverter<Gen, T>(generator_));
  }

 private:
  ParamGenerator<Gen> generator_;
};

}  // namespace internal
}  // namespace testing

#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
# 1029 "../../third_party/googletest/src/googletest/include/gtest/internal/gtest-param-util.h"
#endif /* gtest-param-util.h expanded by -frewrite-includes */
# 182 "../../third_party/googletest/src/googletest/include/gtest/gtest-param-test.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-port.h"
#endif /* expanded by -frewrite-includes */
# 182 "../../third_party/googletest/src/googletest/include/gtest/gtest-param-test.h"
# 183 "../../third_party/googletest/src/googletest/include/gtest/gtest-param-test.h"

namespace testing {

// Functions producing parameter generators.
//
// Google Test uses these generators to produce parameters for value-
// parameterized tests. When a parameterized test suite is instantiated
// with a particular generator, Google Test creates and runs tests
// for each element in the sequence produced by the generator.
//
// In the following sample, tests from test suite FooTest are instantiated
// each three times with parameter values 3, 5, and 8:
//
// class FooTest : public TestWithParam<int> { ... };
//
// TEST_P(FooTest, TestThis) {
// }
// TEST_P(FooTest, TestThat) {
// }
// INSTANTIATE_TEST_SUITE_P(TestSequence, FooTest, Values(3, 5, 8));
//

// Range() returns generators providing sequences of values in a range.
//
// Synopsis:
// Range(start, end)
//   - returns a generator producing a sequence of values {start, start+1,
//     start+2, ..., }.
// Range(start, end, step)
//   - returns a generator producing a sequence of values {start, start+step,
//     start+step+step, ..., }.
// Notes:
//   * The generated sequences never include end. For example, Range(1, 5)
//     returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)
//     returns a generator producing {1, 3, 5, 7}.
//   * start and end must have the same type. That type may be any integral or
//     floating-point type or a user defined type satisfying these conditions:
//     * It must be assignable (have operator=() defined).
//     * It must have operator+() (operator+(int-compatible type) for
//       two-operand version).
//     * It must have operator<() defined.
//     Elements in the resulting sequences will also have that type.
//   * Condition start < end must be satisfied in order for resulting sequences
//     to contain any elements.
//
template <typename T, typename IncrementT>
internal::ParamGenerator<T> Range(T start, T end, IncrementT step) {
  return internal::ParamGenerator<T>(
      new internal::RangeGenerator<T, IncrementT>(start, end, step));
}

template <typename T>
internal::ParamGenerator<T> Range(T start, T end) {
  return Range(start, end, 1);
}

// ValuesIn() function allows generation of tests with parameters coming from
// a container.
//
// Synopsis:
// ValuesIn(const T (&array)[N])
//   - returns a generator producing sequences with elements from
//     a C-style array.
// ValuesIn(const Container& container)
//   - returns a generator producing sequences with elements from
//     an STL-style container.
// ValuesIn(Iterator begin, Iterator end)
//   - returns a generator producing sequences with elements from
//     a range [begin, end) defined by a pair of STL-style iterators. These
//     iterators can also be plain C pointers.
//
// Please note that ValuesIn copies the values from the containers
// passed in and keeps them to generate tests in RUN_ALL_TESTS().
//
// Examples:
//
// This instantiates tests from test suite StringTest
// each with C-string values of "foo", "bar", and "baz":
//
// const char* strings[] = {"foo", "bar", "baz"};
// INSTANTIATE_TEST_SUITE_P(StringSequence, StringTest, ValuesIn(strings));
//
// This instantiates tests from test suite StlStringTest
// each with STL strings with values "a" and "b":
//
// ::std::vector< ::std::string> GetParameterStrings() {
//   ::std::vector< ::std::string> v;
//   v.push_back("a");
//   v.push_back("b");
//   return v;
// }
//
// INSTANTIATE_TEST_SUITE_P(CharSequence,
//                          StlStringTest,
//                          ValuesIn(GetParameterStrings()));
//
//
// This will also instantiate tests from CharTest
// each with parameter values 'a' and 'b':
//
// ::std::list<char> GetParameterChars() {
//   ::std::list<char> list;
//   list.push_back('a');
//   list.push_back('b');
//   return list;
// }
// ::std::list<char> l = GetParameterChars();
// INSTANTIATE_TEST_SUITE_P(CharSequence2,
//                          CharTest,
//                          ValuesIn(l.begin(), l.end()));
//
template <typename ForwardIterator>
internal::ParamGenerator<
    typename std::iterator_traits<ForwardIterator>::value_type>
ValuesIn(ForwardIterator begin, ForwardIterator end) {
  typedef typename std::iterator_traits<ForwardIterator>::value_type ParamType;
  return internal::ParamGenerator<ParamType>(
      new internal::ValuesInIteratorRangeGenerator<ParamType>(begin, end));
}

template <typename T, size_t N>
internal::ParamGenerator<T> ValuesIn(const T (&array)[N]) {
  return ValuesIn(array, array + N);
}

template <class Container>
internal::ParamGenerator<typename Container::value_type> ValuesIn(
    const Container& container) {
  return ValuesIn(container.begin(), container.end());
}

// Values() allows generating tests from explicitly specified list of
// parameters.
//
// Synopsis:
// Values(T v1, T v2, ..., T vN)
//   - returns a generator producing sequences with elements v1, v2, ..., vN.
//
// For example, this instantiates tests from test suite BarTest each
// with values "one", "two", and "three":
//
// INSTANTIATE_TEST_SUITE_P(NumSequence,
//                          BarTest,
//                          Values("one", "two", "three"));
//
// This instantiates tests from test suite BazTest each with values 1, 2, 3.5.
// The exact type of values will depend on the type of parameter in BazTest.
//
// INSTANTIATE_TEST_SUITE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));
//
//
template <typename... T>
internal::ValueArray<T...> Values(T... v) {
  return internal::ValueArray<T...>(std::move(v)...);
}

// Bool() allows generating tests with parameters in a set of (false, true).
//
// Synopsis:
// Bool()
//   - returns a generator producing sequences with elements {false, true}.
//
// It is useful when testing code that depends on Boolean flags. Combinations
// of multiple flags can be tested when several Bool()'s are combined using
// Combine() function.
//
// In the following example all tests in the test suite FlagDependentTest
// will be instantiated twice with parameters false and true.
//
// class FlagDependentTest : public testing::TestWithParam<bool> {
//   virtual void SetUp() {
//     external_flag = GetParam();
//   }
// }
// INSTANTIATE_TEST_SUITE_P(BoolSequence, FlagDependentTest, Bool());
//
inline internal::ParamGenerator<bool> Bool() { return Values(false, true); }

// Combine() allows the user to combine two or more sequences to produce
// values of a Cartesian product of those sequences' elements.
//
// Synopsis:
// Combine(gen1, gen2, ..., genN)
//   - returns a generator producing sequences with elements coming from
//     the Cartesian product of elements from the sequences generated by
//     gen1, gen2, ..., genN. The sequence elements will have a type of
//     std::tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types
//     of elements from sequences produces by gen1, gen2, ..., genN.
//
// Example:
//
// This will instantiate tests in test suite AnimalTest each one with
// the parameter values tuple("cat", BLACK), tuple("cat", WHITE),
// tuple("dog", BLACK), and tuple("dog", WHITE):
//
// enum Color { BLACK, GRAY, WHITE };
// class AnimalTest
//     : public testing::TestWithParam<std::tuple<const char*, Color> > {...};
//
// TEST_P(AnimalTest, AnimalLooksNice) {...}
//
// INSTANTIATE_TEST_SUITE_P(AnimalVariations, AnimalTest,
//                          Combine(Values("cat", "dog"),
//                                  Values(BLACK, WHITE)));
//
// This will instantiate tests in FlagDependentTest with all variations of two
// Boolean flags:
//
// class FlagDependentTest
//     : public testing::TestWithParam<std::tuple<bool, bool> > {
//   virtual void SetUp() {
//     // Assigns external_flag_1 and external_flag_2 values from the tuple.
//     std::tie(external_flag_1, external_flag_2) = GetParam();
//   }
// };
//
// TEST_P(FlagDependentTest, TestFeature1) {
//   // Test your code using external_flag_1 and external_flag_2 here.
// }
// INSTANTIATE_TEST_SUITE_P(TwoBoolSequence, FlagDependentTest,
//                          Combine(Bool(), Bool()));
//
template <typename... Generator>
internal::CartesianProductHolder<Generator...> Combine(const Generator&... g) {
  return internal::CartesianProductHolder<Generator...>(g...);
}

// ConvertGenerator() wraps a parameter generator in order to cast each prduced
// value through a known type before supplying it to the test suite
//
// Synopsis:
// ConvertGenerator<T>(gen)
//   - returns a generator producing the same elements as generated by gen, but
//     each element is static_cast to type T before being returned
//
// It is useful when using the Combine() function to get the generated
// parameters in a custom type instead of std::tuple
//
// Example:
//
// This will instantiate tests in test suite AnimalTest each one with
// the parameter values tuple("cat", BLACK), tuple("cat", WHITE),
// tuple("dog", BLACK), and tuple("dog", WHITE):
//
// enum Color { BLACK, GRAY, WHITE };
// struct ParamType {
//   using TupleT = std::tuple<const char*, Color>;
//   std::string animal;
//   Color color;
//   ParamType(TupleT t) : animal(std::get<0>(t)), color(std::get<1>(t)) {}
// };
// class AnimalTest
//     : public testing::TestWithParam<ParamType> {...};
//
// TEST_P(AnimalTest, AnimalLooksNice) {...}
//
// INSTANTIATE_TEST_SUITE_P(AnimalVariations, AnimalTest,
//                          ConvertGenerator<ParamType::TupleT>(
//                              Combine(Values("cat", "dog"),
//                                      Values(BLACK, WHITE))));
//
template <typename T>
internal::ParamConverterGenerator<T> ConvertGenerator(
    internal::ParamGenerator<T> gen) {
  return internal::ParamConverterGenerator<T>(gen);
}

#define TEST_P(test_suite_name, test_name)                                     \
  class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)                     \
      : public test_suite_name, private ::testing::internal::GTestNonCopyable {\
   public:                                                                     \
    GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() {}                    \
    void TestBody() override;                                                  \
                                                                               \
   private:                                                                    \
    static int AddToRegistry() {                                               \
      ::testing::UnitTest::GetInstance()                                       \
          ->parameterized_test_registry()                                      \
          .GetTestSuitePatternHolder<test_suite_name>(                         \
              GTEST_STRINGIFY_(test_suite_name),                               \
              ::testing::internal::CodeLocation(__FILE__, __LINE__))           \
          ->AddTestPattern(                                                    \
              GTEST_STRINGIFY_(test_suite_name), GTEST_STRINGIFY_(test_name),  \
              new ::testing::internal::TestMetaFactory<GTEST_TEST_CLASS_NAME_( \
                  test_suite_name, test_name)>(),                              \
              ::testing::internal::CodeLocation(__FILE__, __LINE__));          \
      return 0;                                                                \
    }                                                                          \
    static int gtest_registering_dummy_ GTEST_ATTRIBUTE_UNUSED_;               \
  };                                                                           \
  int GTEST_TEST_CLASS_NAME_(test_suite_name,                                  \
                             test_name)::gtest_registering_dummy_ =            \
      GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::AddToRegistry();     \
  void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody()

// The last argument to INSTANTIATE_TEST_SUITE_P allows the user to specify
// generator and an optional function or functor that generates custom test name
// suffixes based on the test parameters. Such a function or functor should
// accept one argument of type testing::TestParamInfo<class ParamType>, and
// return std::string.
//
// testing::PrintToStringParamName is a builtin test suffix generator that
// returns the value of testing::PrintToString(GetParam()).
//
// Note: test names must be non-empty, unique, and may only contain ASCII
// alphanumeric characters or underscore. Because PrintToString adds quotes
// to std::string and C strings, it won't work for these types.

#define GTEST_EXPAND_(arg) arg
#define GTEST_GET_FIRST_(first, ...) first
#define GTEST_GET_SECOND_(first, second, ...) second

#define INSTANTIATE_TEST_SUITE_P(prefix, test_suite_name, ...)               \
  static ::testing::internal::ParamGenerator<test_suite_name::ParamType>     \
      gtest_##prefix##test_suite_name##_EvalGenerator_() {                   \
    return GTEST_EXPAND_(GTEST_GET_FIRST_(__VA_ARGS__, DUMMY_PARAM_));       \
  }                                                                          \
  static ::std::string gtest_##prefix##test_suite_name##_EvalGenerateName_(  \
      const ::testing::TestParamInfo<test_suite_name::ParamType>& info) {    \
    if (::testing::internal::AlwaysFalse()) {                                \
      ::testing::internal::TestNotEmpty(GTEST_EXPAND_(GTEST_GET_SECOND_(     \
          __VA_ARGS__,                                                       \
          ::testing::internal::DefaultParamName<test_suite_name::ParamType>, \
          DUMMY_PARAM_)));                                                   \
      auto t = std::make_tuple(__VA_ARGS__);                                 \
      static_assert(std::tuple_size<decltype(t)>::value <= 2,                \
                    "Too Many Args!");                                       \
    }                                                                        \
    return ((GTEST_EXPAND_(GTEST_GET_SECOND_(                                \
        __VA_ARGS__,                                                         \
        ::testing::internal::DefaultParamName<test_suite_name::ParamType>,   \
        DUMMY_PARAM_))))(info);                                              \
  }                                                                          \
  static int gtest_##prefix##test_suite_name##_dummy_                        \
      GTEST_ATTRIBUTE_UNUSED_ =                                              \
          ::testing::UnitTest::GetInstance()                                 \
              ->parameterized_test_registry()                                \
              .GetTestSuitePatternHolder<test_suite_name>(                   \
                  GTEST_STRINGIFY_(test_suite_name),                         \
                  ::testing::internal::CodeLocation(__FILE__, __LINE__))     \
              ->AddTestSuiteInstantiation(                                   \
                  GTEST_STRINGIFY_(prefix),                                  \
                  &gtest_##prefix##test_suite_name##_EvalGenerator_,         \
                  &gtest_##prefix##test_suite_name##_EvalGenerateName_,      \
                  __FILE__, __LINE__)

// Allow Marking a Parameterized test class as not needing to be instantiated.
#define GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(T)                  \
  namespace gtest_do_not_use_outside_namespace_scope {}                   \
  static const ::testing::internal::MarkAsIgnored gtest_allow_ignore_##T( \
      GTEST_STRINGIFY_(T))

// Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
#define INSTANTIATE_TEST_CASE_P                                            \
  static_assert(::testing::internal::InstantiateTestCase_P_IsDeprecated(), \
                "");                                                       \
  INSTANTIATE_TEST_SUITE_P
#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 542 "../../third_party/googletest/src/googletest/include/gtest/gtest-param-test.h"

}  // namespace testing

#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
# 546 "../../third_party/googletest/src/googletest/include/gtest/gtest-param-test.h"
#endif /* gtest-param-test.h expanded by -frewrite-includes */
# 64 "../../third_party/googletest/src/googletest/include/gtest/gtest.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "gtest/gtest-printers.h"
#endif /* expanded by -frewrite-includes */
# 64 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 65 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#if 0 /* expanded by -frewrite-includes */
#include "gtest/gtest-test-part.h"
#endif /* expanded by -frewrite-includes */
# 65 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 66 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest-typed-test.h expanded by -frewrite-includes */
#include "gtest/gtest-typed-test.h"
#else /* gtest-typed-test.h expanded by -frewrite-includes */
# 66 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h" 1
// Copyright 2008 Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
#define GOOGLETEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_

// This header implements typed tests and type-parameterized tests.

// Typed (aka type-driven) tests repeat the same test for types in a
// list.  You must know which types you want to test with when writing
// typed tests. Here's how you do it:

#if 0 /* disabled by -frewrite-includes */
#if 0
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 44 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h"

// First, define a fixture class template.  It should be parameterized
// by a type.  Remember to derive it from testing::Test.
template <typename T>
class FooTest : public testing::Test {
 public:
  ...
  typedef std::list<T> List;
  static T shared_;
  T value_;
};

// Next, associate a list of types with the test suite, which will be
// repeated for each type in the list.  The typedef is necessary for
// the macro to parse correctly.
typedef testing::Types<char, int, unsigned int> MyTypes;
TYPED_TEST_SUITE(FooTest, MyTypes);

// If the type list contains only one type, you can write that type
// directly without Types<...>:
//   TYPED_TEST_SUITE(FooTest, int);

// Then, use TYPED_TEST() instead of TEST_F() to define as many typed
// tests for this test suite as you want.
TYPED_TEST(FooTest, DoesBlah) {
  // Inside a test, refer to the special name TypeParam to get the type
  // parameter.  Since we are inside a derived class template, C++ requires
  // us to visit the members of FooTest via 'this'.
  TypeParam n = this->value_;

  // To visit static members of the fixture, add the TestFixture::
  // prefix.
  n += TestFixture::shared_;

  // To refer to typedefs in the fixture, add the "typename
  // TestFixture::" prefix.
  typename TestFixture::List values;
  values.push_back(n);
  ...
}

TYPED_TEST(FooTest, HasPropertyA) { ... }

// TYPED_TEST_SUITE takes an optional third argument which allows to specify a
// class that generates custom test name suffixes based on the type. This should
// be a class which has a static template function GetName(int index) returning
// a string for each type. The provided integer index equals the index of the
// type in the provided type list. In many cases the index can be ignored.
//
// For example:
//   class MyTypeNames {
//    public:
//     template <typename T>
//     static std::string GetName(int) {
//       if (std::is_same<T, char>()) return "char";
//       if (std::is_same<T, int>()) return "int";
//       if (std::is_same<T, unsigned int>()) return "unsignedInt";
//     }
//   };
//   TYPED_TEST_SUITE(FooTest, MyTypes, MyTypeNames);

#endif  // 0
# 106 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h"

// Type-parameterized tests are abstract test patterns parameterized
// by a type.  Compared with typed tests, type-parameterized tests
// allow you to define the test pattern without knowing what the type
// parameters are.  The defined pattern can be instantiated with
// different types any number of times, in any number of translation
// units.
//
// If you are designing an interface or concept, you can define a
// suite of type-parameterized tests to verify properties that any
// valid implementation of the interface/concept should have.  Then,
// each implementation can easily instantiate the test suite to verify
// that it conforms to the requirements, without having to write
// similar tests repeatedly.  Here's an example:

#if 0 /* disabled by -frewrite-includes */
#if 0
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 122 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h"

// First, define a fixture class template.  It should be parameterized
// by a type.  Remember to derive it from testing::Test.
template <typename T>
class FooTest : public testing::Test {
  ...
};

// Next, declare that you will define a type-parameterized test suite
// (the _P suffix is for "parameterized" or "pattern", whichever you
// prefer):
TYPED_TEST_SUITE_P(FooTest);

// Then, use TYPED_TEST_P() to define as many type-parameterized tests
// for this type-parameterized test suite as you want.
TYPED_TEST_P(FooTest, DoesBlah) {
  // Inside a test, refer to TypeParam to get the type parameter.
  TypeParam n = 0;
  ...
}

TYPED_TEST_P(FooTest, HasPropertyA) { ... }

// Now the tricky part: you need to register all test patterns before
// you can instantiate them.  The first argument of the macro is the
// test suite name; the rest are the names of the tests in this test
// case.
REGISTER_TYPED_TEST_SUITE_P(FooTest,
                            DoesBlah, HasPropertyA);

// Finally, you are free to instantiate the pattern with the types you
// want.  If you put the above code in a header file, you can #include
// it in multiple C++ source files and instantiate it multiple times.
//
// To distinguish different instances of the pattern, the first
// argument to the INSTANTIATE_* macro is a prefix that will be added
// to the actual test suite name.  Remember to pick unique prefixes for
// different instances.
typedef testing::Types<char, int, unsigned int> MyTypes;
INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes);

// If the type list contains only one type, you can write that type
// directly without Types<...>:
//   INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, int);
//
// Similar to the optional argument of TYPED_TEST_SUITE above,
// INSTANTIATE_TEST_SUITE_P takes an optional fourth argument which allows to
// generate custom names.
//   INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes, MyTypeNames);

#endif  // 0
# 173 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h"

#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-internal.h"
#endif /* expanded by -frewrite-includes */
# 174 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h"
# 175 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h"
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-port.h"
#endif /* expanded by -frewrite-includes */
# 175 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h"
# 176 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h"
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-type-util.h"
#endif /* expanded by -frewrite-includes */
# 176 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h"
# 177 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h"

// Implements typed tests.

// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
//
// Expands to the name of the typedef for the type parameters of the
// given test suite.
#define GTEST_TYPE_PARAMS_(TestSuiteName) gtest_type_params_##TestSuiteName##_

// Expands to the name of the typedef for the NameGenerator, responsible for
// creating the suffixes of the name.
#define GTEST_NAME_GENERATOR_(TestSuiteName) \
  gtest_type_params_##TestSuiteName##_NameGenerator

#define TYPED_TEST_SUITE(CaseName, Types, ...)                          \
  typedef ::testing::internal::GenerateTypeList<Types>::type            \
      GTEST_TYPE_PARAMS_(CaseName);                                     \
  typedef ::testing::internal::NameGeneratorSelector<__VA_ARGS__>::type \
  GTEST_NAME_GENERATOR_(CaseName)

#define TYPED_TEST(CaseName, TestName)                                        \
  static_assert(sizeof(GTEST_STRINGIFY_(TestName)) > 1,                       \
                "test-name must not be empty");                               \
  template <typename gtest_TypeParam_>                                        \
  class GTEST_TEST_CLASS_NAME_(CaseName, TestName)                            \
      : public CaseName<gtest_TypeParam_> {                                   \
   private:                                                                   \
    typedef CaseName<gtest_TypeParam_> TestFixture;                           \
    typedef gtest_TypeParam_ TypeParam;                                       \
    void TestBody() override;                                                 \
  };                                                                          \
  static bool gtest_##CaseName##_##TestName##_registered_                     \
      GTEST_ATTRIBUTE_UNUSED_ = ::testing::internal::TypeParameterizedTest<   \
          CaseName,                                                           \
          ::testing::internal::TemplateSel<GTEST_TEST_CLASS_NAME_(CaseName,   \
                                                                  TestName)>, \
          GTEST_TYPE_PARAMS_(                                                 \
              CaseName)>::Register("",                                        \
                                   ::testing::internal::CodeLocation(         \
                                       __FILE__, __LINE__),                   \
                                   GTEST_STRINGIFY_(CaseName),                \
                                   GTEST_STRINGIFY_(TestName), 0,             \
                                   ::testing::internal::GenerateNames<        \
                                       GTEST_NAME_GENERATOR_(CaseName),       \
                                       GTEST_TYPE_PARAMS_(CaseName)>());      \
  template <typename gtest_TypeParam_>                                        \
  void GTEST_TEST_CLASS_NAME_(CaseName,                                       \
                              TestName)<gtest_TypeParam_>::TestBody()

// Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
#define TYPED_TEST_CASE                                                \
  static_assert(::testing::internal::TypedTestCaseIsDeprecated(), ""); \
  TYPED_TEST_SUITE
#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 232 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h"

// Implements type-parameterized tests.

// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
//
// Expands to the namespace name that the type-parameterized tests for
// the given type-parameterized test suite are defined in.  The exact
// name of the namespace is subject to change without notice.
#define GTEST_SUITE_NAMESPACE_(TestSuiteName) gtest_suite_##TestSuiteName##_

// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
//
// Expands to the name of the variable used to remember the names of
// the defined tests in the given test suite.
#define GTEST_TYPED_TEST_SUITE_P_STATE_(TestSuiteName) \
  gtest_typed_test_suite_p_state_##TestSuiteName##_

// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE DIRECTLY.
//
// Expands to the name of the variable used to remember the names of
// the registered tests in the given test suite.
#define GTEST_REGISTERED_TEST_NAMES_(TestSuiteName) \
  gtest_registered_test_names_##TestSuiteName##_

// The variables defined in the type-parameterized test macros are
// static as typically these macros are used in a .h file that can be
// #included in multiple translation units linked together.
#define TYPED_TEST_SUITE_P(SuiteName)              \
  static ::testing::internal::TypedTestSuitePState \
  GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName)

// Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
#define TYPED_TEST_CASE_P                                                 \
  static_assert(::testing::internal::TypedTestCase_P_IsDeprecated(), ""); \
  TYPED_TEST_SUITE_P
#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 269 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h"

#define TYPED_TEST_P(SuiteName, TestName)                             \
  namespace GTEST_SUITE_NAMESPACE_(SuiteName) {                       \
    template <typename gtest_TypeParam_>                              \
    class TestName : public SuiteName<gtest_TypeParam_> {             \
     private:                                                         \
      typedef SuiteName<gtest_TypeParam_> TestFixture;                \
      typedef gtest_TypeParam_ TypeParam;                             \
      void TestBody() override;                                       \
    };                                                                \
    static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \
        GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).AddTestName(       \
            __FILE__, __LINE__, GTEST_STRINGIFY_(SuiteName),          \
            GTEST_STRINGIFY_(TestName));                              \
  }                                                                   \
  template <typename gtest_TypeParam_>                                \
  void GTEST_SUITE_NAMESPACE_(                                        \
      SuiteName)::TestName<gtest_TypeParam_>::TestBody()

// Note: this won't work correctly if the trailing arguments are macros.
#define REGISTER_TYPED_TEST_SUITE_P(SuiteName, ...)                         \
  namespace GTEST_SUITE_NAMESPACE_(SuiteName) {                             \
    typedef ::testing::internal::Templates<__VA_ARGS__> gtest_AllTests_;    \
  }                                                                         \
  static const char* const GTEST_REGISTERED_TEST_NAMES_(                    \
      SuiteName) GTEST_ATTRIBUTE_UNUSED_ =                                  \
      GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).VerifyRegisteredTestNames( \
          GTEST_STRINGIFY_(SuiteName), __FILE__, __LINE__, #__VA_ARGS__)

// Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
#define REGISTER_TYPED_TEST_CASE_P                                           \
  static_assert(::testing::internal::RegisterTypedTestCase_P_IsDeprecated(), \
                "");                                                         \
  REGISTER_TYPED_TEST_SUITE_P
#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 305 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h"

#define INSTANTIATE_TYPED_TEST_SUITE_P(Prefix, SuiteName, Types, ...)     \
  static_assert(sizeof(GTEST_STRINGIFY_(Prefix)) > 1,                     \
                "test-suit-prefix must not be empty");                    \
  static bool gtest_##Prefix##_##SuiteName GTEST_ATTRIBUTE_UNUSED_ =      \
      ::testing::internal::TypeParameterizedTestSuite<                    \
          SuiteName, GTEST_SUITE_NAMESPACE_(SuiteName)::gtest_AllTests_,  \
          ::testing::internal::GenerateTypeList<Types>::type>::           \
          Register(GTEST_STRINGIFY_(Prefix),                              \
                   ::testing::internal::CodeLocation(__FILE__, __LINE__), \
                   &GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName),           \
                   GTEST_STRINGIFY_(SuiteName),                           \
                   GTEST_REGISTERED_TEST_NAMES_(SuiteName),               \
                   ::testing::internal::GenerateNames<                    \
                       ::testing::internal::NameGeneratorSelector<        \
                           __VA_ARGS__>::type,                            \
                       ::testing::internal::GenerateTypeList<Types>::type>())

// Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
#define INSTANTIATE_TYPED_TEST_CASE_P                                      \
  static_assert(                                                           \
      ::testing::internal::InstantiateTypedTestCase_P_IsDeprecated(), ""); \
  INSTANTIATE_TYPED_TEST_SUITE_P
#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 330 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h"

#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
# 332 "../../third_party/googletest/src/googletest/include/gtest/gtest-typed-test.h"
#endif /* gtest-typed-test.h expanded by -frewrite-includes */
# 67 "../../third_party/googletest/src/googletest/include/gtest/gtest.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest_pred_impl.h expanded by -frewrite-includes */
#include "gtest/gtest_pred_impl.h"
#else /* gtest_pred_impl.h expanded by -frewrite-includes */
# 67 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/gtest_pred_impl.h" 1
// Copyright 2006, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.
//
// Implements a family of generic predicate assertion macros.

// IWYU pragma: private, include "gtest/gtest.h"
// IWYU pragma: friend gtest/.*
// IWYU pragma: friend gmock/.*

#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
#define GOOGLETEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_

#if 0 /* expanded by -frewrite-includes */
#include "gtest/gtest-assertion-result.h"
#endif /* expanded by -frewrite-includes */
# 39 "../../third_party/googletest/src/googletest/include/gtest/gtest_pred_impl.h"
# 40 "../../third_party/googletest/src/googletest/include/gtest/gtest_pred_impl.h"
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-internal.h"
#endif /* expanded by -frewrite-includes */
# 40 "../../third_party/googletest/src/googletest/include/gtest/gtest_pred_impl.h"
# 41 "../../third_party/googletest/src/googletest/include/gtest/gtest_pred_impl.h"
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-port.h"
#endif /* expanded by -frewrite-includes */
# 41 "../../third_party/googletest/src/googletest/include/gtest/gtest_pred_impl.h"
# 42 "../../third_party/googletest/src/googletest/include/gtest/gtest_pred_impl.h"

namespace testing {

// This header implements a family of generic predicate assertion
// macros:
//
//   ASSERT_PRED_FORMAT1(pred_format, v1)
//   ASSERT_PRED_FORMAT2(pred_format, v1, v2)
//   ...
//
// where pred_format is a function or functor that takes n (in the
// case of ASSERT_PRED_FORMATn) values and their source expression
// text, and returns a testing::AssertionResult.  See the definition
// of ASSERT_EQ in gtest.h for an example.
//
// If you don't care about formatting, you can use the more
// restrictive version:
//
//   ASSERT_PRED1(pred, v1)
//   ASSERT_PRED2(pred, v1, v2)
//   ...
//
// where pred is an n-ary function or functor that returns bool,
// and the values v1, v2, ..., must support the << operator for
// streaming to std::ostream.
//
// We also define the EXPECT_* variations.
//
// For now we only support predicates whose arity is at most 5.
// Please email googletestframework@googlegroups.com if you need
// support for higher arities.

// GTEST_ASSERT_ is the basic statement to which all of the assertions
// in this file reduce.  Don't use this in your code.

#define GTEST_ASSERT_(expression, on_failure)                   \
  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                 \
  if (const ::testing::AssertionResult gtest_ar = (expression)) \
    ;                                                           \
  else                                                          \
    on_failure(gtest_ar.failure_message())

// Helper function for implementing {EXPECT|ASSERT}_PRED1.  Don't use
// this in your code.
template <typename Pred, typename T1>
AssertionResult AssertPred1Helper(const char* pred_text, const char* e1,
                                  Pred pred, const T1& v1) {
  if (pred(v1)) return AssertionSuccess();

  return AssertionFailure()
         << pred_text << "(" << e1 << ") evaluates to false, where"
         << "\n"
         << e1 << " evaluates to " << ::testing::PrintToString(v1);
}

// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT1.
// Don't use this in your code.
#define GTEST_PRED_FORMAT1_(pred_format, v1, on_failure) \
  GTEST_ASSERT_(pred_format(#v1, v1), on_failure)

// Internal macro for implementing {EXPECT|ASSERT}_PRED1.  Don't use
// this in your code.
#define GTEST_PRED1_(pred, v1, on_failure) \
  GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, #v1, pred, v1), on_failure)

// Unary predicate assertion macros.
#define EXPECT_PRED_FORMAT1(pred_format, v1) \
  GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)
#define EXPECT_PRED1(pred, v1) GTEST_PRED1_(pred, v1, GTEST_NONFATAL_FAILURE_)
#define ASSERT_PRED_FORMAT1(pred_format, v1) \
  GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_)
#define ASSERT_PRED1(pred, v1) GTEST_PRED1_(pred, v1, GTEST_FATAL_FAILURE_)

// Helper function for implementing {EXPECT|ASSERT}_PRED2.  Don't use
// this in your code.
template <typename Pred, typename T1, typename T2>
AssertionResult AssertPred2Helper(const char* pred_text, const char* e1,
                                  const char* e2, Pred pred, const T1& v1,
                                  const T2& v2) {
  if (pred(v1, v2)) return AssertionSuccess();

  return AssertionFailure()
         << pred_text << "(" << e1 << ", " << e2
         << ") evaluates to false, where"
         << "\n"
         << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n"
         << e2 << " evaluates to " << ::testing::PrintToString(v2);
}

// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT2.
// Don't use this in your code.
#define GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure) \
  GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), on_failure)

// Internal macro for implementing {EXPECT|ASSERT}_PRED2.  Don't use
// this in your code.
#define GTEST_PRED2_(pred, v1, v2, on_failure)                               \
  GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, #v1, #v2, pred, v1, v2), \
                on_failure)

// Binary predicate assertion macros.
#define EXPECT_PRED_FORMAT2(pred_format, v1, v2) \
  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
#define EXPECT_PRED2(pred, v1, v2) \
  GTEST_PRED2_(pred, v1, v2, GTEST_NONFATAL_FAILURE_)
#define ASSERT_PRED_FORMAT2(pred_format, v1, v2) \
  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
#define ASSERT_PRED2(pred, v1, v2) \
  GTEST_PRED2_(pred, v1, v2, GTEST_FATAL_FAILURE_)

// Helper function for implementing {EXPECT|ASSERT}_PRED3.  Don't use
// this in your code.
template <typename Pred, typename T1, typename T2, typename T3>
AssertionResult AssertPred3Helper(const char* pred_text, const char* e1,
                                  const char* e2, const char* e3, Pred pred,
                                  const T1& v1, const T2& v2, const T3& v3) {
  if (pred(v1, v2, v3)) return AssertionSuccess();

  return AssertionFailure()
         << pred_text << "(" << e1 << ", " << e2 << ", " << e3
         << ") evaluates to false, where"
         << "\n"
         << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n"
         << e2 << " evaluates to " << ::testing::PrintToString(v2) << "\n"
         << e3 << " evaluates to " << ::testing::PrintToString(v3);
}

// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT3.
// Don't use this in your code.
#define GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure) \
  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3), on_failure)

// Internal macro for implementing {EXPECT|ASSERT}_PRED3.  Don't use
// this in your code.
#define GTEST_PRED3_(pred, v1, v2, v3, on_failure)                          \
  GTEST_ASSERT_(                                                            \
      ::testing::AssertPred3Helper(#pred, #v1, #v2, #v3, pred, v1, v2, v3), \
      on_failure)

// Ternary predicate assertion macros.
#define EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3) \
  GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
#define EXPECT_PRED3(pred, v1, v2, v3) \
  GTEST_PRED3_(pred, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
#define ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3) \
  GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_FATAL_FAILURE_)
#define ASSERT_PRED3(pred, v1, v2, v3) \
  GTEST_PRED3_(pred, v1, v2, v3, GTEST_FATAL_FAILURE_)

// Helper function for implementing {EXPECT|ASSERT}_PRED4.  Don't use
// this in your code.
template <typename Pred, typename T1, typename T2, typename T3, typename T4>
AssertionResult AssertPred4Helper(const char* pred_text, const char* e1,
                                  const char* e2, const char* e3,
                                  const char* e4, Pred pred, const T1& v1,
                                  const T2& v2, const T3& v3, const T4& v4) {
  if (pred(v1, v2, v3, v4)) return AssertionSuccess();

  return AssertionFailure()
         << pred_text << "(" << e1 << ", " << e2 << ", " << e3 << ", " << e4
         << ") evaluates to false, where"
         << "\n"
         << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n"
         << e2 << " evaluates to " << ::testing::PrintToString(v2) << "\n"
         << e3 << " evaluates to " << ::testing::PrintToString(v3) << "\n"
         << e4 << " evaluates to " << ::testing::PrintToString(v4);
}

// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT4.
// Don't use this in your code.
#define GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure) \
  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, v1, v2, v3, v4), on_failure)

// Internal macro for implementing {EXPECT|ASSERT}_PRED4.  Don't use
// this in your code.
#define GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)                        \
  GTEST_ASSERT_(::testing::AssertPred4Helper(#pred, #v1, #v2, #v3, #v4, pred, \
                                             v1, v2, v3, v4),                 \
                on_failure)

// 4-ary predicate assertion macros.
#define EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \
  GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)
#define EXPECT_PRED4(pred, v1, v2, v3, v4) \
  GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)
#define ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \
  GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)
#define ASSERT_PRED4(pred, v1, v2, v3, v4) \
  GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)

// Helper function for implementing {EXPECT|ASSERT}_PRED5.  Don't use
// this in your code.
template <typename Pred, typename T1, typename T2, typename T3, typename T4,
          typename T5>
AssertionResult AssertPred5Helper(const char* pred_text, const char* e1,
                                  const char* e2, const char* e3,
                                  const char* e4, const char* e5, Pred pred,
                                  const T1& v1, const T2& v2, const T3& v3,
                                  const T4& v4, const T5& v5) {
  if (pred(v1, v2, v3, v4, v5)) return AssertionSuccess();

  return AssertionFailure()
         << pred_text << "(" << e1 << ", " << e2 << ", " << e3 << ", " << e4
         << ", " << e5 << ") evaluates to false, where"
         << "\n"
         << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n"
         << e2 << " evaluates to " << ::testing::PrintToString(v2) << "\n"
         << e3 << " evaluates to " << ::testing::PrintToString(v3) << "\n"
         << e4 << " evaluates to " << ::testing::PrintToString(v4) << "\n"
         << e5 << " evaluates to " << ::testing::PrintToString(v5);
}

// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT5.
// Don't use this in your code.
#define GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)  \
  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, #v5, v1, v2, v3, v4, v5), \
                on_failure)

// Internal macro for implementing {EXPECT|ASSERT}_PRED5.  Don't use
// this in your code.
#define GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)                   \
  GTEST_ASSERT_(::testing::AssertPred5Helper(#pred, #v1, #v2, #v3, #v4, #v5, \
                                             pred, v1, v2, v3, v4, v5),      \
                on_failure)

// 5-ary predicate assertion macros.
#define EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \
  GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)
#define EXPECT_PRED5(pred, v1, v2, v3, v4, v5) \
  GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)
#define ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \
  GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)
#define ASSERT_PRED5(pred, v1, v2, v3, v4, v5) \
  GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)

}  // namespace testing

#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
# 280 "../../third_party/googletest/src/googletest/include/gtest/gtest_pred_impl.h"
#endif /* gtest_pred_impl.h expanded by -frewrite-includes */
# 68 "../../third_party/googletest/src/googletest/include/gtest/gtest.h" 2
#if defined(__CLANG_REWRITTEN_INCLUDES) /* gtest_prod.h expanded by -frewrite-includes */
#include "gtest/gtest_prod.h"
#else /* gtest_prod.h expanded by -frewrite-includes */
# 68 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 1 "../../third_party/googletest/src/googletest/include/gtest/gtest_prod.h" 1
// Copyright 2006, Google 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:
//
//     * 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.
//     * Neither the name of Google Inc. 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 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.

// Google C++ Testing and Mocking Framework definitions useful in production
// code.

#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_PROD_H_
#define GOOGLETEST_INCLUDE_GTEST_GTEST_PROD_H_

// When you need to test the private or protected members of a class,
// use the FRIEND_TEST macro to declare your tests as friends of the
// class.  For example:
//
// class MyClass {
//  private:
//   void PrivateMethod();
//   FRIEND_TEST(MyClassTest, PrivateMethodWorks);
// };
//
// class MyClassTest : public testing::Test {
//   // ...
// };
//
// TEST_F(MyClassTest, PrivateMethodWorks) {
//   // Can call MyClass::PrivateMethod() here.
// }
//
// Note: The test class must be in the same namespace as the class being tested.
// For example, putting MyClassTest in an anonymous namespace will not work.

#define FRIEND_TEST(test_case_name, test_name) \
  friend class test_case_name##_##test_name##_Test

#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_PROD_H_
# 61 "../../third_party/googletest/src/googletest/include/gtest/gtest_prod.h"
#endif /* gtest_prod.h expanded by -frewrite-includes */
# 69 "../../third_party/googletest/src/googletest/include/gtest/gtest.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-internal.h"
#endif /* expanded by -frewrite-includes */
# 69 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 70 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#if 0 /* expanded by -frewrite-includes */
#include "gtest/internal/gtest-string.h"
#endif /* expanded by -frewrite-includes */
# 70 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
# 71 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
/* class A needs to have dll-interface to be used by clients of class B */)

// Declares the flags.

// This flag temporary enables the disabled tests.
GTEST_DECLARE_bool_(also_run_disabled_tests);

// This flag brings the debugger on an assertion failure.
GTEST_DECLARE_bool_(break_on_failure);

// This flag controls whether Google Test catches all test-thrown exceptions
// and logs them as failures.
GTEST_DECLARE_bool_(catch_exceptions);

// This flag enables using colors in terminal output. Available values are
// "yes" to enable colors, "no" (disable colors), or "auto" (the default)
// to let Google Test decide.
GTEST_DECLARE_string_(color);

// This flag controls whether the test runner should continue execution past
// first failure.
GTEST_DECLARE_bool_(fail_fast);

// This flag sets up the filter to select by name using a glob pattern
// the tests to run. If the filter is not given all tests are executed.
GTEST_DECLARE_string_(filter);

// This flag controls whether Google Test installs a signal handler that dumps
// debugging information when fatal signals are raised.
GTEST_DECLARE_bool_(install_failure_signal_handler);

// This flag causes the Google Test to list tests. None of the tests listed
// are actually run if the flag is provided.
GTEST_DECLARE_bool_(list_tests);

// This flag controls whether Google Test emits a detailed XML report to a file
// in addition to its normal textual output.
GTEST_DECLARE_string_(output);

// This flags control whether Google Test prints only test failures.
GTEST_DECLARE_bool_(brief);

// This flags control whether Google Test prints the elapsed time for each
// test.
GTEST_DECLARE_bool_(print_time);

// This flags control whether Google Test prints UTF8 characters as text.
GTEST_DECLARE_bool_(print_utf8);

// This flag specifies the random number seed.
GTEST_DECLARE_int32_(random_seed);

// This flag sets how many times the tests are repeated. The default value
// is 1. If the value is -1 the tests are repeating forever.
GTEST_DECLARE_int32_(repeat);

// This flag controls whether Google Test Environments are recreated for each
// repeat of the tests. The default value is true. If set to false the global
// test Environment objects are only set up once, for the first iteration, and
// only torn down once, for the last.
GTEST_DECLARE_bool_(recreate_environments_when_repeating);

// This flag controls whether Google Test includes Google Test internal
// stack frames in failure stack traces.
GTEST_DECLARE_bool_(show_internal_stack_frames);

// When this flag is specified, tests' order is randomized on every iteration.
GTEST_DECLARE_bool_(shuffle);

// This flag specifies the maximum number of stack frames to be
// printed in a failure message.
GTEST_DECLARE_int32_(stack_trace_depth);

// When this flag is specified, a failed assertion will throw an
// exception if exceptions are enabled, or exit the program with a
// non-zero code otherwise. For use with an external test framework.
GTEST_DECLARE_bool_(throw_on_failure);

// When this flag is set with a "host:port" string, on supported
// platforms test results are streamed to the specified port on
// the specified host machine.
GTEST_DECLARE_string_(stream_result_to);

#if 0 /* disabled by -frewrite-includes */
#if GTEST_USE_OWN_FLAGFILE_FLAG_
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 157 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
GTEST_DECLARE_string_(flagfile);
#endif  // GTEST_USE_OWN_FLAGFILE_FLAG_
# 159 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

namespace testing {

// Silence C4100 (unreferenced formal parameter) and 4805
// unsafe mix of type 'const int' and type 'const bool'
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4805)
#pragma warning(disable : 4100)
#endif
# 169 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

// The upper limit for valid stack trace depths.
const int kMaxStackTraceDepth = 100;

namespace internal {

class AssertHelper;
class DefaultGlobalTestPartResultReporter;
class ExecDeathTest;
class NoExecDeathTest;
class FinalSuccessChecker;
class GTestFlagSaver;
class StreamingListenerTest;
class TestResultAccessor;
class TestEventListenersAccessor;
class TestEventRepeater;
class UnitTestRecordPropertyTestHelper;
class WindowsDeathTest;
class FuchsiaDeathTest;
class UnitTestImpl* GetUnitTestImpl();
void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
                                    const std::string& message);
std::set<std::string>* GetIgnoredParameterizedTestSuites();

// A base class that prevents subclasses from being copyable.
// We do this instead of using '= delete' so as to avoid triggering warnings
// inside user code regarding any of our declarations.
class GTestNonCopyable {
 public:
  GTestNonCopyable() = default;
  GTestNonCopyable(const GTestNonCopyable &) = delete;
  GTestNonCopyable &operator=(const GTestNonCopyable &) = delete;
  ~GTestNonCopyable() = default;
};

}  // namespace internal

// The friend relationship of some of these classes is cyclic.
// If we don't forward declare them the compiler might confuse the classes
// in friendship clauses with same named classes on the scope.
class Test;
class TestSuite;

// Old API is still available but deprecated
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
using TestCase = TestSuite;
#endif
# 216 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
class TestInfo;
class UnitTest;

// The abstract class that all tests inherit from.
//
// In Google Test, a unit test program contains one or many TestSuites, and
// each TestSuite contains one or many Tests.
//
// When you define a test using the TEST macro, you don't need to
// explicitly derive from Test - the TEST macro automatically does
// this for you.
//
// The only time you derive from Test is when defining a test fixture
// to be used in a TEST_F.  For example:
//
//   class FooTest : public testing::Test {
//    protected:
//     void SetUp() override { ... }
//     void TearDown() override { ... }
//     ...
//   };
//
//   TEST_F(FooTest, Bar) { ... }
//   TEST_F(FooTest, Baz) { ... }
//
// Test is not copyable.
class GTEST_API_ Test {
 public:
  friend class TestInfo;

  // The d'tor is virtual as we intend to inherit from Test.
  virtual ~Test();

  // Sets up the stuff shared by all tests in this test suite.
  //
  // Google Test will call Foo::SetUpTestSuite() before running the first
  // test in test suite Foo.  Hence a sub-class can define its own
  // SetUpTestSuite() method to shadow the one defined in the super
  // class.
  static void SetUpTestSuite() {}

  // Tears down the stuff shared by all tests in this test suite.
  //
  // Google Test will call Foo::TearDownTestSuite() after running the last
  // test in test suite Foo.  Hence a sub-class can define its own
  // TearDownTestSuite() method to shadow the one defined in the super
  // class.
  static void TearDownTestSuite() {}

  // Legacy API is deprecated but still available. Use SetUpTestSuite and
  // TearDownTestSuite instead.
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
  static void TearDownTestCase() {}
  static void SetUpTestCase() {}
#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 271 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

  // Returns true if and only if the current test has a fatal failure.
  static bool HasFatalFailure();

  // Returns true if and only if the current test has a non-fatal failure.
  static bool HasNonfatalFailure();

  // Returns true if and only if the current test was skipped.
  static bool IsSkipped();

  // Returns true if and only if the current test has a (either fatal or
  // non-fatal) failure.
  static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); }

  // Logs a property for the current test, test suite, or for the entire
  // invocation of the test program when used outside of the context of a
  // test suite.  Only the last value for a given key is remembered.  These
  // are public static so they can be called from utility functions that are
  // not members of the test fixture.  Calls to RecordProperty made during
  // lifespan of the test (from the moment its constructor starts to the
  // moment its destructor finishes) will be output in XML as attributes of
  // the <testcase> element.  Properties recorded from fixture's
  // SetUpTestSuite or TearDownTestSuite are logged as attributes of the
  // corresponding <testsuite> element.  Calls to RecordProperty made in the
  // global context (before or after invocation of RUN_ALL_TESTS and from
  // SetUp/TearDown method of Environment objects registered with Google
  // Test) will be output as attributes of the <testsuites> element.
  static void RecordProperty(const std::string& key, const std::string& value);
  static void RecordProperty(const std::string& key, int value);

 protected:
  // Creates a Test object.
  Test();

  // Sets up the test fixture.
  virtual void SetUp();

  // Tears down the test fixture.
  virtual void TearDown();

 private:
  // Returns true if and only if the current test has the same fixture class
  // as the first test in the current test suite.
  static bool HasSameFixtureClass();

  // Runs the test after the test fixture has been set up.
  //
  // A sub-class must implement this to define the test logic.
  //
  // DO NOT OVERRIDE THIS FUNCTION DIRECTLY IN A USER PROGRAM.
  // Instead, use the TEST or TEST_F macro.
  virtual void TestBody() = 0;

  // Sets up, executes, and tears down the test.
  void Run();

  // Deletes self.  We deliberately pick an unusual name for this
  // internal method to avoid clashing with names used in user TESTs.
  void DeleteSelf_() { delete this; }

  const std::unique_ptr<GTEST_FLAG_SAVER_> gtest_flag_saver_;

  // Often a user misspells SetUp() as Setup() and spends a long time
  // wondering why it is never called by Google Test.  The declaration of
  // the following method is solely for catching such an error at
  // compile time:
  //
  //   - The return type is deliberately chosen to be not void, so it
  //   will be a conflict if void Setup() is declared in the user's
  //   test fixture.
  //
  //   - This method is private, so it will be another compiler error
  //   if the method is called from the user's test fixture.
  //
  // DO NOT OVERRIDE THIS FUNCTION.
  //
  // If you see an error about overriding the following function or
  // about it being private, you have mis-spelled SetUp() as Setup().
  struct Setup_should_be_spelled_SetUp {};
  virtual Setup_should_be_spelled_SetUp* Setup() { return nullptr; }

  // We disallow copying Tests.
  Test(const Test&) = delete;
  Test& operator=(const Test&) = delete;
};

typedef internal::TimeInMillis TimeInMillis;

// A copyable object representing a user specified test property which can be
// output as a key/value string pair.
//
// Don't inherit from TestProperty as its destructor is not virtual.
class TestProperty {
 public:
  // C'tor.  TestProperty does NOT have a default constructor.
  // Always use this constructor (with parameters) to create a
  // TestProperty object.
  TestProperty(const std::string& a_key, const std::string& a_value)
      : key_(a_key), value_(a_value) {}

  // Gets the user supplied key.
  const char* key() const { return key_.c_str(); }

  // Gets the user supplied value.
  const char* value() const { return value_.c_str(); }

  // Sets a new value, overriding the one supplied in the constructor.
  void SetValue(const std::string& new_value) { value_ = new_value; }

 private:
  // The key supplied by the user.
  std::string key_;
  // The value supplied by the user.
  std::string value_;
};

// The result of a single Test.  This includes a list of
// TestPartResults, a list of TestProperties, a count of how many
// death tests there are in the Test, and how much time it took to run
// the Test.
//
// TestResult is not copyable.
class GTEST_API_ TestResult {
 public:
  // Creates an empty TestResult.
  TestResult();

  // D'tor.  Do not inherit from TestResult.
  ~TestResult();

  // Gets the number of all test parts.  This is the sum of the number
  // of successful test parts and the number of failed test parts.
  int total_part_count() const;

  // Returns the number of the test properties.
  int test_property_count() const;

  // Returns true if and only if the test passed (i.e. no test part failed).
  bool Passed() const { return !Skipped() && !Failed(); }

  // Returns true if and only if the test was skipped.
  bool Skipped() const;

  // Returns true if and only if the test failed.
  bool Failed() const;

  // Returns true if and only if the test fatally failed.
  bool HasFatalFailure() const;

  // Returns true if and only if the test has a non-fatal failure.
  bool HasNonfatalFailure() const;

  // Returns the elapsed time, in milliseconds.
  TimeInMillis elapsed_time() const { return elapsed_time_; }

  // Gets the time of the test case start, in ms from the start of the
  // UNIX epoch.
  TimeInMillis start_timestamp() const { return start_timestamp_; }

  // Returns the i-th test part result among all the results. i can range from 0
  // to total_part_count() - 1. If i is not in that range, aborts the program.
  const TestPartResult& GetTestPartResult(int i) const;

  // Returns the i-th test property. i can range from 0 to
  // test_property_count() - 1. If i is not in that range, aborts the
  // program.
  const TestProperty& GetTestProperty(int i) const;

 private:
  friend class TestInfo;
  friend class TestSuite;
  friend class UnitTest;
  friend class internal::DefaultGlobalTestPartResultReporter;
  friend class internal::ExecDeathTest;
  friend class internal::TestResultAccessor;
  friend class internal::UnitTestImpl;
  friend class internal::WindowsDeathTest;
  friend class internal::FuchsiaDeathTest;

  // Gets the vector of TestPartResults.
  const std::vector<TestPartResult>& test_part_results() const {
    return test_part_results_;
  }

  // Gets the vector of TestProperties.
  const std::vector<TestProperty>& test_properties() const {
    return test_properties_;
  }

  // Sets the start time.
  void set_start_timestamp(TimeInMillis start) { start_timestamp_ = start; }

  // Sets the elapsed time.
  void set_elapsed_time(TimeInMillis elapsed) { elapsed_time_ = elapsed; }

  // Adds a test property to the list. The property is validated and may add
  // a non-fatal failure if invalid (e.g., if it conflicts with reserved
  // key names). If a property is already recorded for the same key, the
  // value will be updated, rather than storing multiple values for the same
  // key.  xml_element specifies the element for which the property is being
  // recorded and is used for validation.
  void RecordProperty(const std::string& xml_element,
                      const TestProperty& test_property);

  // Adds a failure if the key is a reserved attribute of Google Test
  // testsuite tags.  Returns true if the property is valid.
  // FIXME: Validate attribute names are legal and human readable.
  static bool ValidateTestProperty(const std::string& xml_element,
                                   const TestProperty& test_property);

  // Adds a test part result to the list.
  void AddTestPartResult(const TestPartResult& test_part_result);

  // Returns the death test count.
  int death_test_count() const { return death_test_count_; }

  // Increments the death test count, returning the new count.
  int increment_death_test_count() { return ++death_test_count_; }

  // Clears the test part results.
  void ClearTestPartResults();

  // Clears the object.
  void Clear();

  // Protects mutable state of the property vector and of owned
  // properties, whose values may be updated.
  internal::Mutex test_properties_mutex_;

  // The vector of TestPartResults
  std::vector<TestPartResult> test_part_results_;
  // The vector of TestProperties
  std::vector<TestProperty> test_properties_;
  // Running count of death tests.
  int death_test_count_;
  // The start time, in milliseconds since UNIX Epoch.
  TimeInMillis start_timestamp_;
  // The elapsed time, in milliseconds.
  TimeInMillis elapsed_time_;

  // We disallow copying TestResult.
  TestResult(const TestResult&) = delete;
  TestResult& operator=(const TestResult&) = delete;
};  // class TestResult

// A TestInfo object stores the following information about a test:
//
//   Test suite name
//   Test name
//   Whether the test should be run
//   A function pointer that creates the test object when invoked
//   Test result
//
// The constructor of TestInfo registers itself with the UnitTest
// singleton such that the RUN_ALL_TESTS() macro knows which tests to
// run.
class GTEST_API_ TestInfo {
 public:
  // Destructs a TestInfo object.  This function is not virtual, so
  // don't inherit from TestInfo.
  ~TestInfo();

  // Returns the test suite name.
  const char* test_suite_name() const { return test_suite_name_.c_str(); }

// Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
  const char* test_case_name() const { return test_suite_name(); }
#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 540 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

  // Returns the test name.
  const char* name() const { return name_.c_str(); }

  // Returns the name of the parameter type, or NULL if this is not a typed
  // or a type-parameterized test.
  const char* type_param() const {
    if (type_param_.get() != nullptr) return type_param_->c_str();
    return nullptr;
  }

  // Returns the text representation of the value parameter, or NULL if this
  // is not a value-parameterized test.
  const char* value_param() const {
    if (value_param_.get() != nullptr) return value_param_->c_str();
    return nullptr;
  }

  // Returns the file name where this test is defined.
  const char* file() const { return location_.file.c_str(); }

  // Returns the line where this test is defined.
  int line() const { return location_.line; }

  // Return true if this test should not be run because it's in another shard.
  bool is_in_another_shard() const { return is_in_another_shard_; }

  // Returns true if this test should run, that is if the test is not
  // disabled (or it is disabled but the also_run_disabled_tests flag has
  // been specified) and its full name matches the user-specified filter.
  //
  // Google Test allows the user to filter the tests by their full names.
  // The full name of a test Bar in test suite Foo is defined as
  // "Foo.Bar".  Only the tests that match the filter will run.
  //
  // A filter is a colon-separated list of glob (not regex) patterns,
  // optionally followed by a '-' and a colon-separated list of
  // negative patterns (tests to exclude).  A test is run if it
  // matches one of the positive patterns and does not match any of
  // the negative patterns.
  //
  // For example, *A*:Foo.* is a filter that matches any string that
  // contains the character 'A' or starts with "Foo.".
  bool should_run() const { return should_run_; }

  // Returns true if and only if this test will appear in the XML report.
  bool is_reportable() const {
    // The XML report includes tests matching the filter, excluding those
    // run in other shards.
    return matches_filter_ && !is_in_another_shard_;
  }

  // Returns the result of the test.
  const TestResult* result() const { return &result_; }

 private:
#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_DEATH_TEST
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 597 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
  friend class internal::DefaultDeathTestFactory;
#endif  // GTEST_HAS_DEATH_TEST
# 599 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
  friend class Test;
  friend class TestSuite;
  friend class internal::UnitTestImpl;
  friend class internal::StreamingListenerTest;
  friend TestInfo* internal::MakeAndRegisterTestInfo(
      const char* test_suite_name, const char* name, const char* type_param,
      const char* value_param, internal::CodeLocation code_location,
      internal::TypeId fixture_class_id, internal::SetUpTestSuiteFunc set_up_tc,
      internal::TearDownTestSuiteFunc tear_down_tc,
      internal::TestFactoryBase* factory);

  // Constructs a TestInfo object. The newly constructed instance assumes
  // ownership of the factory object.
  TestInfo(const std::string& test_suite_name, const std::string& name,
           const char* a_type_param,   // NULL if not a type-parameterized test
           const char* a_value_param,  // NULL if not a value-parameterized test
           internal::CodeLocation a_code_location,
           internal::TypeId fixture_class_id,
           internal::TestFactoryBase* factory);

  // Increments the number of death tests encountered in this test so
  // far.
  int increment_death_test_count() {
    return result_.increment_death_test_count();
  }

  // Creates the test object, runs it, records its result, and then
  // deletes it.
  void Run();

  // Skip and records the test result for this object.
  void Skip();

  static void ClearTestResult(TestInfo* test_info) {
    test_info->result_.Clear();
  }

  // These fields are immutable properties of the test.
  const std::string test_suite_name_;  // test suite name
  const std::string name_;             // Test name
  // Name of the parameter type, or NULL if this is not a typed or a
  // type-parameterized test.
  const std::unique_ptr<const ::std::string> type_param_;
  // Text representation of the value parameter, or NULL if this is not a
  // value-parameterized test.
  const std::unique_ptr<const ::std::string> value_param_;
  internal::CodeLocation location_;
  const internal::TypeId fixture_class_id_;  // ID of the test fixture class
  bool should_run_;           // True if and only if this test should run
  bool is_disabled_;          // True if and only if this test is disabled
  bool matches_filter_;       // True if this test matches the
                              // user-specified filter.
  bool is_in_another_shard_;  // Will be run in another shard.
  internal::TestFactoryBase* const factory_;  // The factory that creates
                                              // the test object

  // This field is mutable and needs to be reset before running the
  // test for the second time.
  TestResult result_;

  TestInfo(const TestInfo&) = delete;
  TestInfo& operator=(const TestInfo&) = delete;
};

// A test suite, which consists of a vector of TestInfos.
//
// TestSuite is not copyable.
class GTEST_API_ TestSuite {
 public:
  // Creates a TestSuite with the given name.
  //
  // TestSuite does NOT have a default constructor.  Always use this
  // constructor to create a TestSuite object.
  //
  // Arguments:
  //
  //   name:         name of the test suite
  //   a_type_param: the name of the test's type parameter, or NULL if
  //                 this is not a type-parameterized test.
  //   set_up_tc:    pointer to the function that sets up the test suite
  //   tear_down_tc: pointer to the function that tears down the test suite
  TestSuite(const char* name, const char* a_type_param,
            internal::SetUpTestSuiteFunc set_up_tc,
            internal::TearDownTestSuiteFunc tear_down_tc);

  // Destructor of TestSuite.
  virtual ~TestSuite();

  // Gets the name of the TestSuite.
  const char* name() const { return name_.c_str(); }

  // Returns the name of the parameter type, or NULL if this is not a
  // type-parameterized test suite.
  const char* type_param() const {
    if (type_param_.get() != nullptr) return type_param_->c_str();
    return nullptr;
  }

  // Returns true if any test in this test suite should run.
  bool should_run() const { return should_run_; }

  // Gets the number of successful tests in this test suite.
  int successful_test_count() const;

  // Gets the number of skipped tests in this test suite.
  int skipped_test_count() const;

  // Gets the number of failed tests in this test suite.
  int failed_test_count() const;

  // Gets the number of disabled tests that will be reported in the XML report.
  int reportable_disabled_test_count() const;

  // Gets the number of disabled tests in this test suite.
  int disabled_test_count() const;

  // Gets the number of tests to be printed in the XML report.
  int reportable_test_count() const;

  // Get the number of tests in this test suite that should run.
  int test_to_run_count() const;

  // Gets the number of all tests in this test suite.
  int total_test_count() const;

  // Returns true if and only if the test suite passed.
  bool Passed() const { return !Failed(); }

  // Returns true if and only if the test suite failed.
  bool Failed() const {
    return failed_test_count() > 0 || ad_hoc_test_result().Failed();
  }

  // Returns the elapsed time, in milliseconds.
  TimeInMillis elapsed_time() const { return elapsed_time_; }

  // Gets the time of the test suite start, in ms from the start of the
  // UNIX epoch.
  TimeInMillis start_timestamp() const { return start_timestamp_; }

  // Returns the i-th test among all the tests. i can range from 0 to
  // total_test_count() - 1. If i is not in that range, returns NULL.
  const TestInfo* GetTestInfo(int i) const;

  // Returns the TestResult that holds test properties recorded during
  // execution of SetUpTestSuite and TearDownTestSuite.
  const TestResult& ad_hoc_test_result() const { return ad_hoc_test_result_; }

 private:
  friend class Test;
  friend class internal::UnitTestImpl;

  // Gets the (mutable) vector of TestInfos in this TestSuite.
  std::vector<TestInfo*>& test_info_list() { return test_info_list_; }

  // Gets the (immutable) vector of TestInfos in this TestSuite.
  const std::vector<TestInfo*>& test_info_list() const {
    return test_info_list_;
  }

  // Returns the i-th test among all the tests. i can range from 0 to
  // total_test_count() - 1. If i is not in that range, returns NULL.
  TestInfo* GetMutableTestInfo(int i);

  // Sets the should_run member.
  void set_should_run(bool should) { should_run_ = should; }

  // Adds a TestInfo to this test suite.  Will delete the TestInfo upon
  // destruction of the TestSuite object.
  void AddTestInfo(TestInfo* test_info);

  // Clears the results of all tests in this test suite.
  void ClearResult();

  // Clears the results of all tests in the given test suite.
  static void ClearTestSuiteResult(TestSuite* test_suite) {
    test_suite->ClearResult();
  }

  // Runs every test in this TestSuite.
  void Run();

  // Skips the execution of tests under this TestSuite
  void Skip();

  // Runs SetUpTestSuite() for this TestSuite.  This wrapper is needed
  // for catching exceptions thrown from SetUpTestSuite().
  void RunSetUpTestSuite() {
    if (set_up_tc_ != nullptr) {
      (*set_up_tc_)();
    }
  }

  // Runs TearDownTestSuite() for this TestSuite.  This wrapper is
  // needed for catching exceptions thrown from TearDownTestSuite().
  void RunTearDownTestSuite() {
    if (tear_down_tc_ != nullptr) {
      (*tear_down_tc_)();
    }
  }

  // Returns true if and only if test passed.
  static bool TestPassed(const TestInfo* test_info) {
    return test_info->should_run() && test_info->result()->Passed();
  }

  // Returns true if and only if test skipped.
  static bool TestSkipped(const TestInfo* test_info) {
    return test_info->should_run() && test_info->result()->Skipped();
  }

  // Returns true if and only if test failed.
  static bool TestFailed(const TestInfo* test_info) {
    return test_info->should_run() && test_info->result()->Failed();
  }

  // Returns true if and only if the test is disabled and will be reported in
  // the XML report.
  static bool TestReportableDisabled(const TestInfo* test_info) {
    return test_info->is_reportable() && test_info->is_disabled_;
  }

  // Returns true if and only if test is disabled.
  static bool TestDisabled(const TestInfo* test_info) {
    return test_info->is_disabled_;
  }

  // Returns true if and only if this test will appear in the XML report.
  static bool TestReportable(const TestInfo* test_info) {
    return test_info->is_reportable();
  }

  // Returns true if the given test should run.
  static bool ShouldRunTest(const TestInfo* test_info) {
    return test_info->should_run();
  }

  // Shuffles the tests in this test suite.
  void ShuffleTests(internal::Random* random);

  // Restores the test order to before the first shuffle.
  void UnshuffleTests();

  // Name of the test suite.
  std::string name_;
  // Name of the parameter type, or NULL if this is not a typed or a
  // type-parameterized test.
  const std::unique_ptr<const ::std::string> type_param_;
  // The vector of TestInfos in their original order.  It owns the
  // elements in the vector.
  std::vector<TestInfo*> test_info_list_;
  // Provides a level of indirection for the test list to allow easy
  // shuffling and restoring the test order.  The i-th element in this
  // vector is the index of the i-th test in the shuffled test list.
  std::vector<int> test_indices_;
  // Pointer to the function that sets up the test suite.
  internal::SetUpTestSuiteFunc set_up_tc_;
  // Pointer to the function that tears down the test suite.
  internal::TearDownTestSuiteFunc tear_down_tc_;
  // True if and only if any test in this test suite should run.
  bool should_run_;
  // The start time, in milliseconds since UNIX Epoch.
  TimeInMillis start_timestamp_;
  // Elapsed time, in milliseconds.
  TimeInMillis elapsed_time_;
  // Holds test properties recorded during execution of SetUpTestSuite and
  // TearDownTestSuite.
  TestResult ad_hoc_test_result_;

  // We disallow copying TestSuites.
  TestSuite(const TestSuite&) = delete;
  TestSuite& operator=(const TestSuite&) = delete;
};

// An Environment object is capable of setting up and tearing down an
// environment.  You should subclass this to define your own
// environment(s).
//
// An Environment object does the set-up and tear-down in virtual
// methods SetUp() and TearDown() instead of the constructor and the
// destructor, as:
//
//   1. You cannot safely throw from a destructor.  This is a problem
//      as in some cases Google Test is used where exceptions are enabled, and
//      we may want to implement ASSERT_* using exceptions where they are
//      available.
//   2. You cannot use ASSERT_* directly in a constructor or
//      destructor.
class Environment {
 public:
  // The d'tor is virtual as we need to subclass Environment.
  virtual ~Environment() {}

  // Override this to define how to set up the environment.
  virtual void SetUp() {}

  // Override this to define how to tear down the environment.
  virtual void TearDown() {}

 private:
  // If you see an error about overriding the following function or
  // about it being private, you have mis-spelled SetUp() as Setup().
  struct Setup_should_be_spelled_SetUp {};
  virtual Setup_should_be_spelled_SetUp* Setup() { return nullptr; }
};

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_EXCEPTIONS
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 906 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

// Exception which can be thrown from TestEventListener::OnTestPartResult.
class GTEST_API_ AssertionException
    : public internal::GoogleTestFailureException {
 public:
  explicit AssertionException(const TestPartResult& result)
      : GoogleTestFailureException(result) {}
};

#endif  // GTEST_HAS_EXCEPTIONS
# 916 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

// The interface for tracing execution of tests. The methods are organized in
// the order the corresponding events are fired.
class TestEventListener {
 public:
  virtual ~TestEventListener() {}

  // Fired before any test activity starts.
  virtual void OnTestProgramStart(const UnitTest& unit_test) = 0;

  // Fired before each iteration of tests starts.  There may be more than
  // one iteration if GTEST_FLAG(repeat) is set. iteration is the iteration
  // index, starting from 0.
  virtual void OnTestIterationStart(const UnitTest& unit_test,
                                    int iteration) = 0;

  // Fired before environment set-up for each iteration of tests starts.
  virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test) = 0;

  // Fired after environment set-up for each iteration of tests ends.
  virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) = 0;

  // Fired before the test suite starts.
  virtual void OnTestSuiteStart(const TestSuite& /*test_suite*/) {}

  //  Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
  virtual void OnTestCaseStart(const TestCase& /*test_case*/) {}
#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 945 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

  // Fired before the test starts.
  virtual void OnTestStart(const TestInfo& test_info) = 0;

  // Fired when a test is disabled
  virtual void OnTestDisabled(const TestInfo& /*test_info*/) {}

  // Fired after a failed assertion or a SUCCEED() invocation.
  // If you want to throw an exception from this function to skip to the next
  // TEST, it must be AssertionException defined above, or inherited from it.
  virtual void OnTestPartResult(const TestPartResult& test_part_result) = 0;

  // Fired after the test ends.
  virtual void OnTestEnd(const TestInfo& test_info) = 0;

  // Fired after the test suite ends.
  virtual void OnTestSuiteEnd(const TestSuite& /*test_suite*/) {}

//  Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
  virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {}
#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 967 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

  // Fired before environment tear-down for each iteration of tests starts.
  virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test) = 0;

  // Fired after environment tear-down for each iteration of tests ends.
  virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test) = 0;

  // Fired after each iteration of tests finishes.
  virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration) = 0;

  // Fired after all test activities have ended.
  virtual void OnTestProgramEnd(const UnitTest& unit_test) = 0;
};

// The convenience class for users who need to override just one or two
// methods and are not concerned that a possible change to a signature of
// the methods they override will not be caught during the build.  For
// comments about each method please see the definition of TestEventListener
// above.
class EmptyTestEventListener : public TestEventListener {
 public:
  void OnTestProgramStart(const UnitTest& /*unit_test*/) override {}
  void OnTestIterationStart(const UnitTest& /*unit_test*/,
                            int /*iteration*/) override {}
  void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) override {}
  void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) override {}
  void OnTestSuiteStart(const TestSuite& /*test_suite*/) override {}
//  Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
  void OnTestCaseStart(const TestCase& /*test_case*/) override {}
#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 998 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

  void OnTestStart(const TestInfo& /*test_info*/) override {}
  void OnTestDisabled(const TestInfo& /*test_info*/) override {}
  void OnTestPartResult(const TestPartResult& /*test_part_result*/) override {}
  void OnTestEnd(const TestInfo& /*test_info*/) override {}
  void OnTestSuiteEnd(const TestSuite& /*test_suite*/) override {}
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
  void OnTestCaseEnd(const TestCase& /*test_case*/) override {}
#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 1007 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

  void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) override {}
  void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) override {}
  void OnTestIterationEnd(const UnitTest& /*unit_test*/,
                          int /*iteration*/) override {}
  void OnTestProgramEnd(const UnitTest& /*unit_test*/) override {}
};

// TestEventListeners lets users add listeners to track events in Google Test.
class GTEST_API_ TestEventListeners {
 public:
  TestEventListeners();
  ~TestEventListeners();

  // Appends an event listener to the end of the list. Google Test assumes
  // the ownership of the listener (i.e. it will delete the listener when
  // the test program finishes).
  void Append(TestEventListener* listener);

  // Removes the given event listener from the list and returns it.  It then
  // becomes the caller's responsibility to delete the listener. Returns
  // NULL if the listener is not found in the list.
  TestEventListener* Release(TestEventListener* listener);

  // Returns the standard listener responsible for the default console
  // output.  Can be removed from the listeners list to shut down default
  // console output.  Note that removing this object from the listener list
  // with Release transfers its ownership to the caller and makes this
  // function return NULL the next time.
  TestEventListener* default_result_printer() const {
    return default_result_printer_;
  }

  // Returns the standard listener responsible for the default XML output
  // controlled by the --gtest_output=xml flag.  Can be removed from the
  // listeners list by users who want to shut down the default XML output
  // controlled by this flag and substitute it with custom one.  Note that
  // removing this object from the listener list with Release transfers its
  // ownership to the caller and makes this function return NULL the next
  // time.
  TestEventListener* default_xml_generator() const {
    return default_xml_generator_;
  }

 private:
  friend class TestSuite;
  friend class TestInfo;
  friend class internal::DefaultGlobalTestPartResultReporter;
  friend class internal::NoExecDeathTest;
  friend class internal::TestEventListenersAccessor;
  friend class internal::UnitTestImpl;

  // Returns repeater that broadcasts the TestEventListener events to all
  // subscribers.
  TestEventListener* repeater();

  // Sets the default_result_printer attribute to the provided listener.
  // The listener is also added to the listener list and previous
  // default_result_printer is removed from it and deleted. The listener can
  // also be NULL in which case it will not be added to the list. Does
  // nothing if the previous and the current listener objects are the same.
  void SetDefaultResultPrinter(TestEventListener* listener);

  // Sets the default_xml_generator attribute to the provided listener.  The
  // listener is also added to the listener list and previous
  // default_xml_generator is removed from it and deleted. The listener can
  // also be NULL in which case it will not be added to the list. Does
  // nothing if the previous and the current listener objects are the same.
  void SetDefaultXmlGenerator(TestEventListener* listener);

  // Controls whether events will be forwarded by the repeater to the
  // listeners in the list.
  bool EventForwardingEnabled() const;
  void SuppressEventForwarding();

  // The actual list of listeners.
  internal::TestEventRepeater* repeater_;
  // Listener responsible for the standard result output.
  TestEventListener* default_result_printer_;
  // Listener responsible for the creation of the XML output file.
  TestEventListener* default_xml_generator_;

  // We disallow copying TestEventListeners.
  TestEventListeners(const TestEventListeners&) = delete;
  TestEventListeners& operator=(const TestEventListeners&) = delete;
};

// A UnitTest consists of a vector of TestSuites.
//
// This is a singleton class.  The only instance of UnitTest is
// created when UnitTest::GetInstance() is first called.  This
// instance is never deleted.
//
// UnitTest is not copyable.
//
// This class is thread-safe as long as the methods are called
// according to their specification.
class GTEST_API_ UnitTest {
 public:
  // Gets the singleton UnitTest object.  The first time this method
  // is called, a UnitTest object is constructed and returned.
  // Consecutive calls will return the same object.
  static UnitTest* GetInstance();

  // Runs all tests in this UnitTest object and prints the result.
  // Returns 0 if successful, or 1 otherwise.
  //
  // This method can only be called from the main thread.
  //
  // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
  int Run() GTEST_MUST_USE_RESULT_;

  // Returns the working directory when the first TEST() or TEST_F()
  // was executed.  The UnitTest object owns the string.
  const char* original_working_dir() const;

  // Returns the TestSuite object for the test that's currently running,
  // or NULL if no test is running.
  const TestSuite* current_test_suite() const GTEST_LOCK_EXCLUDED_(mutex_);

// Legacy API is still available but deprecated
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
  const TestCase* current_test_case() const GTEST_LOCK_EXCLUDED_(mutex_);
#endif
# 1131 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

  // Returns the TestInfo object for the test that's currently running,
  // or NULL if no test is running.
  const TestInfo* current_test_info() const GTEST_LOCK_EXCLUDED_(mutex_);

  // Returns the random seed used at the start of the current test run.
  int random_seed() const;

  // Returns the ParameterizedTestSuiteRegistry object used to keep track of
  // value-parameterized tests and instantiate and register them.
  //
  // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
  internal::ParameterizedTestSuiteRegistry& parameterized_test_registry()
      GTEST_LOCK_EXCLUDED_(mutex_);

  // Gets the number of successful test suites.
  int successful_test_suite_count() const;

  // Gets the number of failed test suites.
  int failed_test_suite_count() const;

  // Gets the number of all test suites.
  int total_test_suite_count() const;

  // Gets the number of all test suites that contain at least one test
  // that should run.
  int test_suite_to_run_count() const;

  //  Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
  int successful_test_case_count() const;
  int failed_test_case_count() const;
  int total_test_case_count() const;
  int test_case_to_run_count() const;
#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 1166 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

  // Gets the number of successful tests.
  int successful_test_count() const;

  // Gets the number of skipped tests.
  int skipped_test_count() const;

  // Gets the number of failed tests.
  int failed_test_count() const;

  // Gets the number of disabled tests that will be reported in the XML report.
  int reportable_disabled_test_count() const;

  // Gets the number of disabled tests.
  int disabled_test_count() const;

  // Gets the number of tests to be printed in the XML report.
  int reportable_test_count() const;

  // Gets the number of all tests.
  int total_test_count() const;

  // Gets the number of tests that should run.
  int test_to_run_count() const;

  // Gets the time of the test program start, in ms from the start of the
  // UNIX epoch.
  TimeInMillis start_timestamp() const;

  // Gets the elapsed time, in milliseconds.
  TimeInMillis elapsed_time() const;

  // Returns true if and only if the unit test passed (i.e. all test suites
  // passed).
  bool Passed() const;

  // Returns true if and only if the unit test failed (i.e. some test suite
  // failed or something outside of all tests failed).
  bool Failed() const;

  // Gets the i-th test suite among all the test suites. i can range from 0 to
  // total_test_suite_count() - 1. If i is not in that range, returns NULL.
  const TestSuite* GetTestSuite(int i) const;

//  Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
  const TestCase* GetTestCase(int i) const;
#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
# 1214 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

  // Returns the TestResult containing information on test failures and
  // properties logged outside of individual test suites.
  const TestResult& ad_hoc_test_result() const;

  // Returns the list of event listeners that can be used to track events
  // inside Google Test.
  TestEventListeners& listeners();

 private:
  // Registers and returns a global test environment.  When a test
  // program is run, all global test environments will be set-up in
  // the order they were registered.  After all tests in the program
  // have finished, all global test environments will be torn-down in
  // the *reverse* order they were registered.
  //
  // The UnitTest object takes ownership of the given environment.
  //
  // This method can only be called from the main thread.
  Environment* AddEnvironment(Environment* env);

  // Adds a TestPartResult to the current TestResult object.  All
  // Google Test assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc)
  // eventually call this to report their results.  The user code
  // should use the assertion macros instead of calling this directly.
  void AddTestPartResult(TestPartResult::Type result_type,
                         const char* file_name, int line_number,
                         const std::string& message,
                         const std::string& os_stack_trace)
      GTEST_LOCK_EXCLUDED_(mutex_);

  // Adds a TestProperty to the current TestResult object when invoked from
  // inside a test, to current TestSuite's ad_hoc_test_result_ when invoked
  // from SetUpTestSuite or TearDownTestSuite, or to the global property set
  // when invoked elsewhere.  If the result already contains a property with
  // the same key, the value will be updated.
  void RecordProperty(const std::string& key, const std::string& value);

  // Gets the i-th test suite among all the test suites. i can range from 0 to
  // total_test_suite_count() - 1. If i is not in that range, returns NULL.
  TestSuite* GetMutableTestSuite(int i);

  // Accessors for the implementation object.
  internal::UnitTestImpl* impl() { return impl_; }
  const internal::UnitTestImpl* impl() const { return impl_; }

  // These classes and functions are friends as they need to access private
  // members of UnitTest.
  friend class ScopedTrace;
  friend class Test;
  friend class internal::AssertHelper;
  friend class internal::StreamingListenerTest;
  friend class internal::UnitTestRecordPropertyTestHelper;
  friend Environment* AddGlobalTestEnvironment(Environment* env);
  friend std::set<std::string>* internal::GetIgnoredParameterizedTestSuites();
  friend internal::UnitTestImpl* internal::GetUnitTestImpl();
  friend void internal::ReportFailureInUnknownLocation(
      TestPartResult::Type result_type, const std::string& message);

  // Creates an empty UnitTest.
  UnitTest();

  // D'tor
  virtual ~UnitTest();

  // Pushes a trace defined by SCOPED_TRACE() on to the per-thread
  // Google Test trace stack.
  void PushGTestTrace(const internal::TraceInfo& trace)
      GTEST_LOCK_EXCLUDED_(mutex_);

  // Pops a trace from the per-thread Google Test trace stack.
  void PopGTestTrace() GTEST_LOCK_EXCLUDED_(mutex_);

  // Protects mutable state in *impl_.  This is mutable as some const
  // methods need to lock it too.
  mutable internal::Mutex mutex_;

  // Opaque implementation object.  This field is never changed once
  // the object is constructed.  We don't mark it as const here, as
  // doing so will cause a warning in the constructor of UnitTest.
  // Mutable state in *impl_ is protected by mutex_.
  internal::UnitTestImpl* impl_;

  // We disallow copying UnitTest.
  UnitTest(const UnitTest&) = delete;
  UnitTest& operator=(const UnitTest&) = delete;
};

// A convenient wrapper for adding an environment for the test
// program.
//
// You should call this before RUN_ALL_TESTS() is called, probably in
// main().  If you use gtest_main, you need to call this before main()
// starts for it to take effect.  For example, you can define a global
// variable like this:
//
//   testing::Environment* const foo_env =
//       testing::AddGlobalTestEnvironment(new FooEnvironment);
//
// However, we strongly recommend you to write your own main() and
// call AddGlobalTestEnvironment() there, as relying on initialization
// of global variables makes the code harder to read and may cause
// problems when you register multiple environments from different
// translation units and the environments have dependencies among them
// (remember that the compiler doesn't guarantee the order in which
// global variables from different translation units are initialized).
inline Environment* AddGlobalTestEnvironment(Environment* env) {
  return UnitTest::GetInstance()->AddEnvironment(env);
}

// Initializes Google Test.  This must be called before calling
// RUN_ALL_TESTS().  In particular, it parses a command line for the
// flags that Google Test recognizes.  Whenever a Google Test flag is
// seen, it is removed from argv, and *argc is decremented.
//
// No value is returned.  Instead, the Google Test flag variables are
// updated.
//
// Calling the function for the second time has no user-visible effect.
GTEST_API_ void InitGoogleTest(int* argc, char** argv);

// This overloaded version can be used in Windows programs compiled in
// UNICODE mode.
GTEST_API_ void InitGoogleTest(int* argc, wchar_t** argv);

// This overloaded version can be used on Arduino/embedded platforms where
// there is no argc/argv.
GTEST_API_ void InitGoogleTest();

namespace internal {

// Separate the error generating code from the code path to reduce the stack
// frame size of CmpHelperEQ. This helps reduce the overhead of some sanitizers
// when calling EXPECT_* in a tight loop.
template <typename T1, typename T2>
AssertionResult CmpHelperEQFailure(const char* lhs_expression,
                                   const char* rhs_expression, const T1& lhs,
                                   const T2& rhs) {
  return EqFailure(lhs_expression, rhs_expression,
                   FormatForComparisonFailureMessage(lhs, rhs),
                   FormatForComparisonFailureMessage(rhs, lhs), false);
}

// This block of code defines operator==/!=
// to block lexical scope lookup.
// It prevents using invalid operator==/!= defined at namespace scope.
struct faketype {};
inline bool operator==(faketype, faketype) { return true; }
inline bool operator!=(faketype, faketype) { return false; }

// The helper function for {ASSERT|EXPECT}_EQ.
template <typename T1, typename T2>
AssertionResult CmpHelperEQ(const char* lhs_expression,
                            const char* rhs_expression, const T1& lhs,
                            const T2& rhs) {
  if (lhs == rhs) {
    return AssertionSuccess();
  }

  return CmpHelperEQFailure(lhs_expression, rhs_expression, lhs, rhs);
}

class EqHelper {
 public:
  // This templatized version is for the general case.
  template <
      typename T1, typename T2,
      // Disable this overload for cases where one argument is a pointer
      // and the other is the null pointer constant.
      typename std::enable_if<!std::is_integral<T1>::value ||
                              !std::is_pointer<T2>::value>::type* = nullptr>
  static AssertionResult Compare(const char* lhs_expression,
                                 const char* rhs_expression, const T1& lhs,
                                 const T2& rhs) {
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
  }

  // With this overloaded version, we allow anonymous enums to be used
  // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous
  // enums can be implicitly cast to BiggestInt.
  //
  // Even though its body looks the same as the above version, we
  // cannot merge the two, as it will make anonymous enums unhappy.
  static AssertionResult Compare(const char* lhs_expression,
                                 const char* rhs_expression, BiggestInt lhs,
                                 BiggestInt rhs) {
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
  }

  template <typename T>
  static AssertionResult Compare(
      const char* lhs_expression, const char* rhs_expression,
      // Handle cases where '0' is used as a null pointer literal.
      std::nullptr_t /* lhs */, T* rhs) {
    // We already know that 'lhs' is a null pointer.
    return CmpHelperEQ(lhs_expression, rhs_expression, static_cast<T*>(nullptr),
                       rhs);
  }
};

// Separate the error generating code from the code path to reduce the stack
// frame size of CmpHelperOP. This helps reduce the overhead of some sanitizers
// when calling EXPECT_OP in a tight loop.
template <typename T1, typename T2>
AssertionResult CmpHelperOpFailure(const char* expr1, const char* expr2,
                                   const T1& val1, const T2& val2,
                                   const char* op) {
  return AssertionFailure()
         << "Expected: (" << expr1 << ") " << op << " (" << expr2
         << "), actual: " << FormatForComparisonFailureMessage(val1, val2)
         << " vs " << FormatForComparisonFailureMessage(val2, val1);
}

// A macro for implementing the helper functions needed to implement
// ASSERT_?? and EXPECT_??.  It is here just to avoid copy-and-paste
// of similar code.
//
// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.

#define GTEST_IMPL_CMP_HELPER_(op_name, op)                                \
  template <typename T1, typename T2>                                      \
  AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \
                                     const T1& val1, const T2& val2) {     \
    if (val1 op val2) {                                                    \
      return AssertionSuccess();                                           \
    } else {                                                               \
      return CmpHelperOpFailure(expr1, expr2, val1, val2, #op);            \
    }                                                                      \
  }

// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.

// Implements the helper function for {ASSERT|EXPECT}_NE
GTEST_IMPL_CMP_HELPER_(NE, !=)
// Implements the helper function for {ASSERT|EXPECT}_LE
GTEST_IMPL_CMP_HELPER_(LE, <=)
// Implements the helper function for {ASSERT|EXPECT}_LT
GTEST_IMPL_CMP_HELPER_(LT, <)
// Implements the helper function for {ASSERT|EXPECT}_GE
GTEST_IMPL_CMP_HELPER_(GE, >=)
// Implements the helper function for {ASSERT|EXPECT}_GT
GTEST_IMPL_CMP_HELPER_(GT, >)

#undef GTEST_IMPL_CMP_HELPER_

// The helper function for {ASSERT|EXPECT}_STREQ.
//
// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
GTEST_API_ AssertionResult CmpHelperSTREQ(const char* s1_expression,
                                          const char* s2_expression,
                                          const char* s1, const char* s2);

// The helper function for {ASSERT|EXPECT}_STRCASEEQ.
//
// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
GTEST_API_ AssertionResult CmpHelperSTRCASEEQ(const char* s1_expression,
                                              const char* s2_expression,
                                              const char* s1, const char* s2);

// The helper function for {ASSERT|EXPECT}_STRNE.
//
// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,
                                          const char* s2_expression,
                                          const char* s1, const char* s2);

// The helper function for {ASSERT|EXPECT}_STRCASENE.
//
// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
GTEST_API_ AssertionResult CmpHelperSTRCASENE(const char* s1_expression,
                                              const char* s2_expression,
                                              const char* s1, const char* s2);

// Helper function for *_STREQ on wide strings.
//
// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
GTEST_API_ AssertionResult CmpHelperSTREQ(const char* s1_expression,
                                          const char* s2_expression,
                                          const wchar_t* s1, const wchar_t* s2);

// Helper function for *_STRNE on wide strings.
//
// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,
                                          const char* s2_expression,
                                          const wchar_t* s1, const wchar_t* s2);

}  // namespace internal

// IsSubstring() and IsNotSubstring() are intended to be used as the
// first argument to {EXPECT,ASSERT}_PRED_FORMAT2(), not by
// themselves.  They check whether needle is a substring of haystack
// (NULL is considered a substring of itself only), and return an
// appropriate error message when they fail.
//
// The {needle,haystack}_expr arguments are the stringified
// expressions that generated the two real arguments.
GTEST_API_ AssertionResult IsSubstring(const char* needle_expr,
                                       const char* haystack_expr,
                                       const char* needle,
                                       const char* haystack);
GTEST_API_ AssertionResult IsSubstring(const char* needle_expr,
                                       const char* haystack_expr,
                                       const wchar_t* needle,
                                       const wchar_t* haystack);
GTEST_API_ AssertionResult IsNotSubstring(const char* needle_expr,
                                          const char* haystack_expr,
                                          const char* needle,
                                          const char* haystack);
GTEST_API_ AssertionResult IsNotSubstring(const char* needle_expr,
                                          const char* haystack_expr,
                                          const wchar_t* needle,
                                          const wchar_t* haystack);
GTEST_API_ AssertionResult IsSubstring(const char* needle_expr,
                                       const char* haystack_expr,
                                       const ::std::string& needle,
                                       const ::std::string& haystack);
GTEST_API_ AssertionResult IsNotSubstring(const char* needle_expr,
                                          const char* haystack_expr,
                                          const ::std::string& needle,
                                          const ::std::string& haystack);

#if 0 /* disabled by -frewrite-includes */
#if GTEST_HAS_STD_WSTRING
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1537 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
GTEST_API_ AssertionResult IsSubstring(const char* needle_expr,
                                       const char* haystack_expr,
                                       const ::std::wstring& needle,
                                       const ::std::wstring& haystack);
GTEST_API_ AssertionResult IsNotSubstring(const char* needle_expr,
                                          const char* haystack_expr,
                                          const ::std::wstring& needle,
                                          const ::std::wstring& haystack);
#endif  // GTEST_HAS_STD_WSTRING
# 1546 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

namespace internal {

// Helper template function for comparing floating-points.
//
// Template parameter:
//
//   RawType: the raw floating-point type (either float or double)
//
// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
template <typename RawType>
AssertionResult CmpHelperFloatingPointEQ(const char* lhs_expression,
                                         const char* rhs_expression,
                                         RawType lhs_value, RawType rhs_value) {
  const FloatingPoint<RawType> lhs(lhs_value), rhs(rhs_value);

  if (lhs.AlmostEquals(rhs)) {
    return AssertionSuccess();
  }

  ::std::stringstream lhs_ss;
  lhs_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
         << lhs_value;

  ::std::stringstream rhs_ss;
  rhs_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
         << rhs_value;

  return EqFailure(lhs_expression, rhs_expression,
                   StringStreamToString(&lhs_ss), StringStreamToString(&rhs_ss),
                   false);
}

// Helper function for implementing ASSERT_NEAR.
//
// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
GTEST_API_ AssertionResult DoubleNearPredFormat(const char* expr1,
                                                const char* expr2,
                                                const char* abs_error_expr,
                                                double val1, double val2,
                                                double abs_error);

// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
// A class that enables one to stream messages to assertion macros
class GTEST_API_ AssertHelper {
 public:
  // Constructor.
  AssertHelper(TestPartResult::Type type, const char* file, int line,
               const char* message);
  ~AssertHelper();

  // Message assignment is a semantic trick to enable assertion
  // streaming; see the GTEST_MESSAGE_ macro below.
  void operator=(const Message& message) const;

 private:
  // We put our data in a struct so that the size of the AssertHelper class can
  // be as small as possible.  This is important because gcc is incapable of
  // re-using stack space even for temporary variables, so every EXPECT_EQ
  // reserves stack space for another AssertHelper.
  struct AssertHelperData {
    AssertHelperData(TestPartResult::Type t, const char* srcfile, int line_num,
                     const char* msg)
        : type(t), file(srcfile), line(line_num), message(msg) {}

    TestPartResult::Type const type;
    const char* const file;
    int const line;
    std::string const message;

   private:
    AssertHelperData(const AssertHelperData&) = delete;
    AssertHelperData& operator=(const AssertHelperData&) = delete;
  };

  AssertHelperData* const data_;

  AssertHelper(const AssertHelper&) = delete;
  AssertHelper& operator=(const AssertHelper&) = delete;
};

}  // namespace internal

// The pure interface class that all value-parameterized tests inherit from.
// A value-parameterized class must inherit from both ::testing::Test and
// ::testing::WithParamInterface. In most cases that just means inheriting
// from ::testing::TestWithParam, but more complicated test hierarchies
// may need to inherit from Test and WithParamInterface at different levels.
//
// This interface has support for accessing the test parameter value via
// the GetParam() method.
//
// Use it with one of the parameter generator defining functions, like Range(),
// Values(), ValuesIn(), Bool(), Combine(), and ConvertGenerator<T>().
//
// class FooTest : public ::testing::TestWithParam<int> {
//  protected:
//   FooTest() {
//     // Can use GetParam() here.
//   }
//   ~FooTest() override {
//     // Can use GetParam() here.
//   }
//   void SetUp() override {
//     // Can use GetParam() here.
//   }
//   void TearDown override {
//     // Can use GetParam() here.
//   }
// };
// TEST_P(FooTest, DoesBar) {
//   // Can use GetParam() method here.
//   Foo foo;
//   ASSERT_TRUE(foo.DoesBar(GetParam()));
// }
// INSTANTIATE_TEST_SUITE_P(OneToTenRange, FooTest, ::testing::Range(1, 10));

template <typename T>
class WithParamInterface {
 public:
  typedef T ParamType;
  virtual ~WithParamInterface() {}

  // The current parameter value. Is also available in the test fixture's
  // constructor.
  static const ParamType& GetParam() {
    GTEST_CHECK_(parameter_ != nullptr)
        << "GetParam() can only be called inside a value-parameterized test "
        << "-- did you intend to write TEST_P instead of TEST_F?";
    return *parameter_;
  }

 private:
  // Sets parameter value. The caller is responsible for making sure the value
  // remains alive and unchanged throughout the current test.
  static void SetParam(const ParamType* parameter) { parameter_ = parameter; }

  // Static value used for accessing parameter during a test lifetime.
  static const ParamType* parameter_;

  // TestClass must be a subclass of WithParamInterface<T> and Test.
  template <class TestClass>
  friend class internal::ParameterizedTestFactory;
};

template <typename T>
const T* WithParamInterface<T>::parameter_ = nullptr;

// Most value-parameterized classes can ignore the existence of
// WithParamInterface, and can just inherit from ::testing::TestWithParam.

template <typename T>
class TestWithParam : public Test, public WithParamInterface<T> {};

// Macros for indicating success/failure in test code.

// Skips test in runtime.
// Skipping test aborts current function.
// Skipped tests are neither successful nor failed.
#define GTEST_SKIP() GTEST_SKIP_("")

// ADD_FAILURE unconditionally adds a failure to the current test.
// SUCCEED generates a success - it doesn't automatically make the
// current test successful, as a test is only successful when it has
// no failure.
//
// EXPECT_* verifies that a certain condition is satisfied.  If not,
// it behaves like ADD_FAILURE.  In particular:
//
//   EXPECT_TRUE  verifies that a Boolean condition is true.
//   EXPECT_FALSE verifies that a Boolean condition is false.
//
// FAIL and ASSERT_* are similar to ADD_FAILURE and EXPECT_*, except
// that they will also abort the current function on failure.  People
// usually want the fail-fast behavior of FAIL and ASSERT_*, but those
// writing data-driven tests often find themselves using ADD_FAILURE
// and EXPECT_* more.

// Generates a nonfatal failure with a generic message.
#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed")

// Generates a nonfatal failure at the given source file location with
// a generic message.
#define ADD_FAILURE_AT(file, line)        \
  GTEST_MESSAGE_AT_(file, line, "Failed", \
                    ::testing::TestPartResult::kNonFatalFailure)

// Generates a fatal failure with a generic message.
#define GTEST_FAIL() GTEST_FATAL_FAILURE_("Failed")

// Like GTEST_FAIL(), but at the given source file location.
#define GTEST_FAIL_AT(file, line)         \
  GTEST_MESSAGE_AT_(file, line, "Failed", \
                    ::testing::TestPartResult::kFatalFailure)

// Define this macro to 1 to omit the definition of FAIL(), which is a
// generic name and clashes with some other libraries.
#if 0 /* disabled by -frewrite-includes */
#if !GTEST_DONT_DEFINE_FAIL
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1744 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#define FAIL() GTEST_FAIL()
#endif
# 1746 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

// Generates a success with a generic message.
#define GTEST_SUCCEED() GTEST_SUCCESS_("Succeeded")

// Define this macro to 1 to omit the definition of SUCCEED(), which
// is a generic name and clashes with some other libraries.
#if 0 /* disabled by -frewrite-includes */
#if !GTEST_DONT_DEFINE_SUCCEED
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1753 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#define SUCCEED() GTEST_SUCCEED()
#endif
# 1755 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

// Macros for testing exceptions.
//
//    * {ASSERT|EXPECT}_THROW(statement, expected_exception):
//         Tests that the statement throws the expected exception.
//    * {ASSERT|EXPECT}_NO_THROW(statement):
//         Tests that the statement doesn't throw any exception.
//    * {ASSERT|EXPECT}_ANY_THROW(statement):
//         Tests that the statement throws an exception.

#define EXPECT_THROW(statement, expected_exception) \
  GTEST_TEST_THROW_(statement, expected_exception, GTEST_NONFATAL_FAILURE_)
#define EXPECT_NO_THROW(statement) \
  GTEST_TEST_NO_THROW_(statement, GTEST_NONFATAL_FAILURE_)
#define EXPECT_ANY_THROW(statement) \
  GTEST_TEST_ANY_THROW_(statement, GTEST_NONFATAL_FAILURE_)
#define ASSERT_THROW(statement, expected_exception) \
  GTEST_TEST_THROW_(statement, expected_exception, GTEST_FATAL_FAILURE_)
#define ASSERT_NO_THROW(statement) \
  GTEST_TEST_NO_THROW_(statement, GTEST_FATAL_FAILURE_)
#define ASSERT_ANY_THROW(statement) \
  GTEST_TEST_ANY_THROW_(statement, GTEST_FATAL_FAILURE_)

// Boolean assertions. Condition can be either a Boolean expression or an
// AssertionResult. For more information on how to use AssertionResult with
// these macros see comments on that class.
#define GTEST_EXPECT_TRUE(condition)                      \
  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
                      GTEST_NONFATAL_FAILURE_)
#define GTEST_EXPECT_FALSE(condition)                        \
  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      GTEST_NONFATAL_FAILURE_)
#define GTEST_ASSERT_TRUE(condition) \
  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, GTEST_FATAL_FAILURE_)
#define GTEST_ASSERT_FALSE(condition)                        \
  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
                      GTEST_FATAL_FAILURE_)

// Define these macros to 1 to omit the definition of the corresponding
// EXPECT or ASSERT, which clashes with some users' own code.

#if 0 /* disabled by -frewrite-includes */
#if !GTEST_DONT_DEFINE_EXPECT_TRUE
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1797 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
#endif
# 1799 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

#if 0 /* disabled by -frewrite-includes */
#if !GTEST_DONT_DEFINE_EXPECT_FALSE
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1801 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
#endif
# 1803 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

#if 0 /* disabled by -frewrite-includes */
#if !GTEST_DONT_DEFINE_ASSERT_TRUE
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1805 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#define ASSERT_TRUE(condition) GTEST_ASSERT_TRUE(condition)
#endif
# 1807 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

#if 0 /* disabled by -frewrite-includes */
#if !GTEST_DONT_DEFINE_ASSERT_FALSE
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1809 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#define ASSERT_FALSE(condition) GTEST_ASSERT_FALSE(condition)
#endif
# 1811 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

// Macros for testing equalities and inequalities.
//
//    * {ASSERT|EXPECT}_EQ(v1, v2): Tests that v1 == v2
//    * {ASSERT|EXPECT}_NE(v1, v2): Tests that v1 != v2
//    * {ASSERT|EXPECT}_LT(v1, v2): Tests that v1 < v2
//    * {ASSERT|EXPECT}_LE(v1, v2): Tests that v1 <= v2
//    * {ASSERT|EXPECT}_GT(v1, v2): Tests that v1 > v2
//    * {ASSERT|EXPECT}_GE(v1, v2): Tests that v1 >= v2
//
// When they are not, Google Test prints both the tested expressions and
// their actual values.  The values must be compatible built-in types,
// or you will get a compiler error.  By "compatible" we mean that the
// values can be compared by the respective operator.
//
// Note:
//
//   1. It is possible to make a user-defined type work with
//   {ASSERT|EXPECT}_??(), but that requires overloading the
//   comparison operators and is thus discouraged by the Google C++
//   Usage Guide.  Therefore, you are advised to use the
//   {ASSERT|EXPECT}_TRUE() macro to assert that two objects are
//   equal.
//
//   2. The {ASSERT|EXPECT}_??() macros do pointer comparisons on
//   pointers (in particular, C strings).  Therefore, if you use it
//   with two C strings, you are testing how their locations in memory
//   are related, not how their content is related.  To compare two C
//   strings by content, use {ASSERT|EXPECT}_STR*().
//
//   3. {ASSERT|EXPECT}_EQ(v1, v2) is preferred to
//   {ASSERT|EXPECT}_TRUE(v1 == v2), as the former tells you
//   what the actual value is when it fails, and similarly for the
//   other comparisons.
//
//   4. Do not depend on the order in which {ASSERT|EXPECT}_??()
//   evaluate their arguments, which is undefined.
//
//   5. These macros evaluate their arguments exactly once.
//
// Examples:
//
//   EXPECT_NE(Foo(), 5);
//   EXPECT_EQ(a_pointer, NULL);
//   ASSERT_LT(i, array_size);
//   ASSERT_GT(records.size(), 0) << "There is no record left.";

#define EXPECT_EQ(val1, val2) \
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
#define EXPECT_NE(val1, val2) \
  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2)
#define EXPECT_LE(val1, val2) \
  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
#define EXPECT_LT(val1, val2) \
  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
#define EXPECT_GE(val1, val2) \
  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
#define EXPECT_GT(val1, val2) \
  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)

#define GTEST_ASSERT_EQ(val1, val2) \
  ASSERT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
#define GTEST_ASSERT_NE(val1, val2) \
  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2)
#define GTEST_ASSERT_LE(val1, val2) \
  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
#define GTEST_ASSERT_LT(val1, val2) \
  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
#define GTEST_ASSERT_GE(val1, val2) \
  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
#define GTEST_ASSERT_GT(val1, val2) \
  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)

// Define macro GTEST_DONT_DEFINE_ASSERT_XY to 1 to omit the definition of
// ASSERT_XY(), which clashes with some users' own code.

#if 0 /* disabled by -frewrite-includes */
#if !GTEST_DONT_DEFINE_ASSERT_EQ
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1888 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
#endif
# 1890 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

#if 0 /* disabled by -frewrite-includes */
#if !GTEST_DONT_DEFINE_ASSERT_NE
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1892 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#define ASSERT_NE(val1, val2) GTEST_ASSERT_NE(val1, val2)
#endif
# 1894 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

#if 0 /* disabled by -frewrite-includes */
#if !GTEST_DONT_DEFINE_ASSERT_LE
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1896 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#define ASSERT_LE(val1, val2) GTEST_ASSERT_LE(val1, val2)
#endif
# 1898 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

#if 0 /* disabled by -frewrite-includes */
#if !GTEST_DONT_DEFINE_ASSERT_LT
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1900 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#define ASSERT_LT(val1, val2) GTEST_ASSERT_LT(val1, val2)
#endif
# 1902 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

#if 0 /* disabled by -frewrite-includes */
#if !GTEST_DONT_DEFINE_ASSERT_GE
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1904 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#define ASSERT_GE(val1, val2) GTEST_ASSERT_GE(val1, val2)
#endif
# 1906 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

#if 0 /* disabled by -frewrite-includes */
#if !GTEST_DONT_DEFINE_ASSERT_GT
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 1908 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#define ASSERT_GT(val1, val2) GTEST_ASSERT_GT(val1, val2)
#endif
# 1910 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

// C-string Comparisons.  All tests treat NULL and any non-NULL string
// as different.  Two NULLs are equal.
//
//    * {ASSERT|EXPECT}_STREQ(s1, s2):     Tests that s1 == s2
//    * {ASSERT|EXPECT}_STRNE(s1, s2):     Tests that s1 != s2
//    * {ASSERT|EXPECT}_STRCASEEQ(s1, s2): Tests that s1 == s2, ignoring case
//    * {ASSERT|EXPECT}_STRCASENE(s1, s2): Tests that s1 != s2, ignoring case
//
// For wide or narrow string objects, you can use the
// {ASSERT|EXPECT}_??() macros.
//
// Don't depend on the order in which the arguments are evaluated,
// which is undefined.
//
// These macros evaluate their arguments exactly once.

#define EXPECT_STREQ(s1, s2) \
  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, s1, s2)
#define EXPECT_STRNE(s1, s2) \
  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
#define EXPECT_STRCASEEQ(s1, s2) \
  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, s1, s2)
#define EXPECT_STRCASENE(s1, s2) \
  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)

#define ASSERT_STREQ(s1, s2) \
  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, s1, s2)
#define ASSERT_STRNE(s1, s2) \
  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
#define ASSERT_STRCASEEQ(s1, s2) \
  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, s1, s2)
#define ASSERT_STRCASENE(s1, s2) \
  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)

// Macros for comparing floating-point numbers.
//
//    * {ASSERT|EXPECT}_FLOAT_EQ(val1, val2):
//         Tests that two float values are almost equal.
//    * {ASSERT|EXPECT}_DOUBLE_EQ(val1, val2):
//         Tests that two double values are almost equal.
//    * {ASSERT|EXPECT}_NEAR(v1, v2, abs_error):
//         Tests that v1 and v2 are within the given distance to each other.
//
// Google Test uses ULP-based comparison to automatically pick a default
// error bound that is appropriate for the operands.  See the
// FloatingPoint template class in gtest-internal.h if you are
// interested in the implementation details.

#define EXPECT_FLOAT_EQ(val1, val2)                                         \
  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
                      val1, val2)

#define EXPECT_DOUBLE_EQ(val1, val2)                                         \
  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
                      val1, val2)

#define ASSERT_FLOAT_EQ(val1, val2)                                         \
  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
                      val1, val2)

#define ASSERT_DOUBLE_EQ(val1, val2)                                         \
  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
                      val1, val2)

#define EXPECT_NEAR(val1, val2, abs_error)                                   \
  EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, val1, val2, \
                      abs_error)

#define ASSERT_NEAR(val1, val2, abs_error)                                   \
  ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, val1, val2, \
                      abs_error)

// These predicate format functions work on floating-point values, and
// can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(), e.g.
//
//   EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0);

// Asserts that val1 is less than, or almost equal to, val2.  Fails
// otherwise.  In particular, it fails if either val1 or val2 is NaN.
GTEST_API_ AssertionResult FloatLE(const char* expr1, const char* expr2,
                                   float val1, float val2);
GTEST_API_ AssertionResult DoubleLE(const char* expr1, const char* expr2,
                                    double val1, double val2);

#if 0 /* disabled by -frewrite-includes */
#if GTEST_OS_WINDOWS
#endif
#endif /* disabled by -frewrite-includes */
#if 0 /* evaluated by -frewrite-includes */
# 1996 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

// Macros that test for HRESULT failure and success, these are only useful
// on Windows, and rely on Windows SDK macros and APIs to compile.
//
//    * {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}(expr)
//
// When expr unexpectedly fails or succeeds, Google Test prints the
// expected result and the actual result with both a human-readable
// string representation of the error, if available, as well as the
// hex result code.
#define EXPECT_HRESULT_SUCCEEDED(expr) \
  EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))

#define ASSERT_HRESULT_SUCCEEDED(expr) \
  ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))

#define EXPECT_HRESULT_FAILED(expr) \
  EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))

#define ASSERT_HRESULT_FAILED(expr) \
  ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))

#endif  // GTEST_OS_WINDOWS
# 2019 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

// Macros that execute statement and check that it doesn't generate new fatal
// failures in the current thread.
//
//   * {ASSERT|EXPECT}_NO_FATAL_FAILURE(statement);
//
// Examples:
//
//   EXPECT_NO_FATAL_FAILURE(Process());
//   ASSERT_NO_FATAL_FAILURE(Process()) << "Process() failed";
//
#define ASSERT_NO_FATAL_FAILURE(statement) \
  GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_FATAL_FAILURE_)
#define EXPECT_NO_FATAL_FAILURE(statement) \
  GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_NONFATAL_FAILURE_)

// Causes a trace (including the given source file path and line number,
// and the given message) to be included in every test failure message generated
// by code in the scope of the lifetime of an instance of this class. The effect
// is undone with the destruction of the instance.
//
// The message argument can be anything streamable to std::ostream.
//
// Example:
//   testing::ScopedTrace trace("file.cc", 123, "message");
//
class GTEST_API_ ScopedTrace {
 public:
  // The c'tor pushes the given source file location and message onto
  // a trace stack maintained by Google Test.

  // Template version. Uses Message() to convert the values into strings.
  // Slow, but flexible.
  template <typename T>
  ScopedTrace(const char* file, int line, const T& message) {
    PushTrace(file, line, (Message() << message).GetString());
  }

  // Optimize for some known types.
  ScopedTrace(const char* file, int line, const char* message) {
    PushTrace(file, line, message ? message : "(null)");
  }

  ScopedTrace(const char* file, int line, const std::string& message) {
    PushTrace(file, line, message);
  }

  // The d'tor pops the info pushed by the c'tor.
  //
  // Note that the d'tor is not virtual in order to be efficient.
  // Don't inherit from ScopedTrace!
  ~ScopedTrace();

 private:
  void PushTrace(const char* file, int line, std::string message);

  ScopedTrace(const ScopedTrace&) = delete;
  ScopedTrace& operator=(const ScopedTrace&) = delete;
} GTEST_ATTRIBUTE_UNUSED_;  // A ScopedTrace object does its job in its
                            // c'tor and d'tor.  Therefore it doesn't
                            // need to be used otherwise.

// Causes a trace (including the source file path, the current line
// number, and the given message) to be included in every test failure
// message generated by code in the current scope.  The effect is
// undone when the control leaves the current scope.
//
// The message argument can be anything streamable to std::ostream.
//
// In the implementation, we include the current line number as part
// of the dummy variable name, thus allowing multiple SCOPED_TRACE()s
// to appear in the same block - as long as they are on different
// lines.
//
// Assuming that each thread maintains its own stack of traces.
// Therefore, a SCOPED_TRACE() would (correctly) only affect the
// assertions in its own thread.
#define SCOPED_TRACE(message)                                         \
  ::testing::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)( \
      __FILE__, __LINE__, (message))

// Compile-time assertion for type equality.
// StaticAssertTypeEq<type1, type2>() compiles if and only if type1 and type2
// are the same type.  The value it returns is not interesting.
//
// Instead of making StaticAssertTypeEq a class template, we make it a
// function template that invokes a helper class template.  This
// prevents a user from misusing StaticAssertTypeEq<T1, T2> by
// defining objects of that type.
//
// CAVEAT:
//
// When used inside a method of a class template,
// StaticAssertTypeEq<T1, T2>() is effective ONLY IF the method is
// instantiated.  For example, given:
//
//   template <typename T> class Foo {
//    public:
//     void Bar() { testing::StaticAssertTypeEq<int, T>(); }
//   };
//
// the code:
//
//   void Test1() { Foo<bool> foo; }
//
// will NOT generate a compiler error, as Foo<bool>::Bar() is never
// actually instantiated.  Instead, you need:
//
//   void Test2() { Foo<bool> foo; foo.Bar(); }
//
// to cause a compiler error.
template <typename T1, typename T2>
constexpr bool StaticAssertTypeEq() noexcept {
  static_assert(std::is_same<T1, T2>::value, "T1 and T2 are not the same type");
  return true;
}

// Defines a test.
//
// The first parameter is the name of the test suite, and the second
// parameter is the name of the test within the test suite.
//
// The convention is to end the test suite name with "Test".  For
// example, a test suite for the Foo class can be named FooTest.
//
// Test code should appear between braces after an invocation of
// this macro.  Example:
//
//   TEST(FooTest, InitializesCorrectly) {
//     Foo foo;
//     EXPECT_TRUE(foo.StatusIsOK());
//   }

// Note that we call GetTestTypeId() instead of GetTypeId<
// ::testing::Test>() here to get the type ID of testing::Test.  This
// is to work around a suspected linker bug when using Google Test as
// a framework on Mac OS X.  The bug causes GetTypeId<
// ::testing::Test>() to return different values depending on whether
// the call is from the Google Test framework itself or from user test
// code.  GetTestTypeId() is guaranteed to always return the same
// value, as it always calls GetTypeId<>() from the Google Test
// framework.
#define GTEST_TEST(test_suite_name, test_name)             \
  GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
              ::testing::internal::GetTestTypeId())

// Define this macro to 1 to omit the definition of TEST(), which
// is a generic name and clashes with some other libraries.
#if 0 /* disabled by -frewrite-includes */
#if !GTEST_DONT_DEFINE_TEST
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2168 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
#endif
# 2170 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

// Defines a test that uses a test fixture.
//
// The first parameter is the name of the test fixture class, which
// also doubles as the test suite name.  The second parameter is the
// name of the test within the test suite.
//
// A test fixture class must be declared earlier.  The user should put
// the test code between braces after using this macro.  Example:
//
//   class FooTest : public testing::Test {
//    protected:
//     void SetUp() override { b_.AddElement(3); }
//
//     Foo a_;
//     Foo b_;
//   };
//
//   TEST_F(FooTest, InitializesCorrectly) {
//     EXPECT_TRUE(a_.StatusIsOK());
//   }
//
//   TEST_F(FooTest, ReturnsElementCountCorrectly) {
//     EXPECT_EQ(a_.size(), 0);
//     EXPECT_EQ(b_.size(), 1);
//   }
#define GTEST_TEST_F(test_fixture, test_name)        \
  GTEST_TEST_(test_fixture, test_name, test_fixture, \
              ::testing::internal::GetTypeId<test_fixture>())
#if 0 /* disabled by -frewrite-includes */
#if !GTEST_DONT_DEFINE_TEST_F
#endif
#endif /* disabled by -frewrite-includes */
#if 1 /* evaluated by -frewrite-includes */
# 2200 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#define TEST_F(test_fixture, test_name) GTEST_TEST_F(test_fixture, test_name)
#endif
# 2202 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

// Returns a path to temporary directory.
// Tries to determine an appropriate directory for the platform.
GTEST_API_ std::string TempDir();

#ifdef _MSC_VER
#pragma warning(pop)
#endif
# 2210 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"

// Dynamically registers a test with the framework.
//
// This is an advanced API only to be used when the `TEST` macros are
// insufficient. The macros should be preferred when possible, as they avoid
// most of the complexity of calling this function.
//
// The `factory` argument is a factory callable (move-constructible) object or
// function pointer that creates a new instance of the Test object. It
// handles ownership to the caller. The signature of the callable is
// `Fixture*()`, where `Fixture` is the test fixture class for the test. All
// tests registered with the same `test_suite_name` must return the same
// fixture type. This is checked at runtime.
//
// The framework will infer the fixture class from the factory and will call
// the `SetUpTestSuite` and `TearDownTestSuite` for it.
//
// Must be called before `RUN_ALL_TESTS()` is invoked, otherwise behavior is
// undefined.
//
// Use case example:
//
// class MyFixture : public ::testing::Test {
//  public:
//   // All of these optional, just like in regular macro usage.
//   static void SetUpTestSuite() { ... }
//   static void TearDownTestSuite() { ... }
//   void SetUp() override { ... }
//   void TearDown() override { ... }
// };
//
// class MyTest : public MyFixture {
//  public:
//   explicit MyTest(int data) : data_(data) {}
//   void TestBody() override { ... }
//
//  private:
//   int data_;
// };
//
// void RegisterMyTests(const std::vector<int>& values) {
//   for (int v : values) {
//     ::testing::RegisterTest(
//         "MyFixture", ("Test" + std::to_string(v)).c_str(), nullptr,
//         std::to_string(v).c_str(),
//         __FILE__, __LINE__,
//         // Important to use the fixture type as the return type here.
//         [=]() -> MyFixture* { return new MyTest(v); });
//   }
// }
// ...
// int main(int argc, char** argv) {
//   ::testing::InitGoogleTest(&argc, argv);
//   std::vector<int> values_to_test = LoadValuesFromConfig();
//   RegisterMyTests(values_to_test);
//   ...
//   return RUN_ALL_TESTS();
// }
//
template <int&... ExplicitParameterBarrier, typename Factory>
TestInfo* RegisterTest(const char* test_suite_name, const char* test_name,
                       const char* type_param, const char* value_param,
                       const char* file, int line, Factory factory) {
  using TestT = typename std::remove_pointer<decltype(factory())>::type;

  class FactoryImpl : public internal::TestFactoryBase {
   public:
    explicit FactoryImpl(Factory f) : factory_(std::move(f)) {}
    Test* CreateTest() override { return factory_(); }

   private:
    Factory factory_;
  };

  return internal::MakeAndRegisterTestInfo(
      test_suite_name, test_name, type_param, value_param,
      internal::CodeLocation(file, line), internal::GetTypeId<TestT>(),
      internal::SuiteApiResolver<TestT>::GetSetUpCaseOrSuite(file, line),
      internal::SuiteApiResolver<TestT>::GetTearDownCaseOrSuite(file, line),
      new FactoryImpl{std::move(factory)});
}

}  // namespace testing

// Use this function in main() to run all tests.  It returns 0 if all
// tests are successful, or 1 otherwise.
//
// RUN_ALL_TESTS() should be invoked after the command line has been
// parsed by InitGoogleTest().
//
// This function was formerly a macro; thus, it is in the global
// namespace and has an all-caps name.
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_;

inline int RUN_ALL_TESTS() { return ::testing::UnitTest::GetInstance()->Run(); }

GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251

#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_H_
# 2309 "../../third_party/googletest/src/googletest/include/gtest/gtest.h"
#endif /* gtest.h expanded by -frewrite-includes */
# 14 "../../sdk/lib/ld/test/filter-view-tests.cc" 2

namespace {

TEST(LdFilterViewTests, Basic) {
  constexpr std::array arr{1, 5, 7, 2, 8, 43};
  {
    ld::internal::filter_view filter_view(arr, [](auto) { return true; });
    auto it = arr.begin();
    for (int i : filter_view) {
      EXPECT_EQ(i, *it++);
    }
  }
  {
    ld::internal::filter_view filter_view(arr, [](int i) { return i < 6; });
    auto expected = {1, 5, 2};
    auto it = expected.begin();
    for (int i : filter_view) {
      EXPECT_EQ(i, *it++);
    }
  }
}

TEST(LdFilterViewTests, Reverse) {
  constexpr std::array arr{1, 5, 7, 2, 8, 43};
  {
    ld::internal::filter_view filter_view(arr, [](auto) { return true; });

    auto it = filter_view.end();
    for (int expected : {43, 8, 2, 7, 5, 1}) {
      EXPECT_EQ(*--it, expected);
    }
  }
  {
    ld::internal::filter_view filter_view(arr, [](int i) { return i < 6; });

    auto it = filter_view.end();
    for (int expected : {2, 5, 1}) {
      EXPECT_EQ(*--it, expected);
    }
  }
}

using Module = ld::abi::Abi<>::Module;
using ModuleList = elfldltl::LinkMapList<Module, elfldltl::LinkMapListInFirstMemberTraits<Module>>;

template <bool... Visible, size_t... I>
std::array<Module, sizeof...(Visible)> CreateModuleList(std::integer_sequence<bool, Visible...>,
                                                        std::index_sequence<I...>) {
  std::array<Module, sizeof...(Visible)> ret{};

  (
      [&ret] {
        if (I < sizeof...(Visible) - 1) {
          ret[I].link_map.next = &ret[I + 1].link_map;
        }
        if (I) {
          ret[I].link_map.prev = &ret[I - 1].link_map;
        }
        ret[I].symbolizer_modid = I;
        ret[I].symbols_visible = Visible;
      }(),
      ...);

  return ret;
}

template <bool... Visible>
std::array<Module, sizeof...(Visible)> CreateModuleList(
    std::integer_sequence<bool, Visible...> symbols_visible) {
  return CreateModuleList(symbols_visible, std::make_index_sequence<sizeof...(Visible)>{});
}

TEST(LdFilterViewTests, SymbolicModuleView) {
  auto modules = CreateModuleList(std::integer_sequence<bool, 0, 1, 0, 1, 0, 1, 1>{});
  auto view = ModuleList(modules.data());
  auto pred = [](const auto& module) { return module.symbols_visible; };
  ld::internal::filter_view symbolic_view(view, pred);
  EXPECT_EQ(std::distance(symbolic_view.begin(), symbolic_view.end()), 4u);
  constexpr std::array expected_indexes{1u, 3u, 5u, 6u};
  auto expected = expected_indexes.begin();
  for (const Module& module : symbolic_view) {
    EXPECT_TRUE(module.symbols_visible);
    EXPECT_EQ(module.symbolizer_modid, *expected++);
  }
}

}  // namespace
